SEARCH
TOOLBOX
LANGUAGES
modified on 14 December 2010 at 09:59 ••• 24,030 views

Reverse engineering an MB Electronic Simon game

From WFFwiki

Jump to: navigation, search

Contents

Introduction

MB Simon.png

The MB Electronics Pocket Simon game has a very simple circuit thanks to the inclusion of a custom MB Electronics processor (the MB4850) which performs nearly all of the functions for the game. The only other significant piece of electronics is a SN75494N chip which interfaces the processor to the light‐bulbs and the built in piezo buzzer.

The aim of this exercise is to reverse‐engineer the Pocket Simon game so that it can be replicated as accurately as possible using modern components (or even reproduced entirely in software). This includes analysing the hardware (how it is built and how it works), the software (including timing, note frequencies, game modes, light sequences, etc.).

Since the processor of the Pocket Simon is the same as found in the full‐size Simon all information contained in this document are relevant to both (I chose the Pocket Simon since I didn’t want to risk damaging my full‐size game).

The Simon game

The Simon game has three game modes:

  1. Single Player – The game generates a sequence of lights and sounds which the player must follow, the sequence grows by one colour every turn and ends when the player makes a mistake or repeats the maximum number of colours in a sequence (which is dependent on the skill level setting)
  2. Multi Player (game 2) – The game begins with Simon displaying a colour, the first player must repeat the colour and then select another colour, subsequent players must enter the current sequence and then add one more, the next player then selects the sequence of colours entered so far and then one more and so on until a player makes a mistake (or a sequence of 31 colours is achieved).
  3. Multi Player (game 3) – This game is identical to game one, however each player owns one or more colours and is responsible for pressing it during the sequence. If a colour is incorrectly selected that colour is removed from the game and the game continues (with a new colour sequence) until only one colour is left (the winner)


The game also features 3 skill levels:

  1. Repeat a sequence of 8 colours
  2. Repeat a sequence of 14 colours
  3. Repeat a sequence of 20 colours
  4. Repeat a sequence of 31 colours


To play games 2 and 3 the skill level selector must be in position 4 or the game will end prematurely (this is due to the ‘skill level’ performing the same function in all game modes; in the multi‐player games the maximum sequence number Simon can handle gives the longest game play).

The game hardware consists of 4 coloured lens which, when pressed, operate switches on the circuit board. The colours from top‐left going clockwise are red, blue, yellow and green on the Pocket Simon and green, red, blue and yellow on the full‐size version.

There are 3 push buttons on the game:

  • Last – Replays the sequence from the last game (only operates when the game is not in progress)
  • Start – Starts a new game (can be pressed at any time)
  • Longest – Replays the longest sequence successfully completed since the game was turned on (only operates when the game is not in progress)


There are 2 sliding switches on the game (on the full‐sized game there is an additional on‐off switch which in the pocket version is replaced by a two‐pole game switch):

  • Game – Off, 1, 2 and 3
  • Skill – 1, 2, 3 and 4

Hardware

The internal hardware of Pocket Simon consists of a single sided circuit board containing 4 components and 2 integrated circuits (all soldered directly to the circuit board):

  • R1 – 680K resistor with 5% tolerance (colour code blue, grey, yellow and gold)
  • R2 – 22K resistor with 5% tolerance (colour code red, red, orange and gold)
  • C1 ‐ .1uF ceramic capacitor (usually marked ‘104’)
  • C2 – 47nF capacitor (this is an old‐style capacitor with colour code yellow, violet, brown, silver, silver and can be replaced with an equivalent ceramic capacitor (usually marked ‘471’))
  • U1 – MB4850 custom processor chip
  • U2 – SN75494N Hex Digit Driver (the datasheet for this chip is available on the web as the National Semiconductor DS75494 Hex Digit Driver datasheet)


There are also 3 wire‐links, 4 bulbs (2.5‐3V) and a piezo buzzer included.

Pocket Simon circuit board bottom view

Pocket Simon circuit board top view

By taking the top view of the circuit board and processing it in Photoshop it is possible to make a better view to allow the circuit to be converted back into a schematic diagram. To do this all the tracks on the PCB are filled with black and the remaining items filled with white. The labels can be added to make tracing the circuit easier, resulting in the following picture:

An enhanced and labelled view of the Pocket Simon PCB

By tracing the tracks on the circuit board and using the available datasheet for the SN75494N chip it is possible to draw the schematic for the Pocket Simon circuit which is shown in the following diagram:

Schematic diagram of the Pocket Simon circuit

The only difference between Pocket Simon and the full size Simon is the addition of a diode which sits across the speaker (usually a diode is used to prevent power surging from the speaker; since the Pocket Simon uses a buzzer instead it is not required) and the order of the lights connected to the SN75494N chip.

Modification of the Pocket Simon hardware

In order to analyse the hardware and software of the Pocket Simon game it is preferable to remove the two integrated circuits from the game’s PCB. The original circuit can then be altered with the addition of two IC sockets to allow easy insertion of the components to and from the board as shown in the following picture:

Pocket Simon's circuit board with added IC sockets

By following the circuit diagram (and using the chips from the original circuit board it is possible to mock‐up the Pocket Simon game on a breadboard (which makes it far easier to test and analyse the custom processor chip and take readings of the other aspects of the game). The following picture shows a basic game mock‐up (this method was also used to test the schematic for accuracy); note that the light‐bulbs were replaced by high‐intensity LEDs purely for convenience:

Pocket Simon mock‐up on a breadboard

MB4850 Microprocessor

According to sources on the web the original design for the Simon game was performed on a Texas Instruments TMS1100 microprocessor which was a popular embedded processor at the time. Since processor development, coding and the tools required for coding were very expensive and time consuming to make in 1977‐78 it is safe to assume that the MB4850 is a variant of the TMS1100 which was packaged and programmed specifically for the Simon game (TMS1100 were not programmable by the customer, the customer had to specify the required ROM image (software) and then the chips would be manufactured with the ROM image included).

This theory is backed up by comparing the oscillator and initialisation circuitry around the processor with datasheets for other ‘pre‐programmed’ TMS1000 variants. The use of a capacitor and resistor in parallel provides the timing to the processor (in the Pocket Simon game this oscillates once every 225 uS giving a oscillation speed of 4.4Khz) as well as the initialisation capacitor which ensures the processor is ‘ready’ before the game begins.

Note (20101214): I recently purchased another broken full-size Simon game from ebay which had a revision 'A' PCB. Instead of the smaller MB4850 chip the revision A board had a 28 pin TMS1000 processor which confirms my original guess. Presumably these were replaced with smaller devices in subsequent revisions to cut production costs.

The TMS1100 is a four‐bit microprocessor with 8192 bits of ROM and 256 bits of RAM. The MD4850 variant has 4 input pins (named K1, K2, K4 and K8) and 8 output pins (named R0‐R7). The oscillator connection pin (3) is named OSC and the initialisation pin (9) is called INIT. Following the Pocket Simon circuitry and the datasheet information for TMS1121 as guidance this indicates the MD4850 has the following pin out:

MD4850 Pin out

The MD4850 ‘R’ outputs should provide about ‐9V at ‐14mA and the total (recommended) power dissipation is 400mW.

Software

Switch multiplexing by polling

It can be seen from the schematic that all the switches on the circuit are multiplexed to 4 inputs on the MB4850, this configuration requires the software to ‘poll’ the states of the various switches. By using an oscilloscope it is possible to measure the timing over the polling. The following pins perform the polling:

  • Pin 1 – polls start button and skill switch. Polling ‘high’ lasts for 1.5ms followed by a low of 50ms; polling happens continuously whilst the game is on
  • Pin 16 – polls Last, longest and game switch; Polling ‘high’ lasts for 1.5ms followed by a low of 50ms; polling happens continuously whilst the game is on
  • Pin 15 – polls the colour switches; Polling ‘high’ lasts for 1.5ms followed by a low of 50ms; polling only occurs whilst a game is in progress.


Note: pin 1 and pin 16 are polled sequentially i.e. the ‘high’ of pin 1 is followed directly by the high of pin 16.

Sound frequencies and timing

By adding an audio output jack to the breadboard mock‐up of Pocket Simon it is possible to connect the sound output from the game to a computer and sample the sounds that are created. This allows accurate timing of the tones played by the game and the timing of the silences between various tones by using sample editing software.

All sounds are square waves when monitored with an oscilloscope.

Each coloured lens has an individual tone which is generated when the game lights a colour or if a player lights a colour. The tones for the lights are as follows (on Pocket Simon):

  • Blue – 415 Hz – G#4 (true pitch 415.305 Hz)
  • Yellow – 310 Hz – D#4 (true pitch 311.127 Hz)
  • Red – 252 Hz ‐ B3 (true pitch 247.942 Hz)
  • Green – 209 Hz – G#3 (true pitch 207.652 Hz)


On the full‐size version of Simon the lights are in the opposite order:

  • Green – 415 Hz – G#4 (true pitch 415.305 Hz)
  • Red – 310 Hz – D#4 (true pitch 311.127 Hz)
  • Yellow – 252 Hz ‐ B3 (true pitch 247.942 Hz)
  • Blue – 209 Hz – G#3 (true pitch 207.652 Hz)


In addition, if the player presses he wrong colour or takes too long the game plays a losing tone of 42 Hz for 1.5 seconds.

Note: According to information on the web the sounds of the Simon game are based on the primary four notes of a bugle (picked so the game will always sound harmonious no matter the sequence). These notes are G1, C2, E2 and G2 (although the game plays notes in the 3rd and 4th octave). This being the case the actual frequencies should be:

  • Green – G4 391.995 Hz
  • Red – E4 329.628 Hz
  • Yellow – C4 261.626 Hz
  • Blue – G3 195.998 Hz


The inaccuracy of the game tones is probably due to the constraints of accurately producing the duty‐cycle timing required for the notes (the timing of the square wave is limited by the instruction speed of the processor) and also inaccuracies in the processor’s clock (which is rudimentary by modern standards).

As the game progresses the playback of the tones becomes faster, timings are shown in the following table (note when using the last and longest buttons the sequence is always played back at the lowest speed):

  • Sequence length: 1‐5, tone duration 0.42 seconds, pause between tones 0.05 seconds
  • Sequence length: 6‐13, tone duration 0.32 seconds, pause between tones 0.05 seconds
  • Sequence length: 14‐31, tone duration 0.22 seconds, pause between tones 0.05 seconds


If the required sequence length for the skill level has been reached Pocket Simon plays a victory tone of six beeps (of the same frequency as the last colour in the sequence). The first beep is 0.02 seconds followed by 5 beeps of 0.07 seconds with a 0.02 second gap between tones the light of the last colour of the sequence is flashed on with each beep. The victory tone is played 0.8 seconds after the last colour of the sequence has been pressed and released.

The time between the player finishing a sequence and the game playing the sequence again (with an extra colour) is 0.8 seconds. When depressing a colour there is no limit on how long you can keep the colour pressed when replaying a sequence the tone and light continue until the colour is released (a handy cheat if you need a little more time to remember the next colour!).

In game time out: 3 seconds (after which the losing tone is played)

Inactive and still powered on warning: 45 seconds. This warning lights the colour that was previously lit in the game (i.e. the colour that the losing tone or the winning tone flashed). The first beep is 0.02 seconds followed by 16 beeps lasting 0.07 seconds with a 0.02 second gap between each beep. The tone’s frequency is the same as the colour it is flashing. If no colour has been selected since the game was turned on the Pocket Simon flashes the red colour (the full‐size Simon flashes the yellow colour). This warning tone repeats if the game remains inactive.

Special 'Razz'

In games 1 and 2 there is a 'special victory signal' which is played if you complete a sequence of 31 colours (i.e. you win on skill level 4). The game plays the following tones (and flashes the corresponding lights) for 0.10 seconds per light:

310, 252, 209, 415 x 3 (RYBG on the full-size Simon) 310, 252 (RY)

At which point the tones are replaced by the failure signal for a further 0.8 seconds. The lights continue to flash (BG RYBG RY) for 0.1 seconds per light.

In game 3 there is a 'very special victory signal' that is played if you complete a sequence of 31 colours on skill level 4. It is identical to the 'special victory signal' except that the failure signal continues to play (without flashing any lights) until the game is turned off.

The time between completing the game and the special signal being played is 0.8 seconds.

Random number generation

In order to provide a seemingly endless and random number of sequences for the game the software counts from 1 to 4 every time the main processing loop is polled. When a button is pressed (to start the game for example) the current value of the counter is used to select the colour and so on as the game is played (this information is hinted at in US Patent 4,207,087). This provides a simple random sequence generator for the game.

Maximum sequence length

The maximum sequence length allowed by the game is 31. Each step of the sequence requires 2 bits of RAM so the sequence can be stored and played back (2 bits gives a range of 0 to 3) i.e. 62 bits is required to store the pattern. The longest playback feature would also require a further 62 bits to store the longest pattern for later playback. Note: the last feature would simply use the sequence from the last game and would be overwritten when a new game begins.

The reason for limiting the sequence length to 31 is probably because the MB4850 processor is 4-bit so 31 was the highest number that could be stored in a word (1 word plus the carry bit).

Differences between Pocket Simon and Simon

There are four basic differences between Pocket Simon and Simon; the ordering of the colours, the additional on/off switch, slightly different sound circuitry (since the full-size Simon uses a speaker not a buzzer) and the wiring of the SN75494N chip. The following circuit diagram shows the schematics for the full-size Simon game:

Schematic diagram of the Simon circuit

References

US patent number 4,207,087 (for the original Simon concept game)

TMS 1121 Universal Time Controller Introduction (Texas Instruments)

Pocket Simon user manual – reproduced by www.handheldmuseum.com

Video of a player completing Simon on skill level 4 (used to calculate the sequence playback timing by analysing the audio)

National Semiconductor DS75494 Hex Digit Driver datasheet

“The Simon Story” by Ralph H. Baer

See Also

Please take a look at my other project Simon18F - Adding a PIC processor to the Simon game.

Notes

The intention behind this document is to act as a reference for anyone seeking to repair an existing Simon game or create their own. By replacing the MB4850 with a PIC microcontroller (or similar) and then replacing the SN75494N with jumper‐wires and the bulbs with LEDs it is easily possible to build a fully customisable and programmable version of the game within the original case (the PIC can be mounted on a PCB which rearranges the PICs pin configuration to match the MB4850. Another (much easier) modification is to remove the white cardboard reflector in the game (present in both the full and pocket versions) and cover it with aluminium tape, which increases the brightness of the lenses.

If your Simon has suffered damage from a leaking battery use a solution of 1:1 water and vinegar to clear it up (the battery ‘gunk’ is alkaline so a mild acid will remove it properly). If any tracks on the circuit have become broken for any reason carefully scrape the green varnish off the edges of the remaining track (around the break) and then paint with conductive silver paint. This technique can also be used to repair worn switches on the pocket Simon circuit board.

If you have any comments, amendments or extra useful information about the game, please feel free to email me.

All pictures and illustrations were drawn or photographed by myself. I make no guarantee of accuracy and take no responsibility if you break your Simon whilst doing anything mentioned in this document.

No Pocket Simons were harmed during the making of this document




Donate to waitingforfriday.com:

If you like this site and want to help support future projects, or you just want to show appreciation for a project you built, used or enjoyed, please consider leaving a PayPal donation. It's quick, secure and helps us to run the site and fund future projects!


PayPal, fast, easy and secure




Join the EFF:

Join the Electronic Frontier Foundation


The owner of this site is a member of the EFF and you should be a member too! The EFF protects the rights of open-source, open-hardware authors all over the world.



Most popular pages:

  1. Building a PIC18F USB device ‎(252,920 views)
  2. Home ‎(238,401 views)
  3. 4-Bit Computer ‎(104,196 views)
  4. Projects ‎(103,466 views)
  5. Open Source Framework for USB Generic HID devices based on the PIC18F and Windows ‎(103,333 views)
  6. Open Source Visual C++ Class for USB Generic HID Communication ‎(62,760 views)
  7. Real-Time Audio Spectrum Analyser ‎(60,998 views)
  8. Controlling LED brightness using PWM ‎(51,236 views)
  9. USB RGB LED VU Meter ‎(49,637 views)
  10. PIC USB Development Board ‎(48,667 views)
  11. 16x8 LED Matrix Display ‎(43,962 views)
  12. C64 VICE Front-End ‎(36,611 views)
  13. USB Performance Monitor ‎(33,205 views)
  14. PC Case USB LCD ‎(30,051 views)
  15. Rotary Encoder Demonstration ‎(28,174 views)
  16. Commodore SID 6581 Datasheet ‎(26,967 views)
  17. Reverse engineering an MB Electronic Simon game ‎(24,030 views)
  18. Retro Computing ‎(22,929 views)
  19. LED Colour Organ ‎(22,798 views)
  20. Vetinari's Clock ‎(18,592 views)

more >>