mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
UNIF BMC-NTD-03 board support
This commit is contained in:
parent
baf74f230f
commit
55890015d0
35
Core/BmcNtd03.h
Normal file
35
Core/BmcNtd03.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class BmcNtd03 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
uint16_t GetPRGPageSize() override { return 0x4000; }
|
||||
uint16_t GetCHRPageSize() override { return 0x2000; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
}
|
||||
|
||||
void Reset(bool softReset)
|
||||
{
|
||||
BaseMapper::Reset(softReset);
|
||||
WriteRegister(0x8000, 0);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
uint8_t prg = ((addr >> 10) & 0x1E);
|
||||
uint8_t chr= ((addr & 0x0300) >> 5) | (addr & 0x07);
|
||||
if(addr & 0x80) {
|
||||
SelectPRGPage(0, prg | ((addr >> 6) & 1));
|
||||
SelectPRGPage(1, prg | ((addr >> 6) & 1));
|
||||
} else {
|
||||
SelectPrgPage2x(0, prg & 0xFE);
|
||||
}
|
||||
|
||||
SelectCHRPage(0, chr);
|
||||
SetMirroringType(addr & 0x400 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
}
|
||||
};
|
@ -424,6 +424,7 @@
|
||||
<ClInclude Include="A65AS.h" />
|
||||
<ClInclude Include="Bmc70in1.h" />
|
||||
<ClInclude Include="BmcG146.h" />
|
||||
<ClInclude Include="BmcNtd03.h" />
|
||||
<ClInclude Include="BnRom.h" />
|
||||
<ClInclude Include="Bs5.h" />
|
||||
<ClInclude Include="Caltron41.h" />
|
||||
|
@ -1042,6 +1042,9 @@
|
||||
<ClInclude Include="BmcG146.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BmcNtd03.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "Bmc235.h"
|
||||
#include "Bmc255.h"
|
||||
#include "BmcG146.h"
|
||||
#include "BmcNtd03.h"
|
||||
#include "BnRom.h"
|
||||
#include "Bs5.h"
|
||||
#include "Caltron41.h"
|
||||
@ -477,6 +478,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case UnifBoards::Bmc70in1B: return new Bmc70in1();
|
||||
case UnifBoards::Bmc190in1: return new Bmc190in1();
|
||||
case UnifBoards::BmcG146: return new BmcG146();
|
||||
case UnifBoards::BmdNtd03: return new BmcNtd03();
|
||||
case UnifBoards::Bs5: return new Bs5();
|
||||
case UnifBoards::Cc21: return new Cc21();
|
||||
case UnifBoards::Coolboy: return new MMC3_Coolboy();
|
||||
|
@ -32,6 +32,7 @@ namespace UnifBoards {
|
||||
Hp898f,
|
||||
Bb,
|
||||
Ac08,
|
||||
BmcG146
|
||||
BmcG146,
|
||||
BmdNtd03
|
||||
};
|
||||
}
|
@ -82,7 +82,7 @@ private:
|
||||
{ "NROM-128", 0 },
|
||||
{ "NROM-256", 0 },
|
||||
{ "NTBROM", 68 },
|
||||
{ "NTD-03", UnifBoards::UnknownBoard },
|
||||
{ "NTD-03", UnifBoards::BmdNtd03 },
|
||||
{ "NovelDiamond9999999in1", UnifBoards::NovelDiamond },
|
||||
{ "OneBus", UnifBoards::UnknownBoard },
|
||||
{ "PEC-586", UnifBoards::UnknownBoard },
|
||||
|
Loading…
Reference in New Issue
Block a user