Department of Electrical and Computer Engineering Facebook page


  • DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Educational Objectives
    • Student Outcomes
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
Breakout - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

Breakout

From Ece

Jump to: navigation, search

Contents

  • 1 Phase 1+2 (Final Draft)
    • 1.1 Introduction
    • 1.2 Team Members
    • 1.3 Concept
    • 1.4 Proposed Work
    • 1.5 Required Parts
    • 1.6 Expected Deliverables
  • 2 Phase 3
    • 2.1 Review Module Descriptions
  • 3 Phase 4
    • 3.1 Review of Proposed Work
    • 3.2 Final Module Descriptions
    • 3.3 Project Changes
    • 3.4 Top Level Schematic
    • 3.5 Expected Deliverables

Phase 1+2 (Final Draft)

Introduction

The user will use an N64 controller as an input device. The controller was used in the Nintendo 64 system. The controller uses an analog joystick as one of the inputs for the games. The N64 controller was chosen because it only uses three wire connections. The wires compose of a data wire, ground, and power. A serial port adapter will be used to convert the N64 controller to use a serial port on the Spartan III. It will then be used to control the paddle movements of the game.

Team Members

  • J, Chae – Coordinator
  • J, Russell - Recorder
  • K, Vu - Checker

Concept

The screen will display the general layout of the Breakout game, which include, ball, paddle, borders, and brick arrangements. The N64 controller will be used as inputs to control the left and right movements of the paddle. The ball will move in different directions and bounce correctly off borders, paddles, and bricks. As the ball hits the bricks, the corresponding brick should disappear. When all bricks are gone, the game is completed. If the ball should pass the paddle, the player will lose a life. When the player’s life goes to zero, the game is restarted.

Proposed Work

  • VGA Module(Joel) - takes in ball, paddle, and brick module input to display in VGA Monitor
    • Input
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
      • paddleX(9:0) - this is the x-coordinate of the paddle
      • brickX(9:0) - this is the x-co0rdinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
    • Output
      • red_out - red signal of RGB output
      • green_out - green signal of RGB output
      • blue_out - blue signal RGB output
  • VGA Sync Module(Given in lab) - determines the horizontal and vertical positions of the VGA monitor.
    • Input
      • clk - this is the clock(50Mhz)
    • Output
      • h_sync - this is the horizontal syncs for VGA port
      • v_sync - this is the vertical syncs for VGA port
      • pixel_row(9:0) – 10 bit values of currently drawn Y coordinate
      • pixel_column(9:0) – 10 bit value of currently drawn X coordinate
      • video_on – High when the row and column outputs are valid
      • subpixel_row(8:0) – 9 bit value of lower resolution Y coordinate
      • subpixel_col(8:0) – 9 bit value of lower resolution X coordinate
  • N64 Controller Module(Provided at [1]) – takes the input of the N64 controller and decodes it.
    • Input
      • clk - this is the clock
      • rst -
      • n64_input - this in the input from the control
      • fsm_restart
      • req_cw
      • req_bs
    • Output
      • n64_highz
      • fsm_present
      • fsm_busy
      • cw_return(31:0) - controller status
      • bs_return(31:0) - opcode for buttons and joystick movements
  • Ball Control Module(Jay) – controls the movement of the ball
    • Input
      • clk - this is the clock(50 Mhz)
      • paddleX(9:0) - this is the x-coordinate of the paddle
      • brickX(9:0) - this is the x-co0rdinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
    • Output
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
      • ballMissed - signals when the ball moves past the paddle
      • brickHit - signals when the ball hits a brick
  • Paddle Control Module(Joel) – controls the paddle
    • Input
      • clk - this is the clock(50 Mhz)
      • opcode(2:0) - opcode from the input device
    • Output
      • paddleX(9:0) - this is the x-coordinate of the paddle
  • Brick Module(Jay) – controls the area of the brick location and display
    • Input
      • clk - this is the clock(50 Mhz)
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
    • Output
      • brickX(9:0) - this is the x-coordinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
  • Life Module(Kevin) – controls how many life the player can have
    • Input
      • ballMissed - signals when the ball moves past the paddle
    • Output
      • LED(7:0) - LED outputs
  • Score Module(Kevin) – displays the player's score
    • Input
      • brickHit - signals when the ball hits a brick
    • Output
      • score(7:0) - this is the binary output of the score
ProjectDiagram.JPG
Figure 1 - Block diagram relationship of proposed design.

Required Parts

  • Spartan III development board
    • Already Owned
  • N64 Controller
    • http://www.ebay.com
    • http://www.fpga-games.com/n64tst.htm
    • http://www.electronicdirect.com/n64dev/
    • http://www-inst.eecs.berkeley.edu/~cs150/fa04/Lab/Checkpoint1.PDF
    • Quantity: 1
    • Voltage: 3.3V
    • Unit Price: ~$5 - $7
  • N64 Extension Cable
    • http://www.ebay.com
    • Quantity: 1
    • Voltage: 3.3V
    • Unit Price: ~$2.50
  • DB9 Male Connector
    • http://www.sfcable.com/cable/p/24-358.html
    • Parts Number: 24-358
    • Quantity: 1
    • Unit Price: $0.68
  • DB9 Shroud/Assembled Hood Kit
    • http://www.l-com.com/item.aspx?id=3314
    • Parts Number: SDC9G
    • Quantity: 1
    • Unit Price: $0.85
  • VGA monitor
    • Provided in lab area

Expected Deliverables

The user will use the N64 controller to play the game. The controller will make it possible that the users can control the movements of the paddle in the game. The goal of game is to break all of brick on the display.

ProjectShot.JPG
Figure 2 - Sample shot of the project.

Phase 3

Review Module Descriptions

  • VGA Module(Joel) - takes in ball, paddle, and brick module input to display in VGA Monitor
    • Input
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
      • paddleX(9:0) - this is the x-coordinate of the paddle
      • brickX(9:0) - this is the x-co0rdinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
    • Output
      • red_out - red signal of RGB output
      • green_out - green signal of RGB output
      • blue_out - blue signal RGB output
  • VGA Sync Module(Given in lab) - determines the horizontal and vertical positions of the VGA monitor
    • Input
      • clk - this is the clock(50Mhz)
    • Output
      • h_sync - this is the horizontal syncs for VGA port
      • v_sync - this is the vertical syncs for VGA port
      • pixel_row(9:0) – 10 bit values of currently drawn Y coordinate
      • pixel_column(9:0) – 10 bit value of currently drawn X coordinate
      • video_on – High when the row and column outputs are valid
      • subpixel_row(8:0) – 9 bit value of lower resolution Y coordinate
      • subpixel_col(8:0) – 9 bit value of lower resolution X coordinate
  • N64 Controller Module(Provided at [2]) – takes the input of the N64 controller and decodes it.
    • This module send sa signal to the N64 controller to request a 32-bit control status
    • The 32-bit word will have the position and status of each button and joystick axis
    • The controller will also have a reset bit to reset the control status
    • The controller has a built-in pullup resistor. The resistor is used to keep the signal high at all times
    • This will send a 1'b1, otherwise, if the line is pulled low, the control will send a 1'b0
    • The N64 controller uses a challenge-response interface. The user game will send the controller a command and it will respond
    • There are 7 known N64 controller commands:
      • 8’hFF: Reset Controller
      • 8’h00: Get Status
      • 8’h01: Get Buttons
      • 8’h02: Read Mempack
      • 8’h03: Write Mempack
      • 8’h04: Read EEPROM
      • 8’h05: Write EEPROM
    • We will most likely be using the Reset Controller and Get Buttons command
    • The Reset Controller command you may optionally send whenever your
    • circuit is reset. This will help the reliability of your circuit as it will ensure that the
    • controller is properly reset
    • The Get Buttons command is the primary command you will be using, it will
    • cause the controller to send back 32bits of button status information
    • Input
      • clk - this is the clock
      • rst - this will reset the controller
      • n64_input - this in the input from the control
      • fsm_restart
      • req_cw - request command word
      • req_bs
    • Output
      • n64_highz - this will pull the open collector high
      • fsm_present
      • fsm_busy
      • cw_return(31:0) - controller status
      • bs_return(31:0) - opcode for buttons and joystick movements
  • Ball Control Module(Jay) – controls the movement of the ball
    • Input
      • clk - this is the clock(50 Mhz)
      • paddleX(9:0) - this is the x-coordinate of the paddle
      • brickX(9:0) - this is the x-co0rdinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
    • Output
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
      • ballMissed - signals when the ball moves past the paddle
      • brickHit - signals when the ball hits a brick
  • Paddle Control Module(Joel) – controls the paddle
    • Input
      • clk - this is the clock(50 Mhz)
      • opcode(2:0) - opcode from the input device
    • Output
      • paddleX(9:0) - this is the x-coordinate of the paddle
  • Brick Module(Jay) – controls the area of the brick location and display
    • Input
      • clk - this is the clock(50 Mhz)
      • ballX(9:0) - this is the x-coordinate of the ball
      • ballY(9:0) - this is the y-coordinate of the ball
    • Output
      • brickX(9:0) - this is the x-coordinate of the brick area
      • brickY(9:0) - this is the y-coordinate of the brick area
  • Life Module(Kevin) – controls how many life the player can have
    • This module required an output to notifiy when the player has lost all his lives
    • At this point, the game should reset
    • Input
      • ballMissed - signals when the ball moves past the paddle
    • Output
      • gameOver - signals when the player has lost all lives and game is over
        • This will cause the game to reset score, position, and number of lives
      • LED(7:0) - LED outputs
  • Score Module(Kevin) – displays the player's score
    • This module required an input to notify when to reset the score.
    • Therefore, a gameOver input was added to this module
    • Input
      • brickHit - signals when the ball hits a brick
    • Output
      • score(7:0) - this is the binary output of the score


Phase 4

Review of Proposed Work

  • Our "Breakout" game allows the user to use a ball and paddle to knockout a wall of bricks located at the top of the screen. There are walls which the ball can bounce off of located at the top and sides of the screen to keep it from going out of bounds. However, if the ball misses the paddle located at the bottom of the screen, the ball is lost and the player loses a life. The paddle is controlled by a PS/2 keyboard which utilizes the arrows keys for direction. To keep up with a players life count, LEDs light up indicating how many lives a player has left. The seven segment display functions as a score keeper, showing how many bricks a player has successfully hit with the ball.

Final Module Descriptions

  • VGA Module - The VGA module serves to display the components of the game. It utilizes the ball, paddle, and brick modules to give the user visual interactivity and display to the VGA Monitor.
  • VGA Sync Module - This module keeps track of the horizontal and vertical positions of the VGA monitor. This is critical when determining where the ball and paddle should move and where the bricks should be displayed.
  • PS2 Decoder Module – This module takes the input of the PS/2 keyboard and decodes it. It takes in a signal from the keyboard indicating whether the left or right arrow has been pressed and passes this information on to the paddle control module.
  • Ball Control Module – controls the movement of the ball as well as what the brick hits (wall, brick or nothing). The module keeps track of the number of brick hits and it is also responsible for determing where on a brick the ball hits (top, bottom or sides).
  • Paddle Control Module – This module controls the paddle direction. The paddle is only allowed to move in the left or right direction.
  • Brick Module – This module controls the state of a brick. If a brick has been hit, it updates the area of that brick to blank space, else the brick remains in position.
  • Life Module – The life module controls how many lives a player can have. It uses LEDs to display a count of the number of lives that a player has left.
  • Score Module – This module displays a player's score. It uses the seven segment display to display the number of brick hits.

Project Changes

  • Input and output states were added to the ball control module. The input states determine if the ball bounces off of some portion of a brick, and the output states are used to update the brick module
  • The Nintendo 64 game controller was replaced with a PS/2 keyboard. After several diligent, but failed, attempts at using the N64 controller we felt that the best course of action would be to revert to using the PS/2 keyboard to control our paddle.
  • The draw vga module was also changed to contain states which draw a brick based on an off or on (hit or no hit) state

Top Level Schematic

http://www.msstate.edu/org/image/dsd.htm

Expected Deliverables

We will deliver a working game of Breakout the keeps track of the number of bricks that a user successfully hits, as well as decrements a player's life count.

Retrieved from "http://www.ece.msstate.edu/wiki/index.php/Breakout"
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 25 April 2007, at 13:58.
  • This page has been accessed 10,949 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT