NEW
10 'INI
20 CLS:CLP:CLV:UART0
30 POKE #700,0,41,158,111,97,111,158,41
40 POKE #708,148,121,246,134,246,121,148,0
50 POKE #710,68,56,186,68,238,108,108,186
60 POKE #718,93,54,54,119,34,93,28,34
70 LC0,0:?"~E2 BUG PROGRAMING ~E2"
80 T=TICK():SRND(T)
90 POKE#780,255,255,255,255,255,255,255,255
100 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
110 D=PEEK(#780+Y-1)
120 FORX=1TO8:LCX*2+1,2:?X;
130 IFD&B=0GOTO@N
140 LCX*2+1,Y*2+1:?"~91";
150 LCX*2,Y*2+2:?"~92 ~92";
160 LCX*2+1,Y*2+3:?"~91";
170 @N:B=B/2
180 NEXT:NEXT
190 X=RND(8)+1:Y=RND(8)+1:M=RND(4)+1
200 LRUN112
SAVE110
NEW
10 'SEL
20 M=9:L=20:P=0:F=0
30 @F:CLS:LC0,0,1
40 ?"モンダイ"
50 S=F/L*L:E=S+L-1:IFE>M E=M
60 P=F/L:LC0,2
70 FILES 100+S,100+E
80 @S:LC0,2+F%L,1
90 K=INKEY():IF!KCONT
100 IF K=10 LRUN 100+F
110 IF K=30 F=F-1
120 IF K=31 F=F+1
130 IF K=28 F=F/L*L-L
140 IF K=29 F=F/L*L+L
150 IF F<0 F=0
160 IF F>M F=M
170 IF P<>F/L P=F/L:GOTO@F
180 GOTO @S
SAVE111
NEW
10 'SCR
20 FORD=0TO11:FORE=1TO9
30 Z=(SCR(D*2,E*2)=ASC("~92"))
40 Z=Z+2*(SCR(D*2,E*2+2)=ASC("~92"))
50 Z=Z+4*(SCR(D*2-1,E*2+1)=ASC("~91"))
60 Z=Z+8*(SCR(D*2+1,E*2+1)=ASC("~91"))
70 LCD*2,E*2+1
80 IFZ=5?"~9B";
90 IFZ=6?"~99";
100 IFZ=7?"~94";
110 IFZ=9?"~9A";
120 IFZ=10?"~98";
130 IFZ=11?"~95";
140 IFZ=13?"~96";
150 IFZ=14?"~97";
160 IFZ=15?"~93";
170 NEXT:NEXT
180 LC23,2:?"~E2 G ススム"
190 LC23,4:?"~E0 L ヒダリ"
200 LC23,6:?"~E1 R ミギ"
210 LC23,8:?"カイ[クリカエシ]"
230 LC23,12:?"N ヤリナオシ"
240 LC23,14:?"M モンダイ"
245 LC23,16:?"Q オワル"
250 LRUN113
SAVE112
NEW
10 'DO
20 @F:V=#900+20*32:C=0:J=0
30 GSB@P
40 LC0,20:?CHR$(12);:INPUT ">",A
50 @LP:C=C+1
60 R=PEEK(V+C)
70 IFR=0LC0,22:GOTO@F
80 IFR=ASC("N")LRUNF
90 IFR=ASC("M")GOTO@M
100 IFR=ASC("T")GOTO@T
110 IFR=ASC("X")LRUN114
120 IFR=ASC("Q")LC0,22:END
130 GSB@C
140 IFR=ASC("G")GSB@G
150 IFR=ASC("R")GSB@R
160 IFR=ASC("L")GSB@L
170 IF(R>=ASC("0"))*(R<=ASC("9"))GSB@S
180 IFR=ASC("]")GSB@B
190 GSB@P:WAITW
200 GOTO@LP
210 @P:LCX*2+1,Y*2+2
220 IFM=1?"~E2";
230 IFM=2?"~E1";
240 IFM=3?"~E3";
250 IFM=4?"~E0";
260 RTN
270 @C:LCX*2+1,Y*2+2:?"~90";:RTN
280 @G:BEEP 10
290 X=X+(M=2)-(M=4)
300 Y=Y+(M=3)-(M=1)
310 W=30:RTN
320 @R:BEEP 8
330 M=M+1:IFM=5M=1
340 W=30:RTN
350 @L:BEEP 8
360 M=M-1:IFM=0M=4
370 W=30:RTN
380 @S:J=R-ASC("0"):C=C+1
390 @N:R=PEEK(V+C)
400 IF(R>=ASC("0"))*(R<=ASC("9"))J=J*10+R-ASC("0"):C=C+1:GOTO@N
410 S=C:W=0:RTN
420 @B:J=J-1:IFJ>0C=S
430 W=0:RTN
440 @M:T=TICK():SRND(T):LRUN111
450 @T:LC0,20:?CHR$(12);"T=";T:INPUT "T=",T
460 SRND(T):LRUN111
SAVE113
NEW
10 '~FFヲトロウ
20 CLS:?"~F4ヲサケテ、~FFヲトロウ"
30 POKE#780,255,255,255,255,255,255,255,255
40 SRND(T)
50 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
60 D=PEEK(#780+Y-1)
70 FORX=1TO8:LCX*2+1,2:?X;
80 IFD&B=0GOTO@N
90 LCX*2+1,Y*2+1:?"~91";
100 LCX*2,Y*2+2:?"~92 ~92";
110 LCX*2+1,Y*2+3:?"~91";
120 @N:B=B/2
130 NEXT:NEXT
140 FORI=1 TO 8
150 LCRND(8)*2+3,RND(8)*2+4
160 ?"~F4";
170 NEXT
180 LC17,18:?"~FF";
190 X=1:Y=1:M=2:F=FILE()
200 LRUN112
SAVE100
NEW
10 'マスゼンブトオル
20 CLS:?"~F0ゼンブトオル"
30 POKE#780,60,60,255,255,255,255,60,60
40 SRND(T)
50 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
60 D=PEEK(#780+Y-1)
70 FORX=1TO8:LCX*2+1,2:?X;
80 IFD&B=0GOTO@N
90 LCX*2+1,Y*2+1:?"~91";
100 LCX*2,Y*2+2:?"~92 ~92";
110 LCX*2+1,Y*2+3:?"~91";
120 @N:B=B/2
130 NEXT:NEXT
140 @R:X=RND(8)+1:Y=RND(8)+1
150 IFSCR(X*2+1,Y*2+2)=0GOTO@R
160 M=RND(4)+1:F=FILE()
170 LRUN112
SAVE101
NEW
10 'ジュンバンニトル
20 CLS:?"~F0ジュンバン"
30 POKE#780,60,60,255,255,255,255,60,60
40 SRND(T)
50 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
60 D=PEEK(#780+Y-1)
70 FORX=1TO8:LCX*2+1,2:?X;
80 IFD&B=0GOTO@N
90 LCX*2+1,Y*2+1:?"~91";
100 LCX*2,Y*2+2:?"~92 ~92";
110 LCX*2+1,Y*2+3:?"~91";
120 @N:B=B/2
130 NEXT:NEXT
140 FORI=1TO5
150 @P:X=RND(8)+1:Y=RND(8)+1
160 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@P
170 LCX*2+1,Y*2+2:?I;
180 NEXT
190 @R:X=RND(8)+1:Y=RND(8)+1
200 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@R
210 M=RND(4)+1:F=FILE()
220 LRUN112
SAVE102
NEW
10 'メイロ
20 CLS:?"~F0メイロ"
30 POKE#780,253,65,223,145,215,85,244,167
40 SRND(T)
50 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
60 D=PEEK(#780+Y-1)
70 FORX=1TO8:LCX*2+1,2:?X;
80 IFD&B=0GOTO@N
90 LCX*2+1,Y*2+1:?"~91";
100 LCX*2,Y*2+2:?"~92 ~92";
110 LCX*2+1,Y*2+3:?"~91";
120 @N:B=B/2
130 NEXT:NEXT
140 @G:X=RND(8)+1:Y=RND(8)+1
150 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@G
160 LCX*2+1,Y*2+2:?"~FF";
170 @R:X=RND(8)+1:Y=RND(8)+1
180 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@R
190 M=RND(4)+1:F=FILE()
200 LRUN112
SAVE103
NEW
10 'MAZE
20 CLS:SRND(T)
30 FORX=0TO12:FORY=0TO8
40 LCX,Y:?"O";
50 NEXT:NEXT
60 @R
70 X=RND(6)*2+1
80 Y=RND(4)*2+1
90 LCX,Y:?CHR$(0);
100 @F:F=0
110 @L:IFF=15GOTO@N
120 M=RND(4)
130 IFM=0D=0:E=1:F=F|1
140 IFM=1D=0:E=-1:F=F|2
150 IFM=2D=1:E=0:F=F|4
160 IFM=3D=-1:E=0:F=F|8
170 IFSCR(X+D*2,Y+E*2)=0GOTO@L
180 LCX+D,Y+E:?CHR$(0);
190 LCX+D*2,Y+E*2:?CHR$(0);
200 X=X+D*2:Y=Y+E*2:GOTO@F
210 @N:C=0:FORX=1TO11STEP2:FORY=1TO5STEP2
220 IFSCR(X,Y)<>0C=C+1
230 NEXT:NEXT
240 IFC=0GOTO@Q
250 @X
260 X=RND(5)*2+1
270 Y=RND(4)*2+1
280 IFSCR(X,Y)=0GOTO@F
290 GOTO@X
300 @Q
310 FORX=1TO11:FORY=1TO8
320 D=0:IFSCR(X,Y)=ASC("O")THEND=1
330 POKE#800+Y*12+X,D
340 NEXT:NEXT
350 CLS:?"メイロ"
360 FORX=1TO11:FORY=1TO8
370 IFPEEK(#800+Y*12+X)=1GOTO@K
380 LCX*2-1,Y*2+1:?"~91";
390 LCX*2-2,Y*2+2:?"~92 ~92";
400 LCX*2-1,Y*2+3:?"~91";
410 @K:NEXT:NEXT
420 FORI=0TO4
430 @I:X=RND(9)+1:Y=RND(7)+1
440 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@I
450 LCX*2+1,Y*2+2:?"~FF";
460 NEXT
470 @G:X=RND(9)+1:Y=RND(7)+1
480 IFSCR(X*2+1,Y*2+2)<>ASC(" ")GOTO@G
490 M=RND(4)+1:F=FILE()
500 LRUN112
SAVE104
NEW
10 'ヒトフデガキ
20 CLS:?"~F0ヒトフデガキ"
30 POKE#780,0,44,60,36,44,44,60,0,3,2,3
40 FORY=1TO8:B=128:LC1,Y*2+2:?Y;
50 D=PEEK(#780+Y-1)
60 FORX=1TO8:LCX*2+1,2:?X;
70 IFD&B=0GOTO@N
80 LCX*2+1,Y*2+1:?"~91";
90 LCX*2,Y*2+2:?"~92 ~92";
100 LCX*2+1,Y*2+3:?"~91";
110 @N:B=B/2
120 NEXT:NEXT
130 X=PEEK(#788)
140 Y=PEEK(#789)
150 M=PEEK(#78A)
160 F=FILE()
170 LRUN112
SAVE105
NEW
10 'SCOPY
20 LC0,-1:UART1:FORV=#900TO#BFF:FORW=0TO7:?PEEK(PEEK(V)*8+W):NEXT:NEXT:?"OK":UART0
30 LRUN113
SAVE114
NEW
10 'PCG HELP
20 CLS
30 ?" ~FFIchigoJam PCG":?
40 ?" 0123456789ABCDEF"
50 ?" ~98~91~91~91~91~91~91~91~91~91~91~91~91~91~91~91~91"
60 ?"Alt ~92~E0~E1~E2~E3~E4~E5~E6~E7~E8~E9~EA~EB~EC~ED~EE~EF #E0-#EF"
70 ?"+Shift~92 ~81~82~83~84~85~86~87~88~89~8A~8B~8C~8D~8E~8F #80-#8F"
80 ?
90 ?" GHIJKLMNOPQRSTUV"
100 ?" ~98~91~91~91~91~91~91~91~91~91~91~91~91~91~91~91~91"
110 ?"Alt ~92~F0~F1~F2~F3~F4~F5~F6~F7~F8~F9~FA~FB~FC~FD~FE~FF #F0-#FF"
120 ?"+Shift~92~90~91~92~93~94~95~96~97~98~99~9A~9B~9C~9D~9E~9F #90-#9F"
130 LC0,14:?CHR$(24);:INPUT"TEST:",C:CONT
SAVE115
NEW
10 'CHR
20 CLS:?"\ 0123456789ABCDEF":?" ~98";:FORI=0TO15:?"~91";:NEXT:?
30 FORH=0TO15:?HEX$(H);"~92"
40 FORL=0TO15:POKE#900+64+2+H*32+L,H*16+L:NEXT
50 NEXT
55 @LP
60 LC0,19:?CHR$(12);:INPUT "COPY:",A:IFA=0END
70 LC0,20:?CHR$(12);:INPUT "TO :",B
80 COPY B*8,A*8,8
90 GOTO@LP
SAVE116
NEW
10 'PCG EDIT
20 CLS
30 ?"PCG EDIT":?
40 ?:?"0 1 2 3 4 5 6 7 8 9 A B C D E F"
50 ?:?"~E0 ~E1 ~E2 ~E3 ~E4 ~E5 ~E6 ~E7 ~E8 ~E9 ~EA ~EB ~EC ~ED ~EE ~EF"
60 ?:?"~F0 ~F1 ~F2 ~F3 ~F4 ~F5 ~F6 ~F7 ~F8 ~F9 ~FA ~FB ~FC ~FD ~FE ~FF"
70 ?:INPUT"EDIT:",E
80 CLS
90 FOR Y=0TO7
100 B=128
110 D=PEEK(E*8+Y)
120 FOR X=0TO7
130 LCX+5,Y+5:IFD&B=0?"・";:ELSE?CHR$(2);
140 B=B/2:NEXT
150 NEXT
160 X=0:Y=0:LCX+5,Y+5,1
170 @K:K=INKEY()
180 IFK=0GOTO@K
190 IFK=10GOTO@P
200 IFK=28X=X-1
210 IFK=29X=X+1
220 IFK=30Y=Y-1
230 IFK=31Y=Y+1
240 IFK=32IFSCR()=ASC("・")?CHR$(2);:ELSE?"・";
250 LCX+5,Y+5,1:BEEP
260 GOTO @K
270 @P
280 LC0,15:?" POKE#";HEX$(E*8);
290 FOR Y=0TO7
300 B=128:D=0
310 FOR X=0TO7
320 IFSCR(X+5,Y+5)=2D=D+B
330 B=B/2:NEXT
340 POKEE*8+Y,D
350 ?",";D;
360 NEXT
370 ?:END
SAVE117
NEW
100 'PCG POKE
110 CLS:?" 0 1 2 3 4 5 6 7":?
120 FORJ=0TO3:?"#";HEX$(#E0+J*8);" ";:FORI=0TO7:?CHR$(#E0+J*8+I,0);:NEXT:?:?:NEXT:?
130 '-----
140 INPUT "S=",S:INPUT "E=",E
150 CLS:FORC=STOE:A=#700+(C-#E0)*8
160 ?500+C;" POKE #";HEX$(A);
170 FOR I=A TO A+7:?",";PEEK(I);:NEXT:?:NEXT
SAVE119
NEW
10 'PCG #E2
20 CLS
30 ?:?"0 1 2 3"
40 ?:?"~E0 ~E1 ~E2 ~E3"
50 '----------
60 A=#710:B=#708:GSB@R
70 A=B:B=#718:GSB@R
80 A=B:B=#700:GSB@R
90 END
100 '-------
110 @R:E=1:FOR I=0 TO 7
120 F=1:D=0:FOR J=0 TO 7
130 G=PEEK(A+J):D=D+(G&E>0)*F:F=F*2
140 NEXT
150 POKE B+7-I,D:E=E*2
160 NEXT
170 RTN
SAVE118