mirror of
https://github.com/libretro/Mesen.git
synced 2025-01-22 00:36:11 +00:00
Mapper 96 (Oeka Kids) support
This commit is contained in:
parent
2a04e1f398
commit
f5e777bef8
@ -498,6 +498,7 @@
|
||||
<ClInclude Include="NsfLoader.h" />
|
||||
<ClInclude Include="NsfMapper.h" />
|
||||
<ClInclude Include="NsfPpu.h" />
|
||||
<ClInclude Include="OekaKids.h" />
|
||||
<ClInclude Include="PlayerListMessage.h" />
|
||||
<ClInclude Include="ReverbFilter.h" />
|
||||
<ClInclude Include="RomData.h" />
|
||||
|
@ -811,6 +811,9 @@
|
||||
<ClInclude Include="MMC3_187.h">
|
||||
<Filter>Nes\Mappers\MMC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OekaKids.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -103,6 +103,7 @@
|
||||
#include "NsfCart31.h"
|
||||
#include "NsfMapper.h"
|
||||
#include "NtdecTc112.h"
|
||||
#include "OekaKids.h"
|
||||
#include "Rambo1.h"
|
||||
#include "Sachen_133.h"
|
||||
#include "Sachen_143.h"
|
||||
@ -156,7 +157,7 @@ Supported mappers:
|
||||
| 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| 90| 91| 92| 93| 94| 95|
|
||||
| | 97| | 99|...|101| | | | | |107|108| | | |
|
||||
| 96| 97| | 99|...|101| | | | | |107|108| | | |
|
||||
|112|113| |115| | |118|119| | | | | | | | |
|
||||
| | | | |132|133| | | |137|138|139|140|141|142|143|
|
||||
|144|145|146|147|148|149|150|151|152|153|154|155|156|157| |159|
|
||||
@ -267,7 +268,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case 93: return new Sunsoft93();
|
||||
case 94: return new UnRom_94();
|
||||
case 95: return new Namco108_95();
|
||||
case 96: break; //Bandai - Oeka Tablet
|
||||
case 96: return new OekaKids();
|
||||
case 97: return new IremTamS1();
|
||||
case 99: return new VsSystem();
|
||||
case 101: return new JalecoJfxx(true);
|
||||
|
52
Core/OekaKids.h
Normal file
52
Core/OekaKids.h
Normal file
@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
|
||||
class OekaKids : public BaseMapper
|
||||
{
|
||||
uint8_t _outerChrBank;
|
||||
uint8_t _innerChrBank;
|
||||
uint16_t _lastAddress;
|
||||
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x8000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual bool HasBusConflicts() { return true; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
_outerChrBank = 0;
|
||||
_innerChrBank = 0;
|
||||
_lastAddress = 0;
|
||||
|
||||
SelectPRGPage(0, 0);
|
||||
}
|
||||
|
||||
void StreamState(bool saving)
|
||||
{
|
||||
BaseMapper::StreamState(saving);
|
||||
Stream(_outerChrBank, _innerChrBank, _lastAddress);
|
||||
}
|
||||
|
||||
void UpdateChrBanks()
|
||||
{
|
||||
SelectCHRPage(0, _outerChrBank | _innerChrBank);
|
||||
}
|
||||
|
||||
void NotifyVRAMAddressChange(uint16_t addr)
|
||||
{
|
||||
if((_lastAddress & 0x3000) != 0x2000 && (addr & 0x3000) == 0x2000) {
|
||||
_innerChrBank = (addr >> 8) & 0x03;
|
||||
UpdateChrBanks();
|
||||
}
|
||||
|
||||
_lastAddress = addr;
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
SelectPRGPage(0, value & 0x03);
|
||||
_outerChrBank = value & 0x04;
|
||||
UpdateChrBanks();
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user