work on IEC - no auto turnaround
This commit is contained in:
1 parent
339ae0335f
commit
5ae749b552
2 files changed
+11
-8
No files matched your search
+10
-3
@@ -72,8 +72,8 @@ open_rs232:
|
|||||||
open_iec:
|
open_iec:
|
||||||
|
|
||||||
;; Part implemented according to https://www.pagetable.com/?p=1031, https://github.com/mist64/cbmbus_doc
|
;; Part implemented according to https://www.pagetable.com/?p=1031, https://github.com/mist64/cbmbus_doc
|
||||||
|
;; XXX note: this is only a temporary test implementation, real 'open' does not send anything to IEC,
|
||||||
;; XXX for now for channel 15 only!
|
;; see http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||||
|
|
||||||
;; Disable IRQs, since timing matters!
|
;; Disable IRQs, since timing matters!
|
||||||
sei
|
sei
|
||||||
@@ -91,12 +91,19 @@ open_iec:
|
|||||||
|
|
||||||
;; Send secondary address
|
;; Send secondary address
|
||||||
lda current_secondary_address
|
lda current_secondary_address
|
||||||
jsr tksa
|
jsr second
|
||||||
bcs open_iec_error ; XXX what about the accumulator?
|
bcs open_iec_error ; XXX what about the accumulator?
|
||||||
|
|
||||||
jsr printf
|
jsr printf
|
||||||
.byte "DBG: OPEN 2", $0D, 0
|
.byte "DBG: OPEN 2", $0D, 0
|
||||||
|
|
||||||
|
;; Turnaround
|
||||||
|
jsr iec_turnaround_to_listen
|
||||||
|
bcs open_iec_error ; XXX what about the accumulator?
|
||||||
|
|
||||||
|
jsr printf
|
||||||
|
.byte "DBG: OPEN 3 - DEVICE EXISTS", $0D, 0
|
||||||
|
|
||||||
;; Indicate success
|
;; Indicate success
|
||||||
lda #$00
|
lda #$00
|
||||||
clc
|
clc
|
||||||
|
|||||||
+1
-5
@@ -4,9 +4,5 @@ tksa:
|
|||||||
;; This routine is documented in 'C64 Programmer's Reference Guide', page 302 and
|
;; 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
|
;; https://www.pagetable.com/?p=1031, , https://github.com/mist64/cbmbus_doc
|
||||||
ora #$F0
|
ora #$F0
|
||||||
jsr iec_tx_command
|
jmp iec_tx_command
|
||||||
bcs tksa_error
|
|
||||||
jmp iec_turnaround_to_listen
|
|
||||||
|
|
||||||
tksa_error:
|
|
||||||
rts
|
|
||||||
Reference in new issue
Block a user