Checkpoint LAB USB-RS232 Especificações

Consulte online ou descarregue Especificações para Jogos de tabuleiro Checkpoint LAB USB-RS232. Checkpoint LAB USB-RS232 Specifications Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 10
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
ECE391: Computer Systems Engineering Fall 2014
Machine Problem 2
Checkpoint: Wednesday, October 1
Midterm 1: Monday, October 6
Due: Monday, October 13
Device, Data, and Timing Abstractions
Read the whole document before you begin, or you may miss points on some requirements.
In this machine problem, you will extend a video game consisting of about 5,000 lines of code with additional graphical
features and a serial port device. The code for the game is reasonably well-documented, and you will need to read
and understand the code in order to succeed, thus building your ability to explore and comprehend existing software
systems. Most code that you will encounter is neither as small nor as well documented—take a look at some of the
Linux sources for comparison—but this assignment should help you start to build the skills necessary to extend more
realistic systems. As your effort must span the kernel/user boundary, this assignment will also expose you to some of
the mechanisms used to manage these interactions, many of which we will study in more detail later in the course.
Before discussing the tasks for the assignment, let’s discuss the skills and knowledge that we want you to gain:
Learn to write code that interacts directly with devices.
Learn to abstract devices with system software.
Learn to manipulate bits and to transform data from one format into another.
Learn the basic structure of an event loop.
Learn how to use the pthread API.
Device protocols:
We want you to have some experience writing software that interacts directly with devices and must adhere to the
protocols specified by those devices. Similar problems arise when one must meet software interface specifications,
but you need experience with both in order to recognize the similarities and differences. Unfortunately, most of the
devices accessible from within QEMU have fully developed drivers within Linux. The video card, however, is usually
managed directly from user-level so as to improve performance, thus most of the code is in other software packages
(e.g., XFree86).
We were fortunate to have a second device designed by Kevin Bassett and Mark Murphy, two previous staff members.
The Tux Controller is that funny little game controller attached to each of the machines in the lab.
The Tux Controller connects to the USB port of the lab machine. An FTDI “Virtual Com Port” (VCP) driver makes the
USB port appear to software as a standard (old fashioned) RS232 serial port. We can then set up QEMU so that one of
the emulated serial ports on the virtual machine maps to the emulated serial port connected to the Tux Controller. In
this assignment, you will write code that interacts directly with both the (emulated) video card and the game controller
board.
Device abstraction:
Most devices implement only part of the functionality that a typical user might associate with them. For example, disk
drives provide only a simple interface through which bits can be stored and retrieved in fixed-size blocks of several
kB. All other functionality, including everything from logical partitions and directories to variable-length files and file-
sharing semantics, is supported by software, most of which resides in the operating system. In this machine problem,
you will abstract some of the functionality provided by the Tux controller board.
Vista de página 0
1 2 3 4 5 6 7 8 9 10

Resumo do Conteúdo

Página 1

ECE391: Computer Systems Engineering Fall 2014Machine Problem 2Checkpoint: Wednesday, October 1Midterm 1: Monday, October 6Due: Monday, October 13Devi

Página 2 - The Pieces Provided

10Grading Note that the “correct” behavior of certain routines includes interfaces that allow one to prevent bufferoverflows (i.e., the interfaces do n

Página 3 - Mode X and Graphic Images

2Format interchange:This machine problem gives you several opportunities for working with data layout in memory and for transformingdata from one form

Página 4 - Graphical Mapping in the Game

3adventure.c Game logic, including the main event loop, helper thread, timing logic, display control logic (motionand scrolling), and a simple command

Página 5

4one-byte pixel color values into this space. The table used in this mapping is called a palette, as it is analogous to apainter’s palette, which in t

Página 6 - A Few Preliminaries

5dynamically as necessary to fill the screen. This facet is useful for games in which drawing the entire virtual world atonce requires too much memory.

Página 7 - VGA Palette Manipulations

6The next question is the size of the build buffer. If we can limit the size of the room photo, we can allocate a buildbuffer large enough to hold any

Página 8

7answer questions about memory fences or other code given to you, but it’s not ok to give code or pseudo-code forwriting a vertical line to the mode X

Página 9

8To improve the visual quality of the game, you must optimize the remaining 192 colors for the photo being displayedand adjust these colors whenever t

Página 10

9level is an array of 64 elements that you can index by any interleaving of the two MSBs of each color—we suggestRRGGBB, but just be sure to use the s

Comentários a estes Manuais

Sem comentários