   ************************************************************************
   *                                                                      *
   *                 Science of Cambridge MK14 Emulator                   *
   *                                                                      *
   ************************************************************************

This is an emulator for the Science of Cambridge/Sinclair MK14. It should
run happily under Dos, Windows, OS/2 and hopefully Windows NT. It is
written in assembly language and should run at full speed on most PCs (say
386 up. I haven't tried it.)

Download Zipped MK14.COM (5k)

The current version is 1.9 (12-June-1998). The source is available here.

New features and recent fixes :-

   * VDU implemented both text and graphics (1.9)
   * Added -q -l and VDU command line switches (1.9)
   * Back to 8 digit LED Display (1.9)
   * DLY instructions with a delay of more than 32k cycles work better (1.8)
   * LED not refreshed on I/O read. Seems to help programs work better (1.7)
   * Speed now roughly correct (1.6)
   * Better LED persistence emulation (1.6)
   * Added 9th LED (1.5)
   * Jump/Jz/Jnz/JP now work correctly, was all jumps were relative to P0 (1.5)
   * Memory when initialised is reset to 00h instead of FFh (1.5)
   * Display LED latch set correctly on I/O Read (1.4)
   * Fixed dumb display bug in 1.1, should be shot for that one. (1.3)
   * Can load HEX format files, one program file can load to all sorts of
     different RAM locations. (1.3)
   * SC/MP memory expansion conversion made (so 200-7FF are all RAM) (1.3)
   * Boots straight into emulator rather than debugger. (1.3)

Ray Aucote tells me he is having problems with the function keys.
Specifically , he says F9 doesn't work. If anyone can reproduce this effect
please let me know.

Instructions
============

To run the MK14 type

       MK14 [-v] [-i] [-g] [-q] [-ln] <binary image>||<hex object file>

Creating, typing in and running programs is covered in the Tutorial Document.
To allow the usage of TASM hex format object files, so programs can be
loaded into the various RAM areas, a HEX file is detected by its first byte
being a ':' (ASCII Code 58 decimal 3A hex). 3A is not a valid SC/MP
instruction, but binary files (which still load straight into F00-FFF)
should not have 3A as their first byte, otherwise the emulator will
think they are hex files. Fortunately this is not a valid SC/MP opcode.
Basically the binary files are no longer supported really, so don't use them.

  -q    runs the emulator in "fast" mode - code is run as fast as possible
  -l<n> sets the colour of the Display LED.<n> can be 1..7

To change the program address, simply type in the address. This does not
physically change the program counter, just the address of the program code
being shown.  To change the data address , type in the address holding down
the CTRL key. The address can also be changed using the arrow keys.

F1      Sets a breakpoint at the current program address
F2      Clears the breakpoint (as FFFF on the display)
F5      Runs the program until the breakpoint is encountered or the program is
        interrupted (by pressing F10)
F7      Single Step
F8      Run the program until it reaches the current instruction, or the
        program is interrupted (by pressing F10)
F9      Run the program until interrupted (press F10)
F10     Interrupt a running program. The running program is shown by the debug
        area becoming 'dotty' and/or the VDU being displayed
Ctrl+R  Reset (either debug or run mode)
Home    Move the displayed program back to the next instruction
ESC     Quit back to DOS from debugger

M       MK14 Mem key (run only)
T       MK14 Term key (run only)
Z       MK14 Abort key (run only)
G       MK14 Go key (run only)

Any more queries, software, suggestions ? Contact Paul Robson

VDU Support
===========

The screen is split into 2 halves (top and bottom), each of which can
either be 32 x 8 text or 64 x 32 graphics. If text, the lower 6 bits are a
6-bit ASCII character, if graphics the byte represents 8 pixels.

The video is enabled by the -v , -i and -g command line tags :-

  -v      turns the VDU on in text mode with 0B00 being the top page and
          0F00h being the bottom page.
  -i      does the same, but with the page addresses swapped around.
  -g      puts the VDU into graphic mode.

Paul Robson (autismuk@aol.com)
