Shop OBEX P1 Docs P2 Docs Learn Events
Trying to modify the VGA_Text driver. — Parallax Forums

Trying to modify the VGA_Text driver.

GilesGoatGilesGoat Posts: 26
edited 2014-12-11 07:53 in General Discussion
Hi,

yesterday I tried to modify the VGA_Text.spin driver to aim to obtain the VESA 720x400 mode.

If I understood correctly, in the example, the clock is generated 16x via PLL starting from 5Mhz so it's an 80 Mhz clock, however the VGARATE is 1/4
of that so 20Mhz so 50ns per tick.

( cause this line I see here )

vga_rate := clkfreq >> 2

With those assumptions and using a 16x16 matrix I was expecting to get some 45x25 chars thing so I modified the driver as that :

CON

cols = 45
rows = 25

further down I modified the parameters block as this :

vga_params long 0 'status
long 1 'enable
long 0 'pins
long %0001 'mode
long 0 'videobase
long 0 'colorbase
long cols 'hc
long rows 'vc
long 1 'hx
long 1 'vx
long 0 'ho
long 0 'vo
long 406 'hd horizontal display ticks (406)
long 20 'hf front porch
long 40 'hs hor synch
long 60 'hb hor back porch (61)
long 400 'vd
long 1 'vf
long 3 'vs
long 42 'vb
long 0 'rate

Those timings are re-calculated based on this table : http://tinyvga.com/vga-timing/720x400@85Hz

(i.e. for example take 'hd' that - in that table - is ( 1 / 35.5Mhz * 720 ) / 50 ns = 405.6 )

which also states ( tried to change in all combinations anyway ) that hsynch in this case is negative but vsynch is positive.

I was expecting to see "some stuff" on the video and then maybe go and adjust things but all I see is my monitor
just 'complaining' that there's no video signal, I saved that file as "Vga_Text_720.spin" and modified the VGA_Text_demo.spin such as to include

' text : "vga_text"
text : "vga_text_720"

However nothing seems to work .. any idea what am I missing here ?

Thanks in advance for any help.

Comments

This discussion has been closed.