+9640News Posted August 26, 2023 Share Posted August 26, 2023 I am trying to convert a program to use the TIPI. I have an assembly language routine passed a variable for screen location. I need to convert this location to a row/column position in basic to use the Display At routine. Without using assembly, I seem to not be able to find an approrpiate routine. Ideas? Quote Link to comment Share on other sites More sharing options...
SteveB Posted August 26, 2023 Share Posted August 26, 2023 You have a VDP RAM address and need a row and column? Quote Link to comment Share on other sites More sharing options...
RXB Posted August 26, 2023 Share Posted August 26, 2023 43 minutes ago, 9640News said: I am trying to convert a program to use the TIPI. I have an assembly language routine passed a variable for screen location. I need to convert this location to a row/column position in basic to use the Display At routine. Without using assembly, I seem to not be able to find an approrpiate routine. Ideas? Well normally Assembly uses screen location from 0 to 768 if you are talking Characters of 8x8 normal characters. So most of the time the number divided by 32 and the left over is the column of the last row. Example: 736/32=ROW 23 and COLUMN 1 Example: 127/32=ROW 3 and COLUMN 31 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted August 26, 2023 Share Posted August 26, 2023 5 minutes ago, RXB said: 0 to 768 0 to 767? 768 would be one over? 1 Quote Link to comment Share on other sites More sharing options...
99V Posted August 26, 2023 Share Posted August 26, 2023 Extended basic had accept at and display at which is like peeking and poking the screen Basic only had call vchar and call hchar routines. Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted August 26, 2023 Share Posted August 26, 2023 48 minutes ago, 9640News said: I am trying to convert a program to use the TIPI. I have an assembly language routine passed a variable for screen location. I need to convert this location to a row/column position in basic to use the Display At routine. Without using assembly, I seem to not be able to find an approrpiate routine. Ideas? How is the screen location passed to Basic? If as a floating point number, then 100 ROW = INT(LOC/32) 110 COL = LOC - ROW * 32 ...lee 2 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted August 26, 2023 Share Posted August 26, 2023 (edited) 1 hour ago, Lee Stewart said: How is the screen location passed to Basic? If as a floating point number, then 100 ROW = INT(LOC/32) 110 COL = LOC - ROW * 32 ...lee Almost right. BASIC and XB think the screen is from row 1 to row 24 and col 1 to col 32. But the VDP thinks the screen is from row 0 to row 23 and col 0 to col 31. So one additional instruction must be added: For HCHAR or VCHAR 90 LOC=LOC+33 100 ROW=INT(LOC/32) 110 COL=LOC-ROW*32 or 100 ROW=INT(LOC/32) 110 COL=LOC-ROW*32 120 ROW=ROW+1::COL=COL+1 Just to make it interesting, DISPLAY AT starts two columns over. DISPLAY AT(3,1):"*" is the same as CALL HCHAR(3,3,42) So for DISPLAY AT: 100 ROW=INT(LOC/32) 110 COL=LOC-ROW*32 120 ROW=ROW+1::COL=COL-1 Edited August 26, 2023 by senior_falcon 2 Quote Link to comment Share on other sites More sharing options...
+9640News Posted August 27, 2023 Author Share Posted August 27, 2023 Thanks for the info. I am dealing with code that has setup a 24x40 column screen. That code looks like it should work. Beery 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted August 27, 2023 Share Posted August 27, 2023 3 hours ago, senior_falcon said: Just to make it interesting, DISPLAY AT starts two columns over. Being more used to Forth and Assembler, I totally forgot about that. ...lee 2 Quote Link to comment Share on other sites More sharing options...
RXB Posted August 27, 2023 Share Posted August 27, 2023 RXB has CALL HPUT(row,col,string or numeric variable) or CALL VPUT(row,col,string or numeric variable) Or if you want to stick with the Assembly Numbering system use CALL MOVES("$V",LEN(string-variable),string-variable,address) $=type of string V=VDP address LEN is the length of the string string-variable is like A$ or X$ address is the vdp address like you see in Assembly Also you could use CALL HGET(row,col,length,string-variable) or CALL VGET(row,col,length,string-variable) to get strings off of screen into a string-variable Quote Link to comment Share on other sites More sharing options...
RXB Posted August 27, 2023 Share Posted August 27, 2023 6 hours ago, Retrospect said: 0 to 767? 768 would be one over? Yea sorry it would be 0 to 767 you are correct. 3 Quote Link to comment Share on other sites More sharing options...
WhataKowinkydink Posted August 27, 2023 Share Posted August 27, 2023 10 hours ago, senior_falcon said: Just to make it interesting, DISPLAY AT starts two columns over. DISPLAY AT(3,1):"*" is the same as CALL HCHAR(3,3,42) I always thought that was an annoying feature of DISPLAY AT. My suspicion is they did that to be sure the text on CRTs would not get cut off... Quote Link to comment Share on other sites More sharing options...
99V Posted August 27, 2023 Share Posted August 27, 2023 Same annoying text area as BASIC. Only 28 spaces for writing as opposed to 32 wide for calling stuff onto the screen. 1 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted August 27, 2023 Share Posted August 27, 2023 4 hours ago, WhataKowinkydink said: I always thought that was an annoying feature of DISPLAY AT. My suspicion is they did that to be sure the text on CRTs would not get cut off... My first two displays were a black&white TV and a 13" color TV, connected via an RF modulator. The centered, 28-column display fit snugly on the black&white TV, particularly at the two bottom corners. The color TV showed a bit more of the display, though I think it had some adjustment knobs at the back. On both TVs (Edit: maybe it was just the color TV?), I could see graphics in columns 1,2,31,32 where the screen was widest, however, it wasn't until I obtained a composite monitor that I could see 'everything' in the 24x32 window. The BASIC reference manual briefly mentions the potential screen limitation, "The graphics subprograms feature a 24-row by 32-column screen display. The 28 print positions normally used in TI BASIC correspond to columns 3 through 30. inclusive, in the graphics subprograms. Because some display screens may not show the two leftmost and two rightmost characters, your graphics may be more satisfactory if you use columns 3 through 30 and ignore columns 1 and 2 on the left and 31 and 32 on the right. Experiment with different line lengths to determine how many positions show on your screen." It seems to me that some games were designed with the column 'limitation' in mind as well. 3 1 Quote Link to comment Share on other sites More sharing options...
99V Posted August 27, 2023 Share Posted August 27, 2023 Thank you. For some reason there seems to be blank space on a monitor beyond the 32 columns on either side too. Heck we might have space for 36 wide. This could have been an internal ROM thing to not chop stuff off. Quote Link to comment Share on other sites More sharing options...
RXB Posted August 27, 2023 Share Posted August 27, 2023 1 hour ago, 99V said: Thank you. For some reason there seems to be blank space on a monitor beyond the 32 columns on either side too. Heck we might have space for 36 wide. This could have been an internal ROM thing to not chop stuff off. Actually this is due to the 9901 VDP chip. It has modes of several types and 32x24 is the most used one for menus. Every single Cart from Texas Instruments used this mode when you get the title screen or a menu. Thus this VDP chip mode is always the one you see the most often, and the one used by Basic and XB. 2 1 Quote Link to comment Share on other sites More sharing options...
99V Posted August 27, 2023 Share Posted August 27, 2023 Hmm interesting. So how many columns is possible? Quote Link to comment Share on other sites More sharing options...
RXB Posted August 27, 2023 Share Posted August 27, 2023 3 minutes ago, 99V said: Hmm interesting. So how many columns is possible? Well 32 columns times 24 rows is 768 times 8x8 character is 6144 individual pixels in that mode. Quote Link to comment Share on other sites More sharing options...
99V Posted August 27, 2023 Share Posted August 27, 2023 Oh OK so 32 is the widest. I thought you were saying there is even a wider mode. Quote Link to comment Share on other sites More sharing options...
tmop69 Posted August 27, 2023 Share Posted August 27, 2023 12 minutes ago, 99V said: Oh OK so 32 is the widest. I thought you were saying there is even a wider mode. There is also the Text Mode, 40x24 lines, 6x8 pixel chars, but not available in BASIC/XB. It is used in Adventure module, for example. 3 2 Quote Link to comment Share on other sites More sharing options...
99V Posted August 27, 2023 Share Posted August 27, 2023 So in text mode it leaves 8 bits on each side to get 240 bits for text Quote Link to comment Share on other sites More sharing options...
tmop69 Posted August 27, 2023 Share Posted August 27, 2023 17 minutes ago, 99V said: So in text mode it leaves 8 bits on each side to get 240 bits for text It is expected to work in such way to center the image, however it's better to have a confirm from gurus. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 27, 2023 Share Posted August 27, 2023 22 minutes ago, 99V said: So in text mode it leaves 8 bits on each side to get 240 bits for text Text mode "robs" a two bits from character widths. The screen is still 256 pixels wide; the 6x8 characters allow for 40 columns of text. Also in this mode, there are only two colors available: foreground and screen color (background.) This is described on page 2-16 of the 9918A manual. 1 Quote Link to comment Share on other sites More sharing options...
SteveB Posted August 27, 2023 Share Posted August 27, 2023 37 minutes ago, OLD CS1 said: This is described on page 2-16 of the 9918A manual. ... and available to XB with the T40XB library. 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted August 27, 2023 Share Posted August 27, 2023 (edited) 1 hour ago, tmop69 said: There is also the Text Mode, 40x24 lines, 6x8 pixel chars, but not available in BASIC/XB. It is used in Adventure module, for example. 1 hour ago, 99V said: So in text mode it leaves 8 bits on each side to get 240 bits for text Effectively, you have only a 5x7 matrix for characters in Text mode because you want a 1-pixel character separation for both columns and rows. Though you can certainly define characters to fill the 6x8 matrix, they will run together if you do. Though you lose the rightmost 2 pixels of each character, you must define each character as an 8x8 matrix in the character pattern table. And, indeed, the effective screen is only 240 pixels wide and, I would guess (others will know better than I), centered with an unavailable 8-pixel border on each side. ...lee Edited August 27, 2023 by Lee Stewart additional info 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.