--- title: "In Sync: Exploring 2068 Video Modes" type: "article" slug: "in-sync-exploring-2068-video-modes" url: "http://localhost/article/in-sync-exploring-2068-video-modes/" markdown_url: "http://localhost/article/in-sync-exploring-2068-video-modes.md" published_at: "2020-10-27T21:09:05+00:00" modified_at: "2026-06-21T23:26:46+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "One of the reasons I bought a 2068 was to use the advanced video modes described in appendix C of the BASIC manual. I was disappointed when I found it impossible to access these modes using only BASIC. After learning machine code, I was able to use the Dual Screen Mode in my BASIC programs.…" category: - name: "T-S Horizons" slug: "t-s-horizons" taxonomy: "category" url: "http://localhost/category/periodicals/t-s-horizons/" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Machine language programming" slug: "machine-language" taxonomy: "post_tag" url: "http://localhost/tag/machine-language/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "John Bell" slug: "bell-john" taxonomy: "indiv" url: "http://localhost/indiv/bell-john/" publication: "T-S Horizons" publication_r: id: 10247 title: "T-S Horizons" type: "periodical" url: "http://localhost/periodical/t-s-horizons/" authors: "John Bell" issue: "19" issues_articles: - id: 26862 title: "T-S Horizons n19" type: "issue" url: "http://localhost/issue/t-s-horizons-n19/" pages: "8" pubdate: "May/June 1986" archive_link: false volumeissue: "vn19" article_media: - id: 56323 title: "Triangle To Square" type: "computer_media" url: "http://localhost/computer_media/triangle2square/" --- # In Sync: Exploring 2068 Video Modes One of the reasons I bought a 2068 was to use the advanced video modes described in appendix C of the BASIC manual. I was disappointed when I found it impossible to access these modes using only BASIC. After learning machine code, I was able to use the Dual Screen Mode in my BASIC programs. The following listing uses the 2 screens to do simple straight line animation to demonstrate this mode. You will have to do a little programming to change the pictures but that should present no problem for most readers. Once you type in the program, save it before you run it. The program uses a short machine code routine and if you make a typing error, the program might crash. There is an error checking routine in the program, but it will not detect transposed digits. When you run this program don’t use the BREAK key; if you do, it will cause the computer to “hang.” Most of the time the computer is displaying the 2nd screen and if there is an error message it will be printed on the first screen and you will not see it. If you can’t resist hitting the BREAK key, be prepare to enter OUT 255,0 “blind” in order to switch to screen 1. ## Changing the Program The only programming change you will have to make is in the three DATA statements. The first number is how many “frames” the program will draw. The second digit is the number of DRAW statements it takes to make the picture. The second DATA statement contains the PLOT and DRAW coordinates to create the first frame. The third DATA statement contains the information to draw the last frame. The computer works out all the intermediate frames. Please note that you must start your drawing with a PLOT and only use DRAW statements thereafter. You also must have the same number of lines in the first and last drawings. ## Source Code: Triangle To Square ``` 1 REM triangle to square 2 REM By John Bell-May/June 1986 T-S Horizons 100 DATA 20,4 105 REM DATA statements contain the coordinates of the PLOT and DRAW statements 110 DATA 70,40,100,0,0,100,-100,0,0,-100 120 DATA 70,40,100,0,-50,87,-25,-44,-25,-43 130 REM set up M/C 140 GO SUB 520 150 REM DUAL SCREEN MODE 160 RANDOMIZE USR 60000: OUT 255,1 170 RESTORE 100 180 REM Initalizes variables 190 READ frames 200 READ points 205 LET points=points+1 210 DIM a(points,2) 220 DIM b(points,2) 230 FOR a=1 TO points 240 READ a(a,1): READ b(a,2) 250 NEXT a 260 FOR a=1 TO points 270 READ b(a,1): READ b(a,2) 280 NEXT a 290 REM Makes the "B" array contain the offset of offset of each PLOT-DRAW point 300 FOR a=1 TO points 310 LET b=(b(a,1)-a(a,1)) 320 LET b(a,1)=b/(frames-1) 330 LET b=(b(a,2)-a(a,2)) 340 LET b(a,2)=b/(frames-1) 350 NEXT a 360 REM Draws each frame of the picture 370 FOR a=1 TO frames 380 CLS 390 PLOT a(1,1),a(1,2) 400 FOR c=2 TO points 410 DRAW a(c,1),a(c,2) 420 NEXT c 430 OUT 255,0: RANDOMIZE USR 60041: OUT 255,1 440 REM Changes coordinates for next frame 450 FOR b=1 TO points 460 LET a(b,1)=a(b,1)+b(b,1) 470 LET a(b,2)=a(b,2)+b(b,2) 480 NEXT b 490 NEXT a 500 OUT 255,0 510 STOP 520 REM POKEs M/C 530 RESTORE 600 540 LET c=0 550 FOR a=60000 TO 60052 560 READ b: POKE a,b 570 LET c=c+b 580 NEXT a 590 IF c<>7805 THEN STOP 600 RETURN 610 DATA 62,128,243,245,219,255,203,255,211,255,219,244,50,72,238,62,1,211,244,241,205,142,14,62,128,50,194,92,58,72,238,211,244,219,255,203,191,211,255,251,0,33,0,64,17,0,96,1,0,27,237,176,201 9998 STOP 9999 SAVE "ANIM" LINE 1 ```