ClausB Posted June 25, 2020 Share Posted June 25, 2020 (edited) Bitmap graphics modes show bits as pixels. GR. 4 and 6 two-color modes use one bit per pixel, so it's fun to use them as windows into the Atari's memory. Type: GR.6 B=PEEK(560)+256*PEEK(561)+4 POKE B,0:POKE B+1,0 Now you see the first 1.5K of RAM. See the timers in page 0 ticking away. See the stack in page 1 flickering. See system variables change as you type something. Plug in a joystick and watch bits change when you move it. Type: POKE B+1,208 Now you see the Atari's special hardware registers. GTIA, POKEY, PIA, ANTIC. See POKEY timers and random number generator. Type keys and watch bits change. Move the stick and see PIA change. Watch the fire button bit in GTIA and the light pen register in ANTIC. Run this program and watch all the memory scroll by. Line 30 skips blank RAM. Change it if you like. Lines 60-85 print the page number in hex. If you prefer decimal just print A or H. Change line 1 to GR.4:S=10 if you want bigger bits. Have fun. Edited June 25, 2020 by ClausB 14 2 Quote Link to comment Share on other sites More sharing options...
Voxel Posted June 26, 2020 Share Posted June 26, 2020 For some reason I find stuff like this fascinating, like those early machines with LEDs blinking away. 3 Quote Link to comment Share on other sites More sharing options...
+skr Posted June 26, 2020 Share Posted June 26, 2020 Love that, too. Thanks for sharing! 2 Quote Link to comment Share on other sites More sharing options...
eegad Posted July 17, 2020 Share Posted July 17, 2020 Cool. Anyone have any other short (10 lines or less) Basic programs that do something interesting graphically? Way way back in the early 80s I had some very short Basic programs typed in and saved on cassette that did things like this, or that plotted out various mathematical functions. Used to like to watch these type of things when I was bored. Quote Link to comment Share on other sites More sharing options...
+skr Posted July 17, 2020 Share Posted July 17, 2020 I´ve spent hours playing with this one: 10 ? ;:POKE 82,0:? CHR$(6+RND(1));:GOTO 10 Add colors, sounds, whatever. Pure fun to me. 6 Quote Link to comment Share on other sites More sharing options...
Fierodoug5 Posted July 18, 2020 Share Posted July 18, 2020 Keep them coming, love these fun little programs! Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 18, 2020 Share Posted July 18, 2020 Hi! 2 hours ago, Fierodoug5 said: Keep them coming, love these fun little programs! This is a FastBasic sample, just one line: DI.S(33)B.:DA.R()B.=0,2,0,1,1,2,0:DA.C()B.=32,111,20,32:S(15)=1:P.752,1:R.:N=0:FORI=1 TO31:Q=S(I-1):PUTC(Q):S(I-1)=N:N=R(Q+S(I)+S(I+1)):N.:?:U.KEY() 3 Quote Link to comment Share on other sites More sharing options...
Preppie Posted July 18, 2020 Share Posted July 18, 2020 Translation of DMSC's into Atari BASIC 10 DATA 0,32,2,111,0,20,1,32,1,0,2,0,0,0 20 DIM S(33),R(9),C(9) 30 FOR I=0 to 6:READ A,B:R(I)=A:C(I)=B:NEXT I 40 S(15)=1:POKE 752,1:N=0 50 FOR I=1 TO 31 60 Q=S(I-1):? CHR$(C(Q));:S(I-1)=N:N=R(Q+S(I)+S(I+1)) 70 NEXT I:?:GOTO 50 4 Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 18, 2020 Share Posted July 18, 2020 (edited) And here it is another FastBasic sample: gr.7:c.1:da.sx()=1,1,-1,-1:da.sy()=1,-1,-1,1:x=100:y=36:d=1:for i=0 to 2047 d=(1+d+2*(0=i&(1+i exor(i-1))))&3:x=x+sx(d):y=y+sy(d):plot x,y:next:get i Have Fun! Edited July 18, 2020 by dmsc 2 Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 18, 2020 Share Posted July 18, 2020 Or the same but in one line of 119 chars: gr.7:c.1:da.s()=1,1,-1,-1,1:x=99:y=36:d=1:for i=0to2047:d=(1+d+2*(0=i&(1+i exor(i-1))))&3:x=x+s(d):y=y+s(d+1):pl.x,y:n. Have Fun! 2 Quote Link to comment Share on other sites More sharing options...
thank you Posted July 18, 2020 Share Posted July 18, 2020 12 hours ago, Preppie said: Translation of DMSC's into Atari BASIC 10 DATA 0,32,2,111,0,20,1,32,1,0,2,0,0,0 20 DIM S(33),R(9),C(9) 30 FOR I=0 to 6:READ A,B:R(I)=A:C(I)=B:NEXT I 40 S(15)=1:POKE 752,1:N=0 50 FOR I=1 TO 31 60 Q=S(I-1):? CHR$(C(Q));:S(I-1)=N:N=R(Q+S(I)+S(I+1)) 70 NEXT I:?:GOTO 50 at least in Altirra Basic and AltirraOS (on atari800 emulator) we also need to: 35 FOR I=0 to 32:S(I)=0:NEXT I Neat! Something less sophisticated... Quote Link to comment Share on other sites More sharing options...
Amis Posted July 19, 2020 Share Posted July 19, 2020 (edited) Awesome! and the best part - I no longer have to sit and copy from Antic Magazine the code by hand.. I just copy and paste! 2010 DIM X$(60):X$=".....all the apps destroyed..mission terminated...alien takeover" 2020 DIM A$(LEN(X$)),C$(LEN(X$)):A$=X$ 2030 POSITION 0,4:? #6;A$(1,20):C$=A$(2) :C$(LEN(C$)+1)=A$:A$=C$ 2040 FOR I=1 TO 30:NEXT I:SOUND RND(0)*3,RND(0)*255,10,RND(0)*8:IF PEEK(53279)<>6 THEN 2030 2050 FOR N=0 TO 3:SOUND N,0,0,0:NEXT N:GOTO 1060 Edited July 19, 2020 by RobVWA CODE 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.