SRAM load from Save toggle now in effect.

This commit is contained in:
n-a-c-h
2005-01-31 01:41:26 +00:00
parent 16d95da3dc
commit 2aa4eec761
2 changed files with 10 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ extern unsigned char *StateBackup, sndrot, spcRam[65472];
extern unsigned char DSPMem[256], SA1Status, *SA1RAMArea, DSP1Type, DSP1COp; extern unsigned char DSPMem[256], SA1Status, *SA1RAMArea, DSP1Type, DSP1COp;
extern unsigned char prevoamptr, BRRBuffer[32], *romdata, curcyc; extern unsigned char prevoamptr, BRRBuffer[32], *romdata, curcyc;
extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, spcon; extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, spcon, SRAMState;
extern short C4WFXVal, C41FXVal, Op00Multiplicand, Op04Angle, Op08X, Op18X; extern short C4WFXVal, C41FXVal, Op00Multiplicand, Op04Angle, Op08X, Op18X;
extern short Op28X, Op0CA, Op02FX, Op0AVS, Op06X, Op01m, Op0DX, Op03F, Op14Zr; extern short Op28X, Op0CA, Op02FX, Op0AVS, Op06X, Op01m, Op0DX, Op03F, Op14Zr;
@@ -73,6 +73,7 @@ static unsigned int zst_version;
//For compatibility with old save states (pre v1.43) //For compatibility with old save states (pre v1.43)
#define loading_old_state (file && read && (zst_version == 60)) #define loading_old_state (file && read && (zst_version == 60))
#define loading_state_no_sram (file && read && !SRAMState)
void copy_state_data(unsigned char *buffer, void (*copy_func)(unsigned char **, void *, size_t), bool file, bool read) void copy_state_data(unsigned char *buffer, void (*copy_func)(unsigned char **, void *, size_t), bool file, bool read)
{ {
@@ -169,8 +170,11 @@ void copy_state_data(unsigned char *buffer, void (*copy_func)(unsigned char **,
copy_func(&buffer, &prevoamptr, 1); copy_func(&buffer, &prevoamptr, 1);
copy_func(&buffer, &ReadHead, 1*4); copy_func(&buffer, &ReadHead, 1*4);
copy_func(&buffer, sram, ramsize); if (loading_state_no_sram)
{
copy_func(&buffer, sram, ramsize);
}
if (!file) if (!file)
{ {
copy_func(&buffer, &tempesi, 4); copy_func(&buffer, &tempesi, 4);

View File

@@ -7005,14 +7005,14 @@ DisplayGUISave:
GUIOuttextwin2u 20,26,34,GUISaveText2,5 GUIOuttextwin2u 20,26,34,GUISaveText2,5
GUIOuttextwin2u 20,26,44,GUISaveText3,0 GUIOuttextwin2u 20,26,44,GUISaveText3,0
GUIOuttextwin2u 20,26,54,GUISaveText4,0 GUIOuttextwin2u 20,26,54,GUISaveText4,0
; GUIOuttextwin2u 20,26,64,GUISaveText5,0 GUIOuttextwin2u 20,26,64,GUISaveText5,0
add byte[GUItextcolor],15 add byte[GUItextcolor],15
GUIOuttextwin2 20,25,23,GUISaveText1 GUIOuttextwin2 20,25,23,GUISaveText1
GUIOuttextwin2 20,25,33,GUISaveText2 GUIOuttextwin2 20,25,33,GUISaveText2
GUIOuttextwin2 20,25,43,GUISaveText3 GUIOuttextwin2 20,25,43,GUISaveText3
GUIOuttextwin2 20,25,53,GUISaveText4 GUIOuttextwin2 20,25,53,GUISaveText4
; GUIOuttextwin2 20,25,63,GUISaveText5 GUIOuttextwin2 20,25,63,GUISaveText5
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[AutoIncSaveSlot],0 cmp byte[AutoIncSaveSlot],0
@@ -7043,7 +7043,7 @@ DisplayGUISave:
je .nocheckbox4 je .nocheckbox4
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox4 .nocheckbox4
; GUIDisplayIconWin 20,11,60,[GUITemp] GUIDisplayIconWin 20,11,60,[GUITemp]
ret ret
SECTION .data SECTION .data