AxibugEmuOnline/References/VirtuaNESex_src_191105/NES/Mapper/Mapper003.cpp
2024-08-05 17:58:53 +08:00

49 lines
1.1 KiB
C++

//////////////////////////////////////////////////////////////////////////
// Mapper003 CNROM //
//////////////////////////////////////////////////////////////////////////
void Mapper003::Reset()
{
switch( PROM_16K_SIZE ) {
case 1: // 16K only
SetPROM_16K_Bank( 4, 0 );
SetPROM_16K_Bank( 6, 0 );
break;
case 2: // 32K
SetPROM_32K_Bank( 0 );
break;
}
// nes->SetRenderMethod( NES::TILE_RENDER );
DWORD crc = nes->rom->GetPROM_CRC();
if( crc == 0x2b72fe7e ) { // Ganso Saiyuuki - Super Monkey Dai Bouken(J)
nes->SetRenderMethod( NES::TILE_RENDER );
nes->ppu->SetExtNameTableMode( TRUE );
}
// if( crc == 0xE44D95B5 ) { // ‚Ђ݂‚—
// }
}
#if 0
void Mapper003::WriteLow( WORD addr, BYTE data )
{
if( patch ) {
Mapper::WriteLow( addr, data );
} else {
if( nes->rom->IsSAVERAM() ) {
Mapper::WriteLow( addr, data );
} else {
if( addr >= 0x4800 ) {
SetVROM_8K_Bank( data & 0x03 );
}
}
}
}
#endif
void Mapper003::Write( WORD addr, BYTE data )
{
//DEBUGOUT( "MAP3 WR $%04X=$%02X L=%d\n", addr, data, nes->GetScanline() );
SetVROM_8K_Bank( data );
}