UNIF NovelDiamond9999999in1 board support

This commit is contained in:
Souryo 2016-11-06 13:41:08 -05:00
parent 8d85b69bfa
commit 4946d303ca
6 changed files with 31 additions and 1 deletions

View file

@ -537,6 +537,7 @@
<ClInclude Include="Namco163.h" />
<ClInclude Include="Namco163Audio.h" />
<ClInclude Include="MMC1_105.h" />
<ClInclude Include="NovelDiamond.h" />
<ClInclude Include="NsfCart31.h" />
<ClInclude Include="NsfeLoader.h" />
<ClInclude Include="NsfLoader.h" />

View file

@ -982,6 +982,9 @@
<ClInclude Include="Gs2004.h">
<Filter>Nes\Mappers\Unif</Filter>
</ClInclude>
<ClInclude Include="NovelDiamond.h">
<Filter>Nes\Mappers\Unif</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">

View file

@ -142,6 +142,7 @@
#include "Nanjing.h"
#include "Nina01.h"
#include "Nina03_06.h"
#include "NovelDiamond.h"
#include "NROM.h"
#include "NsfCart31.h"
#include "NsfMapper.h"
@ -230,6 +231,7 @@ const uint16_t MapperFactory::UnifEdu2000;
const uint16_t MapperFactory::UnifGs2004;
const uint16_t MapperFactory::UnifGs2013;
const uint16_t MapperFactory::UnifMalee;
const uint16_t MapperFactory::UnifNovelDiamond;
const uint16_t MapperFactory::UnifStreetHeroes;
const uint16_t MapperFactory::UnifSmb2j;
const uint16_t MapperFactory::UnifTf1201;
@ -465,6 +467,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case MapperFactory::UnifGs2004: return new Gs2004();
case MapperFactory::UnifGs2013: return new Gs2013();
case MapperFactory::UnifMalee: return new Malee();
case MapperFactory::UnifNovelDiamond: return new NovelDiamond();
case MapperFactory::UnifSmb2j: return new Smb2j();
case MapperFactory::UnifStreetHeroes: return new MMC3_StreetHeroes();
case MapperFactory::UnifTf1201: return new Tf1201();

View file

@ -21,6 +21,7 @@ class MapperFactory
static const uint16_t UnifEdu2000 = 65526;
static const uint16_t UnifGs2013 = 65525;
static const uint16_t UnifGs2004 = 65524;
static const uint16_t UnifNovelDiamond = 65523;
static shared_ptr<BaseMapper> InitializeFromFile(string romFilename, stringstream *filestream, string ipsFilename, int32_t archiveFileIndex);
};

22
Core/NovelDiamond.h Normal file
View file

@ -0,0 +1,22 @@
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class NovelDiamond : public BaseMapper
{
protected:
uint16_t GetPRGPageSize() { return 0x8000; }
uint16_t GetCHRPageSize() { return 0x2000; }
void InitMapper() override
{
SelectPRGPage(0, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
SelectPRGPage(0, addr & 0x03);
SelectCHRPage(0, addr & 0x07);
}
};

View file

@ -82,7 +82,7 @@ private:
{ "NROM-256", 0 },
{ "NTBROM", 68 },
{ "NTD-03", MapperFactory::UnknownBoard },
{ "NovelDiamond9999999in1", MapperFactory::UnknownBoard },
{ "NovelDiamond9999999in1", MapperFactory::UnifNovelDiamond },
{ "OneBus", MapperFactory::UnknownBoard },
{ "PEC-586", MapperFactory::UnknownBoard },
{ "RET-CUFROM", 29 },