Mapper 29 support

This commit is contained in:
Souryo 2017-04-21 12:43:09 -04:00
parent 139974e8a3
commit fa39dcbc80
4 changed files with 38 additions and 1 deletions

View file

@ -446,6 +446,7 @@
<ClInclude Include="CrossFeedFilter.h" />
<ClInclude Include="GoldenFive.h" />
<ClInclude Include="MesenMovie.h" />
<ClInclude Include="SealieComputing.h" />
<ClInclude Include="UnlD1038.h" />
<ClInclude Include="DaouInfosys.h" />
<ClInclude Include="DebugBreakHelper.h" />

View file

@ -1150,6 +1150,9 @@
<ClInclude Include="UnRom512.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
<ClInclude Include="SealieComputing.h">
<Filter>Nes\Mappers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

View file

@ -197,6 +197,7 @@
#include "Sachen74LS374N.h"
#include "Sachen74LS374NB.h"
#include "Sachen8259.h"
#include "SealieComputing.h"
#include "Smb2j.h"
#include "StudyBox.h"
#include "Subor166.h"
@ -248,7 +249,7 @@ Supported mappers:
??? : No known roms
-----------------------------------------------------------------
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10| 11| 12| 13| 14| 15|
| 16| 17| 18| 19|...| 21| 22| 23| 24| 25| 26| 27| 28| | 30| 31|
| 16| 17| 18| 19|...| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31|
| 32| 33| 34| 35| 36| 37| 38|---| 40| 41| 42| 43| 44| 45| 46| 47|
| 48| 49| 50| 51| 52| 53| 54|???| 56| 57| 58|===| 60| 61| 62| 63|
| 64| 65| 66| 67| 68| 69| 70| 71| 72| 73| 74| 75| 76| 77| 78| 79|
@ -301,6 +302,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case 26: return new VRC6(VRCVariant::VRC6b);
case 27: return new VRC2_4();
case 28: return new Action53();
case 29: return new SealieComputing();
case 30: return new UnRom512();
case 31: return new NsfCart31();
case 32: return new IremG101();

31
Core/SealieComputing.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class SealieComputing : public BaseMapper
{
protected:
uint16_t GetPRGPageSize() override { return 0x4000; }
uint16_t GetCHRPageSize() override { return 0x2000; }
uint32_t GetWorkRamSize() override { return 0x2000; }
uint32_t GetChrRamSize() override { return 0x8000; }
uint16_t RegisterStartAddress() override { return 0x8000; }
uint16_t RegisterEndAddress() override { return 0xFFFF; }
void InitMapper() override
{
SelectPRGPage(1, -1);
//"It is hard-wired for vertical mirroring", but no need to enforce this, just need proper iNES headers.
//SetMirroringType(MirroringType::Vertical);
//"contains 8KB of WRAM mounted in the usual place"
SetCpuMemoryMapping(0x6000, 0x7FFF, 0, PrgMemoryType::WorkRam, MemoryAccessType::ReadWrite);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
SelectCHRPage(0, value & 0x03);
SelectPRGPage(0, (value >> 2) & 0x07);
}
};