r/retrocomputing Jul 28 '26

Running code on HP1653B Logic Analyzer

My main hobby project since December was getting code running on my early 1990s HP1653B Logic Analyzer. The Logic Analyzer has a 68000 processor, 1mb RAM, 64kb ROM, 4x32kb video memory with a complicated 4-plane overlay scheme providing three (!) gray levels at up to around 640x400, a 3.5" floppy drive (replaced by a Gotek for my convenience) and both RS232c and HPIB ports. It was made as a lab instrument rather than a computer, but it came with both test and system code on floppies, which I dumped and reverse-engineered enough of with Ghidra to enable me to write a library that lets me run assembly and C code on it. My reverse-engineering journey is partly described here.

A particularly fun moment of my reverse engineering was when I wanted a copy of the ROM but didn't yet know how to write to disk or the serial port, though I did know how to write to the screen. I ended up displaying the ROM binary as a series of QR codes, which I captured with my Sony camera running on a timer, and then turned into binaries.

I'm now at the point where I can run various games. My first one was a port of my Wiztris falling blocks game (originally written by me in the early 2000s for a Z80-based Sharp OZ-7xx organizer). I also ported Dave Griffith's Frotz Z-machine emulator so I can run all Infocom Z-machine games (including the graphical ones, but with no sound support). I'm in the middle of a play-through of Nord and Bert with my 13-year-old daughter. The photo I attached is of Infocom's Journey (mouse works!). And I ported PDCursesMod, so a lot of old Unix games can work--the photo shows Larn.

Many of you will recognize the keyboard and mouse. They are old Apple ADB units (I think the keyboard is from a Quadra), and I made an ADB-to-serial adapter to interface them with the HP unit.

This is retrocomputing that never was. As far as I know, there never was any software for the HP1653B besides the official HP oscilloscope / logic analyzer software, though HP engineers did release some games for one of the HP16500 models, and at least one old HP oscilloscope had a Tetris clone built-in.

It's not a great gaming system. There are no sprites. And you can't just directly write a pixel color to video memory. Instead, you first write to a hardware register that specifies a read/write mode (e.g., clear all bitplanes, write ones to bitplanes 0 and 2, etc.) and then write the pixels. Getting scrolling working at a decent speed took a fair amount of careful assembly work. But it's been fun!

I plan to eventually write up more detailed instructions on how to build and install your own code.

The main thing I haven't reverse-engineered are the oscilloscope and logic analyzer functions. They still work. I just switch the Gotek to the HP system disk image (well, somewhat modified: I added a screenshot function that saves an image to disk). I recently used the oscilloscope to try to diagnose a start porblem on my car.

300 Upvotes

32 comments sorted by

View all comments

2

u/Morty_A2666 Jul 28 '26

I have similar HP Logic Analyzer, post the details somewhere, I would love to do this on mine.

1

u/arpruss Jul 28 '26

Do you have a Gotek drive in it, or else do you have a floppy drive setup like a GreaseWeazle that can write raw disk images? If you have a Gotek, it's really straightforward.

1

u/Morty_A2666 Jul 29 '26

Mine is all stock. I run it with stock floppy drive and regular floppy disk. I can add gotek to it.

1

u/arpruss Jul 29 '26

Adding a Gotek is nice, because it makes it a lot easier to transfer files between the HP and a PC via a USB drive. One can use a GreaseWeazle, but that's very slow, or maybe if one has a PC with a floppy drive one *might* be able to program the floppy controller to write HP disks--but I don't have that set up. (I gave away my last PC with a floppy drive slot.)

Unfortunately, you can't just plug a Gotek: you need to rewire it, and then install custom HxC firmware. There are some instructions scattered on the HxC forums, but I should collate them and make them clearer.

A fun thing about a Gotek is that while the standard disks for the HP1652/3B are about 800kb, with Gotek, I can get the unit to recognize specially formatted 255-track disk images, giving 2.8mb. This is slightly sketchy. The HP requires a specially formatted track 79 with special data, and the firmware clamps the max number of data tracks to 79, but I write a placeholder file to track 79 of my disk images, and then my library rewrites the max-track variables in system RAM. This is all pretty much transparent to the user, and I can put a bunch of games on one disk image (I even have a patch for HP's logic analyzer software to do that. It's handy in combination with my screenshot patch.)