Courting Crickets
- Type
- Game
- Category
- Platform / jumping game
- Author
- Stan Ockers
- Published in
- Antic, September 1985 (Vol. 4, No. 5), Game of the Month
- Year
- 1985
- Language
- Atari BASIC
- Requirements
- 32K RAM, Atari BASIC, joystick in port 1; disk or cassette
- Tags
- antic, game-of-the-month, stan-ockers, platform, joystick, vbi, display-list, player-missile, redefined-characters, public-domain, 1985
- Related
- Chicken, Bats, Diamond Dave, Helicopter Roundup, Kooky's Quest, Chicken
About the program
Clyde Cricket lives in a factory and is hopelessly in love with Cynthia Cricket. To win her, he must carry five gifts to her home on the top floor: flowers, perfume, candy, a necklace and finally a ring. Each gift is collected from the middle of the lowest level. In between are moving conveyor belts loaded with objects that will crush him. The walls, floors and ceilings have all been sprayed with anti-cricket poison, and a jealous rejected suitor throws things down from the top of the screen.
Antic ran Courting Crickets as its September 1985 Game of the Month, explicitly as a tribute to Stan Ockers. He was a programmer from Lockport, Illinois, whose games (Chicken and Bats among them) had been highlights of the magazine's early issues. Ockers usually released his games first through the newsletter of the Eugene, Oregon ACE user group, and he refused payment, insisting that everything stay in the public domain. The magazine noted that some readers might already have seen the game on bulletin boards.
Typing it in
The program is long, but nearly all of it is plain text. {CLEAR} in line 140 is ESC then SHIFT-CLEAR. {CTRL-.} in line 410 is CTRL and the full stop key. Lines 1860–1900 contain short inverse strings: {inv} … {/inv} means press the Atari (inverse) key before and after. Most of the listing is DATA for a redefined character set, machine code and a display list, so a single mistyped number can crash the program. SAVE before you RUN. Antic printed TYPO II checksums beside each line of the magazine listing. They are not part of the program.
How to play
Wait for the "INITIALIZING" message to go, as the setup takes a while in BASIC. SELECT picks one of seven difficulty levels and fire starts the game, and the magazine warned that the top ones "border on the impossible". To lower the maximum, change the 7 in line 480. Clyde only jumps when you push the joystick in a direction and press fire together. If he dies, one of his three brothers takes over the gift he was carrying, so you don't start from the beginning.
How it works
The article took the program apart, and it shows Ockers' usual blend of BASIC and small machine-language helpers:
- Players in strings. Line 150 DIMensions a filler string so that the strings that follow start on a 2K boundary. Each player gets its own 256-byte string (
P0$–P3$), so a player can be moved up or down with fast string assignments. The unused first 1K is reused as screen data,DD$. - Vertical blank interrupt. A VBI routine in page 6 moves the conveyor belts by changing the low bytes of the Load Memory Scan addresses in a custom display list. It also carries Clyde along when he's standing on a belt and plays the tunes. That leaves BASIC free for the game logic.
- Two sound routines, one at a steady volume and one with a piano-like decay, also run during the vertical blank.
- Character set. A short machine-code mover copies the ROM font to the top 1K of memory, below a RAMTOP lowered by five pages (line 1170). It is then heavily redefined for the GRAPHICS 4/5-sized character modes.
- Joystick. A USR routine (line 510) only lets Clyde jump when stick and trigger are pressed together.
Listing
100 REM COURTING CRICKETS
110 REM BY STAN OCKERS
120 REM ANTIC PUBLISHING
140 ? "{CLEAR}INITIALIZING ....."
150 DIM D$(1),F$((INT(ADR(D$)/2048)+1)*2048-ADR(D$)-1),DD$(1024),P0$(256),P1$(256),P2$(256),P3$(256)
160 DIM BL$(13),CR$(12),CRJ$(12),CRF1$(12),CRF2$(12)
161 DIM CRM$(12),STK$(32),HT1$(12),HT2$(12),SND$(173):HI=ADR(DD$)/256
170 DIM GF1$(15),GF2$(15),DRP$(13),CUR$(12),COLDR$(4):GF1$="HIXLMXPQXTUXXXX":GF2$="JKXNOXRSXVWXZ[X"
180 REM JOYSTICK ROUTINE
190 RESTORE 200:FOR J=1 TO 32:READ A:STK$(J,J)=CHR$(A):NEXT J:STK=ADR(STK$)
200 DATA 104,173,132,2,240,12,173,207,6,240,20,169,0,141,207,6,240,13,173,207,6,208,8,173,120,2,41,3,141,207,6,96
210 REM SOUND DATA
220 RESTORE 230:FOR J=1 TO 173:READ A:SND$(J,J)=CHR$(A):NEXT J
230 DATA 0,60,3,70,3,80,3,90,3,100,3,100,3,0,0,108,10,108,10,108,10,81,20,64,10,108,10,108,10,108,10,81,20
240 DATA 64,10,0,30,53,10,85,10,53,10,96,10,53,10,96,10,53,10,91,20,102,10,108,10,108,10,85,20,72,10,108,10
250 DATA 108,10,108,10,85,20,72,10,0,50,53,15,47,5,53,10,60,10,64,10,72,10,81,20,40,20,0,0
260 DATA 121,40,91,30,91,10,91,80,121,40,81,30,96,10,91,80,121,40,91,30,72,10,60,40,72,30,91,10,91,40,96,30
270 DATA 91,10,81,80,0,0,243,40,243,40,243,10,243,40,204,40,217,10,217,40
280 DATA 243,10,243,40,255,10,243,60,0,0,47,10,72,10,60,10,64,10,72,10,64,10,60,10,72,10,0,0
290 HS=INT(ADR(SND$)/256):POKE 209,HS:LS=ADR(SND$)-HS*256:POKE 208,LS:SOUND 3,0,0,0
300 DIF=1
310 REM DD$ IS SCREEN DATA
320 DD$(1)="@":DD$(448)="@":DD$(2)=DD$:DD$(449)=CHR$(0):DD$(828)=CHR$(0):DD$(450)=DD$(449)
330 LINE1=ADR(DD$)+513:HL=INT(LINE1/256):LL=LINE1-HL*256:POKE 88,LL:POKE 89,HL
340 POKE 559,0:POKE 106,PEEK(740):GOSUB 1140:GOSUB 1330:GOSUB 1530
350 GRAPHICS 0:POKE 559,0:FOR X=53248 TO 53250:POKE X,1:NEXT X
355 POKE 756,START/256:GOSUB 1380:POKE 559,0:POKE 560,0:POKE 561,6:POKE 559,34:GOSUB 1710
360 A=USR(1670):VERT=8:GOSUB 1780:POKE 88,LL:POKE 89,HL:POSITION 12,0:? DIF:BRO=0
370 POKE 708,68:POKE 709,254:POKE 710,86:POKE 711,44:POKE 712,72:POSITION 16,7:? " courting crickets "
380 POSITION 2,0:? "dif level":RESTORE 382:FOR J=1 TO 4:READ A:COLDR$(J,J)=CHR$(A):NEXT J
382 DATA 228,36,4,230
390 DD$(613,652)="YYYYYYXXXXXYYYYYYXXXXXYYYYYYXXXXXYYYYYY"
400 DD$(653,692)="YYYYYYXXXXXYYYYYYXXXXXYYYYYYXXXXXYYYYYY"
410 DD$(693)="_{CTRL-.}XX_{CTRL-.}XX_{CTRL-.}":DD$(769)="abXXabXXabX"
420 GN=0:WFLG=0:GIFT=0:DROP=0:DD$(552)="XXXXXXXXXXXXXX":DD$(592)="XXXXXXXXXXXXXX"
430 POKE 1622,15:DD$(712)=GF1$:DD$(788)=GF2$
440 POSITION 16,7:? "SELECT dif or FIRE":POKE 77,0
450 IF STRIG(0)=0 THEN 450
460 KEY=PEEK(53279):IF STRIG(0)=0 THEN 500
470 IF KEY<>5 THEN 460
480 DIF=DIF+1:IF DIF>7 THEN DIF=1
490 POSITION 12,0:? DIF:GOSUB 1780:GOTO 460
500 POSITION 16,7:? " COURTING CRICKETS ":GOSUB 1000:DD$(712)="XX":DD$(788)="XX"
510 A=USR(ADR(STK$))
520 IF GIFT=1 AND YPOS=187 AND P>100 AND P<134 THEN GOSUB 820:GOSUB 790
530 IF PEEK(1743)=0 THEN FLAG=0
540 IF FLAG=1 THEN 580
550 S=PEEK(1743):IF S=2 OR S=1 THEN FLAG=1:P0$(YPOS)=CRJ$:POKE 53767,170:POKE 1591,1:FOR J=1 TO 20:NEXT J
560 IF S=2 AND VERT>0 THEN POKE 1767+VERT,0:P0$(YPOS)=BL$:YPOS=YPOS-16:P0$(YPOS)=CR$:VERT=VERT-1:POKE 1767+VERT,1
570 IF S=1 AND VERT<8 THEN POKE 1767+VERT,0:P0$(YPOS)=BL$:YPOS=YPOS+16:P0$(YPOS)=CR$:VERT=VERT+1:POKE 1767+VERT,1
580 P=PEEK(1791):IF P>190 OR P<60 THEN POKE 1767+VERT,0:GOTO 710
590 POKE 53278,0
600 FOR J=1 TO 10:NEXT J
610 IF PEEK(53252)>0 THEN POKE 1767+VERT,0:GOTO 710
620 IF YPOS=59 AND P>100 AND P<134 THEN POKE 1767+VERT,0:GOTO 840
630 JPOS=JPOS+DELJ:IF JPOS>RTLJ OR JPOS<LLJ THEN DELJ=-DELJ:JPOS=JPOS+2*DELJ
640 POKE 53250,JPOS
650 DRCNT=DRCNT-1:IF DRCNT<1 THEN DRCNT=10+5*(10-DIF):DPOS=50:GOSUB 950:P3$(DPOS)=DRP$:DROP=1:POKE 53251,JPOS
660 IF DROP=1 THEN P3$(DPOS)=BL$:DPOS=DPOS+DELTA:P3$(DPOS)=DRP$:SOUND 1,DPOS-40,10,10
670 IF DPOS>240 THEN GOSUB 820:DPOS=50
680 IF PEEK(53260)=8 THEN POKE 1767+VERT,0:GOTO 710
690 GOTO 510
700 REM FALLING CRICKET
710 GOSUB 820
720 P0$(YPOS)=BL$:YPOS=YPOS+6:P0$(YPOS)=CRF1$:SOUND 0,YPOS,10,10:FOR J=1 TO 30:NEXT J
730 P0$(YPOS)=BL$:YPOS=YPOS+6:P0$(YPOS)=CRF2$:SOUND 0,YPOS,10,10:FOR J=1 TO 30:NEXT J:IF YPOS<240 THEN 720
740 SOUND 0,0,0,0
750 BRO=BRO+1:IF BRO=4 THEN 1030
760 J=4*(BRO-1):DD$(693+J,696+J)="XXXX":DD$(769+J,772+J)="\]^X"
770 VERT=8:GOSUB 1710:POKE 1791,120:POKE 1622,15:GOTO 510
780 REM ERASE NEXT GIFT
790 GIFT=0:GN=GN+1:GOSUB 1000:DD$(712+GN*3)="XX":DD$(788+GN*3)="XX"
800 RETURN
810 REM ELIMINATE DROP
820 SOUND 1,0,0,0:P3$(DPOS)=BL$:POKE 53251,0:DROP=0:RETURN
830 REM REACHED FEMALE
840 GOSUB 820:POKE 1791,118
850 IF GIFT=0 THEN GOSUB 920
860 IF WFLG=1 THEN 1090
870 FOR K=1 TO 10:P1$(YPOS-14)=HT1$
880 FOR J=15 TO 0 STEP -1:SOUND 0,20,10,J:NEXT J:P1$(YPOS-14)=HT2$:FOR J=1 TO 15:NEXT J:NEXT K
890 IF STRIG(0)=1 THEN 890
900 P0$(YPOS)=BL$:P1$(YPOS-14)=BL$:S=1:GOTO 560
910 REM PRINT GIFT
920 GIFT=1:DD$(552)=GF1$(1,(GN+1)*3):DD$(592)=GF2$(1,(GN+1)*3):IF GN=4 THEN WFLG=1
930 RETURN
940 REM PICK A WEAPON
950 R=INT(RND(0)*4):RESTORE 960+10*R:FOR J=1 TO 13:READ A:DRP$(J,J)=CHR$(A):NEXT J:POKE 707,ASC(COLDR$(R+1))
952 RETURN
960 DATA 20,72,34,20,74,40,8,127,127,62,62,28,28
970 DATA 0,0,80,112,112,112,112,112,120,126,94,0,0
980 DATA 0,0,48,96,64,127,127,64,224,224,0,0,0
990 DATA 60,24,24,24,60,126,223,215,247,255,127,126,60
995 REM PICK ANOTHER GIFT
1000 POKE 1622,155:POKE 707,92:POKE 53251,124+12*GN:FOR J=1 TO 5:P3$(205)=CUR$:FOR K=1 TO 30:NEXT K
1010 P3$(205)=BL$:FOR K=1 TO 30:NEXT K:NEXT J:RETURN
1020 REM NO MORE BROTHERS
1030 POKE 1622,131:POKE 53277,0:FOR J=53261 TO 53264:POKE J,0:NEXT J:GRAPHICS 18:POSITION 4,3:? #6;"All Brothers"
1040 POSITION 6,4:? #6;"are Gone"
1050 POSITION 3,7:? #6;"PRESS start TO":POSITION 5,8:? #6;"try again"
1060 IF PEEK(53279)<>6 THEN 1060
1070 GOTO 350
1080 REM MARRAIGE OCCURS
1090 POKE 1622,93:FOR L=0 TO 6:FOR K=0 TO 3:POS=64*L+16*K:DD$(POS+1)="XXXXcdXXXXcdXXXX":NEXT K:NEXT L
1100 FOR J=1 TO 1000:NEXT J
1110 POKE 53277,0:FOR J=53261 TO 53264:POKE J,0:NEXT J:GRAPHICS 18:POSITION 3,3:? #6;"And They Lived"
1120 POSITION 1,4:? #6;"Happily Ever After":GOTO 1050
1130 REM CHANGE CHARACTER SET
1140 DIM ZZ$(32):RESTORE 1150:FOR I=1 TO 32:READ A:ZZ$(I)=CHR$(A):NEXT I
1150 DATA 104,104,133,204,104,133,203,104,133,206,104,133,205,162,4,160,0
1160 DATA 177,203,145,205,136,208,249,230,204,230,206,202,208,240,96
1170 POKE 106,PEEK(106)-5:START=(PEEK(106)+1)*256
1180 A=USR(ADR(ZZ$),57344,START):RESTORE 1200:FOR I=START+512 TO START+807:READ A:POKE I,A:NEXT I
1190 RETURN
1200 DATA 0,0,0,0,0,0,0,170,0,63,58,57,58,63,63,170,0,252,172,108,172,252,252,170
1210 DATA 0,255,170,85,170,255,255,170,0,51,33,18,33,255,85,170,0,191,239,251,254,255,255,170
1220 DATA 0,255,215,215,215,190,235,170,0,254,251,239,191,255,255,170,0,1,32,184,32,12,3,16
1230 DATA 64,208,64,224,184,224,192,192,116,28,3,0,0,0,0,0,200,238,248,192,192,192,192,192
1240 DATA 0,0,0,0,2,2,3,3,0,0,0,0,128,128,192,192,13,55,219,222,223,55,13,3
1250 DATA 112,220,247,247,247,220,112,192,0,0,0,58,234,234,233,229,0,0,0,40,234,170,154,86
1260 DATA 233,233,57,58,58,14,14,13,86,90,90,104,104,160,160,128,0,3,12,48,192,192,48,12
1270 DATA 48,204,3,3,3,12,48,12,12,3,12,48,14,2,2,0,3,3,3,12,32,160,160,128
1280 DATA 0,0,0,0,0,0,0,0,233,181,173,183,222,122,94,107,2,10,2,4,16,16,4,1,128,160,128,16,4,4,16,64
1290 DATA 0,0,3,15,15,204,63,15,0,0,0,207,204,255,255,195,0,0,240,48,48,48,240,240
1300 DATA 0,0,84,5,17,5,1,5,0,0,21,80,68,80,64,80,17,65,1,4,4,20,0,0
1310 DATA 68,65,64,16,16,20,0,0,40,190,179,176,176,44,11,2,80,244,52,52,52,208,64,0
1320 REM VBI ROUTINE
1330 DIM VBI$(75):RESTORE 1340:FOR J=1 TO 75:READ A:VBI$(J,J)=CHR$(A):NEXT J:VBI=ADR(VBI$):RETURN
1340 DATA 216,162,0,160,0,222,240,6,16,42,189,224,6,157,240,6,189,232,6,240,10,24
1350 DATA 173,255,6,125,248,6,141,255,6,24,185,16,6,125,216,6,153,16,6,221,208,6,208,6
1360 DATA 189,200,6,153,16,6,200,200,200,232,224,7,144,201,173,255,6,141,0,208,32,57,6,32,88,6,76,98,228
1370 REM DISPLAY LIST IN PAGE 6
1380 RESTORE 1390:FOR J=1536 TO 1679:READ A:POKE J,A:NEXT J
1390 DATA 112,112,112,70,0,0,68,20,0,68,60,0,69,100,0,69,0,0,69,80,0,69,128,0,69,208,0,69,0,0,69,80,0
1400 DATA 69,128,0,69,140,0,68,180,0
1410 DATA 68,0,0,70,40,0,65,0,6
1420 DATA 0,0,0,0,0,0,172,55,6,240,23,206,56,6,16,18,177,208,141,6,210,200
1430 DATA 177,208,240,5,141,56,6,200,152,141,55,6,96
1440 DATA 0,0,172,86,6,240,40,206,87,6,48,17,169,13,205,87,6,144,3,173,87,6,9,160,141,5,210,208,18,177,208
1450 DATA 141,4,210,200,177,208,240,5,141,87,6,200,152,141,86,6,96,104,160,0,162,0,169,7,76,92,228
1460 RESTORE 1470:FOR J=1541 TO 1583 STEP 3:READ A:POKE J,HI+A:NEXT J
1470 DATA 2,2,2,2,0,0,0,0,1,1,1,2,2,3,3
1480 RESTORE 1490:FOR J=1736 TO 1791:READ A:POKE J,A:NEXT J
1490 DATA 0,80,128,208,0,80,128,0,16,64,144,192,16,64,144,0,1,255,1,255,1,255,1,0
1500 DATA 20,12,9,12,15,18,21,0,0,0,0,0,0,0,0,0,20,12,9,12,15,18,21,0,252,4,252,4,252,4,252,120
1510 HV=INT(VBI/256):POKE 1674,HV:POKE 1672,VBI-256*HV
1520 RETURN
1525 REM PM IMAGES
1530 RESTORE 1540:FOR J=1 TO 12:READ A:CR$(J,J)=CHR$(A):NEXT J
1540 DATA 231,60,90,60,24,60,90,153,24,36,36,102
1550 RESTORE 1560:FOR J=1 TO 12:READ A:CRJ$(J,J)=CHR$(A):NEXT J
1560 DATA 66,36,60,90,60,153,126,24,24,60,66,195
1570 BL$(1)=CHR$(0):BL$(13)=CHR$(0):BL$(2)=BL$
1580 RESTORE 1590:FOR J=1 TO 12:READ A:CRF1$(J,J)=CHR$(A):NEXT J
1590 DATA 195,36,60,90,60,25,62,88,156,36,38,96
1600 RESTORE 1610:FOR J=1 TO 12:READ A:CRF2$(J,J)=CHR$(A):NEXT J
1610 DATA 195,36,60,90,60,152,124,26,57,36,100,6
1620 RESTORE 1630:FOR J=1 TO 12:READ A:CRM$(J,J)=CHR$(A):NEXT J
1630 DATA 66,165,60,90,36,24,126,153,60,126,36,102
1640 RESTORE 1650:FOR J=1 TO 12:READ A:HT1$(J,J)=CHR$(A):NEXT J
1650 DATA 0,216,248,248,112,32,0,27,31,31,14,4
1660 RESTORE 1670:FOR J=1 TO 12:READ A:HT2$(J,J)=CHR$(A):NEXT J
1670 DATA 0,27,31,31,14,4,0,216,248,248,112,32
1680 RESTORE 1690:FOR J=1 TO 12:READ A:CUR$(J,J)=CHR$(A):NEXT J
1690 DATA 68,238,254,254,254,254,254,124,124,56,56,16
1700 REM PM INIT.
1710 P0$(1)=CHR$(0):P0$(256)=CHR$(0):P0$(2)=P0$:YPOS=187:P0$(YPOS)=CR$
1720 P1$(1)=CHR$(0):P1$(256)=CHR$(0):P1$(2)=P1$:P2$(1)=CHR$(0):P2$(256)=CHR$(0):P2$(2)=P2$
1730 P3$(1)=CHR$(0):P3$(256)=CHR$(0):P3$(2)=P3$:P1$(60)=CRM$:P2$(44)=CR$:JPOS=100:DELJ=3:RTLJ=200:LLJ=50:DELTA=6
1740 POKE 54279,HI:POKE 559,62:POKE 53277,3:POKE 53248,120:POKE 704,116:POKE 53249,126:POKE 705,92
1750 POKE 53250,100:POKE 706,20:POKE 707,0:POKE 623,1
1760 RETURN
1770 REM PACKAGES ON BELTS
1780 DD$(1)="@":DD$(448)="@":DD$(2)=DD$
1790 FOR J=1760 TO 1766:SPEED=RND(0)*(9-DIF)*4+(7-DIF):IF DIF>3 THEN SPEED=SPEED*1.8
1792 POKE J,SPEED:NEXT J
1800 FOR L=0 TO 6:RESTORE 1850+10*L:READ F$:FOR K=0 TO 3
1810 POS=64*L+16*K:DD$(POS+1)=F$
1820 IF DIF>3 THEN DD$(POS+9)=F$
1840 NEXT K:NEXT L:RETURN
1850 DATA ACB
1860 DATA {inv}ACB{/inv}
1870 DATA DDD
1880 DATA {inv}EFG{/inv}
1890 DATA EFG
1900 DATA {inv}DDD{/inv}
1910 DATA EFG
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: CRICKETS.BAS.
Credits
- Program listing: Courting Crickets — program listing (Antic, September 1985 (Vol. 4, No. 5), Game of the Month) — Stan Ockers
- Picture: The factory at difficulty level 1. The five gifts, from flowers to the ring, are lined up along the bottom. — Stan Ockers (program); screenshot by the site
- Antic, September 1985 - Vol. 4 No. 5: article (atarimagazines.com) — Stan Ockers, 1985
- Antic disk, September 1985 - Vol. 4 No. 5: CRICKETS.BAS (detokenized listing) — AtariMagazines.com (Kevin Savetz), 1985
