Gmenu2X; Games That Return To The Main Menu


Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
I read the new Gmenu2X docs. Great stuff. Told me about editing the .gpe files to remove two certain lines. Then I remembered to enable that wrapper function. Did that, and was successful...IF those two lines were not built into the game itself. If they were? Now I have problems. The docs told me to find the source (not always an option), remove those lines, and recompile. It also warned that non-coders (myself) would not be able to do so, or something along those lines. What should I do? I'd rather use Gmenu2X than the default menu, but I don't wanna use Win2X, as I've had bad encounters with that.
 

u9i

Call me Uni
Joined
Jun 27, 2008
Messages
761
Age
43
Location
Faroe Islands
Website
riotdigital.com
You should complain to GPH. The more we are who complain, the more likely they will do something about it :)

Are there many programs that load the old menu in the code, and not in a wrapper file?

/Uni
 

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
Yes, unfortunately, about half the programs I have do. And it's not GPH's fault; it's the programmer's fault for not writing bash scripts, apparently. Various emulators of mine and whatnot won't return to Gmenu2X, which really sucks, considering they're what the system is designed for.
 

crow_riot

Well-Known Member
Joined
Sep 21, 2009
Messages
1,763
Location
.at
the problem is, that the 'autorun' is not working as expected. and thats gph's and for sure not the programmer's fault.
 

joyrider

Member
Joined
Mar 29, 2006
Messages
590
Age
39
Website
www.willemssoft.Be
if the programmer wrote the strings as a constant (to launch the menu) which most people probably did, isn't it fairly easy to replace the 2 commands cd /usr/gp2x and gp2xmenu with something else (like ls ./ or cd ./ ) and pad with 00's ? i did this before on the caanoo's internal flashplayer's binary so that it didn't restart the default (caanoo) menu but just did nothing except cd ./ or ls ./ . that resulted in the flashplayer (/games) not launching the default menu and picklemenu took over where it left of. The same can be done on a wiz i guess.

this this is fairly easy and anyone can do this even you...

The thing is however i would only do this for personal use like someone makes a tutorial on how to do this but the guys doing it don't spread around the (hacked up) binaries. cause the original programmers probably won't like it much.

Also before doing so i would ask the original programmer's to change to scripts ...
 

Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,483
Location
Detroit, Michigan
Website
Visit site
joyrider said:
if the programmer wrote the strings as a constant (to launch the menu) which most people probably did, isn't it fairly easy to replace the 2 commands cd /usr/gp2x and gp2xmenu with something else (like ls ./ or cd ./ ) and pad with 00's ? i did this before on the caanoo's internal flashplayer's binary so that it didn't restart the default (caanoo) menu but just did nothing except cd ./ or ls ./ . that resulted in the flashplayer (/games) not launching the default menu and picklemenu took over where it left of. The same can be done on a wiz i guess.

this this is fairly easy and anyone can do this even you...

The thing is however i would only do this for personal use like someone makes a tutorial on how to do this but the guys doing it don't spread around the (hacked up) binaries. cause the original programmers probably won't like it much.

Also before doing so i would ask the original programmer's to change to scripts ...
keeping the reload in the script is a good practice, but hacking and rewriting each script to work around this would be painful and time consuming.
The easier approach at least with the wiz is to replace gp2xmenu with a script reloading gmenu2x. Until a method is found to writing the nand caanoo is stuck.
 
Last edited by a moderator:

joyrider

Member
Joined
Mar 29, 2006
Messages
590
Age
39
Website
www.willemssoft.Be
Pickle said:
keeping the reload in the script is a good practice, but hacking and rewriting each script to work around this would be painful and time consuming.
The easier approach at least with the wiz is to replace gp2xmenu with a script reloading gmenu2x. Until a method is found to writing the nand caanoo is stuck.
well it only takes 2 minutes with a hex editor to do this (on games / ports / emulators that don't use scripts) and i only advised this on doing it for personal matters so if people want some software that launches /usr/gp2x/gp2xmenu from within the software they can't stop them to prevent this. For example certain sources are closed or the authors are long gone or they just don't know about the scripts or gmenu2x and should be contacted first, but one can't stop people doing it for personal taste / matters. Not saying i like it though but sometimes there's just no other option...

probably bad topic to discuss this here but about the caanoo's nand i really wonder how they made it so that a mount with remount option to make it writeable did not work ... unless we gave it bad command line parameters (for example i'm not sure where / is mounted to and fstab or mtab doesn't give me any clues...)
 
Last edited by a moderator:

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
joyrider said:
Pickle said:
keeping the reload in the script is a good practice, but hacking and rewriting each script to work around this would be painful and time consuming.
The easier approach at least with the wiz is to replace gp2xmenu with a script reloading gmenu2x. Until a method is found to writing the nand caanoo is stuck.
well it only takes 2 minutes with a hex editor to do this (on games / ports / emulators that don't use scripts) and i only advised this on doing it for personal matters so if people want some software that launches /usr/gp2x/gp2xmenu from within the software they can't stop them to prevent this. For example certain sources are closed or the authors are long gone or they just don't know about the scripts or gmenu2x and should be contacted first, but one can't stop people doing it for personal taste / matters. Not saying i like it though but sometimes there's just no other option...

probably bad topic to discuss this here but about the caanoo's nand i really wonder how they made it so that a mount with remount option to make it writeable did not work ... unless we gave it bad command line parameters (for example i'm not sure where / is mounted to and fstab or mtab doesn't give me any clues...)
So I can do it with a hex editor, then? How? And what should I use?
 
Last edited by a moderator:

u9i

Call me Uni
Joined
Jun 27, 2008
Messages
761
Age
43
Location
Faroe Islands
Website
riotdigital.com
Open the executable in a hex editor, search for the string gp2xmenu and you should be able to change it to run whatever program you want. Also the "cd" string should be corrected. But it is important that you do not change the size of the file (i think, you can test if you want), also, remember that strings terminate with 0x0, or character NULL. If you dont have enough room to write your new path, then maybe you need to create a wrapper script which mounts or links a shorter name to what you want to do. Good luck. Let us know how it goes.

/Uni
 

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
Wiz. But the script that I want to delete is (half the time) built into the program itself. And u9i, you lost me after the world "terminate". Should I just get live help from someone on some IRC channel?
 

Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,483
Location
Detroit, Michigan
Website
Visit site
Blue Protoman said:
Wiz. But the script that I want to delete is (half the time) built into the program itself. And u9i, you lost me after the world "terminate". Should I just get live help from someone on some IRC channel?
since your using a wiz you dont need to do the hex hack, all you need to so is replace gp2xmenu executable with a gmenu2x loader script.
cd to where gp2xmenu lives
mv gp2xmenu gp2xmenu_backup
cp /mnt/sd/gp2xmenu gp2xmenu

gp2xmenu script should be something like:
#!/bin/sh
cd /mnt/sd/gmenu2x
exec /mnt/sd/gmenu2x
 
Last edited by a moderator:

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
Pickle said:
since your using a wiz you dont need to do the hex hack, all you need to so is replace gp2xmenu executable with a gmenu2x loader script.
cd to where gp2xmenu lives
mv gp2xmenu gp2xmenu_backup
cp /mnt/sd/gp2xmenu gp2xmenu

gp2xmenu script should be something like:
#!/bin/sh
cd /mnt/sd/gmenu2x
exec /mnt/sd/gmenu2x

OK, but where do I put it, and how?
 
Last edited by a moderator:

u9i

Call me Uni
Joined
Jun 27, 2008
Messages
761
Age
43
Location
Faroe Islands
Website
riotdigital.com
hmm... that's a good question :) well, either you need terminal access to the wiz, or maybe you could make a script that did that i suppose, and run it from the menu... I will see if i can cook something up for you tomorrow.

/Uni
 

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
Thank you very much! And, when you tell me how to use it, please assume that I don't know any of the technical terms involved.
 

u9i

Call me Uni
Joined
Jun 27, 2008
Messages
761
Age
43
Location
Faroe Islands
Website
riotdigital.com
Ok i might have bitten off more then i can chew :)

Can you tell me the path to gmenu? Where have you installed it, and what is the .gpe filename exactly?

/Uni
 

u9i

Call me Uni
Joined
Jun 27, 2008
Messages
761
Age
43
Location
Faroe Islands
Website
riotdigital.com
Hi again.

I have made a small script which backs up the original gp2xmenu and replaces it with the following script. The script should (if i did it right) look for the autorun.gpu file on the sd card, followed by the nand. If it finds neither, it falls back to the backed up original menu. This means it should load the original menu if you don't have installed gmenu. Any feedback if the script is ok would be nice. I am no shell-expert:

Code:
if test -f "/mnt/sd/autorun.gpu"
 then
     cd /mnt/sd/
     exec ./autorun.gpu
     exit
 elif test -f "/mnt/nand/autorun.gpu"
 then
     cd /mnt/nand/
     exec ./autorun.gpu
     exit
 else
     cd /usr/gp2x/
     exec ./gp2xmenu_backup
     exit
 fi
But i don't know if the fallback works. Will them original menu run as gp2xmenu_backup, or will stuff break from that?

Blue Protoman, after running install.gpe you should be able to use gmenu from the sd card, and have it auto-run every time the Wiz boots up, and any app quits. But if something fails, you might have to reflash your wiz, so please have backup of everything on the nand.

Let me know how it works (or wait for feedback on the script :) )

A temporary download is here. I will submit it to the archive if it works:

http://warehousepanic.com/files/wiz_autorun_fix.zip
 

Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,119
I will later, when I'm at home, but where do I put it? In the .gpe of the game in question? And also, this won't brick my Wiz, will it? If there's any chance, I won't test it. If it can be fixed with a firmware reinstall, though, then I'll try it.
 
Top