cleanup in multiprotocol IEC support
This commit is contained in:
1 parent
274a3c070a
commit
379eb746fe
10 files changed
+33
-18
No files matched your search
@@ -17,7 +17,7 @@
|
||||
iec_rx_dispatch:
|
||||
|
||||
lda IECPROTO
|
||||
cmp #$01
|
||||
cmp #IEC_JIFFY
|
||||
beq_16 jiffydos_rx_byte
|
||||
|
||||
// FALLTROUGH
|
||||
@@ -54,7 +54,7 @@ iec_rx_byte:
|
||||
|
||||
// Check if DolphinDOS was detected
|
||||
lda IECPROTO
|
||||
cmp #$02
|
||||
cmp #IEC_DOLPHIN
|
||||
bne iec_rx_no_dolphindos
|
||||
|
||||
// For DolphinDOS just fetch the byte from parallel port
|
||||
|
||||
@@ -19,7 +19,7 @@ iec_tx_dispatch:
|
||||
|
||||
php // preserve C flag for EOI indication
|
||||
lda IECPROTO
|
||||
cmp #$01
|
||||
cmp #IEC_JIFFY
|
||||
bne !+
|
||||
|
||||
plp
|
||||
@@ -71,7 +71,7 @@ iec_tx_common:
|
||||
|
||||
// Check if DolphinDOS was detected
|
||||
lda IECPROTO
|
||||
cmp #$02
|
||||
cmp #IEC_DOLPHIN
|
||||
bne iec_tx_no_dolphindos
|
||||
|
||||
// For DolphinDOS just push the byte to parallel port (set it to output first)
|
||||
|
||||
@@ -107,12 +107,12 @@ load_iec:
|
||||
lda IECPROTO
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS
|
||||
cmp #$01
|
||||
cmp #IEC_JIFFY
|
||||
beq_16 jiffydos_load // branch if JiffyDOS
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS
|
||||
cmp #$02
|
||||
cmp #IEC_DOLPHIN
|
||||
beq_16 dolphindos_load // branch if DolphinDOS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ dolphindos_detect_success:
|
||||
|
||||
// Protocol detected
|
||||
|
||||
lda #$02
|
||||
lda #IEC_DOLPHIN
|
||||
sta IECPROTO
|
||||
|
||||
rts
|
||||
|
||||
@@ -76,7 +76,7 @@ dolphindos_load_loop:
|
||||
jsr iec_update_EAL_by_Y
|
||||
|
||||
// Restore proper IECPROTO value
|
||||
lda #$02
|
||||
lda #IEC_DOLPHIN
|
||||
sta IECPROTO
|
||||
|
||||
// End of load loop
|
||||
|
||||
@@ -33,12 +33,12 @@ jiffydos_detect_loop:
|
||||
lda IECPROTO
|
||||
bpl jiffydos_detect_end // no detection requested, preserve existing protocol
|
||||
|
||||
lda #$00 // normal protocol
|
||||
lda #IEC_NORMAL // normal protocol
|
||||
beq jiffydos_store_proto // branch always
|
||||
|
||||
jiffydos_detected:
|
||||
jsr iec_wait_for_data_release // guessed from VICE logs
|
||||
lda #$01 // JiffyDOS protocol
|
||||
lda #IEC_JIFFY // JiffyDOS protocol
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ jiffydos_load_end:
|
||||
sta C3PO
|
||||
|
||||
// Restore proper IECPROTO value
|
||||
lda #$01
|
||||
lda #IEC_JIFFY
|
||||
sta IECPROTO
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
@@ -102,7 +102,7 @@ jiffydos_rx_byte_end:
|
||||
sta C3PO
|
||||
|
||||
// Restore proper IECPROTO value
|
||||
lda #$01
|
||||
lda #IEC_JIFFY
|
||||
sta IECPROTO
|
||||
|
||||
// Re-enable sprites
|
||||
|
||||
@@ -83,7 +83,7 @@ jiffydos_tx_byte_finalize:
|
||||
sta CIA2_PRA
|
||||
|
||||
// Restore proper IECPROTO value
|
||||
lda #$01
|
||||
lda #IEC_JIFFY
|
||||
sta IECPROTO
|
||||
|
||||
// Re-enable sprites and interrupts
|
||||
|
||||
Reference in new issue
Block a user