Apple II Weather Display (part 3)

Diablo

New member
apple21.jpg


In parts 1 and 2, I discussed the important parts of what is going on the PC side with lua. While not 110% detailed I hope it gave you an idea on how the data is processed so the Apple II computer could quickly digest it. Now its time to see what happens at the other end of the serial cable. I am using basic, but its not 100% off the rom Applesoft basic, that would be even slower, so I am using a compiler and a fast graphics driver. Both are from “The Beagle Compiler” which was produced by the ever awesome Beagle Bro’s software company, and though still under copyright, the publishers have given permission for use of their software (within reason I don’t think you will get very far selling it).



Beagle Compiler does not crunch down to machine code like others, so it has a bit of overhead, but I choose it because it has some interesting add-ons like fast hplot (quick drawing), input anything (by default basic will only accept alphanumeric input), and memory drivers for 128K or more machines, all I thought I might need. The final version does not need extra input because all data being sent to the computer is alphanumeric, but I did use fast hplot, which doubles the speed that the computer can draw individual pixels, and one of the memory managers.

On the disk there are 2 COM programs, which are compiled basic scripts, one is STARTUP the other is CLIENT.* STARTUP is the first program prodos run when you start a disk and it just does some basic startup tasks.

REM LOAD THE FAST GRAPHICS ROUTINE 11 PRINT CHR$(4)"BLOAD FAST.HPLOT" REM YAP 12 HOME:VTAB 3 13 PRINT " Please type in IN#n (where n = the ssc" 14 PRINT " slot number, then hold control hit A, " 15 PRINT " and type in 7B (600 baud) at the SSC" 16 PRINT " or ? prompt." :PRINT "" 17 PRINT " (you may or may not need to press" 18 PRINT " return depending on model)":PRINT "" 19 PRINT " Then type the following to run ":PRINT "" 20 PRINT " -CLIENT" As you can see it loads the FAST.HPLOT program, its a binary program so I BLOAD it (binary load), in order to do that we have to PRINT a (ctrl +D) to tell the interpreter that this is* a dos command, then the command we want.

Line 12 clears the Apples current text screen and puts the prompt at the top of the screen, VTAB 3 just bumps the cursor down 3 lines.

Then we have some instructions, this could / should be able to be done automatically, and I remember doing it as a kid with my apple IIe, but no matter what I tried on my current //c I could not get the darn serial port set up via script. I figured if I did ever get it to work, it would be so funky that no other Apple’s would automatically set the serial port, so you have to do it manually.

Next, and more importantly is the CLIENT program

REM STARTUP 0-6 REM ENTER HIGH RES PAGE ONE AND TURN OFF THE 4 LINE TEXT DISPLAY REM PAGE 2, NORMALLY FULL SCREEN, IS OCCUPIED AND I DONT FEEL REM LIKE MESSING WITH MOVING STUFF AROUND IN MEMORY 0 HGR:POKE -16302,0 REM LOAD SPLASH SCREEN BINARY INTO HIGH RES PAGE 1 MEMORY 2 PRINT CHR$(4)"BLOAD SPLASH.HGR,A$2000" REM DELAY 4 FOR I = 0 TO 30000 6 NEXT REM MAKE A PALETTE 10-12 10 DIM CL(5): CL(1) = 0:CL(2) = 5 12 CL(3) = 2:CL(4) = 1:CL(5) = 6 REM CLEAR HIGH RES GRAPHICS PAGE 1 100-105 100 HGR:POKE -16302,0:HCOLOR = 7 102 FOR Y = 0 TO 138 STEP 2 104 HPLOT 0,Y TO 140,Y 105 NEXT REM TEMP AND ALERT TEXT GRAPHICS INPUT DECODING 110-125 110 FOR Y = 0 TO 137 112 TB = 140:INPUT TS$ 114 FOR X = 1 TO LEN(TS$) REM CHARACTER --> ASCII VALUE 116 TC$ = MID$(TS$,X,1):TA = ASC(TC$) REM IF NEW CODE BLOCK 118 IF TC$ = "b" THEN TB = TB + 35 REM DRAW PIXEL 120 IF (TA < 65) AND (TA >= 49) THEN HPLOT((TA - 48) + TB), Y 122 IF (TA >= 65) AND (TA ASCII VALUE 136 BC$ = MID$(BS$,X,1):BA = ASC(BC$) REM IF NEW CODE BLOCK 138 IF BC$ = "b" THEN BB = BB + 35 REM DRAW PIXEL 140 IF (BA < 65) AND (BA >= 49) THEN HPLOT((BA - 48) + BB), Y 142 IF (BA >= 65) AND (BA ASCII VALUE 158 RC$ = MID$(RS$,X,1):RA = ASC(RC$) REM IF NEW CODE BLOCK 160 IF RC$ = "b" THEN RB = RB + 35 REM DRAW PIXEL 162 IF (RA < 65) AND (RA >= 49) THEN HPLOT((RA - 48) + RB), Y 164 IF (RA >= 65) AND (RA
 
Back
Top