#25452 - Krakken - Mon Aug 23, 2004 8:37 am
I have a question regarding execution of a GBA game. Say for example, I have a ROM with a list of other roms that are attached to the main ROM (like a flash cart menu), how would I execute one of those attached ROMs from the main ROM and then later get back to the main ROM without reset?
Thanks.
#25453 - DKL - Mon Aug 23, 2004 9:24 am
You mean other GBA roms ? Then the "simplest" way would be to link your
overlay roms with a modified linker script, where rom base would be
0x8000000+(size_of_previous_roms) and stacks starting a little lower in memory to
keep values for your main menu. To call them it would be basically just jumps at
the right address, keeping sp at the right place. To come back, you need to jump
to a part of the base rom code that will rebuild the menu, rebuild gfx, reset
interrupt handler address, etc. based on values in the stack. You need the roms
sources to relink them.
Flash carts are using memory mapping techniques, to make the roms think they are
at 0x8000000. So they don't need to relink the roms. But if you intend to use
these techniques, you'll have the same problems as Pogoshell, incompatibilities
between carts. Good luck ! :)
Why do you want to do this ?
DKL
#25457 - Krakken - Mon Aug 23, 2004 11:33 am
I want to know for a number of reasons. Mainly so I can generally understand how it's done. It sparked my interest when tepples mentioned it for the new compo as a way of arranging the games.