mirror of https://github.com/stella-emu/stella.git
Guarantee 'inline' code actually happens.
This commit is contained in:
parent
b8c6a9b024
commit
7e8be2b347
|
@ -294,18 +294,6 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
|
|||
return myBankChanged = true;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
inline uInt32 CartridgeEnhanced::romAddressSegmentOffset(uInt16 address) const
|
||||
{
|
||||
return myCurrentSegOffset[((address & ROM_MASK) >> myBankShift) % myBankSegs];
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
inline uInt16 CartridgeEnhanced::ramAddressSegmentOffset(uInt16 address) const
|
||||
{
|
||||
return uInt16(myCurrentSegOffset[((address & ROM_MASK) >> myBankShift) % myBankSegs] - mySize) >> 1;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt16 CartridgeEnhanced::getBank(uInt16 address) const
|
||||
{
|
||||
|
|
|
@ -275,7 +275,9 @@ class CartridgeEnhanced : public Cartridge
|
|||
@param address The address to get the offset for
|
||||
@return The calculated offset
|
||||
*/
|
||||
uInt32 romAddressSegmentOffset(uInt16 address) const;
|
||||
uInt32 romAddressSegmentOffset(uInt16 address) const {
|
||||
return myCurrentSegOffset[((address & ROM_MASK) >> myBankShift) % myBankSegs];
|
||||
}
|
||||
|
||||
/**
|
||||
Get the RAM offset of the segment of the given address
|
||||
|
@ -283,7 +285,10 @@ class CartridgeEnhanced : public Cartridge
|
|||
@param address The address to get the offset for
|
||||
@return The calculated offset
|
||||
*/
|
||||
uInt16 ramAddressSegmentOffset(uInt16 address) const;
|
||||
uInt16 ramAddressSegmentOffset(uInt16 address) const {
|
||||
return static_cast<uInt16>((myCurrentSegOffset[
|
||||
((address & ROM_MASK) >> myBankShift) % myBankSegs] - mySize) >> 1);
|
||||
}
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
Loading…
Reference in New Issue