Andrea Posted August 12, 2020 Share Posted August 12, 2020 Hello User's ATARI, The COMPUTER ATARI 800XL has hardware sprites? If yes, How I can do define pattern sprite in GRAPHICS ?? 1 Quote Link to comment Share on other sites More sharing options...
Mr Robot Posted August 12, 2020 Share Posted August 12, 2020 Have a look at this https://www.atariarchives.org/pmgraphics/ Also http://www.page6.org/archive/issue_08/page_10.htm 1 Quote Link to comment Share on other sites More sharing options...
zzip Posted August 12, 2020 Share Posted August 12, 2020 Sprites are called "Players and Missiles" or PM Graphics for short on the Atari. They are a little strange compared to other computers sprite implementations: Players are 8-bits wide and the full height of the screen, missiles are 2-bits wide and also the full height of the screen. All 4 missiles can be combined into an extra player. You can easily change the horizontal position of the PM graphics, but for vertical movements you need to shift the data up or down. One cool thing is you can use display list interupts to change the position of the PM graphics anywhere on the screen, creating a new set of independent sprites. This is useful for say a split screen game 5 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted August 13, 2020 Share Posted August 13, 2020 Here's a fairly simple BASIC program that puts a sprite on screen which can be moved with a joystick, the movement is slow, but that's BASIC, if you want useful sprites, you need to use ASSEMBLER, but this may give you and idea on how they need to be set up. 1 PMBASE=54279:SIZEM=53260 2 RAMTOP=106:HPOSM0=53252 3 SDMCTL=559:REM SHADOW DMACTL 4 GRACTL=53277 5 HPOSP0=53248:REM HORIZONTAL POSITION OF PO 6 PCOLR0=704:REM SHADOW OF PLAYER 0 COLOR 10 GRAPHICS 0:SETCOLOR 2,0,0:REM SET BACKGROUND COLOR TO BLACK 20 X=100:REM BASIC'S PLAYER HORIZONTAL POSITION 30 Y=48:REM BASIC'S PLAYER VERTICAL POSITION 40 A=PEEK(RAMTOP)-8:REM GET RAM 2K BELOW TOP OF RAM 50 POKE PMBASE,A:REM TELL ANTIC WHERE PM RAM IS 60 MYPMBASE=256*A:REM KEEP TRACK OF PM RAM ADDRESS 70 POKE SDMCTL,46:REM PM DMA 2-LINE 80 POKE GRACTL,3:POKE SIZEM,3 90 POKE HPOSP0,100:POKE HPOSM0,90 100 FOR I=MYPMBASE+384 TO MYPMBASE+640:REM THIS LOOP CLEARS PLAYER 110 POKE I,0 120 NEXT I 125 REM POKE MYPMBASE+384+90,3 130 FOR I=MYPMBASE+512+Y TO MYPMBASE+518+Y 140 READ A:REM THIS LOOP DRAWS THE PLAYER 150 POKE I,A 160 NEXT I 170 DATA 8,17,35,255,32,16,8 180 POKE PCOLR0,88:REM MAKE THE PLAYER PINK 190 A=STICK(0):REM READ JOYSTICK 200 IF A=15 THEN GOTO 190:REM IF INACTIVE, TRY AGAIN 210 IF A=11 THEN X=X-1:POKE HPOSP0,X:IF X=25 THEN X=213 220 IF A=7 THEN X=X+1:POKE HPOSP0,X:IF X=213 THEN X=25 230 IF A<>13 THEN GOTO 280 240 FOR I=8 TO 0 STEP -1 250 POKE MYPMBASE+512+Y+I,PEEK(MYPMBASE+511+Y+I) 260 NEXT I 270 Y=Y+1 280 IF A<>14 THEN GOTO 190 290 FOR I=0 TO 8 300 POKE MYPMBASE+511+Y+I,PEEK(MYPMBASE+512+Y+I) 310 NEXT I 320 Y=Y-1 330 GOTO 190 Quote Link to comment Share on other sites More sharing options...
Preppie Posted August 14, 2020 Share Posted August 14, 2020 FastBasic, and TurboBasic, can handle sprites fine using the MOVE command to shift data around. Even standard Atari Basic can do it with a little trick where you point a string to the same area as the PMG and then shift the data using normal string commands. Quote Link to comment Share on other sites More sharing options...
Level42 Posted August 19, 2020 Share Posted August 19, 2020 Atari’s player/missile graphics (sprites) may be a bit weird, but Atari invented them On the VCS and the 400/800 were the first computers with “sprites”. so....they “are allowed” to be a bit strange....? 3 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted August 20, 2020 Share Posted August 20, 2020 Nowadays I use modern FastBasic but I remember that this machine language routine for Basic published by Page6 magazine was simple and worked well: http://www.page6.org/archive/issue_13/page_32.htm I put it in the attached disk: Page6 - PMG routine.atr Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.