Tursi Posted February 28, 2021 Share Posted February 28, 2021 (edited) 7 hours ago, vol said: It is interesting that the standard TI Basic (+Editor/Assembler cartridge) is noticeably faster than Extended Basic. I have gotten the next results d7,1 691 TI-99/4A + Editor/Assembler cartridge (Classic99 emu) d7,1 774 TI-99/4A + Extended Basic cartridge (Classic99 emu) I tried to use 't40xb' utility but it doesn't also allow to use 2 edge columns for PRINT. How did you enter lines 164 and 166? Both BASIC and XB give me "LINE TOO LONG", which means too many tokens (rather than characters). I broke them up and ran on real hardware... I also get different results under Classic99. Are you on an older version? Current is 399.038. TI BASIC (+EA): Hardware: 739 Classic99.038: 732 MAME (Mizapf): 728 XB: 821 Classic99.038: 815 MAME (Mizapf): 811 There's only a 1% delta between those... since CPU clock can vary by +/- 5% (per datasheet and observation seems to match), that's within spec for all of them. I admit I am surprised. XB is faster at some things, but apparently not this math intensive work... MANDLE Edited February 28, 2021 by Tursi 2 Quote Link to comment Share on other sites More sharing options...
vol Posted February 28, 2021 Author Share Posted February 28, 2021 5 hours ago, TheBF said: I am curious. Do you use the interrupt to poll the timer and accumulate in a memory location? This is exactly how it is. 1 Quote Link to comment Share on other sites More sharing options...
vol Posted February 28, 2021 Author Share Posted February 28, 2021 4 hours ago, Tursi said: How did you enter lines 164 and 166? Both BASIC and XB give me "LINE TOO LONG", which means too many tokens (rather than characters). I broke them up and ran on real hardware... I also get different results under Classic99. Are you on an older version? Current is 399.038. TI BASIC (+EA): Hardware: 739 Classic99.038: 732 MAME (Mizapf): 728 XB: 821 Classic99.038: 815 MAME (Mizapf): 811 There's only a 1% delta between those... since CPU clock can vary by +/- 5% (per datasheet and observation seems to match), that's within spec for all of them. Thank you very much for your results. I use Classic.037, now I am rechecking my results, maybe I made a mistake somewhere. I think your problem with long lines happened because you used the editor where you pasted the text. The editor has more limitations on the line length. I used xbas99 (from there) to convert the text into Basic. Quote Link to comment Share on other sites More sharing options...
vol Posted February 28, 2021 Author Share Posted February 28, 2021 (edited) 10 hours ago, Tursi said: TI BASIC (+EA): Hardware: 739 Classic99.038: 732 MAME (Mizapf): 728 XB: 821 Classic99.038: 815 MAME (Mizapf): 811 I have been able to figure out why your results differ from mine. It is because your code has an extra line 168. However I can't explain why this line affects timings. It is an odd mystery for me. BTW line 540 is also redundant. But it is good to add line 560 IF B=0 THEN 550. Edited February 28, 2021 by vol Quote Link to comment Share on other sites More sharing options...
vol Posted March 1, 2021 Author Share Posted March 1, 2021 (edited) I have been able to persuade T40XB to build the 38x21 Mandelbrot! 100 REM A BASIC, ASCII MANDELBROT 110 REM 120 REM THIS IMPLEMENTATION COPYRIGHT (C) 2019, GORDON HENDERSON 130 REM 140 REM PERMISSION TO USE/ABUSE ANYWHERE FOR ANY PURPOSE GRANTED, BUT 150 REM IT COMES WITH NO WARRANTY WHATSOEVER. GOOD LUCK! 160 REM TI-99/4A (T40) VARIANT BY LITWR, 2021 162 CALL LINK("T40") 163 CALL LINK("CHAR",126,"0000205408") 164 CALL LOAD(-20480,96,130,200,2,176,42,200,2,176,44,4,204,29,0,2,2,63,255,200,2,176,40,5,204) 165 CALL LOAD(-20456,51,130,6,76,30,0,2,2,177,0,200,2,131,196,4,91) 166 CALL LOAD(-20224,4,204,29,0,55,194,30,0,9,18,195,32,176,40,200,2,176,40,99,2,2,76,63,255) 167 CALL LOAD(-20200,168,12,176,44,23,2,5,160,176,42,4,96) 170 C$ = ".,'~=+:;[/<&?oxOX# " 175 REM 'PALLET' LIGHTEST TO DARKEST... 180 SO = 1 185 REM SET TO 0 IF YOUR MID$() INDEXES FROM 0. 190 MI = LEN(C$) 200 MX = 4 210 LS = -2.0 220 TP = 1.25 230 XS = 2.5 240 YS = -2.5 250 W = 38 260 H = 21 270 SX = XS / W 280 SY = YS / H 282 CALL PEEK(-31804,T0,T1) 284 IF T0<>177 THEN CALL LOAD(-20188,T0,T1) 290 CALL LOAD(-31804,176,0) 300 FOR Y = 0 TO H 310 CY = Y * SY + TP 320 FOR X = 0 TO W 330 CX = X * SX + LS 340 ZX = 0 350 ZY = 0 360 CC = SO 370 X2 = ZX * ZX 380 Y2 = ZY * ZY 390 IF CC > MI THEN 460 400 IF (X2 + Y2) > MX THEN 460 410 T = X2 - Y2 + CX 420 ZY = 2 * ZX * ZY + CY 430 ZX = T 440 CC = CC + 1 450 GOTO 370 460 P$=P$&SEG$(C$, CC - SO, 1) 470 NEXT X 480 CALL LINK("PRINT",25,1,P$) 485 P$="" 490 NEXT Y 510 CALL PEEK(-20438,T0,T1,T2,T3) 530 CALL LINK("PRINT",25,1,((T0*256+T1)*65536+T2*256+T3)/46875) 550 CALL KEY(0,X,Y) 560 IF Y=0 THEN 550 This code can be copy-pasted. I am very impressed by T40XB. It has even a command to show a directory listing - CALL LINK("CAT") - a very useful feature. However T40XB is still not polished enough. Its glyph for the tilde character is corrupted so I had to define it in this program. Edited March 1, 2021 by vol 6 Quote Link to comment Share on other sites More sharing options...
Tursi Posted March 2, 2021 Share Posted March 2, 2021 On 2/28/2021 at 7:12 AM, vol said: I have been able to figure out why your results differ from mine. It is because your code has an extra line 168. However I can't explain why this line affects timings. It is an odd mystery for me. BTW line 540 is also redundant. But it is good to add line 560 IF B=0 THEN 550. Ahh, that makes sense. TI BASIC uses a line number lookup table to find code, it probably impacts the search time. Yeah, I noticed 540 was pointless, but I didn't care enough to worry about it. 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted March 2, 2021 Share Posted March 2, 2021 in post #30, VOL wrote: However T40XB is still not polished enough. Its glyph for the tilde character is corrupted so I had to define it in this program. Thanks for catching that. In the T40XB included with the Betelgeuse3 package the tilde is one pixel higher than the one you defined and there is an extra dot in the bottom pixel row. The version of T40XB built into XB 2.8 G.E.M. has a tilde exactly like yours. I will see why this is happening and correct it. 5 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.