_ax MSB
_ah = _ax+1
_ax LSB
_al = _ax
_ax = $20f8
_bx MSB
_bh = _bx+1
_bx LSB
_bl = _bx
Base pointer.
_bp = $20ec
_bx = $20fa
_cx MSB
_ch = _cx+1
_cx LSB
_cl = _cx
_cx = $20fc
_dx MSB
_dh = _dx+1
Destination address.
_di = $20f0
_dx LSB
_dl = _dx
_dx = $20fe
_r0 = $20e8
_r1 = $20ea
Source address.
_si = $20ee
System clock, hours since startup (0-255)
clock_hh .ds 1
System clock, minutes since startup (0-59)
clock_mm .ds 1
system clock, seconds since startup (0-59)
clock_ss .ds 1
System clock, ticks (1/60th sec) since startup (0-59)
clock_tt .ds 1
VCE Control register.
color_ctrl = colorport
VCE Color table data register.
color_data = colorport+4
VCE control table index register.
color_reg = colorport+2
VCE port.
colorport = $0400
FAT32_ARCHIVE = %0010_0000
JMP opcode (x86).
FAT32_BOOT_JMP = $EB
NOP opcode (x86).
FAT32_BOOT_NOP = $90
Number of bytes per sector.
FAT32_BYTES_PER_SECTOR = $200
FAT32_DIRECTORY = %0001_0000
Maximum number of File Attribute Tables.
FAT32_FAT_COUNT = $02
FAT32_HIDDEN = %0000_0010
FAT32_INT13_PARTITION = $0c
FAT32_LONG_NAME = $0f
Maximum number of msdos partitions.
FAT32_MAX_PARTITION_COUNT = 4
Maximum character length of a path.
FAT32_MAX_PATH = 260
Master Boot Record signature.
FAT32_MBR_SIGNATURE = $AA55
FAT32_MEDIA_TYPE = $f8
FAT32_PARTITION = $0b
FAT32_READ_ONLY = %0000_0001
FAT32_SYSTEM = %0000_0100
FAT32_VOLUME_ID = %0000_1000
8x8 1bpp font data.
font_8x8:
Number of characters embedded in the font.
FONT_8x8_COUNT=$80
Tile index of the first digit character (‘0’).
FONT_DIGIT_INDEX=$30
Tile index of the first lowercase character (‘a’).
FONT_LOWER_CASE_INDEX=$61
Tile index of the first uppercase character (‘A’).
FONT_UPPER_CASE_INDEX=$41
HSYNC = 5
Bitfield grouping all interrupts.
INT_ALL = INT_IRQ2 | INT_IRQ1 | INT_TIMER | INT_NMI
CD-ROM base unit sense bit.
IO_CD_MASK = %10000000
Country detection.
IO_COUNTRY_MASK = %01000000
Bit in the joyport for the down direction on the D-PAD (SEL=1).
IO_JOYPAD_DOWN = %00000100
Bit in the joyport for button I (SEL=0).
IO_JOYPAD_I = %00000001
Bit in the joyport for button II (SEL=0).
IO_JOYPAD_II = %00000010
Bit in the joyport for button III on a 6-button joypad.
IO_JOYPAD_III = %00000001
Bit in the joyport for button IV on a 6-button joypad.
IO_JOYPAD_IV = %00000010
Bit in the joyport for the left direction on the D-PAD (SEL=1).
IO_JOYPAD_LEFT = %00001000
Joypad port pin.
IO_JOYPAD_MASK = %00001111
Bit in the joyport for the right direction on the D-PAD (SEL=1).
IO_JOYPAD_RIGHT = %00000010
Bit in the joyport for the RUN button (SEL=0).
IO_JOYPAD_RUN = %00001000
Bit in the joyport for the Select button (SEL=0).
IO_JOYPAD_SEL = %00000100
Bit in the joyport for the up direction on the D-PAD (SEL=1).
IO_JOYPAD_UP = %00000001
Bit in the joyport for button V on a 6-button joypad.
IO_JOYPAD_V = %00000100
Bit in the joyport for button VI on a 6-button joypad.
IO_JOYPAD_VI = %00001000
Interrupt counter.
irq_cnt = $20f2
Interrupts disable port.
irq_disable = irqport+2
Interrupt control mask.
irq_m = $20f5
Interrupts status.
irq_status = irqport+3
IRQ1 = 1
Index of the user defined IRQ2 vector.
IRQ2 = 0
IRQ ports
irqport = $1400
Previous 5 joypads values.
joyold .ds 5
This array holds the values for 5 2-buttons joypads.
joypad .ds 5
This array contains the values for buttons III, IV, V and VI of 5 6-buttons joypads.
joypad_6 .ds 5
Bit in the joypad for button I.
JOYPAD_I = IO_JOYPAD_I
Bit in the joypad for button II.
JOYPAD_II = IO_JOYPAD_II
Bit in the joypad for button III.
JOYPAD_III = IO_JOYPAD_III
Bit in the joypad for button IV.
JOYPAD_IV = IO_JOYPAD_IV
Bit in the joypad for the RUN button.
JOYPAD_RUN = IO_JOYPAD_RUN
Bit in the joypad for the Select button.
JOYPAD_SEL = IO_JOYPAD_SEL
I/O port.
joyport = $1000
Delta joypad values for 5 2-buttons joypads.
joytrg .ds 5
NMI = 3
Control register.
psg_ctrl = psgport+4
PSG control register bit masks 1 - Channel on 0 - Channel off
PSG_CTRL_CHAN_ON = %10000000
DDA output.
PSG_CTRL_DDA_ON = %11000000
Channel maximum volume (bit 5 is unused)
PSG_CTRL_FULL_VOLUME = %00111111
Channel volume.
PSG_CTRL_VOL_MASK = %00011111
Reset waveform write index to 0
PSG_CTRL_WRITE_RESET = %01000000
Rough frequency adjust.
psg_freq_hi = psgport+3
Fine frequency adjust.
psg_freq_lo = psgport+2
LFO trigger and control.
psg_lfoctrl = psgport+9
LFO frequency.
psg_lfofreq = psgport+8
Global sound volume.
psg_mainvol = psgport+1
Noise control.
psg_noise = psgport+7
Channel balance.
psg_pan = psgport+5
Channel sound data.
psg_wavebuf = psgport+6
PSG port.
psgport = $0800