DolphinDOS byte reception cleanup
This commit is contained in:
1 parent
44a951f09c
commit
7800c5efd5
6 files changed
+30
-15
No files matched your search
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define CONFIG_IEC
|
#define CONFIG_IEC
|
||||||
#define CONFIG_IEC_BLANK_SCREEN
|
#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_IEC_JIFFYDOS
|
||||||
|
|
||||||
#define CONFIG_TAPE_NORMAL
|
#define CONFIG_TAPE_NORMAL
|
||||||
|
|||||||
@@ -315,7 +315,7 @@
|
|||||||
#if CONFIG_IEC
|
#if CONFIG_IEC
|
||||||
.var iec_features_str = "IEC"
|
.var iec_features_str = "IEC"
|
||||||
#if CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_DOLPHINDOS
|
||||||
.eval iec_features_str = iec_features_str + " DOLPHIN-DEV"
|
.eval iec_features_str = iec_features_str + " DOLPHIN"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS
|
||||||
.eval iec_features_str = iec_features_str + " JIFFY"
|
.eval iec_features_str = iec_features_str + " JIFFY"
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ ACPTR:
|
|||||||
!:
|
!:
|
||||||
|
|
||||||
#if CONFIG_IEC
|
#if CONFIG_IEC
|
||||||
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_JIFFYDOS
|
||||||
jmp iec_rx_dispatch
|
jmp iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else
|
||||||
jmp iec_rx_byte
|
jmp iec_rx_byte
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -55,6 +55,22 @@ iec_rx_not_empty:
|
|||||||
|
|
||||||
iec_rx_not_eoi:
|
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.
|
// Latch input bits in on rising edge of CLK, eight times for eight bits.
|
||||||
ldx #7
|
ldx #7
|
||||||
|
|
||||||
@@ -118,6 +134,10 @@ iec_rx_clk_wait2:
|
|||||||
dex
|
dex
|
||||||
bpl iec_rx_bit_loop
|
bpl iec_rx_bit_loop
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
|
iec_rx_acknowledge:
|
||||||
|
|
||||||
// Then we must within 1000 usec acknowledge the frame by
|
// Then we must within 1000 usec acknowledge the frame by
|
||||||
// pulling DATA. At this point, CLK is pulled by the
|
// pulling DATA. At this point, CLK is pulled by the
|
||||||
// talker and DATA by us, i.e., we are ready to receive
|
// talker and DATA by us, i.e., we are ready to receive
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ load_iec:
|
|||||||
load_iec_loop:
|
load_iec_loop:
|
||||||
|
|
||||||
// We are now ready to receive bytes
|
// We are now ready to receive bytes
|
||||||
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_JIFFYDOS
|
||||||
jsr iec_rx_dispatch
|
jsr iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else
|
||||||
jsr iec_rx_byte
|
jsr iec_rx_byte
|
||||||
#endif
|
#endif
|
||||||
bcs load_iec_error
|
bcs load_iec_error
|
||||||
@@ -167,7 +167,7 @@ load_iec_loop_end:
|
|||||||
|
|
||||||
load_iec_get_addr_byte:
|
load_iec_get_addr_byte:
|
||||||
|
|
||||||
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_JIFFYDOS
|
||||||
jsr iec_rx_dispatch
|
jsr iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_rx_byte
|
jsr iec_rx_byte
|
||||||
|
|||||||
@@ -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:
|
iec_rx_dispatch:
|
||||||
@@ -16,12 +16,7 @@ iec_rx_dispatch:
|
|||||||
beq_far iec_rx_byte_jiffydos
|
beq_far iec_rx_byte_jiffydos
|
||||||
#endif // CONFIG_IEC_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
|
jmp iec_rx_byte
|
||||||
|
|
||||||
|
|
||||||
#endif // any turbo supported
|
#endif
|
||||||
Reference in new issue
Block a user