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.
 
... 50 posts hidden. Click here to view all posts....
 
2010-10-02 13:33
assiduous
Account closed

Registered: Jun 2007
Posts: 343
using d418 fade out time to detect the sid model is abit risky. this thing has a very analogue nature so it depends on temperature and varies in a wide range. you will likely get different results on different chips and even on 1 chip when you test it cold and warmed up. some sids take so much time to drop bits from the write only registers that they fail the emufuxxor test.

i`ve run the program on an 8580,the first test shortly after the bootup printed C but 20 minutes later it changed its mind for good: screen shot

Sounddemon`s method can be trusted the most.
2010-10-02 14:50
MC
Account closed

Registered: Jul 2009
Posts: 71
Things come down to ranges of values of the low byte. In the current emulators I'm getting proper results, in CCS2 its hard to distinguish 8580 from 6581 emulation (but that's old crap anyway).

I'll up a testproggie and edit this post shortly.

Edit: http://tanx0r.org/mc/iantestprog.prg

Plz run that and tell me if the results are correct. TIA.

2010-10-02 15:39
MC
Account closed

Registered: Jul 2009
Posts: 71
Now that I come to think about it, I already have conclusive results when combining the results from D418 and D41B tests.

I know which SID emulation is running and I detected the SID model being emulated in all situations but vice/fastsid.

Knowing the situation in which a song was created will allow people to compensate. Also, an editor can have seperate settings for different SID models and even emulations. Knowledge == power.
2010-10-02 20:19
Frantic

Registered: Mar 2003
Posts: 1647
But... :)

Even within the category of "6581" sids there is a considerable variance in the filter characteristics, and I guess the same also the case when using resid-fp for example, depending on which 6581 variant (or 8580 variant) you choose and so forth? :)

Personally I eventually gave up on the filter issue around one or two years ago, hehe.. :) (Well, I do some minor adjustment depending on whether it is 8580 or 6581, but more than that... nah..)

Anyway, it is interesting to see what you come up with, so I am not trying to discourage anyone or so. Just providing my own take on the matter.

//FTC
2010-10-02 21:16
MC
Account closed

Registered: Jul 2009
Posts: 71
Well if we're gonna detect a SID let's just do the best possible job while at it... Afterall the question isn't a simple "why" but rather "why not"...
2010-10-03 20:11
MC
Account closed

Registered: Jul 2009
Posts: 71
Okay. More testing has been done and I added JAC64 to the list of recognized emulators. iAN is correct in stating you can't judge whether you're dealing with 6581 or 8580 emulation from the D418 timing test.

I have created wider margins on the recognized ranges as well so it should really always correctly detect SID + emulation now through combined D418 timing and D41B testing for high bit.

Note: EMU64 doesn't give any reliable results and is recognized as VICE/NOSOUND.

Here's the table:
;			     min max med  hi sidcode
recogtab:		dc.b $00,$00,$CC,$01,0		; HOXS, 8580
			dc.b $A0,$F0,$07,$00,1		; VICE, RESIDFP
			dc.b $B0,$E0,$03,$00,2		; VICE, RESID
			dc.b $70,$B0,$03,$00,3		; CCS3.X
			dc.b $01,$28,$01,$00,4		; CCS2.X
			dc.b $20,$FF,$00,$00,5		; Real C64
			dc.b $02,$0F,$00,$00,6		; VICE, FASTSID
			dc.b $00,$01,$00,$00,7		; VICE, NOSOUND
			dc.b $00,$00,$00,$02,8		; FRODO
			dc.b $C8,$E8,$01,$00,9		; JAC64


Testproggie: http://tanx0r.org/mc/iantestprog2.prg

2012-05-27 17:15
Jak T Rip

Registered: Feb 2002
Posts: 39
Hi guys,

I tested the latest test program with my real C64 and
- the SID and VIC type are reliably detected (8580 PAL 50Hz)
- emu type is detected as
1) Unknown when I have no additional HW on (or with SCPU in 1Mhz mode)
2) Frodo in case I have a SuperCPU running in 20Mhz

The displayed values for normal unenhanced C64II are
xx:98:00

The first value is completely unreliable. I get values between 1x and fx.
The second value is very stable. I get values around 98, sometimes 99 or 9a, but never far off.
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
Frostbyte/Artline De..
sailor/Triad
Nordischsound/Hokuto..
Andy/AEG
Alakran_64
REBEL 1/HF
CA$H/TRiAD
Guests online: 110
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 Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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