Perhaps byuu might want to respond to this even though SNES9x is not his emulator and he would very much prefer we just port bSNES already and get it over with - still, I think it's important to get both emulators working up to snuff.
Ever since I applied bearoso's APU and timing patches (to get the sound working scratch-free - it was really bad in the first release because the initial porter - eisz - was using the stock SNES9x 1.52 which apparently had all sorts of bugs with the implementation of the new APU), people have noticed that PAL games seem to no longer output correctly.
I thought I could get rid of this problem by setting the PS3's videomode to a PAL resolution (576p) and set the framerate to 50Hz (basically the only option here - unlike NTSC where I can choose between 59.54Hz and 60Hz, there's only 50Hz for 576p).
I tried that, and what I got instead was some very strange 'ghosting' effect - it's not slowdown, the framerate counter remains at a rock-solid 50/50fps - but it looks bad nonetheless.
I've tried the setting 'Setting.ForcePAL = true' when I go into PAL mode - didn't really make any difference.
Here are the options I'm using (for PAL - 720x576 @ 50Hz progressive):
video_state.displayMode.resolutionId = CELL_VIDEO_OUT_RESOLUTION_576;
video_state.displayMode.scanMode = CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE;
video_state.displayMode.refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_50HZ;
video_state.displayMode.conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE;
video_state.displayMode.aspect = CELL_VIDEO_OUT_ASPECT_4_3;
These were the patches I applied from snes9x-gtk about four days ago (these were all sound APU/timing related - I needed to apply these to the stock SNES9x source code or else the sound would still have been awful to this day):
* Applied the following patches from snes9x-gtk:
- Revision r258 - Add a fixed-point linear resampler option.
- Revision r259 - Use the APU_DEFAULT_RESAMPLER macro.
- Revision r260 - Optimize the linear interpolation macro.
- Revision r272 - Merge zones' timing stuff.
- Revision r282 - Use APU clock that yields 32040hz output instead of 32000.
- Revision r283 - Integrate timing hack variables into the clock ratios to allow integers in all cases.
- Revision r287 - Don't push samples if there aren't any.
So, can I put this down as a SNES9x bug, or should I still screw around/twiddle with various functions?
Did some speed tests on 960x1080 @ 59.94Hz (this is a resolution supported by the PS3 which is upscaled to 1080p).
One other thing you will notice when using this mode - the Vsync is absolutely perfect - even better than in 480p mode.
It seems performance was previously bad in these hi-res modes because we were not using the proper refresh rate - 59.94Hz.
I'm not going to release a new build with this change for the following reason - reasons being:
1 - The menu at the moment is VERY, VERY SMALL (like miniature). Perhaps look at libfont, because this kind of raw text output just won't scale - at all.
2 - While it outputs at 1080p, it's still not fullscreen anyway, and is still quite small - therefore, yeah it looks a lot smarter, and the VSync is even better, but it currently won't get you much.
3 - it's best to stay at 480p for the while - while we try to get the video looking properly (goal is to get it fullscreen at 480p first, then other modes - I have to learn more about libgcm first) First get 480p mode looking properly, then offer a HD mode. SNES9x PS3 - 960x1080 @ 59.94Hz (drawing resolution - 960x1080 - output resolution by PS3 - 1920x1080) Normal games (without special chips) - probably around 95% of all games:
60fps constant. Perfect Cx4 games (Mega Man X2/Mega Man X3):
60fps constant. Perfect SDD-1 games (Star Ocean):
60fps constant. Perfect. DSP-1 games (Super Mario Kart):
60fps constant. Perfect. SuperFX-2 / Yoshi's Island:
Very frequent and irritating sound pops and slowdown. Snes9x's FPS counter says it stays at 60fps, but you will see otherwise. SuperFX-1 / Star Fox:
Heavy sound pops and what appears to be slodown, yet FPS counter stays at 60fps. SA-1 / Super Mario RPG:
Minor sound pops. Seiken Densetsu 3:
This one is interesting in that it switches between 256x224 (normal in-game mode) and 512x448 (for whenever there is text displayed, and on menu screens). The lo-res mode runs perfectly at 60fps -it's when it switches to hi-res mode (512x448) that you can hear a slight audio pop - it can be irritating in the long run. Secret of Mana/Seiken Densetsu 2:
This did the same trick as described above - however, it's less abundant in its use of the hi-res mode - it only uses hi-res mode (512x448) for special menu screens that you access from the ring menu. Lo-res mode is pretty much 60fps all the way. Some slight audio pops when text displays - probably not much of an issue.
Note for those who don't know: SA-1, SuperFX, SDD-1 and Cx4 were all special chips that were inserted into specific game cartridges to do things that would have otherwise been impossible to do on the SNES. SA-1 alone is clocked at 10MHz or so (the SNES' CPU by comparison is 3.58MHz if memory serves correctly) - SuperFX 2 runs at 21MHz - this explains why these games take a speed hit compared to normal games.
IF YOU WANT TO TRY THIS OUT STEP 1:
Download my latest build, unzip the source, open cell.cpp
and change this line:
video_state.displayMode.resolutionId = CELL_VIDEO_OUT_RESOLUTION_480;
video_state.displayMode.resolutionId = CELL_VIDEO_OUT_RESOLUTION_960x1080;
Alternatively, you could replace 'CELL_VIDEO_OUT_RESOLUTION_480 with one of the following (these are all supported PS3 resolutions):
CELL_VIDEO_OUT_RESOLUTION_1080 (drawing/output resolution: 1920x1080)
CELL_VIDEO_OUT_RESOLUTION_720 (drawing/output resolution: 1280x720)
CELL_VIDEO_OUT_RESOLUTION_576 (drawing/output resolution: 720x576 / PAL)
CELL_VIDEO_OUT_RESOLUTION_1600x1080 (drawing res: 1600x1080, output resolution: 1920x1080)
CELL_VIDEO_OUT_RESOLUTION_1440x1080 (drawing res: 1440x1080, output resolution: 1920x1080)
CELL_VIDEO_OUT_RESOLUTION_1280x1080 (drawing res: 1280x1080, output resolution: 1920x1080)
CELL_VIDEO_OUT_RESOLUTION_960x1080 (drawing res: 960x1080, output resolution: 1920x1080) STEP 2
Start up an SFO editor, edit the PARAM.SFO in the sourcefolder/pkg directory, and tick the 1080p box (or 720p if you want to try a 720p mode). Save and exit the SFO editor. STEP 3:
Recompile and create package with the SDK.
In folder, do:
make clean && make