How to do ‘page-flipping’ The steps needed when revising our ‘wfmodel1.cpp’ prototype to achieve ‘smooth’ animation.

Slides:



Advertisements
Similar presentations
Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
Advertisements

1 Memory-Mapped I/O Lecture 23 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Using VMX within Linux We explore the feasibility of executing ROM-BIOS code within the Linux x86_64 kernel.
VGA Text Mode An introduction to font selection and to reprogramming of the Character Generator ram.
The CRTC Interface Essential aspects of display page and cursor control for standard 80-column by 25-row text.
Early PC Graphics Capabilities of the IBM Color Graphics Adapter (CGA) and Enhanced Graphics Adapter (EGA)
CS 686: Programming SuperVGA Graphics Devices Introduction: An exercise in working with graphics file formats.
Graphics Bitmaps Drawing alphabetic characters and multicolor patterns.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Hidden Line Removal Applying vector algebra to the problem of removing hidden lines from wire-frame models.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
The CRT Controller How to modify CRTC registers to achieve a non-standard horizontal and vertical screen resolution.
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
Programming with CUDA, WS09 Waqar Saleem, Jens Müller Programming with CUDA and Parallel Algorithms Waqar Saleem Jens Müller.
The CRTC Interface Essential aspects of display page and cursor control for standard 80-column by 25-row text.
11 INSTALLING WINDOWS XP Chapter 2. Chapter 2: Installing Windows XP2 INSTALLING WINDOWS XP  Prepare a computer for the installation of Microsoft Windows.
Michener’s Algorithm An efficient scheme for drawing circles (and filling circular disks) on a raster graphics display.
The ‘ioctl’ driver-function On implementing ‘show’ and ‘hide’ for the SiS 315 hardware cursor.
Graphics acceleration An example of line-drawing by the ATI Radeon’s 2D graphics engine.
Direct I/O Programming An introduction to the Pentium’s mechanism for programming peripheral hardware components.
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.
Graphics Bitmaps Drawing characters glyphs and multicolor patterns.
Early PC Graphics Capabilities of the IBM Color Graphics Adapter (CGA) and Enhanced Graphics Adapter (EGA)
A device-driver for Video Memory Introduction to basic principles of the PC’s graphics display.
CSS 372 Oct 2 nd - Lecture 2 Review of CSS 371: Simple Computer Architecture Chapter 3 – Connecting Computer Components with Buses Typical Bus Structure.
A viewer for.wav files On using some CRTC registers to simulate horizontal scrolling through a large data-file.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
VGA System Services How to use Linux’s ‘vm86()’ system-call to access the video ROM-BIOS functions.
SiS 315 An introductory exploration of features of the SVGA graphics processor used in our classroom’s workstations.
Notes for Lab 10 On implementing ‘show’ and ‘hide’ for the SiS 315 hardware cursor.
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
Linux game programming An introduction to the use of interval timers and asynchronous input notifications.
1-1 NET+OS Software Group Serial EEPROM API Supported Serial EEPROM parts Serial EEPROM API introduction Detailed Serial EEPROM API Function presentation.
System Configuration Chapter 3. Objectives Distinguish between the various methods used to configure a computer Describe how to replace a motherboard.
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS) Excerpted from 1 Copyright © Texas Education Agency, All.
Computer Systems Chapter 1 Pages Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.
1 Chapter Overview Configuring and Troubleshooting the Display Configuring Power Management Configuring Operating System Settings Configuring and Troubleshooting.
CSC 461: Lecture 1 1 Lecture 1: Introduction Objectives Explore what computer graphics is about Survey some application areas Introduce a history of computer.
Algorithm Engineering „GPGPU“ Stefan Edelkamp. Graphics Processing Units  GPGPU = (GP)²U General Purpose Programming on the GPU  „Parallelism for the.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
Using HiColor graphics
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
Configuring System Settings Lesson 3. Skills Matrix Technology SkillObjective DomainObjective # Introducing Windows AeroConfigure and troubleshoot Windows.
Department of Electrical Engineering Electronics Computers Communications Technion Israel Institute of Technology High Speed Digital Systems Lab. High.
Interactive Computer Graphics CS 418 MP1: Dancing I TA: Zhicheng Yan Sushma S Kini Mary Pietrowicz Slides Taken from: “An Interactive Introduction to OpenGL.
11 INSTALLING AND MANAGING HARDWARE Chapter 6. Chapter 6: Installing and Managing Hardware2 INSTALLING AND MANAGING HARDWARE  Install hardware in a Microsoft.
1 Understanding Hardware Profiles A hardware profile stores configuration settings for a set of devices and services. Microsoft Windows 2000 can store.
Digression on r/w ‘/proc’ files An application of kernel module programming to Super VGA graphics device control.
ECE 103 Engineering Programming Chapter 53 Generic Algorithms Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
1 Copyright © 2015 Pexus LLC Patriot PS Personal Server Importing Virtual Appliance Image.
Computer Maintenance I
THE WINDOWS OPERATING SYSTEM Computer Basics 1.2.
Direct-Access Color Graphics Chapter 11. Graphics modes C++ provides a different combination of graphics characteristics. These characteristics include.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Programming with CUDA WS 08/09 Lecture 2 Tue, 28 Oct, 2008.
 Backlight 에서 나온 백색광이 액정 셀을 통과하면 서 투과율이 조절되고 red, green, blue 의 color filter 를 투과해 나오는 빛의 혼합을 통해 색이 구 성됨  Color filter 는 셀사이의 빛을 차단하는 black matrix,
Computer Graphics Lecture 04 Point Taqdees A. Siddiqi
I/O Systems.
Exceptional Control Flow
Protection of System Resources
Configuring System Settings
Exceptional Control Flow
Plug-and-Play.
Sprite Animation An exercise on filling circles and polygons to create the animated sprite used in ‘Pac Man’
TRAP Routines Subroutines Privileged Instructions
CS-401 Computer Architecture & Assembly Language Programming
Presentation transcript:

How to do ‘page-flipping’ The steps needed when revising our ‘wfmodel1.cpp’ prototype to achieve ‘smooth’ animation

How page-flipping works VRAM The ‘visible’ page The ‘drawing’ page CRTC START-ADDRESS The user sees this part of video memory Your program draws to this part of video memory When the ‘drawing’ page is ready to be viewed, your program changes the CRTC START-ADDRESS and thus the roles of these two pages are ‘flipped’

Use a Radeon-specific register The CRT Controller’s Start-Address can be accessed via a 32-bit register (called CRTC_START) which is part of the ATI Radeon’s 2D drawing engine -- allowing the Start-Address to be reprogrammed as a single atomic operation #define CRTC_START 0x0224

Installation check The software must detect the presence of a Radeon X300 graphics adapter, and it must discover which i/o port-address got assigned to the Radeon 2D engine during the Operating System’s startup process #define VENDOR_ID 0x1002// ATI #define DEVICE_ID 0x5B60// X300

PCI Find Device service init8086(); // initialization for vm8086 vm.regs.eax = 0x1B02; // PCI Find Device vm.regs.ecx = DEVICE_ID; // X300 vm.regs.edx = VENDOR_ID; // ATI vm.regs.esi = 0;// device index int86( 0x1A, vm );// invoke PCI BIOS if ( vm.regs.eax & 0xFF00 ) exit(1); // failed

PCI Read Configuration Dword vm.regs.eax = 0x1B0A; // PCI Read Dwd vm.regs.edi = 0x0014; // Resource #1 Adr int86( 0x1A, vm );// invoke PCI BIOS iobase = vm.regs.ecx & 0xFFFFFFFC;

Global Variables intiobase; // value is filled in at runtime intpage_size = (2 << 20); // 2-megabytes intdrawing_page = 0;// page 0 or page 1 intvisible_page = 0;// page 0 or page 1

Hardware helper-function void set_visible_page( void ) { intstart_addr = visible_page * page_size; outl( CRTC_START, iobase + 0 ); outl( start_addr, iobase + 4 ); }

Pixel-drawing helper-function void draw_pixel( int x, int y, int color ) { int offset = drawing_page * page+size; unsigned char *dstn = vram + offset; dstn[ y * vres + x ] = color; }

The ‘page-flipping’ algorithm Main loop: –Compute the new image –Set drawing_page to (visible_page + 1)%2 –Draw next screen image onto drawing page –Set visible_page to equal the drawing_page

In-class exercise Create a revision of the ‘wfmodel2’ demo (named ‘wfmodel3.cpp’) to automatically spin the wireframe model contiunuously, until the user hits the -key You will need to use a signal-handler and asynchronous keyboard-input notification (as in our earlier ‘persists.cpp’ demo)