Shell Caanoo To Boot To Mame4All Rom On Startup


Le Chuck

Still Fresh
Joined
Feb 16, 2012
Messages
28
Location
SE US
Greetings, just got my Caanoo and I gotta say it's a fantastic little tool. I used to have a GP2X but never got as indepth into modding it as I should have. I'm an avid arcade builder over on the BYOAC forums and am planning to use the Caanoo in a mini dedicated Star Wars arcade build. The Caanoo really lends itself to this title with the analog control. A whole other issue is figuring out how I'm going to rewire and design a flight yoke interface to work with the analog stick but for now I need software help.

What I want to happen: When I turn on my Caanoo I want it boot directly to Star Wars, then if I exit it will back out either to the main menu or the Mame4all game selection menu.

How I understand this needs to be done: I need to write a command line script that boots starwars from mame4all so I can bypass the mame4all menus then stick that script in the games menu. Next I need to shell the Caanoo to boot that script from the game menu on startup.

So, is this feasible, am I on the right track, and can anybody help me along the path to getting this done either through some helpful links or even a walkthrough?

I really appreciate the help and look forward to working on this project. If everything goes to plan (it never does but usually turns out pretty well anyway) I'll post a link to the finished project. The GP Wiz is already being used in quite a few minis over on the BYOAC and this should be a nice departure from that. Thanks a lot!
 
If you download gmenu2x, there is an autorun.gpu inside the zip, which you might adapt to autostart mame4all. I'm not that familiar with command line/script commands, but I think you can modify the .ini file to autostart Star Wars with mame. Exiting a game takes you to the Mame4all game selection menu by default.
Might be getting hard to play, if you're planning to convert the sit-in arcade cabinet to a mini version. :)
btw: VERY nice work done in your signature.
 
Thanks for the kuddos guys, it's a really fun hobby and I'm just trying to keep up with some of the really amazing work being executed over on the BYOAC.

I was looking at GMenu2X last night thinking the same thing so I'll definetly start tearing into that to see what I come up with. I have some other builders who are interested in the same thing so hopefully I'll get this cracked.

I'm doing an upright Star Wars rather than the cockpit so it "should" be playable but we'll see. Thanks again guys and if any light-bulbs go on please let me know, I always like having more than one solution.
 
Code:
title=Starwars
exec=/mnt/sd/mame4all_2.5/mame
icon=/mnt/sd/mame4all_2.5/mame.png
params=/mnt/sd/mame4all_2.5/roms/starwars.zip
wrapper=true

In theory this should get me an icon that when I click it loads Star Wars right? Issue is that it is kicking me out of GMenu2x and into the regular Mame4all rom select menu

Code:
title=mame
icon=/mnt/sd/mame4all_2.5/mame.png
exec=/mnt/sd/mame4all_2.5/mame
params=[selFile]
manual=/mnt/sd/mame4all_2.5/readme.txt
clock=533
selectordir=/mnt/sd/mame4all_2.5/roms/
selectorscreens=/mnt/sd/mame4all_2.5/snap/
wrapper=true
dontleave=true

This guy when clicked gives me a nice little menu but really isn't much different than the stock solution

However if I can integrate the above into an autorun script for startup that would be useful.

Any hints. Ideally we get the top piece of code working and then get that integrated into an autorun. I feel like I'm clutching at straws tho. Thanks for any help tho.
 
Okay, booting to Mame now

Code:
"Autorun"
#!/bin/sh
cd /mnt/sd/mame4all_2.5
exec ./mame.gpe

but still have no luck booting directly into the rom.
 
What did the guys do, who built a Wiz-mini arcade? The script should be the same on Caanoo, except the rom and maybe directories name.
 
Akabei said:
What did the guys do, who built a Wiz-mini arcade? The script should be the same on Caanoo, except the rom and maybe directories name.

They got to where I am and stopped. We collectively haven't cracked this nut yet. I'm shooting off into unknown territory here. I'm wondering if I need to compile my own mame?
 
Last edited by a moderator:
If I remember correctly, PocketSNES has an option to autostart the last rom used. Maybe a look at the source code gives a hint, if you're planning to recompile mame. Available here
 
Thanks for the link, I may have to start tearing that apart.

Mame was designed as a cmd line launch utility and I can't imagine that functionality was bred out of it in mame4all. The most recent mame release you still launch from the command line or use a Front End. All Mame4all should be a front end so it stands to reason that there should be a way to bypass the front end and launch from the core utility.

in DOS speak it looks like this:

c:\mame\mame starwars


I just can't find any documentation that shows this sort of basic support. Perhaps I'm barking up the wrong tree with mame4all. Is there a mame available for caanoo that is a little less "user friendly"?
 
Akabei said:
There's a 2.6 version, but I don't think, it will help very much. Maybe you should send a PM to Franxis, the developer/porter of Mame4all for the Caanoo.

I just came across this thread. Once I get home I'll try that, I'm running 2.5 and this post says that it should work with 2.5. Looks like a create a simple batch but then rather than click on that batch I make a link to it and run it that way. Seems like a round-about solution but if it works you won't here me complaining.

If that works then I just need to integrate it into the shell, which hopefully will be same as it was for mame.

If not then I'll hit up Franxis and see what we can get worked out. Thanks man!
 
Last edited by a moderator:
hey,

well here's what i would do:

create an autorun file ... never created/used an autorun before, so i'm lending some lines from you :)

Code:
"Autorun"
#!/bin/sh
cd /mnt/sd/mame4all_2.5
exec ./mame ./roms/your_starwars_rom
exec ./mame.gpe


and thats it!

from the readme it states that the "mame" file is the actual emulator and mame.gpe is the frontend.

so what it does is ... starting the mame emulator directly with the starwars rom and when this exits you'll presented with the mame frontend. seems easy, not tried, so good luck :)
 
crow_riot said:
Code:
"Autorun"
#!/bin/sh
cd /mnt/sd/mame4all_2.5
exec ./mame ./roms/your_starwars_rom
exec ./mame.gpe

I don't think that works as expected, because "exec" never returns, so the second call of Mame is never reached...
 
Last edited by a moderator:
hmn said:
crow_riot said:
Code:
"Autorun"
#!/bin/sh
cd /mnt/sd/mame4all_2.5
exec ./mame ./roms/your_starwars_rom
exec ./mame.gpe

I don't think that works as expected, because "exec" never returns, so the second call of Mame is never reached...

oh if you're right (and i think you are), it should be enough to remove the exec commands ... :)
 
Last edited by a moderator:
Got it working. Thanks for all the help guys. The code above was a bit wonky, for anybody else you wanting to do this the code needs to look like this:

Code:
"Autorun"
#!/bin/sh
cd /mnt/sd/mame4all_2.5
exec ./mame starwars

This starts up right to the game - I need to work on adding some clocking parameters but that's easy stuff. As a note, for this to work you must have a ROMS folder in the same folder as mame and your target rom needs to be in that folder as this is where mame automatically looks. When you exit the game it goes to the native Mame4all rom select menu which is fine as all I needed gmenu2x to do was get me to the game in the fist place.

Awesome set of forums you have here and I appreciate all the help!
 
Back
Top