Fixed power cycle bug - memory handlers were not reset and kept piling up, which caused mirroring issues.
This commit is contained in:
parent
206214ce2b
commit
9c20e48957
1 changed files with 3 additions and 0 deletions
|
@ -343,6 +343,9 @@ void BaseCartridge::SaveBattery()
|
||||||
|
|
||||||
void BaseCartridge::Init(MemoryMappings &mm)
|
void BaseCartridge::Init(MemoryMappings &mm)
|
||||||
{
|
{
|
||||||
|
_prgRomHandlers.clear();
|
||||||
|
_saveRamHandlers.clear();
|
||||||
|
|
||||||
for(uint32_t i = 0; i < _prgRomSize; i += 0x1000) {
|
for(uint32_t i = 0; i < _prgRomSize; i += 0x1000) {
|
||||||
_prgRomHandlers.push_back(unique_ptr<RomHandler>(new RomHandler(_prgRom, i, _prgRomSize, SnesMemoryType::PrgRom)));
|
_prgRomHandlers.push_back(unique_ptr<RomHandler>(new RomHandler(_prgRom, i, _prgRomSize, SnesMemoryType::PrgRom)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue