Short unattended type-in's

This follows a similar topic on the BBC/Acorn forum (said topic can be found here if interested) , I thought it would be fun to see what we could do with our Speccy's in a similar vein really.

All that's required is something to see and / or hear for an unattended machine. The listing must be "short and sweet" though, nothing that would take too long to manually type in if required. A bit of assembly I guess is OK though.

It should not require any manual interaction once it runs though, but nothing says you can't add keypress detects to do "something" perhaps.

If you wanted an example here are two pics of (I did do three or four submissions actually) of my BBC Micro ones, just providing these so you can see what I mean if you did not wish to read the linked topic.

lPiDDac.png

0NqFbYM.png

And here is my quick Speccy one, coloured blocks. Care was taken to ensure that it did not try to go to the diagonal 'random but not random' pattern too quickly as well!

jgiSc9t.png

Listing in a codebox rather than a tape file for convenient(ish) copy/paste
10 BORDER 0 : POKE 23693,71 : CLS
20 FOR n=0 TO 128 STEP .25
30 LET a=(RND*768)+22528
40 POKE a,n : NEXT n
50 GOTO 20

Be interested to see what people come up with for our Speccy's. :D :D


EDIT... As an aside ages ago I used SimCoupe to do that "coloured lines" listing in the original Speccy manual in the appropriate mode, and it looked pretty good without the colour clash, quite similar actually to the 'B listing for the lines part.
Post edited by spider on

Comments

  • edited July 2018
    How about...

    100 BORDER 0: POKE 23693,0: CLS 
    110 FOR B=USR "A" TO USR "A"+7: READ C: POKE B,C: NEXT B: DATA 1,3,7,15,31,63,127,255
    120 DIM A(5): FOR B=1 TO 5: READ C: LET A(B)=C: NEXT B: DATA 66,86,116,101,104
    130 LET B=3: LET C=B
    140 FOR Y=0 TO 21: FOR X=0 TO 31
    150 POKE 23693,A(B): PRINT "\a";: LET B=B+1: IF B=6 THEN LET B=1
    160 NEXT X
    170 LET C=C+1: IF C=6 THEN LET C=1
    180 LET B=C: NEXT Y
    190 PRINT #1;AT 1,7; INK 7;"Sinclar ZX Spectrum"
    200 STOP 
    

    EDIT: the "\a" is UDG A and comes from a Basinc export.

    Paddy
    Post edited by Paddy Coleman on
  • I just posted this a week ago in some other thread:
    10 BORDER 0: PAPER 0: CLS 
    20 PRINT AT RND*19,RND*31; OVER 1; INK RND*4+3;"*";: GO TO 20
    
  • Here's a scrolling version:
    10 BORDER 0: PAPER 0: CLS 
    20 POKE 23692,5: FOR n=1 TO RND*3+2: PRINT AT 20,RND*31; OVER 1; INK RND*4+3;"*";: NEXT n: PRINT AT 21,0;,," ": GO TO 20
    
  • edited July 2018
    Excellent small routines, thanks both! :)

    @PaddyColeman , you can (if you wanted) use CHR$ 144 to replace "graphics A" :
    PRINT CHR$ 144;
    

    The effect is very good actually.

    Post edited by spider on
  • edited July 2018
    From the linked page, the woolball for SpecBAS:
    10 LET s=200:
       ORIGIN -400,-240 to 400,240:
       PLOT 0,0:
       FOR a=0 TO 126 STEP .000125:
          DRAW TO s*SIN a,s*COS a*SIN(a*.95):
       NEXT a
    

    I intentionally increased the number of lines by 2000 so you'd have a chance to see it being generated. It's still pretty quick though, blink and you'll miss it :)
    Post edited by Dunny on
  • edited July 2018
    Another one...

    100 BORDER 0: BRIGHT 1: PAPER 0: INK 1: CLS : FOR X=0 TO 255 STEP 5: PLOT 0,0: DRAW X,175: PLOT 255,0: DRAW -X,175: NEXT X: PRINT AT 18,6; INK 2;"Sinclair ZX Spectrum"; INK 7;AT 20,5;"Hi-Res Colour Graphics";AT 21,6;"Sound and 48K of RAM"
    

    Paddy
    Post edited by Paddy Coleman on
  • That's a nice effect too, its better than the Pyramid 'loading pic' :D

    Would be good if said type-in's repeated themselves or suchlike in that left to their own devices they would run forever. Having said that the "short and sweet" element has been very well met by all the routines I've seen in this topic! :D
  • edited July 2018
    This one takes advantage of SpecBAS's extended array-plotting, but it's trippy as hell:
    10 cl=1800: CONST x=0,y=1,clr=2,r=3,t=4,s=5:
       DIM c(cl+1,6) BASE 0:
       PALETTE 2,150,0,0:
       PAPER 2:CLS
    20 FOR i=0 TO cl:
          LET c(i,x)=SCRW/2+COS(i/2)*i/4,
          LET c(i,y)=SCRH/2+SIN(i/2)*i/4:
       NEXT i
    30 DO:
          FOR i=0 TO cl:
             LET c(i,r)=ABS SIN (c(i,t)+=.05+i/9000)*8:
          NEXT i:
          CLS: PLOT c():
          WAIT SCREEN:
       LOOP
    

    Well worth tapping (or pasting) in and giving a quick whirl.
    Post edited by Dunny on
  • edited July 2018
    There is a comma in line 20 that will error should be a colon
    LET c(i,x)=SCRW/2+COS(i/2)*i/4, ( <- ) :(
    LET c(i,x)=SCRW/2+COS(i/2)*i/4: :)


    but nice effect :))
    Post edited by ASH-II on
  • Useful drawing effect:

    10 PLOT 128,87: DRAW 50,50,300

    Try the draw with another huge value, you will see different effect: 450, 800, 4000, etc.

    Pgyuri
  • Not very exciting but...

    hmg90DB.png
  • ASH-II wrote: »
    There is a comma in line 20 that will error should be a colon
    LET c(i,x)=SCRW/2+COS(i/2)*i/4, ( <- ) :(
    LET c(i,x)=SCRW/2+COS(i/2)*i/4: :)


    but nice effect :))

    Ah, bugger :)

    I was converting lines to LET to make it more readable!
  • Here's one.
    5 BORDER 0: PAPER 0: CLS
    10 LET a=RND/10: LET b=RND/10: LET c=1: LET i=0: LET o=0
    20 PLOT 128-COS o*127,88+SIN o*87: DRAW -(128-COS o*127-(128-COS i*84)),-SIN o*87+SIN i*44
    30 LET i=i+a: LET o=o+b
    40 INK c: LET c=c+1: IF c=8 THEN LET c=1
    45 IF INKEY$=" "THEN RUN
    50 GO TO 20
    
  • Here's one.
    I like! :D

    Incidentally the routine for line drawing from the Speccy manual, this one:

    FwZyUJw.png

    Here is what is looks like and also what it looks like *without* colour clash. This was done firstly with Spin and SE-Basic enabled then on SimCoupe in the Speccy screen mode, using Speccy colours:

    w8nQMsU.jpg
  • Anyone have any more 'unattended' *simple* routines please ? Keyword here being simple, no massive listings lol :))

    Ideally ones that will just keep running and 'do things' without further interaction once they are fired up.
  •   10 BORDER 0: PAPER 0: INK 9: BRIGHT 1: CLS : OVER 1: LET c=1
      20 FOR d=1 TO 175
      30 FOR n=d TO 175 STEP d
      35 INK c: LET c=c+1: IF c=8 THEN LET c=1
      40 PLOT 40+n,0: DRAW -n,n
      50 PLOT 215-n,0: DRAW n,n
      60 PLOT 40+n,175: DRAW -n,-n
      70 PLOT 215-n,175: DRAW n,-n
      80 NEXT n
      90 NEXT d
     100 GO TO 20
    
    How about that?
  • edited July 2018
    Here you go...

    100 BORDER 0: PAPER 0: INK 1: CLS 
    110 LET L=1: FOR R=176 TO 7 STEP -13: FOR I=1 TO L: PLOT 0,R-I: DRAW 255,0: NEXT I: LET L=L+1: NEXT R
    120 PRINT #0;AT 1,4;"SINCLAIR ZX SPECTRUM 48K": STOP 
    

    Paddy
    Post edited by Paddy Coleman on
  • edited August 2018
    OK here is one based on the listing from CH17 of the Basic Manual, as I posted an image of a few posts up the topic, this is more like my BBC Micro 'flecks' however:

    Copy/paste listing etc:
    10 BORDER 0: PAPER 0: INK 7: BRIGHT 1: CLS
    20 LET X1=0: LET Y1=0
    30 FOR C=0 TO 7 STEP .1
    40 LET X2=INT (RND*256) : LET Y2=INT (RND*176)
    50 IF INT (RND*10)>6 THEN DRAW INK C,X2-X1,Y2-Y1: GOTO 70
    60 DRAW OVER 1; INK 0;X2-X1,Y2-Y1
    70 LET X1=X2: LET Y1=Y2: NEXT C
    80 GOTO 30
    

    Pic / listing pic:

    CGLB6wU.png

    Erm, enjoy ? :)) :)
    Post edited by spider on
  • edited August 2018
    Ooh, nice. So... The POKEs set the paper and border to black. It draws 10 connected lines in a colour and then switches up to the next colour... then when it's done with white (7) it loops back to black again. For added spice, it un-draws lines if a 40% chance comes through.

    So I converted it to SpecBAS and then optimised it a little:
    10 paper 0:window origin 0,0,0 to 1,1: cls
    20 for c=0 to 7 step .1: draw ink c;inverse rnd<.9;to rnd,rnd: next c: wait screen: go to 20 
    

    It does exactly the same, only the chances of inverting (un-drawing) are higher at 90%. This is because SpecBAS draws lines too fast and it ends up a chaotic mess - this way it looks a little more restrained :)
    Post edited by Dunny on
  • edited August 2018
    Yes I'd of liked to of used ELSE to shorten the listing but someone forgot to add that to ZXBasic :D

    I'll try your listing late when I can install / run SpecBas, I do not have it on this machine I'm using at this moment.

    Colours yes that is bright white ink, I had to add the Border as well first otherwise it does not immediately change. Come to think of it a CLEAR might of made it work instead of a CLS but it does not matter.

    I just find its quicker to use those pokes to set the paper/border colours plus it means I can have say bright in the border area (well lines 22+23 to be accurate not the whole border) too. :)
    Post edited by spider on
  • Time for another quick and useless one:
    10 LET A = (RND*768)+22528
    20 LET B = (RND*127)
    30 IF A (RND*100) > 45 THEN LET B=56 : RANDOMIZE 
    40 POKE A , B
    50 GOTO 10
    

    I tried to avoid the 'repeating' diagnol' pattern you tend to get with a little sucess. I think if the 'random' check then did a loop of say a random number (min 10 max 100) of blanks then returned to colours it would probably be better, easy enough to do probably better to then put the 'random picks for the address' into a GOSUB or such to save typing it twice.

    Anyway 'as it is' here's a pic:

    BYkX5Xs.gif
  • j0zrqJF.png

    The usual poke attributes into random locations stuff. This time with horizontal symmetry for a pseudo Rorschach pattern effect.
       10 BORDER 0: PAPER 0: CLS 
       20 FOR n=9 TO 54 STEP 9
       30 LET x=INT (RND*16)
       40 LET y=22528+32*INT (RND*24)
       50 POKE y+x,n
       60 POKE y+30-x,n
       70 NEXT n
       80 GO TO 20
    
    Thanked by 1spider
  • Thanks for posting, that's quite a good one in both its symmetry effect and the fact*** it does not do the 'not random' diagonal lines.

    ** The random effect can be seen but its usually blue in this case.

    I did with mine add that extra "IF" line to try to make sure it did not look bad too quickly, if you chopped out Line 30 on my listing you'd see it almost very quickly looked boring!

    +1 for your listing! :D
    Thanked by 1JianYang
  • Actually that "stripiness" effect comes from the fact that you use random numbers for address and content. If you would only use it for the address and run through the attribute values in some logical, non-random order, the effect should not be there.

    Example:
       10 LET b=0
       20 LET a=(RND*768)+22528
       30 POKE a,b
       40 LET b=b+11
       50 IF b>127 THEN LET b=b-128
       60 GO TO 20
    

    LVhan8B.png
    Thanked by 1spider
  • edited May 2019
    Nervous chequered chameleon worm trapped in a kaleidoscope
       10 BORDER 0: POKE 23693,6: CLS 
       20 LET x=7: LET y=6: LET x1=1: LET y1=0
       30 PRINT AT y,x;"\'.";AT y,31-x;"\.'";AT 21-y,x;"\.'";AT 21-y,31-x;"\'."
       40 LET x=x+x1: LET y=y+y1
       50 IF x<0 OR x>31 OR y<0 OR y>21 OR PEEK 23693=ATTR (y,x) OR RND>.8 THEN LET x=x-x1: LET y=y-y1: LET s=SGN (RND-.5): LET x1=(NOT x1)*s: LET y1=(NOT y1)*s: POKE 23693,10+INT (RND*44)
       60 GO TO 30
    

    NdvAnd0.png

    edit: "\'." and "\.'" are the graphics characters on key 6
    Post edited by JianYang on
    Thanked by 1spider
  • edited May 2019
    "\'." and "\.'" are the graphics characters on key 6

    :) Allow me to assist (its an excellent small type in!) , As you can if you wanted put CHR$ 134 for that instead:
    30 PRINT AT y,x;CHR$134;AT y,31-x;CHR$134;AT 21-y,x;CHR$134;;AT 21-y,31-x;CHR$134
    

    Post edited by spider on
    Thanked by 1JianYang
Sign In or Register to comment.