Added support for mapper 324 (FARID-UNROM)
This commit is contained in:
parent
5c1ac8dd54
commit
b0c64ec332
5 changed files with 61 additions and 1 deletions
|
@ -532,6 +532,7 @@
|
|||
<ClInclude Include="DragonFighter.h" />
|
||||
<ClInclude Include="DrawScreenBufferCommand.h" />
|
||||
<ClInclude Include="FaridSlrom.h" />
|
||||
<ClInclude Include="FaridUnrom.h" />
|
||||
<ClInclude Include="FdsSystemActionManager.h" />
|
||||
<ClInclude Include="Gkcx1.h" />
|
||||
<ClInclude Include="HdPackConditions.h" />
|
||||
|
|
|
@ -1462,6 +1462,9 @@
|
|||
<ClInclude Include="FaridSlrom.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FaridUnrom.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
54
Core/FaridUnrom.h
Normal file
54
Core/FaridUnrom.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class FaridUnrom : public BaseMapper
|
||||
{
|
||||
private:
|
||||
uint8_t _reg;
|
||||
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
|
||||
virtual uint16_t GetCHRPageSize() override { return 0x2000; }
|
||||
bool HasBusConflicts() override { return true; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
SelectPRGPage(0, 0);
|
||||
SelectPRGPage(1, 7);
|
||||
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
void Reset(bool softReset) override
|
||||
{
|
||||
BaseMapper::Reset(softReset);
|
||||
|
||||
if(softReset) {
|
||||
_reg = _reg & 0x87;
|
||||
} else {
|
||||
_reg = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
BaseMapper::StreamState(saving);
|
||||
Stream(_reg);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
bool locked = _reg & 0x08;
|
||||
if(!locked && (_reg & 0x80) == 0 && (value & 0x80)) {
|
||||
//Latch bits
|
||||
_reg = (_reg & 0x87) | (value & 0x78);
|
||||
}
|
||||
_reg = (_reg & 0x78) | (value & 0x87);
|
||||
|
||||
uint8_t outer = _reg & 0x70;
|
||||
|
||||
SelectPRGPage(0, (_reg & 0x07) | (outer >> 1));
|
||||
SelectPRGPage(1, 0x07 | (outer >> 1));
|
||||
}
|
||||
};
|
|
@ -56,6 +56,7 @@
|
|||
#include "Eh8813A.h"
|
||||
#include "FamicomBox.h"
|
||||
#include "FaridSlrom.h"
|
||||
#include "FaridUnrom.h"
|
||||
#include "FDS.h"
|
||||
#include "FrontFareast.h"
|
||||
#include "Ghostbusters63in1.h"
|
||||
|
@ -592,7 +593,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
//321
|
||||
case 322: break; //K-3033
|
||||
case 323: return new FaridSlrom();
|
||||
case 324: break; //FARID_UNROM_8-IN-1
|
||||
case 324: return new FaridUnrom();
|
||||
case 325: return new MMC3_MaliSB();
|
||||
case 327: break; //10-24-C-A1
|
||||
case 328: return new Rt01();
|
||||
|
|
|
@ -44,6 +44,7 @@ std::unordered_map<string, int> UnifLoader::_boardMappings = std::unordered_map<
|
|||
{ "ETROM", 5 },
|
||||
{ "EWROM", 5 },
|
||||
{ "FARID_SLROM_8-IN-1", 323 },
|
||||
{ "FARID_UNROM_8-IN-1", 324 },
|
||||
{ "FK23C", UnifBoards::Fk23C },
|
||||
{ "FK23CA", UnifBoards::Fk23Ca },
|
||||
{ "FS304", 162 },
|
||||
|
|
Loading…
Add table
Reference in a new issue