Pen-Raised Quail Hunt 6.111 Final Project Daniel Lopuch and Zachary Remscrim December 13, 2006 Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Cambridge, MA 02139ABSTRACT Duck Hunt is among the most famous of the classic console games. This project sought to recreate the Nintendo classic using the MIT 6.111 FPGA Labkit and a video camera instead of the memorable Nintendo gun. To aim, the player wears a glove with two different color regions which the video camera uses to track the player’s in-game gun-sight and to shoot. Tracking is accomplished using video processing, and the color regions that the image processing is sensitive to is completely customizable by the user at run-time using the labkit’s buttons as inputs and VFD display as feedback. The game engine renders a recreation of the classic Duck Hunt playing field, but unlike the original, it is upsampled to be displayed on a 1024x768 XVGA display. The final implemented game met all given specifications and proved to be a faithful recreation of the original classic except for certain elements which added a socio-political commentary that expressed the views of the authors on the current state of American politics. Rev 1: Added Verilog AppendixTABLE OF CONTENTS List of Figures ..................................................................................................................... 5 List of Tables ...................................................................................................................... 5 Overview............................................................................................................................. 6 Overview............................................................................................................................. 6 System Inputs and Outputs ............................................................................................. 6 Video Decoding and Processing Overview .................................................................... 6 AI Overview.................................................................................................................. 11 Game Module Overview............................................................................................... 11 Graphics Pipeline Overview ......................................................................................... 11 Project Description............................................................................................................ 12 Overview of Video Decoding and Processing Modules ............................................... 12 Filter Configuration Module......................................................................................... 15 RGB To HSV Converter............................................................................................... 19 NTSC to ZBT and Filtering .......................................................................................... 21 Filtering..................................................................................................................... 21 Centroid Calculation ................................................................................................. 21 Position Smoothening ............................................................................................... 21 Output Debouncing................................................................................................... 22 Game Module................................................................................................................ 22 AI Module..................................................................................................................... 23 Graphics Pipeline .......................................................................................................... 24 Duck Module ............................................................................................................ 25 Crosshair Module...................................................................................................... 25 Tree and Grass Modules ........................................................................................... 26 Background Module.................................................................................................. 26 Score Overlay Module .............................................................................................. 26 Round-Over Overlay Module ................................................................................... 26 Title Screen Module...................................................................................................... 27 Round Timer Module.................................................................................................... 27 Testing and Debugging ..................................................................................................... 27 Video Decoding and Processing ................................................................................... 27 Game Engine Debugging.............................................................................................. 28 Conclusions....................................................................................................................... 29APPENDIX Appendix 1: Verilog Code ................................................................................................ 30 Base Labkit File ............................................................................................................ 30 XVGA Signal Generator............................................................................................... 41 VRAM Display ............................................................................................................. 41 Filter Limits Configuration ........................................................................................... 43 NTSC TO ZBT And Filtering....................................................................................... 55 RGB To HSV Color Converter..................................................................................... 66 Game Engine................................................................................................................. 72 Graphics Pipeline
View Full Document