
Originally Posted by
byuusan
What a shame, I was hoping the PS3 devkit was at least semi-up to date.
It might be up to date for all we know - this is just a leaked devkit from three years ago - the only one that's out there for public consumption through somehow less than legal means.
This scene is pretty much in the same situation as the original Xbox scene was in (with no real open-source - and thus legal - means to program homebrew software) - most probably this scene's equivalent of OpenXDK will take a similar amount of time to gestate and by then everyone will have moved on to some other platform. (and even then, OpenXDK never had hardware accelerated graphics - so it was always second-best to program in from a pragmatic point of view)
Byuu: Hi there byuu, not sure if I should be the right one to try to port bSNES over to PS3 since I am well below your level of programming prowess - but anyway, I hope you can forgive the ignorance I'm exemplifying here - seeing as I'm almost embarrassed to be asking you about something as trivial as a Makefile.
Given the advice you gave me, I was first looking at porting bSNES 0.60, and go from there basically. If I can get that to actually run, I figure I might as well go ahead and immerse myself in C++0x and try to get the latest version ported.
Basically, I'm stumped at the Makefile basically.
Let me first give you an example of what most of the sample Makefiles look like from Sony's SDK samples directory -
http://github.com/eiz/ps3_snes9x/blob/master/Makefile
What I've tried to do with the Makefile from bSNES 0.60 (the one in src) is to basically model everything after the Makefile I linked to above, take everything from the original bSNES makefile beginning at the #libraries, and put it all inside the variable PPU_SRCS.
So you get something like this:
Code:
PPU_SRCS = lib/ruby/ruby.cpp $(call rwildcard,lib/ruby/*) $(call compile,$(rubydef) ) lib/libco/libco.c lib/libco/* cartridge/cartridge.cpp cartridge/* cheat/cheat.cpp cheat/* memory/memory.cpp memory/* memory/smemory/smemory.cpp $(call rwildcard,memory/smemory/) cpu/cpu.cpp cpu/* cpu/core/core.cpp $(call rwildcard,cpu/core/) cpu/scpu/scpu.cpp $(call rwildcard,cpu/scpu/) smp/smp.cpp smp/* smp/core/core.cpp $(call rwildcard,smp/core/) smp/ssmp/ssmp.cpp $(call rwildcard,smp/ssmp/) dsp/dsp.cpp dsp/* dsp/adsp/adsp.cpp dsp/adsp/* dsp/sdsp/sdsp.cpp dspsdsp/* ppu/ppu.cpp ppu/* ppu/bppu/bppu.cpp $(call rwildcard,ppu/bppu/) system/system.cpp $(call rwildcard,system/) chip/supergameboy/supergameboy.cpp $(call rwildcard,chip/supergameboy/) chip/superfx/superfx.cpp $(call rwildcard,chip/superfx/) chip/sa1/sa1.cpp $(call rwildcard,chip/sa1/) chip/bsx/bsx.cpp chip/bsx/* chip/srtc/srtc.cpp chip/srtc/* chip/sdd1/sdd1.cpp chip/sdd1/* chip/spc7110/spc7110.cpp chip/spc7110/* chip/cx4/cx4.cpp chip/cx4/* chip/dsp1/dsp1.cpp chip/dsp1/* chip/dsp2/dsp2.cpp chip/dsp2/* chip/dsp3/dsp3.cpp chip/dsp3/* chip/dsp4/dsp4.cpp chip/dsp4/* chip/obc1/obc1.cpp chip/obc1/* chip/st010/st010.cpp chip/st010/* chip/st011/st011.cpp chip/st011/* chip/st018/st018.cpp chip/st018/* chip/msu/msu.cpp chip/msu/*
Basically, this succeeds up until a point - it errors out at a specific point (at the SDSP part - it complains about sDSP being undeclared.
As a second experiment, I also tried taking the bSNES makefile, this time retaining all the parts of your Makefile, but commenting out/editing out everything having to do with the GUI (such as 'include lib/nall/Makefile), ui := ui_qt, most of the platform stuff) and then executing make as follows:
make compiler=ppu-lv2-gcc-4.1.1 (notice I've omitted platform since I totally edited/commented all that stuff out)
This gives me even more spectacular errors.
Lastly, I also tried to do it the even more rough way - basically go over every directory inside the src folder structure, and put every file ending with .CPP inside PPU_SRCS. This also ended in failure.
Do you have any ideas? Once again, sorry for the general display of ignorance here (both on a language level (C++) and understanding of bSNES) - but it's quite hard to wrap my head around what might be wrong here. I don't think I'm omitting anything that is crucial.
Lastly, thanks for the advice on the sound APU. Just with the port of SNES9x alone, I tried out a wide range of input frequencies - I noticed that at a certain point, the crackling appeared to drown out, but on the minus side I started to notice frame skips / missed frames which previously weren't there - so I had to move the input frequency up again. Here's a list of values I had tried out with SNES9x:
32000
31968
31920
31910
31900
31890
31880
31870
31860
31850
31840
31830
31820
31810
31800
31790
31780
31760
31750
31740
31730
31720
31710
31700
31690 (starting to notice the crackling starting to subside, but on the flip side slowdown seems to be setting in)
31680 (same, if not worse slowdown)
31670 (and on)
31660 (and on)
Perhaps try what you seemed to hint at - if SNES9x generates 10 samples more than what is needed due to the PS3's display frequency and output frequency, perhaps start with an input rate of 32040 and subtract by 10 until I finally arrive at an ideal value?
Do you suppose we'll be running into the same problems with bSNES? While I'm on the subject, while I was able to get sound working just fine with previous versions of bSNES on my Opensuse 11.3 Core 2 Duo system, as of version 0.68 sound crackling also started to appear in a manner similar to that seen in this PS3 version of SNES9x - so I'm guessing that with the new APU core, this fiddling around with the Sound input frequency is part of a ritual that you have to endure once with every PC configuration because of the level of accuracy aimed at or something? This never seemed to be much of a problem with zSNES and SNES9x in the late '90s and on - I take it that was because of accuracy not being much of an issue.
Just to add to this - I also tried to exclude ruby from PPU_SRC since that is also platform-dependent - didn't change anything.