Return to index

Source Code Details

These notes provide some details about the source code and implementation of the simulator.

Obtaining The Source Code

The source code can be obtained in two ways:

  1. Download the source package from the SourceForge download site.

    The source package is named and contains the full Java source for the project classes.

  2. Download the source directly from the SourceForge SVN code repository listed below. Anonymous read-only access to the code in SVN should be available to anyone; if you want to be able to commit changes to the code you will need a SourceForge ID and you will need to be added to project.

    The SVN repository is structured in the usual way - the latest version of the code can be found in the "trunk" stream with previous releases available via the "tags" streams. The directory called UK101 should be checked-out of SVN as a complete Eclipse Java project.

Using Eclipse and the SVN repository is recommended if you want to try to rebuild or modify the code. In addition to the source for the simulator classes the SVN project also contains a number of JUnit unit tests and the ANT build script used to create the project download packages.

Code Design

The code is designed using an approximate Model-View-Controller type of architecture, to split the GUI View logic completely from the core emulation which combines the Model and the Controller function. The intention is that the relatively simple Swing-based UI could be fairly easily replaced with more fancy graphics if required, without needing any changes to hardware simulation.

Java Packages

The source code is structured into the following Java packages:

The base package containing the 'main()' entry point: is the main GUI program.
The classes that implement various pieces of real UK101 hardware, for example the 6502 CPU, the keyboard, the RAM and ROM etc.
Some interfaces used by the hardware classes to communicate with other parts of the system.
The more abstract classes relating to the emulation that are not related to specific pieces of real hardware.
The system ROM images that are built into the simulator.
The GUI 'view' classes. All of the visuals are contained within these classes (and the component sub-package) and there is a simple and well defined split between the view code and the core emulation code.
These are simple (generally, expect maybe the VideoScreen one!) and often reusable components used to build the GUI views. They are used whenever there is not a standard Swing component that is suitable.
These classes handle all the conversions between the various data tape formats, including all the processing of Kansas City encoded WAV files.
All of the additional utility programs.
Some icons in various formats that are used internally and also packaged as part of the distribution ZIP for others to use.

More details to come ... probably

Contributing To The Project

If you'd like to help work on the project please contact me at the address at the bottom of the page!

Tim Baldwin
December 2010
Return to index

© Tim Baldwin 2010,2015