310 likes | 488 Views
FPGA-Based Arcade Emulation. Danny Funk, Cory Mohling , Tony Milosch , David Gartner, John Alexander Advisor: Philip Jones Client: Joseph Zambreno. Overview. Project Plan and Design. 2 nd Semester Implementation. Design Challenges. Final Results. Project Objective. Goals
E N D
FPGA-Based Arcade Emulation Danny Funk, Cory Mohling, Tony Milosch, David Gartner, John Alexander Advisor: Philip Jones Client: Joseph Zambreno
Overview Project Plan and Design 2nd Semester Implementation Design Challenges Final Results
Project Objective • Goals • Showcase the capabilities of reconfigurable computing platforms • Have a system that can be used for demonstrations • Problem • Demonstrating reconfigurable computing to non-technical users • Demonstrate capabilities in captivating way
Conceptual Solution • FPGA Capabilities • Continue 09/10 Senior Design team’s NES Emulation through FPGA • Entire NES and game selection contained on single FPGA board • Presentations • Have wide selection of playable games • Create arcade machine that can be put on display
Concept Diagram Boot loader Compact Flash Card Controls (I/O)
Functional Requirements • Emulator must support the instruction set used by the original NES System • All NES-specific emulation must be performed entirely in hardware • Physical interface shall support 2-player arcade style controls
Functional Requirements • Graphical interface must allow for selection of all available games on compact flash card • Boot loader must read ROM files and initialize emulator memories • Cabinet must support 100 lb monitor, and run on standard 120 VAC power
Non-Functional Requirements • All emulator components shall be implemented as individual modules • Cabinet shall be safe for all age groups • Users’ interaction with boot loader shall be understandable without additional help • Cabinet shall be a vintage style arcade cabinet to house the system • Cabinet shall be durable to withstand demonstrations
Considerations • Constraints • System has to be designed around NES ROM files and NES instruction set • Only a limited amount of logic on FPGA board • Cabinet should be able to be moved from building to building on campus • Technology • Using new monitor technology with old NES • Interfacing with arcade controls
Market Survey • Another project currently exists (Veri NES). The source is not available. • Various software emulators are available and will help with understanding the NES. • Researched how similar arcade cabinets have been built. • Took measurements of button layouts from original arcade cabinets.
Risks and Mitigations • Unfamiliarity with FPGA coding and NES Architecture • Research with assistance of advisor • Audio may require CPU to be rewritten • Start early on Audio • Unforeseen extra design required • Start Early on FPGA work • Little experience with woodworking • Seek outside advice and make detailed blueprints
Schedule • Split team into 3 groups • Emulator, Boot Loader, and Cabinet
System Decomposition FPGA CPU PPU Video output Controller Input Boot loader Audio Cabinet Physical Controls Joystick Buttons Monitor
System Design- Controls • Develop an arcade style interface for the NES emulator • Create wire riggings for all the joysticks and buttons • Each button is mapped directly to the controller status register
System Design-Boot Loader • Develop boot loader using Microblaze Processor provided in Xilinx tools • Present user with easy to use game selection screen • Read NES Rom files from Compact Flash • Parse NES Rom file and load contents into appropriate system memory for the FPGA • Reset back to boot loader screen when reset is pressed
System Design- Cabinet • Use Solid Works to design detailed cabinet drawings • Used feedback from client • Purchase custom marquees • Build out of ¾” plywood • Detachable Control Box • Hidden screw and nail holes • Hinged control box for easy viewing of FPGA
System Design- Audio • Write audio module that generates audio • Connect audio module to CPU • Map all audio related instructions from the CPU to the module • Connect audio module to AC97 to produce sound output
System Design • PPU • Map CPU memory to PPU registers to allow for game scrolling • Implement Memory mappers to allow for more games to be played • PPU is implemented using a 14 stage finite state machine to render each pixel • Each pixel is stored in a buffer that is then sent to the VGA output
Emulator Implementation • Improved functionality of past group’s design • Tweaked PPU and CPU clocks to more closely match the original NES • Cleaned up existing code to make it more understandable for future projects
Emulator Testing • Tested modified pieces of emulator separately • Ran tests found from NES development community in ModelSim that tested the entire system completely • When tests passed in ModelSim, implementation was tested for robustness on the hardware CPU Timing Failure Sprite Test Failure
Emulator Design Revision • True NES hardware emulation required more resources then initially predicted • Adopted strategy of software emulation • New design still met original goals of the project • Allows for over 120 games to work
Boot Loader Implementation • C code written to run on PowerPC processor • Initializes memories for screenshots, fonts, and music • Program displays metadata from compact flash card • Graphical interface allows user to select desired game from list • Loads game data from ROM files into emulator memories
Boot Loader Testing • Tested boot loader with debug statements sent through UART • Debug statements used to verify values in memory, and functionality of software
Cabinet Construction • ¾” cabinet grade plywood used for economical strength and durability • Kreg Joints hide screws without compromising strength • Used Jim Jensen as resource while building the cabinet
Cabinet Construction • Control box is removable from main cabinet assembly for demonstrations on any VGA monitor • Wheels attached for easy transportation • Construction presented interesting engineering challenges
Moving Forward • Lessons Learned • “Take the time to learn the tools” • “Allow for ample time to acquire supplies” • “Don't set goals until you understand the full complexity of the project” • “Don't be worried about asking stupid questions” • “Have a base understanding before diving in” • Future of the project • Cabinet can be reused • Networked gaming • Advanced systems