1
0
mirror of https://github.com/sethm/symon.git synced 2024-06-07 19:29:27 +00:00

Clear memory on Control+Reset

This commit is contained in:
Seth Morabito 2014-07-27 13:41:44 -07:00
parent b1e1e75555
commit 4bfc196b49
3 changed files with 15 additions and 6 deletions

View File

@ -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 Marten <maikmarten@googlemail.com>

View File

@ -4,7 +4,7 @@
<groupId>com.loomcom.symon</groupId>
<artifactId>symon</artifactId>
<packaging>jar</packaging>
<version>0.9.9.0</version>
<version>0.9.9.1</version>
<name>symon</name>
<url>http://www.loomcom.com/symon</url>
<properties>

View File

@ -209,7 +209,8 @@ public class Simulator {
resetButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
handleReset(false);
// If this was a CTRL-click, do a hard reset.
handleReset((actionEvent.getModifiers() & ActionEvent.CTRL_MASK) != 0);
}
});
@ -277,14 +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.
// TODO: Clear memory
if (isColdReset) {
Memory mem = machine.getRam();
if (mem != null) {
mem.fill(0);
}
}
// Update status.
SwingUtilities.invokeLater(new Runnable() {
public void run() {