mirror of
https://github.com/sethm/symon.git
synced 2025-08-16 11:27:23 +00:00
Merge branch 'reset-wip'
This commit is contained in:
@@ -3,9 +3,9 @@ SYMON - A 6502 System Simulator
|
|||||||
|
|
||||||
**NOTE: THIS SOFTWARE IS UNDER ACTIVE DEVELOPMENT. Feedback is welcome!**
|
**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>
|
Copyright (c) 2014 Seth J. Morabito <web@loomcom.com>
|
||||||
|
|
||||||
@@ -217,6 +217,9 @@ running.
|
|||||||
|
|
||||||
## 5.0 Revision History
|
## 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
|
- **0.9.9:** 26 July, 2014 - MULTICOMP and multi-machine support
|
||||||
contributed by Maik Merten <maikmerten@googlemail.com>
|
contributed by Maik Merten <maikmerten@googlemail.com>
|
||||||
|
|
||||||
|
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>com.loomcom.symon</groupId>
|
<groupId>com.loomcom.symon</groupId>
|
||||||
<artifactId>symon</artifactId>
|
<artifactId>symon</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.9.9.0</version>
|
<version>0.9.9.1</version>
|
||||||
<name>symon</name>
|
<name>symon</name>
|
||||||
<url>http://www.loomcom.com/symon</url>
|
<url>http://www.loomcom.com/symon</url>
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -209,7 +209,8 @@ public class Simulator {
|
|||||||
|
|
||||||
resetButton.addActionListener(new ActionListener() {
|
resetButton.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
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);
|
mainWindow.setVisible(true);
|
||||||
|
|
||||||
console.requestFocus();
|
console.requestFocus();
|
||||||
handleReset();
|
handleReset(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MAIN_CMD waitForCommand() {
|
public MAIN_CMD waitForCommand() {
|
||||||
@@ -268,7 +269,7 @@ public class Simulator {
|
|||||||
/*
|
/*
|
||||||
* Perform a reset.
|
* Perform a reset.
|
||||||
*/
|
*/
|
||||||
private void handleReset() {
|
private void handleReset(boolean isColdReset) {
|
||||||
if (runLoop != null && runLoop.isRunning()) {
|
if (runLoop != null && runLoop.isRunning()) {
|
||||||
runLoop.requestStop();
|
runLoop.requestStop();
|
||||||
runLoop.interrupt();
|
runLoop.interrupt();
|
||||||
@@ -277,12 +278,19 @@ public class Simulator {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
logger.log(Level.INFO, "Reset requested. Resetting CPU.");
|
logger.log(Level.INFO, "Reset requested. Resetting CPU.");
|
||||||
// Reset and clear memory
|
// Reset CPU
|
||||||
machine.getCpu().reset();
|
machine.getCpu().reset();
|
||||||
// Clear the console.
|
// Clear the console.
|
||||||
console.reset();
|
console.reset();
|
||||||
// Reset the trace log.
|
// Reset the trace log.
|
||||||
traceLog.reset();
|
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.
|
// Update status.
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Reference in New Issue
Block a user