libretro / beetle-pce-fast-libretro

Standalone fork of Mednafen PCE Fast to libretro
GNU General Public License v2.0
29 stars 52 forks source link

[PCEngine CD] Extra memory not exposed #133

Closed Jamiras closed 4 years ago

Jamiras commented 4 years ago

From https://db-electronics.ca/wiki/wikis/consoles/turbografx-16/memory-map/#CD-ROM:

The CD-ROM appears to add an additional 64KB of RAM that should be exposed either through RETRO_MEMORY_SYSTEM_RAM or RETRO_ENVIRONMENT_SET_MEMORY_MAPS. There doesn't currently appear to be any way to access it.

Additionally, RETRO_MEMORY_SYSTEM_RAM currently returns 32KB of data, but there's only really 8KB of RAM on the base system. The 24KB of data after the first 8KB is always filled with FFs.

RETRO_MEMORY_SAVE_RAM does return 2KB of data - presumably the 2KB of battery-backed RAM on the CD-ROM peripheral, as it's only populated when playing CD-ROM games.

It seems like RETRO_MEMORY_SYSTEM_RAM should be modified to only return 8KB, and the additional 64KB for the CD-ROM peripheral should be exposed through the RETRO_ENVIRONMENT_SET_MEMORY_MAPS, but it might make sense to just have RETRO_MEMORY_SYSTEM_RAM return 72KB of data (the 8KB from the base system followed by the 64KB from the CD-ROM peripheral).

hizzlekizzle commented 4 years ago

This issue seems to be closed by #134 , so @negativeExponent can claim the bounty.