UNIF KS7012 board support

This commit is contained in:
Souryo 2016-11-12 10:27:20 -05:00
parent dda0bfe346
commit ab5ef9947f
6 changed files with 32 additions and 1 deletions

View File

@ -465,6 +465,7 @@
<ClInclude Include="JalecoJf17_19.h" />
<ClInclude Include="JyCompany.h" />
<ClInclude Include="Kaiser202.h" />
<ClInclude Include="Kaiser7012.h" />
<ClInclude Include="Kaiser7013B.h" />
<ClInclude Include="Kaiser7022.h" />
<ClInclude Include="Kaiser7037.h" />

View File

@ -1072,6 +1072,9 @@
<ClInclude Include="Kaiser7013B.h">
<Filter>Nes\Mappers\Unif</Filter>
</ClInclude>
<ClInclude Include="Kaiser7012.h">
<Filter>Nes\Mappers\Unif</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

24
Core/Kaiser7012.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class Kaiser7012 : public BaseMapper
{
protected:
uint16_t GetPRGPageSize() override { return 0x8000; }
uint16_t GetCHRPageSize() override { return 0x2000; }
void InitMapper() override
{
SelectPRGPage(0, 1);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
switch(addr) {
case 0xE0A0: SelectPRGPage(0, 0); break;
case 0xEE36: SelectPRGPage(0, 1); break;
}
}
};

View File

@ -60,6 +60,7 @@
#include "JalecoSs88006.h"
#include "JyCompany.h"
#include "Kaiser202.h"
#include "Kaiser7012.h"
#include "Kaiser7013B.h"
#include "Kaiser7016.h"
#include "Kaiser7022.h"
@ -503,6 +504,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case UnifBoards::Gs2013: return new Gs2013();
case UnifBoards::Hp898f: return new Hp898f();
case UnifBoards::Kof97: return new MMC3_Kof97();
case UnifBoards::Ks7012: return new Kaiser7012();
case UnifBoards::Ks7013B: return new Kaiser7013B();
case UnifBoards::Ks7016: return new Kaiser7016();
case UnifBoards::Ks7037: return new Kaiser7037();

View File

@ -43,5 +43,6 @@ namespace UnifBoards {
Ks7037,
Ks7057,
Ks7013B,
Ks7012,
};
}

View File

@ -61,7 +61,7 @@ private:
{ "KOF97", UnifBoards::Kof97 },
{ "KONAMI-QTAI", UnifBoards::UnknownBoard },
{ "KS7010", UnifBoards::UnknownBoard },
{ "KS7012", UnifBoards::UnknownBoard },
{ "KS7012", UnifBoards::Ks7012 },
{ "KS7013B", UnifBoards::Ks7013B },
{ "KS7016", UnifBoards::Ks7016 },
{ "KS7017", UnifBoards::UnknownBoard },