Yellow
Brick Road
by Peter Ellison
by Peter Ellison
Last issue of ROM I took a brief look at the three yellow console buttons and the cursor. In this issue I'm going to try and give, I hope, all of the locations needed to use player/missile graphics. I know this topic has been done over and over again in almost every computer magazine but this will be more of a reference guide then really a tutorial. The next few pages can be used along side the computer when using player/missile graphics.
For those of you that want to make games but don't know how to animate a player, player/missile graphics are for you. Drawing a player is very easy because all you need is a pencil and some graph paper (to draw your player). Then you translate what you've drawn, into either binary code or decimal(if programming in basic). The player can only be eight pixels wide, but by combining two or more players the image can be larger. You must now store the image data into RAM, with the byte at the top of the player image going first, followed by the other image bytes in top to bottom sequence. Below is a short program which displays a small player on the screen:
10 REM LOCATION TO STORE OUR PLAYER IMAGE
20 I=PEEK(106)-8:POKE 54279,1
30 REM PLAYER MISSILE BASE ADDRESS
40 PMBASE=I*256
50 REM PREPARE THE MEMORY AREA
60 FOR L=PMBASE+512 TO PMHASE+640:POKE L X,0:NEXT L
70 REM HORIZONTAL AND VERTICAL LOCATION OF PLAYER
80 X=100:Y=80
90 REM COLOR OF THE PLAYER
100 POKE 704,60
110 REM ENABLE DOUBLE LINE RESOLUTION
120 POKE 559,46:POKE 53277,3
130 REM POKE HORIZONTAL POSITION OF PLAYER 0
140 POKE 53248,X
150 STORE PLAYER IMAGE
160 FOR L=0 TO 11
170 READ P
180 POKE PMBASE+512+Y+L,P
190 NEXT L
200 DATA 28,28,8,62,62,62,62,28,20,20,20,54
I said this wasn't going to be a tutorial, but some reference sheets. The reason I gave a short explanation of player/missile graphics is so that the sheets will be used! I'm not going to explain how to animate a player because in this magazine there are already two adventure games that animate an image using player/missile graphics.(Refer to there if you want to know more). Below are all the addresses needed for snaking your own game using player/missile graphics.
Color and luminance of player/missile 0-708 Dec.
Color and luminance of Player/missile 1-709 Dec.
Color and luminance of Player/missile 2-710 Dec.
Color and luminance of Player/missile 3-711 Dec.
Graphic Control to enable Player/missile graphics-53277 Dec.
Horizontal Position of player 0-53248 Dec.
Horizontal Position of player 1-53249 Dec.
Horizontal Position of player 2-53250 Dec.
Horizontal Position of player 3-53251 Dec.
Horizontal Position of missile 0-53252 Dec.
Horizontal Position of missile 1-53253 Dec.
Horizontal Position of missile 2-53254 Dec.
Horizontal Position of missile 3-53255 Dec.
Missile 0 to playfield collisions-53248 Dec.
Missile 0 to player collisions-53256 Dec.
Missile 1 to playfield collisions-53249 Dec.
Missile 1 to player collisions-53257 Dec.
Missile 2 to playfield collisions-53250 Dec.
Missile 2 to player collisions-53258 Dec.
Missile 3 to player collisions-53251 Dec.
Missile 3 to player collisions-53259 Dec.
Player 0 to playfield collisions-53252 Dec.
Player 0 to player collisions-53260 Dec.
Player 1 to playfield collisions-53253 Dec.
Player 1 to player collisions-53261 Dec.
Player 2 to playfield collisions-53254 Dec.
Player 2 to player collisions-53262 Dec.
Player 3 to playfield collisions-53255 Dec.
Player 3 to player collisions-53263 Dec.
Player missile base address-54279 Dec.
Priority select-623 Dec.
example: POKE 623,1 selects the following ranking: Player 0,player 1,player 2,player 3,playfield 0,playfield 1,playfield 2,playfield 3,background.
or POKE 6238 selects the following rankings PF0,PF1,P01,P1,P2,P3,PF2,PF3,BAK
Size for missiles-53260 Dec.
example: POKE 53260,1 makes missile 0 twice normal size
or : POKE 53260,255 makes all four missiles times normal 1.
Size of player 0-53256 Dec.
example: POKE 53256,1 twice
or:POKE 53256,3 four times normal size
Size of player 1-53257 Dec.
Size of player 2-53258 Dec.
Size of player 3-53259 Dec.
Until next time have fun with Player/Missile graphics and if there are any memory addresses or locations that you'd like covered, drop us a line.
That ends the list of Player/Missile locations and below is the Player/Missile RAM area layout;