AxibugEmuOnline/virtuanessrc097-master/NES/Mapper/Mapper062.cpp

34 lines
1.7 KiB
C++
Raw Permalink 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.

//////////////////////////////////////////////////////////////////////////
// Mapper062 //
//////////////////////////////////////////////////////////////////////////
void Mapper062::Reset()
{
SetPROM_32K_Bank( 0 );
SetVROM_8K_Bank( 0 );
}
void Mapper062::Write( WORD addr, BYTE data )
{
switch( addr & 0xFF00 ) {
case 0x8100:
SetPROM_8K_Bank( 4, data );
SetPROM_8K_Bank( 5, data+1 );
break;
case 0x8500:
SetPROM_8K_Bank( 4, data );
break;
case 0x8700:
SetPROM_8K_Bank( 5, data );
break;
SetVROM_1K_Bank( 0, data+0 );
SetVROM_1K_Bank( 1, data+1 );
SetVROM_1K_Bank( 2, data+2 );
SetVROM_1K_Bank( 3, data+3 );
SetVROM_1K_Bank( 4, data+4 );
SetVROM_1K_Bank( 5, data+5 );
SetVROM_1K_Bank( 6, data+6 );
SetVROM_1K_Bank( 7, data+7 );
}
}