Mapper 200 support

This commit is contained in:
Souryo 2016-01-18 22:48:09 -05:00
parent f72b88def8
commit a4617b84f1
4 changed files with 33 additions and 0 deletions

View File

@ -198,6 +198,7 @@
<ClInclude Include="ExpressionEvaluator.h" />
<ClInclude Include="HdVideoFilter.h" />
<ClInclude Include="IremTamS1.h" />
<ClInclude Include="Mapper200.h" />
<ClInclude Include="Mapper231.h" />
<ClInclude Include="Mapper240.h" />
<ClInclude Include="Mapper242.h" />

View File

@ -371,6 +371,9 @@
<ClInclude Include="Mapper231.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
<ClInclude Include="Mapper200.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

27
Core/Mapper200.h Normal file
View File

@ -0,0 +1,27 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class Mapper200 : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() { return 0x4000; }
virtual uint16_t GetCHRPageSize() { return 0x2000; }
void InitMapper()
{
SelectPRGPage(0, 0);
SelectPRGPage(1, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value)
{
uint8_t bank = addr & 0x07;
SelectPRGPage(0, bank);
SelectPRGPage(1, bank);
SelectCHRPage(0, bank);
SetMirroringType(addr & 0x08 ? MirroringType::Vertical : MirroringType::Horizontal);
}
};

View File

@ -15,6 +15,7 @@
#include "IremTamS1.h"
#include "JalecoJfxx.h"
#include "JalecoSs88006.h"
#include "Mapper200.h"
#include "Mapper231.h"
#include "Mapper240.h"
#include "Mapper242.h"
@ -111,6 +112,7 @@ BaseMapper* MapperFactory::GetMapperFromID(ROMLoader &romLoader)
case 184: return new Sunsoft184();
case 185: return new CNROM(true);
case 189: return new MMC3_189();
case 200: return new Mapper200();
case 206: return new Namco108();
case 231: return new Mapper231();
case 232: return new BF9096();