Use graphical V0.8 pimame-menu with current configuration
  • Here is an idea how to use a lot of the upcoming pimame-menu already, even though it's not finished yet.
    In case you, like me, just can't wait for the new graphical pimame menu :-)

    (Please note, I really love the work that has been put into pimame,
    and I'm very very much looking forward to the finished version of pimame-menu!)

    Instead of waiting, I thought, why no make use of the things I already have,
    and use the advmenu configurations that I have already prepared for my emulators so far.

    So the idea is to not go from the pimame-menu icons to the respective pimame-menu rom selection scene, but instead call the advmenu with the appropriate advmenu configuration prepared for each emu.

    Here's how I did it (there are of course other ways, maybe more elegant ones to do it, but this works for me)


    1) install pimame-menu as described in the forum here:
    http://pimame.org/forum/discussion/699/help-how-to-install-pimame-menu-beta

    2) in mainscene.py replace the line that calls the romlist page with a command that directly calls the command specified in config.yaml

    search for this -> if sprite.type == PMMenuItem.ROM_LIST:
    comment out or delete -> #self.manager.go_to(RomListScene(sprite.get_rom_list()))
    use this instead -> PMUtil.run_command_and_continue(sprite.command)

    3) change the commands in config.yaml so that the advmenu is called, e.g. like the following example for the snes9x
    (thanks to Mark Holgate for the second player :-)

    - label: SNES
    visible: Yes
    icon_file: snes.jpg
    full_path: yes
    command: "advmenu -cfg advmenu-snes.rc"

    It is (with this workaround) not reqired to specify the folder of the roms here.
    You do that in the respective advmenu config - in the example above, that is in ~/.advance/advmenu-snes.rc

    Some emulators require to be started from their home directory, like the N64 emulator mupen64plus.
    You can easily change dir to there, and after quitting, back to the pimeme-menu folder by extending the command line.
    E.g. for the Nintendo 64 emulator I use the following configuration:

    - label: Nintendo 64
    visible: Yes
    icon_file: N64.jpg
    full_path: yes
    command: "cd /home/pi/emulators/mupen64plus-rpi/test;advmenu -cfg advmenu-mupen.rc;cd /home/pi/pimame/pimame-menu"

    Here are some more examples from my configuration:

    The next one is for a Videopac/Odyssey2 emu, which I found here:
    http://emulvideopac.blogspot.co.at/2013/02/en-install-o2em-on-linux-and-recompile-it.html
    This emulator also requires to change to the directory of the emulator.

    - label: Videopac/Odyssey2
    visible: Yes
    icon_file: videopac.jpg
    full_path: yes
    command: "cd /home/pi/emulators/o2em;advmenu -cfg advmenu-o2em.rc;cd /home/pi/pimame/pimame-menu"

    (
    Sidenote: This emu must be run in X window. So if you want to run it from advmenu, configure the command-line
    in advmenu like so:
    emulator "o2em" generic "xinit" "/home/pi/emulators/o2em/o2em -romdir=/mnt/flashdrive/ROMs/Videopac/ %f"
    )

    I added this to switch to the desktop:

    - label: Desktop
    visible: Yes
    icon_file: rpi-desktop.jpg
    full_path: yes
    command: startx

    You might have other ideas, like calling xbmc, maybe calling some python programs etc.
    Hope you like the idea :-)

    And please note:
    This is only a workaround until the final pimame-menu arrives! Pimame-menu will be way better, much easier to handle
    and configure. One central place to configure emulator settings, etc.
    But for the time being, why not give this a try...
    Cheers
  • :) Great writeup
  • Great guide, thanks!
  • Thanks a lot for your kind feedback! :-)

    Here's another config.yaml entry, which I use to (re)load the xboxdrv drivers (I tend to forget to plug in the xbox controllers before starting up the raspberry...)

    - label: Restart Xbox controllers
    visible: Yes
    icon_file: xbox-360-controller.jpg
    full_path: yes
    command: "/home/pi/restartXbox.sh;cd /home/pi/pimame/pimame-menu"

    This is the little script that is called with the above command:

    sudo xboxdrv --silent --config /home/pi/pimame_files/xboxdrv_mapping.cfg --id 0 --led 2 --dbus session &
    sleep 1
    sudo xboxdrv --silent --config /home/pi/pimame_files/xboxdrv_mapping_player2.cfg --id 1 --led 3 --dbus session &

    Cheers
  • thats nifty!
  • Thats a great idea! Thanks again

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!