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

39 lines
1.8 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.

//////////////////////////////////////////////////////////////////////////
// Mapper151 VS-Unisystem //
//////////////////////////////////////////////////////////////////////////
void Mapper151::Reset()
{
SetPROM_32K_Bank( 0, 1, PROM_8K_SIZE-2, PROM_8K_SIZE-1 );
#if 0
DWORD crc = nes->rom->GetPROM_CRC();
if( crc == 0x1E438D52 ) {
DirectDraw.SetVsPalette( 7 ); //VS_Goonies
}
if( crc == 0xD99A2087 ) {
DirectDraw.SetVsPalette( 6 ); //VS_Gradius
}
#endif
}
void Mapper151::Write( WORD addr, BYTE data )
{
switch( addr ) {
case 0x8000:
SetPROM_8K_Bank( 4,data );
break;
case 0xA000:
SetPROM_8K_Bank( 5,data );
break;
case 0xC000:
SetPROM_8K_Bank( 6,data );
break;
case 0xE000:
SetVROM_4K_Bank( 0, data );
break;
case 0xF000:
SetVROM_4K_Bank( 4, data );
break;
}
}