Forbidden64,
you're obviously using the copy+paste facility of VICE to read the listing off the screen one page at a time. Not only removes this control characters (or better said, substitutes those with wrong results ... see the instance of "S" instead of {CLR} to clear the screen), the resulting column width of 22 characters makes the listing very hard to read. Neither is it possible to take that listing and paste it back into VICE directly - unless the lines are concatenated in a text editor first
and then pasted from there, the BASIC editor in VICE will throw a lot of ?SYNTAX ERRORs on the partial lines without line numbers.
Please accustom yourself with the file transfer capabilities of VICE. With "Options > True Drive Emulation off" and "Settings > Peripheral settings ..." you can mount a PC directory as drive. Then, you can "print" out the listing with the following two command lines (each of them followed by pressing RETURN):
Code: Select all
OPEN2,8,2,"LISTING.TXT,S,W":CMD2:LIST
PRINT#2:CLOSE2
That will result in a file "listing.txt"
in PETSCII in the chosen PC directory. That in turn can be processed to readable ASCII by the utility petcat.exe contained in the VICE folder, or similar tools. The control characters will be quoted in curly braces, with a result similar to my earlier posting.
Sorry I didn't see this earlier. I just read the first version of your post from May 11th, which only went so far as to the sentence "It is now somewhat working..." and only looked again into the thread, when wimoos had replied.
Likewise, you can save the program into the same PC directory (make sure to tick off "write *.P00 files" under Peripheral settings) simply with
SAVE"NAME.PRG",8, compress it with ZIP, and add it as attachment to your posting. Unfortunately, the forum software doesn't allow for *.prg as extension for file attachments, for whatever reason.
Code: Select all
100 TT=1:SM=7680
110 DIMEX(20),EY(20),EH(20),MP$(20)
130 MP$(1)="AAAAAAAAAAAAAAAAAA"
140 MP$(2)="A@ AAAAAA E AAAAA"
150 MP$(3)="A AAAAAADAAAAAAAA"
160 MP$(4)="A D E AAAAAA"
170 MP$(5)="AAAA AAAAAA"
180 MP$(6)="AAAAAAAAAAAAAAAAAA"
188 PRINT"{CLR}"
190 FORI=1TO6:FORII=1TO18
210 IFMID$(MP$(I),II,1)="E"THENGOSUB2000
220 IFMID$(MP$(I),II,1)="@"THENX=I:Y=II
230 NEXT
231 PRINTMP$(I):NEXT
240 G=PEEK(203)
249 IFG<>64THENGOSUB2500
250 IFJS=0THENGOTO500
500 I=I+1:IFI>=TT+1THENI=1:GOSUB1000
520 GOSUB1500:GOTO240
1000 POKESM+EX(I)*22+EY(I),32:D=0
1020 IFX>EX(I)ANDMID$(MP$(EX(I)+1),EY(I),1)<>"A"THENEX(I)=EX(I)+1:D=1:RETURN
1030 IFY>EY(I)ANDMID$(MP$(EX(I)),EY(I)+1,1)<>"A"THENEY(I)=EY(I)+1:D=2:RETURN
1040 IFY<EY(I)ANDMID$(MP$(EX(I)),EY(I)-1,1)<>"A"THENEY(I)=EY(I)-1:D=3:RETURN
1050 IFMID$(MP$(EX(I)-1),EY(I),1)<>"A"THENEX(I)=EX(I)-1:D=4:RETURN
1060 RETURN
1500 IFD=0THENRETURN
1520 IFD=1THENPOKESM+EX(I)*22+EY(I)-22,32
1530 IFD=2THENPOKESM+EX(I)*22+EY(I)+1,32
1540 IFD=3THENPOKESM+EX(I)*22+EY(I)-1,32
1550 IFD=4THENPOKESM+EX(I)*22+EY(I)+22,32
1560 POKESM+EX(I)*22+EY(I),6:RETURN
2000 EX(TT)=I:EY(TT)=II:EH(TT)=INT(RND(1)*20)+10:TT=TT+1:RETURN
2500 REM **KEYBOARD
2505 POKESM+X*22+Y,32
2510 IFG=18THENIFMID$(MP$(X),Y+1,1)<>"A"THENY=Y+1
2520 IFG=17THENIFMID$(MP$(X),Y-1,1)<>"A"THENY=Y-1
2530 IFG=41THENIFMID$(MP$(X+1),Y,1)<>"A"THENX=X+1
2540 IFG=9THENIFMID$(MP$(X-1),Y,1)<>"A"THENX=X-1
2545 POKESM+X*22+Y,1
2550 RETURN
Here's
name.zip for download.