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

View File

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

View File

@@ -410,7 +410,7 @@ NEWSYM writeon, db 0 ; Write enable/disable on snes rom memory
NEWSYM totlines, dw 263 ; total # of lines NEWSYM totlines, dw 263 ; total # of lines
NEWSYM soundon, db 0 ; Current sound enabled (1=enabled) NEWSYM soundon, db 0 ; Current sound enabled (1=enabled)
NEWSYM zsmesg, db 'ZSNES Save State File V0.6',26 NEWSYM zsmesg, db 'ZSNES Save State File V0.6',26
NEWSYM versn, db 60 ; version #/100 NEWSYM versn, db 61 ; version #/100
NEWSYM curcyc, db 0 ; cycles left in scanline NEWSYM curcyc, db 0 ; cycles left in scanline
NEWSYM curypos, dw 0 ; current y position NEWSYM curypos, dw 0 ; current y position
NEWSYM cacheud, db 1 ; update cache every ? frames NEWSYM cacheud, db 1 ; update cache every ? frames