PONG
We got millions of these LCD panels for a pound each. They are 640x480 at 9bit colour.In order to drive them I used a spartan on our ARM board.
Firstly I created a block to emit the clock hsync and vsync signals and the X and Y position of the scan.
That way the LCD could be driven and all that is needed the colour signal of the current pixel.
Firstly I created rectangle drawing units. Each unit would detect if the current scan position is in its region.
This is done by simply comparing the current X and Y with the maximum and minimum values of the rectangle.
These values were passed to the spartan from the ARM and chosen in software.
Using this unit it was possible to create Pong.
The two buttons on board were used for first players controller and another controller was created by cutting some buttons off a cd-rom drive.
DRAM
The spartan has no memory (well no where near enough for a full frame buffer) so I got a 30 pin SIMM(we have a box of about 196 1Meg SIMM that I spent an afternoon ripping out of old Spark 1s)
and spent an hour or two soldering wires from it to some connectors to the board.
Frame Buffer
The Spartan was again used to control the RAM and display its contents on the LCD. With a little effort to actually work the DRAM.For simplicity the screen was directly mapped onto the memory. So the 640 by 480 screen maps onto 1024 by 1024 DRAM.
The RAS is done on a scan line change and the CAS is done every pixel. To write a pixel a particular colour three registers are set (X Y and C).
When the scan passes across the X and Y values of the registers the write line is asserted and the colour register is asserted on the memory data bus.
Dual RAM
To allow dithering I got another SIMM and connected it on the address and control lines of the origional. This now gives 18bit memory.