Open mcejp opened 6 years ago
VS2_RTL will need to be rearchitected to draw pixel by pixel -> in RTL: split VRAM/framebuffer in memu: draw just into memory; update framebuffer by clock/2
59.94 Hz refresh, 25.175 pixel clock, 50.350 cpu clock
420,000 pixel clocks / frame
^ this is at 640x480, but we probably want to support multiple resolutions?
1 Meg of VRAM allows 640x480x16 (614400) 320x240x24 would fit, but let's say the DAC is not that good and 16-bit color is the best that can be had
In lower-res modes, pixels and lines are simply doubled.
Global:
HC
(should always be 800) 10-bitVC
(should always be 525) 10-bitPer layer:
LE
(0/1) 1bitP
(/2 ~ 640, /4 ~ 320) 1bitL
(/1 ~ 480, /2 ~ 240) 1bitFE
(0/1) 1bitD
(1, 2, 4, 8, 16) 3bitN
(always 2) --B
(0, 1, 2, 4, 8) 3bitK
8bitS
(0..2047) 11-bitPE
(0/1) 1-bitPixel data is fetched every D pixels, always as 16-bit.
Color is chosen according to palette[data & K] if PE else data & {K, 8'hFF}
Every pixel, if there is no fetch, data is updated as data = data >> B
If P
<> 1, all this processing is only done every P-th pixel.
Examples:
P=1, L=1, N=2, D=1, K=x, B=x, S=1280
P=1, L=1, N=2, D=2, K=FF, B=8
P=1, L=1, N=2, D=16, K=01, B=1
P=2, L=2, N=2, D=2, K=FF, B=8
Only 1 layer for now + BGCOL
DRAM yes or no? Need to decide now. Look at HW schematics.
Proposal: NO for now, to simplify.
Use SDRAM; transparent to programmer.
Mainly BGCOL so that we don't have to be retarded.