-
Notifications
You must be signed in to change notification settings - Fork 2
ROM Patches
RenaKunisaki edited this page Apr 21, 2016
·
2 revisions
A few useful ROM patches:
Write 0x00000000
at 0x688
to disable the checksum on the first megabyte of ROM. This allows the game to start up after modifying this region. (This patch probably works on other games, too.)
The game's memory allocation is simple:
- The heap begins at (XXX) and ends at
0x8028DF00
- The game keeps a pointer to the end of the heap
- Allocation is just:
void* malloc(size_t size) {
heap_ptr -= size;
return heap_ptr;
}
- Memory is freed when loading another track or returning to the menu, by just resetting
heap_ptr = 0x8028DF00
To make the heap occupy the Expansion Pak region, change the following ROM addresses:
-
0x113FBA = 0x8080
(normally0x8028
) -
0x113FCE = 0x00
(normally0xDF
)
This allows 4 megabytes (or slightly more, depending how much empty space is at the end of RAM) for textures, display lists, objects, etc. (However, menus will still use the old heap.)
XXX find the address of heap_ptr
variable