| |
ThunderBlade
Registered: Jan 2002 Posts: 78 |
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?
|
|
... 44 posts hidden. Click here to view all posts.... |
| |
Flavioweb
Registered: Nov 2011 Posts: 466 |
But... what does "proper" really mean?
Reset Sid as it is on machine power up, or what?
I guess after power up all internal regs are set to $FF except $D418 that kernal put at $00 during startup... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11510 |
by "properly" i was referring to clean "by the book" code that only writes exactly the values needed only to the registers that require it. |
| |
Flavioweb
Registered: Nov 2011 Posts: 466 |
Quote: by "properly" i was referring to clean "by the book" code that only writes exactly the values needed only to the registers that require it.
Ok.
But musicians out there start composing from an "after power up" state and not from a "by the book" Sid setup.
Some examples have been given, including "Cybernoid", so i guess the goal is "how to make play already made tunes same way, everywhere".
Maybe a "by the book" setup make "power up setup" tunes sound different.
Anyway, if is it, this mean that some tunes out there have no proper self Sid Setup code. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11510 |
You lost it - both would reset the SID the same way, just the code to do it would be different. |
| |
TheRyk
Registered: Mar 2009 Posts: 2468 |
Quoting Flaviowebsome tunes out there have no proper self Sid Setup code.
varies a lot of course.
As you can already seen by nowadays
LDA #$SUBTUNE No.
JSR $INIT
being perfectly fine for Goattracker, whereas
TAX
TAY
before the JSR $INIT makes it more universal as older players expect X and/or Y regs set.
Slightly offtopic of course, so what has this to do with anything? Well, it's an example why not to rely on .SID-file immanent Init routine doing the I/O init job for you, especially if tunes are done with older or exotic trackers. |
| |
iAN CooG
Registered: May 2002 Posts: 3236 |
TheRyk: that is the tune init, to init its internal counters, especially to restart playing it from pattern 0, and doesn't have anything to do with SID chip regs init. Also not all inits require A, X or Y, some just require some value stored in some address, it only depends on the tracker used.
Then, the tune init isn't even guaranteed to set all SID chip regs correctly and could rely on a SID chip just as it is at power up. There are TOO MANY sid files and each is made in its own special way =)
The typical problem is on cracks, or multipart demos made with different single parts linked together. After an intro played some music, then the next part sounds weird/wrong/not at all.
Reiniting manually the sid registers before starting the next tune is the only way. |
| |
ThunderBlade
Registered: Jan 2002 Posts: 78 |
Quote: by "properly" i was referring to clean "by the book" code that only writes exactly the values needed only to the registers that require it.
Do we have this code? If so I suggest we put it on Codebase? |
| |
Jammer
Registered: Nov 2002 Posts: 1343 |
Putting certain values above $81 to waveform register, e.g. $91, followed by testbit in the subsequent frame resets noise random seed - that's a little neat thing used by GRG, me and surely other musicians as well. It might come handy in CSDb music compo to be launched very soonish ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11510 |
Quote:Do we have this code? If so I suggest we put it on Codebase?
For those rare cases when it is really super important to reset the SID completely in all aspects, i suggest something like #22 - plus explicit noise LFSR reset (which you can steal from some VICE test program, or the SID detection in some recent censor demo :)) |
| |
algorithm
Registered: May 2002 Posts: 707 |
When writing to the waveform register after the c64 is turned on initially (e.g $71,$21,$11,$41) - The output with frequency set to zero is $00,$55,$aa,$ff. Some demos which utilise d404 for digi playback (censor stuff) as well as just 2bit d404 digi's will need specific values. (Setting testbit to initialise sid will clear these all) and may be an issue for some stuff that does not initialise and seek/stop to get the waveforms back to the correct phase |
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |