Skip to content

VS9989 Registers

Khoa Hoang edited this page Jan 26, 2021 · 2 revisions

VS9989 Registers

  • Bank 0:
    • [0x00] - device id (read only 0x88 - VS9989)
    • [0x01] - Reset
      • 0x5a reset and clear registers
      • 0xa5 reset keep setting
    • [0x02] - register bank?
      • [0] change register bank
    • [0x03] - ??
      • bit [4] change status register 0xd2 (0x08 -> 0xf8)
    • [0x04] y scale/vertical addressing related, breaks input
    • [0x05] x scale/horiz addressing related, breaks input
    • [0x06] - ??
    • [0x07] - ??
    • [0x08] - ??
    • [0x09] yscale/weirdness
    • [0x0a] more yscale/weirdness
    • [0x0b] more yscale/weirdness
    • [0x0c] - ??
      • bit [6] - cause image to freeze
    • [0x0d] - some bits break things
    • [0x0e] - breaks things
    • [0x0f]
      • bit [7] memory test
        • writes incrementing pattern to memory, good to put a charset into the OSD
        • cause green screen while enable
    • [0x10] format related bits? causes sync breakage
    • [0x11] brightness related? top bits freeze image
    • [0x12] not much?
    • [0x13] not much?
    • [0x14] positioning related?
    • [0x15] ypos H/xpos H
      • [0:3] ypos high
      • [7:4] xpos high
    • [0x16] xpos L
    • [0x17] ypos L
    • [0x18] breaks things
    • [0x19] input color/format related
      • [0] G/B swap
      • [1] R/G swap
      • [2] RGB -> GBR
      • [3] blue bit width
      • [4] green bit width
      • [5] red bit width
      • [6] disable chroma
      • [7] disable luma
    • [0x1a]
      • [3] "X" shaped pattern?
    • [0x1b] not much?
    • [0x1c] not much? sometimes breaks sync?
    • [0x31] brightness
    • [0x32] contrast
    • [0x33] saturation
    • [0x34] hue
      • [5:0] hue
    • [0x35] color controls
      • [0] swap red and blue channel
      • [1] video de-noise
      • [2] sharpening color edge
        • 0 - enable
        • 1 - disable
      • [5:3] Y channel shift
      • [6] auto black level adjust
        • 0 - manual
        • 1 - auto
      • [7] black level aujust enable
    • [0x36] black level thresshold
      • high value = darker
    • [0x37] black auto level thresshold
      • only work in auto mode
    • [0x38] black level control
      • only work in manual mode
    • [0x39] black level curve
    • [0x3a] related to black level status (read only)
    • [0x3b] R offset
    • [0x3c] G offset
    • [0x3d] B offset
    • [0x3e] R gain
    • [0x3f] G gain
    • [0x40] B gain
    • [0x41] some kind of color match processing thing
    • [0x42] not much?
    • [0x43] not much?
    • [0x44] not much?
    • [0x45]
      • [2:0] test pattern
      • [3] show test pattern
      • [5] contrast auto adjust
    • [0x46] not much?
    • [0x47] not much?
    • [0x48] not much?
    • [0x49] auto brightness
      • [6:0] gain
      • [7] enable auto brightness
    • [0x50] OSD
      • [3:0] transparency
      • [7:4] blink speed
    • [0x51] OSD config
      • [0] enable plane 0
      • [1] enable plane 1
      • [2] enable plane 2
      • [3] 2x size
      • [4] color related
      • [5] aspect related (1 for proper proportions)
    • [0x52] plane 0 start offset
    • [0x53] plane 0 width in chars
    • [0x54] plane 0 x/y pos MSB
    • [0x55] plane 0 xpos LSB
    • [0x56] plane 0 ypos LSB
    • [0x57] plane 1 start offset
    • [0x58] plane 1 width in chars
    • [0x59] plane 1 height in chars
    • [0x5a] plane 1 x/y pos MSB
    • [0x5b] plane 1 xpos LSB
    • [0x5c] plane 1 ypos LSB
    • [0x5d] plane 2 start offset
    • [0x5e] plane 2 width in chars
    • [0x5f] plane 2 x/y pos MSB
    • [0x60] plane 2 xpos LSB
    • [0x61] plane 2 ypos LSB
    • [0x62] plane 1 scissor enable/MSBs?
    • [0x63] plane 1 left scissor
    • [0x64] plane 1 right scissor
    • [0x65] plane 1 top scissor
    • [0x66] plane 1 bottom scissor
    • [0x69] 4-7 transparent color index 0-3 palette write index
    • [0x6a] palette color R
    • [0x6b] palette color G
    • [0x6c] palette color B
    • [0x6d] address pointer
    • [0x6e] char value
    • [0x6f] char attributes (VGA attribute byte style)
      • charset:
        • 00~7f ROM charset
        • 80~bf RAM charset (custom chars)
        • c0 newline (spaces until next row)
        • c1c8 29 spaces (non-wrapping, stops at EOL)
        • c9~ unused (renders as space)
    • [0x70] custom char addr H
    • [0x71] custom char addr L
    • [0x72] custom char data H (holding)
    • [0x73] custom char data L (on write writes both halves at the same time)
      • custom chars are at 0x80~ in the charset, 16x20 pixels, data is MSB left, stored as 16-bit rows, one char every 20 addresses. there are 64 custom chars.
    • [0x74] output format related (YUVisms and 4:2:2 vs 4:2:0 related?
    • [0x75-0x80] nothing
    • [0x81] output format related
    • [0x82] output format/color related
    • [0x83] Y position related?
    • [0x84] X position related
    • [0x85] Y position related
    • [0x86-0x89] nothing
    • [0x8a] input format related
      • [4] color encoding related
      • [6] swap R/B, also breaks OSD?
      • [7] YUV somethin
    • [0x8b] nothing
    • [0x8c] output clock related?
    • [0x8d] output Hsync related?
    • [0x8e] input sync offset? (H/V)
    • [0x8f] nothing
    • [0x90] messing with this tends to break input permanently
    • [0x91] breaks things
    • [0x92] more input format/something, Y offset, breaks things
    • [0x93] input clocking related
    • [0x94] input clocking/sync related (interlaced?)
    • [0x95] tends to make things blink. framebuffer format related?
    • [0x96] nothing?
    • [0x97] more input/fb format related
    • [0x98]
      • [6] Hflip but also causes glitches (RAM timing issues?)
      • [7] Vflip
    • [0x99] tends to cause permanent breakage
    • [0x9a] nothing
    • [0x9b] glitchiness, input signal related?
    • [0x9c] nothing
    • [0x9d] HScale, but not done very well
    • [0x9e-0xa0] nothing
    • [0xa1] input Hpos
    • [0xa2] input clocking/interlacing related
    • [0xa3] Hpos coarse?
    • [0xa4] HScale fine?
    • [0xa5] VScale?
    • [0xa6] VScale related?
    • [0xa7] ?
    • [0xa8] more in clock/something related
    • [0xa9] more of the same
    • [0xaa] more input config
    • [0xb8] draw lines
    • [0xb9] line x/y pos H
    • [0xba] line x L
    • [0xbb] line y L
    • [0xbc] some kind of horizontal filter?
    • [0xbe] applies a filter to the left edge of the image? (luma only/chroma only)
    • [d5] more input/fb clocking or whatever stuff
    • [0xd7]
      • [2] output: swap Y and UV
    • [0xe9] bit 6: some color pattern
    • [0xf0] test pattern
      • [7] enable
      • [3-0] pattern
        • 0 grey
        • 1 H gradient
        • 2 V gradient
        • 3 boxes
        • 4 boxes
        • 5 H color bars
        • 6 V color bars
        • 7 X box
        • 8~ black
  • Bank 1:
    • [0x00] devid 1?
    • [0x01] reset
      • 0xa5 reset, keep registers setting
      • 0x5a full reset
    • [0x02] bank select
    • [0x03] nothing all 0
    • ...
    • [0x10] doesn't do anything?
    • [0x11] doesn't do anything?
    • [0x12]
      • [6] timming/interlace related? make screen glitchy
    • [0x13] - [0xff] doesn't do anything?
Clone this wiki locally