SECOND/TKSA compatibility fix
This commit is contained in:
1 parent
7453771219
commit
2e9a0b1610
5 files changed
+15
-15
No files matched your search
@@ -22,6 +22,7 @@ chkin_iec:
|
|||||||
bcs_far chkinout_device_not_present
|
bcs_far chkinout_device_not_present
|
||||||
|
|
||||||
lda LAT, Y
|
lda LAT, Y
|
||||||
|
ora #$60
|
||||||
jsr TKSA
|
jsr TKSA
|
||||||
bcs_far chkinout_device_not_present
|
bcs_far chkinout_device_not_present
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ ckout_iec:
|
|||||||
bcs_far chkinout_device_not_present
|
bcs_far chkinout_device_not_present
|
||||||
|
|
||||||
lda LAT, Y
|
lda LAT, Y
|
||||||
|
ora #$60
|
||||||
jsr SECOND
|
jsr SECOND
|
||||||
bcs_far chkinout_device_not_present
|
bcs_far chkinout_device_not_present
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ save_iec:
|
|||||||
jsr LISTEN
|
jsr LISTEN
|
||||||
bcs save_iec_dev_not_found
|
bcs save_iec_dev_not_found
|
||||||
|
|
||||||
lda #$60 // open channel / data (p3) , required according to p13
|
lda #$61 // open channel / data (p3) , required according to p13
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
bcs save_iec_error
|
bcs save_iec_error
|
||||||
|
|||||||
@@ -14,13 +14,12 @@ SECOND:
|
|||||||
|
|
||||||
#if CONFIG_IEC
|
#if CONFIG_IEC
|
||||||
|
|
||||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
// Due to OPEN/CLOSE/TKSA/SECOND command encoding, allowed channels are 0-15; it is the caller
|
||||||
// allowed channels are 0-15; report error if out of range
|
// responsibility, hovewer, to provide value ORed with $60
|
||||||
cmp #$10
|
// - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
||||||
bcc !+
|
// - https://www.pagetable.com/?p=1031 (Kernal API description)
|
||||||
jmp kernalerror_DEVICE_NOT_FOUND // XXX find a better error message for wrong channel (create new one?)
|
|
||||||
!:
|
// XXX consider checking whether value is in range (contrary to original ROM implementation)
|
||||||
ora #$60
|
|
||||||
|
|
||||||
jmp common_open_close_unlsn_second
|
jmp common_open_close_unlsn_second
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,12 @@ TKSA:
|
|||||||
|
|
||||||
#if CONFIG_IEC
|
#if CONFIG_IEC
|
||||||
|
|
||||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
// Due to OPEN/CLOSE/TKSA/SECOND command encoding, allowed channels are 0-15; it is the caller
|
||||||
// allowed channels are 0-15; report error if out of range
|
// responsibility, hovewer, to provide value ORed with $60
|
||||||
cmp #$10
|
// - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
||||||
bcc !+
|
// - https://www.pagetable.com/?p=1031 (Kernal API description)
|
||||||
jmp kernalerror_DEVICE_NOT_FOUND // XXX find a better error message for wrong channel (create new one?)
|
|
||||||
!:
|
ora #$90
|
||||||
ora #$F0
|
|
||||||
|
|
||||||
jmp common_untlk_tksa
|
jmp common_untlk_tksa
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user