Reference cards
Player/Missile graphics |
References
- Player/Missile graphics RAM positioning scheme taken from the book Compute!'s First Book Of Atari Graphics (Introduction To Player/Missile Graphics, Figure 7)
- Memory map taken from the book Mapping The Atari - Revised Edition (article Memory Map)
Player/Missile graphics scheme
Player/Missile graphics memory address map
SHADOW REGISTER | HARDWARE REGISTER | LABEL | DESCRIPTION |
559 ($22F) | 54272 ($D400) | SDMCTL |
Direct Memory Access (DMA) enable flag. Among other things this location
manipulates with players and missiles. It defines the playfield size, whether or
not the missiles and players are enabled, and the player size
resolution. To enable your options by using POKE 559, simply
add up the values below to obtain the correct number to POKE
into SDMCTL. Note that you must choose only one of the four
playfield options appearing at the beginning of the list:
Option Decimal Bit Enable missle DMA 4 2 Enable player DMA 8 3 Enable player and missile DMA 12 2,3 One line player resolution 16 4 Note that two-line player resolution is the default and that it is not necessary to add a value to 559 to obtain it. The default is 34 ($22). |
623 ($26F) | 53275 ($D01B) | GPRIOR |
Priority selection register. Among other things, it also enables you
to use all four missiles as a fifth player and allows certain overlapping players to have
different colors in the areas of overlap.
Priority options in order Decimal Bit Player 0-3, plfld 0-3, bckg 1 0 Player 0-1, plfld 0-3, player 2-3, bckg 2 1 Plfld 0-3, player 0-3, bckg 4 2 Plfld 0-1, player 0-3, plfld 2-3, bckg 8 3 Four missiles = fifth player 16 4 Overlaps of players have 3rd color 32 5It is quite easy to set conflicting priorities for players and playfields. In such a case, areas where both overlap when a conflict occurs will turn black. The same happens if the overlap option is not chosen. With the color/overlap enable, you can get a multicolor player by combining players. The Atari performs a logical OR to colors of players 0/1 and 2/3 when they overlap. Only the 0/1, 2/3 combinations are allowed; you will not get a third color when players 1 and 3 overlap, for example (you will get black instead). If player one is pink and player 0 is blue, the overlap is green. If you don't enable the overlap option, the area of overlap for all players will be black. |
704 ($2C0) | 53266 ($D012) | PCOLR0 | Color of player 0 and missile 0 |
705 ($2C1) | 53267 ($D013) | PCOLR1 | Color of player 1 and missile 1 |
706 ($2C2) | 53268 ($D014) | PCOLR2 | Color of player 2 and missile 2 |
707 ($2C3) | 53269 ($D015) | PCOLR3 | Color of player 3 and missile 3. When the four missiles are combined to make a fifth player, it takes on the color in location 711 (COLOR3). |
/ | 53248 ($D000) | HPOSP0 |
Horizontal position of player 0. Values from zero to 227 ($E3)
are possible but, depending on the size of the playfield, the range
can be from 48 ($30) as the leftmost position to 208 ($D0) as the
rightmost position. Other positions will be "off screen".
Missile 0 to playfield collision status. |
/ | 53249 ($D001) | HPOSP1 |
- Horizontal position of player 1.
- Missile 1 to playfield collision status. |
/ | 53250 ($D002) | HPOSP2 |
- Horizontal position of player 2.
- Missile 2 to playfield collision status. |
/ | 53251 ($D003) | HPOSP3 |
- Horizontal position of player 3.
- Missile 3 to playfield collision status. |
/ | 53252 ($D004) | HPOSM0 | Horizontal position of missile 0. Missiles move horizontally like players. See the note in 53248 ($D000) concerning the use of horizontal registers. Also player 0 to playfield collision status. |
/ | 53253 ($D005) | HPOSM1 |
- Horizontal position of missile 1
- Player 1 to playfield collision status |
/ | 53254 ($D006) | HPOSM2 |
- Horizontal position of missile 2
- Player 2 to playfield collision status |
/ | 53255 ($D007) | HPOSM3 |
- Horizontal position of missile 3
- Player 3 to playfield collision status |
/ | 53256 ($D008) | SIZEP0 M0PL |
- Size of player 0 (0 = normal, 1 = double, 3 = quadruple)
- Missile 0 to player collision status |
/ | 53257 ($D009) | SIZEP1 M1PL |
- Size of player 1 (0 = normal, 1 = double, 3 = quadruple)
- Missile 1 to player collision status |
/ | 53258 ($D00A) | SIZEP2 M2PL |
- Size of player 2 (0 = normal, 1 = double, 3 = quadruple)
- Missile 2 to player collision status |
/ | 53259 ($D00B) | SIZEP3 M3PL |
- Size of player 3 (0 = normal, 1 = double, 3 = quadruple)
- Missile 3 to player collision status |
/ | 53260 ($D00C) | SIZEM P0PL |
- Size for all missiles set by bits
- Player 0 to player collision status |
/ | 53261 ($D00D) | GRAFP0 P1PL |
- Graphics shape for player 0 written directly to the player
graphics register. In using these registers, you bypass ANTIC.
You only use the GRAFP# registers when you are not using
Direct Memory Access (DMA: see GRACTL at 53277). If DMA is
enabled, then the graphics registers will be loaded automatically
from the area specified by PMBASE (54279; $D407).
The GRAF registers can only write a single byte to the playfield, but it runs the entire height of the screen. - Player 1 to player collision status |
/ | 53262 ($D00E) | GRAFP1 P2PL |
- Graphics shape for player 1
- Player 2 to player collision status |
/ | 53263 ($D00F) | GRAFP2 P3PL |
- Graphics shape for player 2
- Player 3 to player collision status |
/ | 53264 ($D010) | GRAFP3 | Graphics shape for player 3 |
/ | 53265 ($D011) | GRAFM |
Graphics for all missiles, not used with DMA. GRAFM works
the same as GRAFP0 above. Each pair of bits represents one
missile, with the same allocation as in 53260 ($D00C) above.
Bit 7 6 5 4 3 2 1 0 Missile -3- -2- -1- -0-Each bit set will create a vertical line running the entire height of the TV screen. Missile graphics shapes may be set separately from each other by using the appropriate bit pairs. To mask out unwanted players, write zeros to the bits as above. |
/ | 53276 ($D01C) | VDELAY |
Vertical delay register. Used to give one-line resolution
movement capability in the vertical positioning of an object when
the two line resolution display is enabled. Setting a bit in
VDELAY to one moves the corresponding object down by one TV
line. If DMA is enabled, then moving an object by more than one
line is accomplished by moving bits in the memory map instead.
Bit Decimal Object 7 128 Player 3 6 64 Player 2 5 32 Player 1 4 16 Player 0 3 8 Missile 3 2 4 Missile 2 1 2 Missile 1 0 1 Missile 0 |
/ | 53277 ($D01D) | GRACTL |
Location for turning on players and missiles. To get the values to be POKEd here, add the following
options together for the desired function:
Decimal Bit To turn on missiles 1 0 To turn on players 2 1 To latch trigger inputs 4 2To revoke P/M authorization and turn off both players and missiles, POKE 53277,0. |
/ | 53278 ($D01E) | HITCLR | POKE with any number to clear all player/missile collision registers. It is important to clear this register often in a program -- such as a game -- which frequently tests for collisions. Otherwise, old collision values may remain and confuse the program. |
/ | 54279 ($D407) | PMBASE | MSB of the player/missile base address used to locate the graphics for your players and missiles (the address equals PMBASE * 256. P/M graphics are tricky to use since there are no direct Atari 8K BASIC commands to either create or move them (there are, however, commands for P/M graphics in BASIC A+, in valFORTH and other utilities). |