1
0
mirror of https://github.com/sethm/symon.git synced 2024-12-29 02:31:59 +00:00
A 6502 System Simulator
Go to file
Seth Morabito f70ce22259 Trace Log View menu item
Makes the "Trace Log" menu item in the "View Menu" a radio button menu
item, so it is checked / unchecked appropriately.
2012-12-09 21:15:19 -08:00
samples New UI layout, ROM loading, Font selection 2012-12-05 23:19:34 -08:00
src Trace Log View menu item 2012-12-09 21:15:19 -08:00
.gitignore First work toward moving to a Swing UI for the simulator. 2012-04-22 20:49:18 -07:00
COPYING CPU bug fixes and Simulator enhancements. 2012-10-21 20:05:05 -07:00
pom.xml New UI layout, ROM loading, Font selection 2012-12-05 23:19:34 -08:00
README.md New UI layout, ROM loading, Font selection 2012-12-05 23:19:34 -08:00

SYMON - A 6502 System Simulator

NOTE: THIS IS BETA QUALITY SOFTWARE UNDER ACTIVE DEVELOPMENT. Feedback is welcome!

Version: 0.6 Last Updated: 5 November, 2012

Copyright (c) 2008-2012 Seth J. Morabito <web@loomcom.com>

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 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.

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:

$ java -jar symon-0.6-snapshot.jar

When Symon is running, you should be presented with a simple graphical interface.

3.2 ROM images

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 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.

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.

There are two very simple sample program in the "samples" directory, for testing.

  • 'echo.prg' will echo back anything typed at the console.

  • 'hello.prg' will continuously print "Hello, 6502 World!" to the console.

3.4 Running

After loading a program or ROM image, clicking "Run" will start the simulator running.

4.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.

  • More accurate timing.

  • Smarter interrupt handling.

  • 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.

5.0 Licensing

Symon is free software. It is distributed under the MIT License. Please see the file 'COPYING' for full details of the license.