PETI - A Neo-Nostalgic Virtual Pet

In the 1990’s there was one toy virtually guaranteed to attract kids my age and annoy every adult possible - the gateway toy to teachers needing to confiscate digital equipment from their students. I’m speaking of the virtual pet, made popular under brand names like Tamagotchi and GigaPet. These small devices entertained you with monochrome-LCD representations of animals or other living creatures and screamed at you with tiny piezo speakers if you didn’t give them the attention they were rightfully trying to steal.

Varied Character Set

The design of the game code itself is sufficiently modular that individual pets can be swapped out by simply replacing header files. This modularity may even extend to other aspects of the game, supporting its hackability.

Retro-Tech Renaissance

An old concept is given new life with a modern design based on the Texas Instrument MSP430 microcontroller and SHARP Memory LCDs, for lower power consumption. Other quality of life improvements keep the device easy to use and portable.

Hackable

Exposed UART and 0Ω-resistors will provide some post-manufacturing modification ability, allowing for the possibility of including event-specific or general-purpose “reversal puzzle” functionality as is common on electronic badges.

In the 1990’s there was one toy virtually guaranteed to attract kids my age and annoy every adult possible - the gateway toy to teachers needing to confiscate digital equipment from their students. I’m speaking of the virtual pet, made popular under brand names like Tamagotchi and GigaPet. These small devices entertained you with monochrome-LCD representations of animals or other living creatures and screamed at you with tiny piezo speakers if you didn’t give them the attention they were rightfully trying to steal.

PETI is our project to both reclaim the old retro style of the virtual pet experience - echewing some of the fancier features of the newer successors to that type of device while also, naturally, plugging in some side-features more akin to some of the hackable challenge badges seen at security conferences like DEFCON, to continue to speaking to the remaining 90s kids my age.

While the project is in its early stages, with just a simple hardware demonstrator built and a lot of architectural work left to do, I’ve open-sourced both the codebase and the hardware designs here. In addition to the projects, discussions, and wiki information available there, I will be uploading periodic informal project journals to my blog.

This project and its output are provided free of upfront charge as part of the philosophy of FOSS and OSHW development practices. If you like this project and want to support its ongoing development, please check our support page.

LabNotes for This Project

Lab Notes: Riding the Wave

14 Sep 2021

As you probably recall from the previous update, the last little push for the PETI development kit is the “back board”, an extra expansion on the existing dev kit that will add key functionality like the battery pack to the device. One such feature is the ability to do auditory alters via a small speaker. In the true spirit of known and unknown unknowns, I went 100% Dunning-Kreuger and decided that this would be relatively trivial, and since it was the part of the back circuit I understood the least, it would be the first part of the board I would proof the concept of.

Lab Notes: A Lazy August

27 Aug 2021

Wasn’t there an update for Tapestry coming out this month? Weren’t you going to keep working on PETI? Did anything get done at the labs, come to think of it? Actually, yeah. Lots of things have happened. Let’s talk about those.

Lab Notes: Releasing PETI 3.0

27 Jul 2021

Circumstance and mood have conspired to make this, the final week of July, on of two periods of paid leave from work which I’ll be able to take this summer. As a result, I spent monday night and a good chunk of yesterday updating and recompiling PETI’s firmware. Last night I published this firmware update’s source [here (permalink)] as the 0.0.3 release. This version adds a new demo functionality, replacing the old demo with a menu which allows you to cycle through the various forms PETI can take, and view all four of their currently-supported animations: idle, face right, face left, and eating. I’ll go back through and add support for the sleeping animation at around the same time I add sleeping into the game.

LabNotes: Expanding the PETI Character Set

11 Jun 2021

PETI has a text-based interface; I think I’ve said that enough times by now for everyone to have it burned into their brain, but in case I haven’t - almost everything PETI can display on its screen is functionally text, in that it is comprised of cells of a given size (8 by 8, 8 by 12, or 16 by 16 pixels), and the display library treats each row of such cells as a string of text, referencing a font to determine which pixels to turn on or off depending on the size needed. This places some constraints and labouriousness on managing the display which I want to talk about today, because it’s what I’ve been working on.

LabNotes: PETI OS

13 May 2021

While calling it an operating system is overstating the complexity involved dramatically, the fact remains that I have had a very productive week in that the two most convoluted portions of the PETI firmware is now in place - the two systems which manage the central game state object and decide what is drawn on the screen and when. Step on through and we’ll talk about how that was done, and the pitfalls I found along the way.

LabNotes: Rebottling the Blue Smoke

04 May 2021

24 hours ago, I was absolutely certain I had attained a dubious electrical engineering right of passage, and blown up my first development board. I was certain of this because I had tested it extensively. Twelve hours ago, I learned I was wrong.

LabNotes: Blue Smoke Edition

22 Apr 2021

It’s been a while since I’ve done an update on PETI, the implemented-in-hardware virtual pet I’ve been designing, and that’s true for a very good reason: I’ve taken and killed it, stone dead.

PETI: What is a Byte? Why are those Letters Backwards?

02 Oct 2020

Last time we talked about PETI, I spent a few hundred words bloviating over getting trapped in a state of not having an ISR to handle an Interrupt that I couldn’t resolve because it didn’t occur during debugging, and thus couldn’t be identified. To be honest, I still haven’t identified the relevant interrupt. What I did do, though, was heavily troubleshoot my SPI_WriteLine function, resolving whatever issue was raising the interrupt in the process, so close enough.

PETI: ISR Traps, Solder Debugging, And Lazineering

15 Sep 2020

Over the last two weeks (read: about half a dozen lab hours) I’ve manage to break my stalemate on PETI. For those keeping track, I have been fiendishly attempting to not have to engineer a display driver by instead porting a display driver so badly that I’ve rewritten much of its functionality essentially from scratch.