Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.

Slides:



Advertisements
Similar presentations
Department of nskinfo i-education
Advertisements

MULTIMEDIA TUTORIAL-II SHASHI BHUSHAN SOCIS, IGNOU.
VGA Text Mode An introduction to font selection and to reprogramming of the Character Generator ram.
Introduction to Computer Hardware and Software. Definition of a Computer “A computer is an electronic device, operating under the control of instructions.
Overview of Graphic Systems
MR.E.S.AGRAWAL SGGSIE&T, NANDED CAD Software and Hardware.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
The CRT Controller How to modify CRTC registers to achieve a non-standard horizontal and vertical screen resolution.
Announcements At the end of your project, you’ll be given an opportunity to make a standalone (.exe) version of your project. For this to work, you’ll.
Game Design and Programming. Objectives Classify the games How games are design How games are implemented What are the main components of a game engine.
Michener’s Algorithm An efficient scheme for drawing circles (and filling circular disks) on a raster graphics display.
A code-walkthrough Commentary on our ‘model3d.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Wire-frame Modeling An application of Bresenham’s line-drawing algorithm.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
A viewer for.wav files On using some CRTC registers to simulate horizontal scrolling through a large data-file.
Graphics Device Principles B.Sc. (Hons) Multimedia ComputingMedia Technologies.
3.02 Explain basic motion graphic programming.
3.02 Explain basic motion graphic programming.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
Informationsteknologi Tuesday, November 6, 2007Computer Graphics - Class 41 Today’s class Input and interaction.
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
COMPUTER DEVICES Input Devices Output Devices Storage Devices
Video Monitor Uses raster scanning to display images
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Basics of a Computer Graphics System Introduction to Computer Graphics CSE 470/598 Arizona State University Dianne Hansford.
Lecture 03 Fasih ur Rehman
Peripherals The term peripherals refers to all hardware devices that are attached to your computer and are controlled by your computer system Peripherals.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
BY Kamran Yousaf Computer Graphics & Animation. BY Kamran Yousaf Contents Introduction Usage, Application & Advantages Video Display Devices Output Devices.
G RAPHICS P ROGRAMMING Lecture 3 - Simple Animation - Simple 3D Drawing.
Lecture No. 3.  Screen resolution  Color  Blank space between the pixels  Intentional image degradation  Brightness  Contrast  Refresh rate  Sensitivity.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
CS-321 Dr. Mark L. Hornick 1 Graphics Display Hardware Display technologies CRT LCD Storage tube Drawing methods Vector Raster Architecture.
Animation and Double-Buffering. The animation methods described here are based on standard techniques of double-buffering applicable to most high-level.
Mark Nelson Graphics hardware & Game worlds Fall 2013
Java Programming, Second Edition Chapter Seventeen Multithreading and Animation.
KeyListener and Keyboard Events Just as we can implement listeners to handle mouse events, we can do the same for keyboard events (keypresses) –to implement.
 PLASMA DISPLAY MONITOR  RASTOR VS RANDOM SCAN  INTERLACING AND NON- INTERLACING.
Chapter 8 I/O. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-2 I/O: Connecting to Outside World So far,
Programming Games Show project. Refresher on coordinates. Scaling, translation. HTML5 logo. Refresher on animation. Bouncing ball. Homework: Do your own.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Video Monitor CRT: Cathode Ray Tube
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
GENESIS OF VIRTUAL REALITY  The term ‘Virtual reality’ (VR) was initially coined by Jaron Lanier, founder of VPL Research (1989)..
1 CP586 © Peter Lo 2003 Multimedia Communication Video Fundamentals.
Multimedia Animation. Animation Principles Persistence of vision object seen by human eye remains mapped on retina for a brief time after viewing display.
Chapter 7 Animation Prepared by: Ms. Ma. Anna Corina G. Kagaoan College of Arts and Sciences.
Introduction to Graphical Hardware Display Technologies
High Performance Java Swing Animation David Wallace Croft Presented to the Plano Java Users Group Plano, TX Copyright 2004 David Wallace Croft.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
Animation Introduction and Uses of Animation. The rapid display of a sequence of images of 2-D or 3-D artwork or model positions in order to create an.
Digression on r/w ‘/proc’ files An application of kernel module programming to Super VGA graphics device control.
1 Graphics CSCI 343, Fall 2015 Lecture 6 Viewing, Animation, User Interface.
Figure 10.1 Color CRT and Phosphor Dots on Face of Display.
CS-321 Dr. Mark L. Hornick 1 Graphics Displays Video graphics adapter Monitor.
Midterm OPERATING SYSTEM. Objectives At the end of the course, the student should be able to: Define the operating system; Demonstrate the abstract view.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Introduction to Animation In animation, a series of images are rapidly changed to create an illusion of movement.
Multimedia. A medium (plural media) is something that a presenter can use for presentation of information Two basic ways to present information are: –Unimedium.
Computer Graphics Lecture 03 Graphics Systems Cont… Taqdees A. Siddiqi
Chapter 8 Input/Output An Hong 2015 Fall School of Computer Science and Technology Lecture on Introduction to.
CPT 450 Computer Graphics 12th Lecture – Animation.
Computer Graphics Lecture 3 Computer Graphics Hardware
Catapult 2014 Session 10.
Figure 9.1 Color CRT and Phosphor Dots on Face of Display.
Sprite Animation An exercise on filling circles and polygons to create the animated sprite used in ‘Pac Man’
Graphics Systems SUBJECT: COMPUTER GRAPHICS LECTURE NO: 02 BATCH: 16BS(INFORMATION TECHNOLOGY) 1/4/
Chapter 2 Overview of Graphics Systems
Game Programming Algorithms and Techniques
Presentation transcript:

Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation

The CRT Display Screen’s image consists of horizontal scanlines, drawn in top-down order, and redrawn about times per second (depending on display mode).

Image “persistence” The impression of a steady screen image is purely a mental illusion of the viewer’s The pixels are drawn on the CRT screen too rapidly for the human eye to follow And the screen phosphor degrades slowly So the brain blends a rapid succession of discrete images into a continuous motion So-called ‘motion pictures’ are based on these phenomena, too (30 frames/second)

Color “dithering” The mind’s tendency to “blend” together distinct images that appear near to one another in time can be demonstrated by using two different colors -- alternately displayed in very rapid succession This is called “dithering” Some early graphics applications actually used this technique, to show extra colors

Timing mechanism Today’s computers can “redraw” screens much faster than a CRT can display them We need to “slow down” the redrawing so that the CRT circuitry will be able keep up Design of VGA hardware allows programs to “synchronize” drawing with CRT refresh Use the “INPUT STATUS REGISTER 1” accessible (read-only) at I/O port 0x3DA

Input Status Register One Vertical Retrace status 1 = retrace is active 0 = retrace inactive Display Enabled status 1 = VGA is reading (and displaying) VRAM 0 = Horizontal or Vertical Retrace is active I/O port-address: 0x3DA (color display) or 0x3BA (monochrome display)

void vsync( void ) { // wait for current retrace to finish while ( ( inb( 0x3DA ) & 8 ) != 8 ); // wait until the next retrace begins while ( ( inb( 0x3DA ) & 8 ) == 8 ); } // This function only returns at the very beginning // of a new vertical blanking interval, to maximize // the time for drawing while the screen is blanked

Animation algorithm 1)Erase the previous screen 2)Draw a new screen-image 3)Get ready to draw another screen 4)But wait for a vertical retrace to begin 5)Then go back to step 1.

How much drawing time? Screen-refresh occurs 60 times/second So time between refreshes is 1/60 second Vertical blanking takes about 15% of time So “safe” drawing-time for screen-update is about: (1/60)*(15/100) = 1/400 second What if a screen-update takes longer? Animation will exhibit “tearing” of images

Programming techniques Your application may not require that the full screen be redrawn for every frame Maybe only a small region changes, so time to “erase-and-redraw” it is reduced You may be able to speed up the drawing operations, by “optimizing” your code Using assembly language can often help

Using off-screen VRAM You can also draw to off-screen memory, which won’t affect what’s seen on-screen When your ‘off-screen’ image is finished, you can quickly copy it to the on-screen memory area (called a ‘BitBlit’ operation) Both CPU and SVGA provide support for very rapid copying of large memory areas

Our ‘animate1.cpp’ demo We can demonstrate smooth animation with a “proof-of-concept” prototype It’s based on the classic “pong” game A moving ball bounces against a wall The user is able to move a “paddle” by using an input-device (such as a mouse, keyboard, or joystick) We didn’t implement user-interaction yet