Compiling snes9x-gtk (filter_hq2x.cpp)

Discuss general PS3 Linux software development here.

Compiling snes9x-gtk (filter_hq2x.cpp)

Postby Arakageeta on Sat Jun 06, 2009 7:48 pm

I am trying to recompile snes9x-gtk because I am unhappy with its performance. I plan to try out gcc 4.3, llvm, and ppu-gcc compilers and see which one does the best. Finally, I hope to try out IBM's XLC compiler for Cell and maybe automatically offload some computation to the SPUs.

Anyhow, I have run into some trouble-- I can't compile gtk/src/filter_hq2x.cpp! The compiler just runs and runs trying to compile the file until it runs out of memory. Has anyone seen this behavior before?
Arakageeta
New Visitor
New Visitor
 
Posts: 4
Joined: Tue May 26, 2009 4:49 pm

Re: Compiling snes9x-gtk (filter_hq2x.cpp)

Postby billb on Sun Jun 07, 2009 9:49 am

Arakageeta wrote:Anyhow, I have run into some trouble-- I can't compile gtk/src/filter_hq2x.cpp! The compiler just runs and runs trying to compile the file until it runs out of memory. Has anyone seen this behavior before?


Yes, I've seen that before when compiling a couple of other things as well. I don't actually get any error saying it's out of memory -- I get something similar to:

internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


Are you using ps3vram swap in addition to the default ~512MB on the internal drive? I have two PS3's and I recently reinstalled YDL 6.1 on one, making the internal drive swap ~1GB during the partition setup. I was trying to build DOSBox 0.73 and just couldn't get through it on my PS3 with ~512MB swap plus ps3vram -- would always fail during core_prefetch.cpp at which point around 560MB swap was being used. Same thing with the latest qemu.

For snes9x-gtk, you may be able to get through it if you free up as much memory as possible. You could try booting to runlevel 3 as well as disabling any unnecessary services. Or if you're able to modify the source so it doesn't build the hq2x filter, that would probably help -- using that filter or any others is only going to slow it down even more.

I'm happy with the performance of it "as is" when I use the SPE scaler tool as described here (scaler or fscaler):

viewtopic.php?p=496#p496

But of course any improvements would be great... I haven't tried any compilers other than what is included with YDL. Also, with snes9x-gtk 1.51-73, I haven't been able to get any output from the new SDL audio driver so I haven't updated my RPM package past 1.51-70 yet. It builds OK and PortAudio still works ... haven't done much testing / troubleshooting with it yet.
http://www.ps3bodega.com (my blog) | http://www.yellowdog-board.com (Fixstars YDL community board)
User avatar
billb
Site Admin
Site Admin
 
Posts: 1298
Joined: Thu Jun 26, 2008 1:33 pm
Location: Southeast NC, USA

Re: Compiling snes9x-gtk (filter_hq2x.cpp)

Postby Arakageeta on Mon Jul 06, 2009 6:49 pm

Thanks for the info, billb. I found that gcc 4.3-based tools couldn't handle filter_hq2x.cpp. My workaround is to compile the single file manually with a 4.1-based compiler. The linker happily links the mixed object files together. I also did some experimentation with IBM's XL compiler. The thing is a memory hog, so I had to create temporary swap files as large as 5GB to complement the 500MB swap partition and 200-something MB swap from vram I was already using.

It's been a few weeks since I started recompiling snes9x-gtk, so wanted to report on how things have been going. I manged to squeeze out an extra frame per second using IBM's XL compiler (more info on my results here: http://psubuntu.com/forums/viewtopic.php?f=11&t=2058). I found virtually no difference between the different gcc versions and flavors. It looks like optimizations does little to speed things up as long as the code is bound to the PPU. I'll try again in a few weeks with IBM's Octopiler.

Question: Is anyone still using the SPU-enhanced Xv driver by unsolo (http://forums.ps2dev.org/viewtopic.php?t=9288)? I haven't seen updated on the project for over a year-- is it dead? I thought that this might help snes9x-gtk's fullscreen mode. (I still haven't gotten fscaler to work... I read a post about increasing fb memory and will try that.) I ask here since this is one of the more active Linux/PS3 forums.

Regarding sound issues in 1.51-73, have you tried redirecting OSS calls to ALSA (http://psubuntu.com/forums/viewtopic.php?f=6&t=1167 -- see my post)?
Arakageeta
New Visitor
New Visitor
 
Posts: 4
Joined: Tue May 26, 2009 4:49 pm

Re: Compiling snes9x-gtk (filter_hq2x.cpp)

Postby billb on Wed Jul 08, 2009 8:42 am

Arakageeta wrote:I also did some experimentation with IBM's XL compiler. The thing is a memory hog, so I had to create temporary swap files as large as 5GB to complement the 500MB swap partition and 200-something MB swap from vram I was already using.


Ouch.

Arakageeta wrote:I manged to squeeze out an extra frame per second using IBM's XL compiler


:shock: Ugh ... sorry to hear that.

Arakageeta wrote:Question: Is anyone still using the SPU-enhanced Xv driver by unsolo (http://forums.ps2dev.org/viewtopic.php?t=9288)? I haven't seen updated on the project for over a year-- is it dead?


Has that project been continued here perhaps?

http://code.google.com/p/spumedia/

Never tried it myself.

Arakageeta wrote:(I still haven't gotten fscaler to work... I read a post about increasing fb memory and will try that.)


scaler / fscaler has given me the greatest performance boost for running emulators in fullscreen mode ... what is it doing on Ubuntu? Nothing at all? Locking up? Maybe the developer of fscaler can help out with that.

Arakageeta wrote:Regarding sound issues in 1.51-73, have you tried redirecting OSS calls to ALSA (http://psubuntu.com/forums/viewtopic.php?f=6&t=1167 -- see my post)?


No, haven't tried that, but the portaudio driver still works. Have not looked at snes9x-gtk recently since I've been in the middle of moving ... hopefully things will settle down soon.
http://www.ps3bodega.com (my blog) | http://www.yellowdog-board.com (Fixstars YDL community board)
User avatar
billb
Site Admin
Site Admin
 
Posts: 1298
Joined: Thu Jun 26, 2008 1:33 pm
Location: Southeast NC, USA


Return to Software Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron