Jump to content

notwhoyouthink

Banned
  • Posts

    124
  • Joined

Posts posted by notwhoyouthink

  1. Fix it with

    69 GOTO 62

    before you run it.

    I made this in Magellan and tested it in classic99.

    I decided to RES 1,1 it before i shared it, but had no idea the goto would end up at some crazy line number when i did that.

    Sorry.

    Patched version:

     

    1 DATA 32,24
    2 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    3 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    4 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    5 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    6 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    7 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    8 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    9 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    10 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    11 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    12 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    13 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    14 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    15 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    16 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    17 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    18 DATA 32,32,32,32,50,50,50,50,32,32,32,48,48,48,48,32
    19 DATA 32,32,49,49,32,32,32,56,56,56,56,32,32,32,32,32
    20 DATA 32,32,32,32,32,32,32,32,50,32,48,32,32,32,32,48
    21 DATA 32,49,49,49,32,32,56,32,32,32,32,56,32,32,32,32
    22 DATA 32,32,32,32,32,32,32,32,50,32,48,32,32,32,32,48
    23 DATA 32,32,49,49,32,32,56,32,32,32,32,56,32,32,32,32
    24 DATA 32,32,32,32,50,50,50,50,32,32,48,32,32,32,32,48
    25 DATA 32,32,49,49,32,32,32,56,56,56,56,32,32,32,32,32
    26 DATA 32,32,32,50,32,32,32,32,32,32,48,32,32,32,32,48
    27 DATA 32,32,49,49,32,32,56,32,32,32,32,56,32,32,32,32
    28 DATA 32,32,32,50,32,32,32,32,32,32,48,32,32,32,32,48
    29 DATA 32,32,49,49,32,32,56,32,32,32,32,56,32,32,32,32
    30 DATA 32,32,32,32,50,50,50,50,32,32,32,48,48,48,48,32
    31 DATA 32,49,49,49,49,32,32,56,56,56,56,32,32,32,32,32
    32 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    33 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    34 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    35 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    36 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    37 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    38 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    39 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    40 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    41 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    42 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    43 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    44 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    45 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    46 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    47 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    48 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    49 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
    50 CALL CLEAR
    51 CALL COLOR(3,1,1)
    52 CALL COLOR(4,1,1)
    53 PRINT "LOADING ..."
    54 RESTORE 1
    55 READ W,H
    56 FOR Y=1 TO H
    57 FOR X=1 TO W
    58 READ CP
    59 CALL VCHAR(Y,X,CP)
    60 NEXT X
    61 NEXT Y
    62 FOR X=3 TO 16
    63 CALL SCREEN(X)
    64 FOR Y=16 TO 3 STEP-1
    65 CALL COLOR(3,Y,Y)
    66 CALL COLOR(4,Y,Y)
    67 NEXT Y
    68 NEXT X
    69 GOTO 62

     

     

    And, just in case you want to bring in 2019 in the same fashion, here is a program for next year:2019.txt

    • Like 1
  2. Automotion-sprites in basic, to me, do not seem to be of much use.

    However, as Morphy and my own parsec sprite demo with moveable user controlled sprites (Post #60) has shown, useful things can still be accomplished.

    I have a couple of ideas cooking for games using this.

    For now, i will experiment with simple games like tower of hanoi, tic tac toe, hangman, and rock paper scissors.

    Assuming they turn out decent, i will release them here on Atariage forum.

    Of coarse there is always real life to suck my TI time away from me, but that's just the way it is.

  3. My real 99/4A doesn't like something about these programs but I'm not sure what it doesn't like. I pasted these into Classic99 and then transferred them to my nanoPEB and 99/4A locks up after running the setup program. TI BASIC restarts, but attempting to load the demo program locks up the TI. I can't imagine it makes a difference, but the programs from above that I used to make the video with, I typed in by hand. (Those only work from cassette, oddly).

    I'm sorry to hear that.

    I have been so busy playing with this in classic99 that i have totally forgotten to test any of these on real TI's.

    Then again, i do not have a nanopeb, so it may be a specific problem to that particular configuration.

    Hopefully senior_falcon can offer some advice?

  4. BTW, it looks like I have figured out how to do it all from within one program and bypass the need for the separate initializer program. If so this would allow 4 moving sprites. But it's late, I'm tired and will sign off for now.

     

    Very interesting!

    Hope you can get somewhere with that idea!

     

    I really think that useful programs can be developed with this technique using nothing but TI BASIC. Morphy is a good example.

     

    For an encore, in the next day or so I will release a simple demo that has 3 moving sprites, using nothing but legal TI BASIC statements. (In theory you could use four if I could figure out a way to put a >DO at v0320.) Oh yes, also you can have 8x8 blocks in all 15 colors without using any character definitions!

     

    I will expect to see a nice demo using this from "notwhoyouthink".

     

    In the meantime though, i believe you wanted to see me use this new version, so "Let's a go!"

    You should know the drill by now. Load the first listing and run it, then load the second listing and run it.

    Setup program:

    10 FOR I=1 TO 128
    20 READ X
    30 F$=F$&CHR$(X)
    40 NEXT I
    50 OPEN #1:F$
    100 DATA 0,0,0,0,0,0,0,0,227,0,131,150,216,32,131,82,131,212,200,32,131,84,131,196,16,40,0,0,0,0,0,0
    110 DATA 0,0,0,0,0,0,55,215,158,128,0,0,0,0,0,0,0,0,0,0,0,0,33,111,0,0,0,0,0,0,0,0,0,0,0,0,0
    120 DATA 0,0,0,0,0,0,0,136,32,131,36,131,190,22,11,16,1,0,0,215,224,1,40,215,224,0,0,216,32,0,144,131
    130 DATA 122,4,224,131,196,4,91,0,0,0,0,0,0,0,0,7,216,0,0,0,0,131,86,0,0,0,0
    

    Main demo:

    1 CALL CLEAR
    2 CALL SCREEN(6)
    3 FOR X = 68 TO 79
    4 READ X$
    5 CALL CHAR(X,X$)
    6 NEXT X
    100 CALL COLOR(1,5,5)
    110 CALL COLOR(2,5,5)
    120 CALL COLOR(3,11,5)
    130 CALL COLOR(4,1,16)
    150 CALL COLOR(5,5,5)
    160 CALL COLOR(6,5,5)
    170 CALL COLOR(7,11,9)
    180 CALL COLOR(8,1,9)
    200 CALL COLOR(9,5,5)
    210 CALL COLOR(10,5,5)
    220 CALL COLOR(11,11,13)
    230 CALL COLOR(12,1,2)
    250 CALL COLOR(13,14,1)
    270 CALL CHAR(144,"02000000F4")
    280 CALL CHAR(145,"F5000000F6")
    290 CALL CHAR(146,"FCF40000FCF4")
    300 CALL CHAR(147,"FCF4")
    310 CALL CHAR(152,"1122334455667788")
    320 CALL CHAR(153,"99AABBCCDDEEFF10")
    330 CALL CHAR(154,"1010101010101010")
    340 CALL CHAR(155,"1010101010101010")
    350 CALL SOUND(600,110,30)
    360 CALL SOUND(10,110,30)
    365 CALL CHAR(144,"0")
    370 CALL CHAR(145,"0")
    380 FOR X = 1 TO 143
    390 READ R,C,CHAR
    400 CALL HCHAR(R,C,CHAR)
    410 NEXT X
    420 GOTO 420
    900 DATA 000F1F3F2B6B7F55
    901 DATA 4141202A1F030000
    902 DATA 00C0F09868ECDCFC
    903 DATA FEFEFEFCF0C00000
    904 DATA 000000000000002A
    905 DATA 3E3E1F1500000000
    906 DATA 0000000000000000
    907 DATA 0000000000000000
    908 DATA 0F10204054948080
    909 DATA 80804040201C0300
    910 DATA C030086494122202
    911 DATA 010101020C30C000
    912 DATA 9,14,200
    913 DATA 9,15,200
    914 DATA 9,16,200
    915 DATA 9,17,200
    916 DATA 9,18,200
    917 DATA 10,13,200
    918 DATA 10,14,200
    919 DATA 10,15,200
    920 DATA 10,16,200
    921 DATA 10,17,200
    922 DATA 10,18,200
    923 DATA 10,19,200
    924 DATA 10,20,200
    925 DATA 10,21,200
    926 DATA 11,13,232
    927 DATA 11,14,232
    928 DATA 11,15,232
    929 DATA 11,16,240
    930 DATA 11,17,240
    931 DATA 11,18,160
    932 DATA 11,19,240
    933 DATA 12,12,232
    934 DATA 12,13,240
    935 DATA 12,14,232
    936 DATA 12,15,240
    937 DATA 12,16,240
    938 DATA 12,17,240
    939 DATA 12,18,160
    940 DATA 12,19,240
    941 DATA 12,20,240
    942 DATA 12,21,240
    943 DATA 13,12,232
    944 DATA 13,13,240
    945 DATA 13,14,232
    946 DATA 13,15,232
    947 DATA 13,16,240
    948 DATA 13,17,240
    949 DATA 13,18,240
    950 DATA 13,19,160
    951 DATA 13,20,240
    952 DATA 13,21,240
    953 DATA 13,22,240
    954 DATA 14,13,232
    955 DATA 14,14,240
    956 DATA 14,15,240
    957 DATA 14,16,240
    958 DATA 14,17,240
    959 DATA 14,18,160
    960 DATA 14,19,160
    961 DATA 14,20,160
    962 DATA 14,21,160
    963 DATA 15,14,240
    964 DATA 15,15,240
    965 DATA 15,16,240
    966 DATA 15,17,240
    967 DATA 15,18,240
    968 DATA 15,19,240
    969 DATA 16,13,200
    970 DATA 16,14,200
    971 DATA 16,15,184
    972 DATA 16,16,200
    973 DATA 16,17,200
    974 DATA 16,18,184
    975 DATA 16,19,200
    976 DATA 16,20,200
    977 DATA 17,12,200
    978 DATA 17,13,200
    979 DATA 17,14,200
    980 DATA 17,15,184
    981 DATA 17,16,200
    982 DATA 17,17,200
    983 DATA 17,18,184
    984 DATA 17,19,200
    985 DATA 17,20,200
    986 DATA 17,21,200
    987 DATA 18,11,200
    988 DATA 18,12,200
    989 DATA 18,13,200
    990 DATA 18,14,200
    991 DATA 18,15,184
    992 DATA 18,16,184
    993 DATA 18,17,184
    994 DATA 18,18,184
    995 DATA 18,19,200
    996 DATA 18,20,200
    997 DATA 18,21,200
    998 DATA 18,22,200
    999 DATA 19,11,240
    1000 DATA 19,12,240
    1001 DATA 19,13,200
    1002 DATA 19,14,184
    1003 DATA 19,15,240
    1004 DATA 19,16,184
    1005 DATA 19,17,184
    1006 DATA 19,18,240
    1007 DATA 19,19,184
    1008 DATA 19,20,200
    1009 DATA 19,21,240
    1010 DATA 19,22,240
    1011 DATA 20,11,240
    1012 DATA 20,12,240
    1013 DATA 20,13,240
    1014 DATA 20,14,184
    1015 DATA 20,15,184
    1016 DATA 20,16,184
    1017 DATA 20,17,184
    1018 DATA 20,18,184
    1019 DATA 20,19,184
    1020 DATA 20,20,240
    1021 DATA 20,21,240
    1022 DATA 20,22,240
    1023 DATA 21,11,240
    1024 DATA 21,12,240
    1025 DATA 21,13,184
    1026 DATA 21,14,184
    1027 DATA 21,15,184
    1028 DATA 21,16,184
    1029 DATA 21,17,184
    1030 DATA 21,18,184
    1031 DATA 21,19,184
    1032 DATA 21,20,184
    1033 DATA 21,21,240
    1034 DATA 21,22,240
    1035 DATA 22,13,184
    1036 DATA 22,14,184
    1037 DATA 22,15,184
    1038 DATA 22,18,184
    1039 DATA 22,19,184
    1040 DATA 22,20,184
    1041 DATA 23,12,232
    1042 DATA 23,13,232
    1043 DATA 23,14,232
    1044 DATA 23,19,232
    1045 DATA 23,20,232
    1046 DATA 23,21,232
    1047 DATA 24,11,232
    1048 DATA 24,12,232
    1049 DATA 24,13,232
    1050 DATA 24,14,232
    1051 DATA 24,19,232
    1052 DATA 24,20,232
    1053 DATA 24,21,232
    1054 DATA 24,22,232
    
    • Like 9
  5.  

    gallery_34177_1071_873629.gif

     

    To see the demo, copy and paste the first program into TI BASIC, save if desired and then RUN. Then copy and paste the second program into TI BASIC, save if desired and RUN. You will see 3 sprites and 15 unused character sets in all 15 colors. These are available for graphics. When the program breaks you will see some colorful things going on as the sprite motion routine changes the color table. This is not a crash and you can type BYE with the expected results.
    10 FOR I=1 TO 128

    20 READ X

    30 F$=F10 FOR I=1 TO 128 20 READ X 30 F$=F$&CHR$(X) 40 NEXT I 50 OPEN #1:F$ 100 DATA 0,0,0,0,0,0,0,0,227,0,131,150,216,32,131,82,131,212,200,32,131,84,131,196,16,40,0,0,0,0,0,0 110 DATA 0,0,0,0,0,0,55,215,158,128,0,0,0,0,0,0,0,0,0,0,0,0,33,111,0,0,0,0,0,0,0,0,0,0,0,0,0 120 DATA 0,0,0,0,0,0,0,136,32,131,36,131,190,22,11,16,1,0,0,215,224,1,40,215,224,0,0,216,32,0,144,131 130 DATA 122,4,224,131,196,4,91,0,0,0,0,0,0,0,0,7,216,0,0,0,0,131,86,0,0,0,0 amp;CHR$(X)

    40 NEXT I

    50 OPEN #1:F$

    100 DATA 0,0,0,0,0,0,0,0,227,0,131,150,216,32,131,82,131,212,200,32,131,84,131,196,16,40,0,0,0,0,0,0

    110 DATA 0,0,0,0,0,0,55,215,158,128,0,0,0,0,0,0,0,0,0,0,0,0,33,111,0,0,0,0,0,0,0,0,0,0,0,0,0

    120 DATA 0,0,0,0,0,0,0,136,32,131,36,131,190,22,11,16,1,0,0,215,224,1,40,215,224,0,0,216,32,0,144,131

    130 DATA 122,4,224,131,196,4,91,0,0,0,0,0,0,0,0,7,216,0,0,0,0,131,86,0,0,0,0

     

    The sprite magnification can be changed in line 100 - the 227 can be a value from 224 to 227 for sprite magnifications 1-4.

    90 REM 1ST SPRITE:row=44;col=44;pattern=A4-60=44;white(16)

    100 CALL COLOR(1,5,5)

    110 CALL COLOR(2,5,5)

    120 CALL COLOR(3,11,5)

    130 CALL COLOR(4,1,16)

    140 REM 2nd Sprite: row=66;col=66;pattern=a8-60=48;Magenta(14)

    150 CALL COLOR(5,7,7)

    160 CALL COLOR(6,7,7)

    170 CALL COLOR(7,11,9)

    180 CALL COLOR(8,1,14)

    190 REM 3rd Sprite:row=88;col=88;pattern=AC-60=4C;dark red(7)early clock on(9)

    200 CALL COLOR(9,9,9)

    210 CALL COLOR(10,9,9)

    220 CALL COLOR(11,11,13)

    230 CALL COLOR(12,9,7)

    240 REM 4th Sprite: row=>D0 to hide higher sprites

    250 CALL COLOR(13,14,1)

    260 REM

    270 CALL CHAR(144,"02000000F4")

    280 CALL CHAR(145,"F5000000F6")

    290 CALL CHAR(146,"0503000007F9")

    300 CALL CHAR(147,"FCF4")

    310 CALL CHAR(152,"1122334455667788")

    320 CALL CHAR(153,"99AABBCCDDEEFF10")

    330 CALL CHAR(154,"1010101010101010")

    340 CALL CHAR(155,"1010101010101010")

    350 CALL SOUND(600,110,30)

    360 CALL SOUND(10,110,30)

    365 CALL CHAR(144,"0")

    370 CALL CHAR(145,"0")

    380 FOR I=0 TO 255

    390 PRINT CHR$(I);

    400 NEXT I

    410 GOTO 410

    Here is a method that gives you up to 3 moving sprites using standard TI BASIC, using nothing but BASIC statements. It is similar to the earlier method that offers 32 sprites but no sprite motion. The challenge in making this work is that if you want to use automatic sprite motion the sprite attribute list must start at v0300. The only way TI BASIC can modify those memory locations is via CALL COLOR. In the color table, the first four sprite definitions cannot be accessed but sprites 5-8 can be. So there will be 8 sprites in all; the first 4 are invisible, the next 3 can move automatically, and the last one has its row set to >D0 to hide the remaining sprites.
    Four character definitions from 144 to 147 are used for the sprite motion table. Since the program is using the color table for sprites then there has to be a new color table. I put it so it can be modified by changing the character definitions from 152 to 155.
    As with the previous program that gives you 32 sprites, this one exploits a bug in OPEN that allows 128 bytes to be loaded into the scratchpad. Moving the color table by resetting VDP R3 to >1F is easy enough, but it reverts to the default value when you force a NEW. To get around that, the program sets up an interrupt routine that waits in the background. You can load a program and change it if desired. When you run the program it continues waiting until the program does a CALL CHAR(155,...) at which point it sets VDP R3 to use the new color table and enables motion for 7 sprites. This gives you a chance to set up the sprites and sprite motions in advance.
    The second program above is an example showing how to set up the sprites and I will also give a short description below.
    -----------------------------------------------------------------
    CALL COLOR is used to define a sprite.
    Sprite 1 is defined with COLOR 1-4
    Sprite 2 is defined with COLOR 5-8
    Sprite 3 is defined with COLOR 9-12
    Sprite 4 is defined with COLOR 13-17 and should have a row of >D0 to hide all higher sprites
    You have to think in hexadecimal for this. For row and column add 1 to each nybble. For Sprite #1
    For a row of >83 it should be CALL COLOR(1,9,4)
    For a row of >AB it should be CALL COLOR(1,11,12)
    For a column of >83 it should be CALL COLOR(2,9,4)
    To set the pattern to use, add 7 to the first nybble and 1 to the second.
    To use the pattern for “A” (>41) it should be CALL COLOR(3,11,2)
    To set the color of the sprite use the normal color value for BASIC. The first nybble should be 1 if you do not want to use the “early clock” or 9 if you want to set the early clock.
    To set the color to white (16) it should be CALL COLOR(4,1,16)
    To set the color to dark red with early clock on it should be (CALL COLOR(4,9,7)
    -------------------------------------------------------------------
    CALL CHAR 144 to 147 are used to set the sprite velocities.
    I suggest using CALL CHAR(144,”02000000F4”) and CALL CHAR(145,”F4000000F6”)
    Sprite motion is activated when you CALL CHAR(155,...) and you should follow that with CALL SOUND(600,110,30) and CALL CHAR(144,”0”) and CALL CHAR(145,”0”). This moves the 4 invisible sprites off the screen and stops them. This avoids having over 4 sprites on a line.
    Now for the sprites we care about:
    CALL CHAR(146,”0503000007F9”) sets sprite 1 to row velocity=5 and col velocity=3.
    Sprite 2 has row velocity=7 and col velocity=-7
    CALL CHAR(147,”FCF4”) sets sprite 3 row velocity=-4 and col velocity=-12
    (If the row velocity is positive then motion is downward and if the column velocity is positive then motion is to the right.)
    The new color table is set with CALL CHAR 152-155
    I recommend using the values that are in the demo:
    310 CALL CHAR(152,"1122334455667788")
    320 CALL CHAR(153,"99AABBCCDDEEFF10")
    330 CALL CHAR(154,"1010101010101010")
    340 CALL CHAR(155,"1010101010101010")
    The relocated color table lets you define the colors of all 256 characters. The unused characters from 0 to 23 and 160 to 255 can have their foreground and background colors set to the same color and that gives you an 8x8 block of all possible colors without using any of the normal characters. You can display these on the screen with HCHAR and VCHAR.
    The first character of each character set is:
    160 Black
    168 Medium Green
    176 Light Green
    184 Dark Blue
    192 Light Blue
    200 Dark Red
    208 Cyan
    216 Medium Red
    224 Light Red
    232 Dark Yellow
    240 Light Yellow
    248 Dark Green
    0 Magenta
    8 Gray
    16 White
    When programming, do not use characters 144 - 147 or 152 – 155 for graphics because they are needed by the sprite routines.

     

     

    This is a lot to wrap my head around. :-o

    And i had just started to get the hang of the old-version you originally posted.

    This is very, very impressive, senior_falcon.

    I am not getting the negative hex numbers though.

    How is FC and F4 equal to -4 and -12?

    Hexadecimal FC = 252 decimal.

    Hexadecimal F4 = 244 decimal.

    • Like 1
  6. I present a little program to display all 15 colors inside of a 8 pixel by 8 pixel character area.
    The CALL CHAR()'s in the program are displaying the 'period' character [CHR$(46)] at just the right places to form a 8x8 grid of colored dots.
    Strobe effect used to fill in the last spot since one of the colors on the ti is not really a 'color' (transparent).
    First run this:

    10 FOR I=1 TO 128
    20 READ X
    30 F$=F$&CHR$(X)
    40 NEXT I
    50 OPEN #1:F$
    100 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,248
    110 DATA 55,215,158,200,0,255,0,0,0,0,0,159,34,0,0,0,33,111,0,0,0,0,0,0
    120 DATA 32,0,33,224,42,93,3,179,216,32,131,186,131,212,215,224,131,189,215,224,131,188
    130 DATA 215,224,131,191,215,224,131,190,4,224,131,196,216,32,131,187,140,0,4,91,0,0,0,0,0,0,0,0
    140 DATA 224,208,133,15,71,128,53,103,0,0,131,144,0,0,33,111
    

    Then run this:

    10 CALL CLEAR
    20 CALL CHAR(144,"53778E0153798E02")
    30 CALL CHAR(145,"537B8E03537D8E04")
    40 CALL CHAR(146,"55778E0555798E06")
    50 CALL CHAR(147,"557B8E07557D8E08")
    60 CALL CHAR(148,"57778E0957798E0A")
    70 CALL CHAR(149,"577B8E0B577D8E0C")
    80 CALL CHAR(150,"59778E0D59798E0E")
    90 CALL CHAR(151,"597B8E0FD0")
    100 FOR X=1 TO 16
    110 CALL SCREEN(X)
    120 NEXT X
    130 GOTO 100
    • Like 1
  7. I do not remember which user on here originally made this, but it is a scrolling demo of a figure walking against a brick wall.

    Just for the fun of it, i have converted it to run in TI Basic with a sprite. Just a bit slower then the XB original.

    (Sorry, i really have no idea who the original poster was. It was found in some thread where people were showing off little odds and ends they had come up with.)

    walking sprite in basic.txt

    • Like 4
  8. Excuse my ignorance, but why is it not possible to combine the two steps into one?

    You mean the two separate programs?

    I believe the first program contains, essentially, embedded assembly code.

    I don't pretend to understand it myself, but apparently this assembly code manages to reset the basic interpreter after running?

    That is what it seems to me to be doing.

    After running the first program you are be back at a Ti Basic Ready prompt.

    No basic program left in memory after the assembly code ran, but it managed to modify some VDP registers.

    Senior_falcon could explain this better i think.

  9. post-46238-0-72796800-1514280075_thumb.png

    Here is an updated version of my parsec sprite demo.

    The ship and "TI-99/4A" are still sprites and rendered using senior_falcon's method, but i have added a small landscape using traditional methods, plus you get to steer the ship now with the ESDX keys (Make sure alphalock is on.)

    First, run this: parsec setup.txt

    Then run this (I think line 8 is a little long to paste OK, but it is only a rem line.): parsec demo.txt

    Your ship will disappear if you cross the text in the middle of the screen, but will reappear when you underneath it (the "text" is actually a row of 4 sprites).

    • Like 5
  10. I used to use POS() to convert single-digit hex to decimal and SEG$() to convert back. You will need to divide up your sprite CHAR definitions to deal with them individually rather than how you propose to work with an entire string.

     

     

    DECIMAL=POS("0123456789ABCDEF",HEX$,1)-1
    
    HEX$=SEG$("0123456789ABCDEF",DECIMAL+1,1)
    

     

     

    You could use this method to convert multiple digits one-at-a-time by multiplying or dividing by the positional value: 0, 16, 256, 4096, etc. The -1 and +1 are to account for POS() and SEG$() starting at position 1 rather than 0.

     

     

    10 REM  CONVERT TWO-DIGIT HEXADECIMAL TO DECIMAL
    15 INPUT "TWO-DIGIT HEX NUMBER: ":HEX$
    16 REM  NO ERROR CHECKING ON HEX$
    20 DECIMAL=0
    30 FOR P=0 TO 1
    40 DIGIT=POS("0123456789ABCDEF",SEG$(HEX$,2-P,1),1)-1
    50 DECIMAL=DECIMAL+DIGIT*(16^P)
    60 NEXT P
    70 PRINT :HEX$;" IS";DECIMAL;"IN DECIMAL.":::
    80 GOTO 10


    10 REM  CONVERT DECIMAL BETWEEN 0 AND 255 TO HEXADECIMAL
    15 INPUT "DECIMAL NUMBER (0-255): ":DECIMAL
    16 IF (DECIMAL<0)+(DECIMAL>255)THEN 15
    20 DIGIT1=INT(DECIMAL/16)
    30 DIGIT2=DECIMAL-(DIGIT1*16)
    40 HEX$=SEG$("0123456789ABCDEF",DIGIT1+1,1)&SEG$("0123456789ABCDEF",DIGIT2+1,1)
    50 PRINT :DECIMAL;"IN HEXADECIMAL IS ";HEX$:::
    60 GOTO 15

     

     

    You could also use a string to replace the "0123456789ABCDEF" literals. In my experience this is a slow and expensive process in TI BASIC. I never developed anything beyond this but I suspect there is a better method.

     

     

    While fixing a bug in my quick-n-dirty above, I also expanded it to convert ANY length hexadecimal number to decimal.

     

     

    10 REM  CONVERT HEXADECIMAL NUMBER TO DECIMAL
    15 INPUT "HEXADECIMAL NUMBER: ":HEX$
    16 REM  NO ERROR CHECKING ON HEX$
    20 DECIMAL=0
    30 FOR P=0 TO LEN(HEX$)-1
    40 DIGIT=POS("0123456789ABCDEF",SEG$(HEX$,LEN(HEX$)-P,1),1)-1
    50 DECIMAL=DECIMAL+DIGIT*(16^P)
    60 NEXT P
    70 PRINT :HEX$;" IS";DECIMAL;"IN DECIMAL.":::
    80 GOTO 10

     

     

    Lastly, here is one to convert any positive decimal whole number up to 4294967295 (hex FFFFFFFF) to a hexadecimal number.

     

     

    10 REM  CONVERT DECIMAL BETWEEN 0 AND 4294967295 TO HEXADECIMAL        
    20 INPUT "DECIMAL NUMBER: ":DECIMAL
    30 IF (DECIMAL<0)+(DECIMAL>4294967295)THEN 20
    40 PRINT :DECIMAL;"IN HEXADECIMAL ";
    50 FOR P=0 TO 7
    60 IF INT(DECIMAL/(16^P))=0 THEN 80
    70 NEXT P
    80 HEX$=""
    90 FOR R=P+(P>0)TO 0 STEP -1
    100 S=16^R
    110 DIGIT=INT(DECIMAL/S)
    120 HEX$=HEX$&SEG$("0123456789ABCDEF",DIGIT+1,1)
    130 DECIMAL=DECIMAL-(DIGIT*S)
    140 NEXT R
    150 PRINT "IS ";HEX$:::
    160 GOTO 10

    Thanks for these. I will play around with these sometime and see if i can get my little parsec demo to have some sort of interactive element. :)

  11. I would avoid trying to create a subroutine or (far worse) function to do this kind of work.

     

    BASIC is going to be slow regardless and the best way to keep it moving fast is to hardcode as much as possible.

    But you can't hardcode something like player input.

    I was hoping to maybe get a user-controllable sprite moving around the screen.

    Player presses E, sprite moves up, and up, and up, until the E key is released.

    Etc...

    I hardcoded that parsec sprite demo, and thats pretty much all its good for in that state, a animation.

    But with a way to better modify the string, i could possibly get the sprite to react to input, a little more like a actual game.

  12. I want to point out that i am talking strictly about doing this in Basic, not Extended Basic, RXB, Forth or whatever, and no using Minimem for its added features either.

    Using the method that senior_falcon came up with for sprite usage under normal Basic, the sprites location, color, and character used are all handled through a CALL CHAR hex string (which actually effects 2 sprites at a time).

    I will not go into details of how it all works here, but basically, i need some way of taking for instance, the string 5760A10F5770A50F and modifying certain characters of that string (which, technically, is two strings ran together, one string per sprite. 8 ASCII characters / 4 two-digit hex values per sprite.), which will in turn effect the on-screen sprites.

    For instance, i can move the sprites from their current location to a new one by changing 5760A10F5770A50F to 5770A10F5780A50F.

    If i were dealing with hex numbers and not strings i could, for instance take the hex numbers 5760A10F for sprite 1 & 5770A50F for sprite 2, then add hex 100000 to each to get hex 5770A10F & hex 5780A50F, and run the 2 numbers together as a string "5770A10F5780A50F".

     

    I guess what i really need is something similar to STR$ and VAL that operate in hex mode instead of decimal to use as sub-routines.

    Then i could take my CALL CHAR string and convert it into a value, add/subtract a certain amount from it, then convert the result back into a string that i pass back to CALL CHAR.

    But i have no idea how to implement that (or even know if it is possible) under TI Basic.

    ... Is any of this making any sense to anyone, or am i just falling off of the deep end?

  13.  

    This is pretty much how to play the game. Aliens move about. Shoot the aliens, while avoiding collision with one. Here's Astro-PANIC! ... :)

     

    Brings back memories.

    This was the first game i successfully typed into my c64. :-D

    While this one is good, the one i really got to liking a lot was E.D. Dragonfly.

    Really got a kick out of the funny deaths, like the soldiers beating you up. :)

    (Don't think it's shown in the video. Play it on Winvice and let a soldier get you. They beat you up with that stick they carry.)

    https://youtu.be/o-Q0uLs67D8

    • Like 1
  14. This technique was too fascinating to me. I just had to do something with it :)

    This works in Classic99, but it should work on console from tape/disk also (But i have not actually tried it on real hardware).

    I made a tiny little "demo" of sorts.
    From TI Basic, first load/(copy/paste) this program:

     

    1 REM SETUP-PROGRAM
    10 FOR I=1 TO 128
    20 READ X
    30 F$=F$&CHR$(X)
    40 NEXT I
    50 OPEN #1:F$
    100 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,248
    110 DATA 55,215,158,200,0,255,0,0,0,0,0,159,34,0,0,0,33,111,0,0,0,0,0,0
    120 DATA 32,0,33,224,42,93,3,179,216,32,131,186,131,212,215,224,131,189,215,224,131,188
    130 DATA 215,224,131,191,215,224,131,190,4,224,131,196,216,32,131,187,140,0,4,91,0,0,0,0,0,0,0,0
    140 DATA 226,208,133,15,71,128,53,103,0,0,131,144,0,0,33,111
    

     

     

    RUN it, then load/(copy/paste) the following program:

     

    1 REM PARSEC "SPRITE" DEMO
    2 CALL CLEAR
    3 CALL SCREEN(2)
    9 REM SETUP CHARACTERS
    10 FOR X=65 TO 79 STEP 2
    11 CALL CHAR(X,"")
    12 NEXT X
    13 RESTORE
    14 FOR X=64 TO 78 STEP 2
    15 READ X$
    16 CALL CHAR(X,X$)
    17 NEXT X
    18 FOR X=80 TO 83
    19 READ X$
    20 CALL CHAR(X,X$)
    21 NEXT X
    49 REM SETUP "SPRITES"
    50 CALL CHAR(144,"5760A10F5770A50F")
    51 CALL CHAR(145,"5780A90F5790AD0F")
    59 REM MOVE SHIP
    60 FOR X=1 TO 31
    61 READ X$
    62 CALL CHAR(146,X$)
    63 NEXT X
    64 RESTORE 913
    69 REM LOOP SHIP ANIMATION
    70 GOTO 60
    899 REM DATA
    900 DATA 007C101010101010
    901 DATA 0038101010101038
    903 DATA 000000007C000000
    904 DATA 003844443C040830
    905 DATA 003844443C040830
    906 DATA 0000040810204000
    907 DATA 00081828487C0808
    908 DATA 003844447C444444
    909 DATA 0000003E1108FF80
    910 DATA 47641820FF000000
    911 DATA 000000000080F038
    912 DATA 9C077C8000000000
    913 DATA 4900B002D0
    914 DATA 4908B002D0
    915 DATA 4910B002D0
    916 DATA 4918B002D0
    917 DATA 4920B002D0
    918 DATA 4928B002D0
    919 DATA 4930B002D0
    920 DATA 4938B002D0
    921 DATA 4940B002D0
    922 DATA 4948B002D0
    923 DATA 4950B002D0
    924 DATA 4958B002D0
    925 DATA 4960B002D0
    926 DATA 4968B002D0
    927 DATA 4970B002D0
    928 DATA 4978B002D0
    929 DATA 4980B002D0
    930 DATA 4988B002D0
    931 DATA 4990B002D0
    932 DATA 4998B002D0
    933 DATA 49A0B002D0
    934 DATA 49A8B002D0
    935 DATA 49B0B002D0
    936 DATA 49B8B002D0
    937 DATA 49C0B002D0
    938 DATA 49C8B002D0
    939 DATA 49D0B002D0
    940 DATA 49D8B002D0
    941 DATA 49E0B002D0
    942 DATA 49E8B002D0
    943 DATA 49F0B002D0
    

     

     

    All graphics seen on the screen are done using senior_falcon's method.
    Enjoy.

    • Like 7
  15. This my THANKS to all the community. be a 99er at today could not be so nice without this community.

    I do not feel to do particular names because i think that at least all people is important, this want be just a general thanks dedicated to all :)

     

    i am agree with every word in your post but i have to point out that MORPHY was born for TI-BASIC and pure Basic code already in 1984 from Tesioware developers that developed the TI Sprite method for their game. :)

     

    True, but i personally could never make heads or tails of how or why it worked.

    Senior_falcon's method and explanation put in pretty understandable terms for me.

     

    I do thank Tesioware developers for making the game in first place.

    • Like 1
×
×
  • Create New...