mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Mapper 193 support
This commit is contained in:
parent
ac20a3cee4
commit
2af32e5662
4 changed files with 48 additions and 0 deletions
|
@ -373,6 +373,7 @@
|
|||
<ClInclude Include="Mapper242.h" />
|
||||
<ClInclude Include="Mapper246.h" />
|
||||
<ClInclude Include="MMC3_115.h" />
|
||||
<ClInclude Include="NtdecTc112.h" />
|
||||
<ClInclude Include="SoundMixer.h" />
|
||||
<ClInclude Include="Namco108.h" />
|
||||
<ClInclude Include="Namco108_154.h" />
|
||||
|
|
|
@ -374,6 +374,9 @@
|
|||
<ClInclude Include="Mapper200.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NtdecTc112.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "Nina01.h"
|
||||
#include "Nina03_06.h"
|
||||
#include "NROM.h"
|
||||
#include "NtdecTc112.h"
|
||||
#include "Sachen_145.h"
|
||||
#include "Sachen_147.h"
|
||||
#include "Sachen_148.h"
|
||||
|
@ -112,6 +113,7 @@ BaseMapper* MapperFactory::GetMapperFromID(ROMLoader &romLoader)
|
|||
case 184: return new Sunsoft184();
|
||||
case 185: return new CNROM(true);
|
||||
case 189: return new MMC3_189();
|
||||
case 193: return new NtdecTc112();
|
||||
case 200: return new Mapper200();
|
||||
case 206: return new Namco108();
|
||||
case 231: return new Mapper231();
|
||||
|
|
42
Core/NtdecTc112.h
Normal file
42
Core/NtdecTc112.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class NtdecTc112 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint16_t RegisterStartAddress() { return 0x6000; }
|
||||
virtual uint16_t RegisterEndAddress() { return 0x7FFF; }
|
||||
|
||||
virtual uint16_t GetPRGPageSize() { return 0x2000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x0800; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
SelectPRGPage(1, -3);
|
||||
SelectPRGPage(2, -2);
|
||||
SelectPRGPage(3, -1);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
switch(addr & 0x03){
|
||||
case 0:
|
||||
SelectCHRPage(0, value >> 1);
|
||||
SelectCHRPage(1, (value >> 1) + 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
SelectCHRPage(2, value >> 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SelectCHRPage(3, value >> 1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
SelectPRGPage(0, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue