UNIF UNL-43272 board support
This commit is contained in:
parent
49d627525a
commit
2bfc30cfcf
4 changed files with 50 additions and 1 deletions
|
@ -213,6 +213,7 @@
|
|||
#include "Txc22211B.h"
|
||||
#include "Txc22211C.h"
|
||||
#include "TxSRom.h"
|
||||
#include "Unl43272.h"
|
||||
#include "UnlPci556.h"
|
||||
#include "UNROM.h"
|
||||
#include "UnRom_94.h"
|
||||
|
@ -523,6 +524,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
case UnifBoards::Super40in1Ws: return new Super40in1Ws();
|
||||
case UnifBoards::T262: return new T262();
|
||||
case UnifBoards::Tf1201: return new Tf1201();
|
||||
case UnifBoards::Unl43272: return new Unl43272();
|
||||
|
||||
case MapperFactory::NsfMapperID: return new NsfMapper();
|
||||
case MapperFactory::FdsMapperID: return new FDS();
|
||||
|
|
|
@ -45,5 +45,6 @@ namespace UnifBoards {
|
|||
Ks7013B,
|
||||
Ks7012,
|
||||
MaliSB,
|
||||
Unl43272,
|
||||
};
|
||||
}
|
|
@ -17,7 +17,7 @@ private:
|
|||
{ "3D-BLOCK", UnifBoards::UnknownBoard },
|
||||
{ "411120-C", UnifBoards::UnknownBoard },
|
||||
{ "42in1ResetSwitch", 226 },
|
||||
{ "43272", UnifBoards::UnknownBoard },
|
||||
{ "43272", UnifBoards::Unl43272 },
|
||||
{ "603-5052", 238 },
|
||||
{ "64in1NoRepeat", UnifBoards::Bmc64in1NoRepeat },
|
||||
{ "70in1", UnifBoards::Bmc70in1 },
|
||||
|
|
46
Core/Unl43272.h
Normal file
46
Core/Unl43272.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Unl43272 : public BaseMapper
|
||||
{
|
||||
private:
|
||||
uint16_t _lastAddr;
|
||||
|
||||
protected:
|
||||
uint16_t GetPRGPageSize() override { return 0x8000; }
|
||||
uint16_t GetCHRPageSize() override { return 0x2000; }
|
||||
bool AllowRegisterRead() override { return true; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
SelectCHRPage(0, 0);
|
||||
SetMirroringType(MirroringType::Horizontal);
|
||||
}
|
||||
|
||||
void Reset(bool softReset) override
|
||||
{
|
||||
BaseMapper::Reset(softReset);
|
||||
WriteRegister(0x8081, 0);
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
BaseMapper::StreamState(saving);
|
||||
Stream(_lastAddr);
|
||||
}
|
||||
|
||||
uint8_t ReadRegister(uint16_t addr) override
|
||||
{
|
||||
return InternalReadRam(_lastAddr & 0x400 ? (addr & 0xFE) : addr);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
_lastAddr = addr;
|
||||
|
||||
if((addr & 0x81) == 0x81) {
|
||||
SelectPRGPage(0, (addr & 0x38) >> 3);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue