You can access the hardware registers on the gp2x if you mmap them into your address space. To do so you open /dev/mem and then mmap a page at the right offset. It is very easy to do.