Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If you are making a Homebrew game for the Genesis but you want to port it to the 32X
- here's what you need to know:
- *** NEW HEADER ***
- A special ROM header is required enable the 32X, it contains a custom boot up sequence
- and pointers for transfering the SH2 code (for Master and Slave)
- - The Entry point ALWAYS points to $3F0, don't change this
- - The CHECKSUM routine is bundled within the security code,
- the byte calculation is -supposedly- to be done in SH2, because on the Genesis side
- it checks if the checksum result (at comm8) is the same as the value set in $18E ( if comm8 == ($18E) )
- BUT if you don't the time to generate a checksum, you can skip this by setting it to $0000
- - The SH2 can be located anywhere in the 4MB of ROM, it can point to SDRAM (best way) or ROM (not recommended)
- *** NEW ROM MAPS ****
- Due to the memory map changes, the Genesis code gets moved to these new locations:
- $880000
- This section shows the first 512KB of the ROM, this is meant for code.
- If your game is 512KB or lower then it's fine, but if your game is larger than this, there's the
- next location:
- $900000
- This shows a 1MB section of your ROM data, divided into 4 banks (the 4MB maximum)
- To change a bank, set your MB section at $A15104, examples:
- move.w #0,($A15104).l
- ROM
- Data
- + ------ +
- | Bank 0 | $900000
- + ------ + + -------+
- | Bank 1 | | |
- + -------+ | Bank 0 |
- | Bank 2 | | |
- + -------+ + -------+
- | Bank 3 |
- + -------+
- move.w #2,($A15104).l
- ROM
- Data
- + ------ +
- | Bank 0 | $900000
- + ------ + + -------+
- | Bank 1 | | |
- + -------+ | Bank 2 |
- | Bank 2 | | |
- + -------+ + -------+
- | Bank 3 |
- + -------+
- But this change causes a new problem:
- VDP's ROM-to-VDP transfers still point to $000000-$3FFFFF, to solve this: you have to set the RV bit at
- $A15107 (bit 0), this bit temporally reverts the ROM section back to $000000
- BUT while this gets active, it will cause the following things:
- - Lock $880000 and $900000 sections, if you set this bit while on ROM (ex. $880000) the next
- instruction will be trash data, to properly set this bit: your code must be running from RAM
- - Blocks access to ROM in the SH2 side, if the SH2 tries to read ROM while this bit is enabled, it will halt
- until ROM is accessible again (or probably freeze)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement