Added support for mapper 336 (BMC-K-3046)

This commit is contained in:
Sour 2018-07-08 16:57:14 -04:00
parent b0c64ec332
commit 14bab5db7a
5 changed files with 33 additions and 1 deletions

26
Core/BmcK3046.h Normal file
View file

@ -0,0 +1,26 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class BmcK3046 : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
virtual uint16_t GetCHRPageSize() override { return 0x2000; }
void InitMapper() override
{
SelectPRGPage(0, 0);
SelectPRGPage(1, 7);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
uint8_t inner = value & 0x07;
uint8_t outer = value & 0x38;
SelectPRGPage(0, outer | inner);
SelectPRGPage(1, outer | 7);
}
};

View file

@ -526,6 +526,7 @@
<ClInclude Include="Bmc8in1.h" />
<ClInclude Include="BmcGn45.h" />
<ClInclude Include="BmcHpxx.h" />
<ClInclude Include="BmcK3046.h" />
<ClInclude Include="CityFighter.h" />
<ClInclude Include="ControlDeviceState.h" />
<ClInclude Include="Dance2000.h" />

View file

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

View file

@ -37,6 +37,7 @@
#include "BmcG146.h"
#include "BmcGn45.h"
#include "BmcHpxx.h"
#include "BmcK3046.h"
#include "BmcNtd03.h"
#include "BnRom.h"
#include "Bs5.h"
@ -604,7 +605,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case 333: return new Bmc8in1(); // + NEWSTAR-GRM070-8IN1
//334
case 335: break; //CTC-09
case 336: break; //K-3046
case 336: return new BmcK3046();
case 337: break; //CTC-12IN1
case 338: break; //SA005-A
case 339: break; //K-3006

View file

@ -57,6 +57,7 @@ std::unordered_map<string, int> UnifLoader::_boardMappings = std::unordered_map<
{ "HKROM", 4 },
{ "KOF97", 263 },
{ "KONAMI-QTAI", 190 },
{ "K-3046", 336 },
{ "KS7010", UnifBoards::UnknownBoard },
{ "KS7012", 346 },
{ "KS7013B", 312 },