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.


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.

PETI Hardware Development Kit

The PETI Development Kit currently comes with copies of the Button Control Board and the Rear Expansion Board (Revision C), which is useful when combined with your own MSP430 Launchpad and the BOOSTXL-SHARP128 display expander to do your own virtual pet development! It contains all the hardware needed to test all of the PETI hardware functionality, including the expansion port and battery operation.

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

Releasing Version 0.4.0: The Sleep and Growth Update

02 Jun 2024

Only half a year or so behind the original projected release date, I am absolutely thrilled to announce the release of version 0.4.0 of the firmware for PETI, which has been tested and validated against the very same Revision B/C development kits that sold out back in February. 0.4.0 is being billed as The Sleep and Growth update because of the features it comes packing, and also includes all the fixes needed for a few bugs introduced in 0.3.0, which was released last fall.

PETI Roadmap From Now to Firmware 1.0

27 Feb 2024

It’s not just you - for the last several months I’ve been talking about pretty much exclusively the 0.4.0 firmware update for PETI, and with such a close eye on that (admittedly large) prize, it can be hard to see where the rest of the project is going. That’s why, for this week’s blog post, I want to take a step back, and look at the current roadmap for updates that should lead us more or less all the way up to the 1.0 firmware update - the “release” version.

Automating PETI Font Changes

06 Feb 2024

Just last time, I talked about how I’ve been working on making some changes to how fonts are handled in PETI; specifically, switching to a more standard font “source” format that would allow more choice on the developer end, insofar as what tools would be usable for editing the fotns. We chiefly did this by creating a FontX2-format exporter for the older fontedit editor, since fontx2 is a relatively simple bitmap font format used by lots of other embedded devlopers, and usable for quite a few different font editors. The simplicity of the format gave me a pretty clear idea for how to get the fonts included directly into PETI’s source code, which itself gave me some ideas for working toward one of the loftier end-goals of the project.

FontX2 'Support' for PETI

24 Jan 2024

When it comes to PETI firmware updates, it’s a small secret that they rarely come out according to plan. The next firmware update, 0.4.0, is no exception - dedicated readers will remember that I had originally promised that release by Christmas, on the heels of a mid-autumn release of the current version, 0.3.0. The update was supposed to support the ability for the pet to sleep and for the implementation of the game’s native evolution system, so it should come as no small shock to anyone that in actual fact its being blocked by - font development. If that doesn’t seem to make sense to you, jump below the cut and we’ll have a look at what’s going on here.

Delaying the 0.4.0 Firmware for PETI

03 Dec 2023

Our major project, PETI, was supposed to recieve a major firmware update “around christmastime” that was going to add in two new major features: the ability for the pet to sleep (including a battery-saving mode to shut off the screen after a while while it’s sleeping) and the ability for the pet to evolve from one form to another. I started creating that update two months ago, back around mid-october, hot on the heals of the 0.3.0 firmware update, and I’m bundling in a large number of bugfixes to go with it, such as issues that were silently introduced with the previous firmware updates that had to do with handling higher-address fonts and stuff like that. The release of 0.4.0 was going to be a major feather in my cap, done on time - it would have marked the first time since the start of the project I’d actually managed a quarterly feature update, and sleep and evolution were the last two major features that were considered part of the magic version 1.0 milestone set; everything else after this is window dressing, tweaks, and refinements, with the only major feature to release after this being the expansion header standards, which are a stretch goal onto the project anyway.

Announcing Release of PETI Firmware Version 0.3.0

04 Oct 2023

A few weeks ago, I published the PETI 0.3.0 firmware update! This update included mostly power management changes and display driver fixes. Here’s a quick look at how to get it, what it does, and what’s coming next in 0.4.0, which I’m hoping to get out later this year.

Mah! My Assumptions Were Invalid! Again!

08 Sep 2023

I set an incredibly light and easy goal for myself going into the first month or two of fall 2023: fix the power management problem that is reducing battery life to about 10% of what my back-of-the-napkin math had me expecting it to be. The culpret seemed immediately obvious: clearly, we are writing to the display too often.

Now Available: PETI Development Kit... Kits!

18 Aug 2023

This announcement here, on my own site, is actually a couple weeks late, but I finally got around to finishing the service manuals for the PETI development kit and making the development kits available on Tindie as DIY assembly kits! In part due to the through-hole design making assembly easy (though a tad prohibitively time-expensive when doing large numbers of them) and TI’s licensing around what I can and cannot do with the development hardware they themselves designed that make up part of the kit, I decided to opt for the route of selling the Development Kits as Do It Yourself kits consising of the PCBs for the Controller Board and the Rear Expansion Board.

Combined Lab Updates Headed Into Summer 2023

23 May 2023

Today we’ll talk about something changing around the lab, dive fairly deep in to the state of our currently-flagship project, PETI, and drill down into some side projects for the back half of the year. We start in with bad news and then it just gets better and better as you go, so tear the proverbial bandage off under the cut.

Linear Congruent Insufficiency: A First Pass at Randomness for PETI

29 Nov 2022

Last week in our quarterly update post I mentioned implementing a Mersenne Twister for PETI. This was a bald-faced lie, made possible by not consulting my notes. A Mersenne Twister would have been much more effective than the Linear Congruential Generator I implemented instead. I want to talk about how we got there, as well as what is wrong with it.

Lab Notes: Inventing SPI Video Capture with a New Tool

15 Mar 2022

One of the great truisms of making things (the precise definitions of ‘making’ and ‘things’ being surprisingly flexible) is that there’s always room for a nice side project, and since the last update on PETI, that’s exactly what I’ve been working on. A short time ago I acquired a Saleae Logic 8 USB Logic Analyzer, and while it’s sort of pushing the envelope of what a logic analyzer is used for, I decided to take the opportunity to stretch its functionality into a sorely needed utility - video capture for PETI’s main display over USB.

Lab Notes: Yet Another PETI Display Refactor

03 Mar 2022

Was there a firmware update to PETI? I must have done a refactor of the Display driver code. It’s sort of a tradition at this point, but to be fair it’s not the totality of the 0.1.0 firmware update. Let’s see what’s new.

Yet Another Display Refactor Post

11 Feb 2022

It’s not necessarily what you’d expect me to be working on in the weeks immediately following getting my hands on the prototypes of the rear expansion board, but it turns out that implementing at least a proof-of-concept version of the alert drivers took about four hours, and I’m ready to move on to something that was done wrong the last time it was implemented; the display refactor. Click through to the full article for some details.

Concerning the PETI Development Kit

16 Jan 2022

Members of the #PETI channel on the Arcana Labs Discord Server may have already known this, but late last year I developed a plan to sell a small number of PETI Development Kits early. The plan was to have my prototype of the Rear Expansion Board milled, then either assemble or package them as kits together with the necessary components, TI Launchpad for MSP430FR5994, and other accessory boards. The idea was that if I sold the small number of extras I would have from that particular PCBWay order, it would help defray costs going into the last little streth of development.

A Repast to the Year!

30 Dec 2021

The categorization features of the site sort of discourage it, but I thought I might go ahead and put together a sort of year-end megapost and just recap everything. Everything. Because why not? Jump through the cut and we’ll take a stroll down past and future a bit here.

Lab Notes: Autumn Cleaning Edition

01 Dec 2021

What’s it been, the better part of a month? Three weeks? Time flies. A lot has happened around the lab in those three weeks: PETI got a new version, I broke some stuff, and I fixed some stuff. Hop in to see the full update.

PETI Update: Version 0.0.5 (The Menus Update)

10 Nov 2021

Considering I called this punch during the previous update, it should come as no real surprise to anyone that the most recent release of PETI code, v 0.0.5, is mostly about menus. Indeed, you could even go so far as to call it as the Menu Update. In this update, we’ve added the custom menu that displays the pet’s current status, as well as the all-important text menu generator, which will let us avoid making too many more special-purpose menus.

PETI Update: Version 0.0.4 (and next steps)

31 Oct 2021

Last Time Around, we talked a little bit about the hardware backplane and audio. Spoiler alert: that is now a solved problem. While PETI itself doesn’t use it, I’ve proofed the timing circuit and I’ll be ordering those boards eventually, which will be a good time to talk about that a bit more and implement it into the PETI software itself. Instead, I’ve been putting work into solving a problem with the main menu screen: drawing the icon-based main game menu, released as PETI firmware v 0.0.4.

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.