UNIF: Added support for EH8813A boards
This commit is contained in:
parent
7e35d5b99e
commit
756bac00d1
6 changed files with 67 additions and 2 deletions
|
@ -439,6 +439,7 @@
|
|||
<ClInclude Include="DaouInfosys.h" />
|
||||
<ClInclude Include="DebugBreakHelper.h" />
|
||||
<ClInclude Include="DebuggerTypes.h" />
|
||||
<ClInclude Include="Eh8813A.h" />
|
||||
<ClInclude Include="LabelManager.h" />
|
||||
<ClInclude Include="MagicKidGooGoo.h" />
|
||||
<ClInclude Include="MemoryAccessCounter.h" />
|
||||
|
|
|
@ -1114,6 +1114,9 @@
|
|||
<ClInclude Include="MagicKidGooGoo.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Eh8813A.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
58
Core/Eh8813A.h
Normal file
58
Core/Eh8813A.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Eh8813A : public BaseMapper
|
||||
{
|
||||
private:
|
||||
uint8_t _dipSwitch;
|
||||
bool _alterReadAddress;
|
||||
|
||||
protected:
|
||||
uint16_t GetPRGPageSize() override { return 0x4000; }
|
||||
uint16_t GetCHRPageSize() override { return 0x2000; }
|
||||
bool AllowRegisterRead() override { return true; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
_dipSwitch = -1;
|
||||
SetMirroringType(MirroringType::Vertical);
|
||||
}
|
||||
|
||||
void Reset(bool softReset) override
|
||||
{
|
||||
WriteRegister(0x8000, 0);
|
||||
_dipSwitch++;
|
||||
_alterReadAddress = false;
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
BaseMapper::StreamState(saving);
|
||||
Stream(_dipSwitch, _alterReadAddress);
|
||||
}
|
||||
|
||||
uint8_t ReadRegister(uint16_t addr) override
|
||||
{
|
||||
if(_alterReadAddress) {
|
||||
addr = (addr & 0xFFF0) + _dipSwitch;
|
||||
}
|
||||
return InternalReadRam(addr);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
if((addr & 0x0100) == 0) {
|
||||
_alterReadAddress = (addr & 0x40) == 0x40;
|
||||
|
||||
if(addr & 0x80) {
|
||||
SelectPRGPage(0, addr & 0x07);
|
||||
SelectPRGPage(1, addr & 0x07);
|
||||
} else {
|
||||
SelectPrgPage2x(0, addr & 0x06);
|
||||
}
|
||||
|
||||
SelectCHRPage(0, value & 0x0F);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -39,6 +39,7 @@
|
|||
#include "DaouInfosys.h"
|
||||
#include "DreamTech01.h"
|
||||
#include "Edu2000.h"
|
||||
#include "Eh8813A.h"
|
||||
#include "FDS.h"
|
||||
#include "FrontFareast.h"
|
||||
#include "Ghostbusters63in1.h"
|
||||
|
@ -250,7 +251,7 @@ Supported mappers:
|
|||
|===|===|===|===|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|
|
||||
|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|???|
|
||||
|???|225|226|227|228|229|230|231|232|233|234|235|236|===|238|===|
|
||||
|
@ -508,6 +509,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
case UnifBoards::Coolboy: return new MMC3_Coolboy();
|
||||
case UnifBoards::DreamTech01: return new DreamTech01();
|
||||
case UnifBoards::Edu2000: return new Edu2000();
|
||||
case UnifBoards::Eh8813A: return new Eh8813A();
|
||||
case UnifBoards::Ghostbusters63in1: return new Ghostbusters63in1();
|
||||
case UnifBoards::Gs2004: return new Gs2004();
|
||||
case UnifBoards::Gs2013: return new Gs2013();
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace UnifBoards {
|
|||
StreetHeroes,
|
||||
DreamTech01,
|
||||
Edu2000,
|
||||
Eh8813A,
|
||||
Gs2013,
|
||||
Gs2004,
|
||||
NovelDiamond,
|
||||
|
|
|
@ -153,7 +153,7 @@ private:
|
|||
{ "SB-2000", UnifBoards::UnknownBoard },
|
||||
{ "158B", UnifBoards::UnknownBoard },
|
||||
{ "DRAGONFIGHTER", UnifBoards::UnknownBoard },
|
||||
{ "EH8813A", UnifBoards::UnknownBoard },
|
||||
{ "EH8813A", UnifBoards::Eh8813A },
|
||||
{ "HP898F", UnifBoards::Hp898f },
|
||||
{ "F-15", UnifBoards::BmcF15 },
|
||||
{ "RT-01", UnifBoards::Rt01 },
|
||||
|
|
Loading…
Add table
Reference in a new issue