mirror of https://github.com/stella-emu/stella.git
added ELF speed constants everywhere
This commit is contained in:
parent
a5757a1562
commit
691543a319
|
@ -24,6 +24,7 @@
|
|||
#include "StateManager.hxx"
|
||||
#include "TIA.hxx"
|
||||
#include "Cart.hxx"
|
||||
#include "CartELF.hxx"
|
||||
|
||||
#include "DevSettingsHandler.hxx"
|
||||
|
||||
|
@ -62,7 +63,7 @@ void DevSettingsHandler::loadSettings(SettingsSet set)
|
|||
#endif
|
||||
// Thumb ARM emulation exception
|
||||
myThumbException[set] = devSettings ? settings.getBool("dev.thumb.trapfatal") : false;
|
||||
myArmSpeed[set] = devSettings ? settings.getInt("dev.arm.mips") : 250; // TODO: use constant
|
||||
myArmSpeed[set] = devSettings ? settings.getInt("dev.arm.mips") : CartridgeELF::MIPS_MAX;
|
||||
|
||||
// TIA tab
|
||||
myTIAType[set] = devSettings ? settings.getString("dev.tia.type") : "standard";
|
||||
|
|
|
@ -31,7 +31,8 @@ class ElfLinker;
|
|||
class CartridgeELF: public Cartridge {
|
||||
public:
|
||||
static constexpr uInt32 MIPS_MAX = 300;
|
||||
static constexpr uInt32 MIPS_MIN = 50;
|
||||
static constexpr uInt32 MIPS_MIN = 50;
|
||||
static constexpr uInt32 MIPS_DEF = 150;
|
||||
|
||||
public:
|
||||
CartridgeELF(const ByteBuffer& image, size_t size, string_view md5,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "PaletteHandler.hxx"
|
||||
#include "Joystick.hxx"
|
||||
#include "Paddles.hxx"
|
||||
#include "CartELF.hxx"
|
||||
#ifdef GUI_SUPPORT
|
||||
#include "JitterEmulation.hxx"
|
||||
#endif
|
||||
|
@ -311,7 +312,7 @@ Settings::Settings()
|
|||
setPermanent("dev.extaccess", "true");
|
||||
// Thumb ARM emulation options
|
||||
setPermanent("dev.thumb.trapfatal", "true");
|
||||
setPermanent("dev.arm.mips", "150"); // TODO: use constant
|
||||
setPermanent("dev.arm.mips", CartridgeELF::MIPS_DEF);
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
setPermanent("dev.thumb.inccycles", "true");
|
||||
setPermanent("dev.thumb.cyclefactor", "1.05");
|
||||
|
|
|
@ -229,9 +229,9 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
|
|||
myArmSpeedWidget = new SliderWidget(myTab, font, HBORDER + INDENT * 1, ypos - 1,
|
||||
fontWidth * 10, lineHeight, "Limit ARM speed (*) ",
|
||||
0, kArmSpeedChanged, fontWidth * 9, " MIPS");
|
||||
myArmSpeedWidget->setMinValue(CartridgeELF::MIPS_MIN); // TODO: use constant
|
||||
myArmSpeedWidget->setMaxValue(CartridgeELF::MIPS_MAX); // TODO: use constant
|
||||
myArmSpeedWidget->setTickmarkIntervals(4);
|
||||
myArmSpeedWidget->setMinValue(CartridgeELF::MIPS_MIN);
|
||||
myArmSpeedWidget->setMaxValue(CartridgeELF::MIPS_MAX);
|
||||
myArmSpeedWidget->setTickmarkIntervals((CartridgeELF::MIPS_MAX - CartridgeELF::MIPS_MIN) / 50);
|
||||
myArmSpeedWidget->setStepValue(2);
|
||||
myArmSpeedWidget->setToolTip("Limit emulation speed to simulate ARM CPU used for ELF.");
|
||||
wid.push_back(myArmSpeedWidget);
|
||||
|
@ -959,7 +959,7 @@ void DeveloperDialog::setDefaults()
|
|||
#endif
|
||||
// Thumb ARM emulation exception
|
||||
myThumbException[set] = devSettings;
|
||||
myArmSpeed[set] = devSettings ? 150 : 250;
|
||||
myArmSpeed[set] = devSettings ? CartridgeELF::MIPS_DEF : CartridgeELF::MIPS_MAX;
|
||||
|
||||
setWidgetStates(set);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue