How to detect the RAM
When a disk system is present, main RAM slot ID can be read from following addresses:
- F341h = Slot ID of Main-RAM on page 0000h~3FFFh
- F342h = Slot ID of Main-RAM on page 4000h~7FFFh
- F343h = Slot ID of Main-RAM on page 8000h~BFFFh
- F344h = Slot ID of Main-RAM on page C000h~FFFFh
See also here if you develop a software in cartridge.