Mapper 190 support (Magic Kid GooGoo)

This commit is contained in:
Souryo 2017-02-18 12:48:06 -05:00
parent 6eb6181aab
commit d44c8f7808
4 changed files with 35 additions and 0 deletions

View file

@ -440,6 +440,7 @@
<ClInclude Include="DebugBreakHelper.h" />
<ClInclude Include="DebuggerTypes.h" />
<ClInclude Include="LabelManager.h" />
<ClInclude Include="MagicKidGooGoo.h" />
<ClInclude Include="MemoryAccessCounter.h" />
<ClInclude Include="MemoryDumper.h" />
<ClInclude Include="DebugState.h" />

View file

@ -1111,6 +1111,9 @@
<ClInclude Include="AviRecorder.h">
<Filter>Misc</Filter>
</ClInclude>
<ClInclude Include="MagicKidGooGoo.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

29
Core/MagicKidGooGoo.h Normal file
View file

@ -0,0 +1,29 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class MagicKidGooGoo : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
virtual uint16_t GetCHRPageSize() override { return 0x800; }
void InitMapper() override
{
SelectPRGPage(0, 0);
SelectPRGPage(1, 0);
SelectChrPage4x(0, 0);
SetMirroringType(MirroringType::Vertical);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
if(addr >= 0x8000 && addr <= 0x9FFF) {
SelectPRGPage(0, value & 0x07);
} else if(addr >= 0xC000 && addr <= 0xDFFF) {
SelectPRGPage(0, (value & 0x07) | 0x08);
} else if((addr & 0xA000) == 0xA000) {
SelectCHRPage(addr & 0x03, value);
}
}
};

View file

@ -70,6 +70,7 @@
#include "Lh10.h"
#include "Lh32.h"
#include "Malee.h"
#include "MagicKidGooGoo.h"
#include "Mapper15.h"
#include "Mapper35.h"
#include "Mapper40.h"
@ -429,6 +430,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case 187: return new MMC3_187();
case 188: return new BandaiKaraoke();
case 189: return new MMC3_189();
case 190: return new MagicKidGooGoo();
case 191: return new MMC3_ChrRam(0x80, 0xFF, 2);
case 192: return new MMC3_ChrRam(0x08, 0x0B, 4);
case 193: return new NtdecTc112();