Page 1 of 1

[D_File] Relocated screen page in Basic.

Posted: Mon Mar 02, 2020 8:34 pm
by XavSnap
Hi,

I tried to code a tuto to show a "simple" code to display several text pages…
But, at the 9th page, the screen is BLACK on EO !
:mrgreen:

What's wrong doctor ?

(Text instructions from Super Star Trek (Kamurta))
Things in advance for help...

Basic code: (32k patch removed > use a 16k RAM pack)

Code: Select all

     0  REM [HEX:\
21,00,C0,22,04,40,2B,36,\
3E,2B,F9,11,76,06,D5,2B,\
2B,22,02,40,CF,FF ]


# REM      FROM THE BOOK              
#     *BASIC COMPUTER GAMES*         
     0  REM [HEX:\
00,00,00,00,00,2B,37,34,\
32,00,39,2D,2A,00,27,34,\
34,30,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,\
97,A7,A6,B8,AE,A8,80,A8,\
B4,B2,B5,BA,B9,AA,B7,80,\
AC,A6,B2,AA,B8,97,00,00,\
00,00,00,00,00,00,00,00,\
00,00,00,00,27,3E,00,29,\
26,3B,2E,29,00,2D,00,26,\
2D,31,00,00,00,00,00,00,\
00,00,00,3F,3D,24,1D,00,\
3B,2A,37,38,2E,34,33,0E,\
00,30,2A,31,31,3E,00,26,\
1B,00,32,3A,37,39,26 ]


# REM 
     0  REM [HEX:\
76,83,83,83,83,83,83,83,\
83,83,83,83,83,83,83,83,\
83,83,83,83,83,83,83,83,\
83,83,83,83,83,83,83,83,\
83,76,80,80,80,85,02,05,\
07,83,81,04,81,87,06,05,\
80,85,86,83,82,87,05,07,\
83,84,02,05,07,83,81,80,\
80,80,76,80,80,80,85,85,\
04,80,83,84,05,80,87,85,\
05,80,85,85,80,80,85,05,\
05,80,85,85,04,80,83,84,\
80,80,80,76,80,80,80,81,\
81,82,82,83,80,82,80,81,\
82,80,83,80,82,83,80,81,\
82,80,83,80,81,82,82,83,\
80,80,80,80,76,76,76,76,\
76,35,37,2A,38,38,00,39,\
2D,2A,00,33,2A,3C,31,2E,\
33,2A,00,39,34,00,39,3A,\
37,33,00,39,2D,2A,\
76,35,26,2C,2A,38,1B,\
00,39,34,00,2C,34,00,39,\
34,00,26,00,38,35,2A,28,\
2E,2B,2E,28,00,35,26,2C,\
2A,1A,76,35,37,2A,38,38,\
00,39,2D,2A,00,35,26,2C,\
2A,00,33,3A,32,27,2A,37,\
00,37,2A,36,3A,2E,37,2A,\
29,1B,76,76,39,2D,2A,\
37,2A,00,26,37,2A,00,25,\
00,35,26,2C,2A,38,00,39,\
34,00,39,2D,2A,38,2A,76,2E,33,\
38,39,37,3A,28,39,2E,34,\
33,38,1B,76,76,\
26,39,00,26,33,3E,00,39,\
2E,32,2A,1A,00,35,37,2A,\
38,38,00,0B,2F,0B,00,39,\
34,00,31,34,26,29,\
76,39,2D,2A,00,2C,26,32,\
2A,1B,76,76,76,76,76,76,76,\
97,97,97,97,97,97,97,80,\
B8,BA,B5,AA,B7,80,B8,B9,\
A6,B7,80,B9,B7,AA,B0,80,\
97,97,97,97,97,97,97,97,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,76,1D,1B,3C,2D,\
2A,33,00,3E,34,3A,00,38,\
2A,2A,00,A8,B4,B2,B2,A6,\
B3,A9,92,00,35,37,2E,33,\
39,2A,29,1A,76,00,00,2A,\
33,39,2A,37,00,34,33,2A,\
00,34,2B,00,39,2D,2A,00,\
31,2A,2C,26,31,76,00,00,\
28,34,32,32,26,33,29,38,\
00,10,33,26,3B,1A,38,37,\
38,1A,31,37,38,1A,35,2D,\
26,1A,39,34,37,1A,76,00,\
00,38,2D,2A,1A,29,26,32,\
1A,28,34,32,1A,00,34,37,\
00,3D,3D,3D,11,1B,76,\
76,1E,1B,2E,2B,00,3E,34,\
3A,00,38,2D,34,3A,31,29,\
00,39,3E,35,2A,00,2E,33,\
00,26,33,00,2E,31,31,2A,\
16,76,00,00,2C,26,31,00,\
28,34,32,32,26,33,29,1A,\
00,3E,34,3A,0B,31,31,00,\
2C,2A,39,00,26,76,00,00,38,2D,34,\
37,39,00,31,2E,38,39,00,\
34,2B,00,39,2D,2A,00,31,\
2A,2C,26,31,76,00,00,28,34,\
32,32,26,33,29,38,00,35,\
37,2E,33,39,2A,29,00,34,\
3A,39,1B,76,76,1F,1B,\
38,34,32,2A,00,28,34,32,\
32,26,33,29,38,00,37,2A,\
36,3A,2E,37,2A,00,3E,34,\
3A,00,39,34,76,00,\
00,2A,33,39,2A,37,00,29,\
26,39,26,00,10,2B,34,37,\
00,2A,3D,26,32,35,31,2A,\
1A,00,39,2D,2A,76,\
00,00,0B,33,26,3B,0B,00,\
28,34,32,32,26,33,29,00,\
28,34,32,2A,38,00,27,26,\
28,30,00,3C,2E,39,2D,\
76,00,00,0B,28,34,3A,37,\
38,2A,00,10,1D,16,25,11,\
0F,0B,1B,11,00,00,2E,2B,\
00,3E,34,3A,76,00,00,39,3E,35,2A,\
00,2E,33,00,2E,31,31,2A,\
2C,26,31,00,29,26,39,26,\
00,10,31,2E,30,2A,76,00,00,33,2A,2C,\
26,39,2E,3B,2A,00,33,3A,\
32,27,2A,37,38,11,1A,00,\
39,2D,26,33,76,00,00,28,34,\
32,32,26,33,29,00,3C,2E,\
31,31,00,27,2A,00,26,27,\
34,37,39,2A,29,1B,76,76,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,9D,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,00,00,39,2D,2A,\
00,2C,26,31,26,3D,3E,00,\
2E,38,00,29,2E,3B,2E,29,\
2A,29,00,2E,33,39,34,00,\
26,33,76,24,00,3D,00,\
24,00,36,3A,26,29,37,26,\
33,39,00,2C,37,2E,29,1A,\
00,26,33,29,00,2A,26,28,\
2D,76,36,3A,26,\
29,37,26,33,39,00,2E,38,\
00,2B,3A,37,39,2D,2A,37,\
00,29,2E,3B,2E,29,2A,29,\
00,2E,33,39,34,76,26,33,\
00,24,00,3D,00,24,00,38,\
2A,28,39,34,37,00,2C,37,\
2E,29,1B,76,76,\
00,00,3E,34,3A,00,3C,2E,\
31,31,00,27,2A,00,26,38,\
38,2E,2C,33,2A,29,00,26,\
00,38,39,26,37,39,16,00,\
76,2E,33,2C,00,35,34,2E,\
33,39,00,38,34,32,2A,3C,\
2D,2A,37,2A,00,2E,33,00,\
39,2D,2A,00,2C,26,31,16,\
76,26,3D,3E,00,39,34,\
00,27,2A,2C,2E,33,00,26,\
00,39,34,3A,37,00,34,2B,\
00,29,3A,39,3E,00,26,38,\
76,28,34,32,26,33,\
29,2A,37,00,34,2B,00,39,\
2D,2A,00,38,39,26,37,38,\
2D,2E,35,76,2A,33,39,2A,\
37,35,37,2E,38,2A,1B,00,\
3E,34,3A,37,00,32,2E,38,\
38,2E,34,33,0E,00,39,34,\
76,38,2A,2A,\
30,00,26,33,29,00,29,2A,\
38,39,37,34,3E,00,39,2D,\
2A,00,2B,31,2A,2A,39,00,\
34,2B,76,30,31,\
2E,33,2C,34,33,00,3C,26,\
37,3C,2D,2E,35,38,00,3C,\
2D,2E,28,2D,00,26,37,2A,\
76,32,\
2A,33,26,28,2E,33,2C,00,\
39,2D,2A,00,3A,33,2E,39,\
2A,29,00,2B,2A,29,2A,37,\
26,39,2E,34,33,76,\
34,2B,00,00,35,31,26,33,\
2A,39,38,1B,\
76,76,00,00,3E,34,3A,00,\
2D,26,3B,2A,00,39,2D,2A,\
00,2B,34,31,31,34,3C,2E,\
33,2C,00,28,34,32,16,\
76,32,26,33,29,38,\
00,26,3B,26,2E,31,26,27,\
31,2A,00,39,34,00,3E,34,\
3A,00,26,38,76,28,26,35,39,\
26,2E,33,00,34,2B,00,39,\
2D,2A,00,38,39,26,37,38,\
2D,2E,35,76,2A,33,39,\
2A,37,35,37,2E,38,2A,0E,\
76,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,9E,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,B3,A6,BB,00,14,\
00,3C,26,37,35,00,2A,33,\
2C,2E,33,2A,00,28,34,33,\
39,37,34,31,76,76,00,00,00,\
28,34,3A,37,38,2A,00,2E,\
38,00,2E,33,00,26,00,28,\
2E,37,28,3A,31,26,37,00,\
A0,80,9F,80,9E,76,00,00,\
00,33,3A,32,2A,37,2E,28,\
26,31,00,00,3B,2A,28,39,\
34,37,00,00,26,37,16,00,\
00,80,9B,8E,9B,80,76,00,\
00,00,37,26,33,2C,2A,32,\
2A,33,39,00,26,38,00,38,\
2D,34,3C,33,1B,00,00,00,\
00,00,A1,96,97,96,9D,76,\
00,00,00,2E,33,39,2A,2C,\
2A,37,00,26,33,29,00,37,\
2A,26,31,00,3B,26,31,3A,\
2A,38,00,80,9B,8E,9B,80,\
76,00,00,00,32,26,3E,00,\
27,2A,00,3A,38,2A,29,1B,\
00,00,10,39,2D,3A,38,00,\
00,00,00,00,A2,80,A3,80,\
A4,76,00,00,00,28,34,3A,\
37,38,2A,00,1D,1B,21,00,\
2E,38,00,2D,26,31,2B,16,\
3C,26,3E,76,00,00,00,27,2A,\
39,3C,2A,2A,33,00,1D,00,\
26,33,29,00,1E,1B,11,76,76,00,00,00,\
3B,26,31,3A,2A,38,00,32,\
26,3E,00,26,35,35,37,34,\
26,28,2D,00,25,1B,1C,1A,\
76,00,00,\
00,3C,2D,2E,28,2D,00,2E,\
39,38,2A,31,2B,00,2E,38,\
00,2A,36,3A,2E,3B,26,31,\
2A,33,39,76,00,\
00,00,39,34,00,1D,1B,1C,\
76,\
76,00,00,00,34,33,2A,00,\
3C,26,37,35,00,2B,26,28,\
39,34,37,00,2E,38,00,39,\
2D,2A,00,38,2E,3F,2A,\
76,00,00,00,34,2B,00,\
34,33,2A,00,36,3A,26,29,\
37,26,33,39,1B,00,00,39,\
2D,2A,37,2A,2B,34,37,2A,\
1A,76,00,00,00,39,34,\
00,2C,2A,39,00,2B,37,34,\
32,00,36,3A,26,29,37,26,\
33,39,00,22,1A,21,00,39,\
34,76,00,00,00,21,\
1A,21,1A,00,3E,34,3A,00,\
3C,34,3A,31,29,00,3A,38,\
2A,00,28,34,3A,37,38,2A,\
00,1F,1A,76,00,00,00,\
3C,26,37,35,00,2B,26,28,\
39,34,37,00,1D,1B,76,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,9F,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,B8,B7,B8,00,14,\
00,38,2D,34,37,39,00,37,\
26,33,2C,2A,00,38,2A,33,\
38,34,37,00,38,28,26,33,\
76,76,00,00,00,\
38,2D,34,3C,38,00,3E,34,\
3A,00,26,00,38,28,26,33,\
00,34,2B,00,3E,34,3A,37,\
76,00,00,\
00,35,37,2A,38,2A,33,39,\
00,36,3A,26,29,37,26,33,\
39,1B,76,76,\
00,00,00,38,3E,32,27,34,\
31,34,2C,3E,00,34,33,00,\
3E,34,3A,37,00,38,2A,33,\
38,34,37,\
76,00,00,00,38,28,37,2A,\
2A,33,00,2E,38,00,26,38,\
00,2B,34,31,31,34,3C,38,\
0E,76,76,00,00,00,00,00,\
00,AA,00,14,00,2A,33,39,\
2A,37,35,37,2E,38,2A,00,\
35,34,38,2E,39,2E,34,33,\
76,00,00,00,00,\
00,00,B0,00,14,00,30,31,\
2E,33,2C,34,33,00,27,26,\
39,39,31,2A,00,28,37,3A,\
2E,38,2A,37,76,00,00,00,\
00,00,00,A7,00,14,00,2B,\
2A,29,2A,37,26,39,2E,34,\
33,00,38,39,26,37,27,26,\
38,2A,76,00,00,\
00,00,00,00,00,00,00,00,\
10,37,2A,2B,3A,2A,31,18,\
37,2A,35,26,2E,37,18,37,\
2A,16,26,37,32,76,00,\
00,00,00,00,00,00,00,00,\
00,00,2D,2A,37,2A,00,11,\
76,\
00,00,00,00,00,00,17,00,\
14,00,38,39,26,37,\
76,76,00,00,00,26,00,28,\
34,33,29,2A,33,38,2A,29,\
00,0B,38,39,26,39,3A,38,\
00,37,2A,35,34,37,39,0B,\
76,00,00,00,3C,2E,\
31,31,00,26,31,38,34,00,\
27,2A,00,35,37,2A,38,2A,\
33,39,2A,29,1B,76,76,76,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A0,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,B1,B7,B8,00,14,\
00,31,34,33,2C,00,37,26,\
33,2C,2A,00,38,2A,33,38,\
34,37,00,38,28,26,33,\
76,76,00,00,00,\
38,2D,34,3C,38,00,28,34,\
33,29,2E,39,2E,34,33,38,\
00,2E,33,00,38,35,26,28,\
2A,00,2B,34,37,76,00,00,\
00,34,33,2A,00,36,3A,26,\
29,37,26,33,39,00,34,33,\
00,2A,26,28,2D,00,38,2E,\
29,2A,00,34,2B,76,00,\
00,00,39,2D,2A,00,2A,33,\
39,2A,37,35,37,2E,38,2A,\
00,10,3C,2D,2E,28,2D,00,\
2E,38,00,2E,33,76,\
00,00,00,39,2D,2A,00,32,\
2E,29,29,31,2A,00,34,2B,\
00,39,2D,2A,00,38,28,26,\
33,11,1B,\
76,76,00,00,00,39,2D,2A,\
00,38,28,26,33,00,2E,38,\
00,28,34,29,2A,29,00,2E,\
33,00,39,2D,2A,00,2B,34,\
37,32,76,00,00,00,0B,2D,\
39,3A,0B,1A,00,3C,2D,2A,\
37,2A,00,39,2D,2A,00,3A,\
33,2E,39,38,00,29,2E,2C,\
2E,39,76,00,00,00,2E,\
38,00,39,2D,2A,00,33,3A,\
32,27,2A,37,00,34,2B,00,\
38,39,26,37,38,1A,00,00,\
39,2D,2A,76,00,00,00,\
39,2A,33,38,00,29,2E,2C,\
2E,39,00,2E,38,00,39,2D,\
2A,00,33,3A,32,27,2A,37,\
00,00,34,2B,76,00,00,\
00,38,39,26,37,27,26,38,\
2A,38,1A,00,26,33,29,00,\
39,2D,2A,00,2D,3A,33,29,\
37,2A,29,38,76,00,\
00,00,29,2E,2C,2E,39,00,\
2E,38,00,39,2D,2A,00,33,\
3A,32,27,2A,37,00,34,2B,\
76,\
00,00,00,30,31,2E,33,2C,\
34,33,38,1B,\
76,76,00,00,00,2A,3D,26,\
32,35,31,2A,0E,00,1E,1C,\
23,00,14,00,1E,00,30,31,\
2E,33,2C,34,33,38,1A,\
76,00,00,00,33,34,\
00,38,39,26,37,27,26,38,\
2A,38,1A,00,23,00,38,39,\
26,37,38,1B,76,76,76,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A1,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,B5,AD,A6,00,14,\
00,35,2D,26,38,2A,37,00,\
28,34,33,39,37,34,31,76,00,00,00,26,\
31,31,34,3C,38,00,3E,34,\
3A,00,39,34,00,29,2A,38,\
39,37,34,3E,00,39,2D,2A,\
76,00,00,00,\
30,31,2E,33,2C,34,33,00,\
27,26,39,39,31,2A,00,28,\
37,3A,2E,38,2A,37,38,00,\
27,3E,76,00,00,\
00,3F,26,35,35,2E,33,2C,\
00,39,2D,2A,32,00,3C,2E,\
39,2D,00,38,3A,2E,39,26,\
27,31,3E,76,00,\
00,00,31,26,37,2C,2A,00,\
3A,33,2E,39,38,00,34,2B,\
00,2A,33,2A,37,2C,3E,00,\
39,34,76,\
00,00,00,29,2A,35,31,2A,\
39,2A,00,39,2D,2A,2E,37,\
00,38,2D,2E,2A,31,29,00,\
35,34,3C,2A,37,1B,\
76,00,00,00,10,37,2A,32,\
2A,27,2A,37,1A,00,30,31,\
2E,33,2C,34,33,38,00,2D,\
26,3B,2A,76,00,00,00,00,35,2D,\
26,38,2A,37,38,00,39,34,\
34,00,11,76,76,B9,B4,B7,00,\
14,00,35,2D,34,39,34,33,\
00,39,34,37,35,2A,29,34,\
00,28,34,33,39,37,34,31,\
76,00,00,00,\
39,34,37,35,2A,29,34,00,\
28,34,3A,37,38,2A,00,2E,\
38,00,39,2D,2A,00,38,26,\
32,2A,00,26,38,76,00,00,\
00,3A,38,2A,29,00,2E,33,\
00,3C,26,37,35,00,2A,33,\
2C,2E,33,2A,00,28,34,33,\
39,37,34,31,1B,76,00,\
00,00,2E,2B,00,3E,34,3A,\
00,2D,2E,39,00,39,2D,2A,\
00,30,31,2E,33,2C,34,33,\
00,3B,2A,38,38,2A,31,76,\
00,00,00,2D,2A,00,2E,38,\
00,29,2A,38,39,37,34,3E,\
2A,29,00,26,33,29,00,28,\
26,33,33,34,39,\
76,00,00,00,2B,2E,37,2A,\
00,27,26,28,30,00,26,39,\
00,3E,34,3A,1B,00,00,2E,\
2B,00,3E,34,3A,76,00,00,00,32,2E,38,\
38,1A,00,3E,34,3A,00,26,\
37,2A,00,38,3A,27,2F,2A,\
28,39,00,39,34,00,2D,2E,\
38,76,00,00,00,35,2D,\
26,38,2A,37,00,2B,2E,37,\
2A,1B,00,2E,33,00,2A,2E,\
39,2D,2A,37,00,28,26,38,\
2A,1A,76,00,00,00,3E,\
34,3A,00,26,37,2A,00,26,\
31,38,34,00,38,3A,27,2F,\
2A,28,39,00,39,34,00,39,\
2D,2A,76,00,00,00,\
35,2D,26,38,2A,37,00,2B,\
2E,37,2A,00,34,2B,00,26,\
31,31,00,34,39,2D,2A,37,\
76,00,00,\
00,30,31,2E,33,2C,34,33,\
38,00,2E,33,00,39,2D,2A,\
00,36,3A,26,29,37,26,33,\
39,1B,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A2,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,00,00,00,39,2D,\
2A,00,31,2E,27,37,26,37,\
3E,16,28,34,32,35,3A,39,\
2A,37,00,10,0B,28,34,32,\
0B,76,00,00,00,28,\
34,32,32,26,33,29,11,00,\
2D,26,38,00,26,33,00,34,\
35,39,2E,34,33,00,39,34,\
76,00,00,00,\
28,34,32,35,3A,39,2A,00,\
39,34,37,35,2A,29,34,00,\
39,37,26,2F,2A,28,39,34,\
37,3E,76,00,00,\
00,2B,34,37,00,3E,34,3A,\
00,10,34,35,39,2E,34,33,\
00,1E,11,76,76,\
B8,AD,AA,00,14,00,38,2D,\
2E,2A,31,29,00,28,34,33,\
39,37,34,31,\
76,00,00,00,29,2A,2B,2E,\
33,2A,38,00,39,2D,2A,00,\
33,3A,32,27,2A,37,00,34,\
2B,00,2A,33,2A,37,2C,3E,\
76,00,00,00,3A,33,2E,\
39,38,00,39,34,00,27,2A,\
00,26,38,38,2E,2C,33,2A,\
29,00,39,34,00,39,2D,2A,\
76,00,00,00,38,2D,\
2E,2A,31,29,38,1B,00,00,\
2A,33,2A,37,2C,3E,00,2E,\
38,00,39,26,30,2A,33,76,00,00,00,2B,\
37,34,32,00,39,34,39,26,\
31,00,38,2D,2E,35,0B,38,\
00,2A,33,2A,37,2C,3E,1B,\
76,00,00,00,\
33,34,39,2A,00,39,2D,26,\
33,00,39,2D,2A,00,38,39,\
26,39,3A,38,00,29,2E,38,\
35,31,26,3E,76,00,00,\
00,39,34,39,26,31,00,2A,\
33,2A,37,2C,3E,00,2E,33,\
28,31,3A,29,2A,38,00,38,\
2D,2E,2A,31,29,76,00,\
00,00,2A,33,2A,37,2C,3E,\
1B,76,\
76,A9,A6,B2,00,14,00,29,\
26,32,32,26,2C,2A,00,28,\
34,33,39,37,34,31,00,37,\
2A,35,34,37,39,76,00,00,00,2C,2E,3B,\
2A,38,00,39,2D,2A,00,38,\
39,26,39,2A,00,34,2B,00,\
37,2A,35,26,2E,37,00,34,\
2B,76,00,00,00,26,31,\
31,00,29,2A,3B,2E,28,2A,\
38,1B,00,00,3C,2D,2A,37,\
2A,00,26,00,33,2A,2C,26,\
16,76,00,00,00,39,\
2E,3B,2A,00,0B,38,39,26,\
39,2A,00,34,2B,00,37,2A,\
35,26,2E,37,0B,00,38,2D,\
34,3C,38,76,00,00,00,\
39,2D,26,39,00,39,2D,2A,\
00,29,2A,3B,2E,28,2A,00,\
2E,38,00,39,2A,32,35,34,\
37,26,37,16,76,00,00,\
00,2E,31,3E,00,29,26,32,\
26,2C,2A,29,1B,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A3,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,A8,B4,B2,00,14,\
00,31,2E,27,37,26,37,3E,\
16,28,34,32,35,3A,39,2A,\
37,76,76,00,00,00,\
39,2D,2A,00,31,2E,27,37,\
26,37,3E,16,28,34,32,35,\
3A,39,2A,37,00,28,34,33,\
39,26,2E,33,38,76,00,00,\
00,38,2E,3D,00,34,35,39,\
2E,34,33,38,0E,76,76,\
00,00,00,1C,14,28,3A,32,\
3A,31,26,39,2E,3B,2A,00,\
2C,26,31,26,28,39,2E,28,\
00,37,2A,28,34,37,29,00,\
76,00,00,00,00,00,39,2D,\
2E,38,00,34,35,39,2E,34,\
33,00,38,2D,34,3C,2A,38,\
00,28,34,32,35,3A,39,2A,\
37,76,00,00,00,00,00,32,\
2A,32,34,37,3E,00,34,2B,\
00,39,2D,2A,00,37,2A,38,\
3A,31,39,38,00,34,2B,76,00,00,00,00,00,\
26,31,31,00,35,37,2A,3B,\
2E,34,3A,38,00,38,2D,34,\
37,39,00,26,33,29,76,00,00,00,00,\
00,31,34,33,2C,00,37,26,\
33,2C,2A,00,38,2A,33,38,\
34,37,00,38,28,26,33,38,\
76,00,00,00,\
1D,14,38,39,26,39,3A,38,\
00,37,2A,35,34,37,39,76,00,00,\
00,00,00,39,2D,2E,38,00,\
34,35,39,2E,34,33,00,38,\
2D,34,3C,38,00,39,2D,2A,\
00,33,3A,32,16,76,00,\
00,00,00,00,27,2A,37,00,\
34,2B,00,30,31,2E,33,2C,\
34,33,38,1A,00,38,39,26,\
37,29,26,39,2A,38,76,\
00,00,00,00,00,26,33,29,\
00,38,39,26,37,27,26,38,\
2A,38,00,37,2A,32,26,2E,\
33,2E,33,2C,00,2E,33,\
76,00,00,00,00,00,39,2D,\
2A,00,2C,26,32,2A,1B,76,00,00,00,1E,14,35,\
2D,34,39,34,33,00,39,34,\
37,35,2A,29,34,00,29,26,\
39,26,76,00,00,00,00,00,\
3C,2D,2E,28,2D,00,2C,2E,\
3B,2A,38,00,29,2E,37,2A,\
28,39,2E,34,33,38,00,26,\
33,29,76,00,00,00,00,\
00,29,2E,38,39,26,33,28,\
2A,00,00,2B,37,34,32,00,\
00,39,2D,2A,76,00,00,00,\
00,00,2A,33,39,2A,37,35,\
37,2E,38,2A,00,39,34,00,\
26,31,31,00,30,31,2E,33,\
2C,34,33,38,76,00,00,\
00,00,00,2E,33,00,3E,34,\
3A,37,00,36,3A,26,29,37,\
26,33,39,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A4,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,80,80,80,80,80,80,80,\
80,80,80,AE,B3,B8,B9,B7,\
BA,A8,B9,AE,B4,B3,B8,80,\
80,80,80,80,80,80,80,80,\
80,76,76,00,00,00,1F,14,\
38,39,26,37,27,26,38,2A,\
00,33,26,3B,00,29,26,39,\
26,76,00,00,00,00,\
00,39,2D,2E,38,00,34,35,\
39,2E,34,33,00,2C,2E,3B,\
2A,38,00,29,2E,37,2A,28,\
39,2E,34,33,76,00,00,00,\
00,00,26,33,29,00,29,2E,\
38,39,26,33,28,2A,00,39,\
34,00,26,33,3E,00,38,39,\
26,37,16,76,00,00,\
00,00,00,27,26,38,2A,00,\
3C,2E,39,2D,2E,33,00,3E,\
34,3A,37,00,36,3A,26,29,\
37,26,33,39,76,00,\
00,00,20,14,29,2E,37,2A,\
28,39,2E,34,33,18,29,2E,\
38,39,00,28,26,31,28,3A,\
31,26,39,34,37,76,\
00,00,00,00,00,39,2D,2E,\
38,00,34,35,39,2E,34,33,\
00,26,31,31,34,3C,38,00,\
3E,34,3A,00,39,34,\
76,00,00,00,00,00,2A,33,\
39,2A,37,00,28,34,34,37,\
29,2E,33,26,39,2A,38,00,\
2B,34,37,76,00,00,00,00,00,29,\
2E,37,2A,28,39,2E,34,33,\
18,29,2E,38,39,26,33,28,\
2A,00,28,26,31,28,3A,31,\
26,16,76,00,00,00,00,00,\
39,2E,34,33,38,76,00,00,00,21,\
14,2C,26,31,26,28,39,2E,\
28,00,18,37,2A,2C,2E,34,\
33,00,33,26,32,2A,18,00,\
32,26,35,76,00,00,00,\
00,00,39,2D,2E,38,00,34,\
35,39,2E,34,33,00,35,37,\
2E,33,39,38,00,39,2D,2A,\
76,00,00,\
00,00,00,33,26,32,2A,38,\
00,34,2B,00,39,2D,2A,00,\
38,2E,3D,39,2A,2A,33,00,\
32,26,2F,34,37,76,00,\
00,00,00,00,2C,26,31,26,\
28,39,2E,28,00,37,2A,2C,\
2E,34,33,38,00,37,2A,2B,\
2A,37,37,2A,29,76,\
00,00,00,00,00,39,34,00,\
2E,33,00,39,2D,2A,00,2C,\
26,32,2A,1B,76,76,76,76,00,00,00,00,\
00,00,00,3C,2D,2A,33,00,\
3E,34,3A,0B,37,2A,00,37,\
2A,26,29,3E,1A,76,76,00,00,\
00,35,37,2A,38,38,00,0B,\
2F,0B,00,39,34,00,31,34,\
26,29,00,39,2D,2A,00,2C,\
26,32,2A,76,76,\
80,80,80,80,80,80,80,80,\
80,80,80,80,80,B5,A6,AC,\
AA,80,A5,80,80,80,80,80,\
80,80,80,80,80,80,80,80,\
76,76,76]
    10 LET D$="16667170211752418071186091903219514201352070621267"
    20 REM RAND USR 16514
    30 LET E=PEEK 16396+256*PEEK 16397
    40 POKE 16418,0
    50 GOSUB 2000
   100 FOR A=1 TO 10*5 STEP 5
   110 LET F=VAL D$(A TO A+4)
   120 GOSUB 5000
   130 LET A$=INKEY$
   140 IF A$="J" THEN GOTO 500
   150 IF CODE A$=118 THEN NEXT A
   160 IF A$>="1" AND A$<="9" THEN LET A= (VAL A$-1)*5+1
   170 IF A$="" THEN GOTO 130
   180 NEXT A
   200 GOTO 100 
   500 LET F=E
   510 GOSUB 5000
   520 FOR Z=1 TO 250
   530 NEXT Z
   550 LOAD "SST"
  1020 RETURN 
  2000 FOR Z=0 TO 1000
  2010 IF INKEY$="" THEN NEXT Z
  2020 RETURN 
  5000 POKE 16397,INT (F/256)
  5010 POKE 16396,F-(INT (F/256)*256)
  5020 RETURN
  9000 SAVE "SSTI"
  9999 GOTO 10
SSTI.P
(6.66 KiB) Downloaded 35 times

Re: [D_File] Something's wrong in this code.

Posted: Mon Mar 02, 2020 11:11 pm
by Fruitcake
I think the problem is you are poking the DFILE system variable (16396 and 16397) to change the location of the display file such that it points to each of the 10 different screens in turn, but crucially the two bytes are not changed at the same time. This means that after location 16397 has been written to, if the ZX81 attempts to output the display file (which it almost certainly will) then it will point at the wrong location and will begin 'executing' the display from there.

Try the following:
- Renumber line 5000 as 5005
- Add new line: 5000 FAST
- Add new line 5015: SLOW

This will prevent the display being shown while the two bytes are being changed. You will however see a small flicker as the screens are switched between. To avoid this you would need to convert the subroutine into machine code and only change the two bytes when the TV frame is not being output.

Re: [D_File] Something's wrong in this code.

Posted: Mon Mar 02, 2020 11:54 pm
by XavSnap
:shock:

Many thanks Paul.

The SLOW/FAST seem to trap the right D_File offset in Basic.

We had to set the D_file in ASM to avoid the screen bink the black screen… and set it before the line scan refresh.

The right … Super Star Trek instruction !!! :lol:
SSTI.P
(6.67 KiB) Downloaded 47 times

[D_File] Relocated screen page in Basic..

Posted: Tue Mar 03, 2020 8:07 am
by XavSnap
this program is more complicated than simple "PRINT" in Basic …

Yes, you had to create your screen, save it in binary, and throw it in a big REM.

Use the "Easydraw" feature on VB81, a text editor or the ASM2 screen…

Save the D_File in a "page1.bin" format.

Create a text program using : 1 REM [HEX: 00,00,00,00,...,00] (the big REM)

Load it, and edit the REM in the Disassembler window.

Set the first offset byte to $76 (binary window).

Set the Disassembler lower offset after the $76 in the REM, and load the binary … it will feed the room between the START and the END offset.
If the file is bigger than the last offset, the loaded file will be trimmed ! The memory segment will be named to USER, but be careful to set the last offset in the REM rang, to avoid to crush the next Basic line header.
Load each screen to the REM...
1 REM $76,Screen1BIN,$76,Screen2BIN,$76,Screen3BIN,$76,Screen4BIN,...

In the binary window, set the reserved byte 00 between all screen blocs … to $76. (by clicking on the right byte/Edit mode)

Get all screens offset in decimal (drag the cursor on the binaries) at the bottom of the Binary editor window… the famous $76, changed above (the starts of D_file blocs).

Save in text mode: Save"INST.TXT"
You can erase unneeded spaces…
…,00,00,00,00,76,... at the end of lines
Or delete the white line room : 76,00,00,00,...,00,00,76 = ...76,76... to save memory.
But, don't forget to reassign the D_file offsets in D$.

And RUN 9000 to save the auto-start "P" file. open the load file window and set the startup D_File from a saved binary file or another "P" file.

:shock:
3 hours of my life !
But, it's for fun...

Re: [D_File] Relocated screen page in Basic.

Posted: Wed Mar 04, 2020 9:51 pm
by GCHarder
Wouldn't it be easier just to use your screen compress routines?

viewtopic.php?f=5&t=1587&p=19562&hilit= ... ess#p19562

But, I guess it's not strictly speaking BASIC then.

Regards;

Greg

Re: [D_File] Relocated screen page in Basic.

Posted: Thu Mar 05, 2020 1:58 am
by XavSnap
:D
Yes, using "Crush/Uncrush" or "Zx7"...

French forums, select the language at the top...
"Crush/Uncrush": https://forum.system-cfg.com/viewtopic.php?t=5897
"Zx7": https://forum.system-cfg.com/viewtopic. ... x7#p157106

:ugeek: