mirror of
https://github.com/sethm/symon.git
synced 2025-01-01 07:30:14 +00:00
Merge branch 'reset-wip'
This commit is contained in:
commit
7edbb12f68
@ -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>
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user