GxRom (Mapper 66) support

This commit is contained in:
Souryo 2015-12-29 21:18:37 -05:00
parent 08eade0cfb
commit 5d3c51d7be
3 changed files with 27 additions and 0 deletions

View file

@ -293,6 +293,7 @@
<ClInclude Include="GameInformationMessage.h" />
<ClInclude Include="GameServer.h" />
<ClInclude Include="GameServerConnection.h" />
<ClInclude Include="GxRom.h" />
<ClInclude Include="HandShakeMessage.h" />
<ClInclude Include="HdNesPack.h" />
<ClInclude Include="HdPpu.h" />

View file

@ -260,6 +260,9 @@
<ClInclude Include="TaitoTc0190.h">
<Filter>Header Files\Mappers</Filter>
</ClInclude>
<ClInclude Include="GxRom.h">
<Filter>Header Files\Mappers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CPU.cpp">

23
Core/GxRom.h Normal file
View file

@ -0,0 +1,23 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class GxRom : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() { return 0x8000; }
virtual uint16_t GetCHRPageSize() { return 0x2000; }
virtual uint32_t GetChrRamSize() { return 0x4000; }
void InitMapper()
{
SelectPRGPage(0, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value)
{
SelectPRGPage(0, (value >> 4) & 0x03);
SelectCHRPage(0, value & 0x03);
}
};