I finally finished Taipan! on the Arduino. Well, two Arduinos. Since most people won’t read the other 8(!) rambling posts on the project below is a film and a brief summary.
Here is a film of it in action.
The original aim was to take the original Apple 2 version of Taipan! and port it to run on an Arduino Duemilanove. Yes, I could have used a Mega or a Raspberry Pi or any number of other things but to get it working on a normal Arduino was the challenge (and it flaming was).
Turned out to not be possible. In the end I had to use two! One runs the game and the other runs the display using the Arduino TV-Out library. Due to memory constraints all the strings are stored on an external EEPROM chip read via I2C. The comms between the two Arduinos is done over serial using customer commands. The keypad is custom made and functions to allow entering letters and numbers. I am using a resistor voltage divider hooked to the keys so the keypad only uses one analogue input. Output from the TV-Out library is fed to a small LCD screen and also to a RCA socket so it can be displayed on an external video monitor. The library also allows sounds so the original game sounds were manually recreated.
Gameplay is exactly like the original Apple 2 version, right down to the ‘bugs’. I did need to rearrange the screens somewhat due to a smaller resolution than the original version but all the information is present and all the strings are exactly as in the original (with the exception of minor changes).
The whole game is contained inside a housing made from a hard cover copy of the original Tai-Pan book (first edition too)! It contains 8 AA Ni-MH cells to power both the screen and the Arduinos. A recharging socket is included on the main panel.
My source code can be downloaded here.
There are three sketches for Arduino version 1.0.1 – taipan50 (the main game), taipandisplay10 (the display unit) and StringWriter10 (used to program the EEPROM with all the strings). I don’t expect anyone to try to build one of these so the source code is given here as is for people to do what they want with it. Sizes are as follows:
Taipan main game: Binary sketch size: 31,522 bytes (of a 32,256 byte maximum)
Taipan display: Binary sketch size: 15,524 bytes (of a 32,256 byte maximum)
String writer: Binary sketch size: 11,276 bytes (of a 32,256 byte maximum)
Most of the details can be found in the other posts on this project.