mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Mapper 11 support
This commit is contained in:
parent
64ccd63117
commit
f8ecd1be5e
4 changed files with 32 additions and 0 deletions
23
Core/ColorDreams.h
Normal file
23
Core/ColorDreams.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class ColorDreams : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint32_t GetPRGPageSize() { return 0x8000; }
|
||||
virtual uint32_t GetCHRPageSize() { return 0x2000; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
SelectPRGPage(0, 0);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
public:
|
||||
void WriteRAM(uint16_t addr, uint8_t value)
|
||||
{
|
||||
SelectPRGPage(0, value & 0x03);
|
||||
SelectCHRPage(0, (value >> 4) & 0x0F);
|
||||
}
|
||||
};
|
|
@ -91,6 +91,7 @@
|
|||
<ClInclude Include="AXROM.h" />
|
||||
<ClInclude Include="BaseMapper.h" />
|
||||
<ClInclude Include="CNROM.h" />
|
||||
<ClInclude Include="ColorDreams.h" />
|
||||
<ClInclude Include="ControlManager.h" />
|
||||
<ClInclude Include="IAudioDevice.h" />
|
||||
<ClInclude Include="IControlDevice.h" />
|
||||
|
|
|
@ -126,6 +126,9 @@
|
|||
<ClInclude Include="MMC2.h">
|
||||
<Filter>Header Files\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ColorDreams.h">
|
||||
<Filter>Header Files\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CPU.cpp">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "ROMLoader.h"
|
||||
#include "AXROM.h"
|
||||
#include "CNROM.h"
|
||||
#include "ColorDreams.h"
|
||||
#include "MMC1.h"
|
||||
#include "MMC2.h"
|
||||
#include "MMC3.h"
|
||||
|
@ -19,8 +20,12 @@ class MapperFactory
|
|||
case 2: return new UNROM();
|
||||
case 3: return new CNROM();
|
||||
case 4: return new MMC3();
|
||||
case 5: break; //11 games
|
||||
case 7: return new AXROM();
|
||||
case 9: return new MMC2();
|
||||
case 11: return new ColorDreams(); break;
|
||||
case 16: break; //18 games
|
||||
case 19: break; //16 games
|
||||
case 71: return new UNROM(); //TODO: "It's largely a clone of UNROM, and Camerica games were initially emulated under iNES Mapper 002 before 071 was assigned."
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue