mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-26 03:01:51 +01:00
Snes9x - Add 128KByte SRAM support in cheats (#976)
This commit is contained in:
parent
514d6c88ff
commit
5bff07b305
@ -146,7 +146,7 @@ const char * S9xGameGenieToRaw (const char *code, uint32 &address, uint8 &byte)
|
|||||||
void S9xStartCheatSearch (SCheatData *d)
|
void S9xStartCheatSearch (SCheatData *d)
|
||||||
{
|
{
|
||||||
memmove(d->CWRAM, d->RAM, 0x20000);
|
memmove(d->CWRAM, d->RAM, 0x20000);
|
||||||
memmove(d->CSRAM, d->SRAM, 0x10000);
|
memmove(d->CSRAM, d->SRAM, 0x80000);
|
||||||
memmove(d->CIRAM, &d->FillRAM[0x3000], 0x2000);
|
memmove(d->CIRAM, &d->FillRAM[0x3000], 0x2000);
|
||||||
memset((char *) d->ALL_BITS, 0xff, 0x32000 >> 3);
|
memset((char *) d->ALL_BITS, 0xff, 0x32000 >> 3);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ struct SCheatData
|
|||||||
std::vector<struct SCheatGroup> g;
|
std::vector<struct SCheatGroup> g;
|
||||||
bool8 enabled;
|
bool8 enabled;
|
||||||
uint8 CWRAM[0x20000];
|
uint8 CWRAM[0x20000];
|
||||||
uint8 CSRAM[0x10000];
|
uint8 CSRAM[0x80000];
|
||||||
uint8 CIRAM[0x2000];
|
uint8 CIRAM[0x2000];
|
||||||
uint8 *RAM;
|
uint8 *RAM;
|
||||||
uint8 *FillRAM;
|
uint8 *FillRAM;
|
||||||
|
@ -62,7 +62,7 @@ static inline uint8 S9xGetByteFree (uint32 Address)
|
|||||||
|
|
||||||
case CMemory::MAP_HIROM_SRAM:
|
case CMemory::MAP_HIROM_SRAM:
|
||||||
case CMemory::MAP_RONLY_SRAM:
|
case CMemory::MAP_RONLY_SRAM:
|
||||||
byte = *(Memory.SRAM + (((Address & 0x7fff) - 0x6000 + ((Address & 0xf0000) >> 3)) & Memory.SRAMMask));
|
byte = *(Memory.SRAM + (((Address & 0x7fff) - 0x6000 + ((Address & 0x1f0000) >> 3)) & Memory.SRAMMask));
|
||||||
return (byte);
|
return (byte);
|
||||||
|
|
||||||
case CMemory::MAP_BWRAM:
|
case CMemory::MAP_BWRAM:
|
||||||
@ -153,7 +153,7 @@ static inline void S9xSetByteFree (uint8 Byte, uint32 Address)
|
|||||||
case CMemory::MAP_HIROM_SRAM:
|
case CMemory::MAP_HIROM_SRAM:
|
||||||
if (Memory.SRAMMask)
|
if (Memory.SRAMMask)
|
||||||
{
|
{
|
||||||
*(Memory.SRAM + (((Address & 0x7fff) - 0x6000 + ((Address & 0xf0000) >> 3)) & Memory.SRAMMask)) = Byte;
|
*(Memory.SRAM + (((Address & 0x7fff) - 0x6000 + ((Address & 0x1f0000) >> 3)) & Memory.SRAMMask)) = Byte;
|
||||||
CPU.SRAMModified = TRUE;
|
CPU.SRAMModified = TRUE;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user