# 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 `elliott803-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/elliott803/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 `Elliott803` 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:

`elliott803`
  The base package containing the two 'main()' entry points: `Main.java` is the main GUI program and `Run.java` is the command line version. (The command line version is probably not very useful anymore but I did use it to test things before I had written the GUI.)
`elliott803.hardware`
  The classes that implement various pieces of real 803 hardware, for example the CPU, the tape readers, the teletype etc.
`elliott.hardware.device`
  Some base classes that provide general support common to all of the hardware devices, in particular those that can signal 'busy' conditions and respond to the group 7 instruction opcodes.
`elliott.machine`
  The more abstract classes relating to the core emulation that are not related to specific pieces of real hardware.
`elliott803.machine.extension`
  Classes that provide extensions to the computer that are useful for the simulator but do not represent function present on a real 803, for example the random number generator.
`elliott803.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.
`elliott803.view.component`
  These are simple and often reusable components used to build the GUI views. They are used whenever there is not a standard Swing component that is suitable.
`elliott803.telecode`
  These classes handle all the conversion from Java characters to Elliott telecode characters and vice-versa. There are simple character converters and more complex conversion input and output streams which fit in nicely with the Java I/O models.
`elliott803.utils`
  All of the additional utility programs, including the simple assembler.
`elliott803.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 August 2010 tjb803@tinymail.co.uk | Return to index © Tim Baldwin 2009,2010