compatibility fix for EOI handling in IEC code

This commit is contained in:
FeralChild64 committed 2019-12-01 16:29:00 +01:00
1 parent 0ae57c4a2c
commit 506d9d5c4f
4 files changed
+33 -27

No files matched your search

+8 -2
View File
@@ -11,8 +11,14 @@
ACPTR:
jsr kernalstatus_reset
lda IOSTATUS
beq !+
lda #$0D // tested on real ROMs
clc
rts
!:
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS
jmp iec_rx_dispatch
+1 -1
View File
@@ -7,4 +7,4 @@
chrin_iec:
// XXX is this really all?
jmp JACPTR // carry will be set accordingly
jmp JACPTR
+2 -10
View File
@@ -111,16 +111,8 @@ iec_rx_clk_wait2:
// Timeout
jsr kernalstatus_EOI
pla
// Restore registers
pla
tay
pla
tax
sec // XXX confirm that sec is really a way to report timeout here
cli
rts
jmp iec_rx_end
!:
// More bits?
dex
+22 -14
View File
@@ -24,8 +24,6 @@ load_break_error:
jsr iec_close_load
jmp kernalerror_ROUTINE_TERMINATED
load_save_no_file_name:
load_iec:
@@ -71,19 +69,10 @@ load_iec:
// Get load address
#if CONFIG_IEC_JIFFYDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
#endif
bcs load_iec_file_not_found
jsr load_iec_get_addr_byte
sta EAL+0
#if CONFIG_IEC_JIFFYDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
#endif
bcs load_iec_file_not_found
jsr load_iec_get_addr_byte
sta EAL+1
// If secondary address is 0, override EAL with STAL
@@ -143,4 +132,23 @@ iec_load_loop:
jmp lvs_return_last_address
load_iec_get_addr_byte:
#if CONFIG_IEC_JIFFYDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
#endif
bcs !+
lda IOSTATUS
and #K_STS_EOI
bne !+
rts
!:
pla
pla
jmp load_iec_file_not_found
#endif // CONFIG_IEC