Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
H
 HSYNC
 huc.inc
 HuC6260-Video Color Encoder(VCE)
 HuC6270-Video Display Controller(VDC)
I
 I/O port bit mask
 incdw
 incw
 Index
 INT_ALL
 INT_IRQ1
 INT_IRQ2
 INT_NMI
 INT_TIMER
 Interface
 Interrupts management
 IO_CD_MASK
 IO_COUNTRY_MASK
 IO_JOYPAD_DOWN
 IO_JOYPAD_I
 IO_JOYPAD_II
 IO_JOYPAD_III
 IO_JOYPAD_IV
 IO_JOYPAD_LEFT
 IO_JOYPAD_MASK
 IO_JOYPAD_RIGHT
 IO_JOYPAD_RUN
 IO_JOYPAD_SEL
 IO_JOYPAD_UP
 IO_JOYPAD_V
 IO_JOYPAD_VI
 IRQ indentifiers
 IRQ vectors
 irq_cnt
 irq_disable
 irq_disable_vec
 irq_enable_vec
 irq_m
 irq_off
 irq_on
 irq_set_vec
 irq_status
 IRQ1
 IRQ2
 irqport
J
 joyold
 joypad
 Joypad Functions
 Joypad port
 joypad_6
 joypad_6_read
 joypad_delay
 JOYPAD_DOWN
 JOYPAD_I
 JOYPAD_II
 JOYPAD_III
 JOYPAD_IV
 JOYPAD_LEFT
 joypad_poll
 joypad_read
 joypad_reset_multitap
 JOYPAD_RIGHT
 JOYPAD_RUN
 JOYPAD_SEL
 JOYPAD_UP
 JOYPAD_VI
 joyport
 joytrg
L
 lsrdw
 lsrw
M
 Macros
 map_copy
 map_copy_16
 map_data
 map_load
 map_load_16
 map_set
 map_set_bat_bounds
 Math routines
 memcpy_args
 memcpy_ex
 memcpy_init
 memcpy_mode
 Memory copy
 Memory copy helpers
 Memory mapping utility routines
 mulu16
 mulu8
N
 neg
 negdw
 negw
 NMI
P
 Pachinko controller
 phdw
 phw
 pldw
 plw
 Ports
 Predefined colors
 print_bcd
 print_char
 print_dec_u16
 print_dec_u8
 print_digit
 print_fill
 print_hex
 print_hex_u16
 print_hex_u8
 print_string
 print_string_n
 print_string_raw
 PSG Functions
 PSG registers
 psg_ctrl
 PSG_CTRL_CHAN_ON
 PSG_CTRL_DDA_ON
 PSG_CTRL_FULL_VOLUME
 PSG_CTRL_VOL_MASK
 PSG_CTRL_WRITE_RESET
 psg_freq_hi
 psg_freq_lo
 psg_init
 psg_lfoctrl
 psg_lfofreq
 psg_mainvol
 psg_noise
 psg_pan
 psg_wavebuf
 psgport
R
 rand8
 rand8_seed
 Random number generators
 Registers
 remap_data
 RGB
 roldw
 rolw
 rordw
 rorw
HSYNC = 5
Increment a 32 bits value at stated memory location.
Increment a word-sized value at stated memory location.
INT_ALL = INT_IRQ2 | INT_IRQ1 | INT_TIMER | INT_NMI
Bitfield grouping all interrupts.
IRQ1 is triggered by the VDC.
This interrupt is available on the HuCard and expension connectors.
The NMI interrupt does not seem to be used.
This TIMER interrupt is generated by the HuC6280’s internal timer.
Basically the controller acts as 2 joypads plugged on a 2 ports multitap.
IO_CD_MASK = %10000000
CD-ROM base unit sense bit.
IO_COUNTRY_MASK = %01000000
Country detection.
IO_JOYPAD_DOWN = %00000100
Bit in the joyport for the down direction on the D-PAD (SEL=1).
IO_JOYPAD_I = %00000001
Bit in the joyport for button I (SEL=0).
IO_JOYPAD_II = %00000010
Bit in the joyport for button II (SEL=0).
IO_JOYPAD_III = %00000001
Bit in the joyport for button III on a 6-button joypad.
IO_JOYPAD_IV = %00000010
Bit in the joyport for button IV on a 6-button joypad.
IO_JOYPAD_LEFT = %00001000
Bit in the joyport for the left direction on the D-PAD (SEL=1).
IO_JOYPAD_MASK = %00001111
Joypad port pin.
IO_JOYPAD_RIGHT = %00000010
Bit in the joyport for the right direction on the D-PAD (SEL=1).
IO_JOYPAD_RUN = %00001000
Bit in the joyport for the RUN button (SEL=0).
IO_JOYPAD_SEL = %00000100
Bit in the joyport for the Select button (SEL=0).
IO_JOYPAD_UP = %00000001
Bit in the joyport for the up direction on the D-PAD (SEL=1).
IO_JOYPAD_V = %00000100
Bit in the joyport for button V on a 6-button joypad.
IO_JOYPAD_VI = %00001000
Bit in the joyport for button VI on a 6-button joypad.
irq_cnt = $20f2
Interrupt counter.
irq_disable = irqport+2
Interrupts disable port.
Disable IRQ vector.
Enable IRQ vector.
irq_m = $20f5
Interrupt control mask.
Disable one or multiples IRQ interrupts.
Enable one or multiples IRQ interrupts.
Set user interrupt functions.
irq_status = irqport+3
Interrupts status.
IRQ1 = 1
IRQ2 = 0
Index of the user defined IRQ2 vector.
irqport = $1400
IRQ ports
joyold .ds 5
Previous 5 joypads values.
joypad .ds 5
This array holds the values for 5 2-buttons joypads.
joypad_6 .ds 5
This array contains the values for buttons III, IV, V and VI of 5 6-buttons joypads.
Poll 6-buttons joypads state.
9 cycles delay before reading data after SEL line update.
Bit in the joypad for the down direction..
JOYPAD_I = IO_JOYPAD_I
Bit in the joypad for button I.
JOYPAD_II = IO_JOYPAD_II
Bit in the joypad for button II.
JOYPAD_III = IO_JOYPAD_III
Bit in the joypad for button III.
JOYPAD_IV = IO_JOYPAD_IV
Bit in the joypad for button IV.
Bit in the joypad for the left direction.
Read joypad state.
Poll joypads state.
Reset multitap to the first joypad.
Bit in the joypad for the right direction.
JOYPAD_RUN = IO_JOYPAD_RUN
Bit in the joypad for the RUN button.
JOYPAD_SEL = IO_JOYPAD_SEL
Bit in the joypad for the Select button.
Bit in the joypad for the up direction.
Bit in the joypad for button VI.
joyport = $1000
I/O port.
joytrg .ds 5
Delta joypad values for 5 2-buttons joypads.
Right shift 32 bits value.
Right shift word-sized value.
Map copy helper macro.
16x16 tilemap copy helper macro.
Map data to mpr 3 and 4.
Load a portion of a 8x8 tilemap to VRAM.
Load a portion of a 16x16 tilemap to VRAM.
Set current map pointers and infos.
Defines the vertical bounds of the BAT map area.
Set memcpy arguments.
Copy len bytes from the src to dst.
Initialize memcpy routine.
Set memcpy mode (see Copy Modes).
As tia, tii, tin, etc...
Multiply 2 unsigned words.
Multiply 2 unsigned bytes.
Negate value.
Negate 32 bits value.
Negate word-sized value.
NMI = 3
Push 32 bits value onto the stack.
Push word-sized value onto the stack.
Pull 32 bits value from the stack.
Pull word-sized value from the stack.
Output a bcd number at the current BAT location.
Output an ASCII character at the current BAT location.
Output an unsigned decimal number at the current BAT location.
Output an unsigned decimal number at the current BAT location.
Output a decimal digit at the current BAT location.
Fill an area with a given character.
Output a hexadecimal digit at the current BAT location.
Output a hexadecimal number at the current BAT location.
Output a hexadecimal number at the current BAT location.
Display a null (0) terminated string in a textarea.
Display the n first characters of a string.
Display a null (0) terminated string.
psg_ctrl = psgport+4
Control register.
PSG_CTRL_CHAN_ON = %10000000
PSG control register bit masks 1 - Channel on 0 - Channel off
PSG_CTRL_DDA_ON = %11000000
DDA output.
PSG_CTRL_FULL_VOLUME = %00111111
Channel maximum volume (bit 5 is unused)
PSG_CTRL_VOL_MASK = %00011111
Channel volume.
PSG_CTRL_WRITE_RESET = %01000000
Reset waveform write index to 0
psg_freq_hi = psgport+3
Rough frequency adjust.
psg_freq_lo = psgport+2
Fine frequency adjust.
Initialize PSG.
psg_lfoctrl = psgport+9
LFO trigger and control.
psg_lfofreq = psgport+8
LFO frequency.
psg_mainvol = psgport+1
Global sound volume.
psg_noise = psgport+7
Noise control.
psg_pan = psgport+5
Channel balance.
psg_wavebuf = psgport+6
Channel sound data.
psgport = $0800
PSG port.
Generates 8-bit pseudo-random number.
Set pseudo-random number seed.
http://codebase64.org/doku.php?id=base:small_fast_8-bit_prng
Update value of mpr 3 and 4 if needed.
Convert 3bit R, G, B to 9bit palette entry.
Left rotate 32 bits value.
Left rotate word-sized value.
Right rotate 32 bits value.
Right rotate word-sized value.
Close