Mapper 78 support
This commit is contained in:
parent
fc2cc89fea
commit
b17c088995
6 changed files with 50 additions and 1 deletions
|
@ -367,6 +367,7 @@
|
|||
<ClInclude Include="ExpressionEvaluator.h" />
|
||||
<ClInclude Include="HdVideoFilter.h" />
|
||||
<ClInclude Include="IremTamS1.h" />
|
||||
<ClInclude Include="JalecoJf16.h" />
|
||||
<ClInclude Include="JalecoJf17_19.h" />
|
||||
<ClInclude Include="Mapper107.h" />
|
||||
<ClInclude Include="Mapper200.h" />
|
||||
|
|
|
@ -389,6 +389,9 @@
|
|||
<ClInclude Include="JalecoJf17_19.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="JalecoJf16.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
38
Core/JalecoJf16.h
Normal file
38
Core/JalecoJf16.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class JalecoJf16 : public BaseMapper
|
||||
{
|
||||
private:
|
||||
bool _isIremHolyDiver;
|
||||
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x4000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual bool HasBusConflicts() { return true; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
SelectPRGPage(0, 0);
|
||||
SelectPRGPage(1, -1);
|
||||
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
SelectPRGPage(0, value & 0x07);
|
||||
SelectCHRPage(0, (value >> 4) & 0x0F);
|
||||
if(_isIremHolyDiver) {
|
||||
SetMirroringType(value & 0x08 ? MirroringType::Vertical : MirroringType::Horizontal);
|
||||
} else {
|
||||
SetMirroringType(value & 0x08 ? MirroringType::ScreenBOnly : MirroringType::ScreenAOnly);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
JalecoJf16(bool isIremHolyDiver) : _isIremHolyDiver(isIremHolyDiver)
|
||||
{
|
||||
}
|
||||
};
|
|
@ -13,7 +13,7 @@ private:
|
|||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x4000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual bool HasBusConflicts() { return false; }
|
||||
virtual bool HasBusConflicts() { return true; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "GxRom.h"
|
||||
#include "IremG101.h"
|
||||
#include "IremTamS1.h"
|
||||
#include "JalecoJf16.h"
|
||||
#include "JalecoJf17_19.h"
|
||||
#include "JalecoJfxx.h"
|
||||
#include "JalecoSs88006.h"
|
||||
|
@ -96,6 +97,7 @@ BaseMapper* MapperFactory::GetMapperFromID(ROMLoader &romLoader)
|
|||
case 74: return new MMC3_ChrRam(0x08, 0x09, 2);
|
||||
case 75: return new VRC1();
|
||||
case 76: return new Namco108_76();
|
||||
case 78: return new JalecoJf16(romLoader.GetSubMapper() == 3);
|
||||
case 79: return new Nina03_06(false);
|
||||
case 80: return new TaitoX1005();
|
||||
case 87: return new JalecoJfxx(false);
|
||||
|
|
|
@ -347,6 +347,11 @@ class ROMLoader
|
|||
return _header.GetMapperID();
|
||||
}
|
||||
|
||||
uint8_t GetSubMapper()
|
||||
{
|
||||
return _header.GetSubMapper();
|
||||
}
|
||||
|
||||
bool HasBattery()
|
||||
{
|
||||
return _header.HasBattery();
|
||||
|
|
Loading…
Add table
Reference in a new issue