IEC code compatibility improvements
This commit is contained in:
1 parent
77320e2e91
commit
1480350bfb
3 files changed
+16
-8
No files matched your search
@@ -13,7 +13,9 @@ iec_rx_byte:
|
|||||||
pha
|
pha
|
||||||
|
|
||||||
// Timing is critical here - execute on disabled IRQs
|
// Timing is critical here - execute on disabled IRQs
|
||||||
php
|
// The best practice would be to do PHP first, but it seems this is not
|
||||||
|
// what the original ROM does; furthermore, pushing additional bytes to
|
||||||
|
// stack can wreck autostart softwaree loading at $0100
|
||||||
sei
|
sei
|
||||||
|
|
||||||
// First, we wait for the talker to release the CLK line
|
// First, we wait for the talker to release the CLK line
|
||||||
@@ -107,8 +109,7 @@ iec_rx_clk_wait2:
|
|||||||
// Timeout
|
// Timeout
|
||||||
jsr kernalstatus_EOI
|
jsr kernalstatus_EOI
|
||||||
pla
|
pla
|
||||||
plp
|
|
||||||
|
|
||||||
// Restore registers
|
// Restore registers
|
||||||
pla
|
pla
|
||||||
tay
|
tay
|
||||||
@@ -116,6 +117,7 @@ iec_rx_clk_wait2:
|
|||||||
tax
|
tax
|
||||||
|
|
||||||
sec // XXX confirm that sec is really a way to report timeout here
|
sec // XXX confirm that sec is really a way to report timeout here
|
||||||
|
cli
|
||||||
rts
|
rts
|
||||||
!:
|
!:
|
||||||
// More bits?
|
// More bits?
|
||||||
@@ -130,9 +132,6 @@ iec_rx_clk_wait2:
|
|||||||
|
|
||||||
// Retreive the received byte
|
// Retreive the received byte
|
||||||
pla
|
pla
|
||||||
|
|
||||||
// Return no-error
|
|
||||||
plp
|
|
||||||
|
|
||||||
// Restore registers
|
// Restore registers
|
||||||
sta TBTCNT // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
|
sta TBTCNT // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
|
||||||
@@ -143,5 +142,6 @@ iec_rx_clk_wait2:
|
|||||||
lda TBTCNT
|
lda TBTCNT
|
||||||
|
|
||||||
clc
|
clc
|
||||||
|
cli
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -26,7 +26,9 @@ iec_tx_byte:
|
|||||||
iec_tx_common:
|
iec_tx_common:
|
||||||
|
|
||||||
// Timing is critical here - execute on disabled IRQs
|
// Timing is critical here - execute on disabled IRQs
|
||||||
php
|
// The best practice would be to do PHP first, but it seems this is not
|
||||||
|
// what the original ROM does; furthermore, pushing additional bytes to
|
||||||
|
// stack can wreck autostart softwaree loading at $0100
|
||||||
sei
|
sei
|
||||||
|
|
||||||
// Wait till all receivers are ready, they should all release DATA
|
// Wait till all receivers are ready, they should all release DATA
|
||||||
@@ -79,7 +81,7 @@ iec_tx_common_bit_is_sent:
|
|||||||
dex
|
dex
|
||||||
bpl iec_tx_common_sendbit
|
bpl iec_tx_common_sendbit
|
||||||
|
|
||||||
plp
|
cli
|
||||||
|
|
||||||
// Give device time to tell if they are busy by pulling DATA
|
// Give device time to tell if they are busy by pulling DATA
|
||||||
// They should do it within 1ms
|
// They should do it within 1ms
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ lvs_handle_byte_load_verify:
|
|||||||
// Thus we have to use a helper routine in low memory
|
// Thus we have to use a helper routine in low memory
|
||||||
// to do the memory access
|
// to do the memory access
|
||||||
|
|
||||||
|
#if CONFIG_MEMORY_MODEL_60K
|
||||||
// Save byte under ROMs and IO if required
|
// Save byte under ROMs and IO if required
|
||||||
php
|
php
|
||||||
sei
|
sei
|
||||||
@@ -52,6 +53,11 @@ lvs_handle_byte_load_verify:
|
|||||||
ldx #$37
|
ldx #$37
|
||||||
stx $01
|
stx $01
|
||||||
plp
|
plp
|
||||||
|
#else
|
||||||
|
ldy #0
|
||||||
|
sta (STAL),y
|
||||||
|
#endif
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
lvs_advance_pointer:
|
lvs_advance_pointer:
|
||||||
|
|||||||
Reference in new issue
Block a user