Thursday, August 29, 2013

Trivia Gibs #5


Napoleon was not French, but Corsican. Hitler was not German, but Austrian. Stalin was not Russian, but Georgian.

The country with the lowest average IQ is Sudan, with an average of 72. The country with the highest is Hong Kong, with an average of 107. The United States isn't even in the top 10. This, according to the book "IQ and the Wealth of Nations", grain of salt prescribed.

North Dakota has the lowest divorce rate (8.1%) in the United States, where the average for the country is 3.4 per 1000. Of divorced women, more than one-fourth of them are under the age of twenty.

The sun loses an average equivalent of one Earth every 100,000,000 years because of radiation. Solar wind wipes out another one-fourth of that mass in the same time period.

A nanocentury is exactly Pi seconds long.

If you stored the Library of Congress on computers, you would only need less than 30 terabytes.

Being able to quit smoking easily and not have it bother you can be a positive thing - or an early sign of Alzheimer's disease.

The composer of the battle hymn "Onward, Christian Soldiers," Sabine Baring-Gould, also kept a pet bat - which was so tame that he'd greet guests with it perched on his shoulder.

Which movie script is the most foul-mouthed? "Pulp Fiction"? "South Park: Bigger, Longer and Uncut"? Not even close! In terms of dropping the F-bomb, the winning film so far is "Tigerland" (2000), with an F-word count of 527 for a 100-minute film - working out to five f***s per minute!

We bless sneezes with "God bless you" because it was ordained so by Pope Gregory the Great in the year 600 AD, by official papal decree. So there.

Tuesday, August 27, 2013

Saturday, August 17, 2013

How one hack for playing a TRON lightcycle game went on an Apple IIgs

Folks, I was there in those ancient days of computing yore, and reading pixels off the screen for collision detection was exactly how I did games, too. I even still have code that does that lying around somewhere for some silly screensaver modules I wrote. Anyway:
"The algorithm to determine which pixel to check next used some fast assembler math to calculate a memory address – either one pixel above, below, to the left, or to the right of the current pixel.  But since any given pixel on the screen was really just a memory address, the algorithm simply calculated a new memory location to read.  So when the light cycle left the screen, the game happily calculated the next location in system memory to check for a wall crash.  This meant that the cycle was now cruising through system RAM, wantonly turning on bits and “crashing” into memory.

Writing to random locations in system memory isn't generally a wise design practice. Unsurprisingly, the game would generate spectacular crashes as a result.  A human player would be driving blind and usually crash right away, limiting the scope of system casualties.  The AI opponents had no such weakness.  The computer would scan immediately in front, to the left, and to the right of its position to determine if it was about to hit a wall and change directions accordingly.  So as far as the computer was concerned, system memory looked no different than screen memory."
Real Life Tron on an Apple IIgs

You young'uns might recognize this game better as 'Snake' as played on your phone.