Compare commits

..

1 Commits

Author SHA1 Message Date
Peter Ferrie
723769a66a
Merge d4d3c59b8c into 24fd496d31 2024-04-23 10:08:43 -05:00
2 changed files with 4 additions and 12 deletions

View File

@ -93,7 +93,7 @@ public class Apple2e extends Computer {
@ConfigurableField(name = "No-Slot Clock Enabled", shortName = "clock", description = "If checked, no-slot clock will be enabled", enablesDevice = true)
public boolean clockEnabled = true;
@ConfigurableField(name = "Accelerator Enabled", shortName = "zip", description = "If checked, add support for Zip/Transwarp", enablesDevice = true)
public boolean acceleratorEnabled = true;
public boolean acceleratorEnabled = PRODUCTION_MODE;
public Joystick joystick1;
public Joystick joystick2;

View File

@ -24,6 +24,7 @@ import jace.core.RAMListener;
/**
* Implements a basic hardware accelerator that is able to adjust the speed of the emulator
*/
// TODO: Support the registers used here: https://github.com/a2-4am/4cade/blob/main/src/hw.accel.a#L238
public class ZipWarpAccelerator extends Device {
@ConfigurableField(category = "debug", name = "Debug messages")
public boolean debugMessagesEnabled = false;
@ -37,14 +38,8 @@ public class ZipWarpAccelerator extends Device {
public static final double UNLOCK_PENALTY_PER_TICK = 0.19;
public static final double UNLOCK_MIN = 4.0;
/**
* Valid values for C074 are:
* 0: Enable full speed
* 1: Set speed to 1mhz (temporarily disable)
* 3: Disable completely (requres cold-start to re-enable -- this isn't implemented)
*/
public static final int TRANSWARP = 0x0c074;
public static final int TRANSWARP_ON = 0; // Any other value written disables acceleration
public static final int TRANSWARP_ON = 1; // Any other value written disables acceleration
boolean zipLocked = true;
double zipUnlockCount = 0;
@ -192,10 +187,7 @@ public class ZipWarpAccelerator extends Device {
private void turnOffAcceleration() {
// The UI Logic retains the user's desired normal speed, reset to that
Emulator.withComputer(c -> {
c.getMotherboard().setMaxSpeed(false);
c.getMotherboard().setSpeedInPercentage(100);
});
Emulator.getUILogic().reconfigure();
}
@Override