News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: LoROMs larger than 2 MB  (Read 1818 times)

Myria

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
LoROMs larger than 2 MB
« on: January 12, 2013, 04:33:55 pm »
How do LoROMs larger than 2 MB, such as Super Metroid, work?  I need to expand a 1.5 MB LoROM game to 2.5 MB.

Where does the extra data go in the CPU memory map, and how does the mapping of the ROM file to CPU space work?

mopoz

  • Jr. Member
  • **
  • Posts: 68
  • Russia, Vodka and Bears
    • View Profile
Re: LoROMs larger than 2 MB
« Reply #1 on: January 12, 2013, 04:53:17 pm »
Skate-punk rulezzzz

LostTemplar

  • Hero Member
  • *****
  • Posts: 906
    • View Profile
    • au-ro-ra.net
Re: LoROMs larger than 2 MB
« Reply #2 on: January 12, 2013, 05:01:27 pm »
From nocash's documentation:

Code: [Select]
32K LoROM Banks with 32K System Area (in each bank)
  nn0000h-nn1FFFh  Mirror of 7E0000h-7E1FFFh (1st 8Kbytes of WRAM)
  nn2000h-nn5FFFh  I/O Ports
  nn6000h-nn7FFFh  Expansion
  nn8000h-nnFFFFh  32Kbyte LoROM bank(s)
ROM is broken up into non-continous 32K blocks, I/O ports and WRAM can be
accessed no matter of the CPU's current DB and PB register settings.
Some LoROM games are bigger than 2Mbytes (eg. Super Metroid, Gunple, Wizardry
6, Derby Stallion 3), these have bank 0-3Fh mapped in the 32K LoROM banks as
usually, and bank 40h and up each mapped twice in the 64K hirom banks [C0~].

I'd guess that most emulators mimic this behaviour for any LoROM game, even if it's originally < 2MB. You'd have to test it, though.