Dale's Home Page

Dale’s Atari 800 Games › Stan Ockers

Doggies Revisited

By Stan Ockers, in the ACE newsletter of April 1983.

Play Doggies Revisited

Stan’s write-up

The write-up in this issue is ‘Anatomy of Doggies’ by Garry Francis (reprinted from ACE N.S.W., Australia), who explains how he restructured Stan’s game. He begins:

“Way back in June 1981, the Eugene ACE Newsletter published a lunar lander program written by a fellow named Stan Ockers. This in itself was not unusual, but Stan returned with another program in the next issue. And the next. And the next. In fact, this prolific programmer from Lockport, IL has now written a program (or sometimes two) for every single issue of the ACE Newsletter since June 1981.”

“Doggies has always been one of my favourite of Stan Ockers’ games. … But despite the weeks of work I put into it, it is still Stan Ockers’ program. He should be congratulated on doing such a fine job and making my task such a pleasure.” —Garry Francis

The program’s own instructions

There are 3 white doggies on the left side of the screen and 3 brown doggies on the right side. You must reverse their position by moving one doggie at a time. Use the joystick in Port 1 to put the bone under the doggie you wish to move, then press the fire button. The doggie will move into the empty space, but only if he is next to it or no more than one doggie away. It can be done in 15 moves! Can you do it?

—Stan Ockers

The program

The listing, “DOGGIES Revisited by Stan Ockers”, is on pages 6, 10 of the issue. The game page runs it line by line in an emulated Atari 800, just as typed in.

Where this copy came from: Transcribed by hand from the April 1983 scan (no typed-in copy exists). This is Stan's January 1982 game as reworked by Garry Francis of ACE N.S.W. in Australia, reprinted by ACE; the listing ends on page 10. Underlined characters in the printed shape DATA (lines 1010-1113) are inverse video.

Show the listing
1 REM ##############################
2 REM #          DOGGIES           #
3 REM #       by Stan Ockers       #
4 REM #  Eugene A.C.E. Newsletter  #
5 REM #        January 1982        #
6 REM #  Modified by Garry Francis #
7 REM # Reprinted by A.C.E.(N.S.W.)#
8 REM #        February 1983       #
9 REM ##############################
10 GOSUB 2000
19 REM *** Main loop ***
20 POKE 77,0:? #6;CHR$(125);"      doggies":? #6:? #6;" number of moves ";CHR$(16)
30 P$="1110222":FOR C=1 TO 7:GOSUB 100:IF A THEN GOSUB 210
40 NEXT C:POKE 209,120:POKE 53248,120:MOVE=0:ATTRACT=0
50 IF STRIG(0)=0 THEN GOSUB 300:GOTO 50
60 IF PEEK(53279)=6 THEN POKE 209,0:POKE 53248,0:GOTO 20
70 C=INT(7*RND(0))+1:GOSUB 100:IF A THEN GOSUB 500+100*INT(3*RND(0))
80 GOTO 50+ATTRACT
99 REM *** Which doggie? ***
100 A=VAL(P$(C,C)):IF A=1 THEN LINE=1000
110 IF A=2 THEN LINE=1100
120 X=3*C-3:RETURN 
199 REM *** Draw doggie ***
200 FOR J=1 TO 14:NEXT J
210 RESTORE LINE:READ DOG$:POSITION X,6:? #6;DOG$(1,2)
220 POSITION X,7:? #6;DOG$(3,4):POSITION X,8:? #6;DOG$(5,6):RETURN 
299 REM *** Process player's move ***
300 POKE 77,0:B=0:C=INT(PEEK(209)/24-0.5):IF C<1 THEN C=1
310 IF C>7 THEN C=7
320 B=B+1:IF VAL(P$(B,B)) THEN 320
330 IF B=C THEN RETURN 
340 IF C<B-2 OR C>B+2 THEN GOSUB 100:GOSUB 800:RETURN 
350 TEMP=C:FOR C=1 TO 7:IF C=TEMP THEN 400
360 GOSUB 100:IF A=0 THEN 400
370 IF C<TEMP THEN LINE=LINE+6
380 IF C>TEMP THEN LINE=LINE+7
390 GOSUB 210
400 NEXT C:C=TEMP:GOSUB 100:GOSUB 500:GOSUB 600:LINE=LINE+8:V=8:INC=0:GOSUB 900:LINE=LINE+2:INC=-1:GOSUB 900
410 LINE=LINE+2:GOSUB 900:POSITION X,6:? #6;"  ":P$(B,B)=P$(C,C):P$(C,C)="0":C=B
420 GOSUB 100:LINE=LINE+12:V=1:INC=1:GOSUB 900:LINE=LINE-2:GOSUB 900:LINE=LINE-10:GOSUB 700:GOSUB 600
430 MOVE=MOVE+1:MOVE$=STR$(MOVE):POSITION 17,2:FOR I=1 TO LEN(MOVE$):? #6;CHR$(ASC(MOVE$(I,I))-32);:NEXT I
440 IF P$<>F$ THEN RETURN 
450 POSITION 2,4:IF MOVE=15 THEN ? #6;"  {inv}great stuff{/inv}":GOTO 480
460 IF MOVE<20 THEN ? #6;"   {inv}good going{/inv}":GOTO 480
470 ? #6;"{inv}could be better{/inv}"
480 POSITION 0,11:? #6;"press {inv}start{/inv} to begin";:ATTRACT=10:RETURN 
499 REM *** Bark ***
500 LINE=LINE+5:GOSUB 210:FOR I=1 TO 6:SOUND 0,ASC(BARK$(I)),12,14-I*2:SOUND 1,ASC(BARK$(I)),14,I*2:NEXT I
510 LINE=LINE-5:GOSUB 210:SOUND 0,0,0,0:SOUND 1,0,0,0:RETURN 
599 REM *** Wag tail ***
600 LINE=LINE+1:FOR I=1 TO 3:LINE=LINE+1:GOSUB 200:LINE=LINE-1:GOSUB 200:NEXT I:LINE=LINE-1:GOSUB 200:RETURN 
699 REM *** Hop ***
700 LINE=LINE+3:V=8:INC=0:GOSUB 900:LINE=LINE-3:GOSUB 200:RETURN 
799 REM *** Shake head ***
800 FOR I=1 TO 3:LINE=LINE+6:GOSUB 200:LINE=LINE-6:GOSUB 200
810 LINE=LINE+7:GOSUB 200:LINE=LINE-7:GOSUB 200:NEXT I:RETURN 
899 REM *** Footsteps sound ***
900 FOR I=1 TO 3:V=V+INC:LINE=LINE+1:GOSUB 200:SOUND 0,6,13,V:SOUND 0,0,0,0
910 LINE=LINE-1:GOSUB 200:SOUND 0,11,13,V:SOUND 0,0,0,0:NEXT I:RETURN 
999 REM *** Shapes of doggies ***
1000 DATA '()*%&
1001 DATA '()\%&
1002 DATA '([*%&
1003 DATA '([*%-
1004 DATA '()\+&
1005 DATA !"#$%&
1006 DATA ./:;%&
1007 DATA WY<=%&
1008 DATA >?Z^+&
1009 DATA >?]_%-
1010 DATA @HJK{inv}  {/inv}
1011 DATA @HJK{inv}  {/inv}
1012 DATA XQ{inv}    {/inv}
1013 DATA XQ{inv}    {/inv}
1100 DATA {inv}'()*%&{/inv}
1101 DATA {inv}'()\%&{/inv}
1102 DATA {inv}'([*%&{/inv}
1103 DATA {inv}'([*%-{/inv}
1104 DATA {inv}'()\+&{/inv}
1105 DATA {inv}!"#$%&{/inv}
1106 DATA {inv}./:;%&{/inv}
1107 DATA {inv}WY<=%&{/inv}
1108 DATA {inv}>?Z^+&{/inv}
1109 DATA {inv}>?]_%-{/inv}
1110 DATA {inv}@HJK  {/inv}
1111 DATA {inv}@HJK  {/inv}
1112 DATA {inv}XQ    {/inv}
1113 DATA {inv}XQ    {/inv}
1999 REM *** Initialisation ***
2000 GRAPHICS 21:START=PEEK(106)-4:POKE 106,START-1:GRAPHICS 0:POKE 710,0:POKE 709,12:POKE 752,1:POKE 82,1
2009 REM *** Instructions ***
2010 POSITION 16,1:? "DOGGIES":? :? "There are 3 white doggies on the left"
2020 ? "side of the screen and 3 brown doggies":? "on the right side.  You must reverse"
2030 ? "their position by moving one doggie at":? "a time.":? :? "Use the joystick in Port 1 to put the"
2040 ? "bone under the doggie you wish to":? "move, then press the fire button.  The"
2050 ? "doggie will move into the empty space,":? "but only if he is next to it or no"
2060 ? "more than one doggie away.":? :? "It can be done in 15 moves!  Can you":? "do it?"
2070 POSITION 13,22:? "{inv} INITIALISING {/inv}":DIM BARK$(6),ML$(32),DOG$(6),MOVE$(3),F$(7),P$(7):F$="2220111"
2079 REM *** Data for barking ***
2080 RESTORE 2090:FOR I=1 TO 6:READ A:BARK$(I)=CHR$(A):NEXT I
2090 DATA 97,109,97,9,5,5
2099 REM *** VBI service routine ***
2100 FOR I=1536 TO 1578:READ A:POKE I,A:NEXT I
2110 DATA 104,160,10,162,6,169,7,76,92,228,173,0,211,72,41,8,208,6,230,209,104,24,144,7,104,41,4,208,11,198,209
2120 DATA 169,0,133,77,165,209,141,0,208,76,98,228
2129 REM *** P-M Graphics ***
2130 POKE 54279,START:POKE 53256,1:PM=256*START:POKE 53248,0:POKE 209,0:POKE 704,30
2140 FOR I=PM+602 TO PM+604:READ A:POKE I,A:NEXT I
2150 DATA 195,255,195
2159 REM *** Move character set ***
2160 FOR I=1 TO 32:READ A:ML$(I)=CHR$(A):NEXT I:CH=256*START:X=USR(ADR(ML$),57344,CH)
2170 DATA 104,104,133,204,104,133,203,104,133,206,104,133,205,162,2
2180 DATA 160,0,177,203,145,205,136,208,249,230,204,230,206,202,208,240,96
2189 REM *** Redefine characters ***
2190 READ X:IF X=-1 THEN 2560
2200 FOR I=CH+X TO CH+X+7:READ A:POKE I,A:NEXT I:GOTO 2190
2210 DATA 8,7,15,31,61,109,111,110,111
2220 DATA 16,224,240,248,188,182,246,118,246
2230 DATA 24,12,12,7,3,3,7,15,31
2240 DATA 32,48,48,224,192,192,224,240,248
2250 DATA 40,31,31,31,31,31,24,248,248
2260 DATA 48,248,248,248,248,248,24,31,31
2270 DATA 56,0,7,31,63,125,237,239,206
2280 DATA 64,0,224,248,252,190,183,247,115
2290 DATA 72,15,12,15,7,3,7,15,31
2300 DATA 80,240,48,240,224,192,224,240,248
2310 DATA 88,31,31,31,31,27,248,248,0
2320 DATA 104,248,248,248,248,216,31,31,0
2330 DATA 112,0,7,15,31,63,63,55,55
2340 DATA 120,0,128,192,192,64,127,255,255
2350 DATA 208,55,7,7,3,3,7,15,31
2360 DATA 216,254,224,254,252,192,224,240,248
2370 DATA 224,127,7,127,63,3,7,15,31
2380 DATA 232,236,224,224,192,192,224,240,248
2390 DATA 240,0,7,31,63,127,239,239,207
2400 DATA 248,0,224,248,252,254,247,247,243
2410 DATA 256,1,7,15,11,3,1,3,7
2420 DATA 320,128,224,240,208,192,128,192,224
2430 DATA 336,7,7,7,7,7,4,28,0
2440 DATA 344,224,224,224,224,224,32,56,0
2450 DATA 392,192,192,128,192,192,192,192,96
2460 DATA 440,0,1,3,3,2,254,255,255
2470 DATA 448,3,3,1,3,3,3,3,6
2480 DATA 456,0,224,240,248,252,252,236,236
2490 DATA 464,15,15,15,7,3,7,15,31
2500 DATA 472,15,12,15,71,67,71,47,31
2510 DATA 480,240,48,240,226,194,226,244,248
2520 DATA 488,15,15,15,71,67,71,47,31
2530 DATA 496,240,240,240,226,194,226,244,248
2540 DATA 504,240,240,240,224,192,224,240,248
2550 DATA -1
2559 REM *** Return to user ***
2560 POSITION 9,22:? "Press {inv} START {/inv} to begin":POKE 53279,8
2570 FOR I=1 TO 20:IF PEEK(53279)<>6 THEN NEXT I:POKE 755,2-PEEK(755):GOTO 2570
2580 POP :GRAPHICS 18:POKE 16,64:POKE 53774,119:POKE 756,START:POKE 559,46:POKE 53277,3
2590 POKE 708,14:POKE 709,184:POKE 710,20:POKE 711,136:A=USR(1536):RETURN 

Play Doggies Revisited