mirror of https://github.com/stella-emu/stella.git
Guarantee 'inline' code actually happens.
This commit is contained in:
parent
82a266da00
commit
a755b7a1f5
|
@ -294,18 +294,6 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
|
||||||
return myBankChanged = true;
|
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
|
uInt16 CartridgeEnhanced::getBank(uInt16 address) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -275,7 +275,9 @@ class CartridgeEnhanced : public Cartridge
|
||||||
@param address The address to get the offset for
|
@param address The address to get the offset for
|
||||||
@return The calculated offset
|
@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
|
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
|
@param address The address to get the offset for
|
||||||
@return The calculated offset
|
@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:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
|
|
Loading…
Reference in New Issue