mirror of https://github.com/stella-emu/stella.git
Revert "take care of odd ROM sizes (fixes #653)"
This reverts commit baa47aec57
.
This commit is contained in:
parent
5c879d4a48
commit
5b634b99e7
|
@ -348,7 +348,7 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt16 CartridgeEnhanced::getBank(uInt16 address) const
|
||||
{
|
||||
return myCurrentSegOffset[std::min((address & ROM_MASK) >> myBankShift, romBankCount() - 1)] >> myBankShift;
|
||||
return myCurrentSegOffset[(address & ROM_MASK) >> myBankShift] >> myBankShift;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -360,8 +360,7 @@ uInt16 CartridgeEnhanced::getSegmentBank(uInt16 segment) const
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt16 CartridgeEnhanced::romBankCount() const
|
||||
{
|
||||
// take care of too small ROMs
|
||||
return uInt16((mySize + ((1 << myBankShift) - 1)) >> myBankShift);
|
||||
return uInt16(mySize >> myBankShift);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue