1
0
mirror of https://github.com/sethm/symon.git synced 2024-12-29 02:31:59 +00:00

Added Klaus Dormann's tests

This commit is contained in:
Seth Morabito 2014-08-10 16:52:20 -07:00
parent 36615fc70b
commit 59c6d8e23b
7 changed files with 25333 additions and 19 deletions

View File

@ -3,14 +3,18 @@ SYMON - A 6502 System Simulator
**NOTE: THIS SOFTWARE IS UNDER ACTIVE DEVELOPMENT. Feedback is welcome!**
**Version:** 0.9.9.1
**Version:** 1.0.0-SNAPSHOT
**Last Updated:** 27 July, 2014
**Last Updated:** 10 August, 2014
Copyright (c) 2014 Seth J. Morabito <web@loomcom.com>
**Copyright (c) 2014 Seth J. Morabito <web@loomcom.com>**
Portions Copyright (c) 2014 Maik Merten <maikmerten@googlemail.com>
Enhanced 6502 BASIC (c) Lee Davison
6502 Functional Tests (c) Klaus Dormann
See the file COPYING for license.
![Symon Simulator in Action] (https://github.com/sethm/symon/raw/master/screenshots/full.jpg)
@ -217,6 +221,11 @@ running.
## 5.0 Revision History
- **1.0.0-SNAPSHOT:** 10 August, 2014 - Added "Simple" machine
implementation, pure RAM with no IO. Added Klaus Dormann's
6502 Functional Tests for further machine verification (these
tests must be run in the "Simple" machine).
- **0.9.9.1:** 27 July, 2014 - Pressing 'Control' while clicking
'Reset' now performs a memory clear.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -58,8 +58,8 @@ public class Main {
}
}
while(true) {
if(machineClass == null) {
while (true) {
if (machineClass == null) {
Object[] possibilities = {"Symon", "Multicomp", "Simple"};
String s = (String)JOptionPane.showInputDialog(
null,
@ -71,14 +71,12 @@ public class Main {
"Symon");
if (s != null) {
if (s.equals("Multicomp")) {
machineClass = MulticompMachine.class;
} else if (s.equals("Simple")) {
machineClass = SimpleMachine.class;
} else {
machineClass = SymonMachine.class;
}
if (s != null && s.equals("Multicomp")) {
machineClass = MulticompMachine.class;
} else if (s != null && s.equals("Simple")) {
machineClass = SimpleMachine.class;
} else {
machineClass = SymonMachine.class;
}
}
@ -98,13 +96,11 @@ public class Main {
Simulator.MAIN_CMD cmd = simulator.waitForCommand();
if(cmd.equals(Simulator.MAIN_CMD.SELECTMACHINE)) {
if (cmd.equals(Simulator.MAIN_CMD.SELECTMACHINE)) {
machineClass = null;
} else {
break;
}
}
}
}

View File

@ -487,7 +487,11 @@ public class Simulator {
long fileSize = f.length();
if (fileSize > machine.getMemorySize()) {
throw new IOException("Program will not fit in available memory.");
throw new IOException("Program of size $" +
Integer.toString((int)fileSize, 16) +
" will not fit in available memory of size $" +
Integer.toString(machine.getMemorySize(), 16) +
".");
} else {
byte[] program = new byte[(int) fileSize];
int i = 0;
@ -572,8 +576,6 @@ public class Simulator {
}
class SelectMachineAction extends AbstractAction {
Simulator simulator;
public SelectMachineAction() {
super("Switch emulated machine...", null);
putValue(SHORT_DESCRIPTION, "Select the type of the machine to be emulated");