Mapper 134 support
This commit is contained in:
parent
aa22e53337
commit
0d9bf8b8f7
4 changed files with 60 additions and 1 deletions
|
@ -476,6 +476,7 @@
|
|||
<ClInclude Include="Mapper234.h" />
|
||||
<ClInclude Include="Mapper183.h" />
|
||||
<ClInclude Include="Mapper253.h" />
|
||||
<ClInclude Include="MMC3_134.h" />
|
||||
<ClInclude Include="MMC3_196.h" />
|
||||
<ClInclude Include="MMC3_219.h" />
|
||||
<ClInclude Include="MMC3_238.h" />
|
||||
|
|
|
@ -931,6 +931,9 @@
|
|||
<ClInclude Include="ShortcutKeyHandler.h">
|
||||
<Filter>Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MMC3_134.h">
|
||||
<Filter>Nes\Mappers\MMC</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
53
Core/MMC3_134.h
Normal file
53
Core/MMC3_134.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "MMC3.h"
|
||||
|
||||
class MMC3_134 : public MMC3
|
||||
{
|
||||
private:
|
||||
uint8_t _exReg;
|
||||
|
||||
void SelectCHRPage(uint16_t slot, uint16_t page, ChrMemoryType memoryType = ChrMemoryType::Default) override
|
||||
{
|
||||
BaseMapper::SelectCHRPage(slot, (page & 0xFF) | ((_exReg & 0x20) << 3), memoryType);
|
||||
}
|
||||
|
||||
void SelectPRGPage(uint16_t slot, uint16_t page, PrgMemoryType memoryType = PrgMemoryType::PrgRom) override
|
||||
{
|
||||
BaseMapper::SelectPRGPage(slot, (page & 0x1F) | ((_exReg & 0x02) << 4), memoryType);
|
||||
}
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
MMC3::InitMapper();
|
||||
|
||||
AddRegisterRange(0x6001, 0x6001, MemoryOperation::Write);
|
||||
}
|
||||
|
||||
void Reset(bool softReset) override
|
||||
{
|
||||
BaseMapper::Reset(softReset);
|
||||
|
||||
if(softReset) {
|
||||
_exReg = 0;
|
||||
MMC3::UpdateState();
|
||||
}
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
MMC3::StreamState(saving);
|
||||
Stream(_exReg);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
if(addr == 0x6001) {
|
||||
_exReg = value;
|
||||
MMC3::UpdateState();
|
||||
} else {
|
||||
MMC3::WriteRegister(addr, value);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -101,6 +101,7 @@
|
|||
#include "MMC3_114.h"
|
||||
#include "MMC3_115.h"
|
||||
#include "MMC3_121.h"
|
||||
#include "MMC3_134.h"
|
||||
#include "MMC3_165.h"
|
||||
#include "MMC3_182.h"
|
||||
#include "MMC3_187.h"
|
||||
|
@ -192,7 +193,7 @@ Supported mappers:
|
|||
| 80|===| 82| |===| 85| 86| 87| 88| 89| 90| 91| 92| 93| 94| 95|
|
||||
| 96| 97|===| 99|...|101|===|103| |105|106|107|108|===|===|===|
|
||||
|112|113|114|115| |117|118|119|120|121|===| |===| | |===|
|
||||
|===|===|===|===|132|133| |===|136|137|138|139|140|141|142|143|
|
||||
|===|===|===|===|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| |159|
|
||||
|---|===|162|163|164|165|166|167|168|===|170|171|172|173|===|175|
|
||||
|176|177|178|179|180|---|182|183|184|185|186|187|188|189|===|191|
|
||||
|
@ -325,6 +326,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
case 121: return new MMC3_121();
|
||||
case 132: return new Txc22211A();
|
||||
case 133: return new Sachen_133();
|
||||
case 134: return new MMC3_134();
|
||||
case 136: return new Sachen_136();
|
||||
case 137: return new Sachen8259(Sachen8259Variant::Sachen8259D);
|
||||
case 138: return new Sachen8259(Sachen8259Variant::Sachen8259B);
|
||||
|
|
Loading…
Add table
Reference in a new issue