Brain dump, August 2024

Compaq LTE Lite 4/25

Restored another vintage laptop: a Compaq LTE Lite 4/25! I got it practically for free from Craigslist, since it was in rather rough shape: the screen hinges were completely loose and no longer attached to the body. The laptop has clearly been dropped on one of the corners in the past, but miraculously the display ribbon cable was still intact.

image

Annoyingly, the LTE series of laptops doesn’t have a built-in BIOS setup utility, and requires a bootable “diagnostics disk” to set up the BIOS parameters. This took a bit of searching on the web, but I finally found the appropriate floppy disk image, and wrote it to a disk using my trusty Greaseweazle attached to an old floppy drive.

image

Now that I’m able to set up the BIOS, I can configure it to use a CompactFlash adapter as the hard drive, which is preloaded with all kinds of retro apps and games! But there’s a slight problem: the diagnostics program doesn’t allow us to set up a “custom” hard drive, and instead requires us to select one of the predefined hard drive types defined by Compaq. Bizarrely, the “custom” drive types appear in the list, but are not allowed to be selected! Fortunately there is a standard drive type #61 that is “close enough” to the size of my CF card (512MB), and uses the correct number of heads and sectors.

image

Selecting this drive type allowed the laptop to boot into the CF card and access its contents:

image

QIC tapes from TC2000 supercomputer

I got a request to recover the data from several QIC cartridges that came from a 1980s-era supercomputer: the TC2000, from a company called BBN.

image

This computer used a scalable RISC architecture that could be expanded to 128 CPUs. The “base model” of this computer had a sticker price of $350,000, which buys you things like a 25 MHz CPU, 16 KB of L1 cache, and 16 MB of RAM. It still boggles the mind that, today, a $1 SOC can blow these specs out of the water.

The QIC tapes are DC 600A cartridges (60 MB), which were read without any issues using my trusty Tandberg TDC-3660 drive. The tapes include the installation of the operating system for this computer (called “nX”, based on Unix 4.3 BSD), as well as some other programs and tools like Fortran and Lisp. Even though the tapes were exceptionally well preserved, they still needed the usual reconditioning steps of replacing the tension belt, and cleaning the debris left behind by the previous belt.

Unfortunately it looks like these tapes contain mostly binary files, intended to run on the architecture of the TC2000, so it’s highly unlikely they’d be runnable on any other system or emulator that I’m aware of. Still, an interesting bit of archaeology worth preserving.

image

Homeowner’s log, July 2024

I installed a soft-start unit in our air conditioning condenser. There have been a couple of annoyances with our AC system that I was hoping a soft-starter would solve:

  • The condenser makes a loud noise when starting up. This is due to the high inrush current that is supposed to kickstart the compressor. In reality, the compressor doesn’t necessarily need that much current to start, which is why a soft-start unit does the job of “ramping up” the current until it detects that the compressor has started.
  • When the condenser starts, the lights in the house flicker momentarily. This is also due to the high inrush current, but the root of this problem extends beyond our house. I believe this is caused by the power transformer that serves our entire street of houses; the transformer is improperly sized, and its capacity is too low to handle these spikes of current. This is also evidenced by the fact that our lights flicker just a bit when our neighbors’ AC unit starts.

After much research, I decided to go with the MicroAir Easy Start Flex. It’s a little pricey, but it’s intended to handle most types of condensers, regardless of its “tonnage”, referring to its BTU output (our condenser is a 5-ton unit, which translates to 60,000 BTUs.

Installing it was an absolute breeze, and took less than one hour. Afterwards, there was an enormous improvement in the startup noise, and the lights no longer flicker at all. I also made a video of the installation, with before- and after recordings of the startup noise:

If you’re considering installing one of these units in your AC system (which you should), make sure you’re completely comfortable working with household electrical wiring, completely familiar with the wiring of your AC unit, and take all the necessary safety precautions. If you are unsure about anything, please contact an HVAC professional.

Programming a chip programmer with another chip programmer

Recently I had a need to program a few Atmel ATtiny chips for a project, which I haven’t done in years. I rummaged through my drawers and found the necessary programming device, which is a USBasp device:

image

When I tried using it to program an ATtiny chip using the standard programming software (avrdude), it showed an error suggesting that I need to update the firmware on the programmer device.

$ avrdude -cusbasp -pt45
avrdude error: cannot set sck period; please check for usbasp firmware update
avrdude error: program enable: target does not answer (0x01)
avrdude error: initialization failed, rc=-1
        - double check the connections and try again
        - use -B to set lower the bit clock frequency, e.g. -B 125kHz
        - use -F to override this check

But the programmer device itself uses an Atmel chip (ATmega8a) that is only programmable using another chip programmer. What to do? Rummaging further in my drawers, I discover this contraption:

image

It’s an extremely cheap CH341A programmer (~$2 on AliExpress) that I’ve used in the past to dump the contents of BIOS chips on motherboards and video cards. However, perhaps it can be useful here? Looking on the back of it, we can see that it can definitely do SPI (it has MOSI and MISO pins, although the latter is misspelled “MIOS”!). Could it be that this other programmer is also supported by avrdude?

image

$ avrdude -c\?
Valid programmers are:
...
  c2n232i            = serial port banging, reset=dtr sck=!rts sdo=!txd sdi=!cts
  ch341a             = ch341a programmer (AVR must have minimum F_CPU of 6.8 MHz)
  dasa               = serial port banging, reset=rts sck=dtr sdo=txd sdi=cts
...

How fortunate! So, what if we just connect all the relevant pins from this programmer to our target programmer that is receiving the update:

image
image

I connected the GND, +5V, MISO, MOSI, CLK (which goes to SCK), and CS (which goes to RESET) pins from the programmer to the target, remembering also to put a jumper on JP2 to enable self-programming. I also obtained the latest firmware to be loaded onto the chip. And here we go:

$ avrdude -cch341a -pm8 -b19200 -U flash:w:usbasp.atmega8.2011-05-28.hex
avrdude error: initialization failed, rc=-2
        the programmer ISP clock is too fast for the target
        - use -B to set lower the bit clock frequency, e.g. -B 125kHz
        - use -F to override this check

Hmm, something about the ISP clock being too fast… but it suggests that we can use -F to override this check. OK, let’s try that:

$ avrdude -cch341a -pm8 -F -U flash:w:usbasp.atmega8.2011-05-28.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9307 (probably m8)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: processing -U flash:w:usbasp.atmega8.2011-05-28.hex:i
avrdude: reading input file usbasp.atmega8.2011-05-28.hex for flash
         with 4700 bytes in 1 section within [0, 0x125b]
         using 74 pages and 36 pad bytes
avrdude: writing 4700 bytes flash ...
Writing | ################################################## | 100% 1.25 s 
avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against usbasp.atmega8.2011-05-28.hex
Reading | ################################################## | 100% 0.79 s 
avrdude: 4700 bytes of flash verified
avrdude done.  Thank you.

Wait, what? It worked! This is much easier than I thought it would be. Thanks, avrdude and cheapo CH341A programmer! I can now program ATtiny chips quickly and easily.

image

More huge updates to DiskDigger and FileSystemAnalyzer

I’ve finished some major updates to DiskDigger, as well as its companion tool FileSystemAnalyzer, to support a few more filesystems, some more obscure than others!

ReFS support

One of these filesystems represents a serious and substantial update: DiskDigger now has expanded support for ReFS, the Resilient File System introduced in recent versions of Windows Server and Windows Enterprise editions. ReFS remains totally proprietary and undocumented, so it required quite a bit of reverse-engineering to nail down the structures that it uses. I’m happy to report that DiskDigger now supports versions of ReFS starting from 3.0 (introduced in Windows Server 2016) through the very latest version 3.12 (in the latest insider build of Windows 11 Enterprise).

image

To be clear, DiskDigger had already been able to recover data from ReFS partitions by performing a heuristic (carving) search, which is independent of the actual filesystem on the disk. But now that it understands the data structures of ReFS, it can employ additional specific techniques to recover files more accurately from such partitions.


And on a lighter, more whimsical note, DiskDigger and FileSystemAnalyzer now support two other filesystem types that you’ll likely never encounter in everyday life:

RedSea filesystem

The RedSea filesystem was created by the late Terry Davis as part of his TempleOS operating system. If you’re not familiar with TempleOS, it’s an interesting rabbit hole to delve into. Literally an entire operating system built by a single person over the course of many years, TempleOS is intended to be “god’s third temple” in the form of an operating system, due to the guiding principles behind the operating system that Davis believed he was receiving from god. These principles are largely based around simplicity and purity, which is something that even the most hardened atheist like myself can appreciate. There is an expansive volume of videos in which Davis provides tutorials and explains the various features and design choices of TempleOS.

Terry was a troubled soul: he was living with uncontrolled schizophrenia which led to his eventual demise, and his videos occasionally contain some bizarre and horribly racist commentary, all of which make him more pitiable than admirable as a person. However, he was an undeniable savant at building an operating system, and I will defend the idea that we can learn something from his kernel, his compiler, and his insistence on simplicity. As a tribute to his work, I’m including support for the RedSea filesystem in DiskDigger and FileSystemAnalyzer.

The RedSea filesystem is, in many ways, the simplest filesystem possible:

  • All files are contiguous! There’s no concept of fragmentation.
  • There are no B-trees, no journaling, no symbolic links, no encryption, etc.
  • There’s no concept of clusters; block sizes are the same as sector sizes, i.e. 512 bytes.
  • Directory blocks are just a sequential list of directory entries.
  • For determining where to write new files, there is simply an allocation bitmap, where each bit represents whether the corresponding block is allocated.

image

One other interesting feature of the RedSea filesystem is that it performs a sort of semi-automatic compression of files, using a form of LZW compression. If you give a file a name that ends with a “.Z” extension, it will be compressed when it’s written to the disk, and then uncompressed the next time it’s read from the disk (transparently to the user). This compression is also supported in DiskDigger, i.e. files recovered from a RedSea partition will be automatically uncompressed.

Commodore 64 disk images

As another fun diversion, I also added support for Commodore 64 disk images (D64 files)! The file system on these disks is thoroughly documented, and is also very simple: files are represented as a linked list of blocks (a primitive “block chain”, as it were). If you have these disk images lying around, you can now peruse their contents!

image


As with all filesystems supported by FileSystemAnalyzer and DiskDigger, these additions are read-only, since these are intended to be tools for forensic analysis, and not intended for two-way interoperability.

Brain dump, October 2023

Here’s something that grinds my gears: waiters/waitresses at restaurants who insist on memorizing your order instead of writing it on a notepad. Why do they do this? Does the restaurant require them to have exceptional short-term memory, as if memorizing the order is somehow classier than writing it down? Or do the servers themselves feel so confident in their memory that they forego the notepad? It’s not impressive to me if you can memorize a list of items, and it’s infinitely more annoying if the order comes out incorrectly due to a failure of memory, or if the server comes back to double-check what I ordered. None of this is necessary.

In fact it’s mildly anxiety-inducing when the party at my table lists all the items they’re ordering, and the server does nothing except nod smilingly. It then becomes a minor miracle if the order ends up being fulfilled correctly, which I suppose is a payoff of sorts, but it doesn’t have to be. Just write it down.


Time for a small confession: I watch/listen to ASMR videos before falling asleep. ASMR is very much a real phenomenon, and I respond to certain ASMR triggers very strongly, although not as strongly as I did when I was younger. The first time I experienced it was all the way back in first grade: sitting at my desk in class, a voice started speaking over the PA system, and something about the sound or texture of the voice caused an overwhelming tingling sensation over an entire half of my body, to the point where I could no longer grasp my pencil with my hand to write legibly. This lasted for several minutes afterwards, and abated very slowly until I finally regained control of my hand. I wouldn’t say the sensation was either pleasurable or painful, just very curious and unusual.

It didn’t happen as strongly in subsequent instances, and eventually I stopped paying attention when it might have happened again. But in recent years I’ve rediscovered ASMR, thanks to a huge community of ASMR YouTubers who make videos that attempt to trigger these responses deliberately. And for me, certain types of triggers have a very relaxing, even therapeutic effect.

For my money, the best ASMR videos of all time are the “Departure” series, made by a channel called ASMRrequests. Even though there are only two “episodes” of this series, their combination of subtle, understated ASMR triggers with an engaging science fiction roleplay theme, as well as outstanding video production quality, makes them absolute genius-level videos, and I can admit to watching them again and again before going to sleep. Ally Maque, the young woman behind ASMRrequests, has explained that her partner at the time was responsible for the video production (and possibly the script?), but this makes the videos no less impressive. It’s a bit of a shame that the pressures and responsibilities of life seem to have put an end to any future episodes of Departure. If Ally is reading this, and wants to collaborate on additional episodes, hit me up!