I've don't really an idea what this is doing, but I have tried to simplify it :(
CODE
#ifdef GP2X
#include "sys/mman.h"
#include "fcntl.h"
volatile unsigned short *MEM_REG;
unsigned long gp2x_dev=0;
void RamHack(void)
{
gp2x_dev = open("/dev/mem", O_RDWR);
MEM_REG=(unsigned short *)mmap(0...