mirror of
https://github.com/NovaSquirrel/Mesen-X.git
synced 2024-06-01 02:48:18 -04:00
Add Mapper 334
This commit is contained in:
parent
911fc8bdeb
commit
6c3bb8a031
|
@ -797,6 +797,7 @@
|
|||
<ClInclude Include="MMC3_250.h" />
|
||||
<ClInclude Include="MMC3_254.h" />
|
||||
<ClInclude Include="MMC3_45.h" />
|
||||
<ClInclude Include="MMC3_334.h" />
|
||||
<ClInclude Include="MMC3_422.h" />
|
||||
<ClInclude Include="MMC3_534.h" />
|
||||
<ClInclude Include="Mapper57.h" />
|
||||
|
|
|
@ -1459,6 +1459,9 @@
|
|||
<ClInclude Include="MMC3_224.h">
|
||||
<Filter>Nes\Mappers\MMC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MMC3_334.h">
|
||||
<Filter>Nes\Mappers\MMC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FamicomBox.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
|
|
45
Core/MMC3_334.h
Normal file
45
Core/MMC3_334.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
#include "MMC3.h"
|
||||
|
||||
class MMC3_334 : public MMC3
|
||||
{
|
||||
protected:
|
||||
uint32_t GetDipSwitchCount() override { return 1; }
|
||||
bool AllowRegisterRead() override { return true; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
MMC3::InitMapper();
|
||||
SelectPrgPage4x(0, -4);
|
||||
SelectChrPage8x(0, 0);
|
||||
AddRegisterRange(0x6000, 0x7FFF, MemoryOperation::Any);
|
||||
RemoveRegisterRange(0x8000, 0xFFFF, MemoryOperation::Read);
|
||||
}
|
||||
|
||||
void UpdatePrgMapping() override
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t ReadRegister(uint16_t addr) override
|
||||
{
|
||||
uint8_t value = _console->GetMemoryManager()->GetOpenBus();
|
||||
|
||||
if(addr & 0x02) {
|
||||
value &= ~0x01;
|
||||
value |= GetDipSwitches() & 0x01;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
if(addr < 0x8000) {
|
||||
if(!(addr & 0x01)) {
|
||||
SelectPrgPage4x(0, (value & 0xFE) << 1);
|
||||
}
|
||||
} else {
|
||||
MMC3::WriteRegister(addr, value);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -195,6 +195,7 @@
|
|||
#include "MMC3_249.h"
|
||||
#include "MMC3_250.h"
|
||||
#include "MMC3_254.h"
|
||||
#include "MMC3_334.h"
|
||||
#include "MMC3_422.h"
|
||||
#include "MMC3_534.h"
|
||||
#include "MMC3_Bmc411120C.h"
|
||||
|
@ -633,7 +634,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
case 331: return new Bmc12in1();
|
||||
case 332: return new Super40in1Ws();
|
||||
case 333: return new Bmc8in1(); // + NEWSTAR-GRM070-8IN1
|
||||
//334
|
||||
case 334: return new MMC3_334();
|
||||
case 335: return new BmcCtc09();
|
||||
case 336: return new BmcK3046();
|
||||
case 337: return new BmcCtc12in1();
|
||||
|
|
Loading…
Reference in a new issue