SECOND/TKSA compatibility fix

This commit is contained in:
FeralChild64 committed 2019-11-07 17:23:27 +01:00
1 parent 7453771219
commit 2e9a0b1610
5 files changed
+15 -15

No files matched your search

+1
View File
@@ -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
+1
View File
@@ -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
+1 -1
View File
@@ -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
+6 -7
View File
@@ -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
+6 -7
View File
@@ -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