Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

The 2022 Supercon Badge is a Handheld Trip Through Computing History

Over the last several years, there’s been a trend towards designing ever more complex and powerful electronic event badges. Color displays, sensors, WiFi, USB, Bluetooth — you name it, and there’s probably a con badge out there that has packed it in. Even our own 2019 Supercon broke new ground with the inclusion of a Lattice LFE5U-45F FPGA running a RISC-V core. Admittedly, observing this unofficial arms race has been fascinating. But as we all know, a hacker isn’t defined by the tools at their disposal, but rather the skill and imagination with which they wield them.

So this year, we’ve taken a slightly different approach. Rather than try and cram the badge with even more state of the art hardware than we did in 2019, we’ve decided to go back to the well. The 2022 Supercon badge is a lesson in what it means to truly control a piece of hardware, to know what each bit of memory is doing, and why. Make no mistake, it’s going to be a challenge. In fact, we’d wager most of the people who get their hands on the badge come November 4th will have never worked on anything quite like it before. Folks are going to get pulled out of their comfort zones, but of course, that’s the whole idea.

A Virtual Retrocomputer

Those well versed in the history of desktop computing will likely find the front of this year’s Supercon badge strangely reminiscent. Festooned with buttons and LEDs, it’s designed to resemble the front panel of early microcomputers such as the Altair 8800 and the IMSAI 8080 made famous in War Games.

But the resemblance is more than just skin deep. The badge doesn’t just look like the front panel of an early microprocessor, it actually is. Well, a simulated one, at least. While the PIC24FJ256GA704 on the back of the badge is technically running the show, the user interacts with a virtual 4-bit processor designed by the legendary Voja Antonic.

Programs can be entered into the computer, bit-by-bit, using the row of tactile buttons on the front of the badge. Each 12-bit sequence, made up of an opcode and one or two operands, gets deposited into the memory address indicated by the program counter LEDs. If you make a mistake (and you will), you can step back and forth through the program counter to review and correct the instructions given to the CPU.

To help you out, the 31 instructions accepted by the badge’s 4-bit CPU are listed on the backside of the board. In addition, once you’ve entered in the binary opcode, a LED will illuminate next to the appropriate mnemonic on the front of the badge. While the silkscreen notes can’t compare to the exceptional documentation Voja has put together, at least you’ll always have a quick reference.

Programming is also made easier by the fact that all of the opcodes are between 4 and 8 bits in length. While a machine like the Altair may have required you to deposit as many as three binary sequences per instruction, the shorter opcodes mean there’s always enough space left over to enter the required operands simultaneously.

Room for Expansion

True to the early computers that the badge is trying to emulate, there’s not much in the way of onboard hardware. In isolation, all you’ve got for input are the physical buttons on the front of the badge, and output  is limited to what you can show using the 8×16 LED array which provides a window into the CPU’s memory. A close examination of the documentation does reveal there’s a pseudorandom number generator you can poke around at, but don’t expect any more luxuries than that.

But don’t worry, we wouldn’t leave you without some room to grow. As you might expect from a modern electronic event badge, there’s a 4-pin Simple Add-On (SAO) header which lets you plug in various little gadgets and do-dads. The standard I2C data and clock signals have been replaced with simple UART in this case, but that shouldn’t break compatibility with most add-ons which do little more than pull power from the port anyway.

There’s also a dedicated I/O connector in the form of a 12-pin standard pitch header along the top-right edge of the badge. This header shares the UART TX and RX pins with the SAO connector, but is capable of quite a bit more. For one thing, it serves as the badge’s In Circuit Serial Programmer (ICSP) interface should you want or need to reprogram it. But more interestingly, it offers four input and four output pins that can be accessed in your programs by reading and writing to the appropriate memory registers.

Sharing is Caring

Badge hacking is a big part of the Supercon experience, and over the three day event, we hope to see all kinds of interesting software and hardware developed for this faux-retro computer. Given the relatively short amount of time you’ll have, teamwork is strongly encouraged — don’t be shy to ask other attendees what they’re working on to see if you can lend a hand.

Of course, collaborative development is a bit difficult if the only way to share your code is by scribbling out binary on pieces of paper. While you’ll have our eternal respect (and perhaps even earn a special award) if you manage to accomplish something substantial on your badge using nothing but the integrated peripherals, we’re not so evil that we’d make you do it that way.

As such, the UART pins on the expansion port can be used to upload a program from the badge to your computer by way of a standard USB-to-serial adapter. With the adapter already connected, you simply need to put the badge into DIR (Direct) mode and press the SAVE button.

This will cause the badge to immediately start spitting out data, so you should already have your receiving side setup and ready to go before pressing the button. On a *nix machine that would look something like this:

cat /dev/ttyUSB0 > out.hex

If you press the LOAD button, the process works in reverse. A hex file sent from your computer will be loaded into the badge’s memory where it can be immediately executed. In this way, a program that was entered by hand into one badge can be quickly backed-up and distributed to others. It also means that if you formatted it appropriately, you could write the code on your computer and simply send it over to the badge for execution…

Incidentally, while the badge can only have one program loaded at a time, up to 15 can be stored to the onboard flash. This is accomplished by first holding ALT and using the OPERAND Y buttons to cycle through the available storage slots, and then with ALT still held, pressing either SAVE or LOAD. With this technique you can keep your own personal programs safely stored away while you experiment with whatever hot new hex is making the rounds.

Get Your Hands on One

Now, the best way to get one is to buy yourself a ticket and come join us at Supercon. But if you just can’t make it, we understand. We’ll be releasing the Gerbers, a full badge emulator, and the code for the PIC soon, so stay tuned.

Enregistrer un commentaire

0 Commentaires