DOC PREVIEW
Columbia CSEE 4840 - PAC-XON

This preview shows page 1-2-3-4-5-6-7-49-50-51-52-53-54-55-99-100-101-102-103-104-105 out of 105 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 105 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PAC-XON CSEE 4840 Embedded System Design Dongwei Ge (dg2563 EE Bo Liang (bl2369) ME Jie Cai (jc3480) EEPAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 2 Content 1. Introduction.....................................................................................................................2 2. Design.............................................................................................................................4 2.1 Game Logic................................................................................................................4 2.2 Software ....................................................................................................................4 2.3 Hardware...................................................................................................................6 2.3.1 PS Input...............................................................................................................6 2.3.2 Video Controller.................................................................................................6 2.3.3 Audio Controller.................................................................................................9 3. Conclusion .................................................................................................................. 10 4. Codes...................................................................................................................... 11 4.1 Hardware .................................................................................................................. 11 4.1.2 de2_sram_controller.vhd ..................................................................................11 4.1.3 de2_ps2.vhd……............................................................................................. 12 4.1.4 de2_vga_raster.vhd........................................................................................... 18 4.1.5 tone_generateor.vhd....................................................................................... 72 4.1.6 lab3_audio.vhd................................................................................................... 79 4.2 Software................................................................................................................. 89 4.2.1 hello_world.c…................................................................................................ 89PAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 3 1. Introduction Our project is to design a video game that consists of a combination of custom designed hardware and software, which will take everything we have learned so far in the past 2 months. In the hardware part, we will design a VGA controller, a CPU, a RAM controller and a interface between the hardware and the software. To implement our project, VHDL and C programming language are both must for hardware part and software part respectively. With them we can handle inputs from the keyboard to the video display output on the screen. We play to use the VGA output of the Altera board to present the game’s graphics. Images will be initialized in hardware and ghosts’ movement done in software. The software will also control game logic. Player will play the game with the “ ” keys on the PS2 keyboard. Fig.1 The block diagram of our project RAM RAM Controller Top-Level Entity CPU VGA Controller Programmed GhostsPAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 4 2. Design 2.1 Game Logic The game is similar to the original PAC-XON game: Each player controls a Pac-Man with four lives at the beginning of the game. When the game starts, Pac-Man can move freely from the top-left. Player must fill empty space and capture ghosts by building wall. As soon as the player fills 80% or more empty space he will go to the next level. Players must also beware of the two ghosts. If one touches the wall the pac man is building or catches the pac man, he will lose a life. Fig.1 Our PAC-XON Game shot 2.2 Software Here is the flow chart of our game. The movement of pac-man is designed tile by tile, the movement of ghosts are design pixel by pixel. We can see how the states change in the game area from Fig. 2PAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 5 126 99 98 19 20125 100 97 18 21124 101 96 17 22123 102 95 16 23122 103 94 65 2 3 15 24121 104 93 64 1 4 14 25120 105 92 63 0 51326119 106 91 62 61 6 12 27118 107 90 66 60 7 8 9 10 11 28117 108 89 67 59 58 49 48 39 38 29116 109 88 68 69 57 50 47 40 37 30115 110 87 82 81 76 75 70 56 51 46 41 36 31114 111 86 83 80 77 74 71 55 52 45 42 35 32113 112 85 84 79 78 73 72 54 53 44 43 34 33WALLPATHGHOST Fig.2 States in our Game 1.find the gost 2.if UP==YES, go to (2); if NOT, go to (3) 3.if RIGHT==YES, go to (2); if NOT, go to (4) 4.if DOWN==YES, go to (2); if NOT, go to (5) 5.if LEFT==YES, go to (2); if NOT, go to (6) 6.if Now==GHOST, finish; if NOT, position--, go to (2)PAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 6 Fig. 3 Game Logic Flow Chart 2.3 Hardware 2.3.1 PS2 Input Controller In our design, only four keys from the PS2 are used, “ ”, which control the moving direction of the Pac-Man. The PS2 input controller is linked to the top level file of the project so that it can finally implement the movement of the Pac-Man. The movement of the Pac-Man related to the direction of the 4 keys are implemented by C programming language. 2.3.2 Video Controller In our labs, we have learned to implement a live video display. We were able to store our character sets and graphics on the FPGA’s SRAM. This allowed us to save valuable timePAC-XON: CSEE 4840 Embedded System Design April 28th, 2010 7 in drawing each character one by one by calling pre-existing sprite graphics. Video (at VGA resolution) for PAC-XON posed a number of design challenges because of the number of concurrent tasks. There are 5 main components to video, which can be divided into 2 types of video. Tile graphics are displayed on 16-pixel boundaries on the screen, and are displayed in monochrome. On the other hand, sprite graphics are displayed at any arbitrary pixel location and can be poly-chromatic. Component Type Requirement Enclosure Wall Sprite Draw and Display by Hardware Tiles Sprite Update by Software Score Tile/Sprite Read from Software Pac-Man


View Full Document

Columbia CSEE 4840 - PAC-XON

Documents in this Course
SPYCAM

SPYCAM

91 pages

lab 1

lab 1

6 pages

memory

memory

3 pages

Structure

Structure

12 pages

Video

Video

3 pages

pacman

pacman

4 pages

Lab 1

Lab 1

6 pages

Scorched

Scorched

64 pages

lab 1

lab 1

3 pages

Video

Video

22 pages

Memory

Memory

23 pages

DVoiceR

DVoiceR

29 pages

MAZE

MAZE

56 pages

PAC XON

PAC XON

13 pages

PACXON

PACXON

13 pages

MP3 Player

MP3 Player

133 pages

Load more
Download PAC-XON
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view PAC-XON and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view PAC-XON 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?