diff --git a/Emulator/Base/OptionTypes.h b/Emulator/Base/OptionTypes.h
index 67c419957..2fa988637 100644
--- a/Emulator/Base/OptionTypes.h
+++ b/Emulator/Base/OptionTypes.h
@@ -149,12 +149,11 @@ enum_long(OPT)
OPT_MOUSE_SHAKE_DETECTION,
OPT_MOUSE_VELOCITY,
- // Joystick
// Joystick
OPT_JOY_AUTOFIRE, ///< Autofire status [on/off]
OPT_JOY_AUTOFIRE_BURSTS, ///< Burst mode [on/off]
OPT_JOY_AUTOFIRE_BULLETS, ///< Number of bullets per burst
- OPT_JOY_AUTOFIRE_DELAY, ///< Delay between two shots [frames]
+ OPT_JOY_AUTOFIRE_DELAY, ///< Delay between two button events [frames]
// Paula audio
OPT_AUD_SAMPLING_METHOD,
diff --git a/Emulator/Peripherals/Joystick/Joystick.cpp b/Emulator/Peripherals/Joystick/Joystick.cpp
index 356d6d102..3af631e96 100644
--- a/Emulator/Peripherals/Joystick/Joystick.cpp
+++ b/Emulator/Peripherals/Joystick/Joystick.cpp
@@ -53,19 +53,16 @@ Joystick::setOption(Option option, i64 value)
case OPT_JOY_AUTOFIRE:
config.autofire = bool(value);
- reload();
return;
case OPT_JOY_AUTOFIRE_BURSTS:
config.autofireBursts = bool(value);
- reload();
return;
case OPT_JOY_AUTOFIRE_BULLETS:
config.autofireBullets = isize(value);
- reload();
return;
case OPT_JOY_AUTOFIRE_DELAY:
@@ -110,6 +107,7 @@ Joystick::_didLoad()
void
Joystick::setButton(bool value)
{
+ trace(PRT_DEBUG, "Button = %d\n", value);
button = value;
}
@@ -122,7 +120,7 @@ Joystick::isAutofiring()
void
Joystick::startAutofire()
{
- debug(true, "startAutofire()\n");
+ trace(PRT_DEBUG, "startAutofire()\n");
// Load magazine
reload(config.autofireBursts ? config.autofireBullets : INT_MAX);
@@ -131,13 +129,13 @@ Joystick::startAutofire()
setButton(true);
// Schedule the release event
- nextAutofireReleaseFrame = agnus.pos.frame + 2;
+ nextAutofireReleaseFrame = agnus.pos.frame + config.autofireDelay;
}
void
Joystick::stopAutofire()
{
- debug(true, "stopAutofire()\n");
+ trace(PRT_DEBUG, "stopAutofire()\n");
// Release button and empty the bullet counter
setButton(false);
@@ -248,6 +246,7 @@ Joystick::trigger(GamePadAction event)
case PRESS_FIRE:
+ printf("bulletCounter = %ld\n", bulletCounter);
// If autofire is enabled...
if (config.autofire) {
@@ -297,7 +296,7 @@ Joystick::eofHandler()
if (agnus.pos.frame == nextAutofireFrame) {
setButton(true);
- nextAutofireReleaseFrame = nextAutofireFrame + 2;
+ nextAutofireReleaseFrame = nextAutofireFrame + config.autofireDelay;
}
if (agnus.pos.frame == nextAutofireReleaseFrame) {
diff --git a/Emulator/config.cpp b/Emulator/config.cpp
index aa5282be2..6279fc0ec 100644
--- a/Emulator/config.cpp
+++ b/Emulator/config.cpp
@@ -25,7 +25,7 @@ debugflag SNP_DEBUG = 0;
// Run ahead
debugflag RUA_DEBUG = 1;
-debugflag RUA_CHECKSUM = 1;
+debugflag RUA_CHECKSUM = 0;
debugflag RUA_ON_STEROIDS = 0;
// CPU
diff --git a/GUI/XIB files/Configuration.xib b/GUI/XIB files/Configuration.xib
index c25265d48..fb1457a4c 100644
--- a/GUI/XIB files/Configuration.xib
+++ b/GUI/XIB files/Configuration.xib
@@ -203,7 +203,7 @@
-
+