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

36 lines
1.9 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.

//////////////////////////////////////////////////////////////////////////
// Mapper007 AOROM/AMROM //
//////////////////////////////////////////////////////////////////////////
void Mapper007::Reset()
{
patch = 0;
SetPROM_32K_Bank( 0 );
SetVRAM_Mirror( VRAM_MIRROR4L );
DWORD crc = nes->rom->GetPROM_CRC();
if( crc == 0x3c9fe649 ) { // WWF Wrestlemania Challenge(U)
SetVRAM_Mirror( VRAM_VMIRROR );
patch = 1;
}
if( crc == 0x09874777 ) { // Marble Madness(U)
nes->SetRenderMethod( NES::TILE_RENDER );
}
if( crc == 0x279710DC // Battletoads (U)
|| crc == 0xCEB65B06 ) { // Battletoads Double Dragon (U)
nes->SetRenderMethod( NES::PRE_ALL_RENDER );
::memset( WRAM, 0, sizeof(WRAM) );
}
}
void Mapper007::Write( WORD addr, BYTE data )
{
SetPROM_32K_Bank( data & 0x07 );
if( !patch ) {
if( data & 0x10 ) SetVRAM_Mirror( VRAM_MIRROR4H );
else SetVRAM_Mirror( VRAM_MIRROR4L );
}
}