[Scummvm-devel] OT: My UHS viewer

Neale Pickett neale at woozle.org
Tue Jul 13 00:54:10 CEST 2004


James 'Ender' Brown <ender at scummvm.org> writes:

> I really don't see a problem with releasing it, as long as the format
> is simple enough that you can claim it wasn't "protected". The UHS
> guys allow reading of most of their files for free over the web
> anyway.

The format itself is simple, but there are two different "encryption"
methods of varying difficulty.  Both methods smack of math puzzles, so
it's hard for me not to keep trying to figure them out.

The first method, used in older files, seems like it was designed to be
easily figured out: it's a simple caesar cypher with the list of UHS
characters expanded by two and wrapped around.  For example, if the only
allowed UHS characters were "ABCD", the replacement mapping would be
"CADB->ABCD" ("CAB" would map to "ABD" with this example map).

The second method is trickier, and while I can decode it, I haven't
figured out the general algorithm used (I need one decoded line from a
UHS file before I can decode it).  It seems to add in an operation based
on each character's offset from column 0, but one of the operands varies
from UHS file to UHS file.  I only spent a couple of hours working on
it, though; it might not be all that complicated.

When I wrote Bob Norton (one of the UHS guys) out of the blue, asking
for a hint to cracking the second algorithm, he wrote back a very polite
and friendly message explaining that a free viewer would likely severely
threaten their already meager revenue stream.  Whether or not this would
actually be the case, the following text in typcal UHS files makes me
wary:

    Jason Strautman -- AOL JStrautman, CIS [72337,2611], and Internet
    jstrautman at aol.com -- wrote this file.  This file is copyright 1995
    by Jason Strautman and may not be distributed without permission,
    except to non-commercial BBSs open to the general public.  Editing
    or conversion of this file to another format is prohibited under any
    circumstances.

Distributing my viewer wouldn't violate the letter of these terms, but I
suspect it may go against the spirit of them.  I suspect that a bunch of
emulator hackers might have some thoughts about this sort of issue, so
bring it on :)

> That and I would *LOVE* a UHS reader that works properly under Linux
> (the official ones are not really WINE'able :)

Yeah, that was why I started writing this.  Bob Norton seemed mildly
curious about a Linux reader, but didn't really understand why I
couldn't just use the Windows one under WINE.

Thanks,

Neale




More information about the Scummvm-devel mailing list