Changing gameplay and sound speed independently?

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
Dwedit
Rookie
Posts: 12
Joined: Thu Apr 28, 2005 6:37 pm

Changing gameplay and sound speed independently?

Post by Dwedit »

This is a feature request, I was wondering if it would be possible to be able to speed up gameplay, yet keep the sound playing at normal speed. Maybe change the rate of the timers in the SPC, or underclock it, or whatever would accomplish the effect.
It would be mainly useful for RPGs. Really, who plays those things at normal speed without frameskip?

Obviously there would be possible desync problems which might crash the game, but that's what the rewind feature is good for.
"We are merely sprites that dance at the beck and call of our button pressing overlord."
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Workaround would be muting the music channels and playing it back with SNESAmp instead...
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Re: Changing gameplay and sound speed independently?

Post by Deathlike2 »

Dwedit wrote:This is a feature request, I was wondering if it would be possible to be able to speed up gameplay, yet keep the sound playing at normal speed. Maybe change the rate of the timers in the SPC, or underclock it, or whatever would accomplish the effect.
It would be mainly useful for RPGs. Really, who plays those things at normal speed without frameskip?
Without even thinking too much, this won't happen. IIRC, there are some games that rely on very crucial SPC-core timing and what you are suggesting completely breaks them. Components on a console are not like trying to overclock RAM and downclocking the CPU on a comp. Some CPUs on a console (particularly this one) rely on sensitive timing.
Obviously there would be possible desync problems which might crash the game, but that's what the rewind feature is good for.
Why the hell would you want more desyncs than the old netplay in ZSNES? This is retarded.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: Changing gameplay and sound speed independently?

Post by grinvader »

Dwedit wrote:Obviously there would be possible desync problems which might crash the game, but that's what the rewind feature is good for.
The rewind feature would only reproduce the crash.
Mute the emu and use a media player.

And I know several people playing RPGs without frameskip - not all of them are stupid button mashers where holding turbo A + frameskip will clear the game for you.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Dwedit
Rookie
Posts: 12
Joined: Thu Apr 28, 2005 6:37 pm

Post by Dwedit »

Okay... Crazy idea. Emulate two different SPC700s. One audible, the other silent.
Have one run at normal speed and communicate with the CPU as normal. This is the silent one.
Have the other one run at a variable speed, except if there has been communication with the CPU within the last thousand clock cycles or so, then it runs at normal speed. Make it unable to change the state of the CPU or RAM, but it should respond to the output that the CPU sends to it.
And things get bad, map a button to transfer the state of the silent SPC700 to the audible one. So basically you have the CPU outputting to both SPCs at the same time, but only the one running at normal speed gets to talk back, and the one running at a different speed goes back to normal speed during communications.

If this theoretically were done, would it work?
"We are merely sprites that dance at the beck and call of our button pressing overlord."
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Dwedit wrote:If this theoretically were done, would it work?
Well, the variable spc must be able to write to dsp ram, else you won't get anything good out of it.
Also, most games keep writing stuff to the spc, so the music would keep stutter-jumping every so often, giving an awful experience.

So it would work in a sense, but not good for anything decent.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

grinvader wrote:
Dwedit wrote:If this theoretically were done, would it work?
Well, the variable spc must be able to write to dsp ram, else you won't get anything good out of it.
You'd of course give each SPC its own DSP.

(And then hunt through the code to find all places where the first DSP is updated. :D )

</inane>
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
byuu

Post by byuu »

I think it'd work in a lot of games, but it would be very unreliable. Games like EWJ2 and ToP are obviously out of the question. But some of the really, really simple stuff that just sends one signal to start playing a new song or sound effect and nothing more? Maybe ... you may get stuck in CPU<>SMP communication loops which would just lag down your game anyway, though. Which would kind of defeat the whole purpose.

It's pretty safe to say that nobody else is going to do it for you, though. I can tell you where the timer code is located in my emulator, if you want to change it yourself. Or you can dig through ZSNES or whatever. Otherwise, it's most likely not going to happen.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

SNEmulDS for the Nintendo DS seems to behave this way. The sound CPU and main CPU emulation speed are totally separate from what I've seen. It's not like it's the most compatible or accurate emulator around, though. :D
Post Reply