mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-01 14:22:10 +00:00
Mapper 225 support
This commit is contained in:
parent
dd4f7d8131
commit
4311e7ab4e
@ -376,6 +376,7 @@
|
||||
<ClInclude Include="Mapper201.h" />
|
||||
<ClInclude Include="Mapper202.h" />
|
||||
<ClInclude Include="Mapper203.h" />
|
||||
<ClInclude Include="Mapper225.h" />
|
||||
<ClInclude Include="Mapper57.h" />
|
||||
<ClInclude Include="Mapper61.h" />
|
||||
<ClInclude Include="Mapper62.h" />
|
||||
|
@ -446,6 +446,9 @@
|
||||
<ClInclude Include="Mapper112.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Mapper225.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
43
Core/Mapper225.h
Normal file
43
Core/Mapper225.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Mapper225 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x4000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
SelectPRGPage(0, 0);
|
||||
SelectPRGPage(1, 1);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
virtual void Reset(bool softReset)
|
||||
{
|
||||
if(softReset) {
|
||||
SelectPRGPage(0, 0);
|
||||
SelectPRGPage(1, 1);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
uint8_t highBit = (addr >> 8) & 0x40;
|
||||
uint8_t prgPage = ((addr >> 6) & 0x3F) | highBit;
|
||||
if(addr & 0x0100) {
|
||||
SelectPRGPage(0, prgPage);
|
||||
SelectPRGPage(1, prgPage);
|
||||
} else {
|
||||
SelectPRGPage(0, prgPage & 0xFE);
|
||||
SelectPRGPage(1, (prgPage & 0xFE) + 1);
|
||||
}
|
||||
|
||||
SelectCHRPage(0, addr & 0x3F | highBit);
|
||||
|
||||
SetMirroringType(addr & 0x2000 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
}
|
||||
};
|
@ -28,6 +28,7 @@
|
||||
#include "Mapper201.h"
|
||||
#include "Mapper202.h"
|
||||
#include "Mapper203.h"
|
||||
#include "Mapper225.h"
|
||||
#include "Mapper231.h"
|
||||
#include "Mapper240.h"
|
||||
#include "Mapper242.h"
|
||||
@ -167,6 +168,7 @@ BaseMapper* MapperFactory::GetMapperFromID(ROMLoader &romLoader)
|
||||
case 203: return new Mapper203();
|
||||
case 205: return new MMC3_205();
|
||||
case 206: return new Namco108();
|
||||
case 225: return new Mapper225();
|
||||
case 231: return new Mapper231();
|
||||
case 232: return new BF9096();
|
||||
case 240: return new Mapper240();
|
||||
|
Loading…
x
Reference in New Issue
Block a user