| |
ThunderBlade
Registered: Jan 2002 Posts: 75 |
resetting the SID
Hi, not sure if this is an awkward question, but... what's the proper way to reset the SID?
When starting various musics, I sometimes, very rarely, notice they sound different like all the other times. It seems to depend which music I played previously!
Inbetween playing musics, currently I just fill $D400 - $D418 with a counting down loop (starting with $D418) with zeroes. Is there a recommended better way?
|
|
| |
Soren
Registered: Dec 2001 Posts: 547 |
Different musics, different music routines, possibly?
resetting oscillators (testbit in waveform register)should have to do with parts of this issue. I bet the oscillators start running as soon as they are NOT reset.
d404,09 = gate on and reset oscillator.
So d404,0 possibly lets the oscillator running, even though no waveform is really played, but the phase is not reset.
Also ADSR might give some problems.
There are people that know far much more than me about this, so lets wait and see. :-) |
| |
iAN CooG
Registered: May 2002 Posts: 3132 |
It happened very often to me to reset the SID between an intro and a game by writing first $ff then $00 to every sidregs, else the game tune would sound w/o a voice or with one continuous BEEP. There are a shitload of intros out there that don't take the problem of properly reset the SID into account =) |
| |
Hermit
Registered: May 2008 Posts: 208 |
I don't know whether it's the same issue, but I remember, when I was coding SRA Music Collection, and wanted to fade out tunes, some of the tunes played ugly after fading out the previous in the list.
I had to remove the fade-out function. Whatever I did, didn't help. Maybe this $ff then $00 would have been the solution to start every tune correctly, not depending on previous tune.
Now in my player I'm trying with $08 to every register at init/startup, as I saw in some tunes at RakBit project. An ancient way possibly, but simple, and resets the oscillators.
Anyway. That's why I like SID, it's soo analog, if it was a living creature not a chip, which always has new aspects to discover.
|
| |
Conrad
Registered: Nov 2006 Posts: 833 |
Quote: It happened very often to me to reset the SID between an intro and a game by writing first $ff then $00 to every sidregs, else the game tune would sound w/o a voice or with one continuous BEEP. There are a shitload of intros out there that don't take the problem of properly reset the SID into account =)
Yeah, the older intros used the kernal routines to reset the VIC, but didn't necessarily reset the sid registers either. You could definitely tell with those lame frozen "cracks" some groups did. ;)
One thing I know is that you can reset the noise generator by set waveform $91, and then a frame later, reset with $09, as Jeff mentioned. Works wonders with tunes that use phase effects with the noise waveform. |
| |
ThunderBlade
Registered: Jan 2002 Posts: 75 |
Thank you for the hints, yes it's different play routines. I will try the suggested solutions. |
| |
Frantic
Registered: Mar 2003 Posts: 1627 |
I haven't really experimented with, or thought closely about, how to reset the sid in the best possible way, but...
Filter regs, frequency regs, and pulse width regs should simply be set to 00.
I would first set ADSR regs to 00, then set the control registers to $08 to set gate off and turn oscillators off (what Jeff suggested, sort of). Then you should preferably wait for a while (2-3 frames should be completely safe) to make sure that the internal ADSR counters are reset properly.
...and finally, if everything is silent when you try to play your tune, just set global sid volume to $0f before initializing the tune. (The tune init routine really should take care of this itself though, so I guess you won't ever need that.)
|
| |
iAN CooG
Registered: May 2002 Posts: 3132 |
or even $1f as probably is best for most tunes, happened also that some tunes lacked a proper init (yes there are) and setting $0f would make the tune play with one voice muted =) |
| |
j0x
Registered: Mar 2004 Posts: 215 |
ian: Am I somehow misunderstanding your post? To me, $0f should be the correct value. Adding $10 just enables the low-pass filter. Are you mixing up bits 3 and 7 here? |
| |
Frantic
Registered: Mar 2003 Posts: 1627 |
j0x: I thought just the same.. I think Ian got something wrong here.. |
| |
iAN CooG
Registered: May 2002 Posts: 3132 |
jox: no, many tunes with muted voices were fixed by setting $1f instead of $0f. I've done quite a bunch of them in the lastest HVSC updates.
one of the many examples
# from iAN CooG: Restored $d418 setting, bassline now it's audible.
/update/fix/MUSICIANS/C/Coolrock/Commercial_Music_3.sid
/MUSICIANS/C/Coolrock/
if you remove the sta $d418 like it was before, sidplay defaults to lda #$0f sta $d418 before jmping to the init. and the bassline is not audible anymore. there were plenty, just check the hvsc updates =) |
... 40 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 | 4 | 5 - Next |