Jump to content
bfollett

Bitmap mode.

Recommended Posts

Normally I would load The Missing LInk version of the one made with TML and then just turn off the IRS hooks with RXB the move the entire VDP on screen and GRAPHICS to lower 8K and save it

 

1. Run TML of MAD screen

2. CALL ISROFF(NVAR) ! turns off ISR hooks and stores the value in NVAR

3. CALL MOVES("VR",2079,0,8192) ! moves the VDP memory from screen 0 to the the first used VDP address for variable. i.e. Screen, Pattern, Sprites and color table. 2079 bytes to lower 8K at 8192 (>2000)

4. CALL BSAVE("DSK1.MAD") ! saves the lower 8K in Program Image format to disk.

 

Then I would simply do a BYE in XB and then:

 

1. CALL BLOAD("DSK1.MAD") ! loads the lower 8K from DISK.

2. CALL MOVES("RV",2079,8192,0) ! moves the lower 8K into VDP memory to restore all the values.

3. 2000 goto 2000 ! should just loop as the screen image is on the screen and pattern table, sprites (no movement), and Color table are loaded.

 

The problem is TLM is not nice and crashes the second I turn off the ISR hook. It locks up the system instantly for a unknown reason.

Share this post


Link to post
Share on other sites

I kind of took this as a challenge for the old "hires" dot plot function for TI BASIC that I wrote ages ago.

 

It works, BUT there are not enough characters available to draw everything. The Apple2 version had a scaling factor to fix the aspect ratio, so I just extended that to both axes and let you set it at the beginning. At 1.0 scale, there are not enough characters to finish his head, but at 0.8 there are, plus a tiny bit of the logo. You can go smaller to see more, but give the size of the MAD logo I don't expect you'll see much of it.

 

I was quite surprised by that, given the amount of whitespace in the image. But I threw the TML version (attached to senior_falcon's post) in a tile converter program and it spits out 271 tiles for the non-scaled version. Looking at your code, I don't think that you're filtering out duplicates (which would slow down drawing probably even more, and of course require a more complicated plotting function...), but I reckon that should allow you to draw the scaled image in full...

Share this post


Link to post
Share on other sites

So I took the Tursi TI Basic program and RXB can of course run most TI BASIC programs thus I modified 2 lines to save (with CALL MOVES) what it had drawn and moved all the VDP to lower 8k then saved it in PGM format with CALL BSAVE("DSK1.MAD")

 

Then to load it used CALL BLOAD("DSK1.MAD") and then just moved it onto the screen with CALL MOVES("RV",2079,8192,0)

 

Anyway here is the vidio, and thanks Tursi that made it easy to do. Thank again Tursi!

 

Share this post


Link to post
Share on other sites

That works, but kind of takes the fun out of watching it be drawn. I think the Commodore version said it could take up to 20 minutes(could that be true?) The Atari version takes less than 30 seconds to render.

 

Bob

  • Like 2

Share this post


Link to post
Share on other sites

That works, but kind of takes the fun out of watching it be drawn. I think the Commodore version said it could take up to 20 minutes(could that be true?) The Atari version takes less than 30 seconds to render.

 

Bob

 

Since that was done under emulation I wonder, was that done at NORMAL speed setting or SYSTEM MAXIMUM? Either way, impressively fast.

Share this post


Link to post
Share on other sites

Since that was done under emulation I wonder, was that done at NORMAL speed setting or SYSTEM MAXIMUM? Either way, impressively fast.

 

I may have had system max set but add 1 second to the load plus the BLOAD even on a Normal TI would be faster then all the other methods.

 

Under 15 seconds even on a normal TI using a SSSD Disk Drive. The bonus is in RXB all the Variables for the program can also be loaded at the same time along with Graphics, patterns, and colors.

 

I am kinda amazed no one thought of this before me in all these years.

Share this post


Link to post
Share on other sites
I was quite surprised by that, given the amount of whitespace in the image. But I threw the TML version (attached to senior_falcon's post) in a tile converter program and it spits out 271 tiles for the non-scaled version. Looking at your code, I don't think that you're filtering out duplicates (which would slow down drawing probably even more, and of course require a more complicated plotting function...), but I reckon that should allow you to draw the scaled image in full...

 

There are very few 8x8 aligned blocks of whitespace in the image - you can see it by breakpointing when it's done and seeing where the characters were placed. See here:

 

post-12959-0-07707600-1375740597_thumb.jpg

 

(The garbled looking characters are 127-159 - they have no default pattern).

 

TI BASIC has only 127 tiles available (not including space). With 256, sure. But that was part of the challenge of doing this in TI BASIC -- can it be done at all? (At 0.6 scale you get everything).

 

To take 271 down to 127 with duplication means that you need every tile to be duplicated at least twice, and I didn't think there are /any/ duplicates. But... I ran the app as far as it goes and had it check see if there are any duplicates in the first 126 tiles. It did not find any. I don't think we'll get there with this approach. :)

 

Part of the challenge was to get the line draw function to work as well, but.. Rich inspired me. The TI BASIC version can certainly be done the old fashioned way too. ;) I updated my program to save the results after rendering as a TI BASIC listing with everything ready to go. Not quite as fast, but... the more traditional way to show a pic in TI BASIC. (Also seeing this, there are 11 characters free at 60%, so I guess it can go a little bigger...)

 

100 CALL CLEAR
110 CALL SCREEN(16)
120 FOR A=1 TO 16
130 CALL COLOR(A,2,16)
140 NEXT A
150 PRINT TAB(9);CHR$(141)&CHR$(139)&CHR$(133)&CHR$(131)&CHR$(128)&"zwvpnlk"
160 PRINT TAB(9);CHR$(142)&CHR$(138)&CHR$(134)&CHR$(132)&CHR$(127)&"{|uq"&CHR$(147)&""&CHR$(145)&"g"
170 PRINT TAB(9);CHR$(143)&CHR$(137)&CHR$(135)&CHR$(130)&"~yxtr"&CHR$(148)&""&CHR$(146)&"h"
180 PRINT TAB(9);CHR$(144)&CHR$(140)&CHR$(136)&CHR$(129)&"}e/somij"
190 PRINT TAB(11);"`VUfST\"
200 PRINT TAB(11);"XY  b ]^"
210 PRINT TAB(11);">*+()d_Z"
220 PRINT TAB(11);",O!$;<[email protected]["
230 PRINT TAB(10);"1'"&CHR$(34)&"#Q=N .R"
240 PRINT TAB(10);"2&%DAPJB-W"
250 PRINT TAB(11);"05CEFG3Lc"
260 PRINT TAB(12);"67KI:4M"
270 PRINT TAB(13);"aH89"
280 PRINT :::::
290 FOR A=0 TO 126
300 READ A$
310 CALL CHAR(A+33,A$)
320 NEXT A
325 GOTO 325
330 DATA 0000000F1F3F60C0,F1E0E0C08080C0C0,DF3E7FFF001F0C00,000000C0F0F07078
340 DATA C0E0006060E0E0F0,FDBFFCFCFF9FDFFB,383838F90D0FE7FB,1FDF7C1F07000000
350 DATA 9FFF1E0F00000000,80870707070F0D0C,FEF7F0F0F0F08000,0C181C1C1C1C3838
360 DATA E3070F3FF3F3FFFE,F373337366EFF9F3,6161E1FFFEFCB87E,FC7E3C1E1F070000
370 DATA 000000010F001F1F,1F1F1E1E0F070703,F1F9F8B9B3010707,073E6EFCF0E08000
380 DATA 7831303878FC3E3F,3F0F070300000000,80C0F8FCFE3F0703,000003FFFF000000
390 DATA 7CF0C0C080000000,F0E0C00001070F1E,0000000000070F0F,00000000FCFFDE83
400 DATA 0E000F0F07030300,0D0F070F1E1E3C7C,0100000000010101,CFC767C6C6E6E6E7
410 DATA 000E0E666EC3FF7F,00000000010181E1,7EFCF8F0F80F0300,000000000000030F
420 DATA 1800000000FFFFFF,0030303030FFFFFF,030300010FFEFCC0,E0F83E3F0F060000
430 DATA F619030FFEFC0000,000000C0F0F8DF0F,6F70381F0F0780C0,FDFF078FDEFCF8F0
440 DATA 8000000000000000,0000FEFF7F1CFC70,0C3C383878787070,000C0C01000C3FE0
450 DATA F8F8E0F018F87000,8000006030F8CEFE,7F01000000000000,80FE781F1F000000
460 DATA 010F7FF0C0800000,00000607F3FF60C0,3E3EBCBE8E9CF8F0,03070F0E0E0F0F0F
470 DATA 8000000000808080,183C1E000E0E0E8E,0000800000000000,0000000080E0703C
480 DATA 1E0F070300000000,000080C0E0707C30,0000003EF387C703,0000000001010300
490 DATA 0100000000000000,0000000000000030,E0C0800000000000,F8F86C3603010000
500 DATA 000018EF0001073F,FCF8C00000000000,6030181818181818,18181818181860C0
510 DATA 030E38F000000000,8000000000000000,00000000000080C0,00000000F81C0700
520 DATA 00C0F01F00000000,000000008F607800,000107FC00000000,000000000F183838
530 DATA 3C0E0E0E0E0E0E0E,0E0E8E8ECECE7C78,C0C6DFF300000000,0303010100E060C0
540 DATA 0C1C18180C0C0606,0000000000F80C0C,00000000C0731E00,FF00000000FF00C0
550 DATA 1C38387070E1E381,0000000007000C0C,0C070307070E0E1C,00808C1C1E366663
560 DATA 000C1EFF00000000,0606068383838381,061C0C0C0C0C0C06,0000000000FC8606
570 DATA 66C6C68700000000,CF8F1B1B1B313167,000000001CE7C1C0,C0707070E0E0E7C7
580 DATA 0000000000FC8707,070E180C0C0C0687,87C3C3C060606030,B0B0981F00000000
590 DATA E7C6C6C6CCCC8C86,C0F03070706363E3,000000003CE6C3C0,030133DF00000000
600 DATA 0000000000000101,0100000000000000,000000000101010F,0C0C0C0F00000000
610 DATA C0E070381C0E0E0E,0E0C0C183860C000,071F181818181818,1818181818180F00
620 DATA 0000000000000000,0000000000000000,0000000000000000,0000000000000000
630 DATA 0000000000000000,0000000000000000,0000000000000000,0000000000000000
640 DATA 0000000000000000,0000000000000000,0000000000000000

  • Like 1

Share this post


Link to post
Share on other sites

I timed the Atari version a little more closely with the emulator running at normal speed and it actually took about 36 seconds. Still not bad just using standard basic, there are several ways it could certainly be sped up, but that's the speed as coded in the magazine. If I wasn't so Lazy I'd download a Commodore emulator and see if it really takes up to 20 minutes to render the image.

 

Bob

Share this post


Link to post
Share on other sites

Normally I would load The Missing LInk version of the one made with TML and then just turn off the IRS hooks with RXB the move the entire VDP on screen and GRAPHICS to lower 8K and save it

 

1. Run TML of MAD screen

2. CALL ISROFF(NVAR) ! turns off ISR hooks and stores the value in NVAR

3. CALL MOVES("VR",2079,0,8192) ! moves the VDP memory from screen 0 to the the first used VDP address for variable. i.e. Screen, Pattern, Sprites and color table. 2079 bytes to lower 8K at 8192 (>2000)

4. CALL BSAVE("DSK1.MAD") ! saves the lower 8K in Program Image format to disk.

 

Then I would simply do a BYE in XB and then:

 

1. CALL BLOAD("DSK1.MAD") ! loads the lower 8K from DISK.

2. CALL MOVES("RV",2079,8192,0) ! moves the lower 8K into VDP memory to restore all the values.

3. 2000 goto 2000 ! should just loop as the screen image is on the screen and pattern table, sprites (no movement), and Color table are loaded.

 

The problem is TLM is not nice and crashes the second I turn off the ISR hook. It locks up the system instantly for a unknown reason.

 

Rich, what you are trying to do cannot work with TML for several following reasons:

1 - Why are you turning of the ISR hook? I don't think that would immediately crash TML, but the interrupt routine is there for a reason. Among other things, it keeps track of what XB is doing with the stack pointer. Remember that the XB cartridge is hard wired in the silicon and cannot be modified. As soon as a garbage collection is done the pointer is set to the normal value (>0958 as I recall) which is right in the middle of TML's color table. The interrupt routine sees that and resets it to the proper value needed by TML.

2 - TML gives full bit mapped graphics to XB along with all the VDP memory requirements that entails. The Screen, Pattern, Sprites & Color tables normally used in XB have nothing to do with bit mapped graphics. Moving 2079 bytes out of VDP into low memory is only saving about 1/3 the bit mapped color table.

3 - Even if that did something useful you now have just written 2079 bytes on top of TML which will immediately crash it.

 

Saving or loading a picture in TML is easy.

CALL LINK("SAVEP","DSK1.MAD") saves both pattern and color tables.

CALL LINK("SAVEP","DSK1.MAD",1) saves just the pattern table.

CALL LINK("LOADP","DSK1.MAD") loads both pattern and color tables.

CALL LINK("LOADP","DSK1.MAD",1) loads just the pattern table.

These use standard TIARTIST format. In classic99 it takes 2 seconds to load the picture, which most would agree is acceptably fast.

Share this post


Link to post
Share on other sites

Here it is done in fbForth—

You will need to load the blocks for Text mode, Graphics2 (Bitmap) mode and the graphics primitives library. You can get the proper blocks by typing MENU . They are currently blocks 30, 33 and 36:

30 LOAD 33 LOAD 36 LOAD


Once those blocks are loaded, the following code needs to be loaded. It is adapted from the Basic program Harry posted somewhere above. It takes quite awhile to load in its present state because all 15 screens need to be interpreted. It, along with all the graphics stuff loaded ahead of it, can be BSAVEd to be subsequently BLOADed in seconds. Maybe I'll post it if I get ambitious:

 

-27 VARIABLE LINES -11 , -23 , -6 , -28 , -13 , -22 , -6 ,
-20 , -5 , -12 , -5 , -27 , -14 , -26 , -13 , -38 ,
-29 , -42 , -28 , -40 , -28 , -50 , -16 , -8 , 13 ,
0 , 13 , -29 , 4 , -29 , 9 , -50 , -17 , -41 , -28 ,
-49 , -17 , -50 , -8 , -8 , 12 , 0 , 12 , -28 , 5 ,
-28 , 13 , -50 , -15 , -49 , -10 , 40 , -26 , 42 ,
-17 , -4 , 9 , -21 , 14 , 5 , 48 , 2 , 44 , -53 ,
-39 , -45 , -48 , -55 , -23 , -55 , -28 , -61 , -23 ,
-58 , -22 , -42 , -39 , -43 , -39 , 36 , -52 , 36 ,
-55 , -37 , -48 , -32 , -56 , -32 , -56 , -26 , -60 ,
9 , -74 , 33 , -55 , 6 , -12 , 12 , -11 , 14 , -8 ,
24 , -11 , 6 , -13 , 10 , -11 , 20 , -9 , 10 , -8 ,
-23 , -15 , -24 , -19 , -26 , -18 , -22 , -15 , -25 ,
-18 , -22 , -19 , -23 , -18 , -21 , -16 , -49 , 2 ,
-43 , 10 , 38 , -11 , 43 , -15 , 7 , 14 , 7 , 9 ,
-9 , 13 , -6 , 8 , -5 , -33 , -4 , -33 , -6 , -36 , -->

-6 , -36 , -5 , -32 , -5 , -32 , -7 , -29 , -7 ,
-29 , -39 , -32 , -38 , -41 , -62 , -25 , -54 , -39 ,
-50 , -29 , -50 , -35 , -54 , -33 , -57 , -24 , -38 ,
-34 , -39 , -39 , -51 , -19 , -60 , -22 , -57 , -25 ,
-50 , -24 , -48 , -25 , -46 , -38 , -42 , -24 , -42 ,
-19 , 41 , -26 , 43 , -14 , -3 , 7 , -19 , 14 , 8 ,
48 , 4 , 42 , 27 , -38 , 31 , -47 , -29 , -42 , -16 ,
-37 , -11 , -51 , 10 , -48 , 26 , -38 , 24 , -47 ,
-4 , -73 , 14 , -71 , -3 , -74 , 5 , -74 , 5 , -73 ,
12 , -72 , 8 , -72 , 35 , -57 , -2 , -48 , 5 , -54 ,
-15 , -36 , -20 , -42 , 17 , -34 , 32 , -45 , -6 ,
-53 , 6 , -48 , 40 , -51 , 38 , -43 , 39 , -45 , 38 ,
-50 , 38 , -46 , 37 , -53 , 37 , -47 , 37 , -46 ,
15 , -25 , 18 , -24 , 23 , -18 , 23 , -20 , 12 ,
-19 , 19 , -18 , 8 , -50 , 20 , -49 , -12 , -53 ,
-3 , -62 , -5 , -49 , 14 , -49 , 4 , -62 , 16 , -53 , -->

-41 , -19 , -41 , -27 , 44 , -14 , 43 , -20 , -22 ,
13 , -22 , 14 , 8 , 46 , 2 , 42 , -40 , -23 , -39 ,
-28 , 42 , -26 , 50 , -19 , -23 , 14 , -24 , 5 , 3 ,
41 , 2 , 48 , -51 , -42 , -39 , -49 , -47 , -26 ,
-49 , -36 , -53 , -18 , -59 , -21 , -45 , -28 , -53 ,
-23 , -40 , -19 , -37 , -7 , 50 , -18 , 50 , -13 ,
-25 , 5 , -26 , 14 , 1 , 41 , 9 , 40 , -22 , -9 ,
-19 , -6 , -21 , -9 , -18 , -6 , -21 , -6 , -11 ,
-9 , -19 , -8 , -16 , -8 , -57 , -26 , -57 , -28 ,
-37 , -41 , -37 , -37 , -59 , -31 , -50 , -40 , -39 ,
-36 , -36 , -40 , -5 , -28 , -6 , -30 , -6 , -28 ,
-7 , -30 , 6 , -28 , 5 , -30 , 6 , -29 , 6 , -31 ,
6 , -37 , 9 , -36 , -12 , -38 , -2 , -39 , -6 , -33 ,
-2 , -35 , -13 , -35 , -8 , -39 , -20 , -18 , -17 ,
-17 , -14 , -18 , -15 , -17 , -17 , -18 , -16 , -18 ,
-20 , -17 , -14 , -17 , -39 , -17 , -35 , -6 , 51 , -->

-14 , 48 , -12 , -24 , 8 , -23 , 13 , 1 , 40 , 12 ,
39 , -36 , -6 , -36 , -1 , 41 , -14 , 40 , -9 , -23 ,
8 , -24 , 11 , 14 , 39 , 19 , 40 , -26 , 34 , -32 ,
37 , -32 , 37 , -29 , 32 , -29 , 32 , -30 , 36 ,
-29 , 32 , -39 , 34 , -35 , -5 , -35 , -1 , 40 ,
-13 , 41 , -12 , -26 , 7 , -27 , 14 , 21 , 39 , 11 ,
38 , -61 , -29 , -56 , -37 , -47 , -35 , -42 , -36 ,
-49 , -39 , -45 , -42 , -61 , -24 , -59 , -35 , 60 ,
-24 , 55 , -20 , 60 , -23 , 61 , -32 , 61 , -29 ,
61 , -24 , 60 , -29 , 59 , -33 , 17 , -53 , 5 , -62 ,
6 , -48 , 17 , -50 , 8 , -48 , 2 , -54 , -28 , -41 ,
-18 , -48 , -14 , -52 , -4 , -62 , -5 , -51 , 9 ,
-51 , -27 , -43 , -28 , -47 , -5 , -62 , 8 , -59 ,
-46 , 14 , -42 , 18 , -45 , 25 , -45 , 15 , -42 ,
18 , -42 , 11 , -43 , 11 , -51 , 0 , 15 , -19 , 18 ,
-16 , 14 , -16 , 18 , -19 , 7 , -18 , 8 , -16 , 8 , -->

-17 , 11 , -16 , 39 , -42 , 38 , -37 , 39 , -40 ,
40 , -32 , 41 , -33 , 40 , -39 , 39 , -34 , 39 ,
-36 , 42 , -40 , 43 , -42 , 44 , -42 , 45 , -32 ,
46 , -36 , 45 , -41 , 42 , -38 , 43 , -41 , 48 ,
-11 , 47 , 7 , 41 , -14 , 40 , -9 , 15 , 37 , 15 ,
36 , 17 , 36 , 19 , 36 , -49 , -28 , -48 , -37 ,
-61 , -32 , -62 , -27 , -55 , -35 , -43 , -49 , -46 ,
-34 , -42 , -35 , -14 , -65 , -6 , -71 , 14 , -68 ,
32 , -57 , 18 , -65 , 20 , -63 , 14 , -70 , 23 ,
-65 , 31 , -41 , 32 , -43 , 3 , -42 , 4 , -43 , -22 ,
-43 , -23 , -42 , -9 , -52 , -9 , -52 , 30 , -40 ,
29 , -45 , 14 , -50 , 21 , -48 , -27 , -46 , -25 ,
-46 , -26 , -47 , -27 , -47 , -10 , -10 , -11 , -15 ,
-9 , -11 , -10 , -15 , -10 , -13 , -8 , -13 , -11 ,
-11 , -8 , -12 , 21 , -38 , 29 , -44 , -7 , -48 ,
-3 , -48 , -27 , -45 , -21 , -47 , -12 , -55 , -6 , -->

-61 , 48 , 6 , 49 , -11 , 39 , -10 , 41 , -5 , 18 ,
35 , 22 , 35 , 19 , 34 , 23 , 34 , 51 , -3 , 45 ,
8 , 40 , -5 , 38 , -11 , 23 , 35 , 43 , 17 , 45 ,
17 , 27 , 33 , 46 , -40 , 46 , -36 , 43 , -38 , 43 ,
-39 , 46 , -30 , 52 , -33 , 47 , -30 , 52 , -32 ,
57 , -32 , 57 , -27 , 44 , -25 , 49 , -21 , 7 , -13 ,
9 , -8 , 10 , -8 , 8 , -12 , 23 , -9 , 12 , -7 ,
11 , -9 , 24 , -10 , 57 , -25 , 53 , -24 , 52 , -25 ,
56 , -24 , 56 , -32 , 55 , -26 , 56 , -27 , 56 ,
-29 , 52 , -24 , 57 , -26 , -13 , -13 , -26 , -17 ,
-12 , -16 , -10 , -18 , -15 , -14 , -11 , -18 , -21 ,
-14 , -17 , -14 , 18 , -20 , 21 , -17 , 12 , -16 ,
16 , -19 , 8 , -20 , 10 , -19 , 13 , -23 , 19 , -23 ,
-22 , -22 , -13 , -21 , -16 , -22 , -21 , -23 , -21 ,
-21 , -19 , -23 , -20 , -21 , -18 , -21 , 47 , 4 ,
49 , -3 , 41 , -4 , 37 , 2 , 46 , 16 , 41 , 16 , -->

41 , 16 , 47 , 9 , 37 , 4 , 41 , -2 , -49 , -9 ,
-48 , -4 , 43 , 11 , 45 , 9 , -2 , 11 , 1 , 11 ,
-47 , -4 , -48 , -9 , -48 , -3 , -49 , -1 , 2 , 11 ,
8 , 8 , 4 , 11 , 9 , 9 , 46 , -32 , 48 , -28 , 49 ,
-38 , 49 , -35 , 50 , -37 , 51 , -25 , 51 , -37 ,
52 , -30 , -56 , -23 , -57 , -29 , -60 , -24 , -60 ,
-33 , -54 , -23 , -46 , -29 , -46 , -40 , -44 , -42 ,
-44 , -34 , -45 , -38 , -44 , -37 , -42 , -37 , -44 ,
-38 , -42 , -38 , -48 , -46 , -42 , -49 , 21 , -16 ,
10 , -18 , 22 , -17 , 19 , -25 , 20 , -24 , 22 ,
-19 , 10 , -23 , 18 , -25 , -41 , 33 , -35 , 34 ,
-41 , 32 , -38 , 32 , -38 , 31 , -42 , 31 , -42 ,
32 , -45 , 30 , -3 , -36 , -12 , -37 , 7 , -35 , 7 ,
-35 , -3 , -37 , -8 , -36 , -8 , -38 , -4 , -38 , 8 ,
-18 , 9 , -16 , -35 , -45 , -29 , -58 , -36 , -46 ,
-35 , -53 , -38 , -48 , -26 , -57 , -35 , -48 , -30 , -->

-58 , -34 , -52 , -25 , -59 , -32 , -55 , -25 , -60 ,
-34 , -49 , -14 , -68 , -36 , -51 , -22 , -61 , -49 ,
-3 , -46 , 5 , 10 , 9 , 4 , 15 , 3 , 15 , 6 , 10 ,
6 , 11 , 6 , 14 , 47 , -22 , 52 , -21 , 48 , -21 ,
56 , -20 , 55 , -21 , 48 , -21 , 56 , -20 , 59 ,
-22 , 24 , -64 , 32 , -60 , 30 , -59 , 34 , -57 ,
33 , -59 , 35 , -52 , 35 , -56 , 36 , -49 , 61 ,
-32 , 42 , -51 , 43 , -51 , 51 , -41 , 50 , -41 ,
45 , -46 , 58 , -37 , 54 , -41 , -39 , 30 , -45 ,
23 , -38 , 30 , -46 , 21 , -46 , 24 , -47 , 11 ,
-46 , 12 , -42 , 27 , 7 , -29 , 6 , -31 , 13 , -35 ,
13 , -35 , 4 , -37 , 8 , -35 , 5 , -36 , 8 , -37 ,
-16 , -49 , -8 , -50 , 9 , -53 , 9 , -49 , 20 , -37 ,
29 , -39 , -17 , -39 , -24 , -41 , 21 , -36 , 32 ,
-44 , -2 , -62 , 5 , -61 , 9 , -58 , 16 , -53 , -26 ,
-44 , -22 , -46 , -51 , 1 , -43 , 12 , 7 , 14 , 15 , -->

13 , 13 , 11 , 17 , 8 , 20 , 10 , 27 , 4 , -42 ,
11 , -49 , 2 , 8 , 13 , 19 , 12 , 19 , 11 , 10 ,
12 , 22 , 9 , 27 , 5 , -24 , -56 , -22 , -59 , -23 ,
-58 , -4 , -74 , -23 , -56 , -15 , -67 , -21 , -57 ,
-8 , -72 , -7 , -73 , -12 , -69 , -12 , -68 , -4 ,
-71 , -21 , -58 , -13 , -68 , -10 , -71 , 8 , -74 ,
12 , -32 , 14 , -35 , 13 , -32 , 12 , -37 , 14 ,
-34 , 13 , -37 , 11 , -37 , 14 , -36 , -17 , -6 ,
-10 , -8 , -13 , -9 , -10 , -6 , -10 , -7 , -11 ,
-6 , -12 , -6 , -15 , -6 , 17 , -35 , 21 , -39 , 7 ,
-62 , 14 , -56 , 14 , -51 , -17 , -48 , 4 , -43 , 4 ,
-47 , -11 , -12 , -12 , -14 , -12 , -13 , -9 , -15 ,
-20 , -16 , -15 , -16 , -17 , -16 , -15 , -16 , -11 ,
-22 , -12 , -24 , -9 , -22 , -12 , -23 , -9 , -20 ,
-11 , -24 , -8 , -20 , -9 , -23 , -34 , -2 , -33 ,
6 , 25 , 7 , 29 , 7 , 30 , 8 , 30 , 6 , 31 , 8 , -->

35 , 9 , -33 , 3 , -33 , -1 , 33 , 8 , 36 , 8 , 36 ,
7 , 36 , 2 , 35 , 4 , 35 , 7 , -32 , 6 , -31 , 11 ,
-30 , 11 , -29 , 4 , 3 , 48 , -3 , 41 , -5 , 41 ,
2 , 48 , -5 , -59 , -6 , -62 , 12 , -52 , 21 , -47 ,
-2 , -54 , -2 , -53 , -4 , -60 , 3 , -62 , -44 ,
-47 , -41 , -49 , -54 , -24 , -56 , -30 , -36 , -43 ,
-37 , -48 , -47 , -37 , -49 , -32 , -40 , -48 , -45 ,
-46 , -38 , -47 , -35 , -44 , -58 , -36 , -51 , -40 ,
-58 , -35 , -48 , -45 , 24 , -42 , 32 , -42 , -3 ,
-61 , -3 , -61 , -54 , -19 , -50 , -18 , -5 , -72 ,
9 , -72 , 10 , -22 , 10 , -22 , 19 , -22 , 19 , -22 ,
13 , -16 , 13 , -16 , 9 , -19 , 10 , -20 , -25 ,
-42 , -21 , -41 , 2 , -53 , 4 , -54 , 29 , -40 , 31 ,
-46 , 26 , -43 , 22 , -48 , 6 , -10 , 18 , -6 , 14 ,
-6 , 21 , -7 , 22 , -8 , 6 , -11 , 1 , -38 , -14 ,
-36 , -13 , -37 , -11 , -32 , -14 , -35 , -12 , -33 , -->

55 , -37 , 41 , -51 , 46 , -48 , 61 , -33 , 41 ,
-49 , 37 , -48 , -10 , -21 , -10 , -24 , -28 , -14 ,
-22 , -7 , -3 , 43 , -26 , 35 , -26 , 35 , -5 , 41 ,
-9 , 39 , -20 , 36 , -26 , 34 , -26 , 37 , -6 , -58 ,
1 , -60 , -24 , -43 , -21 , -42 , 3 , -45 , 3 , -46 ,
4 , -52 , 4 , -53 , 72 , 73 , 72 , 63 , 71 , 74 ,
70 , 78 , 71 , 62 , 70 , 58 , 69 , 57 , 65 , 53 ,
70 , 78 , 65 , 83 , 64 , 83 , 58 , 86 , 64 , 53 ,
55 , 48 , 56 , 49 , 43 , 49 , 47 , 48 , 55 , 48 ,
58 , 86 , 46 , 86 , 42 , 84 , 46 , 85 , 44 , 50 ,
39 , 52 , 42 , 50 , 39 , 51 , 41 , 85 , 40 , 85 ,
39 , 86 , 33 , 86 , 38 , 51 , 33 , 48 , 35 , 79 ,
35 , 58 , 34 , 79 , 34 , 58 , 34 , 57 , 32 , 56 ,
34 , 80 , 32 , 79 , 32 , 85 , 30 , 83 , 31 , 83 ,
31 , 80 , 30 , 82 , 30 , 79 , 31 , 55 , 29 , 55 ,
33 , 49 , 23 , 49 , 32 , 48 , 25 , 48 , 24 , 50 , -->

22 , 50 , 28 , 55 , 17 , 78 , 18 , 79 , 20 , 79 ,
20 , 80 , 20 , 84 , 21 , 51 , 18 , 48 , 19 , 50 ,
17 , 48 , 16 , 48 , 14 , 48 , 17 , 49 , 14 , 49 ,
19 , 85 , 11 , 86 , 13 , 48 , 12 , 53 , 12 , 48 ,
11 , 53 , 11 , 54 , 15 , 57 , 15 , 58 , 14 , 59 ,
14 , 59 , -1 , 59 , 14 , 58 , -2 , 58 , 10 , 85 ,
7 , 83 , 6 , 84 , 1 , 86 , 0 , 86 , -5 , 85 , -6 ,
84 , -6 , 80 , -7 , 83 , -7 , 79 , -5 , 79 , -3 ,
79 , -2 , 78 , -13 , 56 , -14 , 56 , -3 , 78 , -2 ,
59 , -4 , 57 , -4 , 56 , -1 , 54 , 0 , 55 , 1 , 55 ,
1 , 54 , 1 , 50 , 0 , 50 , -1 , 48 , -2 , 48 , -7 ,
48 , -2 , 49 , -6 , 49 , -6 , 48 , -9 , 51 , -7 ,
48 , -10 , 50 , -11 , 49 , -17 , 49 , -12 , 48 ,
-16 , 48 , -17 , 48 , -21 , 51 , -18 , 48 , -22 ,
50 , -15 , 55 , -16 , 55 , -17 , 56 , -22 , 78 ,
-21 , 79 , -19 , 79 , -19 , 80 , -19 , 84 , -23 , -->

49 , -30 , 49 , -24 , 48 , -30 , 48 , -31 , 48 ,
-31 , 55 , -32 , 54 , -32 , 49 , -30 , 55 , -28 ,
55 , -20 , 85 , -25 , 86 , -26 , 85 , -29 , 83 ,
-28 , 55 , -32 , 70 , -28 , 55 , -31 , 71 , -28 ,
83 , -33 , 86 , -34 , 86 , -37 , 86 , -32 , 70 ,
-41 , 49 , -38 , 85 , -40 , 84 , -40 , 83 , -40 ,
81 , -41 , 83 , -41 , 79 , -40 , 80 , -37 , 78 ,
-37 , 78 , -41 , 65 , -42 , 65 , -38 , 78 , -43 ,
64 , -48 , 78 , -47 , 79 , -45 , 79 , -45 , 80 ,
-45 , 84 , -46 , 85 , -51 , 86 , -42 , 49 , -47 ,
49 , -42 , 48 , -48 , 48 , -48 , 48 , -56 , 70 ,
-48 , 49 , -56 , 71 , -56 , 71 , -60 , 56 , -52 ,
85 , -54 , 84 , -55 , 83 , -59 , 85 , -60 , 86 ,
-64 , 86 , -59 , 55 , -58 , 54 , -57 , 54 , -55 ,
55 , -55 , 54 , -55 , 50 , -56 , 50 , -57 , 48 ,
-57 , 49 , -61 , 49 , -58 , 48 , -60 , 48 , -61 , -->

48 , -64 , 51 , -62 , 48 , -65 , 50 , -65 , 85 ,
-67 , 84 , -67 , 83 , -67 , 79 , -68 , 83 , -68 ,
79 , -66 , 79 , -64 , 79 , -63 , 78 , -68 , 56 ,
-69 , 55 , -64 , 78 , -66 , 49 , -72 , 49 , -68 ,
48 , -73 , 48 , -69 , 55 , -73 , 55 , -73 , 55 ,
-73 , 48 , -74 , 49 , -74 , 54 , 61 , 71 , 61 , 65 ,
60 , 73 , 60 , 63 , 59 , 73 , 59 , 72 , 60 , 65 ,
58 , 60 , 59 , 61 , 54 , 56 , 59 , 74 , 55 , 78 ,
59 , 75 , 54 , 80 , 54 , 80 , 48 , 80 , 46 , 79 ,
55 , 79 , 54 , 56 , 48 , 56 , 47 , 57 , 46 , 57 ,
47 , 78 , 46 , 78 , 45 , 78 , 45 , 58 , 7 , 76 ,
11 , 66 , 10 , 66 , 6 , 76 , 9 , 66 , 1 , 66 , 0 ,
66 , 6 , 75 , -->

BASE->R DECIMAL 120 CONSTANT XC 92 CONSTANT YC HEX
: AEN GRAPHICS2 4F DCOLOR ! F SCREEN

LINES 1050 + LINES DO ( 4176 decimal)

I @ XC +
YC I 2+ @ -
I 4 + @ XC +
YC I 6 + @ -
LINE

8 +LOOP
KEY DROP TEXT ;

R->BASE

 




The above version does not have the doubling of the lines horizontally. The following video shows what happens after you run AEN :

AEN_fbForth.wmv

The following code replaces the last block in the spoiler above and will plot the screen with the horizontal doubling routine. It takes twice as long to plot:

BASE->R DECIMAL 120 CONSTANT XC 92 CONSTANT YC HEX

0 VARIABLE X 0 VARIABLE Y 0 VARIABLE X1 0 VARIABLE Y1

: AEN GRAPHICS2 4F DCOLOR ! F SCREEN

LINES 1050 + LINES DO ( 4176 decimal)

I @ XC + DUP X !

YC I 2+ @ - DUP 1+ Y !

I 4 + @ XC + DUP X1 !

YC I 6 + @ - DUP 1+ Y1 !

LINE

X @ Y @ X1 @ Y1 @ LINE

8 +LOOP

KEY DROP TEXT ;

R->BASE


The two plots are shown below. The second image has the horizontal doubling:

post-29677-0-85023000-1375761472_thumb.gif post-29677-0-51199600-1375761473_thumb.gif

I did not include "What, me worry?" because it is not part of the image. The programs in other posts simply displayed text. In bitmap graphics, I would need to do a bit | :) more work—too lazy!

...lee

 

EDIT: The spoiler below contains a much faster-loading version as discussed in post #951 of fbForth—TI Forth with File-based Block I/O :

 

: NUMS BL WORD HERE NUMBER DO BL WORD HERE NUMBER DROP , LOOP ;
-27 VARIABLE LINES NUMS 255 -11 -23 -6 -28 -13 -22 -6 -20 -5
-12 -5 -27 -14 -26 -13 -38 -29 -42 -28 -40 -28 -50 -16 -8 13 0
13 -29 4 -29 9 -50 -17 -41 -28 -49 -17 -50 -8 -8 12 0 12 -28 5
-28 13 -50 -15 -49 -10 40 -26 42 -17 -4 9 -21 14 5 48 2 44 -53
-39 -45 -48 -55 -23 -55 -28 -61 -23 -58 -22 -42 -39 -43 -39 36
-52 36 -55 -37 -48 -32 -56 -32 -56 -26 -60 9 -74 33 -55 6 -12
12 -11 14 -8 24 -11 6 -13 10 -11 20 -9 10 -8 -23 -15 -24 -19
-26 -18 -22 -15 -25 -18 -22 -19 -23 -18 -21 -16 -49 2 -43 10 38
-11 43 -15 7 14 7 9 -9 13 -6 8 -5 -33 -4 -33 -6 -36 -6 -36 -5
-32 -5 -32 -7 -29 -7 -29 -39 -32 -38 -41 -62 -25 -54 -39 -50
-29 -50 -35 -54 -33 -57 -24 -38 -34 -39 -39 -51 -19 -60 -22 -57
-25 -50 -24 -48 -25 -46 -38 -42 -24 -42 -19 41 -26 43 -14 -3 7
-19 14 8 48 4 42 27 -38 31 -47 -29 -42 -16 -37 -11 -51 10 -48
26 -38 24 -47 -4 -73 14 -71 -3 -74 5 -74 5 -73 12 -72 8 -72 35
-57 -2 -48 5 -54 -15 -36 -20 -42 17 -34 32 -45 -6 -53 6 -48 -->

NUMS 283 40 -51 38 -43 39 -45 38 -50 38 -46 37 -53 37 -47 37
-46 15 -25 18 -24 23 -18 23 -20 12 -19 19 -18 8 -50 20 -49 -12
-53 -3 -62 -5 -49 14 -49 4 -62 16 -53 -41 -19 -41 -27 44 -14 43
-20 -22 13 -22 14 8 46 2 42 -40 -23 -39 -28 42 -26 50 -19 -23
14 -24 5 3 41 2 48 -51 -42 -39 -49 -47 -26 -49 -36 -53 -18 -59
-21 -45 -28 -53 -23 -40 -19 -37 -7 50 -18 50 -13 -25 5 -26 14 1
41 9 40 -22 -9 -19 -6 -21 -9 -18 -6 -21 -6 -11 -9 -19 -8 -16 -8
-57 -26 -57 -28 -37 -41 -37 -37 -59 -31 -50 -40 -39 -36 -36 -40
-5 -28 -6 -30 -6 -28 -7 -30 6 -28 5 -30 6 -29 6 -31 6 -37 9 -36
-12 -38 -2 -39 -6 -33 -2 -35 -13 -35 -8 -39 -20 -18 -17 -17 -14
-18 -15 -17 -17 -18 -16 -18 -20 -17 -14 -17 -39 -17 -35 -6 51
-14 48 -12 -24 8 -23 13 1 40 12 39 -36 -6 -36 -1 41 -14 40 -9
-23 8 -24 11 14 39 19 40 -26 34 -32 37 -32 37 -29 32 -29 32 -30
36 -29 32 -39 34 -35 -5 -35 -1 40 -13 41 -12 -26 7 -27 14 21 39
11 38 -61 -29 -56 -37 -47 -35 -42 -36 -49 -39 -45 -42 -61 -24
-59 -35 60 -24 55 -20 60 -23 61 -32 61 -29 61 -24 60 -29 59 -->

NUMS 286 -33 17 -53 5 -62 6 -48 17 -50 8 -48 2 -54 -28 -41 -18
-48 -14 -52 -4 -62 -5 -51 9 -51 -27 -43 -28 -47 -5 -62 8 -59
-46 14 -42 18 -45 25 -45 15 -42 18 -42 11 -43 11 -51 0 15 -19
18 -16 14 -16 18 -19 7 -18 8 -16 8 -17 11 -16 39 -42 38 -37 39
-40 40 -32 41 -33 40 -39 39 -34 39 -36 42 -40 43 -42 44 -42 45
-32 46 -36 45 -41 42 -38 43 -41 48 -11 47 7 41 -14 40 -9 15 37
15 36 17 36 19 36 -49 -28 -48 -37 -61 -32 -62 -27 -55 -35 -43
-49 -46 -34 -42 -35 -14 -65 -6 -71 14 -68 32 -57 18 -65 20 -63
14 -70 23 -65 31 -41 32 -43 3 -42 4 -43 -22 -43 -23 -42 -9 -52
-9 -52 30 -40 29 -45 14 -50 21 -48 -27 -46 -25 -46 -26 -47 -27
-47 -10 -10 -11 -15 -9 -11 -10 -15 -10 -13 -8 -13 -11 -11 -8
-12 21 -38 29 -44 -7 -48 -3 -48 -27 -45 -21 -47 -12 -55 -6 -61
48 6 49 -11 39 -10 41 -5 18 35 22 35 19 34 23 34 51 -3 45 8 40
-5 38 -11 23 35 43 17 45 17 27 33 46 -40 46 -36 43 -38 43 -39
46 -30 52 -33 47 -30 52 -32 57 -32 57 -27 44 -25 49 -21 7 -13
9 -8 10 -8 8 -12 23 -9 12 -7 11 -9 24 -10 57 -25 53 -24 52 -->

NUMS 285 -25 56 -24 56 -32 55 -26 56 -27 56 -29 52 -24 57 -26
-13 -13 -26 -17 -12 -16 -10 -18 -15 -14 -11 -18 -21 -14 -17 -14
18 -20 21 -17 12 -16 16 -19 8 -20 10 -19 13 -23 19 -23 -22 -22
-13 -21 -16 -22 -21 -23 -21 -21 -19 -23 -20 -21 -18 -21 47 4 49
-3 41 -4 37 2 46 16 41 16 41 16 47 9 37 4 41 -2 -49 -9 -48 -4
43 11 45 9 -2 11 1 11 -47 -4 -48 -9 -48 -3 -49 -1 2 11 8 8 4 11
9 9 46 -32 48 -28 49 -38 49 -35 50 -37 51 -25 51 -37 52 -30 -56
-23 -57 -29 -60 -24 -60 -33 -54 -23 -46 -29 -46 -40 -44 -42 -44
-34 -45 -38 -44 -37 -42 -37 -44 -38 -42 -38 -48 -46 -42 -49 21
-16 10 -18 22 -17 19 -25 20 -24 22 -19 10 -23 18 -25 -41 33 -35
34 -41 32 -38 32 -38 31 -42 31 -42 32 -45 30 -3 -36 -12 -37 7
-35 7 -35 -3 -37 -8 -36 -8 -38 -4 -38 8 -18 9 -16 -35 -45 -29
-58 -36 -46 -35 -53 -38 -48 -26 -57 -35 -48 -30 -58 -34 -52 -25
-59 -32 -55 -25 -60 -34 -49 -14 -68 -36 -51 -22 -61 -49 -3 -46
5 10 9 4 15 3 15 6 10 6 11 6 14 47 -22 52 -21 48 -21 56 -20 55
-21 48 -21 56 -20 59 -22 24 -64 32 -60 30 -59 34 -57 33 -59 -->

NUMS 295 35 -52 35 -56 36 -49 61 -32 42 -51 43 -51 51 -41 50
-41 45 -46 58 -37 54 -41 -39 30 -45 23 -38 30 -46 21 -46 24 -47
11 -46 12 -42 27 7 -29 6 -31 13 -35 13 -35 4 -37 8 -35 5 -36 8
-37 -16 -49 -8 -50 9 -53 9 -49 20 -37 29 -39 -17 -39 -24 -41 21
-36 32 -44 -2 -62 5 -61 9 -58 16 -53 -26 -44 -22 -46 -51 1 -43
12 7 14 15 13 13 11 17 8 20 10 27 4 -42 11 -49 2 8 13 19 12 19
11 10 12 22 9 27 5 -24 -56 -22 -59 -23 -58 -4 -74 -23 -56 -15
-67 -21 -57 -8 -72 -7 -73 -12 -69 -12 -68 -4 -71 -21 -58 -13
-68 -10 -71 8 -74 12 -32 14 -35 13 -32 12 -37 14 -34 13 -37 11
-37 14 -36 -17 -6 -10 -8 -13 -9 -10 -6 -10 -7 -11 -6 -12 -6 -15
-6 17 -35 21 -39 7 -62 14 -56 14 -51 -17 -48 4 -43 4 -47 -11
-12 -12 -14 -12 -13 -9 -15 -20 -16 -15 -16 -17 -16 -15 -16 -11
-22 -12 -24 -9 -22 -12 -23 -9 -20 -11 -24 -8 -20 -9 -23 -34 -2
-33 6 25 7 29 7 30 8 30 6 31 8 35 9 -33 3 -33 -1 33 8 36 8 36 7
36 2 35 4 35 7 -32 6 -31 11 -30 11 -29 4 3 48 -3 41 -5 41 2 48
-5 -59 -6 -62 12 -52 21 -47 -2 -54 -2 -53 -4 -60 3 -62 -44 -->

NUMS 301 -47 -41 -49 -54 -24 -56 -30 -36 -43 -37 -48 -47 -37
-49 -32 -40 -48 -45 -46 -38 -47 -35 -44 -58 -36 -51 -40 -58 -35
-48 -45 24 -42 32 -42 -3 -61 -3 -61 -54 -19 -50 -18 -5 -72 9
-72 10 -22 10 -22 19 -22 19 -22 13 -16 13 -16 9 -19 10 -20 -25
-42 -21 -41 2 -53 4 -54 29 -40 31 -46 26 -43 22 -48 6 -10 18 -6
14 -6 21 -7 22 -8 6 -11 1 -38 -14 -36 -13 -37 -11 -32 -14 -35
-12 -33 55 -37 41 -51 46 -48 61 -33 41 -49 37 -48 -10 -21 -10
-24 -28 -14 -22 -7 -3 43 -26 35 -26 35 -5 41 -9 39 -20 36 -26
34 -26 37 -6 -58 1 -60 -24 -43 -21 -42 3 -45 3 -46 4 -52 4 -53
72 73 72 63 71 74 70 78 71 62 70 58 69 57 65 53 70 78 65 83 64
83 58 86 64 53 55 48 56 49 43 49 47 48 55 48 58 86 46 86 42 84
46 85 44 50 39 52 42 50 39 51 41 85 40 85 39 86 33 86 38 51 33
48 35 79 35 58 34 79 34 58 34 57 32 56 34 80 32 79 32 85 30 83
31 83 31 80 30 82 30 79 31 55 29 55 33 49 23 49 32 48 25 48 24
50 22 50 28 55 17 78 18 79 20 79 20 80 20 84 21 51 18 48 19 50
17 48 16 48 14 48 17 49 14 49 19 85 11 86 13 48 12 53 12 48 -->

NUMS 298 11 53 11 54 15 57 15 58 14 59 14 59 -1 59 14 58 -2 58
10 85 7 83 6 84 1 86 0 86 -5 85 -6 84 -6 80 -7 83 -7 79 -5 79
-3 79 -2 78 -13 56 -14 56 -3 78 -2 59 -4 57 -4 56 -1 54 0 55 1
55 1 54 1 50 0 50 -1 48 -2 48 -7 48 -2 49 -6 49 -6 48 -9 51 -7
48 -10 50 -11 49 -17 49 -12 48 -16 48 -17 48 -21 51 -18 48 -22
50 -15 55 -16 55 -17 56 -22 78 -21 79 -19 79 -19 80 -19 84 -23
49 -30 49 -24 48 -30 48 -31 48 -31 55 -32 54 -32 49 -30 55 -28
55 -20 85 -25 86 -26 85 -29 83 -28 55 -32 70 -28 55 -31 71 -28
83 -33 86 -34 86 -37 86 -32 70 -41 49 -38 85 -40 84 -40 83 -40
81 -41 83 -41 79 -40 80 -37 78 -37 78 -41 65 -42 65 -38 78 -43
64 -48 78 -47 79 -45 79 -45 80 -45 84 -46 85 -51 86 -42 49 -47
49 -42 48 -48 48 -48 48 -56 70 -48 49 -56 71 -56 71 -60 56 -52
85 -54 84 -55 83 -59 85 -60 86 -64 86 -59 55 -58 54 -57 54 -55
55 -55 54 -55 50 -56 50 -57 48 -57 49 -61 49 -58 48 -60 48 -61
48 -64 51 -62 48 -65 50 -65 85 -67 84 -67 83 -67 79 -68 83 -68
79 -66 79 -64 79 -63 78 -68 56 -69 55 -64 78 -66 49 -72 49 -->

NUMS 84 -68 48 -73 48 -69 55 -73 55 -73 55 -73 48 -74 49 -74
54 61 71 61 65 60 73 60 63 59 73 59 72 60 65 58 60 59 61 54 56
59 74 55 78 59 75 54 80 54 80 48 80 46 79 55 79 54 56 48 56 47
57 46 57 47 78 46 78 45 78 45 58 7 76 11 66 10 66 6 76 9 66 1
66 0 66 6 75
BASE->R DECIMAL 120 CONSTANT XC 92 CONSTANT YC HEX
: AEN GRAPHICS2 4F DCOLOR ! F SCREEN
    LINES 1050 + LINES DO ( 4176 decimal)
        I @ XC +
        YC I 2+ @ -
        I 4 + @ XC +
        YC I 6 + @ -
        LINE
    8 +LOOP
    KEY DROP TEXT ;
R->BASE                      -->

BASE->R HEX
0 VARIABLE X 0 VARIABLE Y 0 VARIABLE X1 0 VARIABLE Y1
: AEN2 GRAPHICS2 4F DCOLOR ! F SCREEN
    LINES 1050 + LINES DO ( 4176 decimal)
        I @ XC + DUP X !
        YC I 2+ @ - DUP 1+ Y !
        I 4 + @ XC + DUP X1 !
        YC I 6 + @ - DUP 1+ Y1 !
        LINE
        X @ Y @ X1 @ Y1 @ LINE
    8 +LOOP
    KEY DROP TEXT ;     R->BASE   ;S 

Edited by Lee Stewart
  • Like 3

Share this post


Link to post
Share on other sites

Rich, what you are trying to do cannot work with TML for several following reasons:

1 - Why are you turning of the ISR hook? I don't think that would immediately crash TML, but the interrupt routine is there for a reason. Among other things, it keeps track of what XB is doing with the stack pointer. Remember that the XB cartridge is hard wired in the silicon and cannot be modified. As soon as a garbage collection is done the pointer is set to the normal value (>0958 as I recall) which is right in the middle of TML's color table. The interrupt routine sees that and resets it to the proper value needed by TML.

2 - TML gives full bit mapped graphics to XB along with all the VDP memory requirements that entails. The Screen, Pattern, Sprites & Color tables normally used in XB have nothing to do with bit mapped graphics. Moving 2079 bytes out of VDP into low memory is only saving about 1/3 the bit mapped color table.

3 - Even if that did something useful you now have just written 2079 bytes on top of TML which will immediately crash it.

 

Saving or loading a picture in TML is easy.

CALL LINK("SAVEP","DSK1.MAD") saves both pattern and color tables.

CALL LINK("SAVEP","DSK1.MAD",1) saves just the pattern table.

CALL LINK("LOADP","DSK1.MAD") loads both pattern and color tables.

CALL LINK("LOADP","DSK1.MAD",1) loads just the pattern table.

These use standard TIARTIST format. In classic99 it takes 2 seconds to load the picture, which most would agree is acceptably fast.

 

Thanks, but the CALL MOVES routine can move any size memory of any kind to any kind of memory. i.e. RAM/ROM, VDP or GROM/GRAM

Thus I can move 8K of VDP to the LOWER 8K and save it with CALL BSAVE and when I reload it, just turn on Bit Mapped mode than move it from lower 8K RAM to VDP.

I showed this in the origianal USER DEMO of RXB.

 

In order to load anything it requires you load a program. What takes longer 1 RXB program line or load XB then the load Assembly then the load the image.

Assembly is fast but you have to freaking load it first. Besides my program to load the same image takes 24 bytes unlike Assembly.

TML is great stuff but If you have to load something to load something else that just slows stuff down right?

Edited by RXB

Share this post


Link to post
Share on other sites

Here it is done in fbForth—

 

You will need to load the blocks for Text mode, Graphics2 (Bitmap) mode and the graphics primitives library. You can get the proper blocks by typing MENU . They are currently blocks 30, 33 and 36:

 

30 LOAD 33 LOAD 36 LOAD

 

Once those blocks are loaded, the following code needs to be loaded. It is adapted from the Basic program Harry posted somewhere above. It takes quite awhile to load in its present state because all 15 screens need to be interpreted. It, along with all the graphics stuff loaded ahead of it, can be BSAVEd to be subsequently BLOADed in seconds. Maybe I'll post it if I get ambitious:

 

 

 

-27 VARIABLE LINES -11 , -23 , -6 , -28 , -13 , -22 , -6 ,

-20 , -5 , -12 , -5 , -27 , -14 , -26 , -13 , -38 ,

-29 , -42 , -28 , -40 , -28 , -50 , -16 , -8 , 13 ,

0 , 13 , -29 , 4 , -29 , 9 , -50 , -17 , -41 , -28 ,

-49 , -17 , -50 , -8 , -8 , 12 , 0 , 12 , -28 , 5 ,

-28 , 13 , -50 , -15 , -49 , -10 , 40 , -26 , 42 ,

-17 , -4 , 9 , -21 , 14 , 5 , 48 , 2 , 44 , -53 ,

-39 , -45 , -48 , -55 , -23 , -55 , -28 , -61 , -23 ,

-58 , -22 , -42 , -39 , -43 , -39 , 36 , -52 , 36 ,

-55 , -37 , -48 , -32 , -56 , -32 , -56 , -26 , -60 ,

9 , -74 , 33 , -55 , 6 , -12 , 12 , -11 , 14 , -8 ,

24 , -11 , 6 , -13 , 10 , -11 , 20 , -9 , 10 , -8 ,

-23 , -15 , -24 , -19 , -26 , -18 , -22 , -15 , -25 ,

-18 , -22 , -19 , -23 , -18 , -21 , -16 , -49 , 2 ,

-43 , 10 , 38 , -11 , 43 , -15 , 7 , 14 , 7 , 9 ,

-9 , 13 , -6 , 8 , -5 , -33 , -4 , -33 , -6 , -36 , -->

 

-6 , -36 , -5 , -32 , -5 , -32 , -7 , -29 , -7 ,

-29 , -39 , -32 , -38 , -41 , -62 , -25 , -54 , -39 ,

-50 , -29 , -50 , -35 , -54 , -33 , -57 , -24 , -38 ,

-34 , -39 , -39 , -51 , -19 , -60 , -22 , -57 , -25 ,

-50 , -24 , -48 , -25 , -46 , -38 , -42 , -24 , -42 ,

-19 , 41 , -26 , 43 , -14 , -3 , 7 , -19 , 14 , 8 ,

48 , 4 , 42 , 27 , -38 , 31 , -47 , -29 , -42 , -16 ,

-37 , -11 , -51 , 10 , -48 , 26 , -38 , 24 , -47 ,

-4 , -73 , 14 , -71 , -3 , -74 , 5 , -74 , 5 , -73 ,

12 , -72 , 8 , -72 , 35 , -57 , -2 , -48 , 5 , -54 ,

-15 , -36 , -20 , -42 , 17 , -34 , 32 , -45 , -6 ,

-53 , 6 , -48 , 40 , -51 , 38 , -43 , 39 , -45 , 38 ,

-50 , 38 , -46 , 37 , -53 , 37 , -47 , 37 , -46 ,

15 , -25 , 18 , -24 , 23 , -18 , 23 , -20 , 12 ,

-19 , 19 , -18 , 8 , -50 , 20 , -49 , -12 , -53 ,

-3 , -62 , -5 , -49 , 14 , -49 , 4 , -62 , 16 , -53 , -->

 

-41 , -19 , -41 , -27 , 44 , -14 , 43 , -20 , -22 ,

13 , -22 , 14 , 8 , 46 , 2 , 42 , -40 , -23 , -39 ,

-28 , 42 , -26 , 50 , -19 , -23 , 14 , -24 , 5 , 3 ,

41 , 2 , 48 , -51 , -42 , -39 , -49 , -47 , -26 ,

-49 , -36 , -53 , -18 , -59 , -21 , -45 , -28 , -53 ,

-23 , -40 , -19 , -37 , -7 , 50 , -18 , 50 , -13 ,

-25 , 5 , -26 , 14 , 1 , 41 , 9 , 40 , -22 , -9 ,

-19 , -6 , -21 , -9 , -18 , -6 , -21 , -6 , -11 ,

-9 , -19 , -8 , -16 , -8 , -57 , -26 , -57 , -28 ,

-37 , -41 , -37 , -37 , -59 , -31 , -50 , -40 , -39 ,

-36 , -36 , -40 , -5 , -28 , -6 , -30 , -6 , -28 ,

-7 , -30 , 6 , -28 , 5 , -30 , 6 , -29 , 6 , -31 ,

6 , -37 , 9 , -36 , -12 , -38 , -2 , -39 , -6 , -33 ,

-2 , -35 , -13 , -35 , -8 , -39 , -20 , -18 , -17 ,

-17 , -14 , -18 , -15 , -17 , -17 , -18 , -16 , -18 ,

-20 , -17 , -14 , -17 , -39 , -17 , -35 , -6 , 51 , -->

 

-14 , 48 , -12 , -24 , 8 , -23 , 13 , 1 , 40 , 12 ,

39 , -36 , -6 , -36 , -1 , 41 , -14 , 40 , -9 , -23 ,

8 , -24 , 11 , 14 , 39 , 19 , 40 , -26 , 34 , -32 ,

37 , -32 , 37 , -29 , 32 , -29 , 32 , -30 , 36 ,

-29 , 32 , -39 , 34 , -35 , -5 , -35 , -1 , 40 ,

-13 , 41 , -12 , -26 , 7 , -27 , 14 , 21 , 39 , 11 ,

38 , -61 , -29 , -56 , -37 , -47 , -35 , -42 , -36 ,

-49 , -39 , -45 , -42 , -61 , -24 , -59 , -35 , 60 ,

-24 , 55 , -20 , 60 , -23 , 61 , -32 , 61 , -29 ,

61 , -24 , 60 , -29 , 59 , -33 , 17 , -53 , 5 , -62 ,

6 , -48 , 17 , -50 , 8 , -48 , 2 , -54 , -28 , -41 ,

-18 , -48 , -14 , -52 , -4 , -62 , -5 , -51 , 9 ,

-51 , -27 , -43 , -28 , -47 , -5 , -62 , 8 , -59 ,

-46 , 14 , -42 , 18 , -45 , 25 , -45 , 15 , -42 ,

18 , -42 , 11 , -43 , 11 , -51 , 0 , 15 , -19 , 18 ,

-16 , 14 , -16 , 18 , -19 , 7 , -18 , 8 , -16 , 8 , -->

 

-17 , 11 , -16 , 39 , -42 , 38 , -37 , 39 , -40 ,

40 , -32 , 41 , -33 , 40 , -39 , 39 , -34 , 39 ,

-36 , 42 , -40 , 43 , -42 , 44 , -42 , 45 , -32 ,

46 , -36 , 45 , -41 , 42 , -38 , 43 , -41 , 48 ,

-11 , 47 , 7 , 41 , -14 , 40 , -9 , 15 , 37 , 15 ,

36 , 17 , 36 , 19 , 36 , -49 , -28 , -48 , -37 ,

-61 , -32 , -62 , -27 , -55 , -35 , -43 , -49 , -46 ,

-34 , -42 , -35 , -14 , -65 , -6 , -71 , 14 , -68 ,

32 , -57 , 18 , -65 , 20 , -63 , 14 , -70 , 23 ,

-65 , 31 , -41 , 32 , -43 , 3 , -42 , 4 , -43 , -22 ,

-43 , -23 , -42 , -9 , -52 , -9 , -52 , 30 , -40 ,

29 , -45 , 14 , -50 , 21 , -48 , -27 , -46 , -25 ,

-46 , -26 , -47 , -27 , -47 , -10 , -10 , -11 , -15 ,

-9 , -11 , -10 , -15 , -10 , -13 , -8 , -13 , -11 ,

-11 , -8 , -12 , 21 , -38 , 29 , -44 , -7 , -48 ,

-3 , -48 , -27 , -45 , -21 , -47 , -12 , -55 , -6 , -->

 

-61 , 48 , 6 , 49 , -11 , 39 , -10 , 41 , -5 , 18 ,

35 , 22 , 35 , 19 , 34 , 23 , 34 , 51 , -3 , 45 ,

8 , 40 , -5 , 38 , -11 , 23 , 35 , 43 , 17 , 45 ,

17 , 27 , 33 , 46 , -40 , 46 , -36 , 43 , -38 , 43 ,

-39 , 46 , -30 , 52 , -33 , 47 , -30 , 52 , -32 ,

57 , -32 , 57 , -27 , 44 , -25 , 49 , -21 , 7 , -13 ,

9 , -8 , 10 , -8 , 8 , -12 , 23 , -9 , 12 , -7 ,

11 , -9 , 24 , -10 , 57 , -25 , 53 , -24 , 52 , -25 ,

56 , -24 , 56 , -32 , 55 , -26 , 56 , -27 , 56 ,

-29 , 52 , -24 , 57 , -26 , -13 , -13 , -26 , -17 ,

-12 , -16 , -10 , -18 , -15 , -14 , -11 , -18 , -21 ,

-14 , -17 , -14 , 18 , -20 , 21 , -17 , 12 , -16 ,

16 , -19 , 8 , -20 , 10 , -19 , 13 , -23 , 19 , -23 ,

-22 , -22 , -13 , -21 , -16 , -22 , -21 , -23 , -21 ,

-21 , -19 , -23 , -20 , -21 , -18 , -21 , 47 , 4 ,

49 , -3 , 41 , -4 , 37 , 2 , 46 , 16 , 41 , 16 , -->

 

41 , 16 , 47 , 9 , 37 , 4 , 41 , -2 , -49 , -9 ,

-48 , -4 , 43 , 11 , 45 , 9 , -2 , 11 , 1 , 11 ,

-47 , -4 , -48 , -9 , -48 , -3 , -49 , -1 , 2 , 11 ,

8 , 8 , 4 , 11 , 9 , 9 , 46 , -32 , 48 , -28 , 49 ,

-38 , 49 , -35 , 50 , -37 , 51 , -25 , 51 , -37 ,

52 , -30 , -56 , -23 , -57 , -29 , -60 , -24 , -60 ,

-33 , -54 , -23 , -46 , -29 , -46 , -40 , -44 , -42 ,

-44 , -34 , -45 , -38 , -44 , -37 , -42 , -37 , -44 ,

-38 , -42 , -38 , -48 , -46 , -42 , -49 , 21 , -16 ,

10 , -18 , 22 , -17 , 19 , -25 , 20 , -24 , 22 ,

-19 , 10 , -23 , 18 , -25 , -41 , 33 , -35 , 34 ,

-41 , 32 , -38 , 32 , -38 , 31 , -42 , 31 , -42 ,

32 , -45 , 30 , -3 , -36 , -12 , -37 , 7 , -35 , 7 ,

-35 , -3 , -37 , -8 , -36 , -8 , -38 , -4 , -38 , 8 ,

-18 , 9 , -16 , -35 , -45 , -29 , -58 , -36 , -46 ,

-35 , -53 , -38 , -48 , -26 , -57 , -35 , -48 , -30 , -->

 

-58 , -34 , -52 , -25 , -59 , -32 , -55 , -25 , -60 ,

-34 , -49 , -14 , -68 , -36 , -51 , -22 , -61 , -49 ,

-3 , -46 , 5 , 10 , 9 , 4 , 15 , 3 , 15 , 6 , 10 ,

6 , 11 , 6 , 14 , 47 , -22 , 52 , -21 , 48 , -21 ,

56 , -20 , 55 , -21 , 48 , -21 , 56 , -20 , 59 ,

-22 , 24 , -64 , 32 , -60 , 30 , -59 , 34 , -57 ,

33 , -59 , 35 , -52 , 35 , -56 , 36 , -49 , 61 ,

-32 , 42 , -51 , 43 , -51 , 51 , -41 , 50 , -41 ,

45 , -46 , 58 , -37 , 54 , -41 , -39 , 30 , -45 ,

23 , -38 , 30 , -46 , 21 , -46 , 24 , -47 , 11 ,

-46 , 12 , -42 , 27 , 7 , -29 , 6 , -31 , 13 , -35 ,

13 , -35 , 4 , -37 , 8 , -35 , 5 , -36 , 8 , -37 ,

-16 , -49 , -8 , -50 , 9 , -53 , 9 , -49 , 20 , -37 ,

29 , -39 , -17 , -39 , -24 , -41 , 21 , -36 , 32 ,

-44 , -2 , -62 , 5 , -61 , 9 , -58 , 16 , -53 , -26 ,

-44 , -22 , -46 , -51 , 1 , -43 , 12 , 7 , 14 , 15 , -->

 

13 , 13 , 11 , 17 , 8 , 20 , 10 , 27 , 4 , -42 ,

11 , -49 , 2 , 8 , 13 , 19 , 12 , 19 , 11 , 10 ,

12 , 22 , 9 , 27 , 5 , -24 , -56 , -22 , -59 , -23 ,

-58 , -4 , -74 , -23 , -56 , -15 , -67 , -21 , -57 ,

-8 , -72 , -7 , -73 , -12 , -69 , -12 , -68 , -4 ,

-71 , -21 , -58 , -13 , -68 , -10 , -71 , 8 , -74 ,

12 , -32 , 14 , -35 , 13 , -32 , 12 , -37 , 14 ,

-34 , 13 , -37 , 11 , -37 , 14 , -36 , -17 , -6 ,

-10 , -8 , -13 , -9 , -10 , -6 , -10 , -7 , -11 ,

-6 , -12 , -6 , -15 , -6 , 17 , -35 , 21 , -39 , 7 ,

-62 , 14 , -56 , 14 , -51 , -17 , -48 , 4 , -43 , 4 ,

-47 , -11 , -12 , -12 , -14 , -12 , -13 , -9 , -15 ,

-20 , -16 , -15 , -16 , -17 , -16 , -15 , -16 , -11 ,

-22 , -12 , -24 , -9 , -22 , -12 , -23 , -9 , -20 ,

-11 , -24 , -8 , -20 , -9 , -23 , -34 , -2 , -33 ,

6 , 25 , 7 , 29 , 7 , 30 , 8 , 30 , 6 , 31 , 8 , -->

 

35 , 9 , -33 , 3 , -33 , -1 , 33 , 8 , 36 , 8 , 36 ,

7 , 36 , 2 , 35 , 4 , 35 , 7 , -32 , 6 , -31 , 11 ,

-30 , 11 , -29 , 4 , 3 , 48 , -3 , 41 , -5 , 41 ,

2 , 48 , -5 , -59 , -6 , -62 , 12 , -52 , 21 , -47 ,

-2 , -54 , -2 , -53 , -4 , -60 , 3 , -62 , -44 ,

-47 , -41 , -49 , -54 , -24 , -56 , -30 , -36 , -43 ,

-37 , -48 , -47 , -37 , -49 , -32 , -40 , -48 , -45 ,

-46 , -38 , -47 , -35 , -44 , -58 , -36 , -51 , -40 ,

-58 , -35 , -48 , -45 , 24 , -42 , 32 , -42 , -3 ,

-61 , -3 , -61 , -54 , -19 , -50 , -18 , -5 , -72 ,

9 , -72 , 10 , -22 , 10 , -22 , 19 , -22 , 19 , -22 ,

13 , -16 , 13 , -16 , 9 , -19 , 10 , -20 , -25 ,

-42 , -21 , -41 , 2 , -53 , 4 , -54 , 29 , -40 , 31 ,

-46 , 26 , -43 , 22 , -48 , 6 , -10 , 18 , -6 , 14 ,

-6 , 21 , -7 , 22 , -8 , 6 , -11 , 1 , -38 , -14 ,

-36 , -13 , -37 , -11 , -32 , -14 , -35 , -12 , -33 , -->

 

55 , -37 , 41 , -51 , 46 , -48 , 61 , -33 , 41 ,

-49 , 37 , -48 , -10 , -21 , -10 , -24 , -28 , -14 ,

-22 , -7 , -3 , 43 , -26 , 35 , -26 , 35 , -5 , 41 ,

-9 , 39 , -20 , 36 , -26 , 34 , -26 , 37 , -6 , -58 ,

1 , -60 , -24 , -43 , -21 , -42 , 3 , -45 , 3 , -46 ,

4 , -52 , 4 , -53 , 72 , 73 , 72 , 63 , 71 , 74 ,

70 , 78 , 71 , 62 , 70 , 58 , 69 , 57 , 65 , 53 ,

70 , 78 , 65 , 83 , 64 , 83 , 58 , 86 , 64 , 53 ,

55 , 48 , 56 , 49 , 43 , 49 , 47 , 48 , 55 , 48 ,

58 , 86 , 46 , 86 , 42 , 84 , 46 , 85 , 44 , 50 ,

39 , 52 , 42 , 50 , 39 , 51 , 41 , 85 , 40 , 85 ,

39 , 86 , 33 , 86 , 38 , 51 , 33 , 48 , 35 , 79 ,

35 , 58 , 34 , 79 , 34 , 58 , 34 , 57 , 32 , 56 ,

34 , 80 , 32 , 79 , 32 , 85 , 30 , 83 , 31 , 83 ,

31 , 80 , 30 , 82 , 30 , 79 , 31 , 55 , 29 , 55 ,

33 , 49 , 23 , 49 , 32 , 48 , 25 , 48 , 24 , 50 , -->

 

22 , 50 , 28 , 55 , 17 , 78 , 18 , 79 , 20 , 79 ,

20 , 80 , 20 , 84 , 21 , 51 , 18 , 48 , 19 , 50 ,

17 , 48 , 16 , 48 , 14 , 48 , 17 , 49 , 14 , 49 ,

19 , 85 , 11 , 86 , 13 , 48 , 12 , 53 , 12 , 48 ,

11 , 53 , 11 , 54 , 15 , 57 , 15 , 58 , 14 , 59 ,

14 , 59 , -1 , 59 , 14 , 58 , -2 , 58 , 10 , 85 ,

7 , 83 , 6 , 84 , 1 , 86 , 0 , 86 , -5 , 85 , -6 ,

84 , -6 , 80 , -7 , 83 , -7 , 79 , -5 , 79 , -3 ,

79 , -2 , 78 , -13 , 56 , -14 , 56 , -3 , 78 , -2 ,

59 , -4 , 57 , -4 , 56 , -1 , 54 , 0 , 55 , 1 , 55 ,

1 , 54 , 1 , 50 , 0 , 50 , -1 , 48 , -2 , 48 , -7 ,

48 , -2 , 49 , -6 , 49 , -6 , 48 , -9 , 51 , -7 ,

48 , -10 , 50 , -11 , 49 , -17 , 49 , -12 , 48 ,

-16 , 48 , -17 , 48 , -21 , 51 , -18 , 48 , -22 ,

50 , -15 , 55 , -16 , 55 , -17 , 56 , -22 , 78 ,

-21 , 79 , -19 , 79 , -19 , 80 , -19 , 84 , -23 , -->

 

49 , -30 , 49 , -24 , 48 , -30 , 48 , -31 , 48 ,

-31 , 55 , -32 , 54 , -32 , 49 , -30 , 55 , -28 ,

55 , -20 , 85 , -25 , 86 , -26 , 85 , -29 , 83 ,

-28 , 55 , -32 , 70 , -28 , 55 , -31 , 71 , -28 ,

83 , -33 , 86 , -34 , 86 , -37 , 86 , -32 , 70 ,

-41 , 49 , -38 , 85 , -40 , 84 , -40 , 83 , -40 ,

81 , -41 , 83 , -41 , 79 , -40 , 80 , -37 , 78 ,

-37 , 78 , -41 , 65 , -42 , 65 , -38 , 78 , -43 ,

64 , -48 , 78 , -47 , 79 , -45 , 79 , -45 , 80 ,

-45 , 84 , -46 , 85 , -51 , 86 , -42 , 49 , -47 ,

49 , -42 , 48 , -48 , 48 , -48 , 48 , -56 , 70 ,

-48 , 49 , -56 , 71 , -56 , 71 , -60 , 56 , -52 ,

85 , -54 , 84 , -55 , 83 , -59 , 85 , -60 , 86 ,

-64 , 86 , -59 , 55 , -58 , 54 , -57 , 54 , -55 ,

55 , -55 , 54 , -55 , 50 , -56 , 50 , -57 , 48 ,

-57 , 49 , -61 , 49 , -58 , 48 , -60 , 48 , -61 , -->

 

48 , -64 , 51 , -62 , 48 , -65 , 50 , -65 , 85 ,

-67 , 84 , -67 , 83 , -67 , 79 , -68 , 83 , -68 ,

79 , -66 , 79 , -64 , 79 , -63 , 78 , -68 , 56 ,

-69 , 55 , -64 , 78 , -66 , 49 , -72 , 49 , -68 ,

48 , -73 , 48 , -69 , 55 , -73 , 55 , -73 , 55 ,

-73 , 48 , -74 , 49 , -74 , 54 , 61 , 71 , 61 , 65 ,

60 , 73 , 60 , 63 , 59 , 73 , 59 , 72 , 60 , 65 ,

58 , 60 , 59 , 61 , 54 , 56 , 59 , 74 , 55 , 78 ,

59 , 75 , 54 , 80 , 54 , 80 , 48 , 80 , 46 , 79 ,

55 , 79 , 54 , 56 , 48 , 56 , 47 , 57 , 46 , 57 ,

47 , 78 , 46 , 78 , 45 , 78 , 45 , 58 , 7 , 76 ,

11 , 66 , 10 , 66 , 6 , 76 , 9 , 66 , 1 , 66 , 0 ,

66 , 6 , 75 , -->

 

BASE->R DECIMAL 120 CONSTANT XC 92 CONSTANT YC HEX

: AEN GRAPHICS2 4F DCOLOR ! F SCREEN

LINES 1050 + LINES DO ( 4176 decimal)

I @ XC +

YC I 2+ @ -

I 4 + @ XC +

YC I 6 + @ -

LINE

8 +LOOP

KEY DROP TEXT ;

R->BASE

 

 

 

 

The above version does not have the doubling of the lines horizontally. The following video shows what happens after you run AEN :

 

AEN_fbForth.wmv

 

The following code replaces the last block in the spoiler above and will plot the screen with the horizontal doubling routine. It takes twice as long to plot:

 

BASE->R DECIMAL 120 CONSTANT XC 92 CONSTANT YC HEX

0 VARIABLE X 0 VARIABLE Y 0 VARIABLE X1 0 VARIABLE Y1

: AEN GRAPHICS2 4F DCOLOR ! F SCREEN

LINES 1050 + LINES DO ( 4176 decimal)

I @ XC + DUP X !

YC I 2+ @ - DUP 1+ Y !

I 4 + @ XC + DUP X1 !

YC I 6 + @ - DUP 1+ Y1 !

LINE

X @ Y @ X1 @ Y1 @ LINE

8 +LOOP

KEY DROP TEXT ;

R->BASE

 

The two plots are shown below. The second image has the horizontal doubling:

 

post-29677-0-85023000-1375761472_thumb.gif post-29677-0-51199600-1375761473_thumb.gif

 

I did not include "What, me worry?" because it is not part of the image. The programs in other posts simply displayed text. In bitmap graphics, I would need to do a bit |:) more work—too lazy!

 

...lee

 

 

Very nice!

Share this post


Link to post
Share on other sites
I timed the Atari version a little more closely with the emulator running at normal speed and it actually took about 36 seconds. Still not bad just using standard basic, there are several ways it could certainly be sped up, but that's the speed as coded in the magazine. If I wasn't so Lazy I'd download a Commodore emulator and see if it really takes up to 20 minutes to render the image.

 

hehe. Timing the TI BASIC version gave a runtime of 1h 14m 24s (at scale 1.0). And you can see how fast the other languages pull it off above. :)

 

Share this post


Link to post
Share on other sites

hehe. Timing the TI BASIC version gave a runtime of 1h 14m 24s (at scale 1.0). And you can see how fast the other languages pull it off above. :)

 

Running you TI Basic program in RXB was a little faster then that.

Share this post


Link to post
Share on other sites

Here it is done in fbForth—

 

You will need to load the blocks for Text mode, Graphics2 (Bitmap) mode and the graphics primitives library. You can get the proper blocks by typing MENU . They are currently blocks 30, 33 and 36:

 

30 LOAD 33 LOAD 36 LOAD

 

Once those blocks are loaded, the following code needs to be loaded. It is adapted from the Basic program Harry posted somewhere above. It takes quite awhile to load in its present state because all 15 screens need to be interpreted. It, along with all the graphics stuff loaded ahead of it, can be BSAVEd to be subsequently BLOADed in seconds. Maybe I'll post it if I get ambitious:

 

In Classic99, it takes 45 seconds to load the requisite graphics blocks and 3:17 minutes :-o to load the 15 blocks of fbForth source code! Everything (including the system graphics blocks) BSAVEs to 8 blocks and takes exactly 1 second :-o :-o to BLOAD !!

 

I should probably re-code the fbForth graphics primitives in ALC, especially DOT and LINE . They take up 106 bytes and 248 bytes, respectively, of high-level dictionary space and, coded in ALC, would likely significantly reduce the time required to draw the screen because ALC would not repeatedly call Forth's inner (address) interpreter as the current, high-level code does. Of course, I must first decipher what the hell those routines are doing. :ponder:

 

...lee

Share this post


Link to post
Share on other sites

Thanks, but the CALL MOVES routine can move any size memory of any kind to any kind of memory. i.e. RAM/ROM, VDP or GROM/GRAM

Thus I can move 8K of VDP to the LOWER 8K and save it with CALL BSAVE and when I reload it, just turn on Bit Mapped mode than move it from lower 8K RAM to VDP.

I showed this in the origianal USER DEMO of RXB.

 

In order to load anything it requires you load a program. What takes longer 1 RXB program line or load XB then the load Assembly then the load the image.

Assembly is fast but you have to freaking load it first. Besides my program to load the same image takes 24 bytes unlike Assembly.

TML is great stuff but If you have to load something to load something else that just slows stuff down right?

 

The question of what takes longer all depends on where you are starting from. If you are using the TI then just pop in the XB cartridge, press 2 then RUN "DSK1.TML" then load the picture as described above.

 

If I wanted to use RXB then I'd just pop in the cartridge and....oops, forgot that they're not available for the real TI. So I'd have to use an emulator on my ancient desktop. I'd have to turn it on and wait about a minute while a VERY large program loads (Windows or Linux). Once that is loaded I have to load another program - Classic99 or Win994a or MESS. Now I have to use a drop down menu to find and select the the RXB cartridge. After all that I can finally load the picture as you described.

 

Put that way which is faster? Of course you could argue that it would be reasonable to expect that the computer would already be on with classic99 running and ready to go, and I could respond that it would also be reasonable to expect that if you're using TML then it too would already be loaded and ready for use.

 

Anyway, how in tarnation did this thread devolve from the original question which was about how to plot graphics into a discussion about the best way to save the image from the screen?

Share this post


Link to post
Share on other sites

As the original poster of this thread, I'm partly to blame for the direction its taken. When I watched one of the demos of the picture being displayed, you didn't get to see it being drawn at all. There was just a long wait and then the image basically appeared. At least for me, part of the charm of the original program was watching it being drawn to the screen. I mean the image itself could just be saved as a picture and displayed, but what's the fun in that. Although if a computer's plot and line commands are so slow that you have to watch for 20 minutes to 2 hours, maybe I would opt for the instant picture. The Atari's 30ish seconds actually turned out to be just about right for my attention span.

 

Bob

Edited by bfollett
  • Like 2

Share this post


Link to post
Share on other sites

The question of what takes longer all depends on where you are starting from. If you are using the TI then just pop in the XB cartridge, press 2 then RUN "DSK1.TML" then load the picture as described above.

 

If I wanted to use RXB then I'd just pop in the cartridge and....oops, forgot that they're not available for the real TI. So I'd have to use an emulator on my ancient desktop. I'd have to turn it on and wait about a minute while a VERY large program loads (Windows or Linux). Once that is loaded I have to load another program - Classic99 or Win994a or MESS. Now I have to use a drop down menu to find and select the the RXB cartridge. After all that I can finally load the picture as you described.

 

Put that way which is faster? Of course you could argue that it would be reasonable to expect that the computer would already be on with classic99 running and ready to go, and I could respond that it would also be reasonable to expect that if you're using TML then it too would already be loaded and ready for use.

 

Anyway, how in tarnation did this thread devolve from the original question which was about how to plot graphics into a discussion about the best way to save the image from the screen?

 

So say I wanted to make a copy of TML screen and save it with RXB?

Is there a trick that I can do to pull this off?

 

If TML uses the same format at TI ARTIST then I could write a XB program to load massive bitmapped images into the SAMS and flip through them quickly.

Much like my IN THE DARK game is the biggest game ever written for the TI was.

 

It would be cool to put out a disk with 960K of bittmapped graphics images and flip threw them in a few seconds on a TI99/4A!!!!

Edited by RXB

Share this post


Link to post
Share on other sites

So say I wanted to make a copy of TML screen and save it with RXB?

Is there a trick that I can do to pull this off?

 

If TML uses the same format at TI ARTIST then I could write a XB program to load massive bitmapped images into the SAMS and flip through them quickly.

Much like my IN THE DARK game is the biggest game ever written for the TI was.

 

It would be cool to put out a disk with 960K of bittmapped graphics images and flip threw them in a few seconds on a TI99/4A!!!!

There are some subtleties you need to know about TML in order to do what you want to do. TML sets the color table to be at >0000 and the Pattern table to >2000. Internally the bytes of data are shuffled in a non conventional way. The reason for this is to hide the 128 bytes of system data starting at >0370 which falls in the middle of the color table. I use a single blank character definition for all the edge characters. This is the reason a picture has to be 240 pixels wide. The upshot of all this is that, to save to disk in TIArtist format, the screen is blanked, the character definitions are moved to where they would be in TIArtist, the file is saved, the character definitions are moved back to where they should be in TML and the screen is unblanked.

 

You have a couple choices. If you have TML running under RXB you can copy >1800 bytes of memory at >0000 and at >2000, provided you can do that without disrupting TML. Then, with TML running, when you restore those two blocks of memory the picture will be loaded.

 

The other way would be to save to disk in TIArtist format. Then a different program (dont know what?) could display the pics and RXB could copy the data in the >1800 byte long pattern and color tables.

Share this post


Link to post
Share on other sites

There are some subtleties you need to know about TML in order to do what you want to do. TML sets the color table to be at >0000 and the Pattern table to >2000. Internally the bytes of data are shuffled in a non conventional way. The reason for this is to hide the 128 bytes of system data starting at >0370 which falls in the middle of the color table. I use a single blank character definition for all the edge characters. This is the reason a picture has to be 240 pixels wide. The upshot of all this is that, to save to disk in TIArtist format, the screen is blanked, the character definitions are moved to where they would be in TIArtist, the file is saved, the character definitions are moved back to where they should be in TML and the screen is unblanked.

 

You have a couple choices. If you have TML running under RXB you can copy >1800 bytes of memory at >0000 and at >2000, provided you can do that without disrupting TML. Then, with TML running, when you restore those two blocks of memory the picture will be loaded.

 

The other way would be to save to disk in TIArtist format. Then a different program (dont know what?) could display the pics and RXB could copy the data in the >1800 byte long pattern and color tables.

 

RXB has a routine to load GRAPHICS mode command: CALL POKER(VDPREG,VALUE) ! VDPREG=VDP Register and VALUE is variable with a value of 0 to 255 so:

 

100 CALL POKER(0,2,1,2) ! puts the TI while in XB into Bit Mapped Mode.

 

Thus I only need to know where all the memory is at. If I run a XB program with no variables but only numbers it never needs do a garbage collection of VDP.

Maybe that is why I have a problem with attempting to do the same thing as I do not know what mode or where everything is in TML.

 

I only have to duplicate the VDP memory map to load the image as no variables are needed to move from lower 8K RAM to VDP.

 

So what does the VDP memory map look like for TI ARTIST or TML?

Share this post


Link to post
Share on other sites

There are very few 8x8 aligned blocks of whitespace in the image - you can see it by breakpointing when it's done and seeing where the characters were placed. See here:

 

post-12959-0-07707600-1375740597_thumb.jpg

 

There is indeed a deceptively small amount of "real" whitespace in the drawing. It was just guessing on my part anyway, I always had this gut feeling that with just two colors you'd run into duplicates rather quickly even when not designing for them such as with this line drawing. Turns out I was wrong, and quite obviously so: since every character definition is 32 bits it allows for over 4 billion different patterns (which still feels[/] incredibly high to me). So it's not statistically likely to randomly get duplicates in a drawing with less than 300 chars in total :).

  • Like 1

Share this post


Link to post
Share on other sites

RXB has a routine to load GRAPHICS mode command: CALL POKER(VDPREG,VALUE) ! VDPREG=VDP Register and VALUE is variable with a value of 0 to 255 so:

 

100 CALL POKER(0,2,1,2) ! puts the TI while in XB into Bit Mapped Mode.

 

Thus I only need to know where all the memory is at. If I run a XB program with no variables but only numbers it never needs do a garbage collection of VDP.

Maybe that is why I have a problem with attempting to do the same thing as I do not know what mode or where everything is in TML.

 

I only have to duplicate the VDP memory map to load the image as no variables are needed to move from lower 8K RAM to VDP.

 

So what does the VDP memory map look like for TI ARTIST or TML?

Let's back up and start at the beginning. What do you propose to do with this and how does TML fit in with your plans. Are you displaying bit mapped images in the immediate mode or from a running XB or RXB program? Where will the images come from - will they be generated by TML and then saved for rapid access or will they come from some other source? Do you need disk access to load the images? Specifically do you need the disk buffer areas? Does RXB need to be running while the image is displayed?

 

Have you ever used RXB to display a bitmapped image from either immediate mode or within a running program? There is a lot more to getting XB to work with bitmapped graphics than setting a couple of VDP registers and knowing where in VDP the image is stored.

Share this post


Link to post
Share on other sites

Thanks for response.

I would like to load TML and load pics but save them with BSAVE, then without having to load TML display the Pics. 960K of pic displayed for a XB program in RXB.

But as TML will NOT let me use the SAMS and move the pics into the SAMS. Well because the instant I switch Lower 8K it crashes the system.

RXB can from a XB program go to BIT mapped mode and do some things TML can do. Not impossible for me to do.

 

"RXB IS XB on Steroids!" That is a quote from Micropendium.

 

Also I can force RXB to run from RAM and not from VDP. Now variables are a problem but they are used from top of VDP downward so not many issues with doing this. (if very few varibles are used)

 

Yes I know that all Graphics commands will not work. But POKEV, PEEKV, LOAD, and PEEK will function along with CALL MOVES, CALL POKER and RXB AMS commands from Bit Mapped mode.

 

I would have to say I have not used TML very much as it was so incompatible with RXB the times I have tried it, so would like to know more and take advantage of it.

I suspect you have the same problem with RXB and are not familiar with it.

 

I do not intend on making a game in RXB in Bit Mapped Graphics but it is possible with the commands and resources that RXB can access like the SAMS to do more then any other XB out there.

 

So yes it should be possible from RXB to load and manipulate Bit mapped Graphics as the XB program runs from RAM not VDP and a limited number of variables would not present a problem.

Example:

CALL XBPGM("DSK4.XBBMDEMO",1) ! This line is like RUN "DSK4.XBBMDEMO" but does a CALL FILES(1) and NEW then it loads and runs the XB program XBBMDEMO

from normal XB you would have to do:

CALL FiLES(1)

NEW

RUN "DSK4.XBBMDEMO"

Edited by RXB

Share this post


Link to post
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.

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...