fixed byte sending (TX) via DolphinDOS
This commit is contained in:
1 parent
733f9aba1d
commit
4735677eb9
14 files changed
+27
-21
No files matched your search
@@ -18,14 +18,14 @@ 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
|
||||
|
||||
@@ -129,7 +129,7 @@ iec_rx_clk_wait2:
|
||||
|
||||
iec_rx_acknowledge:
|
||||
|
||||
// Then we must within 1000 usec acknowledge the frame by
|
||||
// Then we must within 1000 usec acknowledge the byte by
|
||||
// pulling DATA. At this point, CLK is pulled by the
|
||||
// talker and DATA by us, i.e., we are ready to receive
|
||||
// the next byte. (p11).
|
||||
|
||||
@@ -64,12 +64,6 @@ iec_tx_common:
|
||||
jsr iec_wait_for_data_pull
|
||||
jsr iec_wait_for_data_release
|
||||
!:
|
||||
// Pull CLK back to indicate that DATA is not valid, keep it for 60us
|
||||
// We can use this routine as we don't hold DATA anyway (and its state doesn't even matter)
|
||||
|
||||
jsr iec_pull_clk_release_data_oneshot
|
||||
jsr iec_wait60us
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS
|
||||
|
||||
// Check if DolphinDOS was detected
|
||||
@@ -83,8 +77,8 @@ iec_tx_common:
|
||||
lda TBTCNT
|
||||
sta CIA2_PRB
|
||||
|
||||
// Release CLK to indicate data is now valid (we should not hold DATA nevertheless)
|
||||
jsr iec_release_clk_data
|
||||
// Pull CLK to indicate data is now valid (we should not hold DATA nevertheless)
|
||||
jsr iec_pull_clk_release_data_oneshot
|
||||
|
||||
// Finish the flow
|
||||
jmp iec_tx_common_finalize
|
||||
@@ -93,6 +87,12 @@ iec_tx_no_dolphindos:
|
||||
|
||||
#endif // CONFIG_IEC_DOLPHINDOS
|
||||
|
||||
// Pull CLK back to indicate that DATA is not valid, keep it for 60us
|
||||
// We can use this routine as we don't hold DATA anyway (and its state doesn't even matter)
|
||||
|
||||
jsr iec_pull_clk_release_data_oneshot
|
||||
jsr iec_wait60us
|
||||
|
||||
// Now, we can start transmission of 8 bits of data
|
||||
ldx #7
|
||||
|
||||
|
||||
@@ -44,6 +44,12 @@ save_iec:
|
||||
jsr iec_tx_command
|
||||
bcs save_iec_dev_not_found
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS
|
||||
|
||||
jsr dolphindos_detect
|
||||
|
||||
#endif
|
||||
|
||||
// Save start address
|
||||
lda STAL+0
|
||||
sta TBTCNT
|
||||
|
||||
@@ -43,8 +43,8 @@ dolphindos_detect:
|
||||
dolphindos_detect_loop:
|
||||
|
||||
lda CIA2_ICR
|
||||
and #$10
|
||||
bne dolphindos_detect_success
|
||||
cmp #$10
|
||||
beq dolphindos_detect_success
|
||||
lda CIA2_PRB // XXX do we need this read?
|
||||
|
||||
dex
|
||||
|
||||
Reference in new issue
Block a user