Tooltip Text and Minor Enhancements

- Added tooltip text to status panel.
- Memory is no longer cleared on reset.
- Console can now receive key-strokes even while the simulator is
  stopped (for single-stepping programs that require interaction)
- Updated screenshots with bug-fixed version.
This commit is contained in:
Seth Morabito committed 2013-01-12 11:41:32 -08:00
1 parent 34fb8940ae
commit 4ccb7bec97
12 files changed
+45 -34

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License The MIT License
Copyright (c) 2008-2012 Seth J. Morabito <sethm@loomcom.com> Copyright (c) 2008-2013 Seth J. Morabito <web@loomcom.com>
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
+13 -2
View File
@@ -4,9 +4,9 @@ SYMON - A 6502 System Simulator
**NOTE: THIS IS BETA QUALITY SOFTWARE UNDER ACTIVE DEVELOPMENT. Feedback is **NOTE: THIS IS BETA QUALITY SOFTWARE UNDER ACTIVE DEVELOPMENT. Feedback is
welcome!** welcome!**
**Version:** 0.8.2 **Version:** 0.8.3
**Last Updated:** 01 January, 2013 **Last Updated:** 12 January, 2013
Copyright (c) 2008-2013 Seth J. Morabito &lt;web@loomcom.com&gt; Copyright (c) 2008-2013 Seth J. Morabito &lt;web@loomcom.com&gt;
@@ -140,14 +140,25 @@ running.
## 5.0 Revision History ## 5.0 Revision History
- **0.8.3:** 12 January, 2013 - Added tool-tip text. Memory is no longer
cleared when resetting. Fixed swapped register labels.
- **0.8.2:** 01 January, 2013 - Fully passes Klaus Dormann's 6502 Functional Test suite! - **0.8.2:** 01 January, 2013 - Fully passes Klaus Dormann's 6502 Functional Test suite!
- **0.8.1:** 30 December, 2012 - **0.8.1:** 30 December, 2012
- **0.8.0:** 29 December, 2012 - **0.8.0:** 29 December, 2012
- **0.7.0:** 9 December, 2012 - **0.7.0:** 9 December, 2012
- **0.6:** 5 November, 2012 - **0.6:** 5 November, 2012
- **0.5:** 21 October, 2012 - Able to run Enhanced BASIC for the first time. - **0.5:** 21 October, 2012 - Able to run Enhanced BASIC for the first time.
- **0.3:** 14 October, 2012 - **0.3:** 14 October, 2012
- **0.2:** 22 April, 2012 - **0.2:** 22 April, 2012
- **0.1:** 20 January, 2010 - **0.1:** 20 January, 2010
## 6.0 To Do ## 6.0 To Do
+1 -1
View File
@@ -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.8.2</version> <version>0.8.3</version>
<name>symon</name> <name>symon</name>
<url>http://www.loomcom.com/symon</url> <url>http://www.loomcom.com/symon</url>
<properties> <properties>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 34 KiB

@@ -270,10 +270,9 @@ public class Simulator implements Observer {
} }
try { try {
logger.log(Level.INFO, "Cold reset requested. Resetting CPU and clearing memory."); logger.log(Level.INFO, "Reset requested. Resetting CPU.");
// Reset and clear memory // Reset and clear memory
cpu.reset(); cpu.reset();
ram.fill(0x00);
// Clear the console. // Clear the console.
console.reset(); console.reset();
// Reset the trace log. // Reset the trace log.
@@ -440,8 +439,6 @@ public class Simulator implements Observer {
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
public void run() { public void run() {
// Tell the console to start handling key presses
console.startListening();
// Don't allow step while the simulator is running // Don't allow step while the simulator is running
stepButton.setEnabled(false); stepButton.setEnabled(false);
menuBar.simulatorDidStart(); menuBar.simulatorDidStart();
+12 -26
View File
@@ -55,9 +55,6 @@ public class Console extends JTerminal implements KeyListener, MouseListener {
// If true, send CRLF (0x0d 0x0a) whenever CR is typed // If true, send CRLF (0x0d 0x0a) whenever CR is typed
private static final boolean SEND_CR_LF_FOR_CR = false; private static final boolean SEND_CR_LF_FOR_CR = false;
// If true, the console is actively listening for key input.
private boolean isListening;
private FifoRingBuffer<Character> typeAheadBuffer; private FifoRingBuffer<Character> typeAheadBuffer;
public Console(int columns, int rows, Font font) { public Console(int columns, int rows, Font font) {
@@ -65,7 +62,6 @@ public class Console extends JTerminal implements KeyListener, MouseListener {
// A small type-ahead buffer, as might be found in any real // A small type-ahead buffer, as might be found in any real
// VT100-style serial terminal. // VT100-style serial terminal.
this.typeAheadBuffer = new FifoRingBuffer<Character>(128); this.typeAheadBuffer = new FifoRingBuffer<Character>(128);
this.isListening = false;
setBorderWidth(DEFAULT_BORDER_WIDTH); setBorderWidth(DEFAULT_BORDER_WIDTH);
addKeyListener(this); addKeyListener(this);
addMouseListener(this); addMouseListener(this);
@@ -87,14 +83,6 @@ public class Console extends JTerminal implements KeyListener, MouseListener {
repaint(); repaint();
} }
public void startListening() {
this.isListening = true;
}
public void stopListening() {
this.isListening = false;
}
/** /**
* Returns true if a key has been pressed since the last time input was read. * Returns true if a key has been pressed since the last time input was read.
* *
@@ -110,23 +98,21 @@ public class Console extends JTerminal implements KeyListener, MouseListener {
* @param keyEvent The key event. * @param keyEvent The key event.
*/ */
public void keyTyped(KeyEvent keyEvent) { public void keyTyped(KeyEvent keyEvent) {
if (isListening) { char keyTyped = keyEvent.getKeyChar();
char keyTyped = keyEvent.getKeyChar();
if (SWAP_CR_AND_LF) { if (SWAP_CR_AND_LF) {
if (keyTyped == 0x0a) { if (keyTyped == 0x0a) {
keyTyped = 0x0d; keyTyped = 0x0d;
} else if (keyTyped == 0x0d) { } else if (keyTyped == 0x0d) {
keyTyped = 0x0a; keyTyped = 0x0a;
}
} }
}
if (SEND_CR_LF_FOR_CR && keyTyped == 0x0d) { if (SEND_CR_LF_FOR_CR && keyTyped == 0x0d) {
typeAheadBuffer.push((char) 0x0d); typeAheadBuffer.push((char) 0x0d);
typeAheadBuffer.push((char) 0x0a); typeAheadBuffer.push((char) 0x0a);
} else { } else {
typeAheadBuffer.push(keyTyped); typeAheadBuffer.push(keyTyped);
}
} }
keyEvent.consume(); keyEvent.consume();
@@ -122,6 +122,18 @@ public class StatusPanel extends JPanel {
overflowFlagLabel = new JLabel(overflowOff, JLabel.CENTER); overflowFlagLabel = new JLabel(overflowOff, JLabel.CENTER);
negativeFlagLabel = new JLabel(negativeOff, JLabel.CENTER); negativeFlagLabel = new JLabel(negativeOff, JLabel.CENTER);
// Add tool-tip text
carryFlagLabel.setToolTipText("Carry: The last operation caused an overflow " +
"from bit 7 of the result or an underflow from bit 0");
zeroFlagLabel.setToolTipText("Zero: The result of the last operation was 0");
irqDisableFlagLabel.setToolTipText("Interrupt Disable: Processor will not respond to IRQ");
decimalModeFlagLabel.setToolTipText("Decimal Mode");
breakFlagLabel.setToolTipText("Break: BRK instruction occurred");
overflowFlagLabel.setToolTipText("Overflow: The result of the last operation was " +
"an invalid 2's complement result");
negativeFlagLabel.setToolTipText("Negative: The result of the last operation set bit 7");
statusFlagsPanel.add(negativeFlagLabel); statusFlagsPanel.add(negativeFlagLabel);
statusFlagsPanel.add(overflowFlagLabel); statusFlagsPanel.add(overflowFlagLabel);
statusFlagsPanel.add(breakFlagLabel); statusFlagsPanel.add(breakFlagLabel);
@@ -139,6 +151,11 @@ public class StatusPanel extends JPanel {
xLabel = makeLabel("X"); xLabel = makeLabel("X");
yLabel = makeLabel("Y"); yLabel = makeLabel("Y");
statusFlagsLabel.setToolTipText("6502 Processor Status Flags");
opcodeLabel.setToolTipText("Instruction Register");
pcLabel.setToolTipText("Program Counter");
spLabel.setToolTipText("Stack Pointer");
opcodeField = makeTextField(LARGE_TEXT_FIELD_SIZE); opcodeField = makeTextField(LARGE_TEXT_FIELD_SIZE);
pcField = makeTextField(LARGE_TEXT_FIELD_SIZE); pcField = makeTextField(LARGE_TEXT_FIELD_SIZE);
spField = makeTextField(SMALL_TEXT_FIELD_SIZE); spField = makeTextField(SMALL_TEXT_FIELD_SIZE);