Download presentation
Presentation is loading. Please wait.
Published byLeon Milton French Modified over 9 years ago
1
Live Action First Person Shooter Game Patrick Judd Ian Katsuno Bao Le
2
Inspiration Inspired by the “Real Time Color Replacement” Project (2009) Wanted to combine their invisibility effect with a Duck Hunt style game http://en.wikipedia.org/wiki/Duck_Hunthttp://www.eecg.toronto.edu/~pc/courses/432/2009/projects/colorreplacement.pdf
3
How our game works Camera captures the game stage and displays it on a monitor People/objects which enter the stage become targets User shoots targets on the monitor with a gun controller When a target is hit, it disappears (invisibility effect)
4
Revised Project Goal Two foreseen difficulties 1. Custom HW interface for gun controller 2. Tracking multiple targets Revised project goals 1. Use a mouse instead of a gun controller 2. Restrict number of supported targets to one
5
Initial System Block Diagram Camera Video Decoder Mouse Serial Port Driver RAM - live image - reference image MicroBlaze Processor Target Locator RAM - Modified image Target Drawer Draw B/W Image* Video Encoder Monitor Light gun Optional Target Manager Hit/Miss Analyzer Analog Digital Video_to _ram
6
Target Locator Compares reference image to live image A difference in color indicated a target Encodes targets location as: (x min, y min) (x max, y max) Memory Microblaze Reference ImageLive Image (x min, y min) (x max, y max) Target Locator
7
Reference Image
8
Live Image
9
Target Location
10
PS/2 Mouse FPS requires: High Precision Quick Response Time Replaced Light Gun as input. No ECE532 project has used it!
11
Mouse Operation Xilinx IP: XPS_Ps2 v1.00a Communicates with Microblaze over PLB SW Initialization: predefined sequence of byte codes Interrupts on action (move or click) Receives info packets in ISR
12
Software – Target Manger Tracks movement of target based on coordinates from the target locator Needs to distinguish an old target from a new target Compares target location to mouse coordinates to detect “hits” Remembers if a target has be hit
13
Target Remover Gets coordinates of box to remove from microblaze (x min, y min) (x max, y max) If (pixel is in box) read from reference image Else read from live image Memory Microblaze Reference ImageLive Image (x min, y min) (x max, y max) Target Remover Output Image Video Encoder
14
Design Flow - Hardware Start with simple custom core to read and write to memory Create verilog testbench and simulate core Compare output waveforms with spec Test core in hardware Incrementally add functionality
15
Design Flow - Software Wrote algorithms and data structures in Linux Integrated into microblaze code Debugged microblaze software using xps gdb
16
Problem - Mouse Initialization Initialization: Send and receive a sequence of byte-codes Problem: Mouse wouldn’t follow script! Debug: Tried to isolate the problem: Tried mouse on other PC Read Registers using XMD Solution: Get another mouse!
17
Problem - Mouse Buffer Overflow Problem: Buffer overflow interrupt occur Debug: Decrease sample rate Receive more than one packet in ISR? Solution: Printf too slow, Remove it!
18
Problem – Custom Logic Target Locator core worked correctly in simulation However the core did not function in hardware Tried a variety of debug methods but could not isolate the cause of the problem LEDs and switches Chipscope XPS hdl simulator
19
Problem – Custom Logic Solution: Use mem_to_ip/ip_to_mem core from “Real Time Color Replacement” Project Used their FSMs to perform memory reads and writes Added our own target locator logic Also move target remover functionality to software
20
Problem - Integration the ps2 core caused erroneous target detection when it was added to the project possibly due to bus read errors We are currently unable to find a solution
21
For the demo Two demos too show functionality of parts of the design before integration, in lieu of the ps2 – detection issue
22
For the demo 1. Target locator reading the video signal and sending target information to microblaze Video Decoder RAM - live image - reference image MicroBlaze Processor Target Locator Video Encoder
23
For the demo 2. Mouse to video interface and target remover functionality Video Decoder Mouse Serial Port Driver RAM - live image - reference image MicroBlaze Processor Video Encoder Target Manager Hit or Miss Analyzer
24
Lessons learned Don’t try to reinvent the wheel We spend a lot of timing trying to recreate what other group had already done instead of focusing on the “new” aspects of our project
25
Lessons learned Our approach to hardware debugging was less than ideal We had multiple group members debugging independently used different methods Should have decided on the best method concentrated our efforts
26
Conclusion Could not produce a fully functioning project However Learned valuable lessons in project management Were the first group to use a ps2 mouse with their project Will add this to the ece532 knowledge base
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.