Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black screen when starting fuse (ZX Spectrum emulator) or ScummVM #20

Closed
petrockblog opened this issue Oct 4, 2012 · 14 comments
Closed

Comments

@petrockblog
Copy link

Using the RetroPie script I can install the ZX Spectrum emulator "fuse". using fuse from the command line via

fuse

brings up the fuse main screen from where I can start a rom file.

Since there is the possibility for ES to define a system without the %ROM% tag I defined such a system as

NAME=ZX Spectrum
PATH=$rootdir/roms/zxspectrum
EXTENSION=.z80
COMMAND=fuse

The same holds for ScummVM, which can easily be installed with

sudo apt-get install scummvm

starting with

scummvm

from the command line works out of the box -- black screen with ES :-(

However, when I use ES to execute fuse, the screen turns black and nothing happens. Do you have an idea what I might change or try here?

@Aloshi
Copy link
Owner

Aloshi commented Oct 4, 2012

Hmm, this is interesting. Are you sure you're using the latest version of ES? I made a couple of quiet updates recently that make SDL fully close when a game is launched and fixed a crash with missing %ROM% tags.

@petrockblog
Copy link
Author

I just made sure that I have the latest version of ES by updating and recompiling it. I get the black screen with the latest version.

I use this configuration:

NAME=ScummVM
PATH=/home/pi/RetroPie/roms/scummvm
EXTENSION=.ini .INI
COMMAND=scummvm

You can try this on your own very own very easily (does not even need a rom) by installing scummvm via apt.

@Aloshi
Copy link
Owner

Aloshi commented Oct 6, 2012

Gave it a test with ScummVM, and I am indeed getting the same problem...dunno what it could be. I tried forcing full-screen or windowed (scummvm -f and scummvm -F respectively, found with scummvm -h | less) and that didn't help.

I tried fuse and noticed the same behavior, but haven't tried any command-line options.

I'm not sure how ScummVM and fuse are rendered - I'm assuming a software renderer since they're not RPi-specific ports (I think). I'm not sure what ES could be doing to make them behave differently - launching a game completely quits SDL and frees the GPU resources ES uses. The only thing that isn't deinitialized is the BCM library stuff (which I can't deinitialize or problems arise).

It might be that they just don't like being run from within other programs. A simple C program to test this (unlikely) hypothesis:

#include <stdio.h>
#include <stdlib.h>
int main()
{
    system("scummvm");
    return 0;
}

@ReliCWeb
Copy link

Still occurring as of 10/24/2012.

I modified the Megadrive/Genesis system inside es_systems.cfg to call dgen instead of retroarch. Everything appears to work fine (audio and input work), but there is no video. I can press buttons and hear sounds, and can ESC back to ES no problem.

NAME=Sega Genesis
PATH=/home/pi/RetroPie/roms/genesis
EXTENSION=.md
COMMAND=dgen -g 0 -R U %ROM%

I also got Wolfenstein 3D working and setup a system in es_systems.cfg to call it. Same issue as above, sounds and input work, but no video. One thing I did notice is that when I tried running Wolf3D it initially complained about missing data files. It would not run until I copied the Wolf3D files (*.wl6) to the RetroPie/EmulationStation directory. Is there a way to force the current working directory? I have the PATH set in es_systems.cfg to /home/pi/wolf3d (which is where I have my data files and the wolf3d binary). It works fine outside of ES if I call the wolf3d binary from within its directory. I even tried adding /home/pi/wolf3d to my user $PATH, but no luck. Here is my es_systems.cfg setup:

NAME=Wolf3D
PATH=/home/pi/wolf3d
EXTENSION=.wl6
COMMAND=wolf3d

I'll test wrapping both of these in a system() call to see if they exhibit the same symptoms and let you know. Unless I'm missing something dreadfully obvious...?

@Aloshi
Copy link
Owner

Aloshi commented Oct 25, 2012

At the moment, ES doesn't change the working directory when you launch a game - I guess "PATH" is a bit of a misleading name, huh. I'll see if that'd be a simple thing to add.

And thanks for testing! Out of curiosity, something I never tried: if you run ES from within X then launch one of the emulators that gives a black screen, does it still do that (you might need to recompile ES for ES to launch right under X)?

@ReliCWeb
Copy link

Thanks for the info. I understand now about the working directory. The PATH variable just points to where ES looks for roms to be populated into the display list and passed with the %ROM% parameter, correct?

Also what would be the best way to have a system entry with only one "rom" (eg: Wolf3D)? Create a dummy file called something like "Wolfenstein 3D.game", have the es_systems.cfg EXTENSION set to ".game", and have the COMMAND simply call the binary without passing %ROM%? This works, it just seems there should be a more elegant way.

What about combining Doom and Wolf3D into one menu entry (PC)? For that to work I think I'd have to modify the gamelist.xml such that the "path" node of each actually points to their respective binary. Then in the es_systems.cfg file, the COMMAND would simply be %ROM%, thus calling the binary. I don't have my Pi handy at the moment to double-check to see how Doom currently works (passing in WADs and such), but the theory works in my head... Please correct me if this won't work.

@Aloshi
Copy link
Owner

Aloshi commented Oct 25, 2012

The three approaches I can think of that would work are:

  1. Add the entries into the gamelist.xml manually, as you said. This should work, but I don't think I've tested it. They will probably need to have the same extension. If you run into trouble with this method, let me know.
  2. Write some simple, one-line bash scripts to launch the game, and have the gamelist be populated with that - then have the COMMAND be just %ROM% to run the scripts.
  3. Use symlinks. I'm not sure if this will work, but I think it will.

@ReliCWeb
Copy link

Thanks again! I will test this tonight and report back.

@ReliCWeb
Copy link

Method 2 seemed the simplest. I created a directory in the roms directory called "dos". I then created an entry in es_systems.cfg pointing here with a name of "Vintage DOS". The COMMAND is set to just %ROM%. Each game has it's own launching .sh script (just one line each), and there is an entry in gamelist.xml for each with the script as the path node. It works and allows me to mix Wolf3D and all my Dooms (Doom, Doom II, TNT, and Plutonia) in the same menu. Now I just need to flesh out the images & descriptions.

Unfortunately wrapping wolf3d into the example C program above (with the system() call) exhibited the same issue: audio and input, but no video. Same for dgen. If I call the C program manually it works, but if I have EmulationStation call it, I get no video... Sometimes when manually calling it I get the 'no video' issue, but if I quit and relaunch it fixes it, but not when I quit/relaunch ES.

I did fix my path issue though with Wolfenstein. Initially it complained about launching wolf3d from within ES, saying it couldn't find the data files. I had set the path node in gamelist.xml to the same path as the wolf3d data files, but that didn't work. I had tried adding that directory to my user $PATH, didn't work. Finally when creating the launcher scripts described above, my script for wolf3d is actually two lines. The first line is simply 'cd /home/pi/wolf3d'. Bingo, path set.

For reference, here is my pseudo /home/pi/RetroPie/roms/dos/gamelist.xml (*NOTE: if you copy/paste, change all the parenthesis to angle brackets. Github strips them (am I not doing it right?) so I couldn't post the XML straight-up):

(gameList)
    (game)
        (path)/home/pi/RetroPie/roms/dos/wolf3d.sh(/path)
        (name)Wolfenstein 3D(/name)
        (desc)Wolfenstein 3D description will go here once I stop being lazy and go copy/paste one...(/desc)
        (image)(/image)
    (/game)
    (game)
        (path)/home/pi/RetroPie/roms/dos/doom.sh(/path)
        (name)Doom(/name)
        (desc)Doom description.(/desc)
        (image)(/image)
    (/game)
    (game)
        (path)/home/pi/RetroPie/roms/dos/doom2.sh(/path)
        (name)Doom II(/name)
        (desc)Doom II description.(/desc)
        (image)(/image)
    (/game)
(/gameList)

...and my /home/pi/RetroPie/roms/dos/wolf3d.sh:

#!/bin/bash
cd /home/pi/wolf3d
/home/pi/wolf3d/wolf3d

...and finally my doom.sh (doom2.sh is the same, just DOOM2.WAD):

#!/bin/bash
retroarch -L /home/pi/RetroPie/emulatorcores/libretro-prboom/libretro.so /home/pi/RetroPie/roms/doom/DOOM.WAD

When I have a setup I really like and have video working, I'll reorganize the directory structure. It works for me for now.

@Aloshi
Copy link
Owner

Aloshi commented Oct 26, 2012

Glad things worked out. I've since made a topic on the RPi forums about the no video thing, and included a short C++ program to show it off with ScummVM: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=67&t=21084

Hopefully someone can figure out what's wrong.

@Aloshi
Copy link
Owner

Aloshi commented Oct 26, 2012

Hopefully fixed this issue (at least when I was testing ScummVM)! It was a really dumb fix (move three lines after a small chunk of code instead of before it).

Let me know if it's still broken.

@Aloshi Aloshi closed this as completed Oct 26, 2012
@ReliCWeb
Copy link

I will definitely test in a few hours. If this works you made my weekend 👍

@Aloshi
Copy link
Owner

Aloshi commented Oct 26, 2012

Just tested it with DGEN, I can load the "No Cartridge" screen fine from ES just fine. 😄

@ReliCWeb
Copy link

Yes, that appears to have fixed it! I can launch DGEN and Wolf3D from within ES! Rock on Aloshi! 👍
Now to fix my issue where I have spotty controls with two wireless XBox 360 controllers connected simultaneously. They both work, but occasionally they seem to get 'stuck' as if a button was still pressed. Pressing another button 'unsticks' it, but its annoying. I don't think this is an ES issue though as it happens with whatever I use the controllers with (on the Pi, work fine under Windoze), so I'm thinking its localized to xboxdrv.

Thanks again!

MisterTea pushed a commit to MisterTea/EmulationStation that referenced this issue Nov 4, 2015
Update emulationstation2.po
mrnohr pushed a commit to mrnohr/EmulationStation that referenced this issue Sep 17, 2016
This commits attempts to fix issues Aloshi#10 and Aloshi#20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants