Fixed SRAM issue.

This commit is contained in:
n-a-c-h
2004-01-13 17:55:23 +00:00
parent 46522a3f6b
commit 4459682a02
2 changed files with 7 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ EXTSYM ScrDispl,wramreadptr,wramwriteptr
EXTSYM pl1Ltk,pl1Rtk,pl2Ltk,pl2Rtk,pl3Ltk,pl3Rtk,pl4Ltk,pl4Rtk,pl5Ltk,pl5Rtk EXTSYM pl1Ltk,pl1Rtk,pl2Ltk,pl2Rtk,pl3Ltk,pl3Rtk,pl4Ltk,pl4Rtk,pl5Ltk,pl5Rtk
EXTSYM loadstate2, headerhack EXTSYM loadstate2, headerhack
;initc.c ;initc.c
EXTSYM clearmem,clearmem2 EXTSYM clearmem,clearSPCRAM
EXTSYM PatchUsingIPS EXTSYM PatchUsingIPS
EXTSYM loadZipFile EXTSYM loadZipFile
EXTSYM ZOpenFileName EXTSYM ZOpenFileName
@@ -1492,7 +1492,7 @@ NEWSYM init65816
; Clear SPC Memory ; Clear SPC Memory
pushad pushad
call clearmem2 call clearSPCRAM
popad popad
; Clear Sound buffer ; Clear Sound buffer

View File

@@ -841,7 +841,7 @@ void clearmem()
clearmem2(); clearmem2();
} }
void clearmem2() void clearSPCRAM()
{ {
/* /*
SPC RAM is filled with alternating 0x00 and 0xFF for 0x20 bytes. SPC RAM is filled with alternating 0x00 and 0xFF for 0x20 bytes.
@@ -862,8 +862,12 @@ void clearmem2()
memset(spcRam+i, 0, 0x20); memset(spcRam+i, 0, 0x20);
memset(spcRam+i+0x20, 0xFF, 0x20); memset(spcRam+i+0x20, 0xFF, 0x20);
} }
}
void clearmem2()
{
memset(sram, 0xFF, 16384); memset(sram, 0xFF, 16384);
clearSPCRAM;
} }