Vector table swap: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (Created page with "The first $80 bytes of the 68k memory map are swappable between the onboard BIOS and the cartridge's first P ROM. On startup or reset, those $80 bytes are tho...")
 
(Thanks smkdan !)
Line 1: Line 1:
The first $80 bytes of the [[68k memory map]] are swappable between the onboard [[BIOSes|BIOS]] and the cartridge's first [[P ROM]].
The first $80 bytes of the [[68k memory map]] are swappable between the onboard [[BIOSes|BIOS]] and the cartridge's first [[P ROM]].


On startup or reset, those $80 bytes are those found at $C00000 ($C00000~$C0007F), so that the system always starts by executing the initialisation routine.
When the vector tables are swapped, $00~$7F point to $C00000~$C0007F, and $C00000~$C0007F point to the data in the P ROM (if any).
 
On startup or reset, the first $80 bytes are those found at $C00000~$C0007F, so that the system always starts by executing the initialisation routine.


Right before starting a game, the cart's ROM is swapped in as well as the [[S ROM]] and [[M1 ROM]].
Right before starting a game, the cart's ROM is swapped in as well as the [[S ROM]] and [[M1 ROM]].

Revision as of 08:35, 17 July 2012

The first $80 bytes of the 68k memory map are swappable between the onboard BIOS and the cartridge's first P ROM.

When the vector tables are swapped, $00~$7F point to $C00000~$C0007F, and $C00000~$C0007F point to the data in the P ROM (if any).

On startup or reset, the first $80 bytes are those found at $C00000~$C0007F, so that the system always starts by executing the initialisation routine.

Right before starting a game, the cart's ROM is swapped in as well as the S ROM and M1 ROM.

Registers $3A0003 (REG_SWPBIOS) and $3A0013 (REG_SWPROM) are used for this.