(very simple) GBA cart bus code

Since we don’t need to address anything, outputting data to the GBA cartridge bus is super-simple. 

First we need to make sure that the ARM9 has control of the bus, like so:

sysSetBusOwners(true, true);

Then we simply write to the cartridge SRAM address:

memcpy((void*)0x0A000000, &data, 1);

Reading, assuming you only want the current state of the data lines (no addressing) is equally simple - just read from the same address:

memcpy(&data, (void*)0x0A000000,  1);
Comments (View)
blog comments powered by Disqus
hit counter
Provided by website-hit-counters.com .