Interactive Duck Hunt Game

EECS 373 Final Project Winter 2005

Interactive Duck Hunt is two-player game
where each player is given his own duck and crosshair.  The objective is to shoot the other
player’s duck before he/she shoots yours.

Joe Arifin

Tom Schuelke

Description

Interactive Duck Hunt is a two-player game that uses two
Nintendo 64 controllers and an LCD screen.
Once the system is powered up, a press start screen is displayed. The
game begins when the start button on either controller is pressed. Each player
is given his own duck and crosshair and the objective is to shoot the other
player’s duck before he/she shoots yours.  The directional pad on the Nintendo 64
controller controls the player’s own duck while the analog stick controls
his/her crosshair. The analog stick is set up so that the further you press the
joystick, the faster your crosshair will move. The movement of the duck is set
up so that after an initial movement, the duck cannot remain stationary and
will continue to move in the same direction until a new direction is commanded
using the d-pad. The trigger for the gun is the z-button. If a duck is shot,
the appropriate player is deemed the winner and the game can be started again
by pressing the start button.  What
makes the game challenging is that each player is controlling his/her own duck
and crosshair at the same time.
Although the basic idea of the game is modeled after the original Duck
Hunt game for Nintendo, we are pretty sure the idea of two players having their
own controllable duck and crosshair is original.

Project Components

Our project can be broken up into three main components:  hardware/software needed to interface with
the Nintendo 64 controllers, hardware/software needed to interface with the LCD
screen and the game software itself.

The hardware needed to interface with the Nintendo 64
controllers included control logic (for address decoding purposes) and Verilog hardware macros that polled the controllers with
the desired timed signal and latched the data received from the controllers. The
software involved interrupt service routines that sent out Enable signals to
poll the controllers at strict intervals in time and read the data received
from the controllers from the data bus once it was ready.

The hardware needed to interface with the LCD screen
included control logic that produced the desired timed signals to write to the
LCD screen.  The software involved
an initialization sequence for the LCD, a driver to write 128x128 images to the
LCD and an interrupt service routine to time the data writes to the LCD.

The game software included a function to handle the data
received from the controllers and a function to generate the bit-by-bit
mappings required to generate the graphics.

External Circuits

The external circuits we needed to build included ports for
our Nintendo 64 controllers and a port for our LCD. The controller ports were
three wires each; one for ground, one for power (+3.3V) and a third for data
transmission/reception.  The LCD
required 18 wires; eight data wires, six control wires (enable, R/W, etc.), and
the rest devoted to power signals and ground. The controllers and LCD screen
were interfaced with the standard lab hardware by wiring their I/O from the protoboard to testpoints on the lab
board.

Unresolved Issues

The main unresolved issue we had was that the LCD screen was
not updated fast enough.  This made
the game virtually unplayable as the screen was only updated once every 2-3
seconds.  We determined that this
was caused because the timer interrupt used to update the LCD screen was
interrupted by the timer interrupt used to poll the Nintendo 64 controllers for
data.  To solve this problem, we
would do away with the timer interrupt used to update the LCD screen and
instead allow the screen to be updated every time we obtained data from the controllers.
Because we ran out of time, we were unfortunately unable to do this, but we see
it as an excellent potential solution that would definitely make the game more
playable.

Other ideas that we wanted to implement to improve game
playability but did not have time to would include secret button codes (“easter eggs”).
These secret button codes would make the other player’s duck
bigger (so it would be easier to shoot), enable a player’s duck to move
faster (so it would be harder to shoot) and maybe make a player’s duck
stronger so that at least two shots would be needed to kill it.  We also thought of using the bar LEDs on the lab board to indicate how many shots each
player had left and incorporating a viewable countdown timer to limit the time
of the game.  All these ideas would
definitely make the game more enjoyable and challenging to play.

References

Nintendo 64
controllers interfacing:

http://www.st-hans.de/N64.htm

http://www-inst.eecs.berkeley.edu/~cs150/sp01/Labs/chkpt1.doc

LCD screen
interfacing:

http://www.jameco.com/wcsstore/Jameco/Products/ProdDS/277333.pdf

http://www.aet.cup.edu/ftp/eet/360/resources/hitachi-99ctd001d2.pdf

http://florent.bedoiseau.free.fr/HWare/LM213/DENSITRON.pdf