mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-27 11:00:50 +00:00
Mapper 177 & 179 support
This commit is contained in:
parent
23d8992bcb
commit
cbaae72882
@ -424,6 +424,8 @@
|
||||
<ClInclude Include="FrontFareast.h" />
|
||||
<ClInclude Include="GameDatabase.h" />
|
||||
<ClInclude Include="HdVideoFilter.h" />
|
||||
<ClInclude Include="Henggedianzi177.h" />
|
||||
<ClInclude Include="Henggedianzi179.h" />
|
||||
<ClInclude Include="iNesLoader.h" />
|
||||
<ClInclude Include="IremH3001.h" />
|
||||
<ClInclude Include="IremLrog017.h" />
|
||||
|
@ -748,6 +748,12 @@
|
||||
<ClInclude Include="Kaiser202.h">
|
||||
<Filter>Nes\Mappers\Kaiser</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Henggedianzi177.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Henggedianzi179.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
24
Core/Henggedianzi177.h
Normal file
24
Core/Henggedianzi177.h
Normal file
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Henggedianzi177 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x8000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual uint16_t RegisterStartAddress() { return 0x8000; }
|
||||
virtual uint16_t RegisterEndAddress() { return 0xFFFF; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
SelectPRGPage(0, 0);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
SelectPRGPage(0, value);
|
||||
SetMirroringType(value & 0x20 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
}
|
||||
};
|
28
Core/Henggedianzi179.h
Normal file
28
Core/Henggedianzi179.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Henggedianzi179 : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x8000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual uint16_t RegisterStartAddress() { return 0x8000; }
|
||||
virtual uint16_t RegisterEndAddress() { return 0xFFFF; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
AddRegisterRange(0x5000, 0x5FFF, MemoryOperation::Write);
|
||||
SelectPRGPage(0, 0);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
if(addr >= 0x8000) {
|
||||
SetMirroringType(value & 0x01 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
} else {
|
||||
SelectPRGPage(0, value >> 1);
|
||||
}
|
||||
}
|
||||
};
|
@ -18,6 +18,8 @@
|
||||
#include "FDS.h"
|
||||
#include "FrontFareast.h"
|
||||
#include "GxRom.h"
|
||||
#include "Henggedianzi177.h"
|
||||
#include "Henggedianzi179.h"
|
||||
#include "IremG101.h"
|
||||
#include "IremH3001.h"
|
||||
#include "IremLrog017.h"
|
||||
@ -140,7 +142,7 @@ Supported mappers: (... denotes bad mappers)
|
||||
| | | | |132|133| | | |137|138|139|140|141|142|143|
|
||||
|144|145|146|147|148|149|150|151|152|153|154|155|156|157| |159|
|
||||
| | | |163|164| | | | | | |171|172|173| |175|
|
||||
|176| | | |180| |182| |184|185| | | |189| |191|
|
||||
|176|177| |179|180| |182| |184|185| | | |189| |191|
|
||||
|192|193|194|195| | | | |200|201|202|203| |205|206|207|
|
||||
| | |210| | | | | | | |218| | | | | |
|
||||
| |225|226|227|228| |230|231|232| | | | | | | |
|
||||
@ -282,6 +284,8 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case 173: return new Txc22211C();
|
||||
case 175: return new Kaiser7022();
|
||||
case 176: return new Waixing176();
|
||||
case 177: return new Henggedianzi177();
|
||||
case 179: return new Henggedianzi179();
|
||||
case 180: return new UnRom_180();
|
||||
case 182: return new MMC3_182();
|
||||
case 184: return new Sunsoft184();
|
||||
|
Loading…
Reference in New Issue
Block a user