kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Mar 28, 2013 12:50 pm

Thanks.
If you need some information on how to install (better to say unpack) the needed packages into your toolchain, let me know because I wasted many hours trying to figure it out.
I've recently concocted a couple of scripts which do just that and so far cross-compilation has worked on almost all emulators I have tried.

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Mar 29, 2013 2:49 pm

I managed to cross-compile it by changing:

Code: Select all

snes9x: $(SNES9X_OBJ)
	@echo [LD] [email protected]
	@$(CXX) $(LIBDIRS) $(LDFLAGS) -o [email protected] $^

confTool/confTool: $(CONFTOOL_OBJ)
	@echo [LD] [email protected]
	@$(CXX) $(LIBDIRS) $(LDFLAGS) -o [email protected] $^
to:

Code: Select all

snes9x: $(SNES9X_OBJ)
	@echo [LD] [email protected]
	@$(CXX) -o [email protected] $^ $(LIBDIRS) $(LDFLAGS)

confTool/confTool: $(CONFTOOL_OBJ)
	@echo [LD] [email protected]
	@$(CXX) -o [email protected] $^ $(LIBDIRS) $(LDFLAGS)
I just put $(LIBDIRS) $(LDFLAGS) after -o [email protected] $^ instead before them.
It seems on native system this is not needed but required when cross-compiling.
Cheers

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Mar 29, 2013 9:22 pm

kalehrl wrote:I managed to cross-compile[...]
Great!! I don't understand why it works better in this order but I'll test and do the update.
Chep

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 01, 2013 11:05 am

kalehrl: I pushed a branch kalehrl-keyboard. It uses the fix you found (mame4all).

I can't test because SDL has no problem with my keyboard. Keep you Makefile I haven't done the cross-compile modifications yet.
Chep

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 01, 2013 1:36 pm

Hi Chep
I just tested the snes9x with the change you made in kalehrl-keyboard branch and I'm happy to report that my keyboard now works. :)
However, I noticed a significant audio lag which I think affect all games.
I tested Aladdin and Donkey Kong Country so far.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 01, 2013 1:45 pm

kalehrl wrote:Hi Chep
I just tested the snes9x with the change you made in kalehrl-keyboard branch and I'm happy to report that my keyboard now works. :)
However, I noticed a significant audio lag which I think affect all games.
I tested Aladdin and Donkey Kong Country so far.
\o/
No audio problem here with Zelda a link to the past and Street fighter II.
I'm gonna test with Aladdin and Donkey Kong Country.

edit: by "audio lag" do you mean delay? I noticed it while playing Aladdin and sometime with Zelda.
Or do you mean that sound stops for some time and then restart?
Chep

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 01, 2013 2:26 pm

Yes, the delay is a better word for it.
The audio is 1s late approximately.
First, I cross compiled it and noticed the delay.
To be sure it's not the fault of cross compilation, I compiled it on my raspi and got the exact same result.

Tchaly
Posts: 3
Joined: Thu Apr 04, 2013 5:18 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Apr 04, 2013 6:05 pm

Hey there !

First of all, I would like to thank all those who have worked on the snes9x-1.39-rpi improvement project.
I've cloned the snes9x 1.39 C++ portation of Chep and it works perfectly (games tested : bomberman 5, street fighter 2). The confTool is a great idea by the way !

For the record, I succeed to compile it without the dispmanx SDL lib. I just needed to download those package : libsdl1.2-dev, libsdl-ttf2.0-dev, libboost-serialization-dev (and perhaps some others libboost-*) in order to compile without any error (but few deprecated fuctions warnings).

One little detail : when i have launched the snes9x emulator, the video output, has switched in a weird configuration -like if it was 8/16 bit color mode- then, after the emulator's shutdown, the video output stays in that state. Reboot the pi hadn't reseted the default settings. I don't really understand where does this issue come from. Can someone give me some clue to resolve this trouble ?

Bye,
T'Chaly.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Wed Apr 10, 2013 12:32 pm

kalehrl wrote:Yes, the delay is a better word for it.
The audio is 1s late approximately.
First, I cross compiled it and noticed the delay.
To be sure it's not the fault of cross compilation, I compiled it on my raspi and got the exact same result.
I think this is a bad initialization/use of ALSA. Soft resampling or something like that. With exactly the same code but using oss, sound is ok. I'm working on it. I need to read the manual.
Tchaly wrote:I just needed to download those package : libsdl1.2-dev, libsdl-ttf2.0-dev, libboost-serialization-dev (and perhaps some others libboost-*)
Debian packaging is in TODO list. Raspbian users will be able to use debian tools to get all dependencies resolved and to install/remove snes9x easily.
Chep

jUjU142
Posts: 3
Joined: Thu Apr 11, 2013 1:56 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Apr 11, 2013 1:59 am

Is this project still under developement? I'm trying to get this running on XBMC with Rom Collection Browser but I am very....very new to linux. Are there new packages I need before trying to compile?

"/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o: In function `_start':
(.text+0x34): undefined reference to `main'"

I'm probably doing something...massively? wrong, pardon my ignorance.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Apr 11, 2013 7:55 am

jUjU142 wrote:Is this project still under developement? I'm trying to get this running on XBMC with Rom Collection Browser but I am very....very new to linux. Are there new packages I need before trying to compile?

"/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o: In function `_start':
(.text+0x34): undefined reference to `main'"

I'm probably doing something...massively? wrong, pardon my ignorance.
How do you get source code and do compile? Can you paste whole build output?
Chep

jUjU142
Posts: 3
Joined: Thu Apr 11, 2013 1:56 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Apr 11, 2013 11:57 am

I ftpd the extracted tar files over to my RPi. I tried using the gcc command when ssh d into my box to compile. I'm pretty sure that is where the problem is. I'm NOT exactly sure what the full command should be as I was using other Google sources . I dis end up with abot a 1.7mb file . Posting from my phone at work. Ill try again around 5pm est

jUjU142
Posts: 3
Joined: Thu Apr 11, 2013 1:56 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Thu Apr 11, 2013 9:54 pm

I feel like I am missing libraries? The make command does nothing for me, and that's why I had looked up other ways to compile (gcc was what I ended up using). When doing the update for the libsd1-dev, I get an error and it tries to download another package instead, and fails because of depending on something else. So I am currently backtracking packages it says I need. I'm assuming one of these will eventually open up the "make" command? I will post an update once I finally am able to install the package listed in the documentation.

EDIT: I THINK IT COMPILED! After backtracking packages i ran the make command in the directory and it did...something. A lot of warnings, but it didn't "error" out. Does it place the compiled "file" somewhere specific? or within that directory if not specified to somewhere else?

EDIT2:
Assertion 'l' failed at pulsecore/flist.c:168, function pa_flist_pop(). Aborting.
Suggestions?

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Apr 12, 2013 7:45 am

Hi,

I pushed a new version here.

Alsa sound is now working fine but only for default rpi sound card. I'll later
add something in confTool to choose the sound card and try with an USB sound card.
Chep

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Apr 12, 2013 8:16 am

jUjU142 wrote:Assertion 'l' failed at pulsecore/flist.c:168, function pa_flist_pop(). Aborting.
Suggestions?
This is a pulseaudio function. Are you using palerider version? If you do, this could be a oss emulation issue. If not, I'll have to install pulseaudio and deal with it...
Chep

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Apr 12, 2013 1:16 pm

When loading savestate, the keyboard no longer works.

sgtslaughter
Posts: 7
Joined: Fri Apr 12, 2013 3:07 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Apr 12, 2013 3:14 pm

I've been having a ton of trouble trying to get this to compile... Most likely because I was using the chameleon image(http://chameleon.enging.com/) which may be more stripped down than normal.

I figure I would post the steps I've done (while all may not be required I figure I would list them nonetheless).

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libsdl-dev
sudo apt-get install joystick
sudo apt-get install alsa-oss

Not sure if this was required, I was getting an error with libboost, so I thought that may have been the case... It got it to a different error (which I forgot to write down...)
sudo apt-get install libboost1.50-all-dev

Anyways in the end I had to make a change to the Makefile and add in "-lboost_system" to the LDFLAGS line.

Hope this helps someone. Thanks everyone for all the hard work to get to this point.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Fri Apr 12, 2013 4:54 pm

sgtslaughter wrote:Anyways in the end I had to make a change to the Makefile and add in "-lboost_system" to the LDFLAGS line.
Thanks for feedback. That's strange, I don't need this flag (just tested after a make clean). I use 1.49 boost libraries, maybe this is an intern dependency in 1.50 version. I'll add the flag to be sure. I'll also make a good readme and debian packaging.
kalehrl wrote:When loading savestate, the keyboard no longer works.
I'll test this week end.
Chep

yottskry
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Sat Apr 13, 2013 10:44 am

sgtslaughter wrote: Anyways in the end I had to make a change to the Makefile and add in "-lboost_system" to the LDFLAGS line.

Hope this helps someone. Thanks everyone for all the hard work to get to this point.
Fwiw, I also found I had to add -lboost_system to get it to compile. I'm using Arch linux, so I don't know if that has its libraries set up slightly differently to raspbian.

sgtslaughter
Posts: 7
Joined: Fri Apr 12, 2013 3:07 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Sat Apr 13, 2013 3:50 pm

I had to do a complete rebuild on my Chameleon Pi 0.3.1 system due to an issue with conflicts installing the SDL12-kms-dispmanx library. I figure I would let you know the dependencies I had to install to get snes9x installed:

sudo apt-get install joystick
sudo apt-get install libsdl-dev libsdl-ttf2.0-dev
sudo apt-get install libboost-dev libboost-serialization-dev libboost-thread-dev libboost-system-dev
sudo apt-get install alsa-oss

In addition to having to add -lboost_system to the LDFLAGS line in the Makefile.

Anyone have an idea here if you can compile the SDL12-kms-dispmanx library right into snes9x? Everything I've tried has failed.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Sat Apr 13, 2013 4:01 pm

Makefile has been updated.

Alsa-oss is not needed anymore, latest version uses ALSA.
Chep

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Sat Apr 13, 2013 6:41 pm

Hi Chep
I have a suggestion where to place input.config.
Why not put it in .snes96_snapshots folder?
This folder is created by snes9x anyway so maybe it is better for it to be there than where the binary is.

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Sat Apr 13, 2013 6:49 pm

kalehrl wrote:Hi Chep
I have a suggestion where to place input.config.
Why not put it in .snes96_snapshots folder?
This folder is created by snes9x anyway so maybe it is better for it to be there than where the binary is.
I just did it ;-)
Not pushed yet.

Edit: I found why savestate don't work. I'm working on it.
Chep

User avatar
Chep
Posts: 46
Joined: Fri Jan 18, 2013 9:32 pm

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 15, 2013 9:45 am

Pushed.

Savestates are working better but I still have a bug. Sometimes sound freezes. It is frozen in saved file because reset don't restore it.

ConfTool display bug for keyboard fixed.
Font file is now /usr/share/fonts/truetype/freefont/FreeMono.ttf you need fonts-freefont-ttf package (debian).
Here is dependencies list
Chep

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: snes9x-1.39-rpi -- full speed SNES emulation with sound

Mon Apr 15, 2013 1:13 pm

I also experienced sound freeze after loading a savestate.
The savestate isn't accurate.
I saved it in the middle of a round and it put me at the beginning when I loaded it.

Return to “Gaming”