Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › How to add new emulator and make it default?
- This topic has 13 replies, 4 voices, and was last updated 9 years, 4 months ago by herbfargus.
-
AuthorPosts
-
06/20/2015 at 21:40 #100293retrofanParticipant
Hello everyone,
I use for some time Retropie v3.0 beta 3 and I would like to add new emulator for zx spectrum and make it default.
Retropie comes with two built-in emulators fbzx and fuse (default), but for me the best emulator “Unreal Speccy Portable” is not present.
I downloaded an emulator here https://bitbucket.org/djdron/unrealspeccyp/downloads/unreal-speccy-portable_0.0.64_rpi.zipunpacked and put together with the others in /opt/retropie/emulators/usp
Then edited the emulator.cfg file in /opt/retropie/configs/zxspectrum adding a line usp=”/opt/retropie/emulator/usp/unreal_speccy_portable %ROM%” and set default =”usp”
Unfortunately, the emulator is not working when I started a game, just came back in emulationstation menu.
I also tried to make a script +Start USP.sh that will start the emulator manually from es menu (as uae4all for example) but this also failed, because obviously I’m not well-configured parameters.
The only way to start the emulator is to press F4 and go to the terminal, then manually change the emulator directory and start it with ./unreal_speccy_portableAlso, maybe I should set the es_systems.cfg file but did not know what.
Can someone help me set this emulator as the default, or at least that it can start from emulationstation menu and be able to use it comfortably as other emulators.
I exhausted my modest knowledge of retropie package and linux and I would like to solve this problem.
Sorry for my bad english, best regards.Pi Model: 2B
RetroPie Version Used: 3.0 Beta 3
Built From: SD Image
USB Devices connected: joypad, wireless keyboard
Controller used: ps3 dualshock clone06/21/2015 at 01:36 #100312herbfargusMemberI’m having the same problem here too- it seems to be an issue with emulationstation as it runs just fine from the command line. This is the runcommand error log I’m getting (i get the same error log if I don’t use runcommand as well):
unreal_speccy_portable: ../../devices/memory.cpp:84: void eRom::LoadRom(int, const char*): Assertion f failed. /opt/retropie/supplementary/runcommand/runcommand.sh: line 684: 29913 Aborted /opt/retropie/emulators/usp/unreal_speccy_portable "/home/pi/RetroPie/roms/zxspectrum/Lunar Jetman (1983)(Ultimate).z80"
And just in case you’re interested, this is the script I pieced together (its not very good but it at least installs it. I placed it in
/home/pi/RetroPie-Setup/scriptmodules/emulators
and just ran it from the experimental menu in the setup script)#!/usr/bin/env bash # This file is part of RetroPie. # # (c) Copyright 2012-2015 Florian Müller () # # See the LICENSE.md file at the top-level directory of this distribution and # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md # rp_module_id="usp" rp_module_desc="zxspectrum emulator unreal speccy portable" rp_module_menus="4+" function sources_usp() { wget https://bitbucket.org/djdron/unrealspeccyp/downloads/unreal-speccy-portable_0.0.64_rpi.zip unzip unreal-speccy-portable_0.0.64_rpi.zip rm unreal-speccy-portable_0.0.64_rpi.zip } function build_usp() { make clean md_ret_require="$md_build" } function install_usp() { md_ret_files=( 'usp_0.0.64/unreal_speccy_portable' 'usp_0.0.64/res' 'usp_0.0.64/readme.txt' ) } function configure_usp() { mkRomDir "zxspectrum" addSystem 0 "$md_id" "zxspectrum" "$md_inst/unreal_speccy_portable %ROM%" }
06/21/2015 at 02:22 #100315herbfargusMemberin the meantime if you want a script that sets up a script that will open up into unreal_speccy_portable then this does work (might cause some framebuffer issues potentially- make backups first) You’ll install it in place of the aforementioned script through the experimental menu of the setup script.
#!/usr/bin/env bash # This file is part of RetroPie. # # (c) Copyright 2012-2015 Florian Müller () # # See the LICENSE.md file at the top-level directory of this distribution and # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md # rp_module_id="usp" rp_module_desc="zxspectrum emulator unreal speccy portable" rp_module_menus="4+" function sources_usp() { wget https://bitbucket.org/djdron/unrealspeccyp/downloads/unreal-speccy-portable_0.0.64_rpi.zip unzip unreal-speccy-portable_0.0.64_rpi.zip rm unreal-speccy-portable_0.0.64_rpi.zip } function build_usp() { make clean md_ret_require="$md_build" } function install_usp() { md_ret_files=( 'usp_0.0.64/unreal_speccy_portable' 'usp_0.0.64/res' 'usp_0.0.64/readme.txt' ) } function configure_usp() { mkRomoDir "zxspectrum" cat > "$romdir/zxspectrum/+Start.sh" << _EOF_ #!/bin/bash pushd "/opt/retropie/emulators/usp" ./unreal_speccy_portable "usp" popd _EOF_ chmod a+x "$romdir/zxspectrum/+Start.sh" chown $user:$user "$romdir/zxspectrum/+Start.sh" addSystem 0 "$md_id" "zxspectrum" "$romdir/zxspectrum/+Start.sh" "zxspectrum" ".sh" }
06/21/2015 at 15:19 #100348retrofanParticipantThank you very much for your quick reply.
Unfortunatelly, it doesnt work for me. :(
I follow your instructions, make usp.sh script, put in /home/pi/RetroPie-Setup/scriptmodules/emulators and run from experimental menu in the setup script.
I only can see briefly on the bottom page, log start, log end message and whole process takes 4 seconds.
There is nothing new in zxspectrum menu page, fuse is still default emulator, no new entries there, except my spectrum roms.
Then, I switch to terminal and try to start this script from command line.
I typed sh (or bash) usp.sh and he gives me these errors message:
usp.sh: line 2: $’\r’: command not found
usp.sh: line 10: $’\r’: command not found
usp.sh: line 14: $’\r’: command not found
usp.sh: line 15: $’\r’: syntax error
‘sp.sh: line 15: $’\r’: function sources_usp(){Tried both scripts with same results.
I have no idea what I did wrong??06/21/2015 at 16:11 #100360herbfargusMemberSo I deleted everything I had installed and steo by step this is what I did:
I created the second script and called it usp.sh and I added it here:
/home/pi/RetroPie-Setup/scriptmodules/emulators
I then went into the setup script an installed usp from the experimental menu
I refreshed emulationstation by pressing F4
the +Start.sh file showed up in the zxspectrum menu.
upon selecting +Start.sh I pressed “m” and changed the default emulator to usp
06/21/2015 at 16:31 #100362windaleParticipantI’d also like to get this working. I made a usp.sh from your second script and put it in scriptmodules/emulators (same as Retrofan), but when running it from the experimental menu it doesn’t even download the progrram.
06/21/2015 at 16:34 #100363herbfargusMembertry running
sudo chmod +x /home/pi/RetroPie-Setup/scriptmodules/emulators/usp.sh
06/21/2015 at 16:51 #100364retrofanParticipant[quote=100360]So I deleted everything I had installed and steo by step this is what I did:
I created the second script and called it usp.sh and I added it here:
/home/pi/RetroPie-Setup/scriptmodules/emulators
I then went into the setup script an installed usp from the experimental menu
I refreshed emulationstation by pressing F4
the +Start.sh file showed up in the zxspectrum menu.
upon selecting +Start.sh I pressed a key and changed the default emulator to usp
[/quote]
I think I do everything the same, but script doesnt have installed anything, +Start.sh file doesnt appear in zxspectrum menu.
Which version of retropie you use, I tried with 3.0 beta 3 and 3.0 beta 4, with the same result.
I prepared a script in Windows 7 Notepad text editor, I hope it did not cause a problem.
I check my internet connection and its good and active.[quote=100362]I’d also like to get this working. I made a usp.sh from your second script and put it in scriptmodules/emulators (same as Retrofan), but when running it from the experimental menu it doesn’t even download the progrram.
[/quote]Same thing with me, after I run script there is no downloading or anything else, whole process finished instantly with two log message and retrurn to the script menu.
06/21/2015 at 16:52 #100365windaleParticipant[quote=100363]try running
sudo chmod +x /home/pi/RetroPie-Setup/scriptmodules/emulators/usp.sh
[/quote]
I typed this into the console, then tried the experimental setup script again but nothing, it flashed at the bottom of the screen ‘started’ but immediately disappeared again, didn’t even download it.
I also tried setting all permissions 777 and no luck.
06/21/2015 at 17:09 #100368herbfargusMemberThat’s really weird. I’m using retropie 3 Beta 4. If you install it manually from the .zip file without my scripts are you able to open it through the command line? Cause if so I’ll try and install it manually and see if I can at least get a start script to work from emulationstation until I can come up with a better install script (I’m not as good as buzz with the whole scripting thing.)
Just out of curiosity- what are the benefits of this emulator over the 3 we already have?
Also just for reference, I created my script while logged in as root in winscp.
06/22/2015 at 11:10 #100413retrofanParticipantUSP allows perfect smooth scrolling and full synchronization with 50hz screen modes.
Just change /boot/config.txt
hdmi_group=1
hdmi_mode=19 (for 720p) or 31 (for 1080p)Also usp use GPU hardware accelerated features, software streching, work in real full screen…
btw, I finally make a working script, edit fbzx.sh script and make necessary changes according your second script, but keeping file format structure untouched.
When I make a script from scratch in Notepad, it doesnt work, dont know why.Only one thing remains for full integration in emulationstation, how to automatically load the game after the usp starts?
I tried earlier to add line usp=”/opt/retropie/emulators/usp/usp %ROM%” in emulators.cfg file, but this obviously not working.
Author claims that usp can start a game from the command line, but I dont know how to acheive this in emulation station.Just one thing, can you explain to me this lines in your script
./unreal_speccy_portable “usp” (what “usp” means?)
addSystem 0 “$md_id” “zxspectrum” “$romdir/zxspectrum/+Start.sh” “zxspectrum” “.sh” (whats “zxspectrum” “.sh” part do exactly?)
06/22/2015 at 16:50 #100438herbfargusMemberThe “zxspectrum” “sh” adds the necessary parts to es_systems.cfg (namely .sh file extensions so the start up script shows up) as for the “usp” thing I’m not sure to be honest, I just did a find and replace from a different script and pieced it together until it seemed like it worked. Its obviously not the most efficient of scripts (I’m not very skilled when it comes to coding) I’ll open a ticket to have it added, and maybe someone with more skills than I could come up with something a little more effective.
06/23/2015 at 01:48 #100489AnonymousInactiveI’d personally love to install Stella back into my retropie, as the new lr-stella is making me crazy, and doesn’t dang work. See my other post for more on that joy. But, even when I exit emulation station, it boots back into emulation station. So…no option to use the get command.
Anyone know a solution?
06/25/2015 at 22:49 #100737herbfargusMemberI had a thought- the reason that it isn’t working with notepad is that it doesn’t seem to handle certain text characters very well- try installing notepad++ and see if that makes a difference in creating scripts.
As far as stella goes, you can type stella into the terminal and it will open stella or you can change your default emulator by pressing x or m as a rom loads and change it from libretro to stella. If you are are trying to exit emulationstation, if you press a button after you exit emulationstation it will allow you to go into the terminal. if you don’t press anything it will just reboot back into emulationstation.
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.