UK101
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 uk101-src-n.n.n.zip 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.
    http://svn.code.sf.net/p/uk101/code
    

    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:

uk101
The base package containing the 'main()' entry point: Main.java is the main GUI program.
uk101.hardware
The classes that implement various pieces of real UK101 hardware, for example the 6502 CPU, the keyboard, the RAM and ROM etc.
uk101.hardware.bus
Some interfaces used by the hardware classes to communicate with other parts of the system.
uk101.machine
The more abstract classes relating to the emulation that are not related to specific pieces of real hardware.
uk101.rom
The system ROM images that are built into the simulator.
uk101.view
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.
uk101.view.component
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.
uk101.io
These classes handle all the conversions between the various data tape formats, including all the processing of Kansas City encoded WAV files.
uk101.utils
All of the additional utility programs.
uk101.icon
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
tjb101@tinymail.co.uk
Return to index

© Tim Baldwin 2010,2015