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

32 lines
1.7 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.

//////////////////////////////////////////////////////////////////////////
// Mapper072 Jaleco/Type1 lower bank switch //
//////////////////////////////////////////////////////////////////////////
void Mapper072::Reset()
{
SetPROM_32K_Bank( 0, 1, PROM_8K_SIZE-2, PROM_8K_SIZE-1 );
if( VROM_8K_SIZE ) {
SetVROM_8K_Bank( 0 );
}
}
void Mapper072::Write( WORD addr, BYTE data )
{
if( data & 0x80 ) {
SetPROM_16K_Bank( 4, data&0x0F );
} else if( data & 0x40 ) {
SetVROM_8K_Bank( data&0x0F );
} else {
if( addr >= 0xC100 && addr <= 0xC11F && data == 0x20 ) {
//DEBUGOUT( "ADDR:%04X DATA:%02X\n", addr, data );
DEBUGOUT( "SOUND CODE:%02X\n", addr & 0x1F );
// OSDにするべきか…
if( Config.sound.bExtraSoundEnable ) {
DirectSound.EsfAllStop();
DirectSound.EsfPlay( ESF_MOETENNIS_00+(addr&0x1F) );
}
}
}
}