RETROCHALLENGE 2011 - WINTER WARMUP
INSERT CREDIT 25¢
http://www.wickensonline.co.uk/retrochallenge-2011ww/
Tron | Monday, January 31, 2011 10:17 pm (Pacific Standard Time) |
I converted a start of a TRON game from Applesoft to Integer BASIC, but I've hit a wall. We're out of time.
Notes:
-DIMdoes not set the array values to zero. I think the values are whatever is in memory!
- Can't use V and V(I) as two different variables.mmphosis$ telnet localhost 1977
Trying ::1...
Connected to localhost.
Escape character is '^]'.
>LIST^]telnet> toggle crmod
Will map carriage return on output.
1 GOSUB 9: FOR Q=0 TO T STEP 0:C= PEEK (K): GOSUB 2: NEXT Q: END
2 IF C>H THEN GOSUB 100
3 FOR P=1 TO R: IF NOT F(P) THEN 110
4 M=X(P)+D(P):W=Y(0)+E(P): IF M<0 OR M>39 OR W<0 OR W>39 THEN 120
5 IF SCRN(X,Y) THEN 130
6 COLOR=O(P): PLOT X(P),Y(P): COLOR=G: PLOT M,W:X(P)=M:Y(P)=W: NEXT P: RETURN
9 LET T=1:K=-16384
10 LET G=127:H=128
11 LET S=-16368
12 GR
13 DIM D(4):D(1)=T
14 DIM A(127): FOR I=0 TO 127:A(I)=0: NEXT I:A(17)=-T:A(81)=-T:A(113)=-T
15 DIM U(4):U(1)=-T:U(2)=T:U(3)=0:U(4)=0: DIM V(4):V(1)=0:V(2)=0:V(3)=-T:V(4)=T
16 DIM X(4):X(1)=20: DIM Y(4):Y(1)=20
17 A(8)=1:A(21)=2:A(11)=3:A(10)=4
18 P=2:G=15
19 A(73)=3:A(74)=1:A(75)=4:A(76)=2: DIM Z(4):Z(2)=1:Z(3)=1:Z(4)=1:Z(1)=0
20 B=-16336
21 DIM O(4):O(1)=2:O(2)=1:O(3)=4:O(4)=3
22 R=4:N=R
23 DIM F(4):F(1)=1:F(2)=0:F(3)=0:F(4)=0
24 DIM E(4):E(1)=0:E(2)=0:E(3)=0:E(4)=0
99 RETURN
100 J= PEEK (S):C=C-H:J=A(C):Q=J<0: IF J<1 THEN RETURN
101 D(Z(J))=U(J):E(Z(J))=V(J): RETURN
110 NEXT P: RETURN
120 COLOR=1: PLOT X(P),Y(P):F(P)=0:N=N-1: NEXT P: RETURN
130 COLOR=1: PLOT M,W:F(P)=0:N=N-1: NEXT P: RETURN
>
Man | Saturday, January 29, 2011 |
The
AUTOcommand works in Apple-1 BASIC, but theMANcommand seems to be broken! :(
POKE 248,0gets you out of AUTO mode.
I am using a new emulator called jace.
Notes | Thursday, January 20th, 2011 |
I've been busy hacking. I've written notes...
✓ make a program to make an EXEC program to run Apple-1 BASIC on APPLE-1 for Apple II.
✓ wrote this in Integer BASIC:
10 DIM F$(30):F$="APPLE1.EX"
20 DIM B$(30):B$="APPLE1 BASIC"
30 D$="": REM CTRL D
40 PRINT D$;"OPEN";F$
50 PRINT D$;"WRITE";F$
60 PRINT "CALL-151"
70 PRINT "C081 C081 E000"
80 PRINT "BLOAD";B$;",A$E000"
90 PRINT "C081 C081 E003:";
100 PRINT "EA EA EA EA EA ";
110 PRINT "20 70 80"
120 PRINT "C081 C081 E3D5:";
130 PRINT "EA EA EA EA EA ";
140 PRINT "20 EF FF"
150 PRINT "C081 C081 E870:";
160 PRINT "0 C0"
170 PRINT "BRUN APPLE1"
180 PRINT D$;"CLOSE";F$
190 END✓ wrote this in Applesoft BASIC:
100 LET F$ = "APPLE1.EX"
110 LET B$ = "APPLE1 BASIC"
120 LET D$ = CHR$ (4)
130 PRINT D$"OPEN"F$
140 PRINT D$"WRITE"F$
150 PRINT "CALL-151"
160 PRINT "C081 C081 E000"
170 PRINT "BLOAD"B$",A$E000"
180 PRINT "C081 C081 E003:";
190 PRINT "EA EA EA EA EA ";
200 PRINT "20 70 80"
210 PRINT "C081 C081 E3D5:";
220 PRINT "EA EA EA EA EA ";
230 PRINT "20 EF FF"
240 PRINT "C081 C081 E870:";
250 PRINT "0 C0"
260 PRINT "BRUN APPLE1"
270 PRINT D$"CLOSE"F$
When I boot up AppleWin, I type
EXEC APPLE1.EXwhich brings me to the Apple-1 monitor, from there I typeE000Rwhich cold starts Apple-1 BASIC. I press CTRL-Q to quit from APPLE-1 for Apple II. Sometimes when I boot up AppleWin, I want to use Apple II Integer BASIC. I wrote a little Applesoft BASIC program to load Integer BASIC into the 16K RAM (language card.)10 A = - 16255
20 M = PEEK (A) + PEEK (A)
30 D$ = CHR$ (4)
40 PRINT D$"BLOAD INTEGER ROM"
50 PRINT D$"INT"RUN INTgets me into Apple II Integer BASIC. From Apple II Integer BASIC, I canEXEC APPLE1.EXto get to the Apple-1 monitor. If I quit with CTRL-Q, and typeCATALOG, after displaying the directory listing, a crash occurs00CC-because the Apple-1 monitor and BASIC are now present in the language card.
Notes about some of the Apple 1 BASIC commands:Notes about Apple II Integer BASIC:
PLOTandHLINare available, noVLIN, but dunno what they do, sometimes crashCOLOR=is valid, but doesn't seem to do anything- no
ASCfunction- no
CHR$function- no
DSPfunctionGOTO Aworks like Integer BASIC
10 A = 40
20 GOTO A
30 PRINT "NOT"
40 END
- only single letter variable names vs two letters in Integer and Applesoft
Apple-1 BASIC and Integer BASIC
- What does
DSPdo?
10 DSP A
20 A = 1 : REM DSP PRINTS LINE NUMBER AND VALUE OF THE VARIABLE A- no
CHR$functionIFstatement work a bit differently than Applesoft BASICIF. Only the first statement within theIF-THENstatement is run. Any statements on the same line always run which is different from Applesoft.Miscellaneous:IFconditionTHENdoThisOnlyIfConditionTrue:alwaysDoThisI posted the Applesoft BASIC program
HELLO WORLD-GRAPHICSon rosettacode.org.The
a little less talkPALEOFERROSAURUS.COMprogram was written by paleoferrosaurus on January 2, 2011 at 11:40.
a little more hack action
Games | Sunday, January 16th, 2011 |
I've been playing some very retro Apple 1 BASIC games.
I found these Apple 1 BASIC Games at brielcomputers.com
- Deal or No Deal
- Hunt The Wumpus
- Hamurabi
- Reverse
- Rock Scissors Paper
- Slots
- Star Trek
V is for Verify | Saturday, January 15th, 2011 |
I wrote a program to read in the Apple 1 BASIC Disassembly and poke the bytes into memory. Of course, the program is written in apple 1 BASIC. I disabled Apple 1 BASIC's ability to stop the program with the keyboard so that my program would run to completion.
![]()
100 DIM H$(16),T$(255):A=8192 110 H$="0123456789ABCDEF" 200 INPUT T$:L=LEN(T$) 210 IF L = 0 THEN 200 215 F = 0 220 FOR I = 1 TO L 230 IF F = 0 THEN IF T$(I,I) = "." THEN F=I 240 NEXT I 245 IF F = 0 THEN 270 250 F = F + 7 : S = 4 260 IF L > F THEN IF T$(F-7,F-3) = ".BYTE" THEN 280 270 F = 7 : S = 3 275 IF L > 14 THEN L = 14 280 GOSUB 300 290 PRINT : GOTO 200 300 PRINT A;"- "; : G = 0 310 FOR I = F TO L STEP S 320 A$ = T$(I,I) 330 IF A$ = " " THEN G = 1 340 IF G THEN 380 350 GOSUB 400 : B = V 360 A$ = T$(I + 1, I + 1): GOSUB 400 370 POKE A, B * 16 + V : A = A + 1 371 PRINT " "; 375 IF T$(I + 3, I + 3) = ";" THEN G = 1 380 NEXT I 390 RETURN 400 V = -1 410 FOR J = 1 TO 16 420 IF A$=H$(J,J) THEN V=J-1 430 NEXT J 440 IF V >= 0 THEN RETURN 500 FOR K=2 TO I:PRINT " ";:NEXT K 510 PRINT "^" 520 PRINT A$ 600 ENDAfter running the program, I quit out of APPLE-1 for Apple II. From the Apple II monitor, you can compare ranges of memory using the V command. Here is what is different between the apple1 BASIC from pagetable.com, and the disassembled apple1 BASIC:
*2000<E000.EFFFV EE53-8A (EA) EE54-A2 (46) EE55-01 (F8) EE56-B4 (60) EE57-CE (20) EE58-94 (34) EE59-4C (EE) EE5A-B4 (C9) EE5B-48 (18) EE5C-94 (B0) EE5D-CA (0A) EE5E-CA (85) EE5F-F0 (25) EE60-F5 (60) EE61-AA (EA) EE62-60 (EA) EEA6-A5 (20) EEA7-4C (34) EEA8-D0 (EE) EEA9-02 (C5) EEAA-C6 (C8) EEAB-4D (90) EEAC-C6 (BB) EEAD-4C (85) EEAF-48 (4D) EEB0-D0 (48) EEB1-02 (A5) EEB2-C6 (4C) EEB3-49 (20) EEB4-C6 (08) EEB5-48 (E7) EEB6-A0 (68) EEB7-00 (95) EEB8-B1 (A0) EEB9-4C (60) EEBA-91 (A5) EEBB-48 (4B) EEBC-A5 (48) EEBD-CA (A5) EEBE-C5 (4A) EEC0-A5 (B3) EEC1-CB (EF) EEC2-E5 (A5) EEC3-4D (85) EEC4-90 (2D) EEC5-E0 (60) EEC6-4C (20) EEC7-53 (34) EF86-4C (4A) EF8A-4D (4B) EF8C-1F (1E) EF8E-48 (4C) EF92-49 (4D) EF94-B6 (AD) EF95-EE (E5) EF9C-CA (4C) EFA0-CB (4D) EFA2-09 (08) EFA9-4C (90) EFAA-B7 (E8) EFAB-E5 (4C) EFAC-4C (CB) EFAD-CB (EE) EFAE-EE (A5) EFAF-EA (4D) EFB0-EA (48) EFB1-EA (A5) EFB2-EA (4C)I've since found another disassembly of Apple 1 BASIC: AP1BASIC.txt
Getting busy | Sunday, January 9th, 2011 |
My intention is to look into Integer BASIC, and more specifically Apple 1 BASIC. This evening I got Apple-1 Basic running.
![]()
Some patches are required to make Apple 1 programs run using my APPLE-1 for Apple II program. It needs patches because it's not running on an Apple 1, it's running on an Apple II.
Patches:
E003:EA EA EA EA EA 20 70 80
E3D5:EA EA EA EA EA 20 EF FF
E870:00 C0
Links:
FLYNN’S | Choose Day, Jam You Wary Forth, To Wendy Al Evan |
This post intentionally obscure.
![]()
|
| RetroChallenge 2010! |
| RetroChallenge Winter Warm-up 2008 |
| 2007 Old Computer Challenge |