+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  byuu - bsnes feature request
Pages: [1]
Author Topic: byuu - bsnes feature request  (Read 2 times)
Talbain
Guest
« on: October 26, 2008, 10:56:08 am »

This is probably neither the best way to do this nor the way I really want to do this, but it's a question I'd like to ask.

byuu is it possible to make (or request for) your emulator, rather than syncing audio or video, to limit the frames per second to 60 or 50 (based upon whatever the game uses)?  Just curious.
Disch
Guest
« Reply #1 on: October 26, 2008, 01:13:06 pm »

I know I'm probably speaking out of turn here.... but....

There's a fixed timeframe that's tied to audio output and CPU/APU/PPU interaction.  1 audio sample is generated every X cycles on the SPC, which equates to Y cycles on the CPU, which equates to Z cycles in the PPU, which is a very specific portion of the frame.  You cannot change these ratios without changing (breaking) emulating timing.

So the only way to do this without sacrificing emulation accuracy is to somehow slowdown/speedup the audio after it's generated (think tape deck speedup/slowdown) -- or simply let the underrun/overrun occur (which would cause breaks in the sound).  Either of which will cause audio distortion.  But I suppose if you turned audio off that wouldn't be a problem.
Talbain
Guest
« Reply #2 on: October 26, 2008, 03:51:05 pm »

Well I'm pretty sure it would sacrifice accuracy, but I'm curious to see what it would emulate like.  The options to Sync Video and Sync Audio got me thinking that it might be possible to add in a third option to "sync to max frames per second."

Sorta how I'd like to see a cheat menu of some sort in SNESGT, heh (I figure since the emulator uses plugins it wouldn't be too hard to implement).  Just think it would be a nice/interesting feature to have.
byuu
Guest
« Reply #3 on: October 26, 2008, 06:09:26 pm »

"Sync Video" waits for the monitor refresh rate. So if you run at 60hz, you get 60fps; and if you run at 50hz, you get 50fps.
"Sync Audio" syncs the game to 32khz on your sound card; that's 4-tap hermite (a step above cubic, a step below band-limited) up-sampled to whatever output frequency you chose on the audio settings panel. So if you load an NTSC game, you get effectively ~60.09fps; and for PAL ~50fps.

Using neither means things run as fast as possible. You really don't want "Sync Video" by itself, unless you mute audio output. "Sync Audio" by itself should do what you want, although the video will tear a bit. You get the best results using both at the same time, but video will be terrible unless your monitor is currently set to the same region game you are playing -- eg 50hz/PAL, 60hz/NTSC. Nothing I can do about that one.

bsnes defaults to auto-detecting the region from the game. You can override this and force NTSC to 50hz or PAL to 60hz by setting "advanced.enable" to "true", and then restarting. The system menu will now have a region-override option for you. Note that for a lot of games, you'd need something like SNEStool to patch out the region checks. And yes, as Disch stated, it will severely interfere with timing.

Let me know if I'm misunderstanding your question.
Talbain
Guest
« Reply #4 on: October 26, 2008, 10:50:28 pm »

Nope, that answers it entirely.  Thanks a lot. Smiley
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC