Close

Data transfer

A project log for Running code on the HP 1653B Logic Analyzer

I ported a falling blocks game to my logic analyzer.

alexander-r-prussAlexander R Pruss 01/23/2026 at 03:170 Comments

The HP 165x analyzers use the LIF file system, like many HP computers. The HXC-firmware Gotek uses HFE files. (I tried RAW files on the flashdrive, but they didn't work.) But it's possible to convert between HFE files to RAW format with the HXC floppy emulator software, and RAW format is just a series of sectors, which should make a perfectly fine LIF image.

hxcfe -finput:FILE.HFE -conv:RAW_LOADER -foutput:FILE.LIF

 You can then extract files from the FILE.LIF volume using the well-established lifutils. And in theory you can change the FILE.LIF volume, and turn it back to an HFE file on your Gotek's flashdrive with hxcfe again. 

Except there are some hiccups. There is no layout file for HP 165x analyzers included with hxcfe. My first attempt was by converting the HFE file to XML, and then it was pretty easy to write a python converter from LIF to XML, which hxcfe can convert to HFE. 

Eventually, I made an HP layout file. The latest version is here (it's improved from the original because it includes special track 79 stuff which has nonstandard sectors that the units use to check if they want to boot from the floppy). So you can now convert from LIF to HFE:

hxcfe -uselayout:hp165x79.xml -finput:FILE.LIF -conv:HXC_HFE -foutput:FILE.HFE

 But there are still difficulties. While I was able to extract a SYSTEM_ file from the main floppy and a PVTEST_ (PV = Performance Verification, apparently) file from the self-test flloppy, lifutils refused to write them back for multiple reasons. First, the LIF volumes were lacking some metadata. Second, the file IDs for HP 165x executable files, namely C001, are not supported by lifutils. I could (and did) modify lifutils to get around one or both of these issues, but it was time to write a LIF tool more specialized to the HP 165x setting.

So I wrote a little lifutils.py python utility (latest here) thanks to this great writeup. I had to do be careful about the special track 79 stuff. Now I could write data back and forth. In particular, I could change a text stringin SYSTEM_ with a binary editor and see the changes show up on the oscilloscope screen. Hacking is on!

It later turned out that I was missing one crucial ingredient about how the file system worked. But that's for the next installment.

Discussions