spacer

GID j - Attempt 1 snow

GID j posts - first entry

Satuday 2pm and I’m a little closer to understanding how to plot a pixel, although only a little. The first attempt to generate a video signal resulted in, well see for yourself, detune a tv channel and look at the white snow, thats pretty close to what I’m looking at right now :)

The reason been, I’ve not setup any kind of timing for generating the video signal yet but I know that at least I’m outputting to the correct port to generate “a” signal. After a little digging through the XGS docs I’ve got the information on the PAL signal specs, the main bits of interest are:

  • Front Porch 1.5µs
  • Active Video 53.1µs
  • Sync 0V
  • Black 0.3V
  • White 1.0V

Based on this we can calculate the number of pixels a PAL tv can cope with (@5.5Mhz), we can change the signal at a rate of 1/5.5Mhz = 182ns which gives us 53.1µs / 182ns = 292 pixels per scanline (best case; although I think my tv will do 720 due to extra bandwidth, but we’ll go for a conservative value)

So in order to get a pixel (assuming no colour) on the screen I need to generate a video signal to display 312 scanlines each comprised of at most 292 pixels. Heres the full scanline signal needed for a PAL system. (I’m ignoring colour burst for now; image obtained from Haagans website)

Pal Sync signal

Once the horizontal signal is up and running the vertical signal should be a snap, its nothing more than another timing signal, so we’ll be sending a H Sync signal for each line followed by 4-10 lines of vsync. I’m keeping this simple and going for 274 lines at 50Hz (50 frames per second) with 16 blank lines top/bottom to account for tv variations and the 6 lines of vsync giving a total of 312 lines.

The key to this is the timing, with the SX52 processor that the XGS uses running at 80Mhz, 1 clock cycle = 12.5ns we need to ensure that the number of cycles used to generate the signal matches the above timing diagram.

There is a whole lot more to the signal generation than the overview above, if you’re really interested in the details either get the XGS and read the book (which in addition covers designing and building the actual video hardware) or google it.

So the plan for the larger part of today is to get a suitable delay macro up and running and outputting the appropriate voltages to generate a stable H/V signal. Initially using a fixed value for each pixel (we’ll get to plotting a single specific pixel later.. for now its a screen fill) Fingers crossed that is.

Comments are closed.

 
 
 
© 2005-2007 Gary Preston
Figment Games is hosted by DreamHost
Entries (RSS) and Comments (RSS).