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