Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > resetting the SID
2011-07-02 23:32
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?
 
... 40 posts hidden. Click here to view all posts....
 
2011-07-03 20:46
iAN CooG

Registered: May 2002
Posts: 3138
another example
/MUSICIANS/S/Simon_Laszlo/So_Hard.sid
change the lda #$1f sta $d418 to $0f like it was before and hear.
2011-07-03 20:49
Frantic

Registered: Mar 2003
Posts: 1630
Probably enabling the filter for some voice(s) but not selecting any filter type results in silence then.. I guess. Never tried that I think. At least not that I can remember. ...but then this it is not necessarily correct to select low pass filter. It could just as well have been some other type of filter in the original tune, even though low pass filter is probably most common.
2011-07-03 21:02
iAN CooG

Registered: May 2002
Posts: 3138
search for a9 1f 8d 18 d4: 10489 sid files found
search for a9 0f 8d 18 d4: 3987 sid files found
not so uncommon, and i don't want to search for DMC tunes that set d418 in an indirect way =)
2011-07-03 23:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
ldx #$1d
lda #0
.sta $d400,x
dex
bpl .
rts
2011-07-04 06:45
j0x

Registered: Mar 2004
Posts: 215
Quote:

Probably enabling the filter for some voice(s) but not selecting any filter type results in silence then.. I guess.

Sounds like Frantic is probably on the right track. If this is true, is it only true for SID emulation?

Sorry for side-tracking the thread slightly, btw... :(
2011-07-04 07:36
Frantic

Registered: Mar 2003
Posts: 1630
Sidwave: Sorry if I am rude now, but I have to say that that was quite a crappy answer to his question. To begin with, $d41d is not a valid SID register at all, and there is no need to write anything to the registers $d419-$d41c which are purely output registers. ...and the whole thread began on the assumption that something more than just writing zeroes to the SID would be relevant.

j0x: I think it may very well be true on the real hardware too, but I don't have it right here where I am at the moment, so I can't tell for sure.
2011-07-05 20:53
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
ok Frantic,

i didnt make a sidplayer yet, but what i think will work is:

clear d418, and do a hard restart with no sound, then set filter type.

now the sid will have a filter type when the first note is played, and the ADSR will be reset.

i have a sound like that in SDI:

waveform:

09 00
.01 00
ff .

it resets the sid (as of what i know),
and my filters begin at the correct spot.

this any help ?
2011-07-05 20:59
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
this positively works 100% (on 6581 R4 AR anyway), its from a tune i made, i used it many times:

ADSR: 0002
HARD RESTART
FILTER type: 1F (lowpass, max resonance)

WAVEFORM:
01 .
FF .


just a 1.


work every time.
2011-07-05 21:04
Soren

Registered: Dec 2001
Posts: 547
SIDwave: what if you don't want to start the tune with hard restart? ;-)
2011-07-05 21:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
/MUSICIANS/H/Harries_Jan/Equations.sid

Jeff, its just a sid reset that works, that what he asked.
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
MCM/ONSLAUGHT
Guests online: 77
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Aliens in Wonderland  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.244 sec.