Skip to content

Commit

Permalink
fixed a bug in MBC3
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jul 25, 2013
1 parent 0c0c45a commit d17a4de
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/MBC3MemoryRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,9 @@ void MBC3MemoryRule::PerformWrite(u16 address, u8 value)
}
else if (value <= 0x03)
{
if (m_bRamEnabled)
{
m_iCurrentRAMBank = value;
m_iCurrentRAMBank &= (m_pCartridge->GetRAMBankCount() - 1);
m_CurrentRAMAddress = m_iCurrentRAMBank * 0x2000;
}
m_iCurrentRAMBank = value;
m_iCurrentRAMBank &= (m_pCartridge->GetRAMBankCount() - 1);
m_CurrentRAMAddress = m_iCurrentRAMBank * 0x2000;
}
break;
}
Expand Down

0 comments on commit d17a4de

Please sign in to comment.