Mocca 0.1


RiX0R

Idler-Inside
Joined
Sep 20, 2005
Messages
294
Website
rix0r.nl
Have you gotten tired yet of explaining how to start a ROM every time you hand your GP2X to a friend?

shot-20060109.211914.jpg


Mocca is my attempt at making a better menu/frontend/launcher for the GP2X. My inspiration was that it should be modal (meaning that it should only show the possibilities relevant to the current task) and complete (meaning that it should show all such possibilities at once), and the name kind of came from there.

Mocca is a bit like bastardshell, in that it searches the entire SD card for files to run. (Thanks no_skill, I made good use of your code :)). Mocca is also a bit like like Unified File Manager, in that it will run an emulator or application directly depending on the type of file it is called on.

Mocca's goal is to be as simple as possible, and offering all capabilities of the GP2X's software in a single menu.

It will automatically discover the emulators you have on your SD card, and show and hide the appropriate menu items accordingly.

shot-20060109.213414.jpg


Easy access to SD card sync: you don't have to guess whether your savegame was succesfully written or not.

shot-20060109.214050.jpg


Mocca can install itself as the default shell! Watch out when using this feature however -- as it modifies the NAND, there's a possibility this will brick your GP2X. I have only tested it on my own GP2X, running firmware 1.0.0. I make no guarantees about the reliability of this feature. Use at your own risk. If it works on your GP2X too, I'd certainly like to hear though!

If you have replaced the standard shell with Mocca, you can still get to it easily. You'll still need the classic menu for playing music and video, as there are currently no alternatives to GPH's tools, so there's an option in the menu:

shot-20060109.214635.jpg



This first distribution of Mocca contains recognition for standard GPH executables, nk's NES emu, and pdfview.

If you want to use pdfview, you will need to modify the pdfview.gpe launcher script to the following:

Code:
#!/bin/sh
cd /mnt/sd/pdfview
./pdfview $* >& /dev/null
cd /usr/gp2x
exec ./gp2xmenu

(That is, add the shebang line and the $* argument)

nk's NES emu is recognized, but will not launch ROMs passed to it from the command-line (yet), so it does not perform as it should <_<. The menu is there to show Mocca's goal and what will be possible when mature emulators will begin to arise.

New formats can be added quite easily however (instructions on how to do this are included in the archive). If you create a new scheme, please be so kind to share it with the rest of us.

Also be aware that all launcher scripts need to have a proper shebang line (#!/bin/sh), or Mocca will hang trying to run them! Future versions will probably detect the absence of such a line and fix the situation -- right now you will need to take care.

Edit: Looks like I forgot to mention the controls in the README. Here they are:

stick: move selection
A/B/click: confirm
X/Y: cancel
L, R: move selection left or right(also in file listing)
L+R: quit
START: access menu


When all is said and done, get it here.


P.S: As evidenced by the screenshots, I'm a coder, not a designer. I could use some help in making Mocca look spiffy. If you're interested in helping me beautify this app, drop me a line.
 
Last edited by a moderator:
Hey, would it be possible to have button shortcuts, like R starting the MP3-players and starting to play from predetermined folder, then switching the screen of?

Looks nice. :)
 
Hey, would it be possible to have button shortcuts, like R starting the MP3-players and starting to play from predetermined folder, then switching the screen of?

Not right now -- we don't really have developer access to the MP3 player now.

Besides, L and R are already bound to switching back and forth between schemes (even when you're in the file list! Try it!)
 
Last edited by a moderator:
Sounds like a great idea! I will definitely take this over GPH's firmware in the future. However, I am afraid to try it in its current state because it sounds like it doesn't support everything I use my gp2x for. Good luck working on it, i'm looking forward to the day I replace GPH's firmware with this.
 
Oooo, I'll have to try this out ... I loved Windups on my GP32 ...

* Suddenly feels a strange sense of loss for not having played with the GP32 in a long time *
 
why is video support not possible? as soon as you add this, it'll get my standard shell (using zlauncher right now)
What i would like too, would be multiple skin support.
 
Have you gotten tired yet of explaining how to start a ROM every time you hand your GP2X to a friend?

shot-20060109.211914.jpg


Mocca is my attempt at making a better menu/frontend/launcher for the GP2X. My inspiration was that it should be modal (meaning that it should only show the possibilities relevant to the current task) and complete (meaning that it should show all such possibilities at once), and the name kind of came from there.

Mocca is a bit like bastardshell, in that it searches the entire SD card for files to run. (Thanks no_skill, I made good use of your code :)). Mocca is also a bit like like Unified File Manager, in that it will run an emulator or application directly depending on the type of file it is called on.

Mocca's goal is to be as simple as possible, and offering all capabilities of the GP2X's software in a single menu.

It will automatically discover the emulators you have on your SD card, and show and hide the appropriate menu items accordingly.

shot-20060109.213414.jpg


Easy access to SD card sync: you don't have to guess whether your savegame was succesfully written or not.

shot-20060109.214050.jpg


Mocca can install itself as the default shell! Watch out when using this feature however -- as it modifies the NAND, there's a possibility this will brick your GP2X. I have only tested it on my own GP2X, running firmware 1.0.0. I make no guarantees about the reliability of this feature. Use at your own risk. If it works on your GP2X too, I'd certainly like to hear though!

If you have replaced the standard shell with Mocca, you can still get to it easily. You'll still need the classic menu for playing music and video, as there are currently no alternatives to GPH's tools, so there's an option in the menu:

shot-20060109.214635.jpg



This first distribution of Mocca contains recognition for standard GPH executables, nk's NES emu, and pdfview.

If you want to use pdfview, you will need to modify the pdfview.gpe launcher script to the following:

Code:
#!/bin/sh
cd /mnt/sd/pdfview
./pdfview $* >& /dev/null
cd /usr/gp2x
exec ./gp2xmenu

(That is, add the shebang line and the $* argument)

nk's NES emu is recognized, but will not launch ROMs passed to it from the command-line (yet), so it does not perform as it should <_<. The menu is there to show Mocca's goal and what will be possible when mature emulators will begin to arise.

New formats can be added quite easily however (instructions on how to do this are included in the archive). If you create a new scheme, please be so kind to share it with the rest of us.

Also be aware that all launcher scripts need to have a proper shebang line (#!/bin/sh), or Mocca will hang trying to run them! Future versions will probably detect the absence of such a line and fix the situation -- right now you will need to take care.

Edit: Looks like I forgot to mention the controls in the README. Here they are:

stick: move selection
A/B/click: confirm
X/Y: cancel
L, R: move selection left or right(also in file listing)
L+R: quit
START: access menu


When all is said and done, get it here.


P.S: As evidenced by the screenshots, I'm a coder, not a designer. I could use some help in making Mocca look spiffy. If you're interested in helping me beautify this app, drop me a line.

I am patiently awaiting the completion of this. Please see the bounty in my sig :)
 
Last edited by a moderator:
the mplayer file can't take command line arguments for some reason, that's why.

That's right; GPH hacked around the mplayer source to produce their own GPH-shell-like-frontend-to-mplayer, but still confusingly called it mplayer instead of VideoPlayer (or something similar).

If you pass /usr/gp2x/mplayer any kind of command-line argument, even --help, it segfaults. Kind of wondering what it's doing in there...

If you run the mplayer without arguments you'll see the standard GPH file selector, which will start the video player.

Unless GPH release the source to their shell (which is unlikely), or someone ports a new version of mplayer across, we're pretty much stuck with the standard GPH options.
 
Last edited by a moderator:
I am patiently awaiting the completion of this. Please see the bounty in my sig :)

I'm not really driven by bounty, but...

Animated PNGs? What the heck? Did I miss anything? Last time I checked PNGs weren't animated, unless of course you're referring to a single large framemap.

Also, mouseover events without a mouse?

And note that I could probably pretty easily implement the features you list there... but that'd still be worth nothing because you'd need a designer to take advantage of the features offered.

But don't worry, flashy effects are on my TODO list... they're just not very high up ;).
 
Last edited by a moderator:
Looks good, though what I'd like to see is just a list of everything 'runnable' on the card, in alphabetical order, and you select it and it runs. Too many submenus do my head in.
 
the mplayer file can't take command line arguments for some reason, that's why.

That's right; GPH hacked around the mplayer source to produce their own GPH-shell-like-frontend-to-mplayer, but still confusingly called it mplayer instead of VideoPlayer (or something similar).

If you pass /usr/gp2x/mplayer any kind of command-line argument, even --help, it segfaults. Kind of wondering what it's doing in there...

If you run the mplayer without arguments you'll see the standard GPH file selector, which will start the video player.

Unless GPH release the source to their shell (which is unlikely), or someone ports a new version of mplayer across, we're pretty much stuck with the standard GPH options.

I'd like that to happen, then maybe we'd find a way to get codecs to work somewhat. ^_^

I am patiently awaiting the completion of this. Please see the bounty in my sig :)
Animated PNGs? What the heck? Did I miss anything? Last time I checked PNGs weren't animated, unless of course you're referring to a single large framemap.

I feel the same way. I never knew of their existance although I WOULD like to see Animated GIF support, because THOSE are easy to find. ;P

Looks good, though what I'd like to see is just a list of everything 'runnable' on the card, in alphabetical order, and you select it and it runs. Too many submenus do my head in.

That's what the Native Programs Menu is...
 
Last edited by a moderator:
Do you want up to FULL 16'7 million of color animations (MNG & APNG) or only up to 256 color animations (GIF)?

http://en.wikipedia.org/wiki/MNG

MNG (pronounced /mɪŋ/ in IPA) is a public file format for animated images. The name stands for Multiple-image Network Graphics.

MNG is closely related to the PNG image format. When PNG development started in early 1995, developers decided not to incorporate support for animation, not least of all because this feature of GIF was little used at the time. However, work soon started on MNG as an animation-supporting version of PNG.

And APNG:

http://en.wikipedia.org/wiki/APNG

The APNG (Animated Portable Network Graphics) file format is a proposed extension to the portable network graphics (PNG) specification that would allow for animated PNG files that work in a similar fashion to animated graphics interchange format (GIF) files, while retaining the backward compatibility with non-animated PNG files.

The first frame on an APNG file is stored as a normal PNG stream, and so most old PNG decoders will be able to display the first frame of an APNG file. The frame speed data and extra animation frames are stored in extra chunks (as provided for by the original PNG specification).


GIF is very probably extremally easily to be converted to MNG and APNG ;)
 
I actually was referring to one large frame map. The way it's done in DesktopX is basically a filmstrip, and you configure the icon to be a set width and height, and tell it how many frames it has. I didn't know there actually were MNG and APNG formats, but they sound good too, so long as I can find a program that can create/modify them on the Mac.

What I meant was mouseover-like events is much like GPH did in their menu. For instance, they have icon1.png, then icon1_on.png for when that icon is selected. If you could use mp3/animated graphics as events, you could have it make a noise and start a primary, or opening animation when it's selected. If you then move off that icon to another, it could make a noise and a secondary, or closing animation. If you selected the icon instead, it could make a sound and a tertiary, or activation animation.

Granted, not everyone would want or even use those features, but I would. Skinning is really the only contribution I can make to this, seeing as I do GUI design.

Also, I didn't mean to insinuate that you are driven by bounty, I was just saying if those features showed up, that is the amount I'd donate.


timofonic: I wanted 16.7M color animation. GIFs can look very good, but you're really, really limited by the color pallette.
 
Granted, not everyone would want or even use those features, but I would. Skinning is really the only contribution I can make to this, seeing as I do GUI design.

Heyy... now you've got me paying attention :).

Are you saying that if I provide the features, you can/will make it look good?

Because if that's the case, I'm all for it.

Just tell me whether you need the film strip to be horizontal or vertical ;)
 
Last edited by a moderator:
I'll make it look good, I promise you that :). Horizontal seems to be easier to work with for me, but however you can make it work is fine.
 
Back
Top