M
Mark McDougall
Guest
Amit wrote:
A vga controller is little more than a handful of counters. The sync
signals are generated when the counters are within a certain range.
There's at least 2 steps involved in displaying text characters on a video
screen.
1. You compute a (text) screen memory address based on the H & V counters
output from your VGA controller, depending on your chosen sceen dimensions
and resolution.
This address is used to read a character code from video RAM. The
simplest solution would use dual-port RAM for video memory.
2. You compute a character ROM address based on the character code and
(possibly) the H & V counters output from your VGA controller.
This address is used to read a pixel value from character ROM.
When you start adding colour information, a 3rd step involves using the
abovementioned pixel value in a palette table lookup.
These operations have to be pipelined, so you need to take that into
account when you sync the final pixel value with the H/VSYNC signals - ie.
you need to delay them by a few clocks.
Regards,
--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
The address is something *you* have to supply from your vga controller.where does the address come to get mapped to address argument of the
mega function?!
A vga controller is little more than a handful of counters. The sync
signals are generated when the counters are within a certain range.
There's at least 2 steps involved in displaying text characters on a video
screen.
1. You compute a (text) screen memory address based on the H & V counters
output from your VGA controller, depending on your chosen sceen dimensions
and resolution.
This address is used to read a character code from video RAM. The
simplest solution would use dual-port RAM for video memory.
2. You compute a character ROM address based on the character code and
(possibly) the H & V counters output from your VGA controller.
This address is used to read a pixel value from character ROM.
When you start adding colour information, a 3rd step involves using the
abovementioned pixel value in a palette table lookup.
These operations have to be pipelined, so you need to take that into
account when you sync the final pixel value with the H/VSYNC signals - ie.
you need to delay them by a few clocks.
Regards,
--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266