mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
Mapper 63 support
This commit is contained in:
parent
90e31bd7df
commit
4e83491181
48
Core/Bmc63.h
Normal file
48
Core/Bmc63.h
Normal file
@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class Bmc63 : public BaseMapper
|
||||
{
|
||||
private:
|
||||
bool _openBus;
|
||||
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x2000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
WriteRegister(0x8000, 0);
|
||||
}
|
||||
|
||||
void Reset(bool softReset)
|
||||
{
|
||||
_openBus = false;
|
||||
}
|
||||
|
||||
void StreamState(bool saving)
|
||||
{
|
||||
BaseMapper::StreamState(saving);
|
||||
Stream(_openBus);
|
||||
if(!saving && _openBus) {
|
||||
RemoveCpuMemoryMapping(0x8000, 0xBFFF);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
_openBus = ((addr & 0x0300) == 0x0300);
|
||||
|
||||
if(_openBus) {
|
||||
RemoveCpuMemoryMapping(0x8000, 0xBFFF);
|
||||
} else {
|
||||
SelectPRGPage(0, (addr >> 1 & 0x1FC) | ((addr & 0x2) ? 0x0 : (addr >> 1 & 0x2) | 0x0));
|
||||
SelectPRGPage(1, (addr >> 1 & 0x1FC) | ((addr & 0x2) ? 0x1 : (addr >> 1 & 0x2) | 0x1));
|
||||
}
|
||||
SelectPRGPage(2, (addr >> 1 & 0x1FC) | ((addr & 0x2) ? 0x2 : (addr >> 1 & 0x2) | 0x0));
|
||||
SelectPRGPage(3, (addr & 0x800) ? ((addr & 0x07C) | ((addr & 0x06) ? 0x03 : 0x01)) : ((addr >> 1 & 0x01FC) | ((addr & 0x02) ? 0x03 : ((addr >> 1 & 0x02) | 0x01))));
|
||||
|
||||
SetMirroringType(addr & 0x01 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
}
|
||||
};
|
@ -412,6 +412,7 @@
|
||||
<ClInclude Include="BF9096.h" />
|
||||
<ClInclude Include="BF909x.h" />
|
||||
<ClInclude Include="Bmc51.h" />
|
||||
<ClInclude Include="Bmc63.h" />
|
||||
<ClInclude Include="BnRom.h" />
|
||||
<ClInclude Include="Caltron41.h" />
|
||||
<ClInclude Include="ColorDreams46.h" />
|
||||
|
@ -775,6 +775,9 @@
|
||||
<ClInclude Include="Bmc51.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Bmc63.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "Bandai74161_7432.h"
|
||||
#include "BandaiFcg.h"
|
||||
#include "Bmc51.h"
|
||||
#include "Bmc63.h"
|
||||
#include "Bmc235.h"
|
||||
#include "BnRom.h"
|
||||
#include "BF909x.h"
|
||||
@ -139,7 +140,7 @@ Supported mappers: (... denotes bad mappers, --- denotes potentially bad mapper
|
||||
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10| 11| 12| 13| | 15|
|
||||
| 16| 17| 18| 19|...| 21| 22| 23| 24| 25| 26| 27| 28| | | 31|
|
||||
| 32| 33| 34| | 36| 37| 38|---| 40| 41| 42|---| 44| 45| 46| 47|
|
||||
| 48| 49| 50| 51| 52| | | | 56| 57| 58| | 60| 61| 62| |
|
||||
| 48| 49| 50| 51| 52| | | | 56| 57| 58| | 60| 61| 62| 63|
|
||||
| 64| 65| 66| 67| 68| 69| 70| 71| 72| 73| 74| 75| 76| 77| 78| 79|
|
||||
| 80| | 82| | | 85| 86| 87| 88| 89| | 91| 92| 93| 94| 95|
|
||||
| | 97| | 99|...|101| | | | | |107| | | | |
|
||||
@ -222,6 +223,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case 60: return new Mapper60(); //Partial support?
|
||||
case 61: return new Mapper61();
|
||||
case 62: return new Mapper62();
|
||||
case 63: return new Bmc63();
|
||||
case 64: return new Rambo1();
|
||||
case 65: return new IremH3001();
|
||||
case 66: return new GxRom();
|
||||
|
Loading…
Reference in New Issue
Block a user