diff --git a/README.md b/README.md index 6dee62e..abf4c11 100644 --- a/README.md +++ b/README.md @@ -4,62 +4,100 @@ SYMON - A 6502 System Simulator **NOTE: THIS IS BETA QUALITY SOFTWARE UNDER ACTIVE DEVELOPMENT. Feedback is welcome!** -**Version:** 0.8.0 +**Version:** 0.8.1 -**Last Updated:** 29 December, 2012 +**Last Updated:** 30 December, 2012 Copyright (c) 2008-2012 Seth J. Morabito <web@loomcom.com> See the file COPYING for license. +![Symon Simulator in Action] (https://github.com/sethm/symon/raw/master/screenshots/full.jpg) + ## 1.0 About -Symon is a general purpose simulator for systems based on the NMOS -Mostek 6502 microprocessor and compatibles. Symon is implemented in -Java. Its core goals are accuracy, ease of development, clear +Symon is a general purpose simulator for systems based on the MOS +Technologies 6502 microprocessor and compatibles. Symon is implemented +in Java. Its core goals are accuracy, ease of development, clear documentation, and extensive test suites for validating correctness. -The initial goal is to simulate a system with an NMOS 6502 or CMOS -65C02 central processor; one or more 6522 VIAs; and one or more 6551 -ACIAs. More functionality may be considered as time goes on. - +Symon simulates a complete system with a 1 MHz NMOS 6502, 32KB of RAM, +16KB of ROM, a 6551 ACIA, and a 6522 VIA. ## 2.0 Requirements - - Java 1.5 or higher - Maven 2.0.x or higher (for building from source) - JUnit 4 or higher (for testing) +## 3.0 Features -## 3.0 Usage +### 3.1 Serial Console and CPU Status +![Serial Console] (https://github.com/sethm/symon/raw/master/screenshots/console.png) -### 3.1 Building +The main window of the simulator acts as the primary Input/Output +system through a virtual serial terminal. The terminal is attached to +a simulated MOS 6551 ACIA, including a programmable baud rate +generator that tries to approximate the correct "feel" of the +programmed baud rate. (The sample Enhanced BASIC ROM image is +programmed for 9600 baud) + +It also provides CPU status. Contents of the accumulator, index +registers, processor status flags, disassembly of the instruction +register, and stack pointer are all displayed. + +![Font Selection] (https://github.com/sethm/symon/raw/master/screenshots/font_selection.png) + +The console supports font sizes from 10 to 20 points. + +### 3.2 16 KB ROM Loading + +![ROM Loading] (https://github.com/sethm/symon/raw/master/screenshots/load_rom.png) + +Symon can load any 16 KB (16384 bytes) ROM image from the "File" +menu. The selected ROM will be placed in memory from locations `$C000` +to `$FFFF` + +### 3.3 Memory Window + +![Memory Window] (https://github.com/sethm/symon/raw/master/screenshots/memory_window.png) + +Memory contents can be viewed (and edited) one page at a time through the Memory Window. + +### 3.4 Trace Log + +![Trace Log] (https://github.com/sethm/symon/raw/master/screenshots/trace_log.png) + +The last 20,000 execution steps are disassembled and logged to the Trace Log Window. + +## 4.0 Usage + +### 4.1 Building To build Symon with Apache Maven, just type: $ mvn package Maven will build Symon, run unit tests, and produce a jar file in the -'target' directory containing the compiled simulator. +`target` directory containing the compiled simulator. Symon is meant to be invoked directly from the jar file. To run with Java 1.5 or greater, just type: - $ java -jar symon-0.7.0.jar + $ java -jar symon-0.8.1.jar When Symon is running, you should be presented with a simple graphical interface. -### 3.2 ROM images +### 4.2 ROM images -The simulator requires a 16KB ROM image loaded at address $C000 to $FFFF to +The simulator requires a 16KB ROM image loaded at address `$C000` to `$FFFF` to work properly. Without a ROM in memory, the simulator will not be able to reset, since the reset vector for the 6502 is located in this address space. -By default, any 16KB file named 'rom.bin' that exists in the same directory +By default, any 16KB file named `rom.bin` that exists in the same directory where Symon is launched will be loaded as a ROM image. ROM images can also be swapped out at run-time with the "Load ROM Image..." in the File menu. @@ -67,7 +105,7 @@ The "samples" directory contains a ROM image named 'ehbasic.rom', containing Lee Davison's Enhanced 6502 BASIC. This serves as a good starting point for exploration. -### 3.3 Loading A Program +### 4.3 Loading A Program In addition to ROM images, programs in the form of raw binary object files can be loaded directly into memory from "Load Program..." in the File menu. @@ -83,13 +121,14 @@ for testing. - 'hello.prg' will continuously print "Hello, 6502 World!" to the console. -### 3.4 Running +### 4.4 Running After loading a program or ROM image, clicking "Run" will start the simulator running. -## 4.0 Revision History +## 5.0 Revision History + - 0.8.1: 30 December, 2012 - 0.8.0: 29 December, 2012 - 0.7.0: 9 December, 2012 - 0.6: 5 November, 2012 @@ -98,14 +137,12 @@ running. - 0.2: 22 April, 2012 - 0.1: 20 January, 2010 -## 5.0 To Do +## 6.0 To Do - Feedback (in the form of dialogs, status bar, etc). -- Better ROM image handling - -- Better debugging tools from the UI, including memory inspection, - disassembly, breakpoints, and execution tracing. +- Better debugging tools from the UI, including breakpoints + and disassebly. - More accurate timing. @@ -127,7 +164,7 @@ running. debugging. -## 6.0 Licensing +## 7.0 Licensing Symon is free software. It is distributed under the MIT License. Please see the file 'COPYING' for full details of the license. diff --git a/pom.xml b/pom.xml index a52f42b..052977a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.loomcom.symon symon jar - 0.8.0 + 0.8.1 symon http://www.loomcom.com/symon diff --git a/src/main/java/com/loomcom/symon/ui/MemoryWindow.java b/src/main/java/com/loomcom/symon/ui/MemoryWindow.java index d8cb0e7..d8492ec 100644 --- a/src/main/java/com/loomcom/symon/ui/MemoryWindow.java +++ b/src/main/java/com/loomcom/symon/ui/MemoryWindow.java @@ -28,6 +28,7 @@ import com.loomcom.symon.exceptions.MemoryAccessException; import com.loomcom.symon.util.HexUtil; import javax.swing.*; +import javax.swing.border.EmptyBorder; import javax.swing.table.AbstractTableModel; import java.awt.*; import java.awt.event.ActionEvent; @@ -45,8 +46,14 @@ public class MemoryWindow extends JFrame implements ActionListener { private JTable memoryTable; private JTextField pageNumberTextField; - private static final Dimension MINIMUM_SIZE = new Dimension(380, 580); + private static final Dimension MINIMUM_SIZE = new Dimension(380, 400); + /** + * Initialize a new MemoryWindow frame with the specified Bus. + * The MemoryWindow frame will not be visible. + * + * @param bus The Bus the memory window will query for data. + */ public MemoryWindow(Bus bus) { this.memoryTableModel = new MemoryTableModel(bus); createUi(); @@ -87,7 +94,17 @@ public class MemoryWindow extends JFrame implements ActionListener { memoryTable.setDragEnabled(false); memoryTable.setCellSelectionEnabled(false); - memoryTable.setShowGrid(false); + memoryTable.setShowGrid(true); + memoryTable.setShowHorizontalLines(true); + memoryTable.setShowVerticalLines(true); + memoryTable.setGridColor(Color.LIGHT_GRAY); + memoryTable.getTableHeader().setReorderingAllowed(false); + memoryTable.getTableHeader().setResizingAllowed(false); + memoryTable.getTableHeader().setVisible(false); + + // Turn off tool-tips for the table. + ToolTipManager.sharedInstance().unregisterComponent(memoryTable); + ToolTipManager.sharedInstance().unregisterComponent(memoryTable.getTableHeader()); JLabel pageNumberLabel = new JLabel("Page Number"); pageNumberTextField = new JTextField(8); @@ -98,6 +115,7 @@ public class MemoryWindow extends JFrame implements ActionListener { JPanel controlPanel = new JPanel(); JPanel memoryPanel = new JPanel(); memoryPanel.setLayout(new BorderLayout()); + memoryPanel.setBorder(new EmptyBorder(10, 10, 10, 10)); controlPanel.add(pageNumberLabel); controlPanel.add(pageNumberTextField);