Turing Welchman Bombe in BASIC
Posted: Sun Jun 14, 2015 12:23 am
I thought people here might be interested in this. I finally got a (simplified) version of the Turing Welchman Bombe running on my Orwell computer. I did a massive, rambling write up (with an equally rambling YouTube film) here: http://www.asciimation.co.nz/bb/
The BASIC code was just to see if my algorithm is correct. As far as I can tell it is but I don't guarantee it! It is hard coded to run the same menu they use at Bletchley Park on their real Bombe and my code does generate the same stops.
Unfortunately on Orwell it is incredibly slow! I figure it will take Orwell 4.8 months to do one Bombe run (which takes the real one 20 minutes). Currently I have had it running for 72 hours and 38 minutes and I am up to GMZ (it starts at AZZ and the letters go backwards, left most first).
My aim now is to make a desktop physical model of the actual Bombe with just the three indicator drums. I have ported to the code to C and it does a whole run in about 10 seconds on my laptop. The idea is to run it on a Rasp Pi 2 and make the model run the same speed as the real Bombe.
I've prototyped the hardware to do this, basically three steppers controlled by an Arduino. Next step it to get the code running in the Pi and get the Pi talking to the hardware.
Feel free to take the BASIC code and do what you like with it. Orwell runs modified MS BASIC so it will run on any machine running something similar without much modification needed. You can run it on an Apple 2 by changing (or deleting!) one line! I actually want to try ti on a real Apple 2 just out of interest and a friend has one lined up for me to do that. In the mean time you can use the online Javascript version here: http://www.calormen.com/jsbasic/
This code isn't optimized or pretty. I have no idea if my method is the best way. It's just the way I figured out to make it work. I am just pleased it does! Be interesting to see if it will run on other people's machines.
Simon
The BASIC code was just to see if my algorithm is correct. As far as I can tell it is but I don't guarantee it! It is hard coded to run the same menu they use at Bletchley Park on their real Bombe and my code does generate the same stops.
Unfortunately on Orwell it is incredibly slow! I figure it will take Orwell 4.8 months to do one Bombe run (which takes the real one 20 minutes). Currently I have had it running for 72 hours and 38 minutes and I am up to GMZ (it starts at AZZ and the letters go backwards, left most first).
My aim now is to make a desktop physical model of the actual Bombe with just the three indicator drums. I have ported to the code to C and it does a whole run in about 10 seconds on my laptop. The idea is to run it on a Rasp Pi 2 and make the model run the same speed as the real Bombe.
I've prototyped the hardware to do this, basically three steppers controlled by an Arduino. Next step it to get the code running in the Pi and get the Pi talking to the hardware.
Feel free to take the BASIC code and do what you like with it. Orwell runs modified MS BASIC so it will run on any machine running something similar without much modification needed. You can run it on an Apple 2 by changing (or deleting!) one line! I actually want to try ti on a real Apple 2 just out of interest and a friend has one lined up for me to do that. In the mean time you can use the online Javascript version here: http://www.calormen.com/jsbasic/
This code isn't optimized or pretty. I have no idea if my method is the best way. It's just the way I figured out to make it work. I am just pleased it does! Be interesting to see if it will run on other people's machines.
Simon