1 / 47

Tamagotchi Hacking

Tamagotchi Hacking. Many Tamagotchis Were Harmed in the Making of this Presentation. Many Tamagotchis. Natalie Silvanovich @natashenka. Were Harmed in the Making of this Presentation. What are Tamagotchis?. The same virtual pet toys you remember from the 90’s

Télécharger la présentation

Tamagotchi Hacking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tamagotchi Hacking Many Tamagotchis Were Harmed in the Making of this Presentation Many Tamagotchis Natalie Silvanovich @natashenka Were Harmed in the Making of this Presentation

  2. What are Tamagotchis? • The same virtual pet toys you remember from the 90’s • Functionality has evolved substantially • Now they can go to school, have jobs, make friends! • Newer versions have an IR interface so that they can communicate with other Tamagotchis

  3. TamaTown Tama-Go • The “Christmas” Tamagotchi from last year • Same functionality for smaller hands • Supports detachable ‘figures’ with extra games and stores

  4. Goals • Decode external communication channels • Dump Tamagotchi code • Answer the ‘deeper questions’ of Tamagotchi life • Make my gotchis rich and happy • Have fun!

  5. Communication Infrared

  6. Signal Listening • Listened to the communication between two Tamagotchis using a digital signal analyser and a de-multiplexing IR receiver

  7. Meet Nana and Anna ac 00 26 d6 0e 01 0e 01 00 01 33 87 00 00 33 c0 0b 00 00 ff 01 ff ff 7d ac 00 39 d6 01 0e 0e 01 00 00 34 87 00 00 20 80 8 00 A is letter 1 in the alphabet N is letter 14 (0x0e) in the alphabet

  8. Decoding Circuit • Using signal analyser and python was slow • Made a circuit with the IR receiver, an IR LED and an arduino • Wrote a program that could listen to and decode IR input in real time • Eventually added transmission functionality

  9. Decoding Circuit

  10. The Fun Begins • Rough protocol • And then just try stuff!

  11. Did you know that? • You can give your gotchi unlimited free gifts? • Possible gifts include a CD player, a cell phone and an RC helicopter • Too much unreciprocated gift giving damages two gotchis’ relationship? • You can mate almost any two gotchis? • Gotchis have multiple gender markers?

  12. Teardown

  13. Hardware Teardown • Took apart a Tama-Go and Tamagotchi to determine if code dumping was a possibility • Looked for helpful interfaces • Also took apart a figure

  14. Tama-Go Board EEPROM

  15. Tama-Go Figure

  16. Microcontroller Identification

  17. Identifying the Microcontroller • Considering the lack of external hardware, MCU and code memory were likely under the ‘blob’ • Tried several methods to remove, including acetone and a chopstick • Travis Goodspeed kindly offered to decap the chip with acid

  18. Identification • Started by posting on my blog • No one answered (correctly) • Counted cells to determine memory size • Wrongly • Posted on Tamagotchi forums • Compared pad layouts

  19. Eventually, success!

  20. GPLB5X Series LCD Controller • 8 bit 6502 microprocessor • 1536 bytes RAM • 320 or 640 kbyte mask ROM (depending on model), baked to perfection for each customer • 512 bytes LCD RAM • 4 color grayscale LCD controller • SPI • Audio DAC

  21. Dumping Mask ROM • Not sure how to dump mask ROM, but had a few ideas • Restore a bad state from EEPROM • Determine the test program • Exploit a vulnerability in figure or IR processing • Read ROM with a microscope • Pin manipulation

  22. Dump EEPROM

  23. EEPROM Dump • Attached tiny wires to EEPROM and dumped it using Arduino I2C library • Game ‘state’ is stored in a format similar to IR

  24. EEPROM Dump • State format is unlikely to allow mask ROM dumping • Tried overwriting EEPROM • Very error senstive • Resets the game in case of error • Did manage to ‘advance’ myself in the game

  25. Test Program

  26. Test Program? • GeneralPlus mask ROMs contain a GP test program that can probably dump code • Contacted GeneralPlus for a devkit • Requires an NDA • Looked around online • No one seems to have a devkit or know the test program

  27. Figure ROM

  28. Figure ROM • Decoding the figure ROM could be useful in a few ways • Making your own Tamagotchi games • Executing code on the Tamagotchi • Dumping mask ROM • Understanding Tamagotchi behaviour

  29. Figure Types • There are two types of Tamagotchi figures, ‘reguar’ and ‘lite’ • Regular figures contain PCBs with blobs • Lite figures contain unpopulated PCB • Act as jumpers • Tried jumper-ing regular figures • Saw functionality of different figures! • Extremely likely figures contain mask ROM

  30. Figure ROM Pads • The unpopulated PCBs in lite figures appear to be the same boards used in regular figures • Makes the mask ROM pad layout visible

  31. Figure ROM Chip • GeneralPlus makes an SPI ROM with a similar layout • Assumed figures use this ROM

  32. Figure ROM Test

  33. Figure ROM Pins • Based on the GeneralPlus ROM datasheet, was able to identify the figure pins 1, 4 and 8: Ground/Jumper 2: Serial clock (C) 3: Serial data input (D) 5: Power 6: Chip Select (SB) 7: Serial Data Output (Q)

  34. ROM Dump • Dumped the ROM using an Arduino as SPI master

  35. Decoding ROM • The Tamagotchi has a four-tone display, so looked for strings of 0x00, 0x55, 0xAA and 0xFF, representing images • Found a few errors in the dumping sketch • Noticed that these strings were preceded by values which were reasonable for length and width

  36. Decoding Images • Tried decoding these images • Eventually, it worked!

  37. Images • The figure contained a lot of images • Text displays appear to be images • Animations are series of images

  38. The Rest of the ROM • The ROM contains a lot of non-image data • None of this data is GeneralPlus code • Likely logic information in some sort of interpreted language

  39. Simulating the ROM • Could not obtain compatible flash • Attempted to simulate the ROM using an Arduino, but chip is too slow • Switched to a Chipkit Uno • Got reasonable results simulating ROM, but unreliable • Still in progress

  40. Conclusion

  41. Conclusions • Can ‘cheat’ at Tamagotchi using the EEPROM or IR • Learned about Tamagotchi internals • Still trying to dump the code • Continuing with simulating the figure ROM • Still *hint* looking for the test program *hint* • Most importantly, good times were had by all…

  42. Except for the Tamagotchis

  43. Questions?

  44. More Info http://www.kwartzlab.ca/author/natalies/ @natashenka

More Related