Some code cleanup, port of StateLoader to C, some statesaver + rewind fixes.
This commit is contained in:
@@ -3134,7 +3134,9 @@ MoviePlay:
|
||||
call SRAMChdir
|
||||
popad
|
||||
mov dword[Totalbyteloaded],0
|
||||
pushad
|
||||
call loadstate2
|
||||
popad
|
||||
mov edx,fnamest+1
|
||||
call Open_File
|
||||
jc near .notexist
|
||||
@@ -3687,7 +3689,9 @@ GUIProcStates:
|
||||
call NetLoadStuff
|
||||
jmp .changedir
|
||||
.notnet
|
||||
pushad
|
||||
call loadstate2
|
||||
popad
|
||||
.changedir
|
||||
; change dir to LoadDrive/LoadDir
|
||||
call ChangetoLOADdir
|
||||
@@ -3715,9 +3719,9 @@ LoadSecondState:
|
||||
mov ebx,[statefileloc]
|
||||
mov al,[fnamest+ebx]
|
||||
mov byte[fnamest+ebx],'s'
|
||||
push eax
|
||||
pushad
|
||||
call loadstate2
|
||||
pop eax
|
||||
popad
|
||||
mov ebx,[statefileloc]
|
||||
mov [fnamest+ebx],al
|
||||
call ChangetoLOADdir
|
||||
|
||||
@@ -515,7 +515,9 @@ NEWSYM GUIDoReset
|
||||
|
||||
; reset the snes
|
||||
call init65816
|
||||
pushad
|
||||
call procexecloop
|
||||
popad
|
||||
|
||||
mov eax,spcRam
|
||||
mov edx,0EFh
|
||||
|
||||
@@ -1630,7 +1630,7 @@ NetStateTotal resd 1
|
||||
NetStateQuit resb 1
|
||||
NetStateBuffer resb 2048
|
||||
SECTION .data
|
||||
Netfname db 'nettemp.zst',0
|
||||
NEWSYM Netfname, db 'nettemp.zst',0
|
||||
SECTION .text
|
||||
|
||||
NetLoadStuff:
|
||||
@@ -1756,7 +1756,9 @@ loadstatesend:
|
||||
cmp dword[NetStateSize],0
|
||||
jne .notzero
|
||||
pushad
|
||||
pushad
|
||||
call loadstate2
|
||||
popad
|
||||
mov byte[RestoreValues],0
|
||||
mov bx,[NetLoadHandle]
|
||||
call Close_File
|
||||
@@ -1834,7 +1836,9 @@ loadstaterecv:
|
||||
popad
|
||||
mov edx,Netfname
|
||||
mov byte[RestoreValues],0
|
||||
pushad
|
||||
call loadstate3
|
||||
popad
|
||||
call ChangetoLOADdir
|
||||
cmp byte[NetLoadState],0
|
||||
je .norun2
|
||||
|
||||
Reference in New Issue
Block a user