IEC code cleanup, saved few bytes

This commit is contained in:
FeralChild64 committed 2019-12-27 18:05:43 +01:00
1 parent b5f9b6593b
commit 55f5041aa6
13 files changed
+64 -173

No files matched your search

+4 -4
View File
@@ -32,13 +32,13 @@ ciout_store_in_buffer:
ciout_send_byte:
clc // don't send with EOI
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
clc // send without EOI
#if CONFIG_IEC_JIFFYDOS
jsr iec_tx_dispatch
#else // no turbo supported
#else
jsr iec_tx_byte
#endif
inc C3PO // iec_tx_byte sets it to 0, but we still have something to send
inc C3PO // tx byte routine sets to 0, but we still have something to send
jmp ciout_store_in_buffer
#else
+13
View File
@@ -8,6 +8,19 @@
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS
iec_rx_dispatch:
lda IECPROTO
cmp #$01
beq_far jiffydos_rx_byte
// FALLTROUGH
#endif // CONFIG_IEC_JIFFYDOS
iec_rx_byte:
// Store .X and .Y on the stack - preserve them
+2 -2
View File
@@ -30,9 +30,9 @@ iec_send_file_name_loop:
!:
// Transmit one character
sta TBTCNT
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
jsr iec_tx_dispatch
#else // no turbo supported
#else
jsr iec_tx_byte
#endif
jmp iec_send_file_name_loop
+20
View File
@@ -9,6 +9,26 @@
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS
iec_tx_dispatch:
php // preserve C flag for EOI indication
lda IECPROTO
cmp #$01
bne !+
plp
jmp jiffydos_tx_byte
!:
plp
// FALLTROUGH
#endif // CONFIG_IEC_JIFFYDOS
iec_tx_byte:
// Store .X and .Y on the stack - preserve them
+2 -2
View File
@@ -103,12 +103,12 @@ load_iec:
#if CONFIG_IEC_JIFFYDOS
cmp #$01
beq_far load_jiffydos // branch if JiffyDOS
beq_far jiffydos_load // branch if JiffyDOS
#endif
#if CONFIG_IEC_DOLPHINDOS
cmp #$02
beq_far load_dolphindos // branch if DolphinDOS
beq_far dolphindos_load // branch if DolphinDOS
#endif
#endif