Mupen64plus Cheats (working, but ugly)
-
-
Has anyone looked further into developing a method for Retropie to select and load cheats for mupen64plus emulators? It seems using the mupen64plus-gles2rice-hires emulator option to launch a game, supplies options via wrapper script:
/opt/retropie/emulators/mupen64plus/bin/mupen64plus.sh
however that's where the options end. I'm wondering if there's been any talk of a dev adding the option to load cheats from the curses menu when selecting a emulator for a ROM. The cheats file that mupen64plus needs is on the host but you'd need to see and select the cheats that are returned from checking the file. I've been able to (from CLI) get mupen64plus to return the viable cheats for a ROM but it would be nice to be able to select them and present it to the wrapper on loading the ROM if that makes sense. Here's some sample output from CLI:
/opt/retropie/emulators/mupen64plus/bin/mupen64plus --datadir /opt/retropie/emulators/mupen64plus/share/mupen64plus/ --configdir /opt/retropie/emulators/mupen64plus/share/mupen64plus/ --cheats list /home/pi/RetroPie/roms/n64/Legend\ of\ Zelda\,\ The\ -\ Ocarina\ of\ Time\ \(USA\).v64 __ __ __ _ _ ____ _ | \/ |_ _ _ __ ___ _ __ / /_ | || | | _ \| |_ _ ___ | |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __| | | | | |_| | |_) | __/ | | | (_) |__ _| __/| | |_| \__ \ |_| |_|\__,_| .__/ \___|_| |_|\___/ |_| |_| |_|\__,_|___/ |_| https://mupen64plus.org/ Mupen64Plus Console User-Interface Version 2.5.9 UI-Console: attached to core library 'Mupen64Plus Core' version 2.5.9 UI-Console: Includes support for Dynamic Recompiler. Core: Using full mem base Core: Goodname: Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [h1C] Core: Name: ZELDA MASTER QUEST Core: MD5: 2DE4D0F0788871CC4BB6D30B60F72184 Core: CRC: 1D4136F3 AF63EEA9 Core: Imagetype: .v64 (byteswapped) Core: Rom size: 33554432 bytes (or 32 Mb or 256 Megabits) Core: Version: 144C Core: Manufacturer: Nintendo Core: Country: Unknown (0xF45) UI-Console: 65 cheat code(s) found for ROM 'Legend of Zelda, The - Ocarina of Time - Master Quest (E) [f1] (NTSC)' UI-Console: 0: Infinite\Rupees (This cheat allows you to have the max Rupees to the Wallet you currently Hold) UI-Console: 1: Max\Double Defense Power (This gives you White Border Hearts) UI-Console: 2: Use Any Item In Any House (do not use under or in water) UI-Console: 3: Have\All Equipment (This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal)
-
This post is deleted! -
So I managed to get the cheats loaded by appending the options to the mupen64plus recipes at the bottom of the shell script. Example (around line 441:
if [[ "$(sed -n '/^Hardware/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)" == BCM* ]]; then # If a raspberry pi is used lower resolution to 320x240 and enable SDL dispmanx scaling mode 1 SDL_VIDEO_RPI_SCALE_MODE=1 "$rootdir/emulators/mupen64plus/bin/mupen64plus" --noosd --windowed $RES --rsp ${RSP_PLUGIN}.so --gfx ${VIDEO_PLUGIN}.so --audio ${AUDIO_PLUGIN}.so --configdir "$configdir/n64" --datadir "$configdir/n64" --cheats "0,1,2,3,4,5,6,7,8,9" "$ROM"
So it shouldn't be too crazy to allow cheats to be viewed and selected from within the launch curses menu I just wasn't sure if any dev might be thinking about it (or if i should be talking about this some place else? If I have time ever I might try to do something but an existing dev would know the code a ton better and could probably do it faster than I could ramp up lol
Keep in mind this cludge is ugly. Not sure if it's n order of operations or order of options things but it dropped to a shell, then popped up a frame buffer with the game running in it. Thagt being said it loaded all the cheats properly. I did do a save state so I'll see if the save keeps the cheats after launching normally. Maybe this is just a pain that you only have to do once .... per ROM lol
-
one more thing, I had to put the cheats file in the configdir defined in the recipe as well :) ... I did manage to get the save state for the ROM to keep the cheats loaded so at least there's a work around for people who want to enable cheats with Mupen64plus. I'm guessing someone out there knew and had done this but I couldn't find it. Be nicer to have it all part of Retroarch/pie natively when you select things for the ROM at launch but for now ... this worked.
-
I've seen that there's a Python front-end for Mupen64 that has a GUI where you can select different cheats, but I'm guessing it just loads them before starting the emulator the same as the CLI you posted.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.