iGamePlay A Revolutionary Gaming Experience 6.111 Final Project Tom Wilson, Martijn Stevenson, Kale McNaney Professor Anantha Chandrakasan, TA David Milliner May 13, 20041Table of Contents Page Table of Figures .................................................................................................................. 2 Introduction......................................................................................................................... 3 Overview............................................................................................................................. 3 Audio................................................................................................................................... 3 Getting Digital Audio Data............................................................................................. 4 AC97 Codec................................................................................................................ 4 Frame Protocol............................................................................................................ 4 Frames from Controller to Codec ............................................................................... 6 Configuration Registers .............................................................................................. 6 Frames from Codec to Controller ............................................................................... 6 Analyzing Energy in the Music ...................................................................................... 7 Input / Game Logic ............................................................................................................. 9 User Input........................................................................................................................ 9 Game Logic................................................................................................................... 10 Video................................................................................................................................. 12 ZBT SRAMs ................................................................................................................. 13 ram_select and sel_clock .............................................................................................. 14 Sprite ROMs ................................................................................................................. 14 Screen_draw.................................................................................................................. 14 Screen_store.................................................................................................................. 15 Possible improvements ..................................................................................................... 15 Conclusion ........................................................................................................................ 15 Appendix A: ZBT RAMs.................................................................................................. 17 Appendix B: screen_draw................................................................................................. 18 Appendix C: Tips and Tricks............................................................................................ 23 Appendix D: NES Input FSM........................................................................................... 242Table of Figures Page Figure 1. Overall System Schematic................................................................................... 3 Figure 2. AC97 Output Frame (Controller to Codec)......................................................... 5 Figure 3. AC97 Input Frame (Codec to Controller) ........................................................... 5 Figure 4. AC97 Frame consisting of 13 slots ..................................................................... 6 Figure 5. Sound Energy FSM Diagram .............................................................................. 8 Figure 6. Physical Interface to NES Controller .................................................................. 9 Figure 7. Nintendo Emulation System Input Protocol...................................................... 10 Figure 8. Game Logic Overview ...................................................................................... 10 Figure 9. Game Loop Finite State Machine...................................................................... 11 Figure 10. Video Subsystem Schematic ........................................................................... 133Introduction The purpose of this project was to explore the capabilities of the new Xilinx lab kits by creating an innovative video game incorporating audio processing tools. iGamePlay is a combination of retro video game mechanics and gameplay with a new twist: gameplay elements are affected by sound cues derived from processing an input audio signal. iGamePlay features enemies which respond to the beat of an input song. The final system includes support for single-player and two-player cooperative and head-to-head modes, smooth page-buffered 640x480 VGA video, and a highly satisfactory beat detection algorithm. Overview The iGamePlay system has three major modules: audio processing, user input/game logic, and video. Figure 1 shows a schematic of the overall system. Figure 1. Overall System Schematic The audio processing unit takes in audio input from an external source. Using the AC97 codec, the audio data is converted to a digital signal. A custom beat detection algorithm then extracts the beats from the music. This information is passed to the user input and game logic unit. This unit combines the audio cues with the user input to coordinate the internal state of the game. This includes tracking the speed and position of all objects in the game world. The game logic unit sends information about the game state to the video subsystem, which processes it and draws the game to the screen. The individual subsystems are discussed in more detail in the following sections. Audio The iGamePlay audio component detects the beats that allow the enemy to move to the music. Using the lab kit’s on-board AC97 Codec chip and a simple energy comparison algorithm, the audio module was able to detect a range of beats from simple base drums more complicated techno and rap songs with strong down
View Full Document