Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Harvey ! (Registered 2024-11-25) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > How do I reliably detect 6581/8580 sid?
2006-08-22 14:18
tlr

Registered: Sep 2003
Posts: 1787
How do I reliably detect 6581/8580 sid?

There was an article in C=Hacking, but that does not work very well in VICE for example.
Maybe VICE's emulation is borked though.

I remember seeing a detailed analysis of the waveforms somewhere, but I can't seem to find it now.
 
... 47 posts hidden. Click here to view all posts....
 
2006-08-23 21:24
Necronomfive
Account closed

Registered: Dec 2004
Posts: 20
Quote: Quote:

There is no audible difference between 6582 and 8580. Both Chips share the same design, have the same filter characteristics, the same sample "fix", and seem to have come out around the same time (1986). Why they actually labelled the same design under 2 different names is really beyond me, since labelling it 6582 bears the danger to confuse it with the 6581 and put it into the same socket....


but then I have 6582 datasheet and monolytic capacitors on pins 1-2 and 3-4 are other than for 6581 and 8580 , thus it should make differnece on filter... any ideas?


doublepost
2006-08-24 06:21
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: It has always been a BIG difference what Commodore wrote in their Datasheets, and what was actually done in the real machines. ;) Like claiming that combining waveforms will result in a logical ANDing, which is absolutely not true.

Of course, it makes a difference if you apply different filter capacitors to the 6582 as it would make a difference if you would apply them to the 8580. What counts is how it sounds under the same conditions, and both 6582 and 8580 sound identical.


How are the waveforms combined then?
2006-08-24 07:00
Raf

Registered: Nov 2003
Posts: 343
besides this all (sorry for OT) I exchanged 6581 with 8580 and they actually worked w/o any troubles (filter was messes ofcourse) , analogue part's voltage isn't that critical anyway , I guess it would work properly in range 8-15v for both chips (at expense of diffferent heating conditions probably) just like in many amplifiers (yeah.. filter is also amplifier... but selective only - for those who haven't heard about them in electronical contex)
2006-08-24 10:48
Necronomfive
Account closed

Registered: Dec 2004
Posts: 20
Quote: How are the waveforms combined then?

We don´t know yet. It´s quite confusing, especially if you quote Bob Yannes:

"Since all of the waveforms were just digital bits, the Waveform Selector consisted of multiplexers that selected which waveform bits would be sent to the Waveform D/A. The multiplexers were single transistors and did not provide a "lock-out", allowing combinations of the waveforms to be selected. The combination was actually a logical ANDing of the bits of each waveform, which produced unpredictable results, so I didn't encourage this, especially since it could lock up the pseudo-random sequence generator by filling it with zeroes."

If it would only be a logical ANDing, the results would actually be predictable. But Bob seemed to knew that something different was still going on, so he added this confusing "which produced unpredictable results".
2006-08-24 10:57
yago

Registered: May 2002
Posts: 333
I am using another Method, I check how long Values in the read-only register stay intact.
That way i can detect 6581/8580/fastSID/reSID.
Have to do more tests on real things, however.
2006-08-24 11:58
tlr

Registered: Sep 2003
Posts: 1787
Quote: We don´t know yet. It´s quite confusing, especially if you quote Bob Yannes:

"Since all of the waveforms were just digital bits, the Waveform Selector consisted of multiplexers that selected which waveform bits would be sent to the Waveform D/A. The multiplexers were single transistors and did not provide a "lock-out", allowing combinations of the waveforms to be selected. The combination was actually a logical ANDing of the bits of each waveform, which produced unpredictable results, so I didn't encourage this, especially since it could lock up the pseudo-random sequence generator by filling it with zeroes."

If it would only be a logical ANDing, the results would actually be predictable. But Bob seemed to knew that something different was still going on, so he added this confusing "which produced unpredictable results".


It's mostly unbuffered NMOS, so when more than one multiplexer is enabled, one wave-shaper could affect the logic inside another. Isn't this the way the noise LFSR gets zeroed? The multiplexer directly loads the shift register bits?

I suspect that the mux he describes is a transistor connected as a single-ended transmission gate.

Note that these are speculations based on what is in the patents of different Commodore NMOS devices.


2010-10-01 13:06
MC
Account closed

Registered: Jul 2009
Posts: 71
Both mentioned methods, C=Hacking 20 and Mathematica of detecting which SID is being used/emulated fail on Winvice in FASTSID mode and an 8580 is detected all of the time... (with RESID both methods work 100% perfect).

Is there any way to tell which SID is being emulated when people use FASTSID emulation on their slow-assed pc?
2010-10-01 13:46
Raf

Registered: Nov 2003
Posts: 343
FastSId isn't too precise, so does it really matter if it is detected 8580 or 6581 under fastsid? btw nowadays even lower end atoms can run reSID at maxed oversampling + resampled interpolation, so why bother? FASTSID is useful for < 500Mhz machines. ("max quality" newest resid takes up to 10% of one core at my phenom x2 550 @3.4Ghz...)
2010-10-01 14:37
Frantic

Registered: Mar 2003
Posts: 1647
@MC: Dunno about that, but perhaps there is some way of detecting VICE at least, which may perhaps help at least a little... And in the end, you could always also allow people to select the SID model they have manually.

Overall, I don't think one should conform too much to shortcomings of emulators. That is just likely to mess things up in the end (especially the day when emulation changes). Also, I think it is fair to expect that people who want to use your music editor in VICE will actually have resid-fp enabled, since it is more accurate.

Personally I prefer this detection method:
http://codebase64.org/doku.php?id=base:detecting_sid_type_-_saf..

The Mathematica/Reflex detection routine has been reported not to be 100% reliable, although I have not experienced problem with it myself.
2010-10-01 15:56
iAN CooG

Registered: May 2002
Posts: 3187
; Detect fastSID/reSID/reSID-fp/Hoxs/CCS. Real C64 untested.
; Just measure how much $d418 takes to decay from $1f to $00
; Experiment by iAN CooG, noticed first time in Excalibur intro exc-01
    *=$0801
    word eop
    word 7102
    byte $9e,"2059"
eop byte 0

    lda #0
    sta $0400
    sta $0401
    sta $0402
    ;SEI probably not needed
    lda #$1f
    sta $d418
loop
    inc $0400
    bne nohi
    inc $0401
    bne nohi
    inc $0402
nohi
    lda $d418
    bne loop

    ;values   | Engine
    ;---------+--------
    ;xx xx 01 | hoxs
    ;xx 07 00 | residfp
    ;xx 03 00 | resid
    ;xx 01 00 | ccs
    ;xx 00 00 | fastsid

    lda $0402
    beq vice
    cmp #$01
    beq hoxs
    bne realc64
vice
    lda $0401
    beq fastsid
    cmp #$04
    bcs residfp
    cmp #$03
    bcs resid
ccs
    lda #"S"
    byte $2c
resid
    lda #"R"
    byte $2c
residfp
    lda #"P"
    byte $2c
fastsid
    lda #"F"
    byte $2c
hoxs
    lda #"H"
    byte $2c
realc64
    lda #"C"
    jmp $ffd2

Previous - 1 | 2 | 3 | 4 | 5 | 6 - 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
Andy/AEG
sailor/Triad
Slaxx/Q/HF/MYD!
Mason/Unicess
JackAsser/Booze Design
Jetboy/Elysium
Six/G★P
psych
EALL/HT
Freeze/Blazon
megasoftargentina
Guests online: 96
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Comaland 100%  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

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