mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-13 21:30:38 +00:00
retry failed reads, ignore failed writes
This commit is contained in:
parent
c2684183f1
commit
25ce7890b5
Binary file not shown.
@ -19,10 +19,10 @@
|
|||||||
;
|
;
|
||||||
; LC RAM BANK 2
|
; LC RAM BANK 2
|
||||||
; D000..D5FF - ProRWTS data
|
; D000..D5FF - ProRWTS data
|
||||||
; D600..D8B6 - ProRWTS code
|
; D600..D8BD - ProRWTS code
|
||||||
; D8B7..DC6F - ProRWTS glue code
|
; D8BE..DC76 - ProRWTS glue code
|
||||||
; DC70..DC75 - backup of stack (during gameplay and self-running demos)
|
; DC77..DC7C - backup of stack (during gameplay and self-running demos)
|
||||||
; DC76..DC7B - okvs cache (attract state saved across self-running demo)
|
; DC7D..DC82 - okvs cache (attract state saved across self-running demo)
|
||||||
; ...unused...
|
; ...unused...
|
||||||
; DFB4..DFFF - (de)acceleration function
|
; DFB4..DFFF - (de)acceleration function
|
||||||
;
|
;
|
||||||
@ -214,8 +214,8 @@ PRELAUNCH_STANDARD_SIZE = 61 ; LoadStandardPrelaunch, eventually to be d
|
|||||||
; shared symbols for prelaunch and effects to call ProRWTS2 functions
|
; shared symbols for prelaunch and effects to call ProRWTS2 functions
|
||||||
iCurBlockLo = $D601 ; constant
|
iCurBlockLo = $D601 ; constant
|
||||||
iCurBlockHi = $D603 ; constant
|
iCurBlockHi = $D603 ; constant
|
||||||
launchpatch = $D855 ; glue.launch.a
|
launchpatch = $D85C ; glue.launch.a
|
||||||
itraverse = $DB44 ; Roger Rabbit, avoid, use Infiltrator 2 style instead
|
itraverse = $DB4B ; Roger Rabbit, avoid, use Infiltrator 2 style instead
|
||||||
; also Columns (via file in disk image)
|
; also Columns (via file in disk image)
|
||||||
ldrlo = $55 ; constant
|
ldrlo = $55 ; constant
|
||||||
ldrhi = $56 ; constant
|
ldrhi = $56 ; constant
|
||||||
|
@ -521,7 +521,8 @@ slot ldx $cfff
|
|||||||
sta unrcommand2 + 2
|
sta unrcommand2 + 2
|
||||||
} ;rwts_mode = 0 and aligned_read = 0 and enable_write = 1
|
} ;rwts_mode = 0 and aligned_read = 0 and enable_write = 1
|
||||||
sta unrcommand3 + 2
|
sta unrcommand3 + 2
|
||||||
iny ;STA
|
sta unrgetreq + 2
|
||||||
|
iny ;STA
|
||||||
sty unrblokhi1
|
sty unrblokhi1
|
||||||
sty unrunit1 + 2
|
sty unrunit1 + 2
|
||||||
iny ;STX
|
iny ;STX
|
||||||
@ -562,13 +563,20 @@ slot ldx $cfff
|
|||||||
sta unrblokhi2
|
sta unrblokhi2
|
||||||
ldy #$ad ;LDA
|
ldy #$ad ;LDA
|
||||||
sty unrblokhi3
|
sty unrblokhi3
|
||||||
iny ;LDX
|
sty unrgetreq
|
||||||
|
iny ;LDX
|
||||||
sty unrbloklo2
|
sty unrbloklo2
|
||||||
} ;rwts_mode = 1 and write_sparse = 1
|
} ;rwts_mode = 1 and write_sparse = 1
|
||||||
lda #adrlo
|
lda #adrlo
|
||||||
sta unrunit1 + 1
|
sta unrunit1 + 1
|
||||||
lda #<paddr
|
lda #<paddr
|
||||||
sta unrunit1 + 3
|
sta unrunit1 + 3
|
||||||
|
!if (rwts_mode and write_sparse) = 0 {
|
||||||
|
lda #$ad ;LDA
|
||||||
|
sta unrgetreq
|
||||||
|
} ;if rwts_mode = 0 or write_sparse = 0
|
||||||
|
lda #<pcommand
|
||||||
|
sta unrgetreq + 1
|
||||||
|
|
||||||
;use SmartPort entrypoint instead
|
;use SmartPort entrypoint instead
|
||||||
|
|
||||||
@ -3547,7 +3555,20 @@ pcommand !byte $2c ;hide packet in non-SmartPort mode
|
|||||||
unrppacket = unrelochdd + (* - reloc)
|
unrppacket = unrelochdd + (* - reloc)
|
||||||
!word unrelochdd + (packet - reloc)
|
!word unrelochdd + (packet - reloc)
|
||||||
} ;use_smartport = 1
|
} ;use_smartport = 1
|
||||||
bcs retry
|
bcc goodread
|
||||||
|
unrgetreq = unrelochdd + (* - reloc)
|
||||||
|
lda reqcmd
|
||||||
|
!if use_smartport = 1 {
|
||||||
|
nop ;allow replacing "lda reqcmd" with "lda pcommand" in extended SmartPort mode
|
||||||
|
} ;use_smartport = 1
|
||||||
|
|
||||||
|
;read failures are assumed to be transient
|
||||||
|
;write failures are assumed to be permanent
|
||||||
|
|
||||||
|
cmp #cmdread
|
||||||
|
beq retry
|
||||||
|
|
||||||
|
goodread
|
||||||
!if no_interrupts = 1 {
|
!if no_interrupts = 1 {
|
||||||
plp
|
plp
|
||||||
} ;no_interrupts = 1
|
} ;no_interrupts = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user