3 Generations of Game Machine Architecture
Download
Report
Transcript 3 Generations of Game Machine Architecture
3 Generations of
Game Machine Architecture
Joe Decuir
[email protected]
alumnus of Atari & Amiga
Agenda
•
•
•
•
•
My background
Atari Stella system (2600)
Atari Colleen system (400/800, 5200, etc)
Amiga Lorraine system (1000, 2000, etc)
looking ahead
My background, pre-Atari
• Clearly an engineer from my first Erector
set (age 6)
• BS & MS degrees from Berkeley, in EECS
and pre-med, including Intel 4004 design
• A couple years spent in medical instrument
design and in medical research that
leveraged those instruments.
• Bought my one 6502 at Wescon in 1975.
Stella Architecture
•
•
•
•
•
Product requirements
Design choices
Hardware/firmware tradeoffs
Results
Lessons
Stella Requirements
• Atari management had a clear vision for the
product: provide a means to bring
successful Arcade games home.
• We had to hit a $200 max retail price for the
console, for Christmas of 1977.
• Expected product life: 3 years (e.g. to 1979)
• Non-goals: be an expandable personal
computer.
Stella System
• TIA video chip (see below)
• 6502-based processor, “6507”:
– 13 bit address, no interrupts, RDY line
– 1.2 MHz
• 6532 combo
– 128 bytes of RAM (all mapped into zero page)
– 16 bits of parallel I/O (joysticks and panel)
– timer (interrupt not used)
• cartridge slot for 2K or 4K ROMs (24 pins)
• 2 game control ports
Stella Implementation
• From coin-op games, there were two
obvious ways to architect the system:
– non-programmable random logic
– programmable (uP) with screen bit-map
• Fatal flaws in both:
– random logic would be slow development, and
not re-usable
– bit maps were expensive
Bit maps and games
• Games traditionally contain a background
of some kind (playfield) and foreground
active objects (players, sprites, etc).
• If only a bit map is used for everything:
– sprite graphics and motion resolution are the
same as the playfield resolution, forcing
– a hard choice between high cost or clunkiness
The breakthrough: soft video
• Mayer and Milner proposed using a fast
enough processor to reload video on a lineby-line basis. The processor replaces logic.
• They had to wait for the right chip:
–
–
–
–
Intel 8080 was expensive, needed 3 supplies.
Motorola 6800 was too slow
Fairchild F8 was even slower
MOS 6502 was perfect: fast and cheap
Why was the 6502 so good?
• Process speed: depletion load pullup
transistors were much faster and smaller
than enhancement pullups (e.g. 6800).
• Architecture speed:
– little-endian addresses pipelined instructions
– indexed-indirect and indirect-indexed
instructions allowed use of zero page as an
array of fast memory pointers.
Design decisions
• Our target coin op games were two player
action (Tank - Combat), sports (Basketball)
and paddle (Pong -Video Olympics) .
• We decided that we needed:
– 2 8-bit motion objects (P0, P1)
– 3 1-bit motion objects (M0, M1, Ball)
– 20 or 40 bits of low resolution playfield
Hardware Software tradeoffs:
Motion control
• The easy way to make these motion objects
would require a binary horizontal counter,
and 5 8-bit position registers and
comparators. We thought this would be
huge.
• The cheap way was to use dynamic
polynomial counters, running in parallel.
Motion in implemented with resets and
motion vectors.
Motion control, continued
• To appease the programmers, I generated a
‘Compute Horizontal Reset’ CHRST utility.
• Called with object index in X, position in A:
– computes a loop count (15 clocks)
– computes a residual motion vector (+/-7)
– waits for sync, loops, resets and writes motion
• For the programmers, this was good enough
Motion control, epilog
An alternative that we considered too late:
• keep the polynomial horizontal counter
• replace the separate object counters and
motion registers with simple position latches
and comparators
• use a 160-byte look up table in cartridge
ROM to map binary horizontal positions to
polynomial counter values.
Other TIA chip features
• 4 7-bit palette registers
• 15 collision detection latches
• 2 channel sound system
– variable prescaler
– 4+5 bit polynomial counters
– volume registers
• trigger and potentiometer input ports
• trigger input could be used for light pens or
light guns.
Stella Graphics
• Fundamental pixel resolution is 1 color burst
clock (280nsec, 160/line) by 1 line.
• Motion objects are 1, 2, 4 or 8 clocks/bit.
• Motion objects may be replicated in
hardware.
• Playfield is 4 clocks per bit.
• Playfield bits are either repeated or reflected
in hardware.
Example Stella Game structure
• In Vertical Blank:
– detect collisions and control inputs
– decide new game conditions
– computer new game graphics pointers
• In Display, for each line or two:
– step graphics pointers
– fetch graphics
– wait for horizontal blank, and write graphics
Atari 2600 market history
• 1st shown at June 1977 CES show
• 250,000 sold in 1977, with 6 cartridges
• 550,000 sold in 1978, but big unsold
inventory (800,000 made that year).
• Sales continued to double annually until the
market collapse in 1983.
• Est. sales over 50 million by late 1980s.
Atari 2600 Lessons
• Make the hardware a flexible platform for
clever developers. (Bill Joy’s theorem)
• Good hardware-software tradeoffs make the
product economically viable.
• Real marketing is essential. This means that
somebody has a clear vision of:
– who will buy the product
– why they buy the product at all
– why they buy the product from us
Colleen System Architecture
(Atari 400/800, 5200, 65XE, etc)
•
•
•
•
•
Product requirements
Design choices
Hardware/firmware tradeoffs
Results
Lessons
Colleen requirements
• Split requirements:
– support 1978 vintage arcade games. We knew
we would need to leapfrog the 2600 before
somebody else did.
– support home computer character and bit map
graphics. We saw the Apple II, Commodore and
Radio Shack appliance machines coming.
• Result:
– Atari 800 was full computer
– Atari 400 was a game machine w/flat keyboard
Colleen computer requirements
•
•
•
•
•
•
Keyboard
Character graphics
Enough memory to run large programs.
Means to load programs from tape or disk.
Means for memory expansion
Means for peripheral expansion
Colleen game Requirements
• Hardware drives the graphics, so that the
CPU has time to do other things.
• More moving objects.
• Multi-colored character maps, so that
complex playfields can be generated without
large amounts of memory.
• Playfield motion: vertical and horizontal
scrolling.
Colleen System Architecture
• 5 LSI parts:
–
–
–
–
–
6502 at 1.8 MHz, all address and interrupts
ANTIC: Video address generator, etc
CTIA/GTIA: video output
POKEY: pots, keyboard, audio, serial bus
6520 PIA: simple 16 bits of parallel I/O
• at least 4KB of DRAM (1st shipped w/8K)
• 1-2 ROM cartridge slots
• 4 game controller ports
Colleen Video architecture
• 5 motion object generators
• Display list processor generates playfield or
character displays, on line-by-line basis.
• Both graphics generators get DMA access,
so they share memory with the 6502.
• Maximum resolutions: 320x240x1 in
monochrome or 160x240x2 in color
• 8-bit palette registers: 4 color, 4 luminance
ANTIC Display list modes
• 8-bit instructions:
–
–
–
–
4-bit display mode
2-bits scroll control
1-bit interrupt request
1-bit load new address
• bit map modes: 40x8x2 to 320x1x1
• text modes: 20x(8x8)x2 and 40x(8x8)x1
• color characters: 40x(4x8)x2
ANTIC player graphics
• DMA from 5 fixed strips of 120 or 240 bytes
of memory.
• Horizontal motion by writing a binary
register (the way the programmers wanted
Stella to work).
• Vertical motion by erasing and rewriting the
picture.
• Vertical reuse possible: use Display list
interrupts to rewrite horizontal positions.
More about playfield motion
• Complex games may have a huge virtual
playfield, windowed on the screen.
• For each display instruction with horizontal
scrolling enabled, ANTIC will load 192
pixels worth of data, and clip, controlled by
the horizontal scrolling register.
• For each display instruction with vertical
scrolling enabled, ANTIC will clip that line,
controlled by the vertical scrolling register.
Non-video I/O
• Pokey supported 4 audio channels
• Pokey supported 8 potentiometer inputs,
sampled in hardware
• Pokey scanned a keyboards, using
commodity CMOS external muxes.
Colleen system issues
• The most direct competitor was the Apple II
• The Apple II was not bundled with a TV RF
modulator, so it was not regulated by FCC.
• It could have slots! Peripherals were easy.
• The 800 was cased in cast aluminum
• The 800 had internal memory slots.
• The 800 used a serial bus for external
expansion, 19,200 b/s. The peripherals had
intelligence, so they were expensive.
Colleen in the market
• First debut in 1979. Sold respectably but
not near as well as the Apple.
• FCC changed the rules in 1979: “Class B”
• Commodore C64 jumped in with lower cost
and more memory.
• Atari answered with 800XL, etc, but trailed
Apple and Commodore (and Radio Shack)
• Repackaged as pure game machine, 5200,
competed with wealth of 2600 games.
Colleen Lessons
• A personal computer has to have easy expansion,
with lots of room for 3rd parties to add value (e.g.
Apple II and IBM PC/AT family)
• It appears to confuse things to sell a hybrid game
console and crippled PC (e.g. Atari 400).
• It was bad luck that the FCC didn’t change the
rules until after the Atari 800 shipped. Something
like the 1200XL might have flown.
Amiga Lorraine System
• Company founded by Dave Morse (Mattel
marketing) and Jay Miner. I was badge #3.
• Original product conception: generate
cartoon-quality video games.
• Also a computer, with a built-in floppy
driver for distributing games.
• Commodore turned it into a “color multimedia MAC” in 1984, shipped in 1986.
Amiga System Architecture
(Amiga 1000, Amiga 2000, etc)
•
•
•
•
•
Product requirements
Design choices
Hardware/firmware tradeoffs
Results
Lessons
Amiga computer requirements
• Use a modern processor: 68000 (w/o
memory management unit)
• Built in floppy drive, not built in hard drive.
• 40 or more characters/line on TV, 80 or
better on a monitor
• GUI OS requirement added after
Commodore purchase in 1984.
Amiga gaming requirements
• Hardware assist for:
– common graphics operations
– changing the hardware synchronous with the
video beam.
•
•
•
•
•
Foreground and background bit maps
Multiple motion objects
Multi-channel DMA audio
Loading games from floppy drive.
Interact with external video (disk, VCR, etc)
Amiga system design
• 4 LSI chips:
–
–
–
–
68000 CPU, at 7.2 MHz
AGNUS address generator/DMA engine
DENISE video output chip
PAULA I/O chip
• 256K DRAM minimum, 512K common
• 2 game ports
• Floppy drive
Amiga video design
• Primary display is a set of bit plane engines.
• Bit planes can be used as a set of 4, for 16color displays, or in two sets of 3 and 3, for
an 8-color foreground (or motion objects)
and an 8-color background.
• 8 identical sprite engines.
• Palette registers are 12 bit: 4 each RGB, or 4
each color, saturation and luminance
Amiga bit blitter detail
• Automates common graphics operations:
– line draw
– area fill
– splicing and manipulating images
• Bit blitter:
– 3 input images, 1 output image
– 2 input images can be barrel shifted
independently
– any arbitrary operation can be performed,
selected by 8-bit mask.
Amiga sprite engines
• Each engine reads a string of 16-bit words
in memory.
• The first words specify top left corner and
size.
• Subsequent words are data (16 x 2 bits/line)
• Sprites can be reused to the end of the
screen.
Amiga Audio
• 4 DMA channels:
– 8 bits/sample
– adjustable sample rate
– sample table in memory can be from 2 bytes
(square wave) to 8192 bytes.
– Separate pointers: each chunk of audio can
come from anywhere in memory.
Amiga System Issues
• The first version would have looked like the
Amiga 500, with 128K of DRAM and no
GUI OS, and shipped in 1984.
• Amiga ran out of money, which slowed
development.
• Commodore bought it in June of 1984.
• Commodore repositioned it as a color
multimedia MAC-like PC
Amiga in the market
• The Amiga 1000, loaded with computer
options, shipped in 1986. Competitors:
– IBM PC/AT and clones
– Mac, with color
– Atari ST
• It was the best multi-media computer of its
time, but it had a distinct market only for
video production (with the Video Toaster)
• It became a cult favorite, but a market
failure.
Amiga lessons
• Again, clear product focus matters a lot:
competent marketing people working with
engineers who listen.
• Bad luck matters: the collapse of the video
game business in 1984 poisoned the well
financially and prospectively. Otherwise,
we would play Amiga consoles instead of
the NES in the mid-1980s.