better simulation of original JiffyDOS ROM behaviour

This commit is contained in:
FeralChild64 committed 2019-11-29 20:52:28 +01:00
1 parent a11e50a3cf
commit 25576a7051
4 files changed
+15 -3

No files matched your search

+4 -1
View File
@@ -59,7 +59,10 @@ iec_tx_common_sendbit:
bne !+ // branch if not sending the last bit
lda IECPROTO
bpl !+ // branch if protocol is known
beq !+ // branch if standard protocol
// JiffyDOS ROM performs detection loop on every command; it seems we have to
// replicate this behaviour for compatibility with at least 1541 JiffyDOS ROM
jsr jiffydos_detect
!:
+1 -1
View File
@@ -20,7 +20,7 @@ UNLSN:
#if CONFIG_IEC_JIFFYDOS
lda #$00 // switch back to standard protocol
lda #$FF // XXX
sta IECPROTO
#endif
+1 -1
View File
@@ -20,7 +20,7 @@ UNTLK:
#if CONFIG_IEC_JIFFYDOS
lda #$00 // switch back to standard protocol
lda #$FF // XXX
sta IECPROTO
#endif
+9
View File
@@ -8,6 +8,9 @@
// - https://github.com/rkrajnc/sd2iec/blob/master/src/iec.c
// The 'iec.s' suggests, that the drive should respond by pulling data
// The original JiffyyDOS ROM seems to perform detection with every command
// (even though for many of them it always fails) and we have to replicate
// this behaviour for compatibility with at least 1541 JiffyDOS ROM
#if CONFIG_IEC_JIFFYDOS
@@ -24,6 +27,9 @@ jiffydos_detect_loop:
dey // 2 cycles
bne jiffydos_detect_loop // 3 cycles if branch
lda IECPROTO
bpl jiffydos_detect_end // no detection requested, preserve existing protocol
lda #$00 // normal protocol
beq jiffydos_store_proto // branch always
@@ -36,6 +42,9 @@ jiffydos_detected:
jiffydos_store_proto:
sta IECPROTO
// FALLTROUGH
jiffydos_detect_end:
rts