August 2014

NIGHTMARE #6

One of the disks that came with my Apple ][ clone contained a little game called Nightmare #6. At the time it completely stumped me, there seemed to be no way to beat the game. I’d worked out that a move consisted of two letters, no more, no less, and that it was possible to lose points quite quickly, and also possible to not lose points, but I never worked out how to actually gain points.

For some reason I thought of this game again the other day, tried to find it. This was not easy, but plenty google later I found it in the Apple Software Bank Volume 1.

Of course my BASIC is better than it was in 1980. I learned that:

  • You get eleven moves
  • Each move consists of two letters
  • Using the same letter twice gives you a “nightmare #6”, which doubles the amount of points you lose on the next wrong move
  • Re-using the first letter of a previous move gives you “super zonk”, which quadruples the amount of points you lose on the next wrong move
  • Any other move gives you no points, except when the value of the two letters (A = 1, Z = 26) add up to a multiple of ten.
  • If the letters add up to a multiple of ten, you score that value, and the score associated with the second letter is set to this same value.

So, NZ (14 + 26 = 40) is a valid move. So is OY, PX, QW, RV and SU. After playing these, you can’t re-use N, O, P, Q, R or S, but U, V, W, X, Y and Z are all set to 40, so UV, WX and YZ are legal moves for 80 points each, and leaves V, X and Z set to 80.  VZ and XZ give you 160 points each, finishing the game with 1880 points out of a (claimed) possible 2080 points.

So I thought about it some more. Realised that while NZ is a good place to start, XZ (24 + 26 = 50) is better. Of course this means that PX is no longer a legal move, you can’t play the first letter again. OY, QW, RV and SU are still good for 40 points each, and YZ, WZ, VZ and UZ give 90, 130, 170 and 210 points (because the point value of Z increases every time). But this is only nine turns, and we need eleven. Fortunately we still have J (= 10) and T (= 20) to play TZ and JZ, for a total score of 2280 points.

I still don’t know how the author got to the “possible 2080” points.

Screen capture of end of Nightmare #6, with 2280 out of a possible 2080 points.

 

Oh yes, and this is why I’m with Jason Scott — we’re not huge Wikipedia fans because they delete perfectly good information.  Someone took the trouble to write something about Nightmare #6, and noted that it is possible to get more than 2080 points, but the editors decided that “WP is not a videogame guide“.

 

 

 

 

Truecrypt and physical hard drive errors

So you have a hard drive encrypted using Truecrypt. A very good solution to keeping data secure, but it does make your data more fragile. When* the drive goes TU, you can’t just run a recovery program on it, because encryption.

And of course so it came to pass. My hard drive developed read errors.

First thing, make a backup copy. For this you need a Linux box and ddrescue. And a large drive to recover to.

# ddrescue /dev/hdb /mnt/large-disk/diskimage /mnt/large-disk/logfile.log

(This takes a while, but when it’s done you can unplug your faulty disk, save it as much trauma as possible)

You now have an image of the whole disk. You want an image of the partition.

# fdisk -lu diskimage

Disk diskimage: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x2fa13928

Device Boot      Start         End      Blocks   Id  System
diskimage              63   976768064   488384001    7  HPFS/NTFS

Your partition starts at “Start” x “Units”, which would be 63 x 512 = 32256 in this case.

# losetup -o 32256 /dev/loop0 diskimage

You can now attempt to recover /dev/loop0. I found this easier in Windows, so

# dd if=/dev/loop0 of=/mnt/nfs-volume/diskimage.tc

And then back in the Windows world, you can use truecrypt to mount diskimage.tc and if you’re very lucky your files will be there. If you’re unlucky, truecrypt won’t recognise the image as a truecrypt volume, and you’re in more shit than I can help you with today.

In my case, truecrypt mounted the volume but Windows did not recognise it as a drive (i.e. a corrupted file system). There are tools for this. Unfortunately most of them work on physical disks, not virtual ones. Thank Finagle for google, who told me about GetDataBack. Specifically, GetDataBack 4.25. Pointed it at the virtual disk (G:) and it recovered all my files with absolutely no worries.

 

* Not if.

 

Streisand Effect

There’s a hoary old bit of Internet folklore, that in the mists of time when dinosaurs roamed the computer rooms, there existed a machine which could be upgraded by cutting a single wire.

In other words, the machine shipped with more power than you paid for, with some kind of a silicon handbrake to cripple the hardware until such time as you could afford to pay for an upgrade.

But that’s long ago and we do things differently now some people don’t learn from history.

Because apparently Tektronix sells equipment with built-in capabilities that costs money to enable, except if you can program an EEPROM. And not with some encrypted password or string, no, apparently plain text available straight off of Tektronix’ website will do the trick.

So after Hackaday linked to Oontz’ website, Tektronix got all butthurt and issued a DMCA takedown notice.

Notes to Tektronix:

1. Streisand Effect. I wouldn’t have written this post if you had not got all upset.

2. Wayback Machine. Jason saved it all for us. Including the original post.

3. Once the cat is out of the bag, it becomes trivial to replicate. Even if you DMCA the Wayback Machine, and me, and everyone else… you still lose. See Note 1.

So, learn from this and design better security next time.