AxibugEmuOnline/References/virtuanessrc097-master/NES/Mapper/Mapper193.cpp
2024-08-05 17:58:53 +08:00

31 lines
1.4 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//////////////////////////////////////////////////////////////////////////
// Mapper193 MEGA SOFT (NTDEC) : Fighting Hero //
//////////////////////////////////////////////////////////////////////////
void Mapper193::Reset()
{
SetPROM_32K_Bank( PROM_32K_SIZE-1 );
if( VROM_1K_SIZE ) {
SetVROM_8K_Bank( 0 );
}
}
void Mapper193::WriteLow( WORD addr, BYTE data )
{
switch( addr ) {
case 0x6000:
SetVROM_2K_Bank( 0, ((data>>1)&0x7e)+0 );
SetVROM_2K_Bank( 2, ((data>>1)&0x7e)+1 );
break;
case 0x6001:
SetVROM_2K_Bank( 4, data>>1 );
break;
case 0x6002:
SetVROM_2K_Bank( 6, data>>1 );
break;
case 0x6003:
SetPROM_32K_Bank( data );
break;
}
}