Netplay now sends proper .srm buffer
This commit is contained in:
@@ -1426,18 +1426,28 @@ transfersram:
|
|||||||
cmp byte[UseRemoteSRAMData],0
|
cmp byte[UseRemoteSRAMData],0
|
||||||
je .nosram
|
je .nosram
|
||||||
|
|
||||||
;It has a battery, send it.
|
|
||||||
cmp byte[CHIPBATT],1
|
|
||||||
je .yessram
|
|
||||||
|
|
||||||
;If last if failed, no battery, so no SRAM sending for SA1 or SFX
|
|
||||||
cmp byte[SFXEnable],1
|
|
||||||
je .nosram
|
|
||||||
cmp byte[SA1Enable],1
|
|
||||||
je .nosram
|
|
||||||
cmp dword[ramsize],0
|
cmp dword[ramsize],0
|
||||||
je .nosram
|
je .nosram
|
||||||
.yessram
|
|
||||||
|
mov ebx,[sram]
|
||||||
|
cmp byte[SFXEnable],1
|
||||||
|
jne .notsfx
|
||||||
|
mov ebx,[sfxramdata]
|
||||||
|
.notsfx
|
||||||
|
cmp byte[SA1Enable],1
|
||||||
|
jne .notsa1
|
||||||
|
mov ebx,[SA1RAMArea]
|
||||||
|
.notsa1
|
||||||
|
cmp byte[SETAEnable],1
|
||||||
|
jne .notseta
|
||||||
|
mov ebx,[setaramdata]
|
||||||
|
.notseta
|
||||||
|
cmp ebx,[sram]
|
||||||
|
je .notspecial
|
||||||
|
cmp byte[CHIPBATT],0
|
||||||
|
je .nosram
|
||||||
|
.notspecial
|
||||||
|
push ebx ;Save .srm register
|
||||||
cmp byte[UseRemoteSRAMData],1
|
cmp byte[UseRemoteSRAMData],1
|
||||||
je .uselocal
|
je .uselocal
|
||||||
cmp byte[UseRemoteSRAMData],2
|
cmp byte[UseRemoteSRAMData],2
|
||||||
@@ -1464,7 +1474,7 @@ transfersram:
|
|||||||
|
|
||||||
; send sram
|
; send sram
|
||||||
mov ecx,[ramsize]
|
mov ecx,[ramsize]
|
||||||
mov ebx,[sram]
|
pop ebx ;Restore .srm register
|
||||||
xor esi,esi
|
xor esi,esi
|
||||||
.loop
|
.loop
|
||||||
push ebx
|
push ebx
|
||||||
@@ -1513,7 +1523,7 @@ transfersram:
|
|||||||
|
|
||||||
; receive sram
|
; receive sram
|
||||||
mov ecx,[ramsize]
|
mov ecx,[ramsize]
|
||||||
mov ebx,[sram]
|
pop ebx ;Restore .srm register
|
||||||
.loopb
|
.loopb
|
||||||
.getnext
|
.getnext
|
||||||
pushad
|
pushad
|
||||||
|
|||||||
Reference in New Issue
Block a user