Thanks for anwering!

But how do you know the hardware registers start on $04000000 on the gp2x??


For system-stuff and games I would probably use SDL/Open2X or something. But for a demo, the ultimate goal is to

1. Get some resources from the OS with SWI's and own them, or point the hardware to my own buffers etc.
2. Get control of the interrupts and replace them with my own (simplification: turn off all ints and start my own little vsync interrupt
3. When demo is exited, provide a clean exit to menu after returning interrupts and resources to the system.

It's the way I make demos on all platforms, and I want to make sure I have full control and performance, i.e. no processes running in the background... it's not like people play videos or read pdfs while watching demos or playing games anyway

I would like to access hw regs physically, uncached. Frame and sound buffer could be taken from the upper 32MB, just don't know how to "malloc", mmapping means virtual access (?) which is slow and can't be used in asm.

But I'd still like to get base pointers etc, in case something is moved between firmware versions.