mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-27 02:50:28 +00:00
UNIF BMC-11160 board support
This commit is contained in:
parent
55890015d0
commit
c3edf7a951
28
Core/Bmc11160.h
Normal file
28
Core/Bmc11160.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Bmc11160 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
uint16_t GetPRGPageSize() override { return 0x8000; }
|
||||
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 bank = (value >> 4) & 0x07;
|
||||
SelectPRGPage(0, bank);
|
||||
SelectCHRPage(0, (bank << 2) | (value & 0x03));
|
||||
SetMirroringType(value & 0x80 ? MirroringType::Vertical : MirroringType::Horizontal);
|
||||
}
|
||||
};
|
@ -417,6 +417,7 @@
|
||||
<ClInclude Include="Bb.h" />
|
||||
<ClInclude Include="BF9096.h" />
|
||||
<ClInclude Include="BF909x.h" />
|
||||
<ClInclude Include="Bmc11160.h" />
|
||||
<ClInclude Include="Bmc190in1.h" />
|
||||
<ClInclude Include="Bmc255.h" />
|
||||
<ClInclude Include="Bmc51.h" />
|
||||
|
@ -1045,6 +1045,9 @@
|
||||
<ClInclude Include="BmcNtd03.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Bmc11160.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "Bb.h"
|
||||
#include "BF909x.h"
|
||||
#include "BF9096.h"
|
||||
#include "Bmc11160.h"
|
||||
#include "Bmc51.h"
|
||||
#include "Bmc63.h"
|
||||
#include "Bmc70in1.h"
|
||||
@ -474,6 +475,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case UnifBoards::Ac08: return new Ac08();
|
||||
case UnifBoards::Ax5705: return new Ax5705();
|
||||
case UnifBoards::Bb: return new Bb();
|
||||
case UnifBoards::Bmc11160: return new Bmc11160();
|
||||
case UnifBoards::Bmc70in1: return new Bmc70in1();
|
||||
case UnifBoards::Bmc70in1B: return new Bmc70in1();
|
||||
case UnifBoards::Bmc190in1: return new Bmc190in1();
|
||||
|
@ -33,6 +33,7 @@ namespace UnifBoards {
|
||||
Bb,
|
||||
Ac08,
|
||||
BmcG146,
|
||||
BmdNtd03
|
||||
BmdNtd03,
|
||||
Bmc11160
|
||||
};
|
||||
}
|
@ -9,7 +9,7 @@ class UnifLoader
|
||||
{
|
||||
private:
|
||||
std::unordered_map<string, int> _boardMappings = {
|
||||
{ "11160", UnifBoards::UnknownBoard },
|
||||
{ "11160", UnifBoards::Bmc11160 },
|
||||
{ "12-IN-1", UnifBoards::UnknownBoard },
|
||||
{ "13in1JY110", UnifBoards::UnknownBoard },
|
||||
{ "190in1", UnifBoards::Bmc190in1 },
|
||||
|
Loading…
Reference in New Issue
Block a user