2012-04-23 04:43:45 +00:00
|
|
|
SYMON - A 6502 System Simulator
|
|
|
|
===============================
|
|
|
|
|
CPU bug fixes and Simulator enhancements.
Bug Fixes:
- Fixed several bugs in the CPU that caused processor status flags to
be set incorrectly. Instructions affected were: STA, STX, STY, CMP,
CPX, CPY, BIT.
- Made some internal-use-only methods on the CPU class private.
- Fixed incorrect disassembly of (Indirect,X) and (Indirect),Y
instructions. Although this didn't affect behavior, it certainly
caused me some confusion in debugging.
- Added missing "BCS" instruction to instruction table.
Enhancements:
- Now includes a full version of Lee Davison's Enhanced 6502 BASIC
bundled as source code and a ROM image. Get that REAL COMPUTER
EXPERIENCE!(tm)
- If a file named "rom.bin" exists in the same directory where the
simulator is executed, it will be loaded at addresses $d000-$ffff.
- Gave the CPU an idle loop to make simulated timing a little more
realistic (but this is still an area needing major improvement)
- Changed the CPU's toString() method to give better debugging output.
- Added a small typeahead buffer to the Console.
- Better exception messaging.
Misc:
- Bumped version to 0.5, updated README.
2012-10-22 03:05:05 +00:00
|
|
|
**NOTE: THIS IS BETA QUALITY SOFTWARE UNDER ACTIVE DEVELOPMENT. Feedback is
|
|
|
|
welcome!**
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-10 05:18:36 +00:00
|
|
|
**Version:** 0.7.0
|
2012-12-10 05:26:47 +00:00
|
|
|
|
2012-12-10 05:18:36 +00:00
|
|
|
**Last Updated:** 9 December, 2012
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-04-23 04:50:03 +00:00
|
|
|
Copyright (c) 2008-2012 Seth J. Morabito <web@loomcom.com>
|
2012-04-23 04:43:45 +00:00
|
|
|
|
|
|
|
See the file COPYING for license.
|
|
|
|
|
|
|
|
|
|
|
|
## 1.0 About
|
|
|
|
|
|
|
|
Symon is a general purpose simulator for systems based on the NMOS
|
|
|
|
Mostek 6502 microprocessor and compatibles. Symon is implemented in
|
2012-04-23 04:50:03 +00:00
|
|
|
Java. Its core goals are accuracy, ease of development, clear
|
2012-04-23 04:43:45 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
## 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 Usage
|
|
|
|
|
|
|
|
|
|
|
|
### 3.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.
|
|
|
|
|
|
|
|
Symon is meant to be invoked directly from the jar file. To run with
|
|
|
|
Java 1.5 or greater, just type:
|
|
|
|
|
2012-12-10 05:18:36 +00:00
|
|
|
$ java -jar symon-0.7.0.jar
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-10-14 07:35:48 +00:00
|
|
|
When Symon is running, you should be presented with a simple graphical
|
2012-04-23 04:43:45 +00:00
|
|
|
interface.
|
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
### 3.2 ROM images
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
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.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
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.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Programs are loaded starting at addres $0300. After loading the program, the
|
|
|
|
simulated CPU's reset vector is loaded with the values $00, $03, and the CPU is
|
|
|
|
reset.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-10-14 07:35:48 +00:00
|
|
|
There are two very simple sample program in the "samples" directory,
|
2012-04-23 04:43:45 +00:00
|
|
|
for testing.
|
2012-10-14 07:35:48 +00:00
|
|
|
|
|
|
|
- 'echo.prg' will echo back anything typed at the console.
|
|
|
|
|
|
|
|
- 'hello.prg' will continuously print "Hello, 6502 World!" to the console.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
CPU bug fixes and Simulator enhancements.
Bug Fixes:
- Fixed several bugs in the CPU that caused processor status flags to
be set incorrectly. Instructions affected were: STA, STX, STY, CMP,
CPX, CPY, BIT.
- Made some internal-use-only methods on the CPU class private.
- Fixed incorrect disassembly of (Indirect,X) and (Indirect),Y
instructions. Although this didn't affect behavior, it certainly
caused me some confusion in debugging.
- Added missing "BCS" instruction to instruction table.
Enhancements:
- Now includes a full version of Lee Davison's Enhanced 6502 BASIC
bundled as source code and a ROM image. Get that REAL COMPUTER
EXPERIENCE!(tm)
- If a file named "rom.bin" exists in the same directory where the
simulator is executed, it will be loaded at addresses $d000-$ffff.
- Gave the CPU an idle loop to make simulated timing a little more
realistic (but this is still an area needing major improvement)
- Changed the CPU's toString() method to give better debugging output.
- Added a small typeahead buffer to the Console.
- Better exception messaging.
Misc:
- Bumped version to 0.5, updated README.
2012-10-22 03:05:05 +00:00
|
|
|
### 3.4 Running
|
|
|
|
|
|
|
|
After loading a program or ROM image, clicking "Run" will start the simulator
|
2012-12-06 07:19:34 +00:00
|
|
|
running.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-10 05:26:47 +00:00
|
|
|
## 4.0 Revision History
|
|
|
|
|
|
|
|
- 0.7.0: 9 December, 2012
|
|
|
|
- 0.6: 5 November, 2012
|
|
|
|
- 0.5: 21 October, 2012
|
|
|
|
- 0.3: 14 October, 2012
|
|
|
|
- 0.2: 22 April, 2012
|
|
|
|
- 0.1: 20 January, 2010
|
|
|
|
|
|
|
|
## 5.0 To Do
|
2012-04-23 04:43:45 +00:00
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
- Feedback (in the form of dialogs, status bar, etc).
|
|
|
|
|
|
|
|
- Better ROM image handling
|
|
|
|
|
CPU bug fixes and Simulator enhancements.
Bug Fixes:
- Fixed several bugs in the CPU that caused processor status flags to
be set incorrectly. Instructions affected were: STA, STX, STY, CMP,
CPX, CPY, BIT.
- Made some internal-use-only methods on the CPU class private.
- Fixed incorrect disassembly of (Indirect,X) and (Indirect),Y
instructions. Although this didn't affect behavior, it certainly
caused me some confusion in debugging.
- Added missing "BCS" instruction to instruction table.
Enhancements:
- Now includes a full version of Lee Davison's Enhanced 6502 BASIC
bundled as source code and a ROM image. Get that REAL COMPUTER
EXPERIENCE!(tm)
- If a file named "rom.bin" exists in the same directory where the
simulator is executed, it will be loaded at addresses $d000-$ffff.
- Gave the CPU an idle loop to make simulated timing a little more
realistic (but this is still an area needing major improvement)
- Changed the CPU's toString() method to give better debugging output.
- Added a small typeahead buffer to the Console.
- Better exception messaging.
Misc:
- Bumped version to 0.5, updated README.
2012-10-22 03:05:05 +00:00
|
|
|
- Better debugging tools from the UI, including memory inspection,
|
|
|
|
disassembly, breakpoints, and execution tracing.
|
|
|
|
|
|
|
|
- More accurate timing.
|
2012-10-14 07:35:48 +00:00
|
|
|
|
2012-12-06 07:19:34 +00:00
|
|
|
- Smarter interrupt handling.
|
2012-04-23 04:43:45 +00:00
|
|
|
|
|
|
|
- UI needs a ton more polish.
|
|
|
|
|
|
|
|
- More extensive testing.
|
|
|
|
|
|
|
|
- Clean up JavaDoc.
|
|
|
|
|
|
|
|
- Busses are defined by start address and length. Devices are defined
|
|
|
|
by start address and end address. They should both use start/end
|
|
|
|
address.
|
|
|
|
|
|
|
|
- Implement CMOS 65C02 instructions and NMOS / CMOS mode flag.
|
|
|
|
|
|
|
|
- Allow displaying ACIA status and dumping ACIA buffers, for
|
|
|
|
debugging.
|
|
|
|
|
|
|
|
|
2012-12-10 05:26:47 +00:00
|
|
|
## 6.0 Licensing
|
2012-04-23 04:43:45 +00:00
|
|
|
|
|
|
|
Symon is free software. It is distributed under the MIT License.
|
|
|
|
Please see the file 'COPYING' for full details of the license.
|