base:detecting_sid_type_-_safe_method
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
base:detecting_sid_type_-_safe_method [2015-06-12 20:59] – groepaz | base:detecting_sid_type_-_safe_method [2015-06-13 08:07] – moloch | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Detecting Sid Type - safe method ====== | ||
+ | |||
+ | This SID detection routine is based on the fact that there is a one cycle delay in the oscillator on 8580 compared to 6581 when turned on. | ||
+ | |||
+ | < | ||
+ | ;SID DETECTION ROUTINE | ||
+ | |||
+ | ;By SounDemon - Based on a tip from Dag Lem. | ||
+ | ;Put together by FTC after SounDemons instructions | ||
+ | ;...and tested by Rambones and Jeff. | ||
+ | |||
+ | ; - Don't run this routine on a badline | ||
+ | ; - Won't work in VICE (always detects 6581) unless resid-fp emulation is enabled | ||
+ | |||
+ | sei ;No disturbing interrupts | ||
+ | lda #$ff | ||
+ | cmp $d012 ; | ||
+ | bne *-3 | ||
+ | |||
+ | ;Detection itself starts here | ||
+ | lda #$ff ;Set frequency in voice 3 to $ffff | ||
+ | sta $d412 ; | ||
+ | sta $d40e | ||
+ | sta $d40f | ||
+ | lda # | ||
+ | sta $d412 | ||
+ | lda $d41b ;Accu now has different value depending on sid model (6581=3/ | ||
+ | lsr ; | ||
+ | bcc model_8580 | ||
+ | model_6581: | ||
+ | [...] | ||
+ | |||
+ | model_8580: | ||
+ | [...] | ||
+ | </ | ||
+ | |||
base/detecting_sid_type_-_safe_method.txt · Last modified: 2022-05-19 10:58 by ftc