DolphinDOS byte reception cleanup

This commit is contained in:
FeralChild64 committed 2019-12-26 14:55:24 +01:00
1 parent 44a951f09c
commit 7800c5efd5
6 files changed
+30 -15

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@
#define CONFIG_IEC
#define CONFIG_IEC_BLANK_SCREEN
// #define CONFIG_IEC_DOLPHINDOS // please keep disabled for now
#define CONFIG_IEC_DOLPHINDOS // not finished yet
#define CONFIG_IEC_JIFFYDOS
#define CONFIG_TAPE_NORMAL
+1 -1
View File
@@ -315,7 +315,7 @@
#if CONFIG_IEC
.var iec_features_str = "IEC"
#if CONFIG_IEC_DOLPHINDOS
.eval iec_features_str = iec_features_str + " DOLPHIN-DEV"
.eval iec_features_str = iec_features_str + " DOLPHIN"
#endif
#if CONFIG_IEC_JIFFYDOS
.eval iec_features_str = iec_features_str + " JIFFY"
+2 -2
View File
@@ -20,9 +20,9 @@ ACPTR:
!:
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
jmp iec_rx_dispatch
#else // no turbo supported
#else
jmp iec_rx_byte
#endif
#else
+20
View File
@@ -55,6 +55,22 @@ iec_rx_not_empty:
iec_rx_not_eoi:
#if CONFIG_IEC_DOLPHINDOS
// Check if DolphinDOS was detected
lda IECPROTO
cmp #$02
bne iec_rx_no_dolphindos
// For DolphinDOS just fetch the byte from parallel port
lda CIA2_PRB
pha
jmp iec_rx_acknowledge
iec_rx_no_dolphindos:
#endif // CONFIG_IEC_DOLPHINDOS
// Latch input bits in on rising edge of CLK, eight times for eight bits.
ldx #7
@@ -118,6 +134,10 @@ iec_rx_clk_wait2:
dex
bpl iec_rx_bit_loop
// FALLTROUGH
iec_rx_acknowledge:
// Then we must within 1000 usec acknowledge the frame by
// pulling DATA. At this point, CLK is pulled by the
// talker and DATA by us, i.e., we are ready to receive
+3 -3
View File
@@ -111,9 +111,9 @@ load_iec:
load_iec_loop:
// We are now ready to receive bytes
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
jsr iec_rx_dispatch
#else // no turbo supported
#else
jsr iec_rx_byte
#endif
bcs load_iec_error
@@ -167,7 +167,7 @@ load_iec_loop_end:
load_iec_get_addr_byte:
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
+3 -8
View File
@@ -1,10 +1,10 @@
//
// Arbitration code for normal/turbo transfer
// Arbitration code for normal/JiffyDOS transfer
//
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
iec_rx_dispatch:
@@ -16,12 +16,7 @@ iec_rx_dispatch:
beq_far iec_rx_byte_jiffydos
#endif // CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_DOLPHINDOS
cmp #$02
beq_far iec_rx_byte_dolphindos
#endif // CONFIG_IEC_DOLPHINDOS
jmp iec_rx_byte
#endif // any turbo supported
#endif