Heist • Written by Darin Young, Dennis Henry, Chuck Shnider • Development took place 1983-84 approx. • Platformer-style game • “Break into bank, steal loot, make exit” • 4 levels planned, Levels I and III were developed.
Heist Level I • Developed by Darin and Dennis • Independent Studies course in High School • “Break into the bank by going underground. Avoid various stuff”
What’s NOT There • No lower-case characters • No up/down arrow keys • No real-time clock • No sound chip • DOS commands very limited • No device drivers etc etc.
6502 CPU • All registers 8-bit except for Program Counter • No “pseudo-16-bit” registers • no 16-bit arithmetic (duh) • no 8-bit integer multiply / divide • not really easy to set up “stack frames” with calling arguments and local vars.
6502 Market Success • Not the “best” CPU of its time • 1/6 the cost of competing CPUs • The right combination of time, place, and price. • Moore’s Law makes a huge difference with even slightly newer CPUs • Z-80 • Motorola 6809
Display Modes • 40x24 text mode • 40x48 16 colour low-res graphics • 280x192 6 colour “hi-res” graphics • Composite “text+graphics” modes with 4 lines of text at the bottom of the display. • Dual frame-buffers for off-screen drawing.
What’s NOT There • Most everything is “modify frame buffer memory directly” • No built-in bitmap manipulation routines • No built-in bitmapped text support • a few primitive polyline routines for the BASIC ROM • No colour palette support
What’s NOT There • No hardware sprites • No way to sync to CRT horizontal or vertical retrace. • hard to eliminate flicker, even with drawing off- screen. • However side-scrolling games manipulate the fame buffer origin.
Sound • access memory location $C030 to produce a “click”. • The rest is basically up to you… • ROM routine for simple tone generation • Unless you’re super-clever, making sound ties up the CPU completely.
Hi-Res Graphics • 280 x 192 6-colours • frame buffer uses 1 bit per pixel • Woz used lots of clever tricks to do a lot with a little • “monochrome with side-effects”
Hi-Res Graphics • Odd/Even pixels can be either green/purple or orange/blue within a single block of 7 px • “0” pixels always black • two or more adjacent “1” pixels makes white.
Hi-Res Graphics • Locating pixels in the x-dimension means division by 7 #ugh • 280 > 255, so you need 16-bit arithmetic too :( • colour fringing and interference :( Frame Buffer 0 1 0
Techniques Used • Heist III used page-flipping, Heist I did not. • Lots o’ global variables. • XOR drawing for animated sprites • “pre-shifted” character sprites to account for horizontal position within byte boundaries.
Techniques Used in Heist I • Loaded graphics assets from disk dynamically as the game progressed. • Drew bitmapped text on-screen • More “data-driven” in terms of what game mechanics are allowed at given times.
Techniques Used in Heist I • Main game-loop and specialized subroutines to handle special states with their own “game loop”. • Multiple source files “chained” together during assembly. • Comments in the source code :)