This is the Commander X16 ROM containing BASIC, KERNAL, DOS and GEOS. BASIC and KERNAL are derived from the Commodore 64 versions. GEOS is derived from the C64/C128 version.
Each release of the X16 emulator includes a compatible build of rom.bin
. If you wish to build this yourself (perhaps because you're also building the emulator) see below.
WARNING: The emulator will currently work only with a contemporary version of
rom.bin
; earlier or later versions are likely to fail.
Building this source code requires only GNU Make and the cc65 assembler. GNU Make is almost invariably available as a system package with any Linux distribution; cc65 less often so.
sudo yum install make cc65
sudo apt-get install make
On macOS, cc65 in homebrew, which must be installed before issuing the following command:
brew install cc65
If cc65 is not available as a package on your system, you'll need to install or build/install it per the instructions below.
Once the prerequisites are available, type make
to build rom.bin
. To use that with the emulator, copy it to the same directory as the x16emu
binary or use x16emu -rom .../path/to/rom.bin
.
You'll need the basic set of tools for building C programs:
sudo apt-get install build-essential git
The cc65 source is on GitHub; clone and build it with:
git clone https://github.com/cc65/cc65.git
make -j4 # -j4 may be left off; it merely speeds the build
This will leave the binaries in the bin/
subdirectory; you may use thes directly by adding them to your path, or install them to a standard directory:
# This assumes you have ~/.local/bin in your path.
make install PREFIX=~/.local
Consult the Nesdev Wiki Installing CC65 page for some hints, including Windows installs. However, the Debian packages they suggest from trikaliotis.net appear to have signature errors.
LIST
F2: MONITOR
F3: RUN
F4: <switch 40/80> F5: LOAD
F6: SAVE"
F7: DOS"$
F8: DOS
MONITOR
: see below.DOS
: no argument: read disk status. "8" or "9" as an argument: switch default drive. "$" as an argument: show directory. all other arguments: send DOS commandVPEEK
(bank, offset), VPOKE
bank, offset, value to access video memory. "offset" is 16 bits, "bank" is bits 16-19 of the linear address. Note that the tokens for the new BASIC commands have not been finalized yet, so loading a BASIC program that uses the new keywords in a future version of the ROM will break!$
and %
in BASIC expressions for hex and binaryLOAD
prints the start and end(+1) addressesO00
..OFF
to switch ROM and RAM banksOV0
..OV4
to switch to video address spaceBank | Name | Description |
---|---|---|
0 | BASIC | BASIC interpreter |
1-3 | – | [Currently unused] |
4 | GEOS | GEOS KERNAL |
5 | CBDOS | The computer-based CBM-DOS for FAT32 SD cards |
6 | KEYMAP | Keyboard layout tables |
7 | KERNAL | character sets (uploaded into VRAM), MONITOR, KERNAL |
KERNAL, BASIC and GEOS additions, DOS: Michael Steil, www.pagetable.com; 2-clause BSD license
FAT32 and SD card drivers: Copyright (c) 2018 Thomas Woinke, Marko Lauke, www.steckschein.de; MIT License
LOAD [filename[,device[,bank,address]]]
VLOAD [filename[,device[,bank,address]]]
[John-Paul Gignac]