mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
Bandai Karaoke (Mapper 188) support
This commit is contained in:
parent
e28ce321d4
commit
57e1adfedb
47
Core/BandaiKaraoke.h
Normal file
47
Core/BandaiKaraoke.h
Normal file
@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseMapper.h"
|
||||
#include "ControlManager.h"
|
||||
#include "StandardController.h"
|
||||
|
||||
class BandaiKaraoke : public BaseMapper
|
||||
{
|
||||
protected:
|
||||
virtual uint16_t GetPRGPageSize() { return 0x4000; }
|
||||
virtual uint16_t GetCHRPageSize() { return 0x2000; }
|
||||
virtual bool AllowRegisterRead() { return true; }
|
||||
|
||||
void InitMapper()
|
||||
{
|
||||
AddRegisterRange(0x6000, 0x7FFF, MemoryOperation::Read);
|
||||
RemoveRegisterRange(0x8000, 0xFFFF, MemoryOperation::Read);
|
||||
|
||||
SelectPRGPage(0, 0);
|
||||
SelectPRGPage(1, 0x07);
|
||||
SelectCHRPage(0, 0);
|
||||
}
|
||||
|
||||
uint8_t ReadRegister(uint16_t addr)
|
||||
{
|
||||
//Microphone not implemented - always return A/B buttons as not pressed
|
||||
return 0x03;
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value)
|
||||
{
|
||||
if(value & 0x10) {
|
||||
//Select internal rom
|
||||
SelectPRGPage(0, value & 0x07);
|
||||
} else {
|
||||
//Select expansion rom
|
||||
if(_prgSize >= 0x40000) {
|
||||
SelectPRGPage(0, (value & 0x07) | 0x08);
|
||||
} else {
|
||||
//Open bus for roms that don't contain the expansion rom
|
||||
RemoveCpuMemoryMapping(0x8000, 0xBFFF);
|
||||
}
|
||||
}
|
||||
|
||||
SetMirroringType(value & 0x20 ? MirroringType::Horizontal : MirroringType::Vertical);
|
||||
}
|
||||
};
|
@ -405,6 +405,7 @@
|
||||
<ClInclude Include="AutoRomTest.h" />
|
||||
<ClInclude Include="Bandai74161_7432.h" />
|
||||
<ClInclude Include="BandaiFcg.h" />
|
||||
<ClInclude Include="BandaiKaraoke.h" />
|
||||
<ClInclude Include="BaseExpansionAudio.h" />
|
||||
<ClInclude Include="BaseFdsChannel.h" />
|
||||
<ClInclude Include="BaseMapper.h" />
|
||||
|
@ -844,6 +844,9 @@
|
||||
<ClInclude Include="MMC3_114.h">
|
||||
<Filter>Nes\Mappers\MMC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BandaiKaraoke.h">
|
||||
<Filter>Nes\Mappers\Bandai</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "AXROM.h"
|
||||
#include "Bandai74161_7432.h"
|
||||
#include "BandaiFcg.h"
|
||||
#include "BandaiKaraoke.h"
|
||||
#include "Bmc51.h"
|
||||
#include "Bmc63.h"
|
||||
#include "Bmc235.h"
|
||||
@ -171,7 +172,7 @@ Supported mappers:
|
||||
|===|===|===|===|132|133| |===| |137|138|139|140|141|142|143|
|
||||
|144|145|146|147|148|149|150|151|152|153|154|155|156|157| |159|
|
||||
| |===| |163|164|165|166|167|168|===|170|171|172|173|===|175|
|
||||
|176|177|178|179|180| |182| |184|185| |187| |189|===|191|
|
||||
|176|177|178|179|180| |182| |184|185| |187|188|189|===|191|
|
||||
|192|193|194|195| |197| | |200|201|202|203| |205|206|207|
|
||||
| |209|210|211|212| | | | | |218| | |221| | |
|
||||
| |225|226|227|228| |230|231|232| |234|235| |===| |===|
|
||||
@ -337,6 +338,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
|
||||
case 184: return new Sunsoft184();
|
||||
case 185: return new CNROM(true);
|
||||
case 187: return new MMC3_187();
|
||||
case 188: return new BandaiKaraoke();
|
||||
case 189: return new MMC3_189();
|
||||
case 191: return new MMC3_ChrRam(0x80, 0xFF, 2);
|
||||
case 192: return new MMC3_ChrRam(0x08, 0x0B, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user