CS 686: Programming SVGA Graphics Devices (Fall 2003)
Lecture: Monday-Wednesday 5:15pm-7:00pm (235 Harney Science Center)
Instructor:
Allan Cruse
Email:
cruse@usfca.edu
Phone: (415) 422-6562
Office: 212 Harney Science Center
Office Hours: (see my homepage)
"Graphics programming is among the more challenging things you can do
with a computer -- it requires a substantial degree of insight into how
the hardware and formats involved work..."
-- Steve Rimmer, "Super VGA Graphics Programming Secrets,"
Windcrest/McGraw-Hill (1993), p. 23.
- This course explores fundamental principles of raster graphics
programming from a hardware and systems software perspective,
and utilizes the advanced learning facilities of the Michael D. Kudlick
interactive computer classroom
which affords convenient opportunities
for combining formal instruction with "hands-on" programming exercises.
- Topics include:
- functional components of the standard SuperVGA graphics adapter
- relationship of video memory to screen resolution and color depth
- standard and non-standard display-modes for text and graphics
- basic computer algorithms for line-drawing and region-filling
- construction of wireframe models and principles of animation
- fundamentals of lighting, coloring, and perspective drawing
- user-interface issues in window systems and event-driven programs
- mathematics of ray-tracing used to create photorealistic images
- exercises in font, icon, and cursor designs and interactive controls
- Familiarity with the C/C++ programming language and UNIX/Linux
operating system is assumed, plus acquaintance with the Intel
Pentium processor's registers, instruction-set, and assembly
language. Students also should have completed introductory
coursework in calculus, linear algebra, and data structures.
- This course is open to USF Graduate Students (and to qualified
undergraduates with instructor permission)
Learning Outcomes:
- You will become acquainted with the components of a standard PC display.
- You will acquire experience using an assortment of video display modes.
- You will be able to apply standard algorithms from the realm of graphics.
- You will be able to evaluate suitability of graphics hardware for a task.
- You will know how illusions of animation and photorealism are achieved.
- You will gain experience in performing "reverse engineering" exercises.
- You will know how graphics issues have influenced the computer industry.
- You will lay a foundation for pursuing some additional career options.
Course Textbook:
Classroom Hardware:
Resources
Alumni
 |
USF alumnus
Ted Bisson ('99) now works as a computer game developer with
Blizzard Entertainment in San Mateo,
California. The company is known for its creation of blockbuster games
like Diablo, Warcraft, and Starcraft. We have invited
Ted for a class visit to discuss some career experiences
with computer graphics.
|
While a student at USF
Danien Chee ('98)
collaborated on a
game animation for PCs that featured
original music and sound effects.
After receiving his degree he worked as a lead scripter on games
for Interplay Entertainment Corporation ("Klingon Academy"
and "Icewind Dale") and later as a
developer with
Black Isle Studios
in Irvine, California,
producing the game called "Baldur's Gate"
|
which is played on Microsoft's Xbox or on the Sony PlayStation.
"Game development is definitely an exciting industry to be in and
the myriad possibilites suit me well," Danien writes.
|
 |
 |
Asked to design a simulation of the Pac-Man arcade game as a USF
undergraduate class project, Edward Janne ('94)
equipped his PC
with a joystick -- which he taught himself to program. Later,
while pursuing his Master's degree, Edward did considerable
advance work on a prototype for the
'PictureTalk'
web-conferencing software, and upon finishing his advanced degree
in 1995, he was
hired by
Pixion, Inc.
(headquartered in Pleasanton, California) to continue development work on
their cross-platform version of that award-winning product.
His keen interest in computer graphics eventually led Edward to enroll
for studies in film animation at the Academy of Art in San Francisco.
"Right now I'm in Sydney," Edward writes, "helping develop a
proprietary system for doing securities
analysis. It's really surreal -- I never thought I'd be working
in the finance industry, but my boss studied
at Cal Arts and started out in traditional frame animation,
so if you can imagine the company atmosphere,
it is by no means what I expected to find in a hedge fund!"
|
Boris Weissman ('93)
demonstrated his creativity (and humor) in the
final project he submitted for his
computer graphics class at USF: his assignment was to devise a way
of showing what he had learned
about PC graphics programming, so Boris invented an animated
cartoon-character, a perplexed college
student mulling over just such a vague task, who tries out one
idea, then another, till he's managed to
demo every key course-topic! "I enthusiastically recommended
Boris for graduate studies," Professor Cruse recalls, "based on
the charm and technical proficiency he'd demonstrated in that
assignment."
Awarded his
Ph.D. in computer science at U.C. Berkeley in 1998,
Dr. Weissman worked at
Sun Micro- systems
in Sunnyvale, California,
and as Technical Lead at
Loudcloud, Inc.
(now renamed Opsware).
"I've spent the last two years at
VMware," Boris writes. "We have a
complete line of PC virtualization products. This involves detailed
emulation of all PC components -- including VGA/SVGA hardware."
|
Handouts
- 0203-686-01: Course syllabus (.PDF)
- lesson1.ppt (Powerpoint slides)
- Device driver: vram.c
supporting direct user access to graphics display memory
- Example of a compressed graphics image-file:
issxmas.pcx" (in '.pcx' file-format)
- Demo program: pcxphoto.cpp
for inclass exercise on grayscale image-conversion
- Header-file: pcx.h
(it's needed for the above demo program)
- lesson2.ppt (Powerpoint slides)
- Demo programs: cgademo.cpp
and egademo.cpp showing early IBM-PC graphics
- Another demo: vgademo.cpp
showing IBM graphics programming with 256-colors
- lesson3.ppt (Powerpoint slides)
- Demo program: newzero.cpp
(shows how to modify an image in character generator ram)
- Demo program: backward.cpp
(modifies an entire glyph-table in character ram)
- Demo program: vm86blue.cpp
showing that Linux is able to execute 16-bit code
- Application: romfonts.cpp
(a tool for finding the VGA's font definition tables)
- Files: lrmi.h and lrmi.o
(needed for compiling our 'romfonts.cpp' application)
- lesson4.ppt (Powerpoint slides)
- Demo program: drawtext.cpp
showing how graphics applications can use a ROM font bitmap
- Demo program: brickpat.cpp
illustrates tiling a screen-region with a bitmap pattern
- lesson5.ppt (Powerpoint slides)
- Demo program: animate1.cpp
demonstrates synchronization with the Vertical Retrace interval
- lesson6.ppt (Powerpoint slides)
- Demo program: michener.cpp
demonstrates a fast circle-fill using the Michener Algorithm
- Application: rawtty.cpp
(a tool for displaying the keyboard's scancode values)
- lesson7.ppt (Powerpoint slides)
- Demo program: animate2.cpp
demonstrates the use of 'signals' in a Linux game animation
- lesson8.ppt (Powerpoint slides)
- Demo program: bresdemo.cpp
demonstrates Bresenham's iterative line-drawing algorithm
- Legacy demo: polyfill.cpp
to be "adapted" for our Linux environment as Project 1
- lesson9.ppt (Powerpoint slides)
- Demo program: sprites.cpp
for use during in-class exercise on sprite animation
- Demo program: animate3.cpp
(Instructor's solution to the sprite-animation exercise)
- lesson10.ppt (Powerpoint slides)
- Textfile barn.dat:
(example data -- used for demonstrating a wire-frame model)
- lesson11.ppt (Powerpoint slides)
- Demo program: seq5demo.cpp
investigates behavior of SiS Extended Sequencer register 5
- Demo program: sisinfo.cpp
reports some current GPU display-parameters (SiS 315 only)
- lesson12.ppt (Powerpoint slides)
- Demo program: model3d.cpp
(an initial 'prototype' for a wireframe model 3D animation)
- Some wireframe data-files: cube.dat,
newbarn.dat,
dodec.dat
(for use with above demo)
- lesson13.ppt (Powerpoint slides)
- Demo program: filldemo.cpp
animates 3D model of a convex object (hidden lines revoved)
- Wire-frame model data-sets for some convex objects:
plato.dat,
plane.dat,
redbarn.dat
- Two different model data-sets for a simple non-convex object:
corner1.dat and
corner2.dat
- lesson14.ppt (Powerpoint slides)
- Demo program: trymouse.cpp
(a short C++ text-mode example that uses the libgpm package)
- Demo program: gpmslide.cpp
(a short graphics-mode example that uses the libgpm package)
- lesson15.ppt (Powerpoint slides)
Discussion of OpenGL by alumnus Ted Bisson
- lesson16.ppt (Powerpoint slides)
- Demo program: tweening.cpp
(applies "linear interpolation" to do simple polygon-animations)
- Demo program: bezier.cpp
(deCasteljau's curve-drawing algorithm, implemented by Kai Long)
- lesson17.ppt (Powerpoint slides)
- Device driver: engine2d.c
supporting user access to the SiS graphics accelerator ports
- Makefile for compiling driver-modules
<-- revised on 09 JUL 2004
- Demo program: sisaccel.cpp
illustrating some capabilities of SiS 315 graphics accelerator
- Header file: sisaccel.h
(this header is needed for compiling the above demo program)
- Demo program: mndlbrot.cpp
(it displays one view of the famous Mandelbrot Set)
- Test program: myviewer.cpp
(for use with Question V during Midterm Exam II)
- lesson18.ppt (Powerpoint slides)
- Test program: studydac.cpp
for viewing effects of changing the DAC color-table registers
- lesson19.ppt (Powerpoint slides)
- Demo program: globe.cpp
(to show the application of some basic raytracing principles)
- lesson20.ppt (Powerpoint slides)
- Demo program: hexagon.cpp
(tests algorithm that decides if a point lies in a plane polygon)
- lesson21.ppt (Powerpoint slides)
- Demo program: plato.cpp (uses the
plato.dat data-set to draw a ray-traced dodecahedron)
- Demo program: horizpan.cpp
(shows some effects of reprogramming the CRTC Offset Register)
- lesson22.ppt (Powerpoint slides)
- Demo program: mymode.cpp
(alters some CRTC registers to achieve a nonstandard display-mode)
- Demo program: nochain4.cpp
implements a 640x480 variant of the 'Mode-X' graphics mode (SiS 315)
- Demo program: flagvals.cpp
a 'scientific visualization' example (for assembly language programmers)
- Optimized assembly language: copypage.s
uses a string-instruction to copy a video memory page
- Demo program: quikcopy.cpp
(how a C++ program calls an external assembly language function)
- lesson23.ppt (Powerpoint slides)
- Device driver: dos.c
for memory-mapping of regions in bottom megabyte of physical ram
- Demo program: vesainfo.cpp
(uses Linux 'vm86()' system-call to execute a SVGA BIOS function)
- lesson24.ppt (Powerpoint slides)
- Demo program: flood.cpp
demonstrates the use of a recursive flood-fill algorithm
- Demo program: template.cpp
(This may serve as "boilerplate" for your in-class exercises)
Readings
- Week 1: Chapter 1 in "PC Graphics Handbook" text
- Week 2: Chapter 7 in "PC Graphics Handbook" text
- Week 3: Chapter 13 in "PC Graphics Handbook" text
- Week 4: Chapter 14 in "PC Graphics Handbook" text
- Week 5: Chapter 10 in "PC Graphics Handbook" text
- Week 6: No new assignment. Review for Midterm Exam.
- Week 7: VESA Standards Document:
vbe3.pdf
(Video BIOS Extensions v3.0)
- Week 8: Chapter 5 in "PC Graphics Handbook" text
- Week 9: Online article:
Mouse Programming with libgpm by Pradeep Padala
- Week 10: Chapter 21 in "PC Graphics Handbook" text
- Week 11: No new assignment. Review for Midterm Exam.
- Week 12: Chapter 6 in "PC Graphics Handbook" text
- Weeks 13-14: No new readings (Work on final project)
- Week 15: No new readings (Review for Final Examination)
Announcements
- Midterm Exam 1: Monday, October 6
- Project 1:
Due by Noon Thursday, 16 October 2003
- Midterm Exam 2: Monday, November 10
- Project 2:
Due by Noon Wednesday, 10 December 2003
- FINAL EXAMINATION: Monday, December 15 (6pm-8pm)
Last updated on 08/15/2005