2024-02-13

The original WWW proposal is a Word for Macintosh 4.0 file from 1990, can we open it?

The W3C has a page with the original WWW proposal from Tim Berners-Lee. One of the downloads says 

The "I can't test it" made me sad. There are two other files (an RTF version and an HTML version generated in 1998 from the original file). But can we open the original document?

The original document is 68,608 bytes and file on my Mac says it's a Microsoft Word for Macintosh 4.0 file. That matches with TBL's note on the W3C page saying: "A hand conversion to HTML of the original MacWord (or Word for Mac?) document written in March 1989 and later redistributed unchanged apart from the date added in May 1990." 

Microsoft Office for Mac came out in 1989 with System 6.0. That was Microsoft Word 4.0 so we're looking for compatibility with Microsoft Word for Macintosh 4.0. Let's see what modern software can open this. What I really want to be able to do is open it and convert it to, say, PDF with high fidelity.

Microsoft Word

Let's begin with Microsoft Word itself. I uploaded the file to Microsoft OneDrive with the extension .doc and clicked on it to open it in Microsoft Word.

Apple Pages

I switched to the Mac and hoped that Apple Pages might understand an old Microsoft Word for Macintosh file. No such luck.

Apache OpenOffice

Next let's hope open source software will come to the rescue. I downloaded the latest Apache OpenOffice and it did open the file but the formatting is gone and the diagrams are missing.


LibreOffice

OK, maybe I need different open source software, so I switched to the latest LibreOffice and it opened it. And the diagrams are crisp! Although there's something weird about the margins and there are other formatting problems.


CERN PDF

CERN makes available a PDF version of the proposal which was apparently created in 1998 using Acrobat Distiller Daemon 2.1 for SunOS/Solaris (SPARC). It has 20 pages. The LibreOffice imported version has 24 pages. 

To get an overview of what's different I created a PDF from the LibreOffice version and then looked at it and the CERN PDF in the contact sheet version in Apple Preview.

Here's the CERN PDF:


Here's the LibreOffice-generated PDF:


Things that are different:

1. The right-hand margin is missing in the LibreOffice version.

2. The LibreOffice version is using 14 pt vs. 12 pt for most of the text.

3. The LibreOffice version has turned headers with TBL's initials in them into footers.

4. The page breaks look in the right places (see how the images are correctly placed towards the end); thus it's probably the font size that's the biggest problem.

5. There CERN PDF has a space under the heading and the LibreOffice version does not.

Emulation

To make sure that I knew what the actual original document looked like I decided to use Infinite Mac to boot a 1990-era Macintosh and run actual Word for Macintosh 4.0 on the original document.


That way I can see actual fonts, font sizes and layout to confirm how the document should have looked. And that's where it became obvious that the original document on the original Mac and the CERN PDF are quite different. The CERN PDF has 20 pages. On the Mac running Word for Macintosh 4.0 with A4 paper it has 22 pages. So I decided to aim to get us close to the original document on the Mac.


So... set to A4 paper and set right margin to same size as left margin. Change the first page format to be different since it doesn't have the same gutters, footers or headers. Manually change the body text from 14 pt (and other sizes) to 12 pt. Manually deal with text that breaks across pages incorrectly and other alignment problems. Fix the footer that should be a header.

In the end I got pretty close to what's visible on the Mac. 

Conclusion

Converting this document from its original format was a bit of a victory for open source software. And a lesson in how hard document preservation is. To help preserve it a bit, and in an open format, I've uploaded my .odt version to GitHub here. It's interesting, and a little disheartening to see that this 34 year old document is difficult to open, and even when opened the resulting output isn't exactly the same as the original.

PS If you're wondering why I ever started this project. I just wanted a high quality version of the diagrams in the original proposal for a presentation. Took me a lot longer than I thought it would.

PPS A comment on Hacker News pointed out that I could probably either create a PostScript file or a PDF via an emulated Mac. I was able to boot another Mac (System 7) that had Word from 1992 and Print2PDF (a driver that creates a printer that makes a PDF file) and print directly from Word for Macintosh 5.1a.


I've added the generated PDF file to the GitHub. This version has 20 pages and the fonts are different but it does meet my original requirement of a PDF.

PPPS A Hacker News comment links to another conversion done using different versions of Word and bit of fiddling around to get a really nice version of the document in modern formats.

2024-02-04

Repairing (sort of) a Dyson fan remote control

I have a couple of fancy Dyson fans that do cooling (or at least blowing air around) and heating. They use a little IR remote control that attaches to the top with magnets. One of the remotes decided to stop working; its failure mode was: consume an entire CR2032 battery in a few days. Apparently, I'm not alone in experiencing this problem.

Before seeing if I could repair it, I made a backup of the IR codes from the remote using my Flipper Zero:

Dyson were good enough to replace the remote but I began to wonder why this was happening and so I opened it. Here's the little circuit board inside. The pads are the underside of the buttons.


Using a multimeter I discovered that the resistance across the battery terminals was 2.5kΩ when I was expecting it to be very, very high or even infinite.

And that the remote control was drawing 1.1mA when doing nothing. 

A quick check of Ohm's law gives I = V/R, I = 3V/2500Ω, I = 1.2mA. Close enough. 

The capacity of a CR2032 battery varies a lot from manufacturer to manufacturer but seems to be between 150mAh and 250mAh (roughly). At 1.2mA constant current that's between 125h and 208h to drain the battery (about 5 to 7 days). 

But why was there 2.5kΩ across the battery? The culprit is the capacitor C1 which is in parallel with the CR2032. It's decided that it would prefer to be a resistor! Sometimes capacitors fail like this.

Aside: why is there a capacitor in parallel with the battery? Almost certainly because it's the capacitor that powers the remote when a button is pressed. Most of the time no button is pressed and the capacitor will sit charged fully. When a button is pressed a load is applied to the battery/capacitor combination and it's the capacitor which will provide the needed current. This will likely prolong the life of the battery as it will slowly charge a capacitor and not have to provide a sudden larger current when a button is pressed.

I didn't have a spare surface mount capacitor around so I simply removed C1. With C1 removed there's no current drain when idle and the remote works fine. Unfortunately, Dyson didn't design the remote to be opened and so the case didn't survive. Also, I'm sure I've shortened the life of the CR2032 battery by removing C1, but at least it'll last longer than a week!

I fixed the remote up so I could use it by printing a picture of what it should look like and taping the paper into place. You may also notice the small felt pad. That's there to make it pleasant to hold prevent you from being stabbed by the mechanism that connects to the +ve terminal of the battery.


As good as new! Or at least it works and I can keep using the fan until the replacement Dyson is sending arrives.

2024-01-17

My daily driver is older than I thought; it's positively vintage!

I was doing some clean up on my main laptop and realized it had been a while since bought a new computer. Turns out it was a lot older than I thought:

Apple considers this machine to be vintage but I don't have any compelling reason to upgrade it. Apple still supports it in macOS (although I can't upgrade beyond macOS Ventura), all the hardware works, and I haven't run out of disk space (although I did have to offload all the the work on Behind The Screens to an external drive because of their size).

But there is one thing I hate about it: the bloody Touch Bar and its phony ESC key. I thought I'd get used to the Touch Bar but it turns out I didn't. 

This is the longest I've ever owned a laptop without upgrading and I think that comes down to a few things. Firstly, I spend most of my time on this machine either in a web browser, or using a terminal to SSH to somewhere else. Secondly, the most powerful program I tend to use on it is Final Cut Pro but my videos tend to me short and not particularly complicated to output.

So, a combination of Apple's hardware and software holding up and a lot of my computing needs being offloaded to the cloud means this old machine is banging along nicely.

PS If you're interested in a really vintage machine, read about my complete restoration of an IBM ThinkPad 701c (the one with the butterfly keyboard).

2023-12-27

Compression of the lyrics of the "12 Days Of Christmas"

Eleven years ago I blogged about a solution to the "Never Gonna Give You Up" compression code golf challenge: what's the smallest program that output the lyrics of Rick Astley's phenomenon? My solution was 589 bytes of Perl that looked like this:

$b=<<E;
 gÐngÑveÒe >ÓthÔouÕo Önd× yÕØÖloÙiÑ Út's Û(OohÜe'reÝ
YÕÞ knowß,ÐivàÚoá I'm â tÖsãtell ä a× åØ æeåçay it
è äértØêß ëÐonna ì oÔer íæupîmakeæïÛbeen ðëÔÓñÕ'rÓtoÖòeî)
óeÒrìô
We'Òßõ
NôöóÜ÷ôgiÒø howâfeeliÑ
ù
Nøú÷)ú, nø
(Givû
I just wannaéyÕùGotta ïu×ersta×
þü eachífor sÙÑÞr hearðachÚbut
YòshyãèInsidÓwÓboÔëwhaðgoán
WeñgamçwÝìplèýúîöletædownörun arÕ×ådeseêöïcryösayÐoodbyeöäa liçhuê
þWÝ nÖstraÑers tÙÒÞñrulesåsÖdÖI
A full commitmenÛwhatâÔinkáfÞ wÕldn'tÐet Ôis from anyíguyüõnýA× 
ifæask meùDon'témÓyòbli×ãee
þþ
Üà÷àûûóõýüþþ
E
map{($a,$b)=split($c=chr,$b,2);$b=~s/$c/$a/g}(208..254);print$b

The $b variable contains a dictionary where the index is made up of ASCII characters above 128 and the single line of Perl code at the end substitutes the dictionary entries until the full lyrics are output.

I wondered about using the same technique on the "12 Days Of Christmas" as there's a lot of repetition but the song is longer. "Never Gonna Give You Up" is 1,872 bytes and "12 Days Of Christmas" is 2,386. Using the same technique results in this 479 byte Perl program that outputs in the "12 Days Of Christmas":

$b=<<Z;
enÙ tÚ
TÛs,Üe ÝingÞÙ ßvÝgà druás a-âÞ,ãdâäevßåpãæmmãçOnÚhÝè.
èééfêéeëétìésí
NinÝladies dancãþî partridgÝin a pearÚreeïßloräleaæîð day of ChristmaÜ
myÚruÝloàavÝto meñdñòthñónóôóÛõeveôöÛwoÚurtlÝdoveÜ
And aï÷
Elåpipers piæÛðøÛhreÝFrÙch hÙÜ÷ù
Four callÞ birdÜùú
FiàoldßrÞÜúû
Six geesÝa-layãûü
Såswanâswiçüý
Eight maiämilkãýþèfirstñ
Aïíeconò÷ìhiròùêouróúêifóûíixóüíöýëighóþéniôîìÙõðëlöøìwelfõwelveámmersáçø!
Z
map{($a,$b)=split($c=chr,$b,2);$b=~s/$c/$a/g}(217..254);print$b

2023-12-19

Complete restoration of an IBM "Butterfly" ThinkPad 701c

Just over a year ago there was a discussion on Hacker News about the IBM ThinkPad 701c (the one with the lovely folding "butterfly" keyboard). In particular, it was a discussion about the incredible web site 701c.org which gives very, very detailed instructions on how to dismantle, restore and preserve those lovely machines.

In the discussion a chap said: "I have two in non-working condition, pretty beat up. If I can make someone really happy and they want to restore them, feel free to send me an email. I wanted to do it myself for the last 10 years it so but realistically know I won’t. I’m based in NL." And I figured, he's not too far from me, maybe I could get them and create one restored machine from them.

A year later my fully restored (and memory upgraded!) IBM ThinkPad 701c is finished. Here it is:

It was a long journey to get here. I've written before about the painstaking operation to repair a damaged ribbon cable for the pointer. 

This blog post is a deeper dive into going from these two machines (see below for representative pictures of the mess they were in) to the picture above. Everything I know about restoring this machine came from the 701c.org website and a couple of emails with its creator. Without him this would not have happened. Thank you!




As you can see everything is a mess. The batteries have leaked and damaged the cases, screws are missing, parts are warped, covers are missing, the rubberized paint has become a sticky mess. But at least one of the keyboards seems to be OK (but see above about the ribbon cable!).



One of the machines would actually power on with nothing on the display. The other was totally dead. Time to dismantle the two and see what's salvageable.

Dismantling 

The 701c.org site and the IBM manual and video it links to have detailed instructions on how to take these machines apart. As I took them apart case pieces that had been soaked in battery goo just broke away in my hands. So taking them apart was a slow and delicate operation. Here are some internal pictures during that process.


One of the machines was an IBM ThinkPad 701cs (which has a less capable screen than the 701c). In addition, the screen frame just cracked apart as I was removing it. But it did have a working modem:


Both machines had extensive damage from the batteries having leaked:



The state of the batteries once I had managed to remove them from the cases:



This battery goo had damaged one bottom case to the point that it was crumbling in my hands. Luckily, the other case had survived:


Between the two machines I had enough pieces to make a single machine. The major case parts were there (they "just" needed stripping and repainting) and I had a complete set of screws as well. The screws matter because some of them are T1 torx screws (not something you want to mislay). 

Before trying to see if I could get the machine to boot into anything I first needed to clean up the battery mess.

Cleaning up battery leakage

As you can see above the batteries had leaked inside the laptops and made a mess. Via a very slow process of using 90% isopropyl alcohol (IPA) and a sharp tool and a toothbrush all that material was removed and with a multimeter I was able to verify that all the connections were good and there were no shorts.

In the end the terminals ended up looking something like this:


You can see how the metal has been damaged but luckily the connectors are still intact. I also washed all the circuit boards with 90% IPA and replaced the old Kapton tape. Since I was going to end up building a frankenmachine I stuck coloured stickers on parts. Throughout the photos you'll see little red and green stickers indicating which original machine the parts came from.


Why no screen?

One question that got immediately answered on dismantling the machines was "Why does one machine power on but have a blank screen?". Answer: because someone has completely removed the screen connector. I suspect one machine might have been used as a source of parts at some point.


Happily the other machine had a cable and so I was able to take multiple parts from different computers and create something that starts.

Finding a combination of parts that work

On first boot the frankenmachine complained about three things: memory, date and time and CMOS.


All of those things are actually symptoms of the same thing: the CMOS battery is dead and has lost settings and the machine has lost its way. But it's a simple fix! Hitting ESC allowed me to run diagnostics on the machine:


It had a lot to complain about but was bootable and even managed to get into Windows 95 (for a while). It would subsequently crash because there was a problem with the machine not knowing how much RAM it had (8MB!).

Fixing the CMOS battery

To stabilize the machine it was essential to replace the CMOS battery. It's pretty simple fix (see the 701c.org page for details).

Old battery before removal:


New battery installed:


(It was also around this time that I did the delicate ribbon cable repair for the keyboard) With the new CMOS battery in place the machine was no longer complaining about CMOS troubles.


And a run through the configuration utility and the machine was 100% stable and usable. Which brought me on to the most painful part of the operation: stripping the paint off the case. At was at this point that I began to question ever having started this project.

A total pain: stripping and repainting

Once again the 701c.org site will really take you through the process, but it's a lot of work. I couldn't get the same stripper and paint as I'm in Europe so I ended up using Tamiya TS-6 Matt Black Spray Matt and Tamiya TS-80 Flat Clear Spray Matt for the case. I stripped it using BRUTUS graffiti and paint remover.

I highly recommend having a pack of different grades of sandpaper and plastic razor blades.

Rubberized paint bubbling from the graffiti remover.


Scraping off rubberized and dissolved paint using a plastic razor blade.


Time for sanding after scraping and graffiti remover seems to have done its job.


Masking before spraying.


Mid-spraying. I put on three coats of the black paint.


Left to dry for at least 48 hours.


Once painted and dried the case needed the decals re-applied. But along the way there were little touchups like re-chroming and recolouring the IBM logo for the lid.


And repairing the cover for the memory slot by gluing in place a little piece of plastic to replace the broken latch. And so on and so on.

Decals

I bought a pack of decals from 701c.org and there make a huge difference. You just have to apply them very carefully. If you're old enough to have used Letraset you'll be fine here. But work slowly and carefully.


Final reassembly

On both machines the metal that connects the keyboard to the bottom case had broken off. Once the battery leaks and swells it applies pressure to this joint and destroys it. Here I glued it back into place with epoxy and carefully melted what little plastic dots I could to hold it into place.


The screen can be reassembled as a single unit.


You'll notice here a PCMCIA Ethernet adapter in place. I bought from eBay a complete set of accessories: docking station, cables, floppy disk drive and this PCMCIA card.


There are a whole load of small but important things that have to be done in re-assembly: glue the speaker back in place, reinsert the battery lock and its tiny spring, insert the spring and cover for the power button, don't break anything. But you can follow the 701c.org disassembly instructions in reverse.

A final boot test before final reassembly. Just complaining about the lack of keyboard.


Once fully reassembled I had a fully working Windows 95 machine. 



But who can resist an upgrade?

A memory upgrade

The machine came with 8MB of RAM but is upgradable to 40MB. Happily, it's possible to buy the needed 32MB SODIMM on eBay. Just a simple matter of slipping it into the slot on the motherboard that's accessible from the back.

The SODIMM in place.


Yes, 40MB!

What's next?

Well, I haven't replaced the sleep battery (apparently, there's a company in Hungary that makes a replacement but they won't ship outsider Hungary). And I can live without the sleep memory mode and I actually disabled hibernate in the BIOS.

And I haven't replaced the main battery. I have all the parts but need access to a large 3D printer to print the case. One day.

And the machine doesn't have access to the Internet with this version of Windows 95. It has a helpful file called Internet.Txt that tells you what the Internet is! But it does have a modem and PCMCIA Ethernet so should be doable.

But, I'm ready. 

So with this machine I'm ready.


So ready for 1995.

(If you really like retro computing I have a whole web site just for that: Two Stop Bits).