8-Bit Software Online Conversion
Mode 7 Screen Editor - Listing
10REM Mode 7 Screen Designer
20REM written 16/9 to 14/10/97
30REM (c) 3 Spaceman (E3Y)
40REM (c) DataDream FreeWare
50REM The home of happy software!
60MODE7
70ONERRORIFERR<>17PRINT:REPORT:PRINT"
@ ";ERL:PROCquit
80*FX229,1
90DIMsa$(19),nm$(19)
100FORr%=0TO19:READsa$(r%):nm$(r%)="un
titled":NEXT
110v%=24:h%=40:curr%=1:NF%=0
120PROCcontrol
130x1%=(40-h%)DIV2:x2%=39-(40-h%)/2
140y1%=((25-v%)DIV2)+1:y2%=(24-(25-v%)
/2)+1
150C%=64:ch%=32:X%=0:Y%=0:A%=135
160PROCstat
170CLS
180IFNF%=1PROCreveal
190REPEAT
200addr%=&7C00+x1%+X%+(y1%+Y%)*40
210ch%=?addr%
220?addr%=C%
230PROCstat
240PROCkeys
250?addr%=ch%
260UNTIL0
270END
280VDU28,x1%,y2%,x2%,y1%
290DEFPROCstat
300PROCcurs(0)
310VDU26
320PRINT"Ch:"FNFILL(C%,3);:PROCextra(C
%):PRINT" On:"FNFILL(ch%,3);:PROCextra(
ch%)
330VDU28,x1%,y2%,x2%,y1%
340VDU31,X%,Y%
350PROCcurs(1)
360ENDPROC
370DEFFNFILL(N%,M%)
380LOCALL%
390L%=LENSTR$N%
400PRINTSTRING$(M%-L%,"0");:=STR$N%
410DEFPROCkeys
420IFINKEY-113PROCflip
430LOCALd%
440IFINKEY-1d%=2ELSEd%=1
450IFINKEY-26X%=X%-d%
460IFINKEY-122X%=X%+d%
470IFINKEY-58Y%=Y%-d%
480IFINKEY-42Y%=Y%+d%
490IFX%<0X%=h%-1
500IFX%>=h%X%=0
510IFY%<0Y%=v%-1
520IFY%>=v%Y%=0
530d%=0
540IFINKEY-103d%=-1
550IFINKEY-104d%=1
560IFINKEY-1d%=d%*10
570C%=C%+d%
580IFC%>255C%=32
590IFC%<32C%=255
600IFINKEY-74ch%=C%
610IFINKEY-90ch%=32
620IFINKEY-2ANDINKEY-90FORs%=0TO960STE
P4:s%!&7C28=0:NEXT:nm$(curr%-1)="untitle
d"
630ENDPROC
640DEFPROCextra(a%)
650IFa%=127a%=255
660IFa%<127ORa%>159PRINT" "CHR$a%" CH
R$a%" "SPC8;:ENDPROC
670LOCALs$,l%
680s$=FNcheck
690l%=ASCLEFT$(s$,1)
700IF(l%<129ORl%>136)AND(l%<145ORl%>15
1)s$=" "+s$
710PRINTs$STRING$(13-LENs$," ");
720ENDPROC
730DEFFNcheck
740IFa%>128ANDa%<136=CHR$a%+"text"+CHR
$135
750IFa%=136=CHR$a%+"flash"+CHR$137
760IFa%=137="no flash"
770IFa%=140="1x height"
780IFa%=141="2x height"
790IFa%>144ANDa%<152=CHR$(a%-16)+"grfx
"+CHR$135
800IFa%=152="hide display"
810IFa%=153="contin. grfx"
820IFa%=154="separ. grfx"
830IFa%=156="blk backgrnd"
840IFa%=157="new backgrnd"
850IFa%=158="hold grfx"
860IFa%=159="release grfx"
870="nothing"
880DEFPROCinstr
890CLS
900FORn%=0TO1
910VDU132,157,141,129+n%*4
920PRINTSPC4"3ason's Teletext Editor"S
PC8CHR$156;
930NEXT
940PRINTCHR$130"Currently editing page
"
950PRINT'CHR$134"CURSOR KEYS to move"
960PRINTCHR$134"(SHIFT+direction for d
ouble speed)"
970PRINT'CHR$131"< or > to change sele
cted character"
980PRINTCHR$131"(SHIFT+change characte
r for faststep)"
990PRINT'CHR$135"RETURN to place chara
cter"
1000PRINTCHR$135"DELETE to remove chara
cter"
1010PRINTCHR$135"(CTRL+DELETE to clear
screen)"
1020PRINT'CHR$132"ESCAPE toggles this p
age"
1030PRINTCHR$132"(SHIFT+ESCAPE to quit)
"
1040PRINT''" CONTROLS ON THIS PAGE:"
1050PRINT'CHR$133"< or > to change curr
ent screen"
1060PRINT'CHR$129"S to save screen"
1070PRINTCHR$129"L to load screen"
1080PRINTCHR$129"(SHIFT+S or L-save/loa
d screen block)";
1090ENDPROC
1100DEFPROCcontrol
1110PROCinstr
1120PROCcurs(0)
1130REPEAT
1140IFINKEY-103curr%=curr%+19:PROCkdel
1150IFINKEY-104curr%=curr%+1:PROCkdel
1160curr%=(curr%-1)MOD20+1
1170PRINTTAB(24,2)STR$curr%"/20 ("nm$(c
urr%-1)")"SPC8
1180IFINKEY-82PROCinout(2)
1190IFINKEY-87PROCinout(1)
1200UNTILINKEY-113
1210IFINKEY-1PROCquit
1220CLS
1230ENDPROC
1240DEFPROCflip
1250IFINKEY-1PROCquit
1260LOCALs%
1270?addr%=ch%
1280FORs%=0TO960STEP4
1290s%!(&2C40+curr%*&3C0)=s%!&7C28
1300NEXT:VDU26
1310PROCcontrol
1320PROCstat
1330PROCreveal
1340ch%=?(&2C40+curr%*&3C0+x1%+X%+(y1%+
Y%)*40)
1350ENDPROC
1360DEFPROCreveal
1370FORs%=0TO960STEP4
1380s%!&7C28=s%!(&2C40+curr%*&3C0)
1390NEXT
1400ENDPROC
1410DEFPROCquit
1420*FX229,0
1430*FX15
1450PROCcurs(1)
1460END
1470DEFPROCcurs(onoff%)
1480VDU23,1,onoff%;0;0;0;
1490ENDPROC
1500DEFPROCkdel
1510TIME=0:REPEATUNTILTIME>15:*FX15
1520ENDPROC
1530DEFPROCinout(io%)
1540LOCALshift%,X%,Y%
1550shift%=0:dir$="S"
1560IFINKEY-1shift%=1:dir$="B"
1570REPEATUNTILINKEY$0=""
1580CLS
1590IFio%=1op$="load":NF%=1ELSEop$="sav
e"
1600IFshift%=1st$="block"ELSEst$="scree
n"
1610PRINT''CHR$130" Enter name of "st$
" file to "op$
1620PRINT'SPC13CHR$132CHR$157CHR$135"..
..... "CHR$156
1630PRINTTAB(16,4);
1640PROCcurs(1)
1650PROCkdel
1660f$="":REPEATG%=GET
1670IFG%>32ANDG%<127ANDLENf$<7f$=f$+CHR
$G%:VDUG%
1680IFG%=127ANDLENf$>0VDU8,46,8:f$=LEFT
$(f$,LENf$-1)
1690UNTIL(LENf$>0ANDG%=13)ORG%=27
1700PROCcurs(0)
1710IFG%=27ENDPROC
1720op$=op$+" "+dir$+"."+f$+" "
1730IFshift%=1op$=op$+"3000"ELSEop$=op$
+sa$(curr%-1)
1740IFshift%=0nm$(curr%-1)=f$
1750IFshift%FORr%=0TO19:nm$(r%)=f$:NEXT
1760IFio%=2ANDshift%=0op$=op$+"+3C0"
1770IFio%=2ANDshift%=1op$=op$+"+4B00"
1780$&900=op$:X%=0:Y%=9:CALL&FFF7
1790PROCinstr
1800ENDPROC
1810DATA3000,33C0,3780,3B40
1820DATA3F00,42C0,4680,4A40
1830DATA4E00,51C0,5580,5940
1840DATA5D00,60C0,6480,6840
1850DATA6C00,6FC0,7380,7740