More latch fixes and fix for old savestates

This commit is contained in:
pagefault
2003-05-09 01:06:42 +00:00
parent 9896c4442f
commit 51455e6562
3 changed files with 11 additions and 5 deletions

View File

@@ -104,6 +104,7 @@ EXTSYM JoyRead,ChatType2,chatstrR2,chatstrR3,chatstrR4,chatstrR5
EXTSYM chatRTL2,chatRTL3,chatRTL4,chatRTL5
EXTSYM NetLoadState
EXTSYM ProcessMovies
EXTSYM ioportval
EXTSYM C4VBlank
EXTSYM dsp1teststuff
EXTSYM ReturnFromSPCStall,SPCStallSetting,cycpb268,cycpb358,HIRQSkip,scanlines
@@ -1779,7 +1780,7 @@ NEWSYM stateloader
mov edx,zsmesg
call Read_File
cmp byte[versn],60
jne near .convert
jb near .convert
; Load SPC timers
mov ecx,8
add dword[Totalbyteloaded],ecx
@@ -1790,6 +1791,10 @@ NEWSYM stateloader
add dword[Totalbyteloaded],ecx
mov edx,sndrot
call Read_File
cmp byte[versn],60
jne .not60
mov byte[ioportval],0FFh
.not60
; Load RAM (WRAM(128k),VRAM(64k),SRAM)
mov ecx,65536+65536
add dword[Totalbyteloaded],ecx

View File

@@ -664,7 +664,7 @@ NEWSYM SDD1BankD, db 3
NEWSYM vramread2, db 0 ; previous character for vram read
NEWSYM nosprincr, db 0
NEWSYM poamaddrs, dw 0
NEWSYM ioportval, db 0
NEWSYM ioportval, db 255
NEWSYM iohvlatch, db 0
@@ -738,6 +738,7 @@ NEWSYM ClearRegs
mov word[bg2objptr],0
mov word[bg3objptr],0
mov word[bg4objptr],0
mov byte[ioportval],0FFh
ret
reg2100r:
@@ -771,7 +772,7 @@ reg2137r:
cmp byte[iohvlatch],1
je .dolatch
test byte[ioportval],80h
jnz .nolatch
jz .nolatch
.dolatch
xor ebx,ebx
mov bl,[cycpl]
@@ -801,7 +802,7 @@ debblah:
cmp byte[iohvlatch],1
je .dolatch2
test byte[ioportval],80h
jnz .nolatch2
jz .nolatch2
.dolatch2
xor ebx,ebx
mov bl,[cycpl]