blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sat Oct 20, 2012 11:26 pm

PM'd Aloshi directly, but figured I'd ask the board. Anyone know how to link to an emulator from Emulation Station other than retroarch? Libretro runs Sega like poop, I compiled DGEN today and it runs a lot better, even windowed in X. I've tried editing the es-systems.cfg to point to the DGEN Executable with openGL disabled; however, when I run from ES it loads the ROM (I hear music) but I get just a blank screen. ESC returns to emulation station no problem..

I'm not a super sega fanboi but it'd be nice to get this working since I've found an emulator that runs well on the pi..

Any help would be great!

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sun Oct 21, 2012 12:19 am

blazin wrote:PM'd Aloshi directly, but figured I'd ask the board. Anyone know how to link to an emulator from Emulation Station other than retroarch? Libretro runs Sega like poop, I compiled DGEN today and it runs a lot better, even windowed in X. I've tried editing the es-systems.cfg to point to the DGEN Executable with openGL disabled; however, when I run from ES it loads the ROM (I hear music) but I get just a blank screen. ESC returns to emulation station no problem..

I'm not a super sega fanboi but it'd be nice to get this working since I've found an emulator that runs well on the pi..

Any help would be great!
Sorry I didn't get back to you earlier. This is the method you should use, yes; edit ~/.emulationstation/es_systems.cfg to change the command. When the game is launched, it's launched just as if you had typed it into the terminal yourself (with %ROM% being replaces with the path to the ROM, of course).

When the emulator is launched, the renderer deinitializes as much as it can (SDL shuts down, the display surface is released) before launching the emulator. But I've heard reports that there are still problems with some programs not displaying correctly when launched from ES. I have no clue why, unfortunately. All I can say is make sure you're using the most up-to-date firmware/build of ES/build of the emulator.

blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sun Oct 21, 2012 2:33 pm

Aloshi wrote:
blazin wrote:PM'd Aloshi directly, but figured I'd ask the board. Anyone know how to link to an emulator from Emulation Station other than retroarch? Libretro runs Sega like poop, I compiled DGEN today and it runs a lot better, even windowed in X. I've tried editing the es-systems.cfg to point to the DGEN Executable with openGL disabled; however, when I run from ES it loads the ROM (I hear music) but I get just a blank screen. ESC returns to emulation station no problem..

I'm not a super sega fanboi but it'd be nice to get this working since I've found an emulator that runs well on the pi..

Any help would be great!

Sorry I didn't get back to you earlier. This is the method you should use, yes; edit ~/.emulationstation/es_systems.cfg to change the command. When the game is launched, it's launched just as if you had typed it into the terminal yourself (with %ROM% being replaces with the path to the ROM, of course).

When the emulator is launched, the renderer deinitializes as much as it can (SDL shuts down, the display surface is released) before launching the emulator. But I've heard reports that there are still problems with some programs not displaying correctly when launched from ES. I have no clue why, unfortunately. All I can say is make sure you're using the most up-to-date firmware/build of ES/build of the emulator.
Alright I'll try updating.. see if that works.

I'm rather new to this, but if SDL shuts down, does it start back up? I think DGEN requires SDL, at least I know the library was required..

I'll keep this update, if I get this working, perhaps the latest script should be updated to include a ported build of DGEN :) tested with Sonic 3 and Sonic Spinball goes from miserable and unplayable to wonderful when comparing libretro core and DGEN.

petrockblog
Posts: 272
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sun Oct 21, 2012 3:39 pm

blazin wrote: I'll keep this update, if I get this working, perhaps the latest script should be updated to include a ported build of DGEN :) tested with Sonic 3 and Sonic Spinball goes from miserable and unplayable to wonderful when comparing libretro core and DGEN.
Sure! If you have a short step-by-stp guide for downloading, compiling, and configuring DGEN post it here and I will integrate it into the RetroPie script! You could o this independently of Emulation Station working with that or not (yet) :-)
fun stuff for technics enthusiasts: www.petrockblock.com

petrockblog
Posts: 272
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sun Oct 21, 2012 3:47 pm

If you are interested in connecting NES or SNES controllers o the RPi GPIO pins you might want to have a look at the RetroPie GPIO Adapter!
Image
It is a dedicated GPIO adapter for the Raspberry Pi that allows an easy and safe connection of up to two NES or SNES controllers.
fun stuff for technics enthusiasts: www.petrockblock.com

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Sun Oct 21, 2012 4:35 pm

blazin wrote: I'm rather new to this, but if SDL shuts down, does it start back up? I think DGEN requires SDL, at least I know the library was required..
SDL is a library used by programs, not a driver or anything - by "shuts down" I mean it closes the window ES opened and tries to return the system to a "normal" state as much as possible, to make sure the launched program doesn't have to account for anything weird going on with the system.

CPOKashue
Posts: 52
Joined: Fri Sep 28, 2012 6:13 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Mon Oct 22, 2012 4:51 am

portets wrote:Are you running it from the desktop? Try running it outside of X(ctrl+alt+f2). I think I get that behaviour while in X.
That did it! Thanks.

blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Mon Oct 22, 2012 3:54 pm

Aloshi wrote:
blazin wrote: I'm rather new to this, but if SDL shuts down, does it start back up? I think DGEN requires SDL, at least I know the library was required..
SDL is a library used by programs, not a driver or anything - by "shuts down" I mean it closes the window ES opened and tries to return the system to a "normal" state as much as possible, to make sure the launched program doesn't have to account for anything weird going on with the system.
Gotcha.. ok still not working.. this is annoying, you know when you get so close you can taste it.

jlongstreet
Posts: 31
Joined: Wed Sep 05, 2012 2:59 am

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Mon Oct 22, 2012 11:30 pm

If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)

User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Tue Oct 23, 2012 3:47 am

jlongstreet wrote:If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)
Me and the other devs are always looking for more ports. If you want to take a crack at it, check out libretro.h, it describes the API pretty well. There was a more in-depth PDF floating around but one of the dev's hosting died and it hasn't been reuploaded yet.

You can also check out the test implementation: https://github.com/Themaister/RetroArch ... retro-test

blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Tue Oct 23, 2012 9:08 pm

jlongstreet wrote:If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)
I'd help ya.. I know my way around code. Just not sure how that would help the situation?

jlongstreet
Posts: 31
Joined: Wed Sep 05, 2012 2:59 am

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Tue Oct 23, 2012 9:16 pm

blazin wrote:
jlongstreet wrote:If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)
I'd help ya.. I know my way around code. Just not sure how that would help the situation?
If possible, I'd like all my emulators running through RetroArch -- one set of control settings, video settings, audio settings, etc. It's reasonable to assume that any libretro port will work as long as RetroArch works.

That said, I'll take a working DGen running standalone over a non-performant GenPlusGX running in RetroArch, but there's nothing wrong with trying.

From the little bit of browsing I did of the DGen source, though, it might be a bit difficult. It's not particularly modular, so it may be a little annoying.

ReliC
Posts: 7
Joined: Wed Jul 18, 2012 2:30 pm
Location: Windsor, NC
Contact: Website AOL

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Wed Oct 24, 2012 2:13 am

I'll have to dig up the link to the source (*EDIT: http://sourceforge.net/projects/dgen/files/dgen/1.30/), but I just compiled DGen straight-up (configure, make, make install). I then launched it with the "-g 0" parameter to disable OpenGL, also passing in the rom name. It runs AWESOME compared to Genesis-Plus-GX, Sonic is actually fast!

I also modified es_systems.cfg to launch dgen, but all I get is a black screen. I also hear audio and can ESC back out to the ES menu no problem. What's odd is that sometimes when I launch DGen standalone it gives a black screen with audio, but if I quit and relaunch it works fine. Unfortunately quit+relaunch doesn't work with ES.

Any ideas? Any way I can help?
http://pi.relicweb.com

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Wed Oct 24, 2012 2:31 am

ReliC wrote:I also modified es_systems.cfg to launch dgen, but all I get is a black screen. I also hear audio and can ESC back out to the ES menu no problem. What's odd is that sometimes when I launch DGen standalone it gives a black screen with audio, but if I quit and relaunch it works fine. Unfortunately quit+relaunch doesn't work with ES.
This happens with ScummVM and fuse too. I'm not sure why. I've been meaning to try some test programs to determine just what part of ES is causing the black screen, but have been busy. The three "steps" I can think of are:

1. Just launching from C's system("command") function, ex. system("dgen").
2. Link with the Broadcom library, call bcm_init(), system("dgen"), then bcm_deinit() (somewhat similarly to ES's main.cpp).
3. Try it with the SDL stuff initialized, then deinitialized.
4. Try it with the OpenGL ES renderer initialized, then deinitialized (see renderer_init_rpi.cpp).

This should show what part is causing the problem. I'm not sure when I'll get the chance to test these myself.

jlongstreet
Posts: 31
Joined: Wed Sep 05, 2012 2:59 am

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Wed Oct 24, 2012 10:06 pm

Toad King wrote:
jlongstreet wrote:If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)
Me and the other devs are always looking for more ports. If you want to take a crack at it, check out libretro.h, it describes the API pretty well. There was a more in-depth PDF floating around but one of the dev's hosting died and it hasn't been reuploaded yet.

You can also check out the test implementation: https://github.com/Themaister/RetroArch ... retro-test
Is there a copy of this PDF floating around? I have some questions about best practices for handling configuration options and such.

blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Wed Oct 24, 2012 11:04 pm

Aloshi wrote:
ReliC wrote:I also modified es_systems.cfg to launch dgen, but all I get is a black screen. I also hear audio and can ESC back out to the ES menu no problem. What's odd is that sometimes when I launch DGen standalone it gives a black screen with audio, but if I quit and relaunch it works fine. Unfortunately quit+relaunch doesn't work with ES.
This happens with ScummVM and fuse too. I'm not sure why. I've been meaning to try some test programs to determine just what part of ES is causing the black screen, but have been busy. The three "steps" I can think of are:

1. Just launching from C's system("command") function, ex. system("dgen").
2. Link with the Broadcom library, call bcm_init(), system("dgen"), then bcm_deinit() (somewhat similarly to ES's main.cpp).
3. Try it with the SDL stuff initialized, then deinitialized.
4. Try it with the OpenGL ES renderer initialized, then deinitialized (see renderer_init_rpi.cpp).

This should show what part is causing the problem. I'm not sure when I'll get the chance to test these myself.
Well tested the first scenario with a simple C prog.. same issue, not even passing ROM location, I get nothing but a black screen. If I run this from X I get the DGEN logo with "no cartridge" as I'm not passing in the ROM location.

Next step, building a version that does the BCM_HOST_INIT() call.. joy

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 1:57 am

blazin wrote: Well tested the first scenario with a simple C prog.. same issue, not even passing ROM location, I get nothing but a black screen. If I run this from X I get the DGEN logo with "no cartridge" as I'm not passing in the ROM location.

Next step, building a version that does the BCM_HOST_INIT() call.. joy
Since the first method didn't work, all the subsequent methods probably won't work either (they build on that) - I just wanted to know at which point DGen broke.

I'm guessing this means the black screen might be related to how DGen expects terminal input? Maybe the process is a child of ES and that's messing it up? I don't know much about Linux. This is pretty peculiar.

CPOKashue
Posts: 52
Joined: Fri Sep 28, 2012 6:13 pm

Gameboy question

Thu Oct 25, 2012 4:50 am

So I have my uncompressed .gb roms in my gb rom directory, but they don't show up in emulationstation. I think everything else is working (NES, SMS, and GG are all fine). So there's some stuff I'm thinking it could be:
-I have kind of a lot of gameboy roms in there, is there a certain number of files that one should not exceed?
-Is .gb not a retroarch-approved format for gameboy roms?
-Should gameboy roms go under a different gameboy emulator's directory (GBA or color, for instance)?

Many thanks!

petrockblog
Posts: 272
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: Gameboy question

Thu Oct 25, 2012 5:32 am

CPOKashue wrote:So I have my uncompressed .gb roms in my gb rom directory, but they don't show up in emulationstation. I think everything else is working (NES, SMS, and GG are all fine). So there's some stuff I'm thinking it could be:
-I have kind of a lot of gameboy roms in there, is there a certain number of files that one should not exceed?
-Is .gb not a retroarch-approved format for gameboy roms?
-Should gameboy roms go under a different gameboy emulator's directory (GBA or color, for instance)?

Many thanks!
Currently, the installation based on the RetroPie script expects .gb roms to be found within the "gbc"directory. You can also check this for your installation by looking into the file ~/.emulationstation/es_systems.cfg.
fun stuff for technics enthusiasts: www.petrockblock.com


blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 9:17 pm

Aloshi wrote:
blazin wrote: Well tested the first scenario with a simple C prog.. same issue, not even passing ROM location, I get nothing but a black screen. If I run this from X I get the DGEN logo with "no cartridge" as I'm not passing in the ROM location.

Next step, building a version that does the BCM_HOST_INIT() call.. joy
Since the first method didn't work, all the subsequent methods probably won't work either (they build on that) - I just wanted to know at which point DGen broke.

I'm guessing this means the black screen might be related to how DGen expects terminal input? Maybe the process is a child of ES and that's messing it up? I don't know much about Linux. This is pretty peculiar.
Hmm.. It's almost like, Dgen is running in the background and ES is running atop it. I too am new to linux.

The clear issue is running Dgen from ES.. Dgen runs from command line fine. It even runs without any switches required. Don't know why I thought I needed "-g o".

Anyway.. I'll keep kicking around with it.

User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 9:52 pm

jlongstreet wrote:
Toad King wrote:
jlongstreet wrote:If DGen works better than Genesis-Plus-GX, I might see what would need to be done to make a libretro port. Could be fun :)
Me and the other devs are always looking for more ports. If you want to take a crack at it, check out libretro.h, it describes the API pretty well. There was a more in-depth PDF floating around but one of the dev's hosting died and it hasn't been reuploaded yet.

You can also check out the test implementation: https://github.com/Themaister/RetroArch ... retro-test
Is there a copy of this PDF floating around? I have some questions about best practices for handling configuration options and such.
The dev that made it has been away for a couple days, but if you stop by #retroarch on Freenode me or another dev might be able to help with any questions you have.

blazin
Posts: 9
Joined: Sat Mar 10, 2012 3:18 pm

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 10:01 pm

blazin wrote:
Aloshi wrote:
blazin wrote: Well tested the first scenario with a simple C prog.. same issue, not even passing ROM location, I get nothing but a black screen. If I run this from X I get the DGEN logo with "no cartridge" as I'm not passing in the ROM location.

Next step, building a version that does the BCM_HOST_INIT() call.. joy
Since the first method didn't work, all the subsequent methods probably won't work either (they build on that) - I just wanted to know at which point DGen broke.

I'm guessing this means the black screen might be related to how DGen expects terminal input? Maybe the process is a child of ES and that's messing it up? I don't know much about Linux. This is pretty peculiar.
Hmm.. It's almost like, Dgen is running in the background and ES is running atop it. I too am new to linux.

The clear issue is running Dgen from ES.. Dgen runs from command line fine. It even runs without any switches required. Don't know why I thought I needed "-g o".

Anyway.. I'll keep kicking around with it.

Aloshi -- What's up with Renderer_draw_gl.cpp?

Currently when I load any rom I get:

"unloadinretroarch -L..." when I run the dgen call I get the same thing but "unloadin /home/pi/dgen/dgen...."

SO I tried to track down that output.. looks like "unloadin" is from Renderer_draw_gl.cpp... however.....


//this is never really used, but is here "just in case"
void unloadFonts()

std::cout << "unloading fonts...";


I assume that cout is what I'm seeing right before the command is called to load a rom.. the "never really used" comment concerns me as it seems to be called every time I load a rom. Is this supposed to be happening? Could this be what's bugging the system?

Trying to reverse engineer ES is going to be a hell of a PITA, so any help you can provide would be great ! :)

Side note this also may be the cause of an issue every now I've seem to had where I escape from RetroArch and ES comes back with blocks for text rather than actual text. Almost like the fonts got fugged up somewhere in there?

I'll keep digging ;)

levimadman
Posts: 12
Joined: Sat Oct 06, 2012 11:56 am

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 10:27 pm

Well, nicely done blazin!

compiled as you explained and executed it - all is fine(better than fine actually).
when I run ES , then - even exit it - and execute dgen - black screen appears.

BW -
iv'e had the blocks of text you are talking about - I've split the memory to give higher gpu mem - and problem "solved" .. maybe - memory-free related issue?

Thanks for the updates!

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie Setup - Auto-installer/updater for RetroArch ga

Thu Oct 25, 2012 10:55 pm

I've opened a topic in the Graphics subforum about the black screen bug, and included a very short sample program that reproduces the problem with ScummVM: http://www.raspberrypi.org/phpBB3/viewt ... 67&t=21084

The "unloading fonts" thing is left in there from a big change I did to how Font objects are handled the other day. I accidentally left in the std::cout call - sorry! I'll try and remove it soon.

Regarding the weird fonts-are-blocks bug, I haven't been able to reproduce it, but what seems to be happening is that the fonts aren't creating their OpenGL textures correctly. It's possibly for memory reasons, but I don't think fonts take up that much memory. My guess is it has something to do with texture size; I used kind of an awkward sizing method - see Font.cpp's buildAtlas() function for that particular bit of shame. I'll try changing it soon.

EDIT: Now that I look over it again, it might be because I hard-coded the texture size. I don't remember if the fonts get close to the limit or not.

Return to “Gaming”