PIC-Pong was inspired by a video test pattern generator developed by Richard Ottosen using a PIC16C54. After he built that we both considered the idea of trying to write a video game using the PIC16C54, but we decided that it was too limited. When the PIC16C71 was introduced I revisited the idea and came up with PIC-Pong.
Later we saw the winning entry in one of Circuit Cellar's design contests, which was a video wind gauge. It was quite well done, and the author came up with a clever timing trick which I later incorporated into PIC-Pong. To a casual inspection it would appear that code to resynchronize execution with the timer (using no prescaler, i.e., one count per instruction cycle) would be to within four cycles. However, using an add to the program counter enables exact synchronization.
Attract mode:
Game play:
movwf portb rrf portb rrf portb rrf portb rrf portbOf course, that means that I can't use the other pins of Port B. Or does it?
Actually, by making bit PB7 an input that is tied high, I can use PB6 and PB5 for other outputs that are always high during active video. In particular, I use them to control video sync and blanking. The W register value should have ones in the high three bits.
Last updated October 12, 2000
Copyright 1995, 1999, 2000 Eric Smith