Added support for mapper 313 (RESET-TXROM)
This commit is contained in:
parent
2389e10a59
commit
d72f659713
6 changed files with 50 additions and 2 deletions
|
@ -552,6 +552,7 @@
|
|||
<ClInclude Include="NotificationManager.h" />
|
||||
<ClInclude Include="OpenBusHandler.h" />
|
||||
<ClInclude Include="RawVideoFilter.h" />
|
||||
<ClInclude Include="ResetTxrom.h" />
|
||||
<ClInclude Include="Sachen9602.h" />
|
||||
<ClInclude Include="ServerInformationMessage.h" />
|
||||
<ClInclude Include="FamicomBox.h" />
|
||||
|
|
|
@ -1453,6 +1453,9 @@
|
|||
<ClInclude Include="Lh51.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ResetTxrom.h">
|
||||
<Filter>Nes\Mappers\Unif</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
|
@ -207,6 +207,7 @@
|
|||
#include "Racermate.h"
|
||||
#include "Rambo1.h"
|
||||
#include "Rambo1_158.h"
|
||||
#include "ResetTxrom.h"
|
||||
#include "Rt01.h"
|
||||
#include "Sachen_133.h"
|
||||
#include "Sachen_136.h"
|
||||
|
@ -580,7 +581,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
|||
case 309: return new Lh51();
|
||||
//310-311
|
||||
case 312: return new Kaiser7013B();
|
||||
case 313: break; //RESET-TXROM
|
||||
case 313: return new ResetTxrom();
|
||||
case 314: return new Bmc64in1NoRepeat();
|
||||
case 315: break; //830134C
|
||||
//316-318
|
||||
|
|
39
Core/ResetTxrom.h
Normal file
39
Core/ResetTxrom.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "MMC3.h"
|
||||
|
||||
class ResetTxrom : public MMC3
|
||||
{
|
||||
private:
|
||||
uint8_t _resetCounter;
|
||||
|
||||
protected:
|
||||
void Reset(bool softReset) override
|
||||
{
|
||||
MMC3::Reset(softReset);
|
||||
if(softReset) {
|
||||
_resetCounter = (_resetCounter + 1) & 0x03;
|
||||
UpdateState();
|
||||
} else {
|
||||
_resetCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
MMC3::StreamState(saving);
|
||||
Stream(_resetCounter);
|
||||
}
|
||||
|
||||
void SelectCHRPage(uint16_t slot, uint16_t page, ChrMemoryType memoryType)
|
||||
{
|
||||
page = (_resetCounter << 7) | (page & 0x7F);
|
||||
MMC3::SelectCHRPage(slot, page, memoryType);
|
||||
}
|
||||
|
||||
void SelectPRGPage(uint16_t slot, uint16_t page, PrgMemoryType memoryType)
|
||||
{
|
||||
page = (_resetCounter << 4) | (page & 0x0F);
|
||||
MMC3::SelectPRGPage(slot, page, memoryType);
|
||||
}
|
||||
};
|
|
@ -82,6 +82,7 @@ std::unordered_map<string, int> UnifLoader::_boardMappings = std::unordered_map<
|
|||
{ "OneBus", UnifBoards::UnknownBoard },
|
||||
{ "PEC-586", UnifBoards::UnknownBoard },
|
||||
{ "PUZZLE", UnifBoards::UnlPuzzle }, //Doesn't actually exist as a UNIF file (used to reassign a new mapper number to the Puzzle beta)
|
||||
{ "RESET-TXROM", 313 },
|
||||
{ "RET-CUFROM", 29 },
|
||||
{ "RROM", 0 },
|
||||
{ "RROM-128", 0 },
|
||||
|
|
|
@ -47,7 +47,10 @@ private:
|
|||
data = chunkEnd;
|
||||
break;
|
||||
} else {
|
||||
ss << (char)data[0];
|
||||
if(data[0] != ' ') {
|
||||
//Ignore spaces
|
||||
ss << (char)data[0];
|
||||
}
|
||||
}
|
||||
data++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue