Virtual Colossus

The rebuilding of Colossus

Tony Sale’s rebuild of the Mark 2 Colossus, and the virtual rebuilds that followed.

Rebirth of Colossus

Before the 1970s, very few people had any idea that an electronic computer had been running during the Second World War, but information about Colossus finally started to resurface. Professor Brian Randell unearthed information about a machine that had run at Bletchley Park and wrote to the Prime Minister, Ted Heath, which led to the veil of secrecy being lifted in 1975, along with the release of several photos.

In 1989 Tony Sale (30 January 1930 – 28 August 2011) was an electronic engineer working as a senior curator at the Science Museum in London, restoring some early British computers. In 1991 he and a number of colleagues started the campaign to save Bletchley Park from property developers who wanted to demolish it. He became aware of how little was known about Colossus and began to gather information.

By 1993 he had collected the eight 1945 photographs of Colossus, as well as some fragments of circuit diagrams kept by some of the engineers. He began to believe it would be possible to rebuild Colossus from this information, although he said nobody else believed it could be done, just as with Tommy Flowers before him.

After three months transferring all the information from the photos and circuit diagrams to a CAD system, he found he had trouble working out exactly how the optical tape reader on the “bedstead” worked. Fortunately he was able to contact Dr Arnold Lynch, who had originally designed it in 1942. Together they re-engineered the reader to the original’s specifications. Along with Harry Fensom, one of the original Colossus engineers, he also visited Dr Allen Coombs, who engineered the Mark 2 Colossus from Tommy Flowers’ Mark 1. Coombs gave Tony his wartime notes and some circuit diagrams.

Using his own and his wife Margaret’s money, he started the huge task of rebuilding Colossus, putting together a team of ex-Post Office and radio engineers to help. In 1995 the American NSA was required under the Freedom of Information Act to release around 5,000 World War II documents to the National Archives. He quickly got a copy of the list and found it contained a number of documents written by American servicemen seconded to Bletchley Park, describing Colossus code breaking. These reports allowed many more of Colossus’s functions, circuits and switches to be rebuilt.

On 6 June 1996, His Royal Highness the Duke of Kent came to Bletchley Park to switch on the basic two-bit working Colossus rebuild. Dr Tommy Flowers attended, as did a number of people who had worked at Knockholt and in the Testery and the Newmanry during the war.

Colossus Mark 2, 1996–1998

By 1996 the basic functions of a Mark 1 Colossus were working, though at a 2-bit level out of the five coming from the paper tape. This showed not only that it was possible to recreate the 5,000-characters-a-second tape reading, but also that 45 to 50-year-old thyratron valves could still be coaxed into working.

By 1999 his team had a number of other functions working, including all five tracks and the lamp panel showing the counter outputs and wheel start positions.

Virtual Colossus begins

At this time large areas of the code-breaking work were still classified, but in 2000 the Newmanry report was finally declassified, giving details of many more circuit boards. How they were all connected together, though, remained a mystery.

So in 2001 Tony Sale wrote the first version of Virtual Colossus, to reproduce how Colossus ran its code-breaking procedures and test how everything worked together. He wrote it in JavaScript so it could run in a browser (the version of Internet Explorer available at the time) rather than as a separate application. It was written to run on a 600 MHz PC and was, at the time, still much slower than Colossus doing the real code breaking.

Screenshot of Tony Sale’s original Virtual Colossus
The original Virtual Colossus by Tony Sale. From www.codesandciphers.org.uk.

By 2003 the huge task of wiring up the K2 switch panel and all the thyratron rings that run the Chi wheels was complete, along with the additions needed for the Mark 2’s main speed-up over the Mark 1, the “R” signals or remembering circuits.

Tony upgraded Virtual Colossus to a Mark 2, complete with all 12 rings and the patch panels. With this, and Walter Fried’s weekly reports in the NSA archives, he worked out which algorithms were needed to break the Chi wheel settings on a real cipher text, so the team could try to reproduce them on the real rebuilt Colossus.

In December 2003 the team were finally getting reliable counts on the (1+2)=. algorithm for setting K1 and K2, the 4=5/1=2 algorithm for setting K4 and K5, and the slash (/) count for K3, using a re-encipherment of a real German decrypt.

They had a more or less fully working Colossus Mark 2 by 1 June 2004, the 60th anniversary of the first running of a Colossus Mark 2 at Bletchley Park in 1944.

Tony Sale sadly died on 28 August 2011, but his legacy can be seen running, and still maintained, in H Block at The National Museum of Computing at Bletchley Park, in the room where Colossus No. 9 stood during World War II. It’s an amazing sight and well worth a visit: you can see how massive the machine is, feel the heat coming off its many valves and hear the clicking of the relays and the tape as it runs.

In 2005 Tony Sale made a number of video podcasts on his website, www.codesandciphers.org.uk, demonstrating the Colossus rebuild. As these videos were in Flash format, which was removed from most web browsers at the end of 2020, I have made them available on YouTube. These videos taught me a lot about how all the controls on Colossus work.

Rebuilding the virtual rebuild

I am a computer programmer, living and working in Milton Keynes, which is fortunately close to Bletchley Park.

In 2016, after a number of visits to The National Museum of Computing at Bletchley Park to see Colossus, I was excited to find there was a website where you could run a virtual version of this amazing machine. Unfortunately it didn’t work very well in current browsers. I managed to download the files and make a few adjustments to get it running in an older version of Internet Explorer*, but the interface had a few problems and took a while to update when switches were changed.

* It’s not simple, but to run Tony Sale’s simulation you’ll need to find a version of Internet Explorer. On a Windows PC, try typing “internet explorer” in the search bar; you may find you still have it hidden away. Go to Tony Sale’s version of Virtual Colossus and press F12 to open the developer tools. Go to the Emulation tab and choose IE version 7 in the Document mode list.

I was interested enough in the amazing story of Colossus to want to find out exactly how the machine broke codes, so I bought a number of books on the subject (see further reading) and started working through the JavaScript to find out exactly what it was doing to decipher the German cipher text.

Tony, with foresight I think, had made the code available to look at. As he says in his documentation, “The Javascript is all there for anyone to see in the download.” So I was able to work through the details of how it worked.

At this point I started to worry that, as it no longer seemed to work in current browsers, someone might one day say “this page doesn’t work any more, let’s remove it from the website”. The Virtual Colossus code could be lost, and I felt it was just as much a part of the story of the rebuild as the physical machine itself and all the stories of breaking Lorenz.

I decided to try a rebuild project myself and, using Tony’s main logic engine as a basis, began bringing the interface up to date using today’s faster internet and graphics.

Screenshot of Virtual Colossus 2D
Virtual Colossus by Martin Gillow, 2016. Run Virtual Colossus 2D.

I have kept the code readable and not minified, in keeping with Tony’s original vision. While it is not 100% complete, it’s enough to run the main algorithms and get a feel for what this amazing machine does. I hope it brings it to life for you if you’re not able to see the real rebuilt Colossus in person.

Virtual Colossus 3D

In 2020, after creating a number of other virtual simulations, I saw a simulation by Peter Onion, who also volunteers at The National Museum of Computing, of the Elliott 803B that he looks after and keeps in working order. His simulation was in 3D, so you could look around the whole console and press the buttons virtually. This, I realised, could give a much better way of learning to use Colossus than a flat-screen simulation, so I set to work. I wanted to see whether computers and web browsers had moved on far enough to run it just in a browser.

Using a JavaScript 3D engine called three.js, and the free, open-source 3D creation application Blender to create the models, I began to learn how to work in 3D.

Screenshot of Virtual Colossus 3D
Virtual Colossus 3D by Martin Gillow, 2020. Run Virtual Colossus 3D.

Virtual Colossus 3D was released on 1 December 2020.

Next: further reading.