+hloberg Posted December 20, 2019 Share Posted December 20, 2019 one of the things a lot of 8-bits of the era had that was really nice was the use of multi-colored fonts. in XB it's easy to have 2 color fonts by redefining the lower case char set upper then change the color of the sets. but XB won't let you get to the chars above 143. if you were able to you could add 2 more char sets and define colors for 4 color char sets. of course not being a assembler programmer I'm not sure how one would or could do this. if possible a nice CALL LINK(Y,X,"STRING",COLORSET)? Quote Link to comment Share on other sites More sharing options...
pixelpedant Posted December 20, 2019 Share Posted December 20, 2019 Well, you can do it with XB256. Which gives you access to a second screen, with its own fully remappable 256 character pattern table. 1 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted December 20, 2019 Share Posted December 20, 2019 Also the missing link Sent from my LM-G820 using Tapatalk Quote Link to comment Share on other sites More sharing options...
+hloberg Posted December 21, 2019 Author Share Posted December 21, 2019 I wrote this program using TML as multicolor fonts (below). problem is it's about twice as slow since it has to draw each character in bitmap in software. XB256 almost gets you there except how do you specify the upper two colors sets (above 143) without specifying the char code for each character you want to print? a CALL LINK(Y,X,"STRING",COLORSET) would let you enter the string the the color set. maybe it's time I bit the bullet and learned TMS9900 assembler. It can't be that much harder than 6502. This might be a good project to learn on. @senior_falcon is this something similar to your 40 column routine? Drop the 40 column code, insert 4 char sets and a pointer to the beginning of each set for color choice. Would it very hard are am I missing something that make it near impossible? Quote Link to comment Share on other sites More sharing options...
pixelpedant Posted December 21, 2019 Share Posted December 21, 2019 In XB256, if you want to duplicate the patterns (and only have the colour differ) you could VREAD the patterns for the appropriate range (e.g., for the A-Z patterns), then VWRITE them to the desired destination range. The memory map for the pattern RAM is in the documentation. That'd be super quick. Quote Link to comment Share on other sites More sharing options...
wierd_w Posted December 21, 2019 Share Posted December 21, 2019 Doesn't the 9918A support 3 color text already? Graphics II mode? That would give you 2 colors and the transparent color to work with. If all you are doing is text, you can do limited aliasing that way with a well selected color. Fonts are super easy for me to do; should I make a few? Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted December 21, 2019 Share Posted December 21, 2019 Pixelpedant has half the answer. As he says, you can copy segments of the VDP to a string and then write them to a different area of VDP ram. For example CALL LINK("VREAD",5376,255,A$) will read screen2 character definitions from ascii 64 to 95. Then you can write them to a different part of vdp memory using VWRITE. The other piece of the puzzle is that you can force CALL LINK("DISPLY") to use a different screen offset. The screen offset for DISPLY is at 9596. Normally this is 96, but you can poke any value you want to this location. So, for example, you could define ascii 160 to 175 with the patterns for 64 to 95, define different colors for those characters, then change the screen offset and print normally using DISPLY. 5 CALL LINK("SCRN2") 10 CALL LINK("VREAD",5376,255,P$) 20 FOR I=4096 TO 4608 STEP 256 :: CALL LINK("VWRITE",I,P$):: NEXT I 25 CS=17 :: F=4 :: B=16 :: GOSUB 1000 26 CS=21 :: F=2 :: B=14 :: GOSUB 1000 27 CS=25 :: F=9 :: B=12 :: GOSUB 1000 30 FOR I=0 TO 255 :: PRINT CHR$(I);:: NEXT I 32 CALL LOAD(9596,192):: CALL LINK("DISPLY",1,1,"ATTENTION^TI^ENTHUSIASTS") 33 CALL LOAD(9596,224):: CALL LINK("DISPLY",2,1,"YOU^CAN^DISPLAY^TEXT^IN") 34 CALL LOAD(9596,0):: CALL LINK("DISPLY",3,1,"DIFFERENT^COLORS") 35 CALL LOAD(9596,96):: CALL LINK("DISPLY",4,1,"USING XB256 IN SCREEN2") 40 GOTO 40 1000 FOR I=0 TO 3 :: CALL LINK("COLOR2",CS+I,F,B):: NEXT I :: RETURN 1 1 Quote Link to comment Share on other sites More sharing options...
+hloberg Posted December 21, 2019 Author Share Posted December 21, 2019 (edited) 1 hour ago, senior_falcon said: Pixelpedant has half the answer. As he says, you can copy segments of the VDP to a string and then write them to a different area of VDP ram. For example CALL LINK("VREAD",5376,255,A$) will read screen2 character definitions from ascii 64 to 95. Then you can write them to a different part of vdp memory using VWRITE. The other piece of the puzzle is that you can force CALL LINK("DISPLY") to use a different screen offset. The screen offset for DISPLY is at 9596. Normally this is 96, but you can poke any value you want to this location. So, for example, you could define ascii 160 to 175 with the patterns for 64 to 95, define different colors for those characters, then change the screen offset and print normally using DISPLY. 5 CALL LINK("SCRN2") 10 CALL LINK("VREAD",5376,255,P$) 20 FOR I=4096 TO 4608 STEP 256 :: CALL LINK("VWRITE",I,P$):: NEXT I 25 CS=17 :: F=4 :: B=16 :: GOSUB 1000 26 CS=21 :: F=2 :: B=14 :: GOSUB 1000 27 CS=25 :: F=9 :: B=12 :: GOSUB 1000 30 FOR I=0 TO 255 :: PRINT CHR$(I);:: NEXT I 32 CALL LOAD(9596,192):: CALL LINK("DISPLY",1,1,"ATTENTION^TI^ENTHUSIASTS") 33 CALL LOAD(9596,224):: CALL LINK("DISPLY",2,1,"YOU^CAN^DISPLAY^TEXT^IN") 34 CALL LOAD(9596,0):: CALL LINK("DISPLY",3,1,"DIFFERENT^COLORS") 35 CALL LOAD(9596,96):: CALL LINK("DISPLY",4,1,"USING XB256 IN SCREEN2") 40 GOTO 40 1000 FOR I=0 TO 3 :: CALL LINK("COLOR2",CS+I,F,B):: NEXT I :: RETURN Ok, i knew about the 1st part but didn't know about the 2nd part, thanks. I rewrote my latest yahtzee program without TML (just white display at) and it was twice as fast since I know you have to essentially draw every character on the screen in bitmap mode in TML. TML seemed a bit overkill for just using colored fonts. I like using color fonts in games and this adds a real good addition. Im going to redo my yahtzee to get a real world feel and post later. thanks. another nice is this can be compiled. Edited December 21, 2019 by hloberg more 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted December 21, 2019 Share Posted December 21, 2019 2 hours ago, hloberg said: another nice is this can be compiled. Unfortunately, the poke to 9596 is specific to XB256. I will look to see if there is room for another subroutine, maybe CALL LINK("OFFSET",N). Then it would not be dependent on using an absolute memory location. 1 Quote Link to comment Share on other sites More sharing options...
+hloberg Posted December 21, 2019 Author Share Posted December 21, 2019 (edited) setup a CALL routine to simplify and added notes. doesn't seem to slow it down. also going to play around adding the numbers and space. 7 ! LOAD DSKx.XB256 1ST 11 CALL LINK("SCRN2") 13 ! -----------SETUP AREA ----------- 15 ! LOAD IN FONTS 17 CALL LINK("VREAD",5376,255,P$)::! LOAD IN STANDARD FONT 20 FOR I=4096 TO 4608 STEP 256 :: CALL LINK("VWRITE",I,P$):: NEXT I:: ! COPY TO OTHER FONT AREAS 25 ! NOTE-IF YOU WANT TO USE SPACES NEED TO DEFINE A SPACE, ALSO NUMBERS NOT REDEFINED 30 ! SET COLOR CS=CHARSET, F=FORE COLOR, B=BACK COLOR 40 CS=17 :: F=4 :: B=16 :: GOSUB 70 :: ! SETCOLOR 2 50 CS=21 :: F=2 :: B=14 :: GOSUB 70 :: ! SETCOLOR 3 60 CS=25 :: F=9 :: B=12 :: GOSUB 70 :: ! SETCOLOR 4 63 GOTO 90 65 ! FONTBASE SETCOLOR 1=96(NORMAL),2=192,3=224,4=0 70 FOR I=0 TO 3 :: CALL LINK("COLOR2",CS+I,F,B):: NEXT I :: RETURN 80 ! ------------END SETUP------------ 90 FOR I=0 TO 255 :: PRINT CHR$(I);:: NEXT I:: ! SHOW ALL FONTS 95 ! CALL XC - EXAMPLES 100 CALL XC(1,1,192,"ATTENTION^TI^ENTHUSIASTS") 110 CALL XC(2,1,224,"YOU^CAN^DISPLAY^TEXT^IN") 120 CALL XC(3,1,0,"DIFFERENT^COLORS") 130 CALL XC(4,1,96,"USING XB256 IN SCREEN2") 140 ! 240 GOTO 240 1900 ! CALL ROUTINE 2000 SUB XC(Y,X,FONTBASE,A$) 2100 CALL LOAD(9596,FONTBASE):: CALL LINK("DISPLY",Y,X,A$) 2200 SUBEND Edited December 21, 2019 by hloberg more Quote Link to comment Share on other sites More sharing options...
+hloberg Posted December 21, 2019 Author Share Posted December 21, 2019 a short praise of the work Harry is doing. When these computers came out the benchmark was 'what can it do in BASIC?' TI XB was/is a very powerful BASIC and easy to use and is still is my favorite BASIC of the era. But one thing that did frustrate me was just how much of the power of the TMS9918a was locked away from the XB user. you couldn't access the 40 column text or the bitmap graphics or even the useless multi-color mode from XB. But Harry Wilhelm has addressed all of that. With TML, T40 and XB256 he has addressed these shortcomings and so much, much more. it's his stuff that has brought me back to the TI-99 as I can finally do a lot of the programing I did on the Atari 8-bit on the TI99 and more. thanks, Harry. 3 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted December 22, 2019 Share Posted December 22, 2019 (edited) Oh, Jafar, you're too kind. I'm embarrassed. I'm blushing. (edit) CALL LINK("VREAD",5376,255,P$) - Ideally this would be 256, but a string cannot be that long. The final byte of the character definition is undefined, as you can see in the picture I posted. Two reads of 128 bytes would do the trick if that is a problem. Edited December 22, 2019 by senior_falcon 1 1 1 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted December 25, 2019 Share Posted December 25, 2019 (edited) I remember a multicolored font demo that Eric Paul Rebel did at the TI Treff one year (1990?). It is on the set of disks he released into the public domain shortly thereafter, and may be available in the various UG disk libraries from the European TI groups. His disks were titled EPR-1 through EPR-4. Edited December 25, 2019 by Ksarul 1 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.