| |
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.... |
| |
Hein
Registered: Apr 2004 Posts: 946 |
What's the idea behind that? Reading a write-only register seems odd. (If it works, it works, though) |
| |
MC Account closed
Registered: Jul 2009 Posts: 71 |
It does actually work so far (on VICE). Good stuff there from iAN CooG. Muchos gracias.
|
| |
iAN CooG
Registered: May 2002 Posts: 3187 |
of course must be tested against a real c64 before saying it's correct, it could be even that hoxs has already the correct behaviour =)
All I know is that years ago I noticed that Excalibur intro exc-01 was polling $d418 to know when the intro was about to close, because after pressing space the volume fadeout routine set volume to 0. Strangely the intro immediately exited by itself both in CCS 2.0 and Vice with fastsid, and only worked in vice+resid. |
| |
MC Account closed
Registered: Jul 2009 Posts: 71 |
In CCS V3.8 the code finds resid (03) instead of CCS. Does CCS 3.8 actually utilize resid? I can't find the info on the ccs site.
|
| |
iAN CooG
Registered: May 2002 Posts: 3187 |
it doesn't use resid, ccs3 must be just "more accurate" than ccs2.0, which is the one i tested, and produces a similar result to vice resid. maybe by comparing results of location $0400/$0401 there is a chance to separate resid from ccs3, feel free to enhance the detection code :P |
| |
Frantic
Registered: Mar 2003 Posts: 1647 |
Hmm.. funny. I will have a look on this some day.
As far as I remeber you can actually read sid registers in the sense that the value that was last written to the sid can be read back least within a certain time span. So.. While the sid registers aren't generally "readable", they can be sometimes, so to speak.. |
| |
MC Account closed
Registered: Jul 2009 Posts: 71 |
; Emulation SID recognition table (responses from iAN CooG's test routine)
;
; C4:03:00 VICE + RESID 6581
; BC/CF:03:00 VICE + RESID 8580
; 05:00:00 VICE + FASTSID (gets unreliable SID type from ANY testing)
; D7:07:00 VICE + RESIDFP 6581
; DF/CA:07:00 VICE + RESIDFP 8580
;
; XX:CC:01 HOXS (Emulates an 8580 always)
;
; 98:03:00 CCS3.X 6581
; A0/8A:03:00 CCS3.x 8580
; 1F:01:00 CCS2.x 6581
; 0F/14:01:00 CCS2.x 8580
;
; 7D-8F:00:00 Real C64 6581
; ??? Real C64 8580
TESTED WITH INTERRUPTS DISABLED (so enable that sei)
Can someone with a real 8580 get me a result please?
iAN (or anyone who feels like it) could you confirm these tests please, I ran it several times on every emulator with every setting and the results SEEM to be conclusive.
Cheers, Marco
|
| |
Frantic
Registered: Mar 2003 Posts: 1647 |
@MC: While it is nice to know how to check for various things, I get curious about what you will use this for? Will you make custom filter tables to make the tunes sound as similar as possible on different SID models and SID-emulation engines, or what? |
| |
MC Account closed
Registered: Jul 2009 Posts: 71 |
Exactly. |
| |
iAN CooG
Registered: May 2002 Posts: 3187 |
ok, here's a new version =)
; Detect fastSID/reSID/reSID-fp/Hoxs/CCS/Frodo
; Just measure how much $d418 takes to decay from $1f to $00
; Experiment by iAN CooG, noticed first time in Excalibur intro exc-01
; Thanks to MC/Dutch USA-Team for checking CCS3 and real C64 timings
; Note: can't detect emulated sidmodel 6581/8580, values overlap.
; values | Engine
; ---------+--------
; xx xx 01 | hoxs (1cc00-)
; xx 07 00 | residfp (7ca-7df)
; bx 03 00 | resid (3bc-3cf)
; 8x 03 00 | ccs3 (38a-3a0)
; xx 01 00 | ccs2 (10f-11f)
; 7x 00 00 | real c64 (07d-08f)
; 0x 00 00 | fastsid (003-005)
; 01 00 00 | vice nosound (001)
; ff ff ff | frodo (never decays)
_id_hoxs = 0
_id_residfp = 1
_id_resid = 2
_id_ccs3 = 3
_id_ccs2 = 4
_id_realc64 = 5
_id_fastsid = 6
_id_nosound = 7
_id_frodo = 8
*=$0801
word eop
word 7102
byte $9e,"2059"
eop byte 0
lda #0
sta $0400
sta $0401
sta $0402
sei
lda #$1f
sta $d418
loop
inc $0400
bne nohi
inc $0401
bne nohi
inc $0402
lda $0402
cmp #$02
beq check ; or directly: beq frodo
nohi
lda $d418
bne loop
check
lda $0402
beq vice
cmp #$02
beq frodo
bne hoxs
vice
lda $0401
bne chkrs
lda $0400
cmp #$70
bcs realc64
cmp #$03
bcs fastsid
bcc nosound
chkrs
cmp #$04
bcs residfp
cmp #$03
bcc ccs2
rscc3
lda $0400
cmp #$b0
bcs resid
ccs3
ldx #_id_ccs3
byte $2c
ccs2
ldx #_id_ccs2
byte $2c
resid
ldx #_id_resid
byte $2c
residfp
ldx #_id_residfp
byte $2c
fastsid
ldx #_id_fastsid
byte $2c
nosound
ldx #_id_nosound
byte $2c
hoxs
ldx #_id_hoxs
byte $2c
frodo
ldx #_id_frodo
byte $2c
realc64
ldx #_id_realc64
lda offtablel,x
ldy #>stringtable
;cli ($ffd2 already clears int flag)
jmp $ab1e
stringtable
shoxs byte "HOXS64" ,0
sresidfp byte "RESID-FP",0
sresid byte "RESID" ,0
sccs3 byte "CCS 3" ,0
sccs2 byte "CCS 2" ,0
srealc64 byte "REAL C64",0
sfastsid byte "FASTSID" ,0
snosound byte "NO SOUND",0
sfrodo byte "FRODO" ,0
offtablel
byte <shoxs
byte <sresidfp
byte <sresid
byte <sccs3
byte <sccs2
byte <srealc64
byte <sfastsid
byte <snosound
byte <sfrodo
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |