WARNING! Commander X16 is not yet a finalised design.
Therefore, both the device itself and the modules for its support may change at any moment.
The X16-oriented modules may be out of date and not support the current design of the device.
The x16_kernal
module is imported automatically on the X16 target.
Currently, it automatically imports the c64_kernal
module.
Configures the mouse pointer.
enable
should be 1
to enable, 0
to disable and $ff
to enable without reconfiguration.
scale
should be 1
on 640×480 screens, 2
on 320×240 screens, and 0
to keep the current scale.
The x16_hardware
module is imported automatically on the X16 target.
Switches the RAM segment at $A000-$BFFF.
Switches the ROM segment at $C000-$DFFF.
Writes a byte into the VERA memory space.
Reads a byte from the VERA memory space.
Writes size
bytes into the VERA memory space.
Copies size
bytes from the RAM at address source
into the VERA memory space at address address
.
Hardware register values for a video layer. For VERA 0.7 and 0.8:
byte ctrl0
byte ctrl1
word map_base
word tile_base
word hscroll
word vscroll
For VERA 0.9:
byte config
byte map_base
byte tile_base
word hscroll
word vscroll
Sets up the layer 1. VERA 0.7 and 0.8 only.
On VERA 0.9, use vera_layer0
directly.
Sets up the layer 2. VERA 0.7 and 0.8 only.
On VERA 0.9, use vera_layer1
directly.
Direct access to registers for the layer 0. VERA 0.9 only.
Direct access to registers for the layer 1. VERA 0.9 only.
Hardware register values for a sprite:
word address
word x
word y
byte ctrl0
byte ctrl1
Uploads sprite data for given sprite id.
Various addresses in the VERA memory space.
Various addresses in the VERA memory space. VERA 0.7 and 0.8 only.
Resets the VERA.
Enables/disables sprites.
Changes the color of the border.
The x16_joy
module implements a joystick driver compatible with the joy
module.
Reads the joystick from the port 1.
Reads the joystick from the port 1.
Reads the joystick from the port 1 and adds its readouts to the current readouts.
Reads the joystick from the port 2 and adds its readouts to the current readouts.
The following variables have the value 1 if the key is pressed and 0 if not:
Warning: The assignment of NES controller buttons and keyboard keys may change in the future.
Variable | SNES controller | NES controller | Keyboard (joy 1 only) |
---|---|---|---|
input_a |
A | ||
input_b |
B | A | Ctrl |
input_x |
X | B | Alt |
input_y |
Y | ||
input_start |
Start | Start | Enter |
input_select |
Select | Select | Space |
input_l |
L | ||
input_r |
R |
input_b
is an alias for input_btn
. Single-button games should use input_btn
for compatibility.
The type of the last read joystick. One of joy_none
, joy_nes
, joy_snes
, joy_keyboard
.
Defines the joystick in port 1 as the default joystick.
The x16_mouse
module implements a mouse driver compatible with the mouse
module.
Before using this, you may want to call mouse_config
from the x16_kernal
module.
Reads the state of the mouse.