The Project Continues…
Okay – I rebuilt the computer from scratch. I tracked down a disk pack older than me, and revived a 40 year old disk drive that weighs more than I do just to read it. If you haven’t noticed, I’d really like to get this thing up and running with real software at some point!
As one happy side-effect of my aforementioned data recovery project (which ultimately produced nothing particularly interesting), I caught the eye of a former Cray employee on the other side of the world, and thanks to the perfect alignment of the planets, managed to get a my hands on an actual Cray Operating System backup disk! I’m talkin’ about the real deal here – COS 1.17, the last version Cray released of the ill-fated operating system. I even managed to get it quickly enough that my hacked-together disk reading machine was still intact! Using the recovery script someone kindly contributed, I was actually able to image the disk and recovery a (mostly-intact) 64 megabyte image of it!
Things I currently know about it….
1. The disk belonged to a single-processor Cray X-MP.
2. The disk was formatted with 512Bytes/sector, 32 Sectors/track, 823 tracks/disk (808 + spares), 5 head/cylinder
3. This disk was probably used to boot the Cray’s I/O Subsystem (IOS), which was a little stack-based control processor connected to the main CPU(s). The IOS then loaded the OS into main memory.
4. It looks like the OS is probably in binary format (not source code).
5. In many spots the file just says “MISSING” – that’s actually output from my decoding software where a valid sector wasn’t found.
6. Thanks to a helpful contributor (Thanks Jim!), it appears that at least part of the file system has been deciphered:
- Its big endian
- There is a structure that looks like this:
[START OF FILE]
4 BYTES; (Size of disk)/2
2 BYTES; (Size of section or file)/2
2 BYTES; Empty (0x00 0x00)
8 BYTES; Name of section
X BYTES; Data (you can get the size from the first two bytes)
I made a script to go through the file and look for that data structure, and then filter out all of the entries with size=0, and where the 8-Byte name field starts with a capital letter, only contains capital letters and numbers, and then ends in a string of all zeros (or is 8 letters/numbers).
For those who are interested, here is the output: cos_file_listing
7. It looks like the first ~640 kilobytes or so have IOS-specific code. The IOS just dumped an image of COS into the main CPU’s memory, and then brought it out of reset. The IOS-code looks like it follows the linked-list format listed above
8. The disk appears to contain (at least portions of) 2 separate COS images. One starts at address 0x009a040, and the other starts at address 0x02d0040. It looks like the first one is at least partially mangled, and likely incomplete. This might have been leftovers from being overwritten or something. The other one appears to be in pretty good shape, but it’s not clear if it’s *completely* intact. The first 16 (8-byte) words contain the starting ‘exchange package’ of the machine, that tells it to jump to offset 0x7FF0 (measured in 16-bit 'parcels').
9. Everything in the upper ~55 megabytes or so is just a counting pattern that is probably left over from disk formatting.
10. The data is ‘striped’ such that when laid out linearly as a 64MB image, it goes Cylinder/Head/Sector (i.e. the first 80 kilobytes is cylinder 0, the first 16 kilobytes is head 0, the first 512 bytes if sector 0). The data from heads 3 and 4 is pretty badly corrupted (~75% of sectors have issues, I think). I really need to upload the analog data to let people play around with it. From playing around with it, it looks like there is definitely significant improvement to be had.
I need your help! Where does that leave us now? Despite a bit of corruption, the disk looks mostly intact, and loading the image into a hex editor, I can see all kinds of fun ASCII and such, but I still need to turn this into actual files! If you’re an uber-hacker that loves a reverse-engineering challenge, help me bring this beast back to life by getting an OS for it. 1. Get the image! (Thanks Internet Archive!) 2. Start hacking! 3. If you make any progress, drop me a line (christopher DOT h DOT fenton AT gmail DOT com) and I’ll update this page. 4. For the first person to actually figure out the file system, I’ll personally print them a tiny Cray-1 replica on my Makerbot Thing-o-matic and mail it to them =)
Update: The amazing Andras Tantos has managed to recover the OS, and wrote a simulator to actually boot it! Read his write-up on the whole process here: http://www.modularcircuits.com/blog/articles/the-cray-files/