(if it's all on one line, read it in WordPad or a web browser)  


"Pretendo"
a demo for the NES

This program has two goals:

1. demonstrate different riffs on the Nintendo logo, and
2. demonstrate how to seed a random number generator on the
   Nintendo Entertainment System without any user input.

Several video games for disc-based consoles display a randomly
chosen opening cut scene every time they're powered on.  They do
this by hashing the save data or by looking at the seconds on the
system clock when the game starts.  But the NES has neither a
system clock nor a (guaranteed) save chip, and games that want to
do something at random before the player presses the Start button
need to get a little sneakier.

In February 2013, Kevin Horton explained that when an NES program
tries to read from video memory while the PPU is reading from
video memory, various bus conflicts inside the PPU will result in
"analog effects" that produce unpredictable behavior.  So the
program turns rendering on, reads 256 bytes from video memory,
and computes their CRC16 value.  This produces about one frame
of visible artifacts but hopefully 16 usable bits of entropy.

This program displays an animation nearly identical to the power-on
sequence of the original Game Boy system, except with four digits
at the bottom showing the generated random seed, and the name
"Nintendo" is replaced with a randomly chosen pun.  Normally, to
protect the saved game on a Game Pak with battery save, the system
freezes when the 48-byte logo in the BIOS is found not to match the
48-byte logo in the cartridge header.  The BIOS displays the logo
in the ROM as a way of showing the user whether the Game Pak's edge
connector is dirty.

Because this program tests the power-up state of the NES, a copier
such as the PowerPak cannot completely demonstrate whether this
trick actually works.  So on February 11, 2013, a member of the
NESdev BBS offered to test this program on an NES devcart.

Feel free to pass this ROM off as a fake Game Boy emulator for
the NES and say it can't get past the logo for some reason.


== Legal ==

The following applies to the program and its manual:

; Copyright 2013 Damian Yerrick
;
; Copying and distribution of this file, with or without
; modification, are permitted in any medium without royalty provided
; the copyright notice and this notice are preserved in all source
; code copies.  This file is offered as-is, without any warranty.
;
; Nintendo and Game Boy are trademarks of Nintendo.  This is a parody
; of the Game Boy boot screen, and NintenDON'T sponsor or endorse it.
