Re: [stella] optimization : sneaky fractional bit representation

Subject: Re: [stella] optimization : sneaky fractional bit representation
From: "Andrew Davie" <adavie@xxxxxxxxxxxxxxxxx>
Date: Thu, 4 Jun 1998 01:45:41 +1000
>That makes sense.  It also explains why nobody managed to reverse-engineer
>any of the passwords (except the brain-dead Mega Man 3 system).  Don't
>suppose you could let us in on the password generation scheme for any of
>your NES games? :)


To guarantee people wouldn't succeed with random passwords, we also included
checksum information in the password itself.  Generation is simple... I
don't think this is what you're asking, though.  Maybe.

first we build up a bitstream, then segment the bitstream into letters...

1) Figure what information you need to save - each will have a numeric
range.
2) repeat steps 3 thru 5 for all the items
3) adjust the item's range so it's 0 to n (doesn't have to be a power of 2)
4) add the item value to be encoded to your bitstream
5) multiply your bitstream by n  (goto step 3 if there's more items)
6) now we have a long bitstream which has the encoded bits.
7) segment the bitstream into, say, 5 bit segments and convert each into a
letter/digit by table lookup
8) bob's your uncle.

The decode is, of course, the reverse.
1) combine all letters in password to a long bitstream (by reverse lookup of
the letter values in the table)
2) to get the next item, MOD your bitstream by items range => encoded info
for this item
3) divide bitstream by items range and repeat at step 2

Thats how it was done.
Hope that's what you were after, because buggered if I could remember ACTUAL
passwords and information encoded.  I can hardly remember the games... sort
of a selective memory loss to dull the pain.

Cheers
A



--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html

Current Thread