diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index 325bf3e0..10180300 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -531,6 +531,7 @@ + diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index b58cbddb..f3e87554 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -1447,6 +1447,9 @@ Nes\RomLoader + + Nes\Mappers\Unif + diff --git a/Core/Gkcx1.h b/Core/Gkcx1.h new file mode 100644 index 00000000..3f291812 --- /dev/null +++ b/Core/Gkcx1.h @@ -0,0 +1,22 @@ +#pragma once +#include "stdafx.h" +#include "BaseMapper.h" + +class Gkcx1 : public BaseMapper +{ +protected: + uint16_t GetPRGPageSize() override { return 0x8000; } + uint16_t GetCHRPageSize() override { return 0x2000; } + + void InitMapper() override + { + SelectPRGPage(0, 0); + SelectCHRPage(0, 0); + } + + void WriteRegister(uint16_t addr, uint8_t value) override + { + SelectPRGPage(0, (addr >> 3) & 0x03); + SelectCHRPage(0, addr & 0x07); + } +}; \ No newline at end of file diff --git a/Core/MapperFactory.cpp b/Core/MapperFactory.cpp index b4ebfab1..83863d51 100644 --- a/Core/MapperFactory.cpp +++ b/Core/MapperFactory.cpp @@ -57,6 +57,7 @@ #include "FDS.h" #include "FrontFareast.h" #include "Ghostbusters63in1.h" +#include "Gkcx1.h" #include "GoldenFive.h" #include "Gs2004.h" #include "Gs2013.h" @@ -556,7 +557,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData) case 285: return new A65AS(); case 286: return new Bs5(); case 287: return new MMC3_Bmc411120C(); //+ K-3088 - case 288: break; //GKCXIN1 + case 288: return new Gkcx1(); case 289: return new Bmc60311C(); case 290: return new BmcNtd03(); //291