Jump to content
IGNORED

F18A


matthew180

Recommended Posts

There are currently no emulators with F18A support, so anything F18A specific you do right now will have to be done on real gear.

 

As for using XB, it is possible but requires a load library (which I have not had time to write) to hook into the enhanced features.

 

The main problem with XB is that it chews up a lot of the VRAM for its own use, so a lot of the enhancements would not function properly due to the VDP tables expanding. I don't think you would get away with enabling the ECMs (enhanced color modes). However, the scroll registers would be available, and the GPU could be used to do really fast block moves, manage sprites, etc.

  • Like 1
Link to comment
Share on other sites

The best alternatives would be assembly language or Forth. Neither are hard but they're very different to XB so there is a learning curve. Download the lottrup book (in the development resources thread) and give assembly language a shot. It's very easy once you get into it. and dont forget: if you don't understand something, ask us! We're all TI geeks and happy to help!

  • Like 1
Link to comment
Share on other sites

I started a thread in this forum called something like "assembly my way" that was designed to be somewhat of an introduction to getting started with assembly on the 99/4A. As Willsy said, the Lottrup book is also a good place to start with assembly (it made it possible for me back in the day), but realize that there are some pitfalls in the book as well. The Lottrup book also focuses on using the MiniMemory vs the Editor/Assembler, and that can be very confusing.

 

With assembly the advantages are speed and complete control of the machine. You need to have a much lower and more technical understanding of the computer. Assembly is not really hard, it is just exacting and the instructions you are working with do more specific simple operations which, in turn, requires more instructions to do things that are usually simple in a higher level language. However, at least for me, the satisfaction of getting something working in assembly is much greater than working with higher level languages.

 

Finally, on modern computers assembly does not make as much sense to use because of the speed and resources available. High level languages easily perform fast enough to let people do things like make games and such. But on older classic and vintage computers where resources like RAM and CPU speed are very limited, assembly is sometimes the only way to do what you want done.

 

My advice would be to start slow and work on simple programs that do one specific thing, like clear the screen, print some text, get input form the keyboard, move a tile or sprite around the screen, etc. Once you have those concepts under your belt, you can start putting them together to make something more cohesive like a game. You also need to have a decent understanding of bits, bytes, binary, and hex.

 

The other nice thing about assembly is that you can carry you knowledge with you *up* to higher level languages, and even to other computers including modern systems. Even though modern computers are faster and have more resources, the *way* they work has not changed since the 1960's. I use knowledge I gained programming 9900 assembly every day.

Edited by matthew180
Link to comment
Share on other sites

Ok, given enough time I can have a go at studying assembly or forth .... hopefully I can get to grips with either one in Classic99

 

I have also made a compiler "MLC" that runs under the XB environment and gives access to a fast compiled language that manages the joystick, the screen, sound, speech, floating point, integers, sets, and the F18A!

Currently intructions for the F18A cover:

- running the GPU 9900

- the Bit map Layer

- the clock

- some new graphics capabilities (30 lines, 80 columns)

 

There is a PreCompiler that runs on the PC/WIN to easely prepare your XB source from a PC and that generates the TI Extended Basic program.

 

Everything on my page:

 

http://gtello.pagesperso-orange.fr/mlc_e.htm

 

Guillaume.

 

PS: I plan to write fast fixed point routines for the GPU and a kind of RPN calculator way of programming it.

Link to comment
Share on other sites

  • 4 weeks later...

Great thread and as a more or less noob to Assembler (did hack around with x86 years ago) I found the lottrup book easy too follow but was considering using the TurboForth Assembler to work my way through it...sort of learn forth / asm in parallel and get to grips with VDP and the awesome F18A

just need to work on clearing my schedule to get dedicated time on the TI :-)

Link to comment
Share on other sites

Ok, given enough time I can have a go at studying assembly or forth .... hopefully I can get to grips with either one in Classic99

 

I would definitely recommend considering C as well. I mean, I started out with XB as a kid, then moved to QBasic on the PC, followed by Turbo Pascal and eventually C (and C++, C#, Java, etc... but those won't help you much in this scenario). The big trick for me was to move away from the GOTO mindset, which C pretty much let you do without too much hassle. If you write your applications to be verbose and don't try to follow the lead of those trick-programmers you should be able to pick it up pretty quickly, it *can* look scary, but it doesn't have to. The biggest benefit for me was that it allowed me to pick up some assembler along the way by supporting assembler 'snippets' within my C applications. Best of both worlds really :)

Link to comment
Share on other sites

From a purely scientific veiwpoint C is going to be a dead language in the future. Quote:

 

 

…what we are seeing is not a gradual shift but a cataclysmic shift from the sequential world to one in which every

processor is parallel. In a small number of years, if your language does not support parallelism, that language will just

wither and die.

— John Mellor-Crummey, Rice University

(Computerworld, March 12, 2007

 

X10 by IBM (Still based on C)

 

A new language entirely is Chapel (Is not C based but uses C programs rewritten into Chapel)

Chapel is from Cray Computing and is a new language that borrows from many like X10 and Fortress to name a fews.

Chapel is a BSD based language similar to Unix in develoupment.

 

But how about Erlang:

http://en.wikipedia....amming_language)

 

Erlang is used by the Call of Duty Servers and huge outfits like Yahoo, Amazon, Facebook.....

 

The code looks similar to C and is used by both OS X and Microsoft.

Evolution is slow as it took years to go from 16bit to 64bit computers. We should have been at 1024bit computers many years ago but limited languages are the reason.

Edited by RXB
Link to comment
Share on other sites

This might be unrelated but it all depends on the application.

 

They have been saying that COBAL & RPG would be dead for years.

 

Procedural languages are very clean for much of the business logic.

 

Being a Java developer, I will take the business logic in RPG any day over Java. It is just such a clean language for business logic. I actually tend to call RPG with my Java.

Edited by slinkeey
Link to comment
Share on other sites

I also find same problem with game Rain Game. There is problem when ship collect rain and then try to put it in hanger it explode. I'am not shure what is happend, because this game and Pongo works fine on TI 99/4a with original video chip. Programs from module and programs that are converted from modules to disk works fine. Games with problems are in XB and can be find in gamebase. Please help. Do I have to change settings on F18A jumpers? Now it have all default settings. Does anybody have similar problem with XB games?

Edited by Manic1975
Link to comment
Share on other sites

Try removing the USR1 jumper and try the games. My only thought is that it has something to do with the F18A's ability to display all 32 sprites on a line vs the 9918A's 4-sprite per line limitation. With USR1 off the F18A will have the same 4-sprite limit as the 9918A.

 

I can't remember if XB has a command to set the max usable sprite, but that might fix the problem. Can you post a short program that specifically exposes the bug?

Link to comment
Share on other sites

Here is short program:

110 RANDOMIZE

120 CALL CLEAR

130 CALL MAGNIFY(2)

140 FOR I=1 TO 5

150 CALL SPRITE(#I,ASC("*"),2,85,127,RND*20-10,RND*20-10)

160 NEXT I

170 CALL COINC(ALL,J)

180 IF NOT J THEN 170

190 CALL SOUND(10,1000,0)

200 GOTO 170

 

When two * hit, this will produce sound. In my case it all the time make sound. I try game Space Junket and there works fine. But here it doesn't.

This example works in Classic99.

Help!!!!!!

Edited by Manic1975
Link to comment
Share on other sites

I can't remember if XB has a command to set the max usable sprite, but that might fix the problem. Can you post a short program that specifically exposes the bug?

 

It doesn't.. you might be remembering a popular CALL LOAD that changed the highest moving sprite number, but that only affects the automotion routine.

 

My TI is still packed, I can't try this myself. :/

 

Link to comment
Share on other sites

There are probably some sprites off-screen that are coincident. Does XB set the first un-used sprite to off? (If I remember correctly its >D0 in the y attribute position)

 

XB probably isnt doing a neat job of initialising the sprite attribute table.

 

Just a guess.

 

The classic99 debugger might offer some clues.

Link to comment
Share on other sites

CALL COINC(ALL) checks bit 2 of >837B. >837B contains a copy of the VDP status register. If it is set then 2 (or more) sprites are touching. The following code shows how to check this:

 

MOV @>837A,R5 837b in LSB

LI R4,>0020

COC R4,R5 see if bit 2 of >837B is set

JEQ COINC if it is then 2 sprites touch

JMP NOCOIN no coincidence

 

In XB, any sprite that isn't used is parked off the bottom of the screen with a Y location of >D0 and 0 for X and Y motion. >837A has a number from 0 to 32 which is the highest sprite number using auto motion. This number is used by the auto motion routine to know which sprites are not moving. So it pays to make the lowest number sprites be the ones in motion. If you had only sprite #1 and sprite #28 in motion, the routine still has to check the motions of sprites #2 to #27, wasting time on sprites that are not moving.

Link to comment
Share on other sites

Here is example of 99'er game Jungle Jim. It has same problem as other games I describe.

 

100 ! **************

110 ! * *

120 ! * JUNGLE JIM *

130 ! * *

140 ! * BY *

150 ! * *

160 ! * MIKE McCUE *

170 ! * *

180 ! **************

190 !

200 ! 99'ER VERSION 2.10.1XB

210 !

220 RANDOMIZE

230 DEF RRND(N)=INT(RND*N)+1

240 TIME=1!sets flag to display title screen first time through

250 GOSUB 960!displays title screen

260 IF TIME<>1 THEN GOSUB 1120!resets character definitions for replay

270 DISPLAY AT(1,1)SIZE(LEN(STR$(SC))+1):SC :: DISPLAY AT(2,1)SIZE(-2):GUY :: CALL VCHAR(1,3,33) :: CALL VCHAR(2,3,33)

280 RESTORE 910 :: C=96

290 CALL COLOR(2,2,11) :: CALL COLOR(1,13,1) :: CALL COLOR(3,2,13) :: CALL COLOR(4,11,1) :: CALL COLOR(5,2,11) :: CALL COLOR(6,7,2)

300 CALL COLOR(8,4,11) :: CALL COLOR(7,15,11) :: CALL COLOR(14,14,1)

310 FOR D=1 TO 100 :: NEXT D :: CALL SPRITE(#1,92,16,104,60)

320 CALL KEY(0,T,ST) :: CALL COINC(ALL,HIT) :: IF HIT=-1 THEN CALL COINC(#1,#10,32,IT) :: IF IT=-1 THEN GOSUB 730 ELSE GOTO 750!control loop

330 IF ST=0 THEN CALL MOTION(#1,0,0) :: HV=0 :: GOTO 320

340 CALL POSITION(#1,X,Y) :: IF Y>204 THEN 460 ELSE IF Y<60 THEN CALL SOUND(1,110,1,112,2,114,3) :: CALL LOCATE(#1,X,60)

350 IF T=68 THEN HV=10 :: CALL PATTERN(#1,C) :: C=C-4 :: CALL MOTION(#1,0,10) :: IF C<=92 THEN C=112 :: GOTO 320 ELSE 320

360 IF T=83 THEN HV=-10 :: CALL PATTERN(#1,C) :: C=C-4 :: CALL MOTION(#1,0,-10) :: IF C<=92 THEN C=112 :: GOTO 320 ELSE 320

370 IF T=73 THEN 390

380 CALL MOTION(#1,0,0) :: HV=0 :: GOTO 320

390 CALL MOTION(#1,-16,HV*1.16)

400 FOR D=1 TO 20 STEP 4 :: CALL SOUND(-310,-3,D) :: CALL COINC(#1,#7,17,HIT) :: IF HIT=-1 THEN CALL MOTION(#1,0,10) :: HV=0 :: GOTO 710

410 NEXT D

420 CALL MOTION(#1,24,HV*1.5)

430 FOR D=1 TO 6 :: CALL COINC(#1,#7,17,HIT) :: IF HIT=-1 THEN CALL MOTION(#1,0,10) :: GOTO 710

440 NEXT D :: CALL MOTION(#1,0,0)

450 CALL POSITION(#1,X,Y) :: CALL LOCATE(#1,104,Y) :: GOTO 320

460 CALL MOTION(#1,0,0) :: CALL LOCATE(#1,104,60) :: FOR I=2 TO 18 :: CALL DELSPRITE(#I) :: NEXT I :: COL=COL+1 :: IF COL=11 THEN COL=14

470 IF COL=16 THEN COL=5

480 CALL COLOR(7,COL,11)

490 EA=RRND(6) :: IF EA=1 THEN GOSUB 640 :: GOTO 320

500 TR=RRND(4) :: IF TR=1 THEN GOSUB 660

510 S=RRND(5) :: IF S=1 THEN SV=0 :: GOSUB 670 :: A=INT(RND*15)+1 :: IF A=1 THEN GOSUB 650 :: GOTO 320 ELSE 320

520 FI=RRND(5) :: IF FI=1 THEN GOSUB 690 :: A=RRND(10) :: IF A=1 THEN GOSUB 650 :: GOTO 320 ELSE 320

530 MS=RRND(5) :: IF MS=1 THEN SV=INT(RND*50)-30 :: GOSUB 670 :: A=RRND( 8 ) :: IF A=1 THEN GOSUB 650 :: GOTO 320 ELSE 320

540 P=RRND(2) :: IF P=1 THEN PV=0 :: GOSUB 580 :: GOSUB 650 :: GOTO 320

550 L=RRND(1) :: IF L=1 AND TR<>1 THEN GOSUB 610

560 M=RRND(4) :: IF M=1 AND L<>1 THEN GOSUB 650 :: GOTO 320

570 GOTO 320

580 CALL CHAR(116,C1$) :: CALL CHAR(120,C2$) :: CALL CHAR(124,C3$)

590 CALL SPRITE(#2,116,5,120,96,0,PV,#3,120,5,120,128,0,PV,#4,124,5,120,160,0,PV)

600 RETURN

610 REM

620 FOR I=2 TO 3 :: CALL SPRITE(#I,128,9,112,(I*64+ 8 ) - 20,0,-20) :: NEXT I

630 RETURN

640 CALL SPRITE(#2,44,5,104,240,0,20,#3,44,7,104,160,0,20) :: RETURN

650 CALL SPRITE(#7,140,10,59,120,0,10) :: RETURN

660 CALL SPRITE(#10,132,16,96,216) :: RETURN

670 CALL CHAR(116,"000C3A071F"&X$&"000306050300000080C0C0C0C0C0C2C4C8FEC73FFF")

680 CALL SPRITE(#2,116,INT(RND*9)+2,14*8,INT(RND*14)*8+100,0,SV) :: RETURN

690 CALL CHAR(116,"000009002406272735355D6AA2E6955A40200020D0B0F8F8FAED6D89BF96859")

700 CALL SPRITE(#2,116,7,14*8,INT(RND*14)*8+100) :: RETURN

710 CALL KEY(0,V,CV) :: IF CV<>0 THEN CALL MOTION(#1,0,0) :: CALL POSITION(#1,X,Y) :: CALL LOCATE(#1,13*8,Y) :: CV,V=0 :: GOTO 320

720 TE=2 :: GOTO 860

730 CALL SOUND(500,500,1,504,2,508,3) :: CALL DELSPRITE(#10) :: SC=SC+250 :: DISPLAY AT(1,1)SIZE(LEN(STR$(SC))+1):SC :: CALL VCHAR(1,3,33)

740 RETURN

750 REM

760 T,ST=0 :: CALL MOTION(#1,0,0)

770 FOR I=510 TO 110 STEP-100 :: CALL SOUND(1,I,1,I+2,2,I+4,3) :: NEXT I

780 GUY=GUY-1 :: DISPLAY AT(2,1)SIZE(-2):GUY :: CALL VCHAR(2,3,33) :: IF GUY<>0 THEN CALL LOCATE(#1,104,45) :: GOTO 330

790 CALL SOUND(2300,220,1,222,2,224,3) :: CALL CLEAR :: CALL CHARSET :: IF EA=1 THEN CALL DELSPRITE(#2,#3)

800 A$(1)=B$&"ALL YOUR MEN WERE DESTROYED AND YOU ONLY SCORED "&STR$(SC)&" POINTS."

810 A$(2)=B$&"BETTER LUCK NEXT TIME."

820 A$(3)=B$&"WANT TO PLAY AGAIN? (Y OR N)"

830 TE=1 :: GOSUB 1460

840 CALL KEY(0,K,STAT) :: IF NOT(K=89 OR K=78)THEN 840 ELSE IF K=78 THEN STOP

850 CALL DELSPRITE(ALL) :: TIME=2 :: PV=0 :: GOTO 260

860 READ TP,FR :: ON FR GOTO 880,890,900,870

870 RESTORE 910 :: GOTO 860

880 CALL SOUND(100,TP,1,TP+2,2,TP+3,3) :: CALL SOUND(100,165,1,196,1,262,1) :: ON TE GOTO 1480,710

890 CALL SOUND(100,TP,1,TP+2,2,TP+4,3) :: CALL SOUND(100,175,1,220,1,262,1) :: ON TE GOTO 1480,710

900 CALL SOUND(100,TP,1,TP+2,2,TP+4,3) :: CALL SOUND(100,196,1,247,1,294,1) :: ON TE GOTO 1480,710

910 DATA 262,1,330,1,392,1,440,1,466,1,370,1,392,1,330,1,349,2,440,2,523,2,587,2,622,2

920 DATA 494,2,523,2,440,2,392,3,494,3,587,3,659,3,698,3,554,3,587,3,494,3

930 DATA 349,2,440,2,523,2,587,2,622,2,494,2,523,2,440,2,262,1,330,1,392,1,440,1,466,1

940 DATA 370,1,392,1,330,1,262,1,196,1,262,1,196,1,262,1,196,1,262,1,262,1,294,1,330,1

950 DATA 349,2,262,2,349,2,262,2,349,2,262,2,349,2,349,2,330,2,294,2,262,1,196,1,4,4

960 VO=28 :: Z$=RPT$("0",16) :: CALL CHAR(140,"000001010F090909010101013E200000C0C4C4FCC0C0C0C0C020100808102030")

970 C1$=RPT$("0",13)&"31FFF1F03"&RPT$("0",20)&"C"&RPT$("F",11)

980 C2$=RPT$("0",7)&"3"&RPT$("F",18)&"03"&RPT$("0",10)&"C0"&RPT$("F",18)

990 C3$=RPT$("0",10)&"FC"&RPT$("F",11)&"C0000"&Z$&"C0F8FFF8F"

1000 C=96 :: C2=104 :: X$=RPT$("0",12) :: Y=6 :: CALL CLEAR :: DISPLAY AT(12,1):"PRESS ANY KEY TO STOP ANY GRAPHICS DISPLAY"

1010 FOR D=1 TO 500 :: NEXT D :: CALL SCREEN(2) :: CALL CHAR(36,X$&"000C1F1C1C1C0C0C0702"&Z$&"0102FCC8908488131654") :: CALL CLEAR

1020 CALL CHAR(136,"0001071F3FFFFFFF00800E0F0FFFFFFFF000020F0FCFFFFFF10183C7C7EFEFFFF")

1030 CALL MAGNIFY(4) :: CALL SPRITE(#28,140,16,10*8,15 * 8 )

1040 CALL CHARSET :: FOR I=1 TO 14 :: CALL COLOR(I,14,1) :: NEXT I :: DISPLAY AT(1,9):"JUNGLE JIM"

1050 B$=RPT$(" ",28)

1060 CALL CHAR(132,"18245ADBDB5D24180"&Z$&Z$)

1070 A$(1)=B$&"99'ER MAGAZINE PRESENTS . . . J U N G L E J I M ! "

1080 A$(2)=B$&"YOU MUST JUMP OVER THE OBSTACLES BY PRESSING I . TO MOVE, USE THE LEFT AND RIGHT ARROW KEYS."

1090 A$(3)=B$&"YOU GET 4 MEN, AND YOU SCORE POINTS BY GRABBING THE DIAMOND."

1100 RESTORE 910 :: TE=1 :: GOSUB 1460

1110 CALL VCHAR(1,1,32,768) :: CALL DELSPRITE(ALL)

1120 GUY=4 :: SC=0

1130 CALL CHAR(80,"00183C3E3F1F0F02061F3F3F3E3E100000001C3E7EFEFC7870F8FCFCBCBC888")

1140 CALL CHAR(88,"000000000060703004090A0EAFFFFFF80808090B8F8F0E08182AAAB5FFFFFFFFFF")

1150 FOR I=1 TO 14 :: CALL COLOR(I,1,1) :: NEXT I

1160 CALL CHAR(140,"00010F0F0F13162A29"&RPT$("20",5)&"A0E01CF4DEC6E03030282824"&RPT$("0",12))

1170 CALL CHAR(128,Z$&"01030704080808070000003C7C7CFCF8F0F0E04040408")

1180 CALL CHAR(33,RPT$("F",16)) :: CALL COLOR(1,1,1) :: CALL HCHAR(1,1,33,32*9)

1190 CALL CHAR(34,"FFFFFFFFFF7F3F070703030307070701FF7F1F1F07030100FFFFFFFEFCFCFCFC")

1200 CALL CHAR(38,"F0F0F0E")

1210 DATA 7,1,34,8,1,35,9,2,36,8,6,37,9,6,38

1220 FOR D=1 TO 30 STEP 6

1230 RESTORE 1210

1240 CALL HCHAR(9,D+1,32) :: FOR I=1 TO 5 :: READ A,B,C :: CALL HCHAR(A,B+D,C) :: NEXT I

1250 NEXT D

1260 CALL VCHAR(7,1,32,3) :: CALL VCHAR(7,32,32,3) :: CALL SCREEN(6)

1270 CALL CHAR(40,"030307070F1F7"&RPT$("F",19)&"80C0C0E0E0F0F8FF")

1280 DATA 10,3,41,4,10,4,41,4,13,2,40,1,13,5,42,1

1290 CALL CHAR(44,"01017F130F03030303030204043820008084FE84F088808080C0201010101018")

1300 CALL CHAR(58,RPT$("F",16)) :: CALL HCHAR(11,1,58,32*13)

1310 FOR D=1 TO 32 STEP 4

1320 CALL HCHAR(14,D+2,88) :: CALL HCHAR(14,D,89) :: CALL HCHAR(14,D+3,90) :: CALL HCHAR(14,D+1,91) :: NEXT D

1330 FOR F=1 TO 30 STEP 6 :: RESTORE 1280

1340 FOR I=1 TO 4 :: READ A,B,C,D :: CALL VCHAR(A,B+F+1,C,D) :: NEXT I

1350 NEXT F

1360 FOR D=1 TO 32 STEP 2 :: CALL HCHAR(21,D,80) :: CALL HCHAR(22,D,81) :: CALL HCHAR(21,D+1,82) :: CALL HCHAR(22,D+1,83)

1370 CALL HCHAR(23,D,88) :: CALL HCHAR(24,D,89) :: CALL HCHAR(23,D+1,90) :: CALL HCHAR(24,D+1,91) :: NEXT D

1380 CALL CHAR(92,"000001010F090909010101013E200000C0C4C4FCC0C0C0C0C020100808102030")

1390 CALL MAGNIFY(4) :: IF TIME<>1 THEN RETURN

1400 CALL CHAR(96,"0101031F131313030303033F2000000080888888F88080808080000080402030")

1410 CALL CHAR(100,"00000101070909050101010106181000C0C0C2F4C8C0C0C0C02010080810203")

1420 CALL CHAR(104,"00000101070503010101010102020203C0C0C0E0E0F8C0C0C02020101020406")

1430 CALL CHAR(108,"00000103030303010101010000070400C0C0C0E0E0E0F0C0C04040C0C0A080C")

1440 CALL CHAR(112,"00000101070909050101000007040000C0C0C0E0E0F8C0C0C040C040A010203")

1450 RETURN

1460 CALL CHAR(120,X$&"FF")

1470 CALL HCHAR(5,1,120,32) :: FOR O=1 TO 3 :: FOR I=1 TO LEN(A$(O))STEP 3 :: F$=SEG$(A$(O),I,28) :: DISPLAY AT(4,1):F$ :: GOTO 860

1480 CALL KEY(0,T,S) :: IF S=0 THEN 1490 ELSE 1500

1490 NEXT I :: NEXT O

1500 CALL VCHAR(1,1,32,768) :: RETURN

Edited by Manic1975
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...