Booting from a vinyl record

Most PCs tend to boot from a primary media storage, be it a hard disk drive, or a solid-state drive, perhaps from a network, or – if all else fails – the USB stick or the boot DVD comes to the rescue… Fun, eh? Boring! Why don’t we try to boot from a record player for a change?

64 512 byte DOS boot disk on a 10″ record, total playing time 06:10 on 45 rpm

Update February 2022: Click here to observe the very same vinyl ramdisk booted on an IBM PCjr!
So this nutty little experiment connects a PC, or an IBM PC to be exact, directly onto a record player through an amplifier. I made a small ROM on-chip boot loader that operates the built-in “cassette interface” of the PC (that was hardly ever used), which will now be invoked by the BIOS if all the other boot options fail, i.e. floppy disk and the hard drive. The turntable spins an analog recording of a small bootable read-only RAM drive, which is 64K in size. This contains a FreeDOS kernel, modified by me to cram it into the memory constraint, a micro variant of COMMAND.COM and a patched version of INTERLNK, that allows file transfer through a printer cable, modified to be runnable on FreeDOS. The bootloader reads the disk image from the audio recording through the cassette modem, loads it to memory and boots the system on it. Simple huh?

The vinyl loader code, in a ROM
(It can also reside on a hard drive or a floppy, but that’d be cheating)

And now to get more technical: this is basically a merge between BootLPT/86 and 5150CAXX, minus the printer port support. It also resides in a ROM, in the BIOS expansion socket, but it does not have to. The connecting cable between the PC and the record player amplifier is the same as with 5150CAXX, just without the line-in (PC data out) jack.
The “cassette interface” itself is just PC speaker timer channel 2 for the output, and 8255A-5 PPI port C channel 4 (PC4, I/O port 62h bit 4) for the input. BIOS INT 15h routines are used for software (de)modulation.
The boot image is the same 64K BOOTDISK.IMG “example” RAM drive that can be downloaded at the bottom of the BootLPT article. This has been turned into an “IBM cassette tape”-protocol compliant audio signal using 5150CAXX, and sent straight to a record cutting lathe.
Vinyls are cut with an RIAA equalization curve that a preamp usually reverses during playback, but not perfectly. So some signal correction had to be applied from the amplifier, as I couldn’t make it work right with the line output straight from the phono preamp. In my case, involving a vintage Harman&Kardon 6300 amplifier with an integrated MM phono preamp, I had to fade the treble all the way down to -10dB/10kHz, increase bass equalization to approx. +6dB/50Hz and reduce the volume level to approximately 0.7 volts peak, so it doesn’t distort. All this, naturally, with any phase and loudness correction turned off.
Of course, the cassette modem does not give a hoot in hell about where the signal is coming from. Notwithstanding, the recording needs to be pristine and contain no pops or loud crackles (vinyl) or modulation/frequency drop-outs (tape) that will break the data stream from continuing. However, some wow is tolerated, and the speed can be 2 or 3 percent higher or lower too.

Bootloader in a ROM; being an EPROM for a good measure

And that’s it! For those interested, the bootloader binary designed for a 2364 chip (2764s can be used, through an adaptor), can be obtained here. It assumes an IBM 5150 with a monochrome screen and at least 512K of RAM, which kind of reminds me of my setup (what a coincidence). The boot disk image can be obtained at the bottom of the BootLPT/86 article, and here’s its analog variant, straight from the grooves 🙂

66 Replies to “Booting from a vinyl record”

  1. hi!
    a very cool project!

    btw, have you reverse engineered the intersrv/interlnk protocol
    or are able to reverse it? it would be very cool to have an intersrv
    windows or linux server (and a DOS client).

  2. Size-wise, do you think it would be possible to cram a 3COM packet driver and tFTP implementation in the same EPROM? There don’t appear to be any netboot/etherboot implementations that work on an 8088, as they expect to download a whole floppy disk image into an extended memory ramdisk requiring at least a 286 processor.

    1. Certainly not within 8K, which is what the 5150 expects in its expansion socket, however, inside a 27512 (64K) in a dedicated NIC might be a different story. I have an “Earthstation” V20-based diskless workstation that contains its own BIOS inside the same 64K EPROM as its bootable ArcNET Novell Netware + CBIS Network O/S network stacks. Sure, that predates Ethernet, however, the same rig was later offered with an Ethernet stack.

  3. So you are still using the IBM BIOS provided INT 15h routines for the cassette, and your boot loader ROM is hooking INT 19h for IPL and you have a second boot loader that creates a RAM disk (C: ?) and writes the FreeDOS boot files there? Pretty slick.

    If that’s the case, any system BIOS that supports INT 15h cassette could also work as well. Have you tried GLaBIOS (glabios.org)? It’s an open source BIOS that supports cassette on original PC too.

    1. It’s actually only one bootloader, the one I put in the BIOS extension ROM. It allocates a 64K segment for the vinyl record data at RAM top, which is then deducted from the available memory, before passing control to DOS. It also installs an INT 13h handler so that it simulates floppy read accesses on said data segment (check out the BootLPT/86 code); the physical A: floppy drive, if present, is set to function as B:. DOS itself does not know it is a RAM drive.
      Right before boot, the first 512 bytes at the loading location (the boot sector) is copied to the standard 0000:7C00h location and a jmp far is done, simulating BIOS INT 19h. The interrupt itself is not used – actually, anyone (or anything) invoking INT 19h would cause the BIOS to read the 1st sector from the physical A: floppy, doing a normal boot.

      I did not test GlaBIOS as I don’t have the BIOS ROM chip in the 5150 socketed, and I only have one single 2364-to-2764 adaptor for the option ROM socket.

  4. would it be able to modify to make use of the audio in on the sound blaster and compatible cards?

    1. The disassembly of the IBM PC BIOS is freely available, incl. the software cassette modem, utilizing the programmable interval timer for the “audio” input. If you have code access to the sound card input, you should be able to implement a simple demodulation routine.

  5. Fascinante seu trabalho em demostrar como o DOS é possível ser iniciado pelo disco de Vinil nunca imaginei que realmente seria possível tal procedimento, já consegui dar o boot do Ms-DOS 6.22 apartir de um USBDRIVE usando o MULTIBOOT YUMI em um pc de 64 bits foi muito legal.

    1. Toš ďakujem za pochvalu 🙂 Užitočné to moc neni, ale jeden sa pri tom zabaví. DOS 6.22 do toho image, žiaľ, nezmestím. Kvôli realmode segmentácii je maximálna veľkosť image obmedzená BIOSom na 64K a to hneď zožerú pochutiny ako IO.SYS, MSDOS.SYS, COMMAND.COM…

  6. Hi, this is more than great!

    Just one question: How did you manage to copy the information to the vinyl? To my knowledge this is far from straight forward.
    CU Felix

  7. I have a turntable connected to my PC through a USB can it be used? Where can I get the vinyl?

    Great work and the sound reminded me my old ZX Spectrum days

  8. This is so cool. Love it. Geeky dumb ass that I am, I cannot resist the challenge. I must (must, must, must) do this using not the turntable (similar to the Audio Tecknica that I own), but an Edison gramophone.

  9. You can add some error correction to the encoding to help deal with pop and crackle.

    A simple scheme will fit very snugly as a decoder as well, but those details depend upon the actual distribution of the errors.

    Very very cool project!

  10. I LOVE this.
    Further possibilities: allow boot off the microphone input. Learn to whistle, sing a song, or conduct an orchestra, the resulting melody of which encodes the kernel. Bonus points if you can make it work to the tune of “Inna gadda da vida”.

  11. Didn’t the stock 5150 ROM have cassette support, but only via BASIC? If it didn’t find a bootable floppy it dropped you into IBM cassette BASIC.

    Or was that the PC Jr?

    1. Most* of the PC lineup sold by IBM would go into Cassette BASIC if no bootable disk was found including some members of the PS/2 lineup. Only the 5150, PC Jr, and JX (improved PC Jr for Japan, Australia and New Zealand) were PCs from IBM with cassette ports.

      All 3 machines had INT 15h BIOS support for the cassette port which any program could have used. BASIC did it by default and there were a couple of non-BASIC programs that also called INT 15h cassette routines. 5150CAXX does it. There were also some BASICODE related programs that would use BIOS INT 15h for handling files at normal IBM cassette
      speeds in addition to having their own modified cassette routines to deal with the BASICODE cassette format.

      * I am not checking if something like the XT/370 with mainframe cards would fall back into ROM BASIC.

  12. Fantastic stuff. Why was a custom BIOS necessary. Did the original IBM PC BIOS not support the cassette interface?

    1. The BIOS is completely stock and has not been modified. However, the ROM chip that you see, was plugged into the empty “expansion socket” next to the BIOS chips, to override the PC boot process. This allowed the PC to try booting from a floppy/hard drive first. And only after that failed, the vinyl boot was offered – whose code is a part of the ROM.

      Of course, the vinyl bootloader would happily run from a disk drive. However, that would be considered cheating, as the PC would need to boot from a disk first – only to offer vinyl booting afterwards.

  13. Hi,
    this is nuts, you are awesome for doing well. One question though, how did you press the vinyl? Could you please release its content as a 1411 kbit/s FLAC file?

    LG Jochen

    1. Yes, the FLAC can be downloaded in the last paragraph of the article; the vinyl has been cut by a third party.

      Regards

  14. As a programmer by day, and turntablist by night; this tickles both my nerd fancies hilariously. You rock for doing this.

    I have a very serious question, though; from the turntablism side – how the heck did you get a press of that? I imagine obviously getting the source

    Is it just a dubplate? Do you have a friend with a lathe or something? It’s the #1 lingering question in my mind post reading this awesome article.

    1. Oh, one more thing – is there enough volume differential between the cassette and the vinyl that the signal modification is necessary?

      Would doing these signal modifications (amplitude aside, if the medium prohibits it) on the recording manually using an equalizer, etc; before it is pressed to the vinyl reduce the need for this post signal modification? Just curious.

  15. Can you imagine in the middle of ’80 a Polish GOVERNMENT radio station broadcasted programs for ZX Spectrum, Atari, Amiga to the air?
    “Your taperecorders on: 3, 2, 1, go!”

    1. There were such broadcasts in the 1980s in East Germany. The official youth radio station named DT64 had a show called Computer Club and they were broadcasting homecomputer programms over the airwaves so enthusiast could tape them. And there were vinyl editions for those who missed the transmissions.

    2. That happened in Sweden too. I don’t think I managed to get the programs running though.

    3. There were broadcasts of Spectrum games from the national broadcaster in Ireland too around that time – I had a Spectrum 128K +2. Might have been 1986/1987

  16. Thanks a lot for the story. Takes me back to the first Sinclair ZX -81 (?) computer kit that I built in my attic, and then later with my VIC 64 using cassette of course.

    1. Record lathes don’t typically cut vinyl, even though everyone calls it vinyl because mass-produced records are pressed from vinyl. Is it nitrocellulose lacquer or polycarbonate?
      (Asking because I have cut records myself.)

Leave a Reply

Your email address will not be published. Required fields are marked *