Return to index |
A number of aspects of the simulation can be changed to correspond with typical hardware and software changes that would have been made to real machines.
This configuration is controlled by a set of system properties that are processed when the simulator starts up. There are a number of different ways in which these properties may be provided. Combinations of these methods can also be used, with properties from later in the list taking precedence over those earlier in the list:
uk101.properties
can be
placed in the same directory as the program JAR file.
This can be useful if you always want to set some specific
property values.-configuration
(or
-c
) can be used to point to an alternative properties
file.
This is useful if you want to keep a number of different
configurations available.-properties
(or
-p
) can be used to apply one or more property
overrides from the command line.
If more than one property is required a comma or semicolon should
be used to separate them.
This can be useful to temporarily try the effect of an
individual property or two.
As an example the following start-up command could be used to start up the simulation temporarily with a large size, green display and a 2MHz CPU:
java -jar uk101-n.n.n.jar -p cpu.speed=2,screen.size=2,screen.colour=green
An example of a Java properties file that contains the default configuration can be found in the file:
samples/properties/uk101.properties
An example of a Java properties file that contains settings suitable for emulating an Ohio Scientific Superboard II can be found in the file:
samples/superboard/superboard.properties
The following sections list all the property names and property values that can be used. Note that property names and values are case-sensitive.
These settings control details of the CPU.
Name | Values | Default | Notes | ||||||
---|---|---|---|---|---|---|---|---|---|
cpu.speed |
from 0 to 4 |
1 |
This defines the maximum simulated CPU speed in MHz.
A standard 6502 ran at 1Mhz but most could be over-clocked to 2Mhz quite
successfully, which doubles the speed of the machine (although some
games may then run too fast).
The simulation allows any speed from 1MHz to 4Mhz to be specified.
Setting a value of 0 will cause the simulation to
run as fast as it can. | ||||||
cpu.control |
auto , sleep , yield or spin |
auto |
This determines the method used by the CPU emulation to manage
instruction timings.
Generally this is best left set to auto to let the system decide
the method based on measured system performance.
The other options are mainly for experimentation and debug.
|
Note: The cpu.speed
setting represents a maximum
simulation speed.
It is possible that an older or slower PC will not be able reach
the maximum requested.
These settings control details of the installed RAM, ROMs and EPROMs.
Name | Values | Default | Notes | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ram.address |
from 0000 to FFFF |
0 |
This sets the memory address for the RAM. This should normally be left set to the default value. | ||||||||
ram.size |
from 4 to 40 |
8 |
This defines amount of RAM installed in KBytes. the standard machine came with 4KB and there were sockets on the board to allow up to 8KB to be installed. In theory, with an expansion board, up to another 32KB could be installed giving an absolute maximum contiguous RAM of 40KB. | ||||||||
ram.XXXX |
from 1 to 64 | This allows additional RAM blocks to be installed in otherwise empty
address space.
The RAM is installed at address XXXX which must be a valid
four digit hexadecimal address from 0000 to FFFF
and the value should be the required RAM size in KBytes. | |||||||||
monitor.address |
from 0000 to FFFF |
F800 |
This sets the memory address for the monitor ROM. This should normally be left set to the default value. | ||||||||
rom.monitor |
MONUK01 MONUK02 CEGMON WEMON or filename |
MONUK02 |
This defines the monitor ROM that is installed.
The value can be the name of a file containing a replacement ROM or
one of the following built-in names:
|
||||||||
basic.address |
from 0000 to FFFF |
A000 |
This sets the memory address for the BASIC ROM. This should normally be left set to the default value. | ||||||||
rom.basic |
BASUK101 or filename |
BASUK101 |
This defines the BASIC ROM that is installed.
The value can be the built-in name BASUK101 or it can
be the name of a file containing a replacement ROM. | ||||||||
rom.charset |
CHGUK101 or filename |
CHGUK101 |
This defines the video character generator ROM that is installed.
The value can be the built-in name CHGUK101 or it can
be the name of a file containing a replacement ROM. | ||||||||
rom.XXXX |
filename | This allows additional ROMs to be installed.
The ROM is installed at address XXXX which must be a valid
four digit hexadecimal address from 0000 to FFFF
and the value should be the name of a file containing the ROM image. | |||||||||
eprom.XXXX |
filename | This allows additional EPROMs to be installed; unlike ROMs, EPROMs can
be written to and the updates will be persisted in the disk image file.
The EPROM is installed at address XXXX which must be a valid
four digit hexadecimal address from 0000 to FFFF
and the value should be the name of a file containing the initial EPROM image.
Empty EPROM images can be created with the
EraseROM utility program.
|
Note: The additional ROMs and EPROMs are processed and installed after the system monitor and BASIC ROMs, so they can be used to replace some or all of the system ROM address spaces.
When a ROM image is loaded it is possible to define a set of patches to be applied to the ROM data. This can be useful, for example, to force a ROM to default correctly for a 32 line screen, or to change timings such as typing auto-repeat rate for use with faster CPU clocks. Patching can also be done by creating a completly separate ROM image, but for quick testing and simple changes adding the patches to the configuration can often be easier.
Patches are defined using the following syntax appended to the name of the ROM to be loaded:
ROMNAME[ADDR/BB,BB,..;ADDR/BB,BB,...]
ADDR |
Is a four-digit hexadecimal address at which to begin patching. |
BB |
Are one or more two-digit hexadecimal bytes used to update the ROM starting at the specified address. |
Some useful patches include:
CEGMON[FBC0/D7]
Default CEGMON for a 32-line display.
CEGMON[FCE0/00]
Disables the CEGMON auto-repeat when typing. This can also be set to non-zero values to alter the auto-repeat rate, the default value being 10.
MONUK02[FACA/20;FAF1/20;FB2D/D8;FB61/D8;FB85/D7;
FB8D/A9,1A,85,E4,AD,08,02,0A,0A,0A,0A,26,E4,0A,26,E4,0A,26,E4,6D,07,02,69,0D,85,E3,60]
Updates to the standard monitor for a 32-line screen. These changes were listed in Practical Electronics April 1982, page 57. This is quite a complex patch; a version of the ROM with these patches already applied can be found in the samples/roms directory.
This setting controls settings for the ACIA.
Name | Values | Default | Notes |
---|---|---|---|
acia.address |
from 0000 to FFFF |
F000 |
This sets the memory address for the ACIA. This should normally be left set to the default value. |
acia.rate baud.rate |
110 , 300 , 600 , 1200 ,
2400 , 4800 or 9600 |
300 |
This defines default baud rate of the ACIA.
Some programs (in particular some games) relied on the ACIA control signals to generate accurate timings that were independent of the CPU speed. |
Note: The ACIA baud rate setting is ignored when reading or writing to a simulated cassette tape, these operations simply run as fast as they can, however it is required if reading or writing a Kansas City Standard audio file.
These settings control the keyboard layout and available keys together with the default keyboard input mode.
Name | Values | Default | Notes | ||||
---|---|---|---|---|---|---|---|
keyboard.address |
from 0000 to FFFF |
DF00 |
This sets the memory address for the keyboard. This should normally be left set to the default value. | ||||
keyboard.layout |
uk or us |
uk |
This defines keyboard layout and the available keys.
| ||||
keyboard.mode |
normal or game |
normal |
This defines the initial keyboard input mode. See keyboard mode for details. |
These settings control the details of the video hardware.
Name | Values | Default | Notes |
---|---|---|---|
video.address |
from 0000 to FFFF |
D000 |
This sets the memory address for the video RAM. This should normally be left set to the default value. |
video.rows |
from 16 to 32 |
16 |
This defines the number of rows in the video buffer. |
video.cols |
from 32 to 64 |
64 |
This defines the number of columns in the video buffer. |
Note: The settings of the video hardware define the amount of video RAM (rows x columns rounded up to the nearest 1K boundary) and the geometry of screen buffer. This is not quite the same as what gets displayed on the screen as real UK101's simple video hardware was not able to scan all of the memory locations to the TV output. Some characters we "lost" from the beginning and end of each scan line. The screen display section configures this.
These settings control the appearance of the video output.
Name | Values | Default | Notes | ||||
---|---|---|---|---|---|---|---|
screen.width |
from 16 to 64 |
50 |
This defines the number of characters visible on each screen line. | ||||
screen.offset |
from 0 to 63 |
12 |
This defines the offset of the first visible character on each row from the hardware video buffer. | ||||
screen.size |
1 or 2 |
1 |
This defines the size of the video display: 1 is
a smaller display, 2 is a larger display. |
||||
screen.colour screen.color |
white , green or amber |
white |
This defines the colour of the screen display. | ||||
screen.update |
async or sync |
async |
This defines how screen updates are performed.
|
Note: On any modern PC, especially anything with a dual or multi-core processor, the default async screen update option is likely to produce the best results. On older hardware the sync option may result in faster and/or smoother operation.
These settings control the audio encoding when creating Kansas City Standard data files.
Name | Values | Default | Notes | ||||
---|---|---|---|---|---|---|---|
audio.rate |
from 8000 to 96000 |
48000 |
This defines the audio sample rate. Higher sample values give higher quality sound but larger files. | ||||
audio.bits |
8 or 16 |
16 |
This defines the number of bits for each sample. Higher bit values give higher quality sound but larger files. | ||||
audio.lead |
from 0 to 10 |
5 |
This is the number of seconds of carrier tone played before the start and after the end of the data. | ||||
audio.wave |
system or sine |
system |
This defines the shape of the audio waveform.
| ||||
audio.phase |
0 , 90 , 180 or 270 |
90 |
This defines the waveform phase angle used when decoding. This can normally be left as the default but some signals may need a different value - it is usually best to experiment if audio files do not decode correctly. |
Note: The baud rate setting is also required
when reading or writing audio data, however it is restricted to the values
300, 600 or 1200 only.
Tim Baldwin February 2017 tjb101@tinymail.co.uk |
Return to index
© Tim Baldwin 2010,2017 |