JyCet
Member
Ok I'm starting another thread about the famous Squidge's mmuhack module
Normaly if it's good for emulators it should be good for homebrew ? But why no homebrew use it ?
I'm using HW paeryn SDL lib with lot of HW surface in all my gp2x program, I'm successfuly loaded mmuhack module (i think) ... but after that what can I do ? I havent seen atm any speed up but I suppose I've missed something to take all advantage of magic mmuhack
Here the code (it's directly a copy/past in mmuhack module readme)
CODE
...
...
...
int mmuhack(void)
{
int mmufd;
system("/sbin/rmmod mmuhack");
system("/sbin/insmod mmuhack.o");
mmufd = open("/dev/mmuhack", 2);
if(mmufd < 0) return 0;
close(mmufd);
return 1;
}
int mmuunhack(void)
{
system("/sbin/rmmod mmuhack");
return 1;
}
...
...
...
int main(int argc,char **argv){
int ret;
ret = mmuhack();
if (!ret){
printf("mmuhack failed!\n");
}else printf("mmuhack OK!\n");
...
...
...
SDL_Quit();
mmuunhack();
chdir("/usr/gp2x");
execl("gp2xmenu", "gp2xmenu", NULL);
return 0;
}
Did all sdl hw surface takes automatically advantage of mmuhack ?
I hope this thread help me and all gp2x homebrew coder
The mmuhack module used is here:
http://www.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1690
Thanks for any help B)
Normaly if it's good for emulators it should be good for homebrew ? But why no homebrew use it ?
I'm using HW paeryn SDL lib with lot of HW surface in all my gp2x program, I'm successfuly loaded mmuhack module (i think) ... but after that what can I do ? I havent seen atm any speed up but I suppose I've missed something to take all advantage of magic mmuhack
Here the code (it's directly a copy/past in mmuhack module readme)
CODE
...
...
...
int mmuhack(void)
{
int mmufd;
system("/sbin/rmmod mmuhack");
system("/sbin/insmod mmuhack.o");
mmufd = open("/dev/mmuhack", 2);
if(mmufd < 0) return 0;
close(mmufd);
return 1;
}
int mmuunhack(void)
{
system("/sbin/rmmod mmuhack");
return 1;
}
...
...
...
int main(int argc,char **argv){
int ret;
ret = mmuhack();
if (!ret){
printf("mmuhack failed!\n");
}else printf("mmuhack OK!\n");
...
...
...
SDL_Quit();
mmuunhack();
chdir("/usr/gp2x");
execl("gp2xmenu", "gp2xmenu", NULL);
return 0;
}
Did all sdl hw surface takes automatically advantage of mmuhack ?
I hope this thread help me and all gp2x homebrew coder
The mmuhack module used is here:
http://www.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1690
Thanks for any help B)