diff --git a/README.md b/README.md index ad6728f..e666946 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ SYMON - A 6502 System Simulator **NOTE: THIS SOFTWARE IS UNDER ACTIVE DEVELOPMENT. Feedback is welcome!** -**Version:** 0.9.9.0 +**Version:** 0.9.9.1 -**Last Updated:** 26 July, 2014 +**Last Updated:** 27 July, 2014 Copyright (c) 2014 Seth J. Morabito <web@loomcom.com> @@ -217,6 +217,9 @@ running. ## 5.0 Revision History + - **0.9.9.1:** 27 July, 2014 - Pressing 'Control' while clicking + 'Reset' now performs a memory clear. + - **0.9.9:** 26 July, 2014 - MULTICOMP and multi-machine support contributed by Maik Merten <maikmerten@googlemail.com> diff --git a/pom.xml b/pom.xml index 744df93..819b53c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.loomcom.symon symon jar - 0.9.9.0 + 0.9.9.1 symon http://www.loomcom.com/symon diff --git a/src/main/java/com/loomcom/symon/Simulator.java b/src/main/java/com/loomcom/symon/Simulator.java index 161c9d4..f115ad3 100644 --- a/src/main/java/com/loomcom/symon/Simulator.java +++ b/src/main/java/com/loomcom/symon/Simulator.java @@ -209,7 +209,8 @@ public class Simulator { resetButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { - handleReset(); + // If this was a CTRL-click, do a hard reset. + handleReset((actionEvent.getModifiers() & ActionEvent.CTRL_MASK) != 0); } }); @@ -235,7 +236,7 @@ public class Simulator { mainWindow.setVisible(true); console.requestFocus(); - handleReset(); + handleReset(false); } public MAIN_CMD waitForCommand() { @@ -268,7 +269,7 @@ public class Simulator { /* * Perform a reset. */ - private void handleReset() { + private void handleReset(boolean isColdReset) { if (runLoop != null && runLoop.isRunning()) { runLoop.requestStop(); runLoop.interrupt(); @@ -277,12 +278,19 @@ public class Simulator { try { logger.log(Level.INFO, "Reset requested. Resetting CPU."); - // Reset and clear memory + // Reset CPU machine.getCpu().reset(); // Clear the console. console.reset(); // Reset the trace log. traceLog.reset(); + // If we're doing a cold reset, clear the memory. + if (isColdReset) { + Memory mem = machine.getRam(); + if (mem != null) { + mem.fill(0); + } + } // Update status. SwingUtilities.invokeLater(new Runnable() { public void run() {