Programming The Atari
I own an Atari 800XL and a 1050 disk drive. I know BASIC and some machine language. I like to program, especially with player/missile graphics. What I would like to know is how to detect collisions between players and missiles. Also, is there a way to move players vertically other than shifting all the player data in memory?
I have read that POKE 1913, 80 speeds up the disk drive when saving programs. Is there a POKE I can do to speed up loading?
Player/missiles are similar to the sprites on other computers—they are movable objects that are independent of the background screen. However, player/missiles do not have vertical position registers, so you cannot move them up and down without physically moving the image data. Fortunately, player/missiles stretch the entire height of the screen (and even beyond the top and bottom of the screen), so player/missiles can be on any portion of the screen.
The player/missile graphics system has collision registers that can tell you when any given player or missile has overlapped any given color on the screen, when any player has overlapped any other player, and when any player has overlapped any missile. There is no provision, however, for detecting collisions between two missiles. Many books cover player/missile programming. Mapping The Atari from COMPUTE! Books and De Re Atari from Atari are among them.
The POKE you mentioned for speeding up disk saves works by turning off the verify mode. Normally, each save is followed by a simulated load which compares each saved byte to the corresponding byte of memory. If any of the bytes don't match, the save is automatically retried. POKEing 80 into 1913 turns off this verify mode. There is no simple POKE that can speed up disk reads.