0% found this document useful (0 votes)
81 views

Gameduino Tutorial

Gameduino is an Arduino shield that allows for retro-style gaming. It features 400x300 pixel video output, 512-color graphics, 96 sprites per scanline, stereo audio synthesis, and joystick input. The shield is programmed through an FPGA using Verilog code. Sample games and code libraries are provided to demonstrate its capabilities for developing retro-inspired games and applications.

Uploaded by

Roberto Boote
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Gameduino Tutorial

Gameduino is an Arduino shield that allows for retro-style gaming. It features 400x300 pixel video output, 512-color graphics, 96 sprites per scanline, stereo audio synthesis, and joystick input. The shield is programmed through an FPGA using Verilog code. Sample games and code libraries are provided to demonstrate its capabilities for developing retro-inspired games and applications.

Uploaded by

Roberto Boote
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Gameduino Tutorial

Description:

Gameduino is a game adapter for Arduino (or anything else with an SPI
interface) built as a single shield that stacks up on top of the Arduino and has
plugs for a VGA monitor and stereo speakers. The sound and graphics are
definitely old-school, but thanks to the latest FPGA technology, the sprite
capabilities are a step above those in machines from the past. The adapter is
controlled via SPI read/write operations, and looks to the CPU like a 32Kbyte
RAM. (Unlike many 8-bit machines, there are no restrictions on when you can
access this RAM). There is even a handy reference poster (which you can
download below) showing how the whole system works.

Features:

• Video output is 400x300 pixels in 512 colors


• All color processed internally at 15-bit precision
• Compatible with any standard VGA monitor (800x600 @ 72Hz)
• Background Graphics
o 512x512 pixel character background
o 256 characters, each with independent 4 color palette
o pixel-smooth X-Y wraparound scroll

1 / 12
• Foreground Graphics
o each sprite is 16x16 pixels with per-pixel transparency
o each sprite can use 256, 16 or 4 colors
o four-way rotate and flip
o 96 sprites per scan-line, 1536 texels per line
o pixel-perfect sprite collision detection
• Audio output is a stereo 12-bit frequency synthesizer
• 64 Independent Voices 10-8000 Hz
• Per-Voice Sine Wave or White Noise
• Sample Playback Channel

Physical Connection:

Gameduino is the standard Arduino module. Arduino pins which have to be connected to it
are as following picture shows:

2 / 12
Gameduino is superimposed on top of Arduino directly.

How to burn the codes into SPI flash:



FPGA Verilog codes http://excamera.com/files/gameduino/verilog/
Composite these codes through the ISE. Program them. Then, the executable bit file can
be generated.

Open ISE iMPACT

3 / 12
Double click PROM File Formatter ,

Choose Configure Single FPGA in the SPI Flash of the Storage Device Type. Click

Gameduino’s Flash capacity is 4M. Click Add Storage Device and click

Name the file and choose address. Click OK.

4 / 12
Click OK. Add .bit file.

Click Generate File… if,

Comes, means the .mcs file which has to be burnt into SPIflash is generated successfully.

Double click Boundary Scan ,and then click . Choose .bit file and following dialogue
comes out:

5 / 12

Click Yes choose.mcs file and following dialogue comes out.

The type of SPI PROM used on Gamedunio is AT45DB041B. Click OK


Choose FLASH program ,
Burn the codes into SPI FLASH successfully.

How to burn game codes into arduino:



1.Add the library files into Arduino
Zip the download library files and generate the folder: gameduino. Put this folder
into libraries under the Arduino installation directory. Open the Arduino software. Sample
codes are in File > Examples > Gameduino.

6 / 12

2. Choose one example such as chessboard and upload into Arduino. You can see the
following picture on the displayer.

7 / 12
Usage of the joystick:

Following is the self-made joystick. Direction keys are controlled by two


potentiometers. Keys can be took place by four buttons.
The connection between joystick and Arduino pins are as following:

8 / 12
GND singal GND
5V VCC
ANALOG 0 x_position
ANALOG 1 y_position
DIGITAL 2 BUTTON_SELECT
DIGITAL 3 BUTTON_RIGHT
DIGITAL 4 BUTTON_UP
DIGITAL 5 BUTTON_DOWN
DIGITAL 6 BUTTON_LEFT

Joystick testing :
9 / 12
File > Examples > Gameduino> Tools > joytest.

Upload

Use joystick to play games :


File > Examples > Gameduino> Demo >asteroids.

10 / 12
Upload

Play games as you want through control the joystick.

Arduino sample codes and library files :


11 / 12
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/Gameduino.zip

Reference files
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/poster.pdf
Gamedunio website :
http://excamera.com/sphinx/gameduino/

12 / 12

You might also like