initial DophinDOS byte TX, does not work yet

This commit is contained in:
FeralChild64 committed 2019-12-27 18:40:08 +01:00
1 parent 4bb6c06cac
commit 18b3f0e895
3 files changed
+46 -6

No files matched your search

+13
View File
@@ -17,8 +17,21 @@ iec_cmd_open: // similar to TKSA, but without turnaround
!:
ora #$F0
#if CONFIG_IEC_DOLPHINDOS
/* XXX does not work yet
sta TBTCNT
jsr iec_tx_command
bcs !+ // branch if error
jsr dolphindos_detect
jmp iec_tx_command_finalize
*/
#else
// FALLTROUGH
#endif
common_open_close_unlsn_second: // common part of several commands
sta TBTCNT
+27
View File
@@ -70,6 +70,29 @@ iec_tx_common:
jsr iec_pull_clk_release_data_oneshot
jsr iec_wait60us
#if CONFIG_IEC_DOLPHINDOS
// Check if DolphinDOS was detected
lda IECPROTO
cmp #$02
bne iec_tx_no_dolphindos
// For DolphinDOS just push the byte to parallel port (set it to output first)
lda #$FF
sta CIA2_DDRB
lda TBTCNT
sta CIA2_PRB
// Release CLK to indicate data is now valid (we should not hold DATA nevertheless)
jsr iec_release_clk_data
// Finish the flow
jmp iec_tx_common_finalize
iec_tx_no_dolphindos:
#endif // CONFIG_IEC_DOLPHINDOS
// Now, we can start transmission of 8 bits of data
ldx #7
@@ -115,6 +138,10 @@ iec_tx_common_bit_is_sent:
dex
bpl iec_tx_common_sendbit
// FALLTROUGH
iec_tx_common_finalize:
cli
// Give devices time to tell if they are busy by pulling DATA
+6 -6
View File
@@ -48,18 +48,18 @@ save_iec:
lda STAL+0
sta TBTCNT
clc
#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
lda STAL+1
sta TBTCNT
clc
#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
@@ -78,9 +78,9 @@ iec_save_loop:
// Send the byte
sta TBTCNT
clc
#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