Some SRAM stuff cleanup, slight fix.

This commit is contained in:
n-a-c-h
2004-12-08 23:43:27 +00:00
parent 5cf0e6918b
commit 1005559163
2 changed files with 35 additions and 57 deletions

View File

@@ -395,6 +395,7 @@ void MirrorROM()
#define SRAMSizeOffset 24
#define CompanyOffset 26
extern bool SFXEnable;
extern bool SETAEnable;
void SetupSramSize()
{
unsigned char *ROM = (unsigned char *)romdata;
@@ -409,6 +410,10 @@ void SetupSramSize()
ramsize = 256;
}
}
else if (SETAEnable)
{
ramsize = 32;
}
else
{
ramsize = ((ROM[infoloc+SRAMSizeOffset]) ? (8 << ((unsigned int)ROM[infoloc+SRAMSizeOffset])) : 0);