RetroAchievements / docs-archive

RADocs
https://docs-archive.retroachievements.org
52 stars 10 forks source link

Add memory map reference for each system #18

Open rzumer opened 5 years ago

rzumer commented 5 years ago

Similar to the Game Identification page, it would be useful to document how memory is mapped for each RA-supported system, especially for implementing support in future clients (libretro cores, etc.).

I only know about these:
GB/C: http://gameboy.mongenel.com/dmg/asmmemmap.html (according to @Jamiras) PC88: http://www.maroon.dti.ne.jp/youkan/pc88/memmap.html -> RA maps main RAM (left column, inc. text window) immediately followed by TVRAM (text VRAM, AKA high-speed RAM). ROM, GVRAM, and extension RAM are not mapped.

meleu commented 5 years ago

Agreed that it would be a valuable info to have on the docs. By the way, @Jamiras posted some useful info on RALibretro's issue here.

I'm sure @celerizer could add some valuable input on this matter too.

meleu commented 5 years ago

I started a "blank" page for it: https://github.com/RetroAchievements/docs/wiki/Systems-Memory-Mapping

@rzumer Could add the info about pc88?

rzumer commented 5 years ago

Done.

meleu commented 5 years ago

@rzumer @Jamiras

I'm trying to fill some info on that page. What do you guys think about this notation (example for NES)?:

Offset Length Description used by RA
$0000 $800 2KB internal RAM
$0800 $800 Mirror of $000-$7FF
$1000 $800 Mirror of $000-$7FF
$1800 $800 Mirror of $000-$7FF
$2000 8 NES PPU registers
$2008 $1FF8 Mirrors of $2000-2007 (repeats every 8 bytes)
$4000 $20 Registers (Mostly APU)
$4020 $1FD Cartridge Expansion ROM
$6000 $200 SRAM
$8000 $4000 PRG-ROM
$C000 $400 PRG-ROM

Is the additional info unnecessary verbosity or could it be useful for something?

rzumer commented 5 years ago

Seems excessive to me. It does not even describe the memory map used on RA, so if there is an unmapped section in the middle, it is not clear whether the region is left uninitialized or skipped completely. In the latter case people will have to recalculate offsets manually in order to tell what region an address is in, and knowing where something like ROM is mapped in the CPU space is irrelevant for RA.

Some systems bank-switch and in that case it is not a good idea to map to the CPU space. It is better to map to each bank, and doing so will diverge from the CPU map that your tables are based on.

Just link references like I did in case someone wants more information.