A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » Processors » General
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Recommend Book on Basic Video Card Design?



 
 
Thread Tools Display Modes
  #1  
Old November 26th 03, 08:42 AM
Jeff Walther
external usenet poster
 
Posts: n/a
Default Recommend Book on Basic Video Card Design?

As a hobbyist project I would like to design and build a simple video
card. I would appreciate any recommendations of books (or other
references) that address this topic. Ideally, I would like something
which is thorough about all the things that need to be addressed, without
bogging down in too much specific detail--at least not in the first few
chapters.

This is for fun and education, so no pressure. I have a few reference
books and have read the relevant sections in a few text books. I have an
EE degree and about a year of experience doing logic design. I've laid
out a few PCBs and I can do SM soldering on fine pitched parts by hand.

I don't have embedded programming experience, but I have done some
assembly and machine language programming in a couple of classes.

The problem I'm having is that the materials I can find address how to
design cards for a specific platform, but seem to assume that the reader
is familiar with interface card design in general. So they just fill in
the details one needs to work in a specific environment without explaining
the bigger picture of why these details are needed to make the larger
device work.

The materials I've looked at are kind of like learning to program the
first time by reading a book that only covers the syntax of 'C' without
explaining anything about the theory behind programming and how programs
are put together.

One book I have even has an abbreviated video card example, but it assumes
that the reader knows everything there is to know about how computer video
works. For example, I've gathered that some or all video cards generate
an interrupt at the end of a vertical refresh cycle, but I have no idea
why.

Specifically, (when you stop laughing, please suggest a book) I'm trying
to design a simple video card for the old (ca. 1989) Macintosh SE/30. I
have Apple's "Designing Cards and Drivers for the Macintosh Family", 3rd
Edition, and the Inside Macintosh volumes. And a few text books from my
EE schooling that touch on computer architecture and such. But I haven't
seen something that will just flat out explain the logical blocks one
needs to make a video card work, what a monitor expects to come out of the
video card, the concepts behind interfacing a card to host, the chunks of
code (functional descriptions, not listings) that are needed to tie it
together and why they're needed, etc.

The SE/30 has a PDS slot to a 68030 but the software interface is based on
the Mac's NuBus system.

I can probably hack it out with what I know and what I can find, but it
sure would be nice to have an instructional text...

--
A friend will help you move. A real friend will help you move a body.
  #3  
Old November 28th 03, 02:46 AM
rms
external usenet poster
 
Posts: n/a
Default

It goes back many years, but Don Lancaster's _Cheap Video Cookbook_ and
_TV Typewriter Cookbook_ are where I learned the ropes.


I still own both of these. Hard to admit

rms


  #6  
Old November 30th 03, 05:05 AM
Alex Gibson
external usenet poster
 
Posts: n/a
Default


"Jeff Walther" wrote in message =
...
As a hobbyist project I would like to design and build a simple video
card. I would appreciate any recommendations of books (or other
references) that address this topic. Ideally, I would like something
which is thorough about all the things that need to be addressed, =

without
bogging down in too much specific detail--at least not in the first =

few
chapters. =20
=20
This is for fun and education, so no pressure. I have a few =

reference
books and have read the relevant sections in a few text books. I have =

an
EE degree and about a year of experience doing logic design. I've =

laid
out a few PCBs and I can do SM soldering on fine pitched parts by =

hand. =20
=20
I don't have embedded programming experience, but I have done some
assembly and machine language programming in a couple of classes.
=20
The problem I'm having is that the materials I can find address how to
design cards for a specific platform, but seem to assume that the =

reader
is familiar with interface card design in general. So they just fill =

in
the details one needs to work in a specific environment without =

explaining
the bigger picture of why these details are needed to make the larger
device work. =20
=20
The materials I've looked at are kind of like learning to program the
first time by reading a book that only covers the syntax of 'C' =

without
explaining anything about the theory behind programming and how =

programs
are put together.
=20
One book I have even has an abbreviated video card example, but it =

assumes
that the reader knows everything there is to know about how computer =

video
works. For example, I've gathered that some or all video cards =

generate
an interrupt at the end of a vertical refresh cycle, but I have no =

idea
why.
=20
Specifically, (when you stop laughing, please suggest a book) I'm =

trying
to design a simple video card for the old (ca. 1989) Macintosh SE/30. =

I
have Apple's "Designing Cards and Drivers for the Macintosh Family", =

3rd
Edition, and the Inside Macintosh volumes. And a few text books from =

my
EE schooling that touch on computer architecture and such. But I =

haven't
seen something that will just flat out explain the logical blocks one
needs to make a video card work, what a monitor expects to come out of =

the
video card, the concepts behind interfacing a card to host, the chunks =

of
code (functional descriptions, not listings) that are needed to tie it
together and why they're needed, etc.
=20
The SE/30 has a PDS slot to a 68030 but the software interface is =

based on
the Mac's NuBus system. =20
=20
I can probably hack it out with what I know and what I can find, but =

it
sure would be nice to have an instructional text...
=20


Have you had a look at www.opencores.org ?

opensource hdl - hardware description language projects

You could do what your after in a reasonable sized fpga
or parts. Could use small fpga or large cpld for different parts of the =
interfacing

Alex
  #7  
Old November 30th 03, 11:44 AM
Reinder Verlinde
external usenet poster
 
Posts: n/a
Default

In article ,
(Jeff Walther) wrote:

For example, I've gathered that some or all video cards generate
an interrupt at the end of a vertical refresh cycle, but I have no idea
why.

That is so that programs can write to screen memory while the video card
is not reading from it.

Older hardware does not have dual-ported RAM; If one were to write at a
scanline at the time the video refresh hardware tried to read it, one
would see awful display artifacts. A clear example for this was the
Sinclair ZX80. Its Basic had 'Fast' and 'Slow' commands that toggled
whether screen output was sync'ed with the vertical refresh interrupt.

With dual-ported RAM, one still may want to sync with screen refresh. If
one updates the screen while it is being written, users may shortly see
half the old and half the new image.

You will find that many cards can also generate interrupts at the end of
each scan line. These can be used to improve the capabilities of the
video card, for instance by switching color tables or video modes
mid-screen (IIRC the original Atari game console even only had a single
scan line of video memory. It had to be updated in software while the
electron beam moved to the start of the next scan line)

Both kinds of interrupts also are useful if one wants to support a light
pen (NB: these probably will only work with CRT systems)

I suggest searching for 8-bit computer hobbyist sites (especially the
Atari 400 and 800) to get an idea about the symbiosis of hard- and
software in video card capabilities.

Reinder
  #8  
Old November 30th 03, 06:26 PM
Jan Panteltje
external usenet poster
 
Posts: n/a
Default

On a sunny day (Sun, 30 Nov 2003 11:44:50 +0100) it happened Reinder Verlinde
wrote in
:

In article ,
(Jeff Walther) wrote:

For example, I've gathered that some or all video cards generate
an interrupt at the end of a vertical refresh cycle, but I have no idea
why.

That is so that programs can write to screen memory while the video card
is not reading from it.

Older hardware does not have dual-ported RAM; If one were to write at a
scanline at the time the video refresh hardware tried to read it, one
would see awful display artifacts. A clear example for this was the
Sinclair ZX80. Its Basic had 'Fast' and 'Slow' commands that toggled
whether screen output was sync'ed with the vertical refresh interrupt.

This may perhaps not be completely correct,
the ZX80 in fast mode had no display AT ALL.
It would calculate / process the BASIC commands or keyboard presses, then
when finished the processor would jump to the display routine (the same one
as in slow mode).
It would flash on key entry in fast mode because of that.
When in slow mode, the NMI was called every 1/50th of a second, and the
display routine activated every frame.
(And the ZX80 / ZX81 would be really slow because of all those display
interrupts).
I just looked it up, ZX81 ROM disassembly by Dr. Ian Logan
& Dr. Frank Ohara:
the NMI routine:

This routine is entered whenever a 'slow' NMI occurs.
0066 NMI:
ex af,af'
inc a
jp M, 006d NMI-RET
jr z, 006f, NMI-CONT
006d NMI-RET:
ex af, af'
ret

At 006f is the 'prepare for slow' display routine.

This issue is very different from the one at issue here,
in modern cards you can write to one part of memory,
while the other part one is displayed, then switch display
memory (address actually) and write to the other part and
display the first part.
(As opposite to writing to the cards memory only during vertical
flyback, that would be invisible, but slow, as there are only a few
milliseconds available every frame).
This way writes do not appear in the screen (could be
small black stripes if writing directly into the display).
If you also sync the display memory toggle with the monitor
vertical scanning, you do not get horizontal cut picture
parts as already pointed out by Mr. D'Oliviero

Actually I once designed a display card, maybe I should write
a book....
hehe

  #9  
Old December 1st 03, 07:50 AM
Jeff Walther
external usenet poster
 
Posts: n/a
Default

In article ,
Jan Panteltje wrote:


In article ,
(Jeff Walther) wrote:

For example, I've gathered that some or all video cards generate
an interrupt at the end of a vertical refresh cycle, but I have no idea
why.


This issue is very different from the one at issue here,
in modern cards you can write to one part of memory,
while the other part one is displayed, then switch display
memory (address actually) and write to the other part and
display the first part.
(As opposite to writing to the cards memory only during vertical
flyback, that would be invisible, but slow, as there are only a few
milliseconds available every frame).
This way writes do not appear in the screen (could be
small black stripes if writing directly into the display).
If you also sync the display memory toggle with the monitor
vertical scanning, you do not get horizontal cut picture
parts as already pointed out by Mr. D'Oliviero


It sounds like there are a number of methods of avoiding this problem.
That's one of the things I'd really like a reference to cover...

When switching display memory as mentioned above, does one actually have
two separate video frames and twice the nominally needed VRAM, or is
something fancier going on?

And what did folks do before there was dual ported memory--or if one does
not wish to use dual ported memory? Was writing to the frame buffer
consigned completely to the vertical flyback interval?

For my first cut, I'm considering only supporting grayscale on the
internal monitor (512 X 342). In a stock machine it's 1 bit, so this is a
modest improvement. The host CPU/68030 bus runs at 16 MHz and is 32 bits
data and 32 bits address. So it's not running very fast. Of course, my
video processor may run considerably faster.

Anyway, to simplify my first cut, I'm considering just using SRAM for the
video memory. That would save me needing to multiplex the addresses and
worry about refresh cycles. But dual-port SRAM is *expensive* so I'd
rather avoid going dual-port if I can.

Now, I could just install two frame buffers I guess, because SRAM in small
capacities like this is fairly inexpensive. But in later revisions I may
wish to support an external Apple and/or VGA monitor and supply something
like 4 MB of VRAM and that would get kind of expensive to double.

On the other hand, I want good performance. On the gripping hand,
performance must have some ceiling because of the inherent limits of the
system (16 MHz X 32 bits).

Actually I once designed a display card, maybe I should write
a book....
hehe


Pretty please....

--
A friend will help you move. A real friend will help you move a body.
  #10  
Old December 1st 03, 07:56 AM
Jeff Walther
external usenet poster
 
Posts: n/a
Default

In article , "Alex Gibson"
alxx/*nospam*/@@/*nospam*/ihug./*nospam*/com./remove/au wrote:



Have you had a look at www.opencores.org ?

opensource hdl - hardware description language projects

You could do what your after in a reasonable sized fpga
or parts. Could use small fpga or large cpld for different parts of the =
interfacing


Thanks, Alex. I just took a look. There's an open core for a VGA/LCD
driver for a Wishbone bus host. I hope to learn a thing or three by
looking over the documentation and verilog.

I was planning to use an FPGA and parts. What is the difference between
an FPGA and a CPLD, or is there a reference that covers the finer points
of PLDs?

I was thinking my main components would be an FPGA, VRAM of some flavor, a
Flash for the firmware, and a RAMDAC. I might be able to integrate the
RAMDAC into the FPGA I guess; it looks like the opencore design does that,
but I haven't examined it closely yet, so perhaps not.

I may also need some buffers for the interface to the host, but I may be
able to put that on the FPGA as well. Oh, and I bet I'll need some kind
of programmable clock generator.

--
A friend will help you move. A real friend will help you move a body.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardcore gamer is little upset. Ryan Atici Asus Motherboards 16 December 26th 04 04:26 AM
A7N8X-boot problems and dead video card lefthandblack Asus Motherboards 4 August 25th 04 02:09 PM
Video card for surveillance, any Recommend? Brandon Brown General 1 May 20th 04 06:28 AM
dual monitor video card - business use - recommend? woof General 5 January 9th 04 09:25 PM
Basic video Card w/ TV-Out? Willy Radisson General 0 August 25th 03 03:00 PM


All times are GMT +1. The time now is 11:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.