Backport UNIF: Add BMC-SA005-A board (Mapper 338)

This commit is contained in:
LibretroAdmin committed 2022-08-29 20:52:06 +02:00
1 parent 60046f9a17
commit 19946e63df
3 files changed
+32 -1

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
// INES Mapper 200 is similar but with the mirroring bit's meaning flipped, and the mirroring bit being also used as a fourth bank bit.
class BmcSa005A : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
virtual uint16_t GetCHRPageSize() override { return 0x2000; }
void InitMapper() override
{
SelectPRGPage(0, 0);
SelectPRGPage(1, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
uint8_t bank = addr & 0x0F;
SelectPRGPage(0, bank);
SelectPRGPage(1, bank);
SelectCHRPage(0, bank);
SetMirroringType(addr & 0x08 ? MirroringType::Vertical : MirroringType::Horizontal);
}
};
+2 -1
View File
@@ -43,6 +43,7 @@
#include "BmcK3046.h"
#include "BmcNtd03.h"
#include "BmcS2009.h"
#include "BmcSa005A.h"
#include "BmcCtc09.h"
#include "BnRom.h"
#include "Bs5.h"
@@ -616,7 +617,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case 335: return new BmcCtc09();
case 336: return new BmcK3046();
case 337: break; //CTC-12IN1
case 338: break; //SA005-A
case 338: return new BmcSa005A();
case 339: return new MMC3_BmcK3006();
case 340: return new BmcK3036();
case 341: break; //TJ-03
+1
View File
@@ -181,4 +181,5 @@ std::unordered_map<string, int> UnifLoader::_boardMappings = std::unordered_map<
{ "K-3033", 322 },
{ "K-3036", 340 },
{ "L6IN1", 345 },
{ "SA005-A", 338 },
};