17

Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

  • Upload
    others

  • View
    23

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30
Page 2: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

Build Your Own Retro Arcade Game

Build your own game console with a two-player table tennis game! Take

yourself back over 30 years and immerse yourself in the past, a time when the

first electronic game came to the market. The 'table' is depicted on a display

consisting of 120 individual LEDs and shows the bats and the ball. It is all

controlled by the modern ATmega8 microcontroller. Two knobs allow you and

your playing partner to move the bats. If you like, you can also play against

the microcontroller. Each new game is started by inserting a coin. The current

score is shown on the display and you can also choose the speed of the game.

Tips and tricks for the game as well as further information can be found online

at www.eight-innovation.com

Technical Information:

Operating voltage 4.5 V (three AA batteries required)

Operating time with a set of batteries: approx. 10 hours

ATmega8 microcontroller, 8kB flash, clock rate 8MHz

120 red SMD LEDs, multiplexed

Page 3: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

3

Assembly

Components:

A) Microcontroller circuit board with LED display

B) Two 10 kΩ linear potentiometers (‘pots’ for short)

C) Two knobs for pots

D) Battery compartment for three AA batteries

E) Insulated stranded hook-up wire

F) Two pre-cut bare wires (packed under ‘E’)

G) Plastic mounting housing

H) Plastic diffuser (not shown – packed under tray)

I) Four double-sided adhesive dots (not shown)

Page 4: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

4

The packaging also serves as the housing. All components are in the plastic

tray pack that is covered with a second transparent tray cover. The top tray is

required for assembly.

Click the circuit board into the tray and mount both pots into the housing with

the washers and nuts. The connections on the circuit board must point

towards the coin slot. Check from the front whether the LED field is centred

behind the screen opening. Adjust the position if required and then tighten

the first pot.

Page 5: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

5

Page 6: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

6

The assembly should now look like this.

Next, prepare four pieces of wire. Cut two simple wires, one of 3cm and one

12cm.

Then cut two wires of about 15cm in length.

About 5mm on both ends of each wire should be stripped and tinned. If you

don't have much experience with soldering, tinning the ends of the wires is a

good practice as not much can go wrong.

Page 7: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

7

A short soldering course can be found at www.eight-innovation.com.

The longer 15cm wires should have an additional section stripped away,

approx. 3cm from the tinned end on the left side. Cut the insulation with a

sharp knife, be very careful and pull them apart from each other.

Tin the free ends. If this is difficult you could also use the separate wires that

are then connected on the circuit board.

Use the four prepared wires to wire the pots. The outside connections of both

pots are at connections P1 and P4. The central connection (pin) connects to

P2 (left) and P3 (right).

Page 8: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

8

Solder both of the pre-cut bare wires to the connections K1 and K2. The wires

must be guided through the mounting tray. The easiest way to do this is once

you have tinned the ends is to hot pierce them through the plastic tray.

Once the bare wires are soldered, you should bend them to form the coin

contact. Bend the wires so that they keep their distance but at the same time

so they can be connected together by a falling coin. Do a few tests and adjust

the contacts so that a coin can fall through fairly easily.

Page 9: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

9

Join the connecting wires of the battery compartment to the circuit board.

Pay attention to the polarity: The black wire (negative), goes to the GND

terminal on the left edge, the red wire (positive) goes on the 4.5 V connection

on the circuit board. On the circuit board you will find a polarity protection

diode. If you mix these wires up, nothing will break but the display will remain

blank.

The game is now more or less assembled. Now comes the big moment of

doing the first test. Insert the three batteries. Use 1.5 V AA alkaline

batteries.

If everything is connected correctly, the two bats will appear on the

display and they can be moved with the pots.

Now put the knobs on and adjust them so that they point at the bats.

Tighten up the grub screws.

Page 10: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

10

Once everything is working properly you can then mount the diffuser on

the display. There are double-sided sticky dots which can be used to stick

the lens onto the housing.

To close the magnetic cover, the mounting tray must be pushed in slightly

at the edge. However this can cause a problem should you want to take

the coin out the housing later. Therefore, very carefully cut off any excess

edging with a sharp knife or a pair of scissors.

Now you are ready to play!

Keep a few coins ready that you can use to start a new game. Should a

problem arise, take out the batteries and put them back in again after one

minute. This fully resets the microcontroller.

Page 11: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

11

Description of Functions and Playing Instructions

The players move their ping pong bats with the knobs. A ball is played back

and forth. If you manage to hit the ball past your opponent's bat, you win a

point. The winner is the first player to reach ten points. The first game starts

when the batteries have been inserted. At the end of the game, the display

turns off. You then need to insert a coin for every new game.

You can choose to play against the computer or a real opponent.

A computer vs. computer setting is also possible. The choice of player can be

selected at the beginning. Move one of the bats right to the top, this lets the

computer take control of the bat and this is indicated by flashing. You can give

the computer the left or the right side, or both if you wish. More options are

detailed below

Computer vs. Computer

Page 12: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

12

Left Player vs. Computer

For the first game to start, both bats must be in the middle position and then

you must wait for the game to start and the ball to appear on the server's

side. The serve is awarded to the player who has the lowest score.

Player vs.Player, server on the right

Serve the ball by touching it with the bat. Touching it on the straight side

makes it go horizontal. If the ball goes to the side of the bat, you need to

Page 13: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

13

move the bat and touch the ball with the edge of the bat so that it moves

either upwards or downwards at a 45-degree angle. It bounces off the side of

the court and will go to the opposite side of the angle.

The right bat hits the ball at an angle

The right bat hits the ball straight

Page 14: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

14

The opponent can hit a ball approaching at a horizontal angle with a flat bat

and return it at a 180 degree angle. A ball approaching at an angle can be

returned at a 90 degree angle.

If a ball approaches at an angle and hits an edge, it will be randomly returned

at either a 180-degree angle or horizontally. A horizontally approaching ball

can be returned at an angle with the edge.

Return with the edge

Return with the flat side

Page 15: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

15

Every time one of the two players misses the ball, the opponent wins a

point. The score is then displayed for a second as bars on the edge of the

playing area. Whoever has lost a point is the next to serve.

Score: 4:6

The game ends as soon as one of the players reaches a score of ten. The final

score will be displayed for three seconds. The game with then automatically

turn itself off. In order to start a new game, you must insert a coin. Now you

can chose the type of game again, who is the first to serve or if you want to play

against the computer.

The player options are displayed on the screen for about four seconds. In this

time you can also choose the difficulty level (Level 1 to level 5). A higher level

results in a faster game. Game level 1 is the slowest game speed. In order to

choose a faster speed, move your bats multiple times upwards and

downwards over the middle position. During this time, the level will be

displayed in the middle of the screen as a thick bar. Each level is represented

as a block of four dots.

When the bar reaches the top of the display you have selected the fastest level.

Page 16: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

16

Speed level 3

At the start of the game you can also choose which of the two players will

serve. If both bats are placed at the top, the computer will play both sides

and the speed of the game will be chosen at random.

Technical Specifications

The game is built with an ATmega8-Controller. A matrix of 120 LEDs is

laid out in rows of ten, each with 12 LEDs. The microcontroller

controls the rows in a multiplex. The anodes are triggered directly by

ports, the cathodes by two HC4094 shift registers.

The pots are connected to ADC6 and ADC7. The upper end of the pot is

coupled to the VCC, the lower end to the PD2 port (INT0). At the end of the

game the PD2 programme switches up, so that there is no voltage is applied

to the pots. All LEDs are shut off, the AD converter stopped, and the

microcontroller is placed in power-down mode. Power consumption therefore

reduces to less than 1 µA. Therefore a master switch is not required. On PD2

and on GND there is also the coin contact (K1 and K2). These can interrupt

and start a new game.

Page 17: Build Your Own Retro Arcade Game - EIGHT Innovation · Build Your Own Retro Arcade Game Build your own game console with a two-player table tennis game! Take yourself back over 30

17

Further Projects!

You will find lots of unused connections on the circuit board. These are

partly required for manufacturing and are also useful for your own

projects. On the six pole ISP connection (bottom left) you can re-

programme the controller and create your own project. Only do this when

you are familiar with microcontrollers, because if you make a mistake the

system can be irreparably damaged. In addition there are also eight free

port connections that can be used for other things. The C4 connection has

active firmware and serves as a test input. If you put C4 in GND and connect

the operating voltage or trigger a reset, the display will perform a test in

which all LEDs are triggered.

More on additional uses and further technical information can be found

online at www.eight-innovation.com. When you have had enough of playing

the game and you want to know what else it can do, then that’s the place to

go!

Disclaimer

© 2015 Eight Innovation Ltd & Franzis Verlag GmbH

www.eight-innovation.com

All rights reserved, including photocopying and storing in electronic media.

Creating and distributing copies on paper on data carriers or on the

internet, in particular as a PDF is only permitted with explicit permission of

the publisher and failing to do so will lead to criminal prosecution.

Most of the product descriptions of hard- and software as well as company

names and company logos named in this document are, as a rule, registered

trademarks and should be treated as such. The publisher will largely use the

manufacturer's spellings in the product descriptions.

Everything presented in this book in regards to circuits and channels has been

developed, approved and tested with the utmost care. However any errors in

this book and in the software cannot be completely ruled out. The publisher

and author take no responsibility for any errors or incorrect information.