-
Content Count
1,294 -
Joined
-
Last visited
-
Days Won
2
Posts posted by Retrospect
-
-
Lee's second example in post #18 does the trick:
3000 for l=1 to 32
3010 if n(l)<=0 then 3015
3012 nc=nc+1
3015 next l
Why the hell did I not think of that .....

Nice one Lee.
-
No need to speculate. Change line 3015:
3015 PRINT I; :: NEXT I
and see what it goes to. Like you, I think it will go up to 32, but it's easy enough to test.
Thanks I will give that a try. It never helps when I look back at code after sleep and it's twice as hard to see what I did.
-
I would most definitely use them were I to do anything significant in XB. I did, at least, mention SUBs a couple of posts back. |

...lee
I've tried SUBs once. It was awful. They don't seem to be able to hold existing variable values when you CALL them. But then again there will be a way to skin that cat.
-
Yes I didn't quite read your code correctly. You are jumping out of the loop to do a simple increment then jumping back in. However as has been pointed out, it's pointless to do that. Just put your code inside the loop. It will be faster. If you must jump out then use a GOSUB/RETURN. That's what's they're for. Even better than that, use SUBs (though I think I'm a voice in the wilderness on that one. Nobody seems to use them )

I can't see how it's possible to put the increment within the FOR-NEXT loop without having some sort of logic after a THEN ... which was what I was trying to avoid, but in doing so, I always end up with code all over the place, lol ...
Since if I don't use a THEN thing, the increment will go up every time the FOR meets the NEXT. I think?
My head's thrashed

-
That worked!
Obviously , I put an extra line of code in to tell the computer that A=INT(A) as well, and it's now spitting out random letters pretty quickly .... including the @ symbol strangely.

EDIT:
My line 20 should have said A=A+65. So Z will be missing unless I tell the computer that A=RND*27 ?
-
3100 nc=nc+1::goto 3015
That *can't* be right. Look at line 3015:
3000 for l=1 to 323010 if n(l)>0 then 31003015 next lWhen you jump back to 3015 the loop (started in 3000) has expired.So, does NEXT L actually * expire * the loop if it's not hit 32 yet? .... I was thinking, in my strange twisted logic, that if I point it back to line 3015 after it's incremented NC up one, that it would simply bounce back to the FOR until the loop reaches the number 32 ?
-
Yeah the C16 is capable when pushed by very clever coders - but the guys who did the 16 version of Ghosts 'n' Goblins didn't even look like they had the * intention * of pushing any boundaries - the software sprites are horrendous with the black background around them. If the game was to be recreated today, with what coders know now, it would be a lot better and probably more along the lines of the C64 version graphically just not as smooth, and the sound wouldn't be as nice either. But it wouldn't be offensive like the original version.
Like I said it looks like it was coded by someone who had been shown a book about ghosts n goblins and not someone who wanted it to represent the original game.
By the way, the thing I mentioned about the 4-sprite-in-a-line limit, if there was to be a TI version, having an effect on how many spears you can chuck at once - would that be a problem or could the spears / daggers / fireballs / whatever be drawn as software sprites or even CHARs ?
-
Lee & Willsy ... thanks, you are both on the nail ..... You know what, I have some really really bad coding habits! ..... I really do ... Lee your second example would be the one I should choose, since this program is meant to be for the Wilhelm Compiler and as such, I can't put logic after a THEN statement, I would do as your 2nd example does and branch the logic to another line .... but yeah if you wanna show anyone how NOT to code, just grab one of my lists.
lolI bet you lot despair of me sometimes.
-
1
-
-
At 3000, do you control the initial value of nc ?
No, it increments up 1 every time there is a value recognised in the array of N.
In fact, my program is stacked with problems, when you start the program, you will have to choose the ERASE NOTES option because it seems there are already 22 in there (?) .... looking back at my code after sleep is still no better than it was last night.
So after clearing the sequence, I start a new sequence and it asks for a value, I type one, it asks to save it or not, I say yes, I do this only 10 times then type a value below 110 to get back to the main menu .... I choose the "play sequence" option and it indeed does play the sequence of values I chose, but it then does something really unexpected and whacky .... instead of cutting off after my last value entered, it goes right to the max limit of 32 with little white noise beep type tones. Strange, really strange.
-
Looks like the Commodore 16 version was coded by someone who had been given a book about ghosts n goblins and not actually ever seen it for real ... lol .... I think the TI could pull off a half-decent G & G given that it could use 16-bit scratchpad ram to scroll the screen smoothly. It would fair okay with single-colour sprites .... the thing in question would be ... do you give Arthur the ability to fire multiple knives / spears in one go (3 else 4 at a time) ... as that presents the obvious problem of the 4-in-line sprite limitation (which would persuade coders to do an F18A version perhaps?) ..... the biggest problem being end of level bosses which might take up 2 sprites in width ....... That said, there are some really clever people on here that would get around all this somehow ... it would be great to see a TI version. The music could be good too, if it were optimised for the sound chip it's coded on and not attempting too much to 'get' the sound of the arcade. Polyphonic chord harmony in a gothic style using 3 channels.
Also - the pictures Rasmus show, I agree look disappointing - however ... there may be a better colour combination (for the trees) that better suits the palette of the TI99 rather than blatantly copying the other machine's colours and it comes out shocking..... This is what it is about 'port-overs' that sometimes lacked in quality, because they were ported and not tailored ... I've never seen evidence of a bad port on the TI but I've seen plenty for other machines.
-
I typed the code in, that is good
Love the bobbing sprites. I might try and get my head around how to address the chars to create different things.
Btw:-
does cortex basic have a CHR$ equivelant? ... for example I tried this little speed benchmark thing, and it wouldn't work for me.10 A=RND*26
20 A=A+64
30 PRINT CHR$(A);
40 GOTO 10
-
I did read somewhere that the reason the TI99 colour palette is as it is, with colour number 1 labelled as 'transparent' ... is because of some sort of video overlay capability?
-
Thanks Stuart.
So it will output machine code to cassette maybe?
Looks a nice machine from what I've seen of it, big and quirky.
-
It worked. In fact the line I was suspicious of , was actually line 120 on the code shown above - for some reason , earlier, I did something LIKE that and it spat out an error of some kind .... I'm using the wrong example with my code really 'cos I think I fluffed some arrays up.
It is the arrays .... we can't assign arrays and dims like TI basic. This Cortex basic seems much more like Atari Basic
Dim A$(4) does not work at all
Dim $A(4) works but not as we would expect it to. Sorry for the confusion. lol
-
Don't know much about Cortex BASIC, but Im guessing it does not require a double colon for statement separation..
Have you tried putting A=INT(A) and B=INT(B) on their own lines?
I'll try that ..... I downloaded the Cortex emulator when curiosity got the better of me. Now I have cortex problems lol
-
I hope I've put this thread in the right place on the forum - not sure really, but here goes.
The Powertran Cortex - I understand it has TI chips pretty much all over it's board
What I wanted to know:
1... does it have direct memory access to it's 9900-family CPU?
2... does it have 'bitmap' mode
3.... sprites can be assigned in Cortex Basic, but can it do coincidences and automotion?
4 ... why the heck does this not work in Cortex Basic?
100 A=RND*100 : A=INT(A)
110 B=RND*100 : B=INT(B)
120 IF A=B THEN 1000130 PRINT "NUMBERS DO NOT MATCH" : STOP
1000 PRINT "NUMBERS MATCH" : STOP
Thanks in advance for any help with my curiosities.
-
Can anyone tell me why this program has ended up like it is?
I've made a little program that tests sound values for me (because I'm hideously crap at coding sound)
It can store, and play, a sequence of notes (up to 32 just for the sake of a limit)
It plays all the stored notes - but then seems to pad the rest of the way to the 32 limit with little BEEPs .... wtf ???
Here's the Ext.Basic list and the program file itself .
(program has been compiled, and as such, has appropriate FOR-NEXT delays in the source)
SOUNDTEST.zip < compiled program
TESTER.zip < Extended Basic uncompiled program
----------------------------------------------------------------------------------------------------------------------------------------------------
! Texas Sound Tester thing.! Turn screen blue, clear screen, white font100 CALL CLEAR::CALL SCREEN(6)::FOR L=1 TO 14::CALL COLOR(L,16,6)::NEXT L105 CALL CHAR(91,"0408101010100804") :: CALL CHAR(93,"2010080808081020")! The text underline graphic110 CALL CHAR(35,"00FF00FF00FF00FF")! Strings with CHAR codes in them for the new letters.120 DIM L$(26)130 L$(1)="3C4242427E424242"140 L$(2)="7C22223C2222227C"150 L$(3)="3C4240404040423C"160 L$(4)="7C2222222222227C"170 L$(5)="7E4040784040407E"180 L$(6)="7E40407840404040"190 L$(7)="3C4240404E42423C"200 L$(
="4242427E42424242"210 L$(9)="3E0808080808083E"220 L$(10)="020202020202221C"230 L$(11)="4448506050484442"240 L$(12)="202020202020203E"250 L$(13)="42665A4242424242"260 L$(14)="4262524A46424242"270 L$(15)="7E4242424242427E"280 L$(16)="7C4242427C404040"290 L$(17)="3C424242424A443E"300 L$(18)="7C4242427C484442"310 L$(19)="3C42403C0202423C"320 L$(20)="3E08080808080808"330 L$(21)="424242424242423C"340 L$(22)="2222222214140808"350 L$(23)="4242424242425A24"360 L$(24)="4242241818244242"370 L$(25)="2222140808080808"380 L$(26)="7E0204081020407E"! Tall numbers are assigned to overwrite the original numbers390 FOR L=1 TO 10 :: READ Q$ :: B$(L)=Q$ :: CALL CHAR(L+47,B$(L)):: NEXT L400 DATA "1C2222222222221C","081828080808083E","3C4202040810207E","3C42021C0202423C"410 DATA "060A12223E020202","7C40407C0202423C","3C42407C4242423C","7E02020408102020"420 DATA "3C42423C4242423C","3C4242423E02023C"! This is for the Texas logo430 CALL CHAR(65,"0103030303030303")! TI TOP 1440 CALL CHAR(66,"FC0405050406020C")! TI TOP 2450 CALL CHAR(67,"0080404080000C12")! TI TOP 3460 CALL CHAR(68,"FF80C04060381C0E")! TI MID 1470 CALL CHAR(69,"1921213D050505C4")! TI MID 2480 CALL CHAR(70,"BA8A8ABAA1A1A122")! TI MID 3490 CALL CHAR(71,"0702000000000000")! TI BOT 1500 CALL CHAR(72,"C4632030180E0700")! TI BOT 2510 CALL CHAR(73,"4C9020404020E000")! TI BOT 3! This bit's clever. It puts the string info into the relevant CHAR values to overwrite the original font.520 CP=97530 FOR L=1 TO 26540 CALL CHAR(CP,L$(L))550 CP=CP+1560 NEXT L! Save memory in stack by clearing unwanted variables570 FOR L=1 TO 26 :: L$(L)="" :: NEXT L580 FOR L=1 TO 10 :: B$(L)="" :: NEXT L! Introduce the array for the notes590 DIM N(32)! This bit is the main screen590 ch=0::nc=0600 DISPLAY AT(2,3):"sound tester"620 DISPLAY AT(3,3):"############"630 DISPLAY AT(10,1):"[1] store a sequence"640 DISPLAY At(12,1):"[2] erase a sequence"650 DISPLAY AT(14,1):"[3] play a sequence"660 DISPLAY AT(16,1):"[4] test single notes"670 CALL HCHAR(1,1,65)::CALL HCHAR(1,2,66)::CALL HCHAR(1,3,67)680 CALL HCHAR(2,1,68)::CALL HCHAR(2,2,69)::CALL HCHAR(2,3,70)690 CALL HCHAR(3,1,71)::CALL HCHAR(3,2,72)::CALL HCHAR(3,3,73)700 !! User must now choose an option so call key and goto wherever710 CALL KEY(0,K,ST) :: IF ST=0 THEN 710720 IF K=49 THEN 1000730 IF K=50 THEN 2000740 IF K=51 THEN 3000750 IF K=52 THEN 4000760 CALL SOUND(200,110,1) :: GOTO 710! Store a sequence of notes! Check first to see how many notes are free to use1000 CH=01005 FOR L=1 TO 321010 IF N(L)>0 THEN 11001015 NEXT L1020 IF CH=32 THEN 12001030 GOTO 1300! Increment CH variable by 1, to indicate a note is stored in an array already1100 CH=CH+11110 GOTO 1015! Tell user the array is full, then get rid of message1200 DISPLAY AT(24,1):"note memory full"::call sound(300,110,0)1210 FOR DE=1 TO 5000::NEXT DE1220 DISPLAY AT(24,1):" "::GOTO 710! Store a note1300 CALL CLEAR1310 DISPLAY AT(1,1):"notes used :" ;CH;" of 32"1320 NT=CH+11330 DISPLAY AT(24,1):"enter note ";NT;"?"1340 ACCEPT AT(24,24):NV1350 IF NV>4250 THEN 13401360 IF NV<110 THEN 1630! play the note and ask to store or not1370 display at(3,1):"playing note"::CALL SOUND(700,nv,0)::for de=1 to 500::next de::display at(3,1):" "1380 DISPLAY AT(24,1):"store yn :"1390 ACCEPT AT(24,24):YN$1400 IF YN$="Y" THEN 15001410 IF YN$="y" THEN 1500! not stored1420 CALL SOUND(250,110,0)::GOTO 1330! stored1500 N(NT)=NV1510 ch=ch+11520 IF NT=32 THEN 16001530 GOTO 1310! note memory full1600 DISPLAY AT(3,1):"note memory full"1610 CALL SOUND(500,110,0)1620 FOR DE=1 TO 5000::NEXT DE1630 CALL CLEAR :: GOTO 600! Erase a sequence2000 for l=1 to 32::n(l)=0::next l2010 call sound(250,1450,0)::goto 710! Play a sequence! first check how many notes are in array so we don't hit a zero val when playing3000 for l=1 to 323010 if n(l)>0 then 31003015 next l! now play however many notes we have according to nc variable3020 for l=1 to nc3030 call sound(250,n(l),0))::call sound(125,110,30)3040 next l3050 for de=1 to 500::next de3060 call clear :: goto 600! increment nc variable by 13100 nc=nc+1::goto 3015! test single notes4000 call clear4010 display at(1,1):"enter note value [110 to 4250]"4020 display at(3,1):"press 0 for main menu"4020 accept at(6,1):nv4025 if nv<110 then 30604030 call sound(500,nv,1)4040 for de=1 to 250::next de4050 goto 4020-
1
-
-
When you say "The idea was brought to us by ..." does that imply you worked for Powertran at the time?
no, i meant * us * as in the public, the consumer .... I have never worked for powertran unfortunately.
It was advertised , and maybe even sold in kit form, in an electronics magazine in 1982.
-
If you use RXB, then you will have access to the SAMS card and up to 1MB of memory
That's a lot of screens for you!Ok, cool ... you've got me thinking about that .... so, is there a way to compile RXB yet? ... if not, it could be done anyhow, just use more references to a sprite collision detection subroutine at a specific line in the program.
-
The hat thing ..... there's a program for the Powertran Cortex computer with the hat rendering ... .I don't know how long that takes though as I've not tried it (don't have a cortex and won't use the emulator)
The powertran cortex was a british kit computer , the idea was brought to us by three engineers at Texas Instruments but they couldn't market it as a full computer.
Point is - it uses a 12mhz 9900 family CPU but as far as I know the VDP is somewhat cut-down?
Be interesting to see how long it takes to render compared to the 99 and atari?
-
I've been trying a bit of code that will hopefully make the guards animate at random.
At first, I used two random numbers with 30 in each RND .... the idea was that if both numbers equal the same, it triggers a switch to animate the guards.
When compiled I found that the speed in which it finds two of the same within the number 30 was astounding so I changed it to 300 and it seems to do the job right.
10 DIM A$(2)20 A$(1)="0000000000030343E743417F7F4747470000000000C0C0C0E0C080E0F8ECE6E6"30 A$(2)="40E04040404343436733190F070707070000000000C0C0C0E0C080E0F8ECE6E6"100 CALL CLEAR110 RANDOMIZE :: CALL MAGNIFY(3)112 SW=1 :: CALL CHAR(60,A$(SW))115 CALL SPRITE(#1,60,5,120,120)120 CALL KEY(0,K,ST)130 M1=INT(300*RND)+1::M2=INT(300*RND)+1140 IF M1=M2 THEN 1000150 IF ST=0 THEN 120160 STOP1000 SW=SW+1::IF SW>2 THEN 1121010 SW=2::CALL CHAR(60,A$(SW))::GOTO 115ANIM2.zip < this is the above code compiled. In ordinary Extended Basic, the instances of two of the same number within a RND of 300 would be few and far between but not with this!-
1
-
-
Looking forward to it
Hey, why not a Dizzy game?! I've been looking into that ..... I thought about it often ..... now, Dizzy requires I would say about 8 frames of animation per jump, and that's 8 left, 8 right, so we would probably want to store the hex char patterns in strings .... It's not impossible but it would probably mean making the game with only about 4 screens due to lack of memory?
-
-
I'll give it another go. Argh.

haha .... that's the spirit.
Did you make the jumps?


My new project
in TI-99/4A Development
Posted
Ha! ... I just 'played' that in my head, it sounds right. lol