Added support for mapper 323 (FARID-SLROM)
This commit is contained in:
parent
dd6c011b10
commit
5c1ac8dd54
5 changed files with 62 additions and 1 deletions
|
@ -531,6 +531,7 @@
|
||||||
<ClInclude Include="Dance2000.h" />
|
<ClInclude Include="Dance2000.h" />
|
||||||
<ClInclude Include="DragonFighter.h" />
|
<ClInclude Include="DragonFighter.h" />
|
||||||
<ClInclude Include="DrawScreenBufferCommand.h" />
|
<ClInclude Include="DrawScreenBufferCommand.h" />
|
||||||
|
<ClInclude Include="FaridSlrom.h" />
|
||||||
<ClInclude Include="FdsSystemActionManager.h" />
|
<ClInclude Include="FdsSystemActionManager.h" />
|
||||||
<ClInclude Include="Gkcx1.h" />
|
<ClInclude Include="Gkcx1.h" />
|
||||||
<ClInclude Include="HdPackConditions.h" />
|
<ClInclude Include="HdPackConditions.h" />
|
||||||
|
|
|
@ -1459,6 +1459,9 @@
|
||||||
<ClInclude Include="Bmc830425C4391T.h">
|
<ClInclude Include="Bmc830425C4391T.h">
|
||||||
<Filter>Nes\Mappers\Unif</Filter>
|
<Filter>Nes\Mappers\Unif</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="FaridSlrom.h">
|
||||||
|
<Filter>Nes\Mappers\Unif</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
|
55
Core/FaridSlrom.h
Normal file
55
Core/FaridSlrom.h
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
#pragma once
|
||||||
|
#include "MMC1.h"
|
||||||
|
|
||||||
|
class FaridSlrom : public MMC1
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
uint8_t _outerBank;
|
||||||
|
bool _locked;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void InitMapper() override
|
||||||
|
{
|
||||||
|
AddRegisterRange(0x6000, 0x7FFF, MemoryOperation::Write);
|
||||||
|
MMC1::InitMapper();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset(bool softReset) override
|
||||||
|
{
|
||||||
|
MMC1::Reset(softReset);
|
||||||
|
|
||||||
|
_outerBank = 0;
|
||||||
|
_locked = false;
|
||||||
|
UpdateState();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamState(bool saving) override
|
||||||
|
{
|
||||||
|
MMC1::StreamState(saving);
|
||||||
|
Stream(_outerBank, _locked);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectCHRPage(uint16_t slot, uint16_t page, ChrMemoryType memoryType) override
|
||||||
|
{
|
||||||
|
MMC1::SelectCHRPage(slot, (_outerBank << 2) | (page & 0x1F), memoryType);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectPRGPage(uint16_t slot, uint16_t page, PrgMemoryType memoryType) override
|
||||||
|
{
|
||||||
|
MMC1::SelectPRGPage(slot, _outerBank | (page & 0x07), memoryType);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||||
|
{
|
||||||
|
if(addr < 0x8000) {
|
||||||
|
bool wramEnabled = (_state.RegE000 & 0x10) == 0;
|
||||||
|
if(wramEnabled && !_locked) {
|
||||||
|
_outerBank = (value & 0x70) >> 1;
|
||||||
|
_locked = (value & 0x08) == 0x08;
|
||||||
|
UpdateState();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
MMC1::WriteRegister(addr, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -55,6 +55,7 @@
|
||||||
#include "Edu2000.h"
|
#include "Edu2000.h"
|
||||||
#include "Eh8813A.h"
|
#include "Eh8813A.h"
|
||||||
#include "FamicomBox.h"
|
#include "FamicomBox.h"
|
||||||
|
#include "FaridSlrom.h"
|
||||||
#include "FDS.h"
|
#include "FDS.h"
|
||||||
#include "FrontFareast.h"
|
#include "FrontFareast.h"
|
||||||
#include "Ghostbusters63in1.h"
|
#include "Ghostbusters63in1.h"
|
||||||
|
@ -590,7 +591,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||||
case 320: return new Bmc830425C4391T();
|
case 320: return new Bmc830425C4391T();
|
||||||
//321
|
//321
|
||||||
case 322: break; //K-3033
|
case 322: break; //K-3033
|
||||||
case 323: break; //FARID_SLROM_8-IN-1
|
case 323: return new FaridSlrom();
|
||||||
case 324: break; //FARID_UNROM_8-IN-1
|
case 324: break; //FARID_UNROM_8-IN-1
|
||||||
case 325: return new MMC3_MaliSB();
|
case 325: return new MMC3_MaliSB();
|
||||||
case 327: break; //10-24-C-A1
|
case 327: break; //10-24-C-A1
|
||||||
|
|
|
@ -43,6 +43,7 @@ std::unordered_map<string, int> UnifLoader::_boardMappings = std::unordered_map<
|
||||||
{ "ELROM", 5 },
|
{ "ELROM", 5 },
|
||||||
{ "ETROM", 5 },
|
{ "ETROM", 5 },
|
||||||
{ "EWROM", 5 },
|
{ "EWROM", 5 },
|
||||||
|
{ "FARID_SLROM_8-IN-1", 323 },
|
||||||
{ "FK23C", UnifBoards::Fk23C },
|
{ "FK23C", UnifBoards::Fk23C },
|
||||||
{ "FK23CA", UnifBoards::Fk23Ca },
|
{ "FK23CA", UnifBoards::Fk23Ca },
|
||||||
{ "FS304", 162 },
|
{ "FS304", 162 },
|
||||||
|
|
Loading…
Add table
Reference in a new issue