; 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
; 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