VCE value for black.
VCE_BLACK = $000
VCE value for blue.
VCE_BLUE = $007
Bit 2 is used to enable or disable sprites and background characters edge blur.
VCE_BLUR_MASK = %00000100
Disable edges blur.
VCE_BLUR_OFF = %00000000
Blur edges of the sprites and background characters.
VCE_BLUR_ON = %00000100
Black and white video.
VCE_COLOR_MODE_BW = %10000000
Bit 7 selects the video mode.
VCE_COLOR_MODE_MASK = %10000000
Color video.
VCE_COLOR_MODE_RGB = %00000000
VCE value for yellow.
VCE_CYAN = $1C7
10MHz dot clock.
VCE_DOT_CLOCK_10MHZ = %00000010
5MHz dot clock.
VCE_DOT_CLOCK_5MHZ = %00000000
7MHz dot clock.
VCE_DOT_CLOCK_7MHZ = %00000001
Bits 0 and 1 selects the dot clock.
VCE_DOT_CLOCK_MASK = %00000011
VCE value for green.
VCE_GREEN = $1C0
VCE value for grey.
VCE_GREY = $124
VCE value for magenta.
VCE_MAGENTA = $03F
VCE value for red.
VCE_RED = $038
VCE value for white.
VCE_WHITE = $1ff
VCE value for yellow.
VCE_YELLOW = $1F8
128x32 virtual background map.
VDC_BG_128x32 = %00100000
128x64 virtual background map.
VDC_BG_128x64 = %01100000
32x32 virtual background map.
VDC_BG_32x32 = %00000000
32x64 virtual background map.
VDC_BG_32x64 = %01000000
64x32 virtual background map.
VDC_BG_64x32 = %00010000
64x64 virtual background map.
VDC_BG_64x64 = %01010000
Background X Scroll Register
VDC_BXR = $07
Background Y Scroll Register
VDC_BYR = $08
Control Register
VDC_CR = $05
Enables background layer.
VDC_CR_BG_ENABLE = $0080
Enables horizontal blank interrupt.
VDC_CR_HBLANK_ENABLE = $0004
Read/write address auto-increment by 1 word.
VDC_CR_RW_INC_1 = $0000
Read/write address auto-increment by 128 words.
VDC_CR_RW_INC_128 = $1800
Read/write address auto-increment by 32 words.
VDC_CR_RW_INC_32 = $0800
Read/write address auto-increment by 64 words.
VDC_CR_RW_INC_64 = $1000
Enables sprite collision interrupt.
VDC_CR_SPR_COLLISION_ENABLE = $0001
Enables sprites layer.
VDC_CR_SPR_ENABLE = $0040
Enables sprite overflow interrupt.
VDC_CR_SPR_OVERFLOW_ENABLE = $0002
Enables vertical blank interrupt.
VDC_CR_VBLANK_ENABLE = $0008
Copy of the VDC control register MSB.
vdc_crh = $20f4
Copy of the VDC control register LSB.
vdc_crl = $20f3
VRAM Data register
VDC_DATA = $02
Default virtual background map size.
VDC_DEFAULT_BG_SIZE = VDC_BG_64x64
Default SAT VRAM offset.
VDC_DEFAULT_SAT_ADDR = $7F00
Default horizontal resolution.
VDC_DEFAULT_XRES = 256
VDC display flag.
vdc_disp = $20f2
DMA Control Register
VDC_DMA_CR = $0F
DMA Destination Address Register
VDC_DMA_DST = $11
Destination address direction (decrement).
VDC_DMA_DST_DEC = %00001000
Destination address direction (increment).
VDC_DMA_DST_INC = %00000000
DMA Transfer Length Register
VDC_DMA_LEN = $12
Enable SAT DMA auto-transfer.
VDC_DMA_SAT_AUTO = %00010000
Enables VRAM to SATB end of transfer interrupt.
VDC_DMA_SATB_ENABLE = %00000001
DMA Source Address Register
VDC_DMA_SRC = $10
Source address direction (decrement).
VDC_DMA_SRC_DEC = %00000100
Source address direction (increment).
VDC_DMA_SRC_INC = %00000000
Enables VRAM to VRAM end of transfer interrupt.
VDC_DMA_VRAM_ENABLE = %00000010
Horizontal Display Register
VDC_HDR = $0B
Horizontal Synchro Register
VDC_HSR = $0A
Memory Address Read Register
VDC_MARR = $01
Memory Address Write Register
VDC_MAWR = $00
Memory Width Register (MWR)
VDC_MWR = $09
Raster Compare Register
VDC_RCR = $06
Copy of the VDC register index.
vdc_ri = $20f7
VRAM-SAT Source Address Register
VDC_SAT_SRC = $13
Bitplanes 0 and 1 are read, 2 and 3 are treated as zeroes.
VDC_SPRITE_CG_MODE_B01 = $00
Bitplanes 2 and 3 are read, 0 and 1 are treated as zeroes.
VDC_SPRITE_CG_MODE_B23 = $01
Bitmask for CG mode.
VDC_SPRITE_CG_MODE_MASK = $0001
16 px sprite height.
VDC_SPRITE_HEIGHT_16 = $00
32 px sprite height.
VDC_SPRITE_HEIGHT_32 = $10
64 px sprite height.
VDC_SPRITE_HEIGHT_64 = $20
Bitmask for sprite height.
VDC_SPRITE_HEIGHT_MASK = $30
The sprite will be flipped horizontally.
VDC_SPRITE_HORIZONTAL_FLIP = $08
Bitmask for sprite horizontal flip flag.
VDC_SPRITE_HORIZONTAL_FLIP_MASK = $08
Bitmask for sprite palette index.
VDC_SPRITE_PALETTE_MASK = $000f
The sprite will be displayed in foreground.
VDC_SPRITE_PRIORITY_HIGH = $80
The sprite will be displayed in background.
VDC_SPRITE_PRIORITY_LOW = $00
Bitmask for sprite priority.
VDC_SPRITE_PRIORITY_MASK = $0080
The sprite will be flipped vertically.
VDC_SPRITE_VERTICAL_FLIP = $80
Bitmask for sprite vertical flip flag.
VDC_SPRITE_VERTICAL_FLIP_MASK = $80
16 px sprite width.
VDC_SPRITE_WIDTH_16 = $00
Bitmask for sprite width.
VDC_SPRITE_WIDTH_MASK = $01
Copy of the VDC status register.
vdc_sr = $20f6
Set when the VDC is waiting for a CPU access slot during the active display area.
VDC_STATUS_BUSY = %01000000
Set when the horizontal blank interrupt occurs.
VDC_STATUS_HBLANK = %00000100
Set when the VRAM to SATB DMA transfer completion interrupt occurs.
VDC_STATUS_SATB_DMA_END = %00001000
Set when the sprite #0 collision detection interrupt occurs.
VDC_STATUS_SPR_COLLISION = %00000001
Set when the sprite overflow interrupt occurs.
VDC_STATUS_SPR_OVERFLOW = %00000010
Set when the vertical blank interrupt occurs.
VDC_STATUS_VBLANK = %00100000
Set when the VRAM to VRAM DMA transfer completion interrupt occurs.
VDC_STATUS_VRAM_DMA_END = %00010000
Vertical Display End Position Register
VDC_VCR = $0E
Vertical Display Register
VDC_VDR = $0D
Vertical Synchro Register
VDC_VSR = $0C
First ROM bank of the VGM data.
vgm_bank .ds 1
VGM data upper bound.
vgm_end .ds 1
Bank of the VGM loop address.
vgm_loop_bank .ds 1
VGM loop address.
vgm_loop_ptr .ds 2
MPR used to map VGM data.
vgm_mpr = 6
Frame delay.
vgm_wait .ds 1
VDC data
video_data = videoport+2
VDC register latch
video_reg = videoport
VDC port
videoport = $0000
VSYNC = 4