In order to work properly, the emulators need to load a few system files:
The place where they will be searched for depends on the value of the
Directory
resource, which is a colon (;
)-separated search
path list, like the UNIX PATH
environment variable. The
default value is
PREFIX/lib/vice/EMU:BOOTPATH/EMU
Where PREFIX
is the installation prefix (usually
`/usr/local'), EMU
is the name of the emulated machine
(C64
, C128
, PET
or VIC20
) and
BOOTPATH
is the directory where the executable resides.
For example, if you have the C64 emulator installed in
/usr/local/bin/x64
then the value will be
/usr/local/lib/VICE/C64;/usr/local/bin/C64
And system files will be searched for under the following directories, in the specified order:
/usr/local/lib/VICE/C64
/usr/local/bin/C64
System files can still be installed in a different directory if you specify a complete path instead of just a file name. For example, if you specify `./kernal' as the kernal image name, the kernal image will be loaded from the current directory. This can be done by using command-line options or by modifying resource values (see section 6.1 Format of resource files).
Every emulator requires its own ROM set. For the VIC20 and the C64, the ROM set consists in the following files:
The C128 needs the following files instead:
The PET emulator uses a quite different setup instead: the Basic and Kernal ROMS are packed into a single file and only three kernal files are provided; one for each basic revision. To handle the different screen sizes and keyboards, different so-called "editor-ROMs" for the memory range $E000-$E800 are provided. The kernal files contain an editor ROM for 40 columns and graphics keyboard already. The PET ROMs have the following names:
The PETs also have sockets for extension ROMs for the addresses
$9000-$9FFF, $A000-$AFFF and $B000-$BFFF (the last one for PET2001 and
PET3032 only). You can specify ROM image files for those extensions
command line options -petrom9
, -petromA
and
-petromB
resp.
An alternative would be to specify a long kernal ROM with the
-kernal
option that includes the extension ROM areas already.
Also, you can specify a replacement for the basic ROM at $B000-$DFFF
with the -petromBasic
option and a replacement for the editor ROM
at $E000-$E7FF with the -petromEditor
option.
Keymap files are used to define the keyboard layout, defining what key (or combination of keys) must me mapped to ever keysym.
In other words, the keyboard emulation works like this: whenever the user presses o releases a key while the input focus in the emulation window, the emulator receives an X-Window event with a value that identifies that key. That value is called a keysym and is unique to that key. Then the emulator looks for that keysym into an internal table which tells it what key(s) to press or release on the emulated keyboard.
This table is described by the keymap file, which is made up of lines like the following:
KEYSYM ROW COLUMN SHIFTFLAG
Where:
KEYSYM
is a string identifying the keysym: you can use the
xev
utility (shipped with the X Window system) to see what keysym
is bound to any key;
ROW
and COLUMN
identify the key on the emulated keyboard;
SHIFTFLAG
can have one of the following values:
0
: the key is never shifted;
1
: the key is shifted;
2
: the key is the left shift;
4
: the key is the right shift;
8
: the key can be (optionally) shifted by the user.
The SHIFTFLAG
is useful if you want certain keys to be
"artificially" shifted by the emulator, and not by the user. For
example, F2 is shifted on the C64 keyboard, but you might want it
to be mapped to the unshifted F2 key on the PC keyboard. To do
so, you just have to use a line like the following:
F2 0 4 1
where 0
and 4
identify the key (row 0, column 4 on the
keyboard matrix), and 1
specifies that every time the user presses
F2 the shift key on the C64 keyboard must be pressed.
There are also some special commands you can put into the keyboard file; they are recognized because they start with an exclamation mark:
!CLEAR
clears the currently loaded keyboard map; it is
necessary to put this at the beginning of the file if you want the
keymap file to override all of the current internal settings;
!LSHIFT
, !RSHIFT
, followed by a row and a column
value, specify where the left and right shift keys are located on the
emulated keyboard; for example, C64 default keymaps will specify
!LSHIFT 1 7 !RSHIFT 6 4
Any line starting with the #
sign, instead, is completely
ignored. This is useful for adding comments within the keymap file.
VICE keymap files have the `.vkm' default extension, and every emulator comes with a default positional mapping and a default symbolic mapping.
Palette files are used to specify the colors used in the emulators. They are made up of lines like the following:
RED GREEN BLUE DITHER
where RED
, GREEN
and BLUE
are hexadecimal values
ranging from 0 to FF and specifying the amount of red, green and blue
you want for each color and DITHER
is an hexadecimal 4-bit
number specifying the pattern you want to be used when rendering on a
B/W display.
You have to include as many lines as the number of colors the emulated machine has, and the order of the lines must respect the one used in the machine (so the N'th line must contain the specifications for color N - 1 in the emulated machine).
Lines starting with the #
sign are completely ignored. This is
useful for adding comments (such as color names) within the palette
file.
For example, the default PET palette file (which has only two colors, 0 for background and 1 for foreground), looks like the following:
# # VICE Palette file # # Syntax: # Red Green Blue Dither # # Background 00 00 00 0 # Foreground 00 FF 00 F
Go to the first, previous, next, last section, table of contents.