RETROCHALLENGE 2015 – POST #5 – ATARI AMATEUR RADIO FIELD DAY LOGGING PROGRAM

I feel like I’m swimming with a heavy bag of poorly coded bits across the finish line.  Did I jump into the pool without knowing how deep the water is?  Probably, but it’s too late now.  I did manage to get most of my goals working!  But I suspect that feature creep happens to most people who try to make anything.  Wouldn’t this be neat?  If it does that then it should do this other thing over here, too.  Hey, maybe with just a few more lines it could REALLY be cool!

(Big sigh and let out a deep breath)………………………………………………..

This challenge has been great fun with all the frustration that real software developers must face every day.  (It makes me feel better to think that’s true.)

Here’s a poor video.  (My first video ever uploaded.  It’s poor in quality and I’ll get a better one up later this weekend.)

Code is below the video….


5 REM CONTEST LOG-CHARLES MOORE N5ATD FROM 73 MAGAZINE APRIL 1984 – SEARCH ARCHIVE.ORG
7 REM FD MODS BY RICHARD GORDON KD0RG TO ADD BAND AND MODE FEATURES
10 DIM URC$(10),CALL$(14255),C$(10),QSO$(20),HOLD$(10),CLASS$(3),SECTION$(3),FILE$(11),D$(14)
12 DIM BND$(3),CBM$(14), BAND$(3),MODE$(1),TEST$(20)
15 GOTO 880
19 GRAPHICS 2
20 GOSUB 520:GOOD=0
30 FOR Z=1 TO 40:CALL$(Z,Z)=” “:NEXT Z
31 BAND$(1,3)=” 20″:BND$(1,3)=”20″:MODE$=”P”

35 TRAP 65:CLOSE #1
36 SETCOLOR 0,8,7:SETCOLOR 1,1,14:SETCOLOR 2,12,6
40 POSITION 1,2:? #6;” input callsign: “;
45 POSITION 1,4:? #6;”*****************”;
50 POSITION 1,5:? #6;”* *”;
55 POSITION 1,6:? #6;”* *”;
60 POSITION 1,7:? #6;”*****************”;
62 POSITION 2,8:? #6;”band=”;BAND$;” mode=”;MODE$
65 POSITION 0,0:? #6;”WORKED=”;GOOD
70 ? ” “;

75 IF GOOD=0 THEN CALL$=””:C$=””
80 IF GOOD=750 THEN 330

85 ? “Enter CALLSIGN (up to 10 characters)”:?:?” or QSY QSOS MENU PRINTER”
90 INPUT C$:IF LEN(C$)=0 THEN 70

95 HOLD$=” ”
100 HOLD$(1,LEN(C$))=C$(1,LEN(C$))
105 POSITION 3,5:? #6;” “;
110 POSITION 3,6:? #6;” “;
115 ? ” “;
120 POSITION 3,5
125 ? #6;C$;

129 IF C$=”QSY” THEN 650
130 IF C$=”QSOS” THEN 415
132 IF C$=”SEC” THEN 600
135 IF C$=”MENU” THEN 330
140 IF C$=”PRINTER” THEN 490
141 IF C$=”BONUS1″ THEN GOTO 1100
142 IF C$=”BONUS2″ THEN GOTO 1200
143 IF C$=”BONUS3″ THEN GOTO 1300
144 REM IF C$=”INTRO” THEN GOTO 1000

149 IF GOOD=0 THEN GOSUB 280:GOTO 40
150 GOSUB 155

151 IF GOOD=BONUS THEN 1100
152 IF GOOD=BONUS*2 THEN 1200
153 IF GOOD=BONUS*3 THEN 1300
154 GOTO 40

155 CBM$(1,LEN(BND$))=BND$(1,LEN(BND$)):CBM$(LEN(BND$)+1)=MODE$:CBM$(LEN(BND$)+2,LEN(BND$)+2+LEN(C$))=C$(1,LEN(C$))
158 CBM$(LEN(BND$)+LEN(C$)+2)=” ”
160 LY=LEN(CALL$):LX=LEN(CBM$):POKE 207,LX-1
165 B=LY-LX-1+3
170 A=USR(1664,ADR(CALL$(1)),ADR(CBM$),B)
175 IF A=0 THEN 190
180 POSITION 6,6:? #6;”dupe!”;:S=240:W=4:GOSUB 700:GOTO 65
185 IF HOLD$(1,10)=CALL$(LEN(CALL$)-15,LEN(CALL$)-6) THEN 180
190 COLOR 3:POSITION 6,6:? #6;”good!!”;
195 S=50:W=2:GOSUB 700

200 POSITION 1,2:? #6;” continue? “;:? ” “:? ” “:? ” CONTINUE QSO? (ENTER / N)”;:OPEN #1,4,0,”K:”
205 GET #1,T:CLOSE #1:? ” “:IF T=155 THEN 220
210 IF CHR$(T)=”N” THEN 278
215 GOTO 200

220 CS=20*GOOD+1
225 CALL$(CS,CS+19)=” ”
230 GOSUB 800

265 POSITION 1,2:? #6;”press enter to log”;:? “PRESS ENTER TO LOG QSO, A TO ABORT”:OPEN #1,4,0,”K:”
267 GET #1,Q:CLOSE #1:? ” “:IF Q=155 THEN 276
268 IF Q=65 OR 97 THEN 278
270 GOTO 265

276 CALL$(CS,CS+19)=QSO$(1,20)
277 GOOD=GOOD+1:S=50:W=2:GOSUB 700:GOTO 279
278 S=240:W=2:GOSUB 700
279 RETURN

280 POSITION 1,2:? #6;” continue? “;:?:? ” CONTINUE QSO? (ENTER / N)”;:?:OPEN #1,4,0,”K:”
300 GET #1,T:CLOSE #1:? ” “:IF T=155 THEN 315
305 IF CHR$(T)=”N” THEN 328
310 GOTO 200
315 GOSUB 800

320 POSITION 1,2:? #6;” enter to log “;:? “PRESS ENTER TO LOG QSO, A TO ABORT”:OPEN #1,4,0,”K:”
321 GET #1,T:CLOSE #1:IF T=155 THEN 326
322 IF T=65 OR 97 THEN 328
325 GOTO 320

326 CALL$(1,20)=QSO$(1,20)
327 S=50:W=2:GOOD=GOOD+1:GOSUB 700:GOTO 329
328 S=240:W=2:GOSUB 700
329 RETURN

330 GRAPHICS 0:CLOSE #1:TRAP 330
335 GOTO 355

340 ? “INPUT FILE NAME ex: ‘BAND10′”:?
343 FILE$=” ”
346 INPUT FILE$:IF LEN(FILE$)=0 THEN 340
350 RETURN

355 D$=” ”
360 OPEN #1,4,0,”K:”
365 ? ” DISK, CASS, OR H1 ?”:GET #1,Z
370 IF Z=68 THEN D$(1,2)=”D:”:GOSUB 340:GOTO 585
375 IF Z=72 THEN D$(1,3)=”H1:”:GOSUB 340:GOTO 586
376 IF Z=67 THEN D$(1,2)=”C:”:GOTO 385
380 GOTO 330

385 ? ” “:? ” SAVE LOAD QUIT”:GET #1,Z
390 IF Z=81 THEN GRAPHICS 2:GOTO 35
400 IF Z=83 THEN CLOSE #1:GOSUB 510:OPEN #1,8,0,D$:GOTO 450
405 IF Z=76 THEN CLOSE #1:GOSUB 510:OPEN #1,4,0,D$:GOTO 475
410 GOTO 330

415 IF GOOD=0 THEN GRAPHICS 2:GOTO 35
420 GRAPHICS 0
421 ? “# BND MD CALL CLS SEC”
425 FOR Z=0 TO GOOD-1:CS=(20*Z)+1
430 QSO$=CALL$(CS,CS+19)
435 POSITION 2,Z+1
436 ? Z+1;” “;QSO$(1,3);” “;QSO$(4,4);” “;QSO$(5,14);” “;QSO$(15,17);” “;QSO$(18,20)
437 NEXT Z
445 FOR Z=1 TO 100*(GOOD+3):NEXT Z:GRAPHICS 2:GOTO 35

450 IF GOOD=0 THEN ? “NOTHING TO SAVE”:FOR Z=1 TO 700:NEXT Z:GOTO 35
455 PRINT #1,GOOD
460 FOR Z=0 TO GOOD-1:CS=20*Z+1
465 TEST$=CALL$(CS,CS+19):? #1;TEST$:NEXT Z
470 TEST$=CALL$(LEN(CALL$)-19,LEN(CALL$)):? #1;TEST$:CLOSE #1:RUN

475 GOOD=0:INPUT #1,GOOD:FOR Z=0 TO GOOD:CS=20*Z+1
480 INPUT #1,TEST$:CALL$(CS,CS+19)=TEST$(1,20)
485 NEXT Z:GRAPHICS 2:GOTO 35

490 OPEN #1,8,0,”P:”:FOR Z=0 TO GOOD-1:CS=20*Z+1
495 TEST$=CALL$(CS,CS+19):? #1;TEST$:NEXT Z
500 ? #1;CALL$(LEN(CALL$)-19,LEN(CALL$))
505 CLOSE #1:GRAPHICS 2:GOTO 35

510 ? ” “:? “PREPARE DISK/CASSETTE”:? 😕 “PRESS RETURN”
515 INPUT TEST$:RETURN

520 FOR I=1664 TO 1755:READ A:POKE I,A:NEXT I:RETURN
525 DATA 104,104,133,204,104,133,203,104,133
530 DATA 206,104,133,205,104,141,222,6,104
535 DATA 141,221,6,169,1,133,212,169,0,133
540 DATA 213,160,255,200,177,203,209,205
545 DATA 240,40,24,165,203,105,1,133,203
550 DATA 165,204,105,0,133,204,24,165,212
555 DATA 105,1,133,212,165,213,105,0,133
560 DATA 213,205,222,6,208,216,165,212,205
565 DATA 221,6,208,209,240,7,152,197,207,208
570 DATA 204,240,6,169,0,133,212,133,213,96

585 D$(3,LEN(FILE$)+2)=FILE$(1,LEN(FILE$)):GOTO 385
586 D$(4,LEN(FILE$)+3)=FILE$(1,LEN(FILE$)):GOTO 385

600 GRAPHICS 0
605 ? “THE FOLLOWING SECTIONS ARE NEEDED”
610 ? ” ”
615 ? “THIS FUNCTION IS NOT AVAILABLE”
620 FOR Z=0 TO 200:NEXT Z
625 S=75:W=1:GOSUB 700
645 GRAPHICS 2:GOTO 35

650 ? ” “:? “INPUT BAND 2,6,10,15,20,40,80,or 160″:? ” ”
655 INPUT BND$
660 IF LEN(BND$)=0 THEN ? “HMMM, NOT SURE WHAT HAPPENED. TRY AGAIN.”:GOTO 650
665 IF LEN(BND$)=1 THEN BAND$(1,2)=” ”
670 IF LEN(BND$)=2 THEN BAND$(1,1)=” ”
675 BAND$(4-LEN(BND$),3)=BND$(1,LEN(BND$))
680 ? “INPUT MODE:”:?”C FOR CW P FOR PHONE D FOR DIGITAL”
685 INPUT MODE$
690 IF LEN(MODE$)<>1 THEN 680
695 GOTO 35

700 FOR X=1 TO W:FOR Z=1 TO 20:SOUND 0,S,10,2:NEXT Z:FOR Y=1 TO 5:SOUND 0,0,0,0:NEXT Y:NEXT X
710 RETURN

800 QSO$(1,20)=” ”
805 QSO$(1,3)=BAND$(1,3)
810 QSO$(4,4)=MODE$
815 QSO$(5,14)=HOLD$(1,10)
820 CLASS$(1,3)=” ”
823 POSITION 1,6:? #6;”* *”;
825 POSITION 1,2:? #6;” enter class for “;
826 ?:? “ENTER CLASS”;:?:INPUT CLASS$
830 IF LEN(CLASS$)=0 THEN 825
831 POSITION 5,6:? #6;CLASS$;
835 QSO$(18-LEN(CLASS$),17)=CLASS$(1,LEN(CLASS$))
840 SECTION$(1,3)=” ”
844 POSITION 1,2:? #6;”enter section for “;
845 ?:? “ENTER SECTION”;:?:INPUT SECTION$
850 IF LEN(SECTION$)=0 THEN 845
851 POSITION 11,6:? #6;SECTION$;
855 QSO$(21-LEN(SECTION$),20)=SECTION$(1,LEN(SECTION$))
860 ? ” “:? QSO$(1,3);” “;QSO$(4,4);” “;QSO$(5,14);” “;QSO$(15,17);” “;QSO$(18,20):? ” ”
865 RETURN

880 ? ” “:? “THIS IS THE ATARI FIELD DAY LOGGER”:?
883 ? “PLEASE ENTER YOUR CALLSIGN”:?
884 URC$=” ”
885 INPUT URC$:IF LEN(URC$)=0 THEN 880
886 ?:? “CORRECT? PRESS Y OR N”:OPEN #1,4,0,”K:”
890 GET #1,Q:CLOSE #1:? ” “:IF CHR$(Q)=”Y” THEN 893
891 IF CHR$(Q)=”N” THEN 883
892 GOTO 886
893 ?:? “A BONUS SCREEN WILL DISPLAY”:? ” AFTER A CERTAIN # OF QSOS.”:?
894 ? “HOW MANY CONTACTS FOR YOUR”:? ” 1ST BONUS GRAPHIC?”:?
896 INPUT BONUS
898 GOTO 19

1100 GRAPHICS 23
1105 SETCOLOR 4,8,2:SETCOLOR 2,0,11:SETCOLOR 1,15,13:SETCOLOR 0,12,9
1110 COLOR 2
1115 PLOT 120,55:DRAWTO 130,75:DRAWTO 125,75
1120 POKE 765,2:POSITION 120,60:XIO 18,#6,0,0,”S:”:PLOT 120,60
1125 POKE 765,3:POSITION 115,75:XIO 18,#6,0,0,”S:”:PLOT 115,75
1130 DRAWTO 110,75
1135 POKE 765,2:POSITION 119,56:XIO 18,#6,0,0,”S:”
1140 COLOR 1:PLOT 159,76:DRAWTO 131,76
1145 POKE 765,1:POSITION 126,65:XIO 18,#6,0,0,”S:”
1150 PLOT 114,65:DRAWTO 65,65:DRAWTO 40,50:PLOT 159,95:DRAWTO 0,95
1155 POKE 765,1:POSITION 0,65:XIO 18,#6,0,0,”S:”:PLOT 0,65
1160 POKE 765,1:POSITION 39,50:XIO 18,#6,0,0,”S:”
1165 COLOR 2:PLOT 80,70:DRAWTO 80,20:DRAWTO 81,20:DRAWTO 81,70
1170 COLOR 3:PLOT 1,60:DRAWTO 80,19:DRAWTO 81,19:DRAWTO 159,60
1175 FOR Z=1 TO 100:NEXT Z:GOSUB 1600
1180 FOR Z=1 TO 100:NEXT Z:GOSUB 1550
1185 GRAPHICS 2:GOTO 35

1200 GRAPHICS 23
1205 SETCOLOR 4,8,2:SETCOLOR 2,0,11:SETCOLOR 1,15,13:SETCOLOR 0,12,9
1210 COLOR 2
1215 PLOT 125,35:DRAWTO 150,55:DRAWTO 150,75:DRAWTO 138,75
1220 POKE 765,2:POSITION 135,60:XIO 18,#6,0,0,”S:”:PLOT 135,60
1225 POKE 765,2:POSITION 125,48:XIO 18,#6,0,0,”S:”:PLOT 125,48
1230 POKE 765,3:POSITION 115,60:XIO 18,#6,0,0,”S:”:PLOT 115,60
1235 POKE 765,3:POSITION 112,75:XIO 18,#6,0,0,”S:”:PLOT 112,75
1240 DRAWTO 100,75
1245 POKE 765,2:POSITION 100,55:XIO 18,#6,0,0,”S:”:PLOT 100,55
1250 POKE 765,2:POSITION 124,36:XIO 18,#6,0,0,”S:”
1255 COLOR 1:PLOT 151,95
1260 POKE 765,1:POSITION 151,65:XIO 18,#6,0,0,”S:”:PLOT 20,55
1265 DRAWTO 65,65:PLOT 159,95:DRAWTO 0,95
1270 POKE 765,1:POSITION 0,65:XIO 18,#6,0,0,”S:”:PLOT 0,65
1275 POKE 765,1:POSITION 20,55:XIO 18,#6,0,0,”S:”
1280 COLOR 2:PLOT 75,70:DRAWTO 78,5:DRAWTO 81,70
1285 COLOR 3:PLOT 1,35:DRAWTO 78,5:DRAWTO 159,35
1290 FOR Z=1 TO 100:NEXT Z:GOSUB 1600
1295 FOR Z=1 TO 100:NEXT Z:GOSUB 1550
1296 GRAPHICS 2:GOTO 35

1300 GRAPHICS 23
1306 SETCOLOR 4,8,2:SETCOLOR 2,0,11:SETCOLOR 1,15,13:SETCOLOR 0,12,9
1310 COLOR 1:PLOT 140,10:DRAWTO 150,40:DRAWTO 130,40:POKE 765,1:POSITION 139,11:XIO 18,#6,0,0,”S:”
1313 COLOR 3:PLOT 95,45:DRAWTO 105,55:DRAWTO 95,55:POKE 765,3:POSITION 95,46:XIO 18,#6,0,0,”S:”
1316 PLOT 85,52:DRAWTO 85,57:DRAWTO 80,57:POKE 765,3:POSITION 80,52:XIO 18,#6,0,0,”S:”
1320 PLOT 70,45:DRAWTO 70,55:DRAWTO 55,55:POKE 765,3:POSITION 55,45:XIO 18,#6,0,0,”S:”
1323 COLOR 2:PLOT 143,41:DRAWTO 143,50:DRAWTO 137,50:POKE 765,2:POSITION 137,41:XIO 18,#6,0,0,”S:”
1326 PLOT 106,55:DRAWTO 94,43:DRAWTO 95,43:DRAWTO 106,54:DRAWTO 106,68:DRAWTO 50,68
1330 POKE 765,2:POSITION 50,46:XIO 18,#6,0,0,”S:”:PLOT 50,46
1333 POKE 765,2:POSITION 53,43:XIO 18,#6,0,0,”S:”:PLOT 71,56
1336 POKE 765,2:POSITION 71,45:XIO 18,#6,0,0,”S:”:PLOT 86,58
1340 POKE 765,2:POSITION 86,52:XIO 18,#6,0,0,”S:”
1343 COLOR 1:PLOT 0,95:DRAWTO 159,95:PLOT 29,40:DRAWTO 49,50:PLOT 144,95
1346 POKE 765,1:POSITION 144,46:XIO 18,#6,0,0,”S:”:PLOT 0,46
1350 POKE 765,1:POSITION 29,41:XIO 18,#6,0,0,”S:”:PLOT 86,29:DRAWTO 112,42:DRAWTO 136,46
1353 PLOT 64,42:POKE 765,1:POSITION 85,30:XIO 18,#6,0,0,”S:”:PLOT 107,69
1356 POKE 765,1:POSITION 107,54:XIO 18,#6,0,0,”S:”:PLOT 107,54
1360 POKE 765,1:POSITION 95,42:XIO 18,#6,0,0,”S:”:DRAWTO 63,42
1363 COLOR 0:PLOT 88,68:DRAWTO 88,50:DRAWTO 77,50:DRAWTO 77,68:PLOT 79,60:PLOT 79,59
1366 FOR CR=1 TO 4:PLOT 65-CR,73-CR:DRAWTO 65+CR,73-CR:PLOT 95-CR,73-CR:DRAWTO 95+CR,73-CR:NEXT CR
1370 COLOR 2:PLOT 40,75:DRAWTO 40,15:DRAWTO 41,15:DRAWTO 41,75:PLOT 38,13:DRAWTO 42,17
1373 COLOR 3:PLOT 15,13:DRAWTO 61,13:PLOT 17,15:DRAWTO 63,15:PLOT 19,17:DRAWTO 39,17:PLOT 42,17:DRAWTO 65,17
1376 FOR Z=1 TO 100:NEXT Z:GOSUB 1600
1380 FOR Z=1 TO 100:NEXT Z:GOSUB 1550
1385 GRAPHICS 2:GOTO 35

1550 GRAPHICS 18:SETCOLOR 0,12,11:SETCOLOR 1,3,11:SETCOLOR 2,6,11:SETCOLOR 3,9,9
1555 ? #6;” ******************”:? #6;” * atari *”:? #6;” * field day *”
1560 ? #6;” * logger *”:? #6;” ******************”
1565 POSITION 3,6:? #6;URC$;”, you have”
1570 ? #6;” “;:? #6;GOOD;:? #6;” contacts ”
1571 ? #6;” “:? #6;” CQ FIELD DAY! ”
1575 FOR X=1 TO 4:SETCOLOR 0,3,11:SETCOLOR 1,6,9:SETCOLOR 2,9,11:SETCOLOR 3,12,8
1580 FOR Z=1 TO 50:NEXT Z:SETCOLOR 0,12,11:SETCOLOR 1,3,11
1585 FOR Z=1 TO 50:NEXT Z:NEXT X:RETURN

1600 FOR X= 1 TO 2
1605 GOSUB 1650:GOSUB 1660:GOSUB 1650:GOSUB 1660:GOSUB 1670
1610 GOSUB 1650:GOSUB 1650:GOSUB 1660:GOSUB 1650:GOSUB 1670
1615 GOSUB 1660:GOSUB 1660:GOSUB 1650:GOSUB 1660:GOSUB 1670
1620 GOSUB 1650:GOSUB 1660:GOSUB 1660:GOSUB 1670
1625 NEXT X
1630 RETURN

1650 S=52:V=15 :GOSUB 1700:REM DAH
1655 RETURN
1660 S=52:V=5 :GOSUB 1700:REM DIT
1665 RETURN
1670 S=0:V=10 :GOSUB 1700:REM WORD SPACE
1675 RETURN

1700 SETCOLOR 2,0,15
1710 FOR Z=1 TO V:SOUND 0,S,10,1:NEXT Z
1720 SETCOLOR 2,0,11
1730 FOR Y=1 TO 10:SOUND 0,0,0,0:NEXT Y
1740 RETURN

RETROCHALLENGE 2015 – POST #5 – ATARI AMATEUR RADIO FIELD DAY LOGGING PROGRAM

RETROCHALLENGE 2015 – POST #4 – GRAPHICS

Wow.  Who knew that drawing with the 8-bits could be so fun?  Here’s some more animated gifs of what I’ve got…

A little tent and a dipole for 25 contacts.
A little tent and a dipole for 25 contacts.

Who wouldn’t be encouraged to get more contacts after seeing all this excitement on their logging program.  Do you know of any other logger that actually drives you to reach new heights, push your limits, and make you a better person?  I didn’t think so.    Check out what the tired operator will see at 100 QSOs.  It’s like instant energy right before your eyes……..

A bigger tent and dipole for 100 contacts.
A bigger tent and dipole for 100 contacts.

I would like to get a third and more original splash screen for 200 contacts.  Maybe an RV with a beam.  I might also have the user set their own goals for the screens.  Yay, more variables.  I haven’t checked to see if all this will fit into 48k.  I sure hope so but the graphics are currently separate programs that I was going to add later to the logging program.

One little neat thing that I figured out was how to actually save a file from the emulator direct to the hard drive.  I know, pretty basic stuff but a big step for me as it allows me to put inverse characters into the code.  I was saving and editing the code on a modern machine as a plain text file.  This worked fine but I couldn’t figure out how to get those inverse characters working.  If anyone knows I would be very grateful but it is also kind of cool to make changes in the emulator and save it.  It might actually get me to setup the real hardware and work on that.  It would certainly be more retroish of me.

I’ll leave you all with a beam that I’m not too happy with but it works.  Code will be at the bottom.

A small tri-band beam is perfect for field day.
A small tri-band beam is perfect for field day.

Code is below….73 Rich KD0RG

Continue reading “RETROCHALLENGE 2015 – POST #4 – GRAPHICS”

RETROCHALLENGE 2015 – POST #4 – GRAPHICS

RETROCHALLENGE – POST #3 – SOME WORKING CODE FOR FDCONLOG.BAS

I have quite a bit of the Atari Field Day logger working on an emulator.  There is functionality for changing band and mode, for inputting section and class, and enhancements for displaying the log entries on the screen.  The code is at the bottom of the page…..

Here is what the original program looks like.

conlogHere is what I have so far.

fdconlog

I have had to renumber everything a couple of times now and that can be frustrating.  Having an old copy of the code open alongside of the copy that the changes were being made to helped but I still got confused as to what was GOTOing where.  Subroutines can help out quite a bit in this area.  I don’t have a feel yet for numbering them (like where to start 1000, 1500, 10000?) but I realize how much time they can save you.  I suspect it is bad practice to only use a subroutine once, but if it means you don’t have to renumber everything then I don’t care.  I made a subroutine for getting the section and class from the user.  It starts at line 800.

Another subroutine is at 700.  I call it my sounder.  2 variables ( S and W ) are set depending on what sounds I want.  Here’s line 180:

180 POSITION 6,6:? #6;”dupe!”;:S=240:W=4:GOSUB 700:GOTO 65

This line displays that the callsign entered by the user is a duplicate contact and then plays a few sounds.  The S value of 240 defines a low tone and the W value of 4 replays the tone 4 times in  the subroutine at line 700.

There are a few things that I would like to add to the program.   A worked section list or sections needed would be nice.  It would also be good to populate the section and class of previously worked stations ( on another band or mode).  As it stands now, a station could be logged on one band as a 2A CO and on another as a 2E CA.  It would be nice to have that information but I’m not sure how to do it quickly.

Next up is GRAPHICS.  I want to add an intro screen and perhaps some eye candy that would pop-up for a certain #s of QSOs made.  I’m thinking a pup-tent graphic for 25 contacts, a little bigger setup for 100, and something else for around 200 stations worked.  I could even make it user changeable so the operators could set a goal for their own Field Day weekend.

Halfway through the month and it’s getting there.

73, Rich KD0RG

Continue reading “RETROCHALLENGE – POST #3 – SOME WORKING CODE FOR FDCONLOG.BAS”

RETROCHALLENGE – POST #3 – SOME WORKING CODE FOR FDCONLOG.BAS

Retrochallenge 2015 – post #2 – Working out some new variables.

The first thing I need to do is to figure out what is going on and what all these variables are.  CALL$ is the logbook that keeps track of the contacts that have been made.  I tried changing it to something more intuitive like LOG$ for logbook, but I quickly found out that LOG is an Atari Basic function and I got an error.  By the way, all those online manuals are really helpful.  There are a couple that I GOTO on a regular basis.  I was lucky to get the Atari Basic Reference Manual with the computer that I bought and it has proven to be very valuable.  I also have been using Atari Basic Quick Reference Guide by Gilbert Held, Atari Basic Tutorial by Robert A. Peck, and Understanding Atari Graphics by Michael Boom.  They are all available at archive.org as well as some other places.

Tri-band Beam
This will be my inspiration for some graphics as soon as I get the logging working.

Back to the variables….

25 DIM CALL$(9010),C$(12),TEST$(12),HOLD$(12),FILE$(14),D$(14)

CALL$ is the logbook and holds 751 callsigns.

C$ is the current callsign that gets entered by the user.

TEST$ is used for saving, loading, and displaying the log (CALL$).

HOLD$ is used when comparing the current callsign to those already in the log.

FILE$ is the user named file to be saved to or to load from.

D$ is also used for loading and saving.  It gets set to D: for disk or C: for tape.  I think the length of D$ should be 16 or FILE$ should be 12 because in line 510, the filename gets added to D$ and it could end up being to big.  (Or maybe it just gets ignored.  I don’t know.)

GOOD$ is the total # of contacts made so far.

CS$ is the location in CALL$ where a new entry will start from. For my purposes, the callsign needs to only be 10 characters long.  That would be enough for a 2×3 callsign ( like my old one, kd0bjt ) operating in Puerto Rico which would make the entry kd0bjt/kp3 .  This kind of thing rarely happens and if for some reason a particular contact needs more space I would just make a note of it and deal with it later.  Most callsigns are between 4 and 6 characters long.

So I have the callsign down to 10.  What next?  During Field Day, you are allowed to work a particular station more than once if the contact is made on a different mode or on a different band.  I am going to add this info to the callsign so that contacts on different bands or modes are not seen as duplicate contacts.  I’m adding a variable MODE$ that will be 1 character long.  It will be entered by the user as C for cw ( morse code ), P for phone ( voice ), or D for digital contacts.  I might need to add an S option for the satellites.  I’ll check the rules and see what it says about that.  The BAND$ variable will have to be 3 characters.  The choices will be 2, 6, 10, 15, 20, 40, 80, or 160.  There could be more but I won’t work any other bands and frankly I’ve never made a 2 meter contact on Field Day but someday I might.

Sidenote…. The numbers above each correspond to a band of radio frequencies.  The amateur radio 2 meter band is between 144 and 148 MHz.  The 6 meter band is between 50 and 54 mHz.  We call it the 2 meter band because the actual wavelength of 146 MHz is around 2 meters in size.  For perspective, FM radio in the US is around 100 MHz or about 3 meters.  The larger numbers are in the High Frequency band.  The most popular band on Field Day is 20 meters ( 14.000 – 14.350 MHz ).  Back to the programming…..

Now the callsing entry needs to be 14 characters long.  But what about Section and Class?  You quessed it, two new variables SEC$ and CLASS$.  Each need to be 3 characters.  Many sections are 2 characters ( like CO for Colorado ) but some are 3 ( like WCF West Central Florida ).  The complete list is here.  Class is usually only 2 characters ( like 2A which is 2 radios operating on emergency power at someplace other than a radio amateur’s house) but occasionally will be 3. Now the entry is up to 20.  But I don’t need to compare Section and Class when comparing callsigns to check for duplicates.  I only need to check the callsign, band, and mode.  I’m going to leave C$ at 10 for the user entered callsign.  I will create a CBM$ variable that will add band and mode info to the callsign for the comparison routine.  If everything checks out and the contact is not a duplicate, the class and section will get entered by the user and all five pieces of data will be added to another new variable QSO$ ( I like variables ).

Here’s how QSO$ will look like if I make a contact with kd0faa/kp3 on 160 meters using morse code. 160CKD0FAA/KP3 2A PR The spaces are due to Puerto Rico and the class of 2A having each only 2 characters. Here is another example.  w0ca on 6 meters voice. 6PW0CA       2E CO I’ll have some code next time.  73 ( Best Regards in ham talk ) Rich kd0rg

Retrochallenge 2015 – post #2 – Working out some new variables.

Retrochallenge 2015

I’m new to the 8-bit scene and caught the bug from all the great retro computer podcasts that are out there.  I started checking Craigslist for a machine and spotted a complete Commodore 64 setup with printer, drives, tape recorder, and monitor for $75!  Alas, the machine was about an hour from where I live and I wasn’t able to get it before the deal slipped away.  I believe it was fate.  Soon after an Atari 800 system was advertised.  55$ for the computer, a 410 tape drive, an 810 disk drive, a 1050 drive, and it belonged to a fellow amateur radio operator.  It came with a few carts (Basic included) and loads of disks as well.  I purchased it, took it home, and wondered what I could do with it…….

I started to look around for some programs for amateur radio.  An article for a contest logger in the April 1984 edition of 73 magazine was soon found.  Here is the link:

https://archive.org/details/73-magazine-1984-04

conlog

The type-in program (see below for complete program) and article is on page 62 and works fine but it is lacking in some details.  After typing it in and running it (on an emulator) I wondered how I could make it better.  Maybe I could make it work for Field Day ( an annual event where radio amateurs in North America try to work as many other stations as possible in 24 hours and often with emergency power wikipedia entry).  It would need some more info added to the log records.  The other stations section (where they are located) and class (type of power ie. battery, mains and # of radios) would need to be added.  It would also need band (frequency) and mode (morse code, voice, digital) in the record as well.  How about some graphics and some more bleeps and bloops?

That’s it in a nutshell.  I’m going to make a Field Day specific logging program for Atari Basic using the Conlog program as a starting point.  I will try to add some graphic elements and be able to change the current Band and Mode and enter in the Section and Class of the other station that is being contacted. I know I will be learning quite a bit about Atari Basic. The only programming I’ve ever done is a little bash scripting on linux and I modified some python code for, oddly enough, another Field Day logging program.  It was written primarily for Windows and some things didn’t work from the menu.  I was somehow able to get it to open a pdf that contained the rules for the contest? (not sure what it was) on a linux machine. You can find most problems have been solved by Googling….

73, Rich KD0RG

Here is the type-in Conlog program from the April 1984 73 magazine…………

Continue reading “Retrochallenge 2015”

Retrochallenge 2015