Module vce

Module vce 

Source
Expand description

The HuC6260 VCE: colour table, control register, dot clock, frame length (vce.py).

[mfr: Hudson HuC6260 manual; hw: pcetech 6; doc: wiki “VCE pinout”, “Timing”] (MacDonald’s headings swap the VDC and VCE names: C1.)

Registers ($FF:0400-07FF, 8-byte mirror):

$0 control (write only)    D7 monochrome, D2 blur / line count (C3), D1-D0 dot clock
$2/$3 colour address LSB/MSB (write only; 9 bits)
$4/$5 colour data LSB/MSB  (the address advances after the MSB, read or write)

Everything else reads $FF. The palette is 512 entries of -------GGGRRRBBB.

Output colour: the board exposes the 9-bit pixel and palette values; turning GRB into RGB is a replaceable table (rgb_table), because there is no standard conversion (docs/vce.md). The default is a plain linear 3-bit expansion, which is not any emulator’s colours.

Structs§

Vce

Constants§

DOT_DIVIDERS
Dot clock divider by CR bits 1-0 [hw: pcetech 6, doc: wiki Timing]: 5.37, 7.16, 10.7 MHz. Hudson’s manual knows only 4 and 3 (C8); bit 1 set is MacDonald’s 10 MHz mode.

Functions§

linear_rgb_table
Entry GGGRRRBBB -> (r, g, b), each 3-bit value scaled by 255/7.