robustness improvements in IEC support
This commit is contained in:
1 parent
b21ce3116d
commit
22e1e201af
11 files changed
+63
-12
No files matched your search
@@ -1,7 +1,15 @@
|
||||
|
||||
iec_pull_atn_clk_release_data:
|
||||
|
||||
;; Pulled CLK = DATA considered invalid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
ora #BIT_CI2PRA_ATN_OUT + BIT_CI2PRA_CLK_OUT ; pull
|
||||
and #$FF - BIT_CI2PRA_DAT_OUT ; release
|
||||
ora #BIT_CI2PRA_ATN_OUT ; pull
|
||||
sta CI2PRA
|
||||
ora #BIT_CI2PRA_CLK_OUT ; pull
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_DAT_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
iec_pull_clk_release_data:
|
||||
|
||||
;; Pulled CLK = DATA considered invalid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
ora #BIT_CI2PRA_CLK_OUT ; pull
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_DAT_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
@@ -1,7 +1,15 @@
|
||||
|
||||
iec_pull_data_release_atn_clock:
|
||||
iec_pull_data_release_atn_clk:
|
||||
|
||||
;; Released CLK = DATA considered valid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
ora #BIT_CI2PRA_DAT_OUT ; pull
|
||||
and #$FF - BIT_CI2PRA_ATN_OUT - BIT_CI2PRA_CLK_OUT ; release
|
||||
ora #BIT_CI2PRA_DAT_OUT ; pull
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT ; release
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_ATN_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
@@ -1,7 +1,16 @@
|
||||
|
||||
iec_release_atn_clk_data:
|
||||
|
||||
;; Released CLK = DATA considered valid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
and #$FF - BIT_CI2PRA_ATN_OUT - BIT_CI2PRA_CLK_OUT - BIT_CI2PRA_DAT_OUT ; release
|
||||
and #$FF - BIT_CI2PRA_ATN_OUT ; release
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_DAT_OUT ; release
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
iec_release_clk_data:
|
||||
|
||||
;; Released CLK = DATA considered valid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT - BIT_CI2PRA_DAT_OUT ; release
|
||||
and #$FF - BIT_CI2PRA_DAT_OUT ; release
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
iec_release_clk_pull_data:
|
||||
|
||||
;; Released CLK = DATA considered valid; for extra robustness on non-emulated
|
||||
;; hardware give some lines few more cycles to stabilize; see page 10 of
|
||||
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
|
||||
lda CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT ; release
|
||||
ora #BIT_CI2PRA_DAT_OUT ; pull
|
||||
sta CI2PRA
|
||||
and #$FF - BIT_CI2PRA_CLK_OUT ; release
|
||||
sta CI2PRA
|
||||
rts
|
||||
@@ -5,7 +5,7 @@
|
||||
iec_turnaround_to_listen:
|
||||
|
||||
;; Pull DATA, release CLK and ATN (we are not sending commands)
|
||||
jsr iec_pull_data_release_atn_clock
|
||||
jsr iec_pull_data_release_atn_clk
|
||||
|
||||
;; Wait for clock line to be pulled by the drive
|
||||
ldx #$FF ; XXX should we really use that high number?
|
||||
|
||||
+3
-1
@@ -2,6 +2,8 @@
|
||||
|
||||
listen:
|
||||
|
||||
;; This trivial routine is documented in 'Compute's Mapping the Commodore 64', page 223
|
||||
;; This trivial routine is documented in 'Compute's Mapping the Commodore 64', page 223 and
|
||||
;; https://www.pagetable.com/?p=1031, , https://github.com/mist64/cbmbus_doc
|
||||
and #$1F ; make sure bits encoding the command are cleared out
|
||||
ora #$20
|
||||
jmp iec_tx_command
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
second:
|
||||
|
||||
;; This trivial routine is documented in 'C64 Programmer's Reference Guide', page 296
|
||||
;; This trivial routine is documented in 'C64 Programmer's Reference Guide', page 296 and
|
||||
;; https://www.pagetable.com/?p=1031, , https://github.com/mist64/cbmbus_doc
|
||||
and #$1F ; make sure bits encoding the command are cleared out
|
||||
ora #$60
|
||||
jmp iec_tx_command
|
||||
+3
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
talk:
|
||||
|
||||
;; This trivial routine is documented in 'Compute's Mapping the Commodore 64', page 223
|
||||
;; This routine is documented in 'Compute's Mapping the Commodore 64', page 223 and
|
||||
;; https://www.pagetable.com/?p=1031, , https://github.com/mist64/cbmbus_doc
|
||||
and #$1F ; make sure bits encoding the command are cleared out
|
||||
ora #$40
|
||||
jmp iec_tx_command
|
||||
|
||||
@@ -3,6 +3,7 @@ tksa:
|
||||
|
||||
;; This routine is documented in 'C64 Programmer's Reference Guide', page 302 and
|
||||
;; https://www.pagetable.com/?p=1031, , https://github.com/mist64/cbmbus_doc
|
||||
and #$1F ; make sure bits encoding the command are cleared out
|
||||
ora #$F0
|
||||
jmp iec_tx_command
|
||||
|
||||
Reference in new issue
Block a user