smartkitten26 Posted August 25, 2009 Share Posted August 25, 2009 (edited) How did the TRS-80 do graphics? Edited May 20, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
+batari Posted August 25, 2009 Share Posted August 25, 2009 How do you do graphics on level II basic? It's been a long time since I messed with a TRS-80, but they technically don't have graphics - text only. However, they do have a set of 64 special text characters, and each is a unique combination of a 2x3 grid of blocks. Since the text display was 64x16, using these special text characters, you could get a 128x48 "graphics" display out of it. IMO, it looked kind of crappy. Quote Link to comment Share on other sites More sharing options...
smartkitten26 Posted August 25, 2009 Author Share Posted August 25, 2009 (edited) How do you do graphics on level II basic? It's been a long time since I messed with a TRS-80, but they technically don't have graphics - text only.However, they do have a set of 64 special text characters, and each is a unique combination of a 2x3 grid of blocks.Since the text display was 64x16, using these special text characters, you could get a 128x48 "graphics" display out of it.IMO, it looked kind of crappy. That's what I meant, could you tell me what command is used? Edited May 20, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
+batari Posted August 25, 2009 Share Posted August 25, 2009 How do you do graphics on level II basic? It's been a long time since I messed with a TRS-80, but they technically don't have graphics - text only. However, they do have a set of 64 special text characters, and each is a unique combination of a 2x3 grid of blocks. Since the text display was 64x16, using these special text characters, you could get a 128x48 "graphics" display out of it. IMO, it looked kind of crappy. That's what I meant, So can you give me code to show me how to use them? it's OK if the code gets complicated, I know alot of BASIC, (and FORTRAN, but I don't think there's FORTRAN for the TRS-80) so I should be able to understand. I don't remember how to do it. I'm sure sample code is easy enough to find, though. Quote Link to comment Share on other sites More sharing options...
+thegoldenband Posted August 25, 2009 Share Posted August 25, 2009 (edited) You should seek out a copy of the RPG "Quest For The Key Of Night Shade" (aka "Nightshade"), which used a mixed-mode text and graphics display and was written in BASIC (so you can crib from it). As a game, it's brutally difficult, but was award-winning in its time. Edited August 25, 2009 by thegoldenband Quote Link to comment Share on other sites More sharing options...
atarimac Posted August 25, 2009 Share Posted August 25, 2009 Try this link: http://www.trs-80.com/wordpress/info-level-2-basic-language/#Graphics That manual says there are set and reset functions to turn a pixel on or off, and a point function to get the status of a pixel. Underneath, they will still be using the character graphics, but it looks like this hides it from you. (But of course, will not be as efficient for changing large areas). 1 Quote Link to comment Share on other sites More sharing options...
smartkitten26 Posted August 25, 2009 Author Share Posted August 25, 2009 (edited) Try this link: http://www.trs-80.co...guage/#Graphics That manual says there are set and reset functions to turn a pixel on or off, and a point function to get the status of a pixel. Underneath, they will still be using the character graphics, but it looks like this hides it from you. (But of course, will not be as efficient for changing large areas). Thanks for the link. So something like this should let you draw? 10 CLS 20 Y=1 30 X=1 40 KEY$ = INKEY$ 60 IF KEY$ = "W" THEN Y=Y-1 70 IF KEY$ = "S" THEN Y=Y+1 80 IF KEY$ = "A" THEN X=X-1 90 IF KEY$ = "D" THEN X=X+1 100 SET (X,Y) 110 IF KEY$ = "F" THEN CLS 120 GOTO 40 Edited May 20, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted August 26, 2009 Share Posted August 26, 2009 Well, this is certainly something I'm qualified to answer, since the L216K was my first computer. The main way is by using the SET/RESET commands. This gives you 128 x 48 blocks. The POINT(X,Y) function will return whether a block has been set or not. The fast way is to print the character codes that correspond to the blocks. Codes 128 to 191 will print all the various combinations of six blocks. PRINT CHR$(191) prints a character with all six blocks set. (FYI, 192 to 255 print a large number of spaces.) Even faster was when people would poke the graphics right into the string constants in a program, but those would get de-tokenized on listing and make the line un-editable. Also, Microsoft's "Level III BASIC" added a LINE x1,y1-x2,y2 command, but that was cassette only. (I did hack up a version to overlay over Disk BASIC, but I don't remember whether I had to make a point of setting Memory Size or not. I still need to make a program to extract my TRSDOS .DMK image rips... I did a CoCo dumper yesterday.) Of course, in assembly language you had nothing but the character codes to work with, and the graphics would be pretty darn fast. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted August 26, 2009 Share Posted August 26, 2009 10 CLS 20 Y=1 30 X=1 40 KEY$ = INKEY$ 60 IF KEY$ = "W" THEN Y=Y-1 70 IF KEY$ = "S" THEN Y=Y+1 80 IF KEY$ = "A" THEN X=X-1 90 IF KEY$ = "D" THEN X=X+1 100 SET (X,Y) 110 IF KEY$ = "F" THEN CLS 120 GOTO 40 WASD? You heathen! One of the nice things about that keyboard (before they broke it with the later M4 keyboards) was how nice it was to use the arrow keys with two hands in games, and your thumb on the spacebar. Let's see, left arrow is CHR$(, right arrow is CHR$(9), down arrow is CHR$(10), and I think up arrow was probably CHR$(91), which was the remapped "^" in the original Model I chargen chip. Quote Link to comment Share on other sites More sharing options...
smartkitten26 Posted August 26, 2009 Author Share Posted August 26, 2009 (edited) 10 CLS 20 Y=1 30 X=1 40 KEY$ = INKEY$ 60 IF KEY$ = "W" THEN Y=Y-1 70 IF KEY$ = "S" THEN Y=Y+1 80 IF KEY$ = "A" THEN X=X-1 90 IF KEY$ = "D" THEN X=X+1 100 SET (X,Y) 110 IF KEY$ = "F" THEN CLS 120 GOTO 40 WASD? You heathen! One of the nice things about that keyboard (before they broke it with the later M4 keyboards) was how nice it was to use the arrow keys with two hands in games, and your thumb on the spacebar. Let's see, left arrow is CHR$(, right arrow is CHR$(9), down arrow is CHR$(10), and I think up arrow was probably CHR$(91), which was the remapped "^" in the original Model I chargen chip. I don't actually have a TRS-80 to test anything on, but this should work better? 10 CLS 20 Y=1 30 X=1 40 KEY$ = INKEY$ 60 IF KEY$ = CHR$(91) THEN Y=Y-1 70 IF KEY$ = CHR$(10) THEN Y=Y+1 80 IF KEY$ = CHR$( THEN X=X-1 90 IF KEY$ = CHR$(9) THEN X=X+1 100 SET (X,Y) 110 IF KEY$ = "F" THEN CLS 120 GOTO 40 Edited May 20, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
smartkitten26 Posted August 26, 2009 Author Share Posted August 26, 2009 (edited) . Edited May 19, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
jhd Posted August 29, 2009 Share Posted August 29, 2009 Also, Microsoft's "Level III BASIC" added a LINE x1,y1-x2,y2 command, but that was cassette only. (I did hack up a version to overlay over Disk BASIC, but I don't remember whether I had to make a point of setting Memory Size or not. I still need to make a program to extract my TRSDOS .DMK image rips... I did a CoCo dumper yesterday.) Was this with the stock TRS-80 Model III (etc.) hardware, or with the optional Hi Res board? I have very fond memories of the Model III from school in the (very) early 1980s, but I don't recall having encountered Level III Basic. Shortly thereafer, I acquired a Coco and I have literally not touched a Model III since 1984. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted August 29, 2009 Share Posted August 29, 2009 (edited) Level III BASIC was cassette-only, for the Model I. With a good disassembly, I was able to get it to work with Disk Basic back in the day, and it could also theoretically have been made to work with the Model III. Edited August 29, 2009 by Bruce Tomlin 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.