FPGA-Based Arcade Emulation Danny Funk, Cory Mohling, Tony Milosch, David Gartner, John Alexander...

Preview:

Citation preview

FPGA-Based Arcade

EmulationDanny Funk, Cory Mohling, Tony

Milosch, David Gartner, John Alexander

Advisor: Philip JonesClient: Joseph Zambreno

Overview

Project Plan and Design

Design Challenges

2nd Semester Implementation

Final Results

Project Objective• Goals

o Showcase the capabilities of reconfigurable computing platforms

o Have a system that can be used for demonstrations

• Problemo Demonstrating

reconfigurable computing to non-technical users

o Demonstrate capabilities in captivating way

Conceptual Solution• FPGA Capabilities

o Continue 09/10 Senior Design team’s NES Emulation through FPGA

o Entire NES and game selection contained on single FPGA board

• Presentationso Have wide selection of

playable gameso Create arcade machine that

can be put on display

Concept Diagram

Controls (I/O)

Boot loaderCompact Flash Card

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

o System has to be designed around NES ROM files and NES instruction set

o Only a limited amount of logic on FPGA board

o Cabinet should be able to be moved from building to building on campus

• Technologyo Using new monitor technology with old NES

o 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

Architectureo Research with assistance of advisor

• Audio may require CPU to be rewritteno Start early on Audio

• Unforeseen extra design requiredo Start Early on FPGA work

• Little experience with woodworkingo Seek outside advice and make detailed blueprints

Schedule• Split team into 3 groups

o Emulator, Boot Loader, and Cabinet

System Decomposition• FPGA

o CPU

o PPUo Video output

o Controller Inputo Boot loader o Audio

• Cabineto Physical Controls

• Joystick• Buttons

o 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

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

• PPUo Map CPU memory to PPU registers to allow for game

scrollingo Implement Memory mappers to allow for more games to

be playedo PPU is implemented using a 14 stage finite state

machine to render each pixelo 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

Final CostsItem Cost

Wheels $40.00

Speakers $20.00

Screws $10.00

Plywood $90.00

Marquee $20.00

Marquee Light $20.00

T-Molding $10.00

Paint/Primer $50.00

Monitor $500.00

Cabinet Total $760.00

Labor – 1130hrs $22,600.00

Final Results

Moving Forward• Lessons Learned

o “Take the time to learn the tools”o “Allow for ample time to acquire supplies”o “Don't set goals until you understand the full complexity of the

project”o “Don't be worried about asking stupid questions”o “Have a base understanding before diving in”

• Future of the projecto Cabinet can be reusedo Networked gamingo Advanced systems

Questions

Recommended