Mapper 174 support (untested)

This commit is contained in:
Souryo 2017-05-08 22:55:23 -04:00
parent ad41b0561a
commit bd3677e29f
4 changed files with 37 additions and 1 deletions

View File

@ -412,6 +412,7 @@
<ClInclude Include="Assembler.h" />
<ClInclude Include="AutomaticRomTest.h" />
<ClInclude Include="FceuxMovie.h" />
<ClInclude Include="Mapper174.h" />
<ClInclude Include="Rambo1_158.h" />
<ClInclude Include="RecordedRomTest.h" />
<ClInclude Include="AutoSaveManager.h" />

View File

@ -1174,6 +1174,9 @@
<ClInclude Include="Rambo1_158.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
<ClInclude Include="Mapper174.h">
<Filter>Nes\Mappers\Unnamed</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

30
Core/Mapper174.h Normal file
View File

@ -0,0 +1,30 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
//NTDec 5-in-1 cart - untested, based on Wiki description
class Mapper174 : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
virtual uint16_t GetCHRPageSize() override { return 0x2000; }
void InitMapper() override
{
WriteRegister(0x8000, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
uint8_t prgBank = (addr >> 4) & 0x07;
if(addr & 0x80) {
SelectPrgPage2x(0, prgBank & 0xFE);
} else {
SelectPRGPage(0, prgBank);
SelectPRGPage(1, prgBank);
}
SelectCHRPage(0, (addr >> 1) & 0x07);
SetMirroringType(addr & 0x01 ? MirroringType::Horizontal : MirroringType::Vertical);
}
};

View File

@ -95,6 +95,7 @@
#include "Mapper117.h"
#include "Mapper120.h"
#include "Mapper170.h"
#include "Mapper174.h"
#include "Mapper183.h"
#include "Mapper200.h"
#include "Mapper201.h"
@ -259,7 +260,7 @@ Supported mappers:
|112|113|114|115| |117|118|119|120|121|===|123|===|125|126|===|
|===|===|===|===|132|133|134|===|136|137|138|139|140|141|142|143|
|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|
|---|===|162|163|164|165|166|167|168|===|170|171|172|173|===|175|
|---|===|162|163|164|165|166|167|168|===|170|171|172|173|174|175|
|176|177|178|179|180|---|182|183|184|185|186|187|188|189|190|191|
|192|193|194|195|196|197| |199|200|201|202|203|204|205|206|207|
|???|209|210|211|212|213|214|215|216|217|218|219|220|221|222|???|
@ -431,6 +432,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case 171: return new Kaiser7058();
case 172: return new Txc22211B();
case 173: return new Txc22211C();
case 174: return new Mapper174();
case 175: return new Kaiser7022();
case 176: return new Waixing176();
case 177: return new Henggedianzi177();