Hacker News new | past | comments | ask | show | jobs | submit login

I took a look at the listing[1] and looks like it contains unprintable characters, maybe they were ASCII art of some sort?

The checksum algorithm is fairly simple: line 32150 sums the products of all character positions and character codes, and lines 32160-32180 does a modulus to convert them to printable characters. The multiply-by-position bit is clever because it allows the checksum to flag transposed characters. ISBN-10 uses a similar scheme[2].

[1] https://www.atarimagazines.com/software/displayfile.php?file...

[2] https://en.wikipedia.org/wiki/ISBN#ISBN-10_check_digits




I naturally went down a rabbit hole to see if I could find why those characters weren't printing properly.

https://www.atarimania.com/mags/pdf/Antic_Vol_7_No_4.pdf

On p. 31, you can see the intended characters.

I now remember that Atari actually had their own variant of ASCII, called ATASCII:

https://en.wikipedia.org/wiki/ATASCII

Atari 8-bits were actually really cool computers, in that they let you do things like redefine character sets entirely (to create custom character sets to effectively create tile-based displays), play with display-list interrupts, etc.


Nice find :)

I guess Atari character set has enough overlap with ASCII, so I could get the checksum to match:

    sum = 0
    "32000 REM TYPO II BY ANDY BARTON".codepoints.each_with_index{|c, i| sum += (i + 1) * c }
    print ((sum % 676) / 26 + 65).chr, (sum % 26 + 65).chr, "\n"
(Ruby code, outputs "WB")




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: