| |
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.... |
| |
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...) |
| |
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. |
| |
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
|
| |
Hein
Registered: Apr 2004 Posts: 945 |
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
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |