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
|
||||
|
||||
lda LAT, Y
|
||||
ora #$60
|
||||
jsr TKSA
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ ckout_iec:
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
lda LAT, Y
|
||||
ora #$60
|
||||
jsr SECOND
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ save_iec:
|
||||
jsr LISTEN
|
||||
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
|
||||
jsr iec_tx_command
|
||||
bcs save_iec_error
|
||||
|
||||
@@ -14,13 +14,12 @@ SECOND:
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
||||
// allowed channels are 0-15; report error if out of range
|
||||
cmp #$10
|
||||
bcc !+
|
||||
jmp kernalerror_DEVICE_NOT_FOUND // XXX find a better error message for wrong channel (create new one?)
|
||||
!:
|
||||
ora #$60
|
||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding, allowed channels are 0-15; it is the caller
|
||||
// responsibility, hovewer, to provide value ORed with $60
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
||||
// - https://www.pagetable.com/?p=1031 (Kernal API description)
|
||||
|
||||
// XXX consider checking whether value is in range (contrary to original ROM implementation)
|
||||
|
||||
jmp common_open_close_unlsn_second
|
||||
|
||||
|
||||
@@ -14,13 +14,12 @@ TKSA:
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
||||
// allowed channels are 0-15; report error if out of range
|
||||
cmp #$10
|
||||
bcc !+
|
||||
jmp kernalerror_DEVICE_NOT_FOUND // XXX find a better error message for wrong channel (create new one?)
|
||||
!:
|
||||
ora #$F0
|
||||
// Due to OPEN/CLOSE/TKSA/SECOND command encoding, allowed channels are 0-15; it is the caller
|
||||
// responsibility, hovewer, to provide value ORed with $60
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
||||
// - https://www.pagetable.com/?p=1031 (Kernal API description)
|
||||
|
||||
ora #$90
|
||||
|
||||
jmp common_untlk_tksa
|
||||
|
||||
|
||||
Reference in new issue
Block a user