ATARI CAMAC Assembler Ver 1.0A Page 1 D1:DIGDUG.ASM PAIR ;********************************** ;* * ;* DIGDUG * ;* * ;* BY * ;* * ;* CHRIS MCQUILKIN * ;* AND * ;* TRACEY SIESSER * ;* * ;* * ;* BASED ON THE ARCADE GAME * ;* "DIGDUG" BY NAMCO * ;* * ;* * ;* COPYRIGHT ATARI INC. 1983 * ;* * ;********************************** ;DIGDUG.ASM ;---------- ;THIS FILE LINKS TOGETHER ALL THE ;FILES THAT CONTAIN THE DIGDUG CODE ;AND DATA. = 0001 DEBUG = 1 ;USE DEBUG CODE = 0400 K = 1024 LIST I,-M,-F LIST L ;MACRO NXTPAG ORG'S TO THE NEXT ;PAGE BOUNDARY. NXTPAG MACRO ORG [*+$FF]&$FF00 %L ENDM ;MACRO SHOW DISPLAYS THE VALUE OF ;THE LOCATION COUNTER (*). SHOW MACRO DUMMY ENDM LIST L ;GLOBAL EQUATES ;-------------- LIST L INCLUDE D2:OS800EQU.ASM ;800 OS EQUATES ATARI CAMAC Assembler Ver 1.0A Page 2 D2:OS800EQU.AS PAIR ;PLAYER-MISSILES = 02C0 PCOLR0 = $02C0 !COLPM0 = $D012 = 02C1 PCOLR1 = $02C1 !COLPM1 = $D013 = 02C2 PCOLR2 = $02C2 !COLPM2 = $D014 = 02C3 PCOLR3 = $02C3 !COLPM3 = $D015 = D01D GRACTL = $D01D ;TURN ON PLAYERS = D01E HITCLR = $D01E ;CLEAR COLLISIONS = D407 PMBASE = $D407 ;PLAYER-MISSILE BASE = 026F GPRIOR = $026F ;PRIORITIES = D000 HPOSP0 = $D000 !M0PF = $D000 = D001 HPOSP1 = $D001 !M1PF = $D001 = D002 HPOSP2 = $D002 !M2PF = $D002 = D003 HPOSP3 = $D003 !M3PF = $D003 = D004 HPOSM0 = $D004 !P0PF = $D004 = D005 HPOSM1 = $D005 !P1PF = $D005 = D006 HPOSM2 = $D006 !P2PF = $D006 = D007 HPOSM3 = $D007 !P3PF = $D007 = D008 M0PL = $D008 !SIZEP0 = $D008 = D009 M1PL = $D009 !SIZEP1 = $D009 = D00A M2PL = $D00A !SIZEP2 = $D00A = D00B M3PL = $D00B !SIZEP3 = $D00B = D00C P0PL = $D00C !SIZEM = $D00C = D00D P1PL = $D00D !GRAFP0 = $D00D = D00E P2PL = $D00E !GRAFP1 = $D00E = D00F P3PL = $D00F !GRAFP2 = $D00F !GRAFP3 = $D010 !GRAFM = $D011 ;PLAYFIELD COLORS = 02C4 COLOR0 = $02C4 !COLPF0 = $D016 = 02C5 COLOR1 = $02C5 !COLPF1 = $D017 = 02C6 COLOR2 = $02C6 !COLPF2 = $D018 = 02C7 COLOR3 = $02C7 !COLPF3 = $D019 = 02C8 COLOR4 = $02C8 !COLBK = $D01A ;CONTROLLERS = 0278 STICK0 = $0278 ;SEE POSITIONS BELOW = 0279 STICK1 = $0279 = 0284 STRIG0 = $284 ;0=TRIGGER PRESSED = 0285 STRIG1 = $285 = 000E JUP = $E = 000D JDOWN = $D = 000B JLEFT = $B = 0007 JRIGHT = $7 ;BUTTON = $D010 = D01F CONSOL = $D01F = 02FC CH = $2FC = 0021 SPACE = $21 ;MISC. OS = D40A WSYNC = $D40A ;WAIT FOR HORIZ.SYNC. ATARI CAMAC Assembler Ver 1.0A Page 3 D2:OS800EQU.AS PAIR = D40E NMIEN = $D40E ;NON-MASK.INTER.ENABLE = D40F NMIST = $D40F ;NON-MASK.INTER.STATUS = D200 AUDF1 = $D200 = D201 AUDC1 = $D201 = D203 AUDC2 = $D203 = D205 AUDC3 = $D205 = D207 AUDC4 = $D207 = D208 AUDCTL = $D208 ;MUSICAL REGISTERS = D40B VCOUNT = $D40B ;SCAN LINE COUNTER = 004D ATRACT = $4D ;ATTRACT MODE FLAG = 004E DRKMSK = $4E ;ATTRACT MODE (AND) = 004F COLRSH = $4F ;ATTRACT MODE (EOR) = 022F SDMCTL = $022F ;DMA ENABLE = 0200 VDSLST = $0200 ;DLI VECTOR = 0230 SDLSTL = $0230 ;DISPLAY LIST PTR = 0231 SDLSTH = $0231 = D409 CHBASE = $D409 ;CHARACTER SET PTR = 02F4 CHBAS = $02F4 ;(OS SHADOW) = E45C SETVBV = $E45C ;VBLANK VECTOR RTN = E462 DEFRTN = $E462 ;VBLANK RETURN ADDR = E000 CHASET = $E000 INCLUDE D2:GLOBALS.ASM ;GLOBALS.ASM ;----------- ;THIS FILE CONTAINS GLOBAL SYMBOLS ;AND FLAGS. ;COLORS = 0094 BLUE = $94 = 000F WHITE = $0F = 00C8 GREEN = $C8 = 0044 RED = $44 = 0046 PINK = $46 = 002A YELLOW = $2A = 0000 BLACK = $00 ;MONSTER ENABLE (MNSTEN) FLAGS ;(ACCESSIBLE TO PROGRAMMER) = 00FF MNSTON = $FF ;ON AND MOVING = 00FD MONSTA = $FD ;ON BUT STATIONERY = 0001 MNSTDI = 1 ;DISABLE (ERASE) MNST ;MISC. GLOBAL SYMBOLS = 0003 NUMMEN = 3 ;START GAME W/3 MEN = 0004 GHOLIM = 4 ;MAX. 4 GHOSTS = 0014 LPT = 20 ;SCAN LINES/TUNNEL = 0011 NUMBYT = $11 ;WALKING? = 00C8 SLINES = 200 ;SCAN LINES OF SAND = 0003 REPTFIR = 3 ;REPEAT FIRE 3 TIMES = 0096 MDELAY = 150 ;DELAY AFTER ALL ;MONSTERS DEAD ATARI CAMAC Assembler Ver 1.0A Page 4 D2:GLOBALS.ASM PAIR = 205D LMARGE = $2010+$4D ;FOR FLOWER = 0018 FIRDST = 24 ;FYGAR DIST TO DD = 0009 NSQUARE = 9 ;DIG SAND/--10 PTS = FFFE LONGTU = $FFFE = 000C WARNING = $0C ;FIRE WARNING PAUSE LIST L ;PAGE-ZERO RAM ALLOCATION ;------------------------ 0000 = 0080 ORG $80 0080 SHOW PG0 LIST L INCLUDE D2:PAGEZERO.ASM ;***** PAGE-ZERO RAM ***** 0080 = 0002 COLTBS DS 2 ;PTR TO SAND COLORS 0082 = 0001 COLIDX DS 1 ;INDEX INTO COLOR LST 0083 = 0001 ARGH DS 1 ;1-BYTE FLAG 0084 = 0002 SCRPTR DS 2 ;PTR TO SCREEN 0086 = 0002 RUNPTR DS 2 ;PTR TO PACK BUFFER 0088 = 0002 BELOW DS 2 ;PTR TO SCREEN 008A = 0001 PADR DS 1 008B = 0001 PADRH DS 1 008C = 0001 GADR DS 1 008D = 0001 GADRH DS 1 008E = 0001 SCREEN DS 1 008F = 0001 SCRENH DS 1 0090 = 0001 GETHER DS 1 0091 = 0001 HGETHER DS 1 0092 = 0001 PUTHER DS 1 0093 = 0001 HPUTHER DS 1 0094 = 0001 DATAPL DS 1 0095 = 0001 DATAPH DS 1 0096 = 0001 DATAD DS 1 0097 = 0001 HDATAD DS 1 0098 = 0001 LDUMMY DS 1 0099 = 0001 HDUMMY DS 1 009A = 0001 DIGDUG DS 1 009B = 0001 DGDGHI DS 1 009C = 0001 THERE DS 1 009D = 0001 THEREH DS 1 009E = 0001 DATA DS 1 009F = 0001 DATAH DS 1 00A0 = 0001 FRUITL DS 1 00A1 = 0001 FRUITH DS 1 00A2 = 0001 VEGTL DS 1 00A3 = 0001 VEGTH DS 1 00A4 = 0002 FLOADD DS 2 ;FOR FLOWER ROUTINE 00A6 = 0002 QTEMP DS 2 00A8 = 0002 QTEMP1 DS 2 00AA = 0001 QTEMB2 DS 1 00AB = 0001 QTEMB3 DS 1 ATARI CAMAC Assembler Ver 1.0A Page 5 D2:PAGEZERO.AS PAIR 00AC = 0001 QTEMB4 DS 1 00AD = 0002 QSNAD DS 2 00AF = 0001 QSCNT DS 1 00B0 = 0001 QXSAV1 DS 1 00B1 = 0001 QXSAV2 DS 1 00B2 = 0002 REVCHK DS 2 ;GHOST REVERSION 00B4 = 0001 MOONLY DS 1 ;MAKING MAPPIT FASTER 00B5 = 0001 GREEN1 DS 1 00B6 = 0001 GREEN2 DS 1 00B7 = 0001 GREEN3 DS 1 00B8 = 0001 ADDWHO DS 1 00B9 = 0001 BBBFLG DS 1 00BA = 0002 BASE DS 2 = 00BC OPTCUL EQU * 00BC = 0003 COLR DS 3 ;OPTION SCREEN 00BF = 0002 COLVG0 DS 2 ;DLI ATTRACTED COLORS 00C1 = 0002 COLVG1 DS 2 00C3 = 0002 COLVG2 DS 2 00C5 = 0002 WIPEIT DS 2 ;CLEAR PLAYER 00C7 = 0002 MESSAGE DS 2 ;PTR TO MESSAGE = 00C9 ATRCOL EQU * 00C9 = 0001 SRED DS 1 00CA = 0001 SBLUE DS 1 00CB = 0001 SEMPH DS 1 00CC = 0001 SDEEMPH DS 1 00CD = 0006 COLTBB DS 6 00D3 = 0006 COLTB1 DS 6 00D9 = 0006 COLTB2 DS 6 00DF = 0006 COLTB3 DS 6 00E5 = 0002 PTRFR DS 2 00E7 = 0002 PTRTO DS 2 00E9 = 0001 PHMASK DS 1 ;MASK OUT PART OF BYTES 00EA = 0003 ZMASK DS 3 ; THAT POOKAS DON'T USE 00ED = 0001 PERSON DS 1 00EE = 0001 LSTIDX DS 1 00EF = 0002 COUNT DS 2 00F1 = 0001 BYTE DS 1 00F2 = 0001 VRTPOS DS 1 00F3 = 0001 HZTPOS DS 1 00F4 = 0001 RCOUNT DS 1 00F5 = 0001 LCOUNT DS 1 00F6 = 0001 NTUNE DS 1 00F7 = 0001 OTUNE DS 1 00F8 = 0001 CONTRL DS 1 00F9 = 0001 DCOUNT DS 1 00FA = 0001 FYGFIR DS 1 00FB = 0001 GHOPTR DS 1 00FC = 0001 HOSTAT DS 1 00FD = 0001 MYTEMP DS 1 00FE = 0001 PUMPFL DS 1 00FF = 0001 SHIFT DS 1 ATARI CAMAC Assembler Ver 1.0A Page 6 D1:DIGDUG.ASM PAIR LIST L 0100 SHOW ENDPG0 ASSERT *<=$100 ;OTHER RAM ALLOCATION ;-------------------- 0100 = 1800 ORG $1800 1800 SHOW RAMDATA LIST L INCLUDE D2:RAMDATA.ASM ;RAMDATA.ASM ;----------- ;THIS FILE ALLOCATES SPACE IN RAM ;FOR THE PROGRAM VARIABLES. ;***** RAM ***** 1800 = 0001 NPRSNS DS 1 ;NUMBER PERSONS STILL ;PLAYING ;PERSON DS 1 ;INDEX (0-1) OF ;CURRENT PLAYER ;LSTIDX DS 1 ;INDEX TO LEVEL LISTS 1801 = 0001 OLDMAP DS 1 ;OLD AND NEW ROCK OR 1802 = 0001 NEWMAP DS 1 ;..MONSTER BITMAPS 1803 = 0001 TFLAG DS 1 ;FLAG TO TUNADR 1804 = 0002 ADDR DS 2 ;RETURNED BY TUNADR 1806 = 0001 RC DS 1 ;TEMP FOR TUNADR 1807 = 0001 PIXEL DS 1 ;PIXEL FOR PACKING ;COUNT DS 2 ;PACKED PIXEL COUNT 1808 = 0001 LINLFT DS 1 ;LINES LEFT TO PACK ;BYTE DS 1 ;BYTE BEING PACKED ;THE FOLLOWING VARIABLES ARE INDEXED ;BY THE VALUE OF PERSON. 1809 = 0002 MEN DS 2 ;NUMBER OF MEN LEFT 180B = 0002 GLEVEL DS 2 ;GAME LEVEL (0...) 180D = 0002 MODLEV DS 2 ;LEVEL FOR PATTERNS 180F = 0004 SCOREH DS 4 ;3-BYTE SCORE, BONUS, 1813 = 0004 SCOREM DS 4 ;& HIGH SCORE 1817 = 0004 SCOREL DS 4 ;... 181B = 0002 LIVE DS 2 ;LIVE MONSTER BITMAP 181D = 0002 UNFELL DS 2 ;BITMAP OF ROCKS LEFT 181F = 0002 RCKCO DS 2 ;COUNT ROCKS FALLEN 1821 = 0001 LEMO1L DS 1 ;MONSTER RAM 1822 = 0001 LEMO1H DS 1 1823 = 0001 LEMO2L DS 1 1824 = 0001 LEMO2H DS 1 1825 = 0001 LEMO3L DS 1 1826 = 0001 LEMO3H DS 1 1827 = 0001 LEMO4L DS 1 1828 = 0001 LEMO4H DS 1 1829 = 0001 RIMO1L DS 1 ATARI CAMAC Assembler Ver 1.0A Page 7 D2:RAMDATA.ASM PAIR 182A = 0001 RIMO1H DS 1 182B = 0001 RIMO2L DS 1 182C = 0001 RIMO2H DS 1 182D = 0001 RIMO3L DS 1 182E = 0001 RIMO3H DS 1 182F = 0001 RIMO4L DS 1 1830 = 0001 RIMO4H DS 1 1831 = 0001 BESTV DS 1 1832 = 0001 BESTH DS 1 1833 = 0008 HVFLAG DS 8 183B = 0001 CURDIR DS 1 183C = 0001 OPPCUR DS 1 183D = 0008 FRTLES DS 8 1845 = 0008 MGREEN DS 8 ;FGREEN DS 1 184D = 0001 MONIS DS 1 ;SCAN LINE OF MONSTER 184E = 0001 SCANBE DS 1 ; WHERE SCAN CAN BE TODRW 184F = 0001 MEND DS 1 1850 = 0001 SPEED DS 1 1851 = 0003 TIMER DS 3 1854 = 0001 CYCLE DS 1 1855 = 0001 SAVERN DS 1 1856 = 0001 TNUMROC DS 1 1857 = 0001 ERASEH DS 1 ;HOSE RAM 1858 = 0001 MONHIT DS 1 1859 = 0001 FLHDIR DS 1 185A = 0001 HDIR DS 1 185B = 0001 BUTNOP DS 1 ;HOINFL DS 1 ;WHICHM DS 1 185C = 0002 NUM DS 2 ;MATH RAM 185E = 0001 BY DS 1 185F = 0002 ANSWER DS 2 1861 = 0001 REM DS 1 ;GHOCNT DS 1 1862 = 0001 PLANUM DS 1 1863 = 0001 NOGHO DS 1 ;NEWGHO DS 4 ;GHOTAB DS 4 ;HTAB DS 4 ;VTAB DS 4 1864 = 0004 PFTABL DS 4 1868 = 0004 ASWTAB DS 4 186C = 0004 DLYTAB DS 4 1870 = 0002 ZAPGHO DS 2 1872 = 0001 GCOUNT DS 1 1873 = 0001 ACLOK DS 1 ;OKFIRE DS 1 1874 = 0001 MNSNUM DS 1 1875 = 0001 RGOBOOM DS 1 1876 = 0004 HITGHO DS 4 ATARI CAMAC Assembler Ver 1.0A Page 8 D2:RAMDATA.ASM PAIR 187A = 0001 WHICHG DS 1 ;CORLOL DS 4 ;CORHIL DS 4 ;CORLOR DS 4 ;CORHIR DS 4 187B = 0008 DEADMO DS 8 1883 = 0001 WHCHMN DS 1 1884 = 0001 CRUSHG DS 1 ;MONSTER TABLES (0-7) 1885 = 0008 PFFLAG DS 8 ;POOKA/FYGAR FLAG 188D = 0008 MNSTEN DS 8 ;MONSTER ENABLE FLAG 1895 = 0008 LPOKAP DS 8 ;POOKA POSITION--LOW 189D = 0008 HPOKAP DS 8 ;--HIGH 18A5 = 0008 SAVEPP DS 8 ;SAVE POOKA POSN--LOW 18AD = 0008 HSAVEPP DS 8 ;--HIGH 18B5 = 0008 GOPOOKA DS 8 ;CURRENT DIRECTION 18BD = 0008 POOPHASE DS 8 ;ANIMATION PHASE 18C5 = 0009 HOWMANY DS 9 18CE = 0009 BBBFLAG DS 9 ;2-OR-3 BYTE FLAG 18D7 = 0008 FIRFLG DS 8 ;FIRE FLAG 18DF = 0008 FE1 DS 8 18E7 = 0008 VPOS DS 8 ;VERTICAL COORD 18EF = 0008 HPOS DS 8 ;HORIZONTAL COORD ;FIRWRN DS 1 ;FIRE WARNING COUNTER ;PAUSE DS 1 ;PAUSE STATE ;ROCK TABLES (0-5) 18F7 = 0006 DROPRO DS 6 18FD = 0006 ROCKP DS 6 1903 = 0006 HROCKP DS 6 1909 = 0006 RUMBLE DS 6 190F = 0006 RFILL DS 6 1915 = 0006 RENABL DS 6 191B = 0006 RANIMA DS 6 1921 = 0006 RHOLD DS 6 1927 = 0006 FMONRK DS 6 192D = 0001 ROCKD DS 1 192E = 0001 HROCKD DS 1 192F = 0001 ROCK2 DS 1 1930 = 0001 HROCK2 DS 1 1931 = 0001 ROCK3 DS 1 1932 = 0001 HROCK3 DS 1 1933 = 0001 ROCKCO DS 1 1934 = 0002 BUDIDX DS 2 ;BUMNST DS 2 ;BUCTR DS 2 1936 = 0002 BUPTRH DS 2 1938 = 0002 BUPTRL DS 2 193A = 0001 TMPEND DS 1 193B = 0001 DTCTR DS 1 ATARI CAMAC Assembler Ver 1.0A Page 9 D2:RAMDATA.ASM PAIR 193C = 0001 DTIDX DS 1 193D = 0001 HOCOUNT DS 1 193E = 0001 LENGTH DS 1 193F = 0001 SSTICK DS 1 1940 = 0001 CATCHR DS 1 1941 = 0001 OLDJOY DS 1 ;TUNEND DS 1 1942 = 0001 BACKGR DS 1 ;TUNE9 DS 1 1943 = 0001 TUNE16 DS 1 1944 = 0001 TUNE11 DS 1 ;TUNE12 DS 1 ;TUNE13 DS 1 1945 = 0001 TUNE14 DS 1 1946 = 0002 GAMENEW DS 2 1948 = 0001 DGDGH1 DS 1 1949 = 0001 DGDGH2 DS 1 194A = 0001 XEXIT DS 1 194B = 0001 OFFSET DS 1 194C = 0001 PHASE DS 1 194D = 0001 STATE DS 1 ;VRTPOS DS 1 ;HZTPOS DS 1 ;RCOUNT DS 1 ;LCOUNT DS 1 194E = 0001 UCOUNT DS 1 194F = 0001 ROUND DS 1 1950 = 0001 DFLAG DS 1 1951 = 0001 UFLAG DS 1 1952 = 0001 DATAD2 DS 1 1953 = 0001 DATAD1 DS 1 1954 = 0001 LPOKAD DS 1 1955 = 0001 HPOKAD DS 1 1956 = 0001 SAVE DS 1 1957 = 0001 TIMES DS 1 1958 = 0001 DELAYF DS 1 1959 = 0001 MONNUM DS 1 195A = 0001 TMONNUM DS 1 195B = 0001 PCOUNT DS 1 195C = 0001 PRIOR DS 1 195D = 0001 FIRCTR DS 1 195E = 0001 FIRIDX DS 1 195F = 0001 FRVPOS DS 1 1960 = 0001 VEGTIL DS 1 1961 = 0001 VEGTIH DS 1 1962 = 0002 VEGFLG DS 2 1964 = 0002 VERASE DS 2 1966 = 0002 WHODEAD DS 2 1968 = 0001 DLEN DS 1 ;SCORE RAM 1969 = 0001 MENLEFT DS 1 ;NTUNE DS 1 ;MUSIC RAM ;OTUNE DS 1 196A = 0001 NTIME DS 1 ATARI CAMAC Assembler Ver 1.0A Page 10 D2:RAMDATA.ASM PAIR 196B = 0004 STARTL DS 4 ;PARM TABLE ADDRESS- 196F = 0004 STARTH DS 4 ;POINTS AT FIRST ;PARM FOR CUR. PATTERN 1973 = 0004 MELCNT DS 4 ;DECREMENTAL COUNTERS ;OF PATTERN ELEMENTS 1977 = 0004 MREPCNT DS 4 ;DECREMENTAL COUNTERS ;OF PATTERN REPETITIONS 197B = 0004 MPPTR DS 4 ;PAT. CNTRS. FOR TUNES 197F = 0004 VTUNE DS 4 ;VOICE TABLE-TUNE #'S 1983 = 0004 XVOL DS 4 ;PAT. VOLUME-HOLD AREA 1987 = 0004 VOL DS 4 ;CUR. VOL. OF CUR. TONE 198B = 0004 DCY DS 4 ;DECAY DELAY TIMER 198F = 0004 MTIME DS 4 ;TONE DURATION TIMERS 1993 = 0004 CURPSL DS 4 ;TUNE DATA POINTERS 1997 = 0004 CURPSH DS 4 199B = 0004 SNSTAT DS 4 ;VOICE STATUS BYTES 199F = 0004 MCONST DS 4 ;PAT. CONSTANT TIMING 19A3 = 0001 CMND DS 1 ;COMMAND FOR SCMND ;IFLAGT DS 1 19A4 = 0011 DWNSTMP DS 17 19B5 = 0010 UPSTMP DS 16 19C5 = 0040 ZERDAT DS 64 1A05 = 0001 ENTRANCE DS 1 1A06 = 0001 FIRTIM DS 1 ;TIMES FIRE IS DONE ;SCORE RAM 1A07 = 0001 BLANK DS 1 ;LEAD'G-ZERO TO BLNK FLAG 1A08 = 0001 BTIMER DS 1 ;BONUS DISPLAY TIMER ;BONUSH DS 1 ;BONUS VALUE--HIGH BYTE ;BONUSM DS 1 ;--MEDIUM BYTE ;BONUSL DS 1 ;--LOW BYTE ;HISCOH DS 1 ;HIGH SCORE VALUE--HIGH ;HISCOM DS 1 ;--MEDIUM BYTE ;HISCOL DS 1 ;--LOW BYTE 1A09 = 0001 TELLMO DS 1 ;TELL MONSTER ROUTINE ;TUNE15 DS 1 1A0A = 0001 MONRK DS 1 1A0B = 0001 MONRKH DS 1 1A0C = 0001 HOLDLE DS 1 ;HITCNT DS 1 ;HOW MANY MO'S SQUISHED 1A0D = 0001 HELPME DS 1 ;TRACEY NEEDS HELP!?! 1A0E = 0001 HOONCE DS 1 1A0F = 0001 WAIT2D DS 1 1A10 = 0001 MFRAME DS 1 1A11 = 0002 MNSLEFT DS 2 ;MNSTRS LEFT F/PERSON ;OLDGHO DS 4 ;OLD GHOST REVERSION 1A13 = 0001 MTIMER DS 1 ;ALL MONSTERS DEAD ;DELAY TIMER 1A14 = 0004 BEST DS 4 ;BEST CHASE DIRECT'NS ATARI CAMAC Assembler Ver 1.0A Page 11 D2:RAMDATA.ASM PAIR 1A18 = 0001 CPOSSIB DS 1 ;CURRENT DIR POSSIBLE 1A19 = 0001 BYTEOK DS 1 ;EXAMINED BYTE OK 1A1A = 0001 HEDFET DS 1 ;EXAMINING HEAD/FEET? ;GHOSTOP DS 1 ;TO STOP GHOST MOVING 1A1B = 0002 MENLEV DS 2 ;NEXT SCORE LEVEL FOR ;NEW MAN ;MENSCO DS 3 ;SCORE TO GET NEW MAN ;COLLISION SHADOW REGISTERS 1A1D = 0001 SM0PF DS 1 1A1E = 0001 SM1PF DS 1 1A1F = 0001 SM2PF DS 1 1A20 = 0001 SM3PF DS 1 1A21 = 0001 SP0PF DS 1 1A22 = 0001 SP1PF DS 1 1A23 = 0001 SP2PF DS 1 1A24 = 0001 SP3PF DS 1 1A25 = 0001 SM0PL DS 1 1A26 = 0001 SM1PL DS 1 1A27 = 0001 SM2PL DS 1 1A28 = 0001 SM3PL DS 1 1A29 = 0001 SP0PL DS 1 1A2A = 0001 SP1PL DS 1 1A2B = 0001 SP2PL DS 1 1A2C = 0001 SP3PL DS 1 ;TUNE6 DS 1 1A2D = 0001 NLFLAG DS 1 1A2E = 0001 TMONUM DS 1 1A2F = 0001 TWOTWO DS 1 ;PERMANENT NPRSNS 1A30 = 0001 BELLY DS 1 ;BYTE AT DD'S BELLY ;SQUARE DS 1 ;AMOUNT OF SAND DUG 1A31 = 0003 ADDIT DS 3 ;SCORE TO ADD IN 1A34 = 0003 CMPIT DS 3 ;SCORE TO COMPARE 1A37 = 0001 FIRST DS 1 ;LEVEL ONE? 1A38 = 0001 ROWCOL DS 1 ;ROW & COL OF TUNNEL 1A39 = 0002 TUNLEN DS 2 ;LENGTH OF TUNNEL 1A3B = 0001 FRUOPT DS 1 ;FRUIT OPTION BYTE 1A3C = 0001 LINES DS 1 ;LINES OF FRUIT 1A3D = 0001 GET DS 1 ;GET FRUIT DATA 1A3E = 0001 PUT DS 1 ;PUT FRUIT DATA ;CONSIDER DS 1 ;CHASE CONSIDERATION 1A3F = 0001 FAX DS 1 1A40 = 0001 HCHASE DS 1 ;WHERE TO CHASE 1A41 = 0001 VCHASE DS 1 ;... ;BEHIND DS 1 ;COUNT BEHIND BLOCK 1A42 = 0008 GHONOW DS 8 ;WHEN TO GHOST ;DONTDIE DS 1 ;FLAG DD NOT TO DIE 1A4A = 0006 RDALLY DS 6 ;DON'T DROP ROCK YET 1A50 = 0001 FRULEV DS 1 ;VEG LEVEL TO DISPLAY 1A51 = 0001 SLEVEL DS 1 ;STARTING LEVEL 1A52 = 0002 GARDEN DS 2 ;WHERE TO PUT VEGS 1A54 = 0001 COUNT0 DS 1 ;ZERO CNT FOR BLANKS ATARI CAMAC Assembler Ver 1.0A Page 12 D2:RAMDATA.ASM PAIR 1A55 = 0001 COUNTT DS 1 ;COUNT FOR "DIGDUG" 1A56 = 0001 FINISH DS 1 ;LAST LINE (?) 1A57 = 0001 COLVG DS 1 ;VEGETABLE COLOR 1A58 = 0001 INDEX1 DS 1 ;INDEX FOR BACK1 1A59 = 0001 INDEX2 DS 1 ;INDEX FOR BACK2 1A5A = 0001 NUBFLG DS 1 ;DISPLAY NUBS W/FRUIT 1A5B = 0001 DEHOLD DS 1 ;HIT TWICE BY RED AND GREEN COUNTER 1A5C = 0002 CASE DS 2 ;CASE-STMT INDIRECT JMP 1A5E = 0001 BYTE0 DS 1 ;MESSAGE BYTE 1A5F = 0001 BYTE1 DS 1 ;MESSAGE BYTE 1A60 = 0001 VRTCL DS 1 ;VERTICAL POSN OF 1A61 = 0001 VRTCL1 DS 1 ; MESSAGE 1A62 = 0001 LETTER DS 1 ;EACH MESSAGE LETTER 1A63 = 0001 BLOCK DS 1 ;BLUE BLOCK PLAYER 1A64 = 0001 CONKEY DS 1 ;CONSOLE KEY PRESSED 1A65 = 0001 DIED DS 1 ;DIGDUG DIED (SNIFF!) ;LOBELO DS 1 ;FLAG ROCK FALLING 1A66 = 0001 STUCK DS 1 ;SHOULD FYGAR REENABLE 1A67 = 0001 TUNE8 DS 1 1A68 = 0002 FRTCNT DS 2 ;FRUIT EATEN? 1A6A = 0001 THATONE DS 1 1A6B = 0001 FCOUNT DS 1 1A6C = 0001 FLOENX DS 1 1A6D = 0001 FNUMT DS 1 1A6E = 0001 FNUMBR DS 1 1A6F = 0002 FLONUM DS 2 ;[,0]-LITTLE [,1]-BIG 1A71 = 0002 FLOLOW DS 2 1A73 = 0002 FLOHIGH DS 2 1A75 ZEROES 1A75 = 0001 HITCNT DS 1 1A76 = 0001 SQUARE DS 1 1A77 = 0001 HOINFL DS 1 1A78 = 0001 FIRWRN DS 1 1A79 = 0001 PAUSE DS 1 1A7A = 0001 TUNE6 DS 1 1A7B = 0001 TUNE9 DS 1 1A7C = 0001 TUNE15 DS 1 1A7D = 0001 TUNE13 DS 1 1A7E = 0001 TUNE12 DS 1 1A7F = 0001 IFLAGT DS 1 1A80 = 0001 TUNEND DS 1 1A81 = 0001 FGREEN DS 1 1A82 = 0001 DONTDIE DS 1 1A83 = 0001 LOBELO DS 1 1A84 = 0004 HTAB DS 4 1A88 = 0004 VTAB DS 4 1A8C = 0004 CORLOL DS 4 1A90 = 0004 CORHIL DS 4 1A94 = 0004 CORLOR DS 4 1A98 = 0004 CORHIR DS 4 1A9C = 0001 GHOCNT DS 1 1A9D = 0001 GHOSTOP DS 1 1A9E = 0004 GTOGGLE DS 4 1AA2 = 0001 LOMOVE DS 1 1AA3 = 0001 HIMOVE DS 1 1AA4 FFS ATARI CAMAC Assembler Ver 1.0A Page 13 D2:RAMDATA.ASM PAIR 1AA4 = 0002 BUMNST DS 2 1AA6 = 0002 BUCTR DS 2 1AA8 = 0001 WHICHM DS 1 1AA9 = 0001 CONSIDER DS 1 1AAA = 0001 OKFIRE DS 1 1AAB = 0001 BEHIND DS 1 1AAC = 0004 GHOTAB DS 4 1AB0 = 0004 NEWGHO DS 4 1AB4 = 0004 OLDGHO DS 4 LIST L 1AB8 SHOW ENDRAM ASSERT *<=$1B00 1AB8 = 2010 ORG $2010 2010 SHOW SCR 2010 SCR ;NOTE 142 BYTES FREE AT END 2010 = 1F40 DS SLINES*40 = 2010 VIRSCR = SCR 3F50 SCORLIN 3F50 = 0028 DS 40 3F78 = 1800 ORG $1800 1800 SHOW PMAREA 1800 PMAREA ;NOTE 768 BYTES FREE AT START ARE USED FOR RAM VARI: 1800 = 0800 DS [2*K] = 1B00 PLAY4 = PMAREA+768 = 1C00 PLAY0 = PMAREA+1024 = 1D00 PLAY1 = PMAREA+1280 = 1E00 PLAY2 = PMAREA+1536 = 1F00 PLAY3 = PMAREA+1792 2000 = 0400 ORG $0400 ;BUFFER SPACE 0400 SHOW RUN1 0400 = 0900 RUN1 DS 2304 0D00 FYGL2 0D00 = 0025 DS 37 0D25 FYGL3 0D25 = 0025 DS 37 0D4A FYGL4 0D4A = 0025 DS 37 0D6F = 0E00 ORG $0E00 ;SECOND PLAYERS BUFFER 0E00 SHOW RUN2 0E00 = 0900 RUN2 DS 2304 1700 FIRELT 1700 = 0027 DS 39 1727 BUFYLT 1727 = 0048 DS 72 176F DDL1 176F = 0011 DS 17 1780 DDL2 1780 = 0012 DS 18 1792 SHOW ENDRAM ASSERT *<=$1800 ATARI CAMAC Assembler Ver 1.0A Page 14 D1:DIGDUG.ASM PAIR ;ROM ALLOCATION ;-------------- 1792 = 8000 ORG $8000 8000 SHOW ROM 8000 SHOW SCOSET LIST L INCLUDE D1:SCOSET6.ASM ;(MODE IR6, ONE DIGDUG FIELD) ;SCOSET IS THE REVISED CHARACTER SET ;FOR DISPLAYING SCORES. ;VALUES $00-$09 ARE THE DIGITS. ;VALUE $0A IS THE DIGDUG. ;THERE ARE ONLY 12 CHARACTERS IN THE ;SET ($00-$0F) WHICH REQUIRE 96 ;BYTES OF ROM. 8000 SCOSET 8000 003C666666 DB $00,$3C,$66,$66,$66,$66,$3C,$00 8008 0018381818 DB $00,$18,$38,$18,$18,$18,$7E,$00 8010 003C660C18 DB $00,$3C,$66,$0C,$18,$30,$7E,$00 8018 007E0C180C DB $00,$7E,$0C,$18,$0C,$66,$3C,$00 8020 000C1C3C6C DB $00,$0C,$1C,$3C,$6C,$7E,$0C,$00 8028 007E607C06 DB $00,$7E,$60,$7C,$06,$66,$3C,$00 8030 003C607C66 DB $00,$3C,$60,$7C,$66,$66,$3C,$00 8038 007E060C18 DB $00,$7E,$06,$0C,$18,$30,$30,$00 8040 003C663C66 DB $00,$3C,$66,$3C,$66,$66,$3C,$00 8048 003C663E06 DB $00,$3C,$66,$3E,$06,$0C,$38,$00 8050 007EE0EAE0 DB $00,$7E,$E0,$EA,$E0,$3C,$9E,$CE 8058 0000000000 DB $00,$00,$00,$00,$00,$00,$00,$00 ;FORMAT OF SCORELINE: ; ; S(6)bD(6)bS(6) ; """""B(6)""""" ; ;WHERE ; ; b IS BLANK ; S(6) IS SCORE OF LENGTH 6 ; D(6) IS UP TO 6 DIGDUG'S ; B(6) IS BONUS OF LENGTH 6 ; ;NOTE: MIDDLE FIELD IS NORMALLY ; NUMBER OF DIGDUG'S EXCEPT ; WHEN BONUS SCORE FLASHES 8060 FIELD 8060 000E DB 0,14 ;START OF EACH FIELD 8062 SPOS 8062 000E07 DB 0,14,7 ;SCORE POSITION 8065 DPOS 8065 070C DB 7,12 ;DIGDUGS POSITION 8067 DDIR ATARI CAMAC Assembler Ver 1.0A Page 15 D1:SCOSET6.ASM PAIR 8067 01FF DB 1,-1 ;DISPLAY DIGDUGS ;LEFT TO RIGHT ;BPOS = 7 ;BONUS/HIGH SCORE POS = 0006 FLDLEN = 6 ;PERSON FIELD LENGTH = 0040 FLIPPER = $40 ;BIT TO FLIP IN FIELD = 0080 CH0 = $80 ;ZERO CHARACTER = 008A CHD = $8A ;DIGDUG CHARACTER = 008B CHB = $8B ;BLANK CHARACTER LIST L 8069 SHOW DLIST LIST L INCLUDE D1:DLIST6.ASM ;******** DISPLAY LIST ************* ;IMPORTANT!! ;--------- ;THE BEGINNING OF SCREEN RAM (SCR) ;SHOULD BEGIN ON A [4K+$10] BOUNDARY ;SO THAT THE RELOAD MEMORY SCAN IN ;THE DISPLAY LIST WILL OCCUR IN THE ;RIGHT PLACE (102 SCAN LINES PAST ;THE BEGINNING). 8069 DLIST 8069 70F0 DB $70,$F0 ;16 BLANKS+DLI ;SCORE--BAK=BLUE, SAND=BLUE 806B C6 DB $C6 ;MODE 6 (+DLI) AT... 806C 503F DW SCORLIN ;FIRST TWO LINES OF SKY-- ;BAK=BLUE, SAND=BLUE 806E 4E DB $4E ;MODE E AT SCR 806F 1020 DW SCR 8071 8E DB $8E ;NEXT 12 LINES OF SKY-- ;BAK=BLUE, SAND=FLOWER-COLORED ECHO 10 ;16 LINES+DLI DB $E ENDM 807C 8E0E DB $8E,$E ;LAST 2 LINES OF SKY-- ;BAK=BLUE, SAND=BLUE/YELLOW NUBS 807E 8E DB $8E 807F 0E DB $E ;SAND--BAK=BLACK, SAND=SAND ECHO 48 ;49 LINES+DLI ATARI CAMAC Assembler Ver 1.0A Page 16 D1:DLIST6.ASM PAIR DB $E ENDM 80B0 8E DB $8E ECHO 37 ;49 LINES+DLI DB $E ENDM 80D6 4E DB $4E ;(RELOAD SCREEN) 80D7 0030 DW SCR+[102*40] ECHO 10 DB $E ENDM 80E3 8E DB $8E ECHO 42 ;43 LINES+DLI DB $E ENDM 810E 8E DB $8E ECHO 43 ;43 LINES DB $E ENDM 813A 41 DB $41 ;JVB BACK TO START 813B 6980 DW DLIST LIST L = 813D ENDDLI EQU * 813D SHOW DLINT LIST L INCLUDE D1:DLINT.ASM ;*********** DLI **************** = 00FC EMPH = $FC ;COLOR OF EMPHASIS = 00F8 DEEMPH = $F8 ;COLOR OF DEEMPHASIS ;FIRST DLI FOR THE SCORELINE 813D DLINT PROC 813D 48 PHA 813E 98 TYA 813F 48 PHA 8140 A5CA LDA SBLUE ;FOR BACKGROUND & SKY 8142 A4CB LDY SEMPH ;EMPHASIZED SCORE 8144 8D0AD4 STA WSYNC 8147 8D1AD0 STA COLBK 814A 8D16D0 STA COLPF0 814D 8C18D0 STY COLPF2 8150 A5CC LDA SDEEMPH 8152 8D19D0 STA COLPF3 8155 A963 LDA #LOW DLINT2 8157 8D0002 STA VDSLST 815A A981 LDA #HIGH DLINT2 815C 8D0102 STA VDSLST+1 815F 68 PLA 8160 A8 TAY ATARI CAMAC Assembler Ver 1.0A Page 17 D1:DLINT.ASM PAIR 8161 68 PLA 8162 40 RTI EPROC ;SECOND DLI TO RESET COLOR REGISTERS ;FROM SCORELINE AND READ COLOR TABLES 8163 DLINT2 PROC 8163 48 PHA 8164 98 TYA 8165 48 PHA 8166 A5C9 LDA SRED ;SET POOKA TO RED 8168 8D0AD4 STA WSYNC 816B 8D18D0 STA COLPF2 816E ADC702 LDA COLOR3 ;RESTORE BLOWUP COLOR 8171 454F EOR COLRSH 8173 254E AND DRKMSK 8175 8D19D0 STA COLPF3 8178 A986 LDA #LOW DLINT3 817A 8D0002 STA VDSLST 817D A981 LDA #HIGH DLINT3 817F 8D0102 STA VDSLST+1 8182 68 PLA 8183 A8 TAY 8184 68 PLA 8185 40 RTI EPROC ;THIRD DLI TO READ COLOR TABLES 8186 DLINT3 PROC 8186 48 PHA 8187 98 TYA 8188 48 PHA 8189 A482 LDY COLIDX 818B B9CD00 LDA COLTBB,Y 818E 8D0AD4 STA WSYNC 8191 8D1AD0 STA COLBK 8194 B180 LDA (COLTBS),Y 8196 8D16D0 STA COLPF0 8199 E682 INC COLIDX 819B 68 PLA 819C A8 TAY 819D 68 PLA 819E 40 RTI EPROC LIST L 819F SHOW ROMDATA LIST L INCLUDE D2:ROMDATA.ASM ;ROMDATA.ASM ;----------- ;THIS FILE CONTAINS SOME OF THE ;UNCHANGING ROM TABLES AND ANIMATION ATARI CAMAC Assembler Ver 1.0A Page 18 D2:ROMDATA.ASM PAIR ;DATA FOR THE PROGRAM. ;***** ROM ***** ;SCREEN COLOR TABLES 819F COLORS 819F 4494FCF8 DB RED,BLUE,EMPH,DEEMPH ;COLTBB ;BACKGROUND COLOR TABLE 81A3 9494000000 DB $94,$94,0,0,0,0 ;COLTB1 ;SAND COLOR TABLE--ORANGE 81A9 38942C2925 DB $38,$94,$2C,$29,$25,$22 ; DB $46,$2C,$2C,$29,$25,$22 ;COLTB2 ;SAND COLOR TABLE--BLUE 81AF 389498142C DB $38,$94,$98,$14,$2C,$24 ; DB $46,$98,$98,$14,$2C,$24 ;COLTB3 ;SAND COLOR TABLE--GRAY 81B5 38940C08A8 DB $38,$94,$0C,$08,$A8,$60 ; DB $46,$0C,$0C,$08,$A8,$60 = 001C COLLEN = *-COLORS 81BB COLTBV ;OPT-SCR--SECOND SAND STRIPE 81BB 291408 DB $29,$14,$08 ;POINTERS TO COLOR TABLES 81BE CPTR 81BE D300 DW COLTB1 81C0 D900 DW COLTB2 81C2 DF00 DW COLTB3 ;POINTERS TO SCREEN-SAVE BUFFERS ;INDEXED BY PERSON 81C4 RUNL 81C4 00 DB LOW RUN1 81C5 00 DB LOW RUN2 81C6 RUNH 81C6 04 DB HIGH RUN1 81C7 0E DB HIGH RUN2 ;TABLE OF SCAN LINES INDEXED BY ;THE TUNNEL ROW = 0000 TL SET 0 81C8 TUNLIN ;TUNNEL STARTING SCAN LINES ECHO 10 DB TL TL SET TL+LPT ENDM = 0000 TR SET 0 81D2 TRBYT ;TUNNEL BYTE OFFSETS ECHO 10 DW TR ATARI CAMAC Assembler Ver 1.0A Page 19 D2:ROMDATA.ASM PAIR TR SET TR+[LPT*40] ENDM 81E6 TCBYT 81E6 0104070A0D DB 1,4,7,10,13,16,19,22 81EE 191C1F2225 DB 25,28,31,34,37 81F3 TABLEX ;WAS $9010 = 81F2 TABLEA = TABLEX-1 81F3 0020406080 DB 0,32,64,96,128,160,00,00,00 81FC 0000000000 DB 0,0,0,0,0,0,0 ;*** OFF SET TABLE *********** = 8202 TABLEU = *-1 ;* WAS $9020 = 8206 TABLER = *+3 = 820A TABLED = *+7 = 820E TABLEL = *+11 8203 880F3811FF DB $88,$0F,$38,$11,$FF,$5F 8209 5F61D85F88 DB $5F,$61,$D8,$5F,$88,$61 820F FF5D5F5F DB $FF,$5D,$5F,$5F ;*** LEFT STAMP DATA ********* 8213 LFTSTMP ;WAS $9051 8213 FCFFFCFFC0 DB $FC,$FF,$FC,$FF,$C0,$FF,$C0,$FF 821B C0FFC0FF00 DB $C0,$FF,$C0,$FF,$0,$FF,$00,$FF 8223 00FF00FFC0 DB $00,$FF,$0,$FF,$C0,$FF,$C0,$FF 822B C0FFC0FFFC DB $C0,$FF,$C0,$FF,$FC,$FF,$FC,$FF 8233 FCFFFCFF00 DB $FC,$FF,$FC,$FF,$00,$FF,$00,$FF 823B 00FF00FF00 DB $0,$FF,$0,$FF,$0,$FC,$00,$FC 8243 00FC00FC00 DB $0,$FC,$00,$FC,$00,$FF,$00,$FF 824B 00FF00FFFC DB $0,$FF,$0,$FF,$FC,$FF,$FC,$FF 8253 CCFFCCFF00 DB $CC,$FF,$CC,$FF,$00,$FC,$00,$FC 825B 00FC00FC00 DB $0,$FC,$0,$FC,$0,$F0,$00,$F0 8263 00F000F000 DB $0,$F0,$00,$F0,$00,$FC,$00,$FC 826B 00FC00FCCC DB $0,$FC,$0,$FC,$CC,$FF,$CC,$FF 8273 CCFFCCFF00 DB $CC,$FF,$CC,$FF,$00,$F0,$00,$F0 827B 00F000F000 DB $0,$F0,$0,$F0,$0,$C0,$00,$C0 8283 00C000C000 DB $0,$C0,$00,$C0,$00,$F0,$00,$F0 828B 00F000F0CC DB $0,$F0,$0,$F0,$CC,$FF,$CC,$FF ;*** RIGHT STAMP DATA ******* 8293 RTSTMP ;WAS $90D1 8293 FFFFFFFFFF DB $FF,$FF,$FF,$FF,$FF,$03,$FF,$03 829B FF03FF03FF DB $FF,$03,$FF,$03,$FF,$00,$FF,$00 82A3 FF00FF00FF DB $FF,$0,$FF,$00,$FF,$03,$FF,$03 82AB FF03FF03FF DB $FF,$03,$FF,$03,$FF,$FF,$FF,$FF 82B3 FFCFFFCFFF DB $FF,$CF,$FF,$CF,$FF,$00,$FF,$00 82BB FF00FF003F DB $FF,$0,$FF,$0,$3F,$0,$3F,$00 82C3 3F003F00FF DB $3F,$0,$3F,$00,$FF,$00,$FF,$00 82CB FF00FF00FF DB $FF,$0,$FF,$0,$FF,$CF,$FF,$CF 82D3 FFCFFFCF3F DB $FF,$CF,$FF,$CF,$3F,$00,$3F,$00 82DB 3F003F000F DB $3F,$0,$3F,$0,$0F,$0,$0F,$00 ATARI CAMAC Assembler Ver 1.0A Page 20 D2:ROMDATA.ASM PAIR 82E3 0F000F003F DB $0F,$00,$0F,$00,$3F,$00,$3F,$00 82EB 3F003F00FF DB $3F,$0,$3F,$0,$FF,$CF,$FF,$CF 82F3 FFCCFFCC0F DB $FF,$CC,$FF,$CC,$0F,$00,$0F,$00 82FB 0F000F0003 DB $0F,$00,$0F,$00,$03,$00,$03,$00 8303 030003000F DB $03,$00,$03,$00,$0F,$00,$0F,$00 830B 0F000F00FF DB $0F,$00,$0F,$00,$FF,$CC,$FF,$CC ;*** DIGDUG DATA ************* 8313 DDR1 ;WAS $9500 8313 00007EFFF0 DB 0,0,126,255,240,245,240 831A F01EBF9FCE DB 240,30,191,159,206,108 8320 C6F7 DB 198,247 ;OVERLAP OF 2 BYTES 8322 DDR2 8322 00007EFFF0 DB 0,0,126,255,240,245,240 8329 F01E9FC3FE DB 240,30,159,195,254,108 832F 6C7E00 DB 108,126,0 ;OVERLAP OF TWO BYTES ;DDL1 ;WAS $9530 ;DB 0,0,126,255,15,175,15 ;DB 15,120,253,249,115,54 ;DB 99,239,0,0 ;DDL2 ;DB 0,0,126,255,15,175,15 ;DB 15,120,249,195,127,54 ;DB 54,126,0,0,0 8332 DDD1 ;WAS $9560 8332 000068ECE6 DB 0,0,$68,$EC,$E6,$F3,$83 8339 ABAD8F8FAF DB $AB,$AD,$8F,$8F,$AF,$AD 833F CC48 DB $CC,$48 ;OVERLAP OF TGWO BYTES 8341 DDD2 8341 000068E5E3 DB 0,0,$68,$E5,$E3,$FB,$8E 8348 ACA88C8EAF DB $AC,$A8,$8C,$8E,$AF,$AF 834E CD4900 DB $CD,$49,0 ;OVERLAP OF TWO BYTES 8351 DDU1 ;WAS $9590 8351 000048CCAD DB 0,0,$48,$CC,$AD,$AF,$8F 8358 8FADAB83F3 DB $8F,$AD,$AB,$83,$F3,$E6 835E EC68 DB $EC,$68 ;OVERLAP OF TWO BYTES 8360 DDU2 8360 000049CDAF DB 0,0,$49,$CD,$AF,$AF,$8E 8367 8CA8AC8EFB DB $8C,$A8,$AC,$8E,$FB,$E3 836D E5680000 DB $E5,$68,0,0 ;OVERLAP OF ONE BYTE ;****** FYGAR DATA ****** 8371 FYGR1 ;WAS $9200 8371 00F00BBC2A DB $00,$F0,$0B,$BC,$2A,$A0,$22 8378 A003A03F80 DB $A0,$03,$A0,$3F,$80,$3F 837E 0008A82A00 DB $00,$08,$A8,$2A,$00,$22 8384 0022A80AA0 DB $00,$22,$A8,$0A,$A0,$02 838A 0000000000 DB 0,0,0,0,0,0,0,0,0,0,0 ;OVERLAP OF 1 BYTE ATARI CAMAC Assembler Ver 1.0A Page 21 D2:ROMDATA.ASM PAIR 8395 FYGR2 ;WAS $9230 8395 00F02C00C0 DB $0,$F0,$2C,$00,$C0,$AF,$00 839C 808A00800E DB $80,$8A,$00,$80,$0E,$00 83A2 80FE0000FE DB $80,$FE,$00,$00,$FE,$00 83A8 00200000A8 DB $00,$20,$00,$00,$A8,$00 83AE A08A00A08A DB $A0,$8A,$00,$A0,$8A,$00 83B4 A02A00800A DB $A0,$2A,$00,$80,$0A ;OVERLAP OF 1 BYTE 83B9 FYGR3 ;WAS $9260 83B9 00C0B30000 DB $0,$C0,$B3,0,$0,$BF,$02 83C0 002A02003A DB 0,$2A,$02,0,$3A,0 83C6 00FA0300F8 DB 0,$FA,$03,0,$F8,$03 83CC 00800000A0 DB 0,$80,0,$00,$A0,$02 83D2 802A02802A DB $80,$2A,$02,$80,$2A,$02 83D8 80AA00002A DB $80,$AA,0,0,$2A ;OVERLAP OF 1 BYTE 83DD FYGR4 ;WAS $9290 83DD 0000FC0200 DB $0,0,$FC,$02,0,$AF,$0A 83E4 00A80800E8 DB 0,$A8,$08,0,$E8,0 83EA 00E80F00E0 DB 0,$E8,$0F,0,$E0,$0F 83F0 00000200AA DB 0,0,$02,$00,$AA,$0A 83F6 0080080080 DB $00,$80,$08,$00,$80,$08 83FC 00AA0200A8 DB $00,$AA,$02,$00,$A8 ;OVERLAP OF 1 BYTE 8401 FYGL1 ;WAS $9400 8401 00E00FA83E DB $00,$E0,$0F,$A8,$3E,$88,$0A 8408 C00AFC0AFC DB $C0,$0A,$FC,$0A,$FC,$02 840E 2000A82A88 DB $20,$00,$A8,$2A,$88,$00 8414 8800A02A80 DB $88,$00,$A0,$2A,$80,$0A 841A 0000000000 DB 0,0,0,0,0,0,0,0,0,0,0 ;OVERLAP OF 1 BYTE ;FYGL2 ;WAS $9430 ; DB $0,$80,$F2,0,$A0,$3F,0 ;DB $20,$2A,0,0,$2B,0 ;DB $F0,$2B,0,$F0,$0B,0 ;DB $80,0,0,$A0,$02,0 ;DB $20,$AA,0,$20,$AA,0 ;DB $80,$AA,0,0,$2A,0 ;FYGL3 ;WAS $9460 ;DB $0,0,$CE,$03,$80,$FE,0 ;DB $80,$A8,0,0,$AC,0 ;DB $C0,$AF,0,$C0,$2F,0 ;DB 0,$02,0,$80,$0A,0 ;DB $80,$A8,$02,$80,$A8,$02 ;DB $00,$AA,$02,0,$A8,0 ;FYGL4 ;WAS $9490 ;DB $0,$00,$F8,$03,$00,$AA,$0F ;DB $00,$A2,$02,$00,$B0,$02 ;DB $00,$BF,$02,$00,$BF,$00 ;DB $00,$08,$00,$00,$AA,$0A ;DB $00,$22,$00,$00,$22,$00 ;DB $00,$A8,$0A,$00,$A0,$02 ;***** POOKA DATA ***** ATARI CAMAC Assembler Ver 1.0A Page 22 D2:ROMDATA.ASM PAIR ; ;BLINKING/NEW MASK/NEW FEET/BOUNCING 8425 LRPO1 8425 00 DB 0 8426 280A DB $28,$0A 8428 EC3B DB $EC,$3B 842A FC3F DB $FC,$3F 842C AC3E DB $AC,$3E 842E A83A DB $A8,$3A 8430 8828 DB $88,$28 8432 8828 DB $88,$28 8434 A83A DB $A8,$3A 8436 AC3E DB $AC,$3E 8438 FC3F DB $FC,$3F 843A F00F DB $F0,$0F ;overlap of 2 bytes 843C LRPO2 843C 00 DB 0 843D 008200 DB $00,$82,$00 8440 80A200 DB $80,$A2,$00 8443 B0EF00 DB $B0,$EF,$00 8446 F0FF00 DB $F0,$FF,$00 8449 B0FA00 DB $B0,$FA,$00 844C A0EA00 DB $A0,$EA,$00 844F 20A200 DB $20,$A2,$00 8452 A0AA00 DB $A0,$AA,$00 8455 A0EA00 DB $A0,$EA,$00 8458 B0FA00 DB $B0,$FA,$00 845B F0FF00 DB $F0,$FF,$00 845E C03F DB $C0,$3F ;OVERLAP OF ONE BYTE 8460 LRPO3 8460 00 DB 0 8461 000802 DB $00,$08,$02 8464 008A02 DB $00,$8A,$02 8467 C0BE03 DB $C0,$BE,$03 846A C0FF03 DB $C0,$FF,$03 846D C0EA03 DB $C0,$EA,$03 8470 80AA03 DB $80,$AA,$03 8473 808802 DB $80,$88,$02 8476 80AA02 DB $80,$AA,$02 8479 80AA03 DB $80,$AA,$03 847C C0EA03 DB $C0,$EA,$03 847F C0FF03 DB $C0,$FF,$03 8482 00FF DB $00,$FF ;OVERLAP OF ONE BYTE 8484 LRPO4 8484 00 DB 0 8485 008A02 DB $00,$8A,$02 8488 00FB0E DB $00,$FB,$0E 848B 00FF0F DB $00,$FF,$0F 848E 00AB0F DB $00,$AB,$0F 8491 00AA0E DB $00,$AA,$0E 8494 00220A DB $00,$22,$0A 8497 00220A DB $00,$22,$0A 849A 00AA0E DB $00,$AA,$0E 849D 00AB0F DB $00,$AB,$0F 84A0 00FF0F DB $00,$FF,$0F ATARI CAMAC Assembler Ver 1.0A Page 23 D2:ROMDATA.ASM PAIR 84A3 00FC03 DB $00,$FC,$03 84A6 0000 DB $0,$0 ;OVERLAP OF 1 BYTES ;***** ROCK DATA ***** 84A8 ROCK1D ;WAS $9300 84A8 00B000C00F DB 0,$B0,0,$C0,$0F,$F0,$3F,$F0,$2F 84B1 F02FF02FEC DB $F0,$2F,$F0,$2F,$EC,$3B,$FC,$3B 84B9 F00BF00BFC DB $F0,$0B,$F0,$0B,$FC,$0E,$F8,$00 84C1 0000000000 DB $00,$00,$00,$00,$00,$00,$00,0,0 ;OVERLAP OF 1 BYTE 84CA ROCK2D ;WAS $9320 84CA 0055553540 DB 0,$55,$55,$35,$40,$C5,$3F,$C5 84D2 3BF13BF13B DB $3B,$F1,$3B,$F1,$3B,$F1,$2F,$FC 84DA 2FFCCEF14B DB $2F,$FC,$CE,$F1,$4B,$F1,$53,$E1 84E2 5385541555 DB $53,$85,$54,$15,$55 84E7 ROCK3D ;WAS $9340 84E7 5555 DB $55,$55 ;OVERLAP WITH ABOVE 2 BYTES 84E9 551550C54F DB $55,$15,$50,$C5,$4F,$F1,$3F,$F1 84F1 2FF12FF12F DB $2F,$F1,$2F,$F1,$2F,$FC,$3B,$FC 84F9 3BF14BFC4B DB $3B,$F1,$4B,$FC,$4B,$FC,$4E,$F8 8501 5021554555 DB $50,$21,$55,$45,$55,$55,$55 8508 ROCKSD ;WAS $9360 8508 00C00FF03F DB $0,$C0,$0F,$F0,$3F,$30,$2F,$30 8510 2F302F3C0B DB $2F,$30,$2F,$3C,$0B,$3C,$3B,$3C 8518 3B3C0B0C0B DB $3B,$3C,$0B,$0C,$0B,$0C,$0E,$38 8520 0000000000 DB 0,0,0,0,0,0 ;OVERLAP OF 1 BYTE 8526 ROCKCD ;WAS $9380 8526 00C00FCC3D DB $0,$C0,$0F,$CC,$3D,$BC,$3C,$3C 852E 3F2C3A0000 DB $3F,$2C,$3A,0,0,0,0,0,0 8537 0000000000 DB 0,0,0,0,0,0,0,0 853F 0000000000 DB 0,0,0,0,0,0 ;GHOST ROM 8545 GHTAB 8545 5D85 DW FGHOS1 8547 6585 DW FGHOS2 8549 4D85 DW PGHOS1 854B 5585 DW PGHOS2 854D PGHOS1 854D 3C7E7E5A DB $3C,$7E,$7E,$5A 8551 5A7E7E66 DB $5A,$7E,$7E,$66 = 0008 GHOLEN = *-PGHOS1 8555 PGHOS2 8555 003C7E7E DB $00,$3C,$7E,$7E 8559 5A7E7E66 DB $5A,$7E,$7E,$66 855D FGHOS1 ATARI CAMAC Assembler Ver 1.0A Page 24 D2:ROMDATA.ASM PAIR 855D 42665A24 DB $42,$66,$5A,$24 8561 005A3C18 DB $00,$5A,$3C,$18 8565 FGHOS2 8565 245A6600 DB $24,$5A,$66,$00 8569 1824663C DB $18,$24,$66,$3C ;TABLES TO START DIGDUG OFF ON THE ;RIGHT FOOT 856D DDTAB 856D 1C01B42000 DB $1C,$01,$B4,$20,$00,$03 8573 0710000301 DB $07,$10,$00,$03,$01,$01,$00 = 000D DDLEN = *-DDTAB 857A 67007C840B DB $67,$00,$7C,$84,$0B,$0B 8580 0800000300 DB $08,$00,$00,$03,$00,$01,$0A 8587 PHTABR 8587 PHTABL 8587 03020100 DB 3,2,1,0 LIST L 858B IIGLOO I 858B EAEAEA LDR IIGLOO 858E SHOW INIT LIST L INCLUDE D2:INIT.ASM ;INIT.ASM ;-------- ;THIS FILE CONTAINS THE CARTRIDGE ;INITIALIZATION CODE AND THE NEW ;GAME INITIALIZATION CODE. ;EXECUTION BEGINS HERE--->>> 858E RUNHERE PROC ;DID YOU HEAR ABOUT THE NEW POLISH ;CURE FOR HERPES? EXTRA-STRENGTH ;TYLENOL! ;WHAT'S THE DIFFERENCE BETWEEN TRUE ;LOVE AND HERPES???? ;HERPES IS FOREVER!!!! = 0001 IF DEBUG 858E A900 LDA #0 8590 8583 STA ARGH ENDIF ; LDA #$18 8592 8599 STA HDUMMY ;REBARF ; LDA #00 ; STA LDUMMY ;BARF *Error page 24 ATARI CAMAC Assembler Ver 1.0A Page 25 D2:INIT.ASM PAIR ; STA (LDUMMY),Y ; INY ; BNE BARF ; INC HDUMMY ; LDA HDUMMY ; CMP #$40 ; BNE REBARF 8594 D8 CLD ;DEFAULT BINARY ARITH 8595 20B785 JSR ONETIM ;ONE-TIME INITIAL'N 8598 REOPT ;SET UP PLAYER/MISSILE GRAPHICS 8598 A918 LDA #HIGH PMAREA 859A 8D07D4 STA PMBASE 859D A911 LDA #$11 ;5TH PLAYER ENABLE, 859F 8D6F02 STA GPRIOR ;P/PF PRIORITIES 85A2 209186 JSR HELEN ;OPTION SCREEN 85A5 REGAME 85A5 20D385 JSR INIT ;INIT THE GAME SCREEN 85A8 AGAIN 85A8 20DEB8 JSR DAMMIT ;SETUP RIGHT COLORS 85AB 2054B8 JSR NOSOUND ;TURN OFF SOUND 85AE 201486 JSR NEWGAM ;INIT NEW GAME 85B1 207B86 JSR ROMDBS ;SET UP RAM FROM ROM 85B4 4CF489 JMP RESTRT ;AND PLAY IT! ;*** ONETIM *** ; ;ONE-TIME INITIALIZATION FOR GAME 85B7 ONETIME 85B7 PROC ;SET BONUS TIMER OFF, AND INIT ;HIGH SCORE TO ZERO 85B7 A900 LDA #0 85B9 8D081A STA BTIMER 85BC 8D1218 STA SCOREH+3 85BF 8D1618 STA SCOREM+3 85C2 8D1A18 STA SCOREL+3 ;INITIAL STARTING LEVEL IS ;LEVEL ONE WITH ONE-PERSON GAME 85C5 A901 LDA #1 ;DEFAULT 1-PERSON 85C7 8D2F1A STA TWOTWO ;GAME 85CA 8D511A STA SLEVEL ;INITIAL VEGGIE LEVEL 85CD A916 LDA #22 ;LENGTH OF CENTER 85CF 8D3A1A STA TUNLEN+1 ;TUNNEL 85D2 60 RTS EPROC ATARI CAMAC Assembler Ver 1.0A Page 26 D2:INIT.ASM PAIR ;*** INIT *** ; ;THIS ROUTINE IS CALLED EACH TIME ;WE GO FROM THE OPTION SCREEN TO ;THE GAME SCREEN. ;ALSO TURN OFF ANTIC AND DON'T TURN ;IT BACK ON!!! 85D3 INIT 85D3 PROC ;SET DLI AND VBI, ENABLE ;INTERRUPTS 85D3 A900 LDA #0 85D5 8D2F02 STA SDMCTL ;TURN OFF ANTIC 85D8 202BB8 JSR DELAY ;WAIT FOR VERT. SYNC. 85DB A2B8 LDX #HIGH VBI 85DD A098 LDY #LOW VBI 85DF A907 LDA #7 85E1 205CE4 JSR SETVBV ;VBI 85E4 A93D LDA #LOW DLINT ;DLI 85E6 8D0002 STA VDSLST 85E9 A981 LDA #HIGH DLINT 85EB 8D0102 STA VDSLST+1 85EE A900 LDA #0 85F0 8582 STA COLIDX 85F2 A9FF LDA #$FF 85F4 8D0ED4 STA NMIEN ;INIT "PLAYER ONE/TWO READY" ;SCREEN'S CHARACTER COLOR 85F7 A994 LDA #BLUE 85F9 8DC402 STA COLOR0 85FC A90F LDA #WHITE 85FE 8DC302 STA PCOLR3 ;GHOSTS 8601 8DC702 STA COLOR3 ;SET ADDRESS FOR VEGETABLES TO ;APPEAR 8604 A9C1 LDA #LOW [SCR+$FB1] 8606 8D521A STA GARDEN 8609 A92F LDA #HIGH [SCR+$FB1] 860B 8D531A STA GARDEN+1 ;WHERE THE VEGGY IS AT 860E A901 LDA #1 8610 8D5A1A STA NUBFLG 8613 60 RTS EPROC ;*** NEWGAM *** ; ;INITIALIZE NEW GAME. ATARI CAMAC Assembler Ver 1.0A Page 27 D2:INIT.ASM PAIR 8614 NEWGAM PROC 8614 AD2F1A LDA TWOTWO ;TWO-PERSON GAME? 8617 8D0018 STA NPRSNS 861A A201 LDX #1 861C :LOOP 861C AD511A LDA SLEVEL ;STARTING LEVEL 861F 9D0B18 STA GLEVEL,X ;INTO GAME LEVEL 8622 DE0B18 DEC GLEVEL,X 8625 20918C JSR MODELT ;MOD. OF GAME LEVEL 8628 A900 LDA #0 862A 9D0F18 STA SCOREH,X ;SCORE HIGH 862D 9D1318 STA SCOREM,X ;SCORE MIDDLE 8630 9D1718 STA SCOREL,X ;SCORE LOW 8633 9D1B18 STA LIVE,X ;LIVE MONSTERS 8636 9D1B1A STA MENLEV,X ;SCORE FOR EXTRA MAN 8639 9D681A STA FRTCNT,X 863C 9D4619 STA GAMENEW,X ;TELLING ENTER THIS IS GRAND ENTRAN: 863F A903 LDA #NUMMEN ;STARTING # OF MEN 8641 9D0918 STA MEN,X 8644 CA DEX 8645 10D5 ^861C BPL :LOOP 8647 20C2AD JSR SETSCO ;INITIALIZE SCORELINE 864A A201 LDX #1 864C 2061AE JSR FLPSCO ;DEEMPH. PERSON TWO 864F A200 LDX #0 ;START WITH PERSON 0 8651 86ED STX PERSON 8653 8E651A STX DIED 8656 20DDAD JSR SHOMEN ;SHOW NUMBER OF MEN 8659 60 RTS EPROC 865A ZDWNSTMP ;WAS $9030 865A 0005500550 DB $00,$05,$50,$05,$50,$01,$40 8661 0140014001 DB $01,$40,$01,$40,$01,$40,0,0 8669 0000 DB 0,0 866B ZUPSTMP ;WAS $9041 866B 0000000001 DB $0,$0,$0,$0,$01,$40,$01,$40 8673 0140014005 DB $01,$40,$01,$40,$05,$50,$05,$50 867B ROMDBS 867B PROC 867B A220 LDX #[17+16-1] 867D :LOOPZ 867D BD5A86 LDA ZDWNSTMP,X 8680 9DA419 STA DWNSTMP,X 8683 CA DEX 8684 10F7 ^867D BPL :LOOPZ 8686 A23F LDX #[64-1] 8688 A900 LDA #00 868A :LOOPP 868A 9DC519 STA ZERDAT,X 868D CA DEX ATARI CAMAC Assembler Ver 1.0A Page 28 D2:INIT.ASM PAIR 868E 10FA ^868A BPL :LOOPP 8690 60 RTS EPROC LIST L 8691 SHOW TITLE LIST L INCLUDE D1:TITLE.ASM ;TITLE.ASM ;--------- ;THIS FILE CONTAINS ROUTINES FOR ;THE TITLE/OPTION SCREEN. = 8691 SAVORG EQU * 8691 = 2010 ORG SCR 2010 = 001C PLYER1 DS 28 ;"PLAYER1" 202C = 000C PLYER2 DS 12 ;"PLAYER2" 2038 = 0017 SINGLE DS 23 204F = 0011 SWITCH DS 17 2060 = 0258 PLACE DS 15*40 = 22B8 VEG EQU * 22B8 = 8691 ORG SAVORG = 0070 BLANK8 = $70 = 0030 BLANK4 = $30 = 0041 JMPWT = $41 = 0040 RELOAD = $40 = 0080 INT = $80 ;********* THIS ROUTINE ********** ; PLACES THE OPTION PAGE ; ON THE SCREEN ; IF OPTION KEY IS PUSHED ; THE LEVELS OF VEGETABLES APPEAR ; THE SELECT KEY CHOOSES THE ; NUMBER OF PLAYERS ; THE START KEY BEGINS THE GAME ;DISPLAY LIST 8691 HELEN 8691 PROC 8691 A900 LDA #00 ;TURNS ANTIC OFF ; STA SDMCTL ;THIS SEEMS TO MESS UP THE START OF P: 8693 A980 LDA #LOW DISP ; DISPLAY LIST 8695 8D3002 STA SDLSTL ; ADDRESS 8698 A988 LDA #HIGH DISP 869A 8D3102 STA SDLSTH 869D A288 LDX #HIGH VBIHEL 869F A051 LDY #LOW VBIHEL 86A1 A907 LDA #7 86A3 205CE4 JSR SETVBV ;HELEN'S VBI 86A6 A9C0 LDA #$C0 ;ENABLE INTERRUPTS 86A8 8D0ED4 STA NMIEN 86AB 203CB8 JSR NOPLAY ;GET P/M'S OFF SCR ATARI CAMAC Assembler Ver 1.0A Page 29 D1:TITLE.ASM PAIR 86AE 20E486 JSR INITE 86B1 200487 JSR COLRRR 86B4 202B87 JSR CLEAR ; JSR TITER ;PLACES "DIGDIG" 86B7 203B87 JSR SING 86BA 202BB8 JSR DELAY 86BD A922 LDA #$22 ;TURNS BACK ANTIC ON 86BF 8D2F02 STA SDMCTL 86C2 206BB5 JSR MUNIT ;INIT MUSIC 86C5 2054B8 JSR NOSOUND ;TURN OLD SOUND OFF = 86C8 LACARY SET * ;:AGA 86C8 2032B8 JSR DELAYS 86CB 2075B8 JSR CONS ;GET CONSOLE BUTTON 86CE 4A LSR A 86CF 900E ^86DF BCC :EXIT ;START KEY PRESSED? 86D1 208187 JSR CHOOSE 86D4 206F87 JSR SONGS 86D7 AD8402 LDA STRIG0 86DA 2D8502 AND STRIG1 86DD D0E9 ^86C8 BNE LACARY 86DF :EXIT 86DF A900 LDA #0 86E1 854D STA ATRACT ;TURN OFF ATTRACT WHEN STARTING WIT: 86E3 60 RTS EPROC ;************* THIS ROUTINE********** ;LOADS INITIAL VALUES INTO COUNTERS 86E4 INITE 86E4 PROC 86E4 A9CA LDA #LOW [VEG+18] ;WHERE VEGS 86E6 8D521A STA GARDEN ;SHOULD GROW 86E9 A922 LDA #HIGH [VEG+18] 86EB 8D531A STA GARDEN+1 86EE A902 LDA #2 86F0 8D3319 STA ROCKCO ;SO VEGS ARE DISPLAYD 86F3 A900 LDA #0 86F5 8D6419 STA VERASE 86F8 8D6519 STA VERASE+1 86FB 8D5A1A STA NUBFLG ;NO NUBS 86FE A9E0 LDA #HIGH CHASET 8700 8DF402 STA CHBAS 8703 60 RTS EPROC ;************* THIS ROUTINE********** ; LOADS IN THE INITIAL COLORS 8704 COLRRR ;TIS TIME FOR COLOR 8704 PROC 8704 A900 LDA #BLACK 8706 8DC602 STA COLOR2 8709 8DC802 STA COLOR4 ATARI CAMAC Assembler Ver 1.0A Page 30 D1:TITLE.ASM PAIR 870C A994 LDA #BLUE 870E 8DC502 STA COLOR1 8711 A90F LDA #WHITE 8713 8DC402 STA COLOR0 8716 60 RTS EPROC ;*** SHOW VEGETABLE FOR THIS LEVEL ** 8717 SHOVEG 8717 PROC 8717 AD511A LDA SLEVEL ;CURRENT LEVEL 871A 201C94 JSR LEVCOL ;FIND ITS COLOR LEVEL 871D AA TAX 871E BDBB81 LDA COLTBV,X ;GET SAND COLOR FOR 8721 8D571A STA COLVG ;VEGETABLE 8724 AD511A LDA SLEVEL 8727 20BCAB JSR CONVEG ;DISPLAY THE VEG 872A 60 RTS EPROC ;************* THIS ROUTINE********** ; CLEARS THE VEGGIE AREA: 14 SCAN ; LINES. ; CLEARS THE DIGDUG TITLE AREA: ; 13 SCAN LINES. 872B CLEAR 872B PROC 872B A9B8 LDA #LOW VEG ;PTRS FOR VEG AREA 872D 8584 STA SCRPTR ; ARE LOADED 872F A922 LDA #HIGH VEG 8731 8585 STA SCRPTR+1 8733 A20E LDX #14 ;14 SCAN LINES 8735 A900 LDA #00 ;CLEARED TO ZERO 8737 206F8F JSR SETLIN ; LDA #LOW PLACE ;PTRS FOR DD AREA ; STA SCRPTR ; ARE LOADED ; LDA #HIGH PLACE ; STA SCRPTR+1 ; LDX #13 ;13 SCAN LINES ; LDA #00 ;CLEARED TO ZERO ; JSR SETLIN 873A 60 RTS ;************* THIS ROUTINE********** ; LOADS THE TITLE "DIGDUG" ; THERE ARE 14 BLANKS THEN 12 BYTES ;FOR LETTERS "DIG DUG" THEN 14 MORE ;BLANKS ;THIS GOES ON FOR 13 SCAN LINES ;TITER ; PROC ; LDA #LOW PLACE ;PTRS FOR LOADING ATARI CAMAC Assembler Ver 1.0A Page 31 D1:TITLE.ASM PAIR ; STA SCRPTR ; LDA #HIGH PLACE ; STA SCRPTR+1 ; LDA #13 ;NUMBER OF LINES ; STA FINISH ; LDX #0 ;INDEX TITLE DATA ; ;:LINELOOP ; LDY #14 ;INDEX TITLE AREA ;LACARY SET * ;:TLOOP ; LDA TITEL,X ; STA (SCRPTR),Y ; INX ; INY ; CPY #26 ;L CC LACARY ; CLC ; LDA SCRPTR ; ADC #40 ; STA SCRPTR ; BCC :NEXT ; INC SCRPTR+1 ;:NEXT ; DEC FINISH ; BNE :LINELOOP ; RTS ; EPROC ;************* THIS ROUTINE********** ;RTN FOR LOADING CHANGEABLE LINES ; ON SCREEN ;"PLAYER1 HIGH SCORE PLAYER2 (BLANKS) ;"000000 000000 000000 (OR BLANKS) ;" PRESS SELECT FOR 1(OR 2) PLAYER ;GAME" 873B SING 873B PROC 873B A227 LDX #39 = 873D LACARY SET * ;:PLTEXT 873D BDAF89 LDA PDATA1,X ;THE TEXT LINES 8740 9D1020 STA PLYER1,X ;ARE PLACED 8743 BD8B89 LDA SINDATA,X ;ON THE SCREEN 8746 9D3820 STA SINGLE,X 8749 CA DEX 874A 10F1 ^873D BPL LACARY 874C AD2F1A LDA TWOTWO ;IF TWO-PLAYER 874F C902 CMP #2 ;THEN PUT UP PLAYER 2 8751 9010 ^8763 BCC :SKIP 8753 A992 LDA #146 8755 8D4F20 STA SWITCH 8758 A207 LDX #7 = 875A LACARY SET * ;:GOE ATARI CAMAC Assembler Ver 1.0A Page 32 D1:TITLE.ASM PAIR 875A BDD789 LDA PDATA2,X ;PUTS IN "PLAYER 875D 9D2C20 STA PLYER2,X ; 2" ABOVE SCORE 8760 CA DEX 8761 10F7 ^875A BPL LACARY ;:GOE 8763 :SKIP 8763 20C2AD JSR SETSCO 8766 A203 LDX #3 8768 2018AE JSR SHOSCO ;SHOW HIGH SCORE 876B 201787 JSR SHOVEG ;DISPLAY FRUIT 876E 60 RTS EPROC 876F SONGS 876F 60 RTS 8770 AD8702 LDA STRIG0+3 8773 D00B ^8780 BNE :ESONG 8775 A213 LDX #19 8777 :CSONG 8777 BDE089 LDA DSONG,X 877A 9D3820 STA SINGLE,X 877D CA DEX 877E D0F7 ^8777 BNE :CSONG 8780 :ESONG 8780 60 RTS ;************* THIS ROUTINE********** ;CONTINUALLY CHECKS THE RESET,OPTION, ;AND SELECT KEYS ;THE RESET KEY--STARTS CODE AGAIN ;OPTION KEY --CHANGES THE LEVEL OF ; VEGETABLE LEVELS ARE ; 1,2,3,4,6,8,10,12,14,16,18 ;SELECT KEY-- CHANGES THE 1 AND ; 2 OF "1 PLAYER GAME" .IT PUTS ; PLAYER 2 ABOVE SCORE LINE AND ; WRITES IN SCORE. WHEN HIT AGAIN IT ; ERASES THESE SAME ITEMS 8781 CHOOSE 8781 PROC ; LDA NMIST ;CHECK FOR ; AND #$20 ;RESET BUTTON ; CMP #$20 ; BNE SEC ; JMP HELEN ;SEC 8781 4A LSR A ;SELECT BUTTON 8782 9022 ^87A6 BCC :PLYERNO 8784 4A LSR A ;OPTION BUTTON 8785 9001 ^8788 BCC *+3 8787 60 RTS ;NOTHING PRESSED ;:VEGGY 8788 EE511A INC SLEVEL ;NEXT STARTING LEVEL 878B AD511A LDA SLEVEL 878E C911 CMP #16+1 ;IF PAST LAST LEVEL, ATARI CAMAC Assembler Ver 1.0A Page 33 D1:TITLE.ASM PAIR 8790 9005 ^8797 BCC :LEVOK ;THEN START AGAIN 8792 A901 LDA #1 ;AT LEVEL 1 8794 8D511A STA SLEVEL 8797 :LEVOK 8797 C905 CMP #5 ;IF AT LEVEL 4 & UP, 8799 9003 ^879E BCC :SINGLE ;THEN INCR AGAIN 879B EE511A INC SLEVEL ;COS' VEGS REPEAT 879E :SINGLE 879E A913 LDA #19 ;EATING FRUIT SOUND 87A0 85F6 STA NTUNE 87A2 201787 JSR SHOVEG ;DISPLAY THE FRUIT 87A5 60 RTS 87A6 :PLYERNO ;SWITCH GAME FROM DOUBLES TO SINGLE 87A6 AD2F1A LDA TWOTWO ;HOLDS 1 OR 2 87A9 4903 EOR #3 ; SWITCHES THEM 87AB 8D2F1A STA TWOTWO 87AE A207 LDX #7 87B0 86F6 STX NTUNE ;PLAY EXTRA MAN TUNE 87B2 2032B8 JSR DELAYS 87B5 38 SEC 87B6 A993 LDA #147 ;SUBTRACT FROM 147 87B8 ED2F1A SBC TWOTWO ; TO PLACE 2 OR 1 87BB 8D4F20 STA SWITCH ; ON SCREEN 87BE C992 CMP #146 87C0 F00F ^87D1 BEQ :EMTY ;IF 1 CLEAR SCORE ;IF 2 THEN FILL IN PLAYER2 87C2 :FILLIN = 87C2 LACARY SET * ;:GOE 87C2 BDD789 LDA PDATA2,X ;PUTS IN "PLAYER 87C5 9D2C20 STA PLYER2,X ; 2" ABOVE SCORE 87C8 CA DEX 87C9 10F7 ^87C2 BPL LACARY 87CB A201 LDX #1 87CD 2018AE JSR SHOSCO 87D0 60 RTS 87D1 :EMTY 87D1 A900 LDA #00 ;ERASES PLAYER 2 87D3 9D2C20 STA PLYER2,X 87D6 CA DEX 87D7 1003 ^87DC BPL *+5 87D9 60 RTS ;:EM 87DA F0F5 ^87D1 BEQ :EMTY ; ERASES SCORE 87DC A98B LDA #CHB 87DE 9D5E3F STA SCORLIN+14,X 87E1 D0EE ^87D1 BNE :EMTY ;ALWAYS JUMP TO EMTY - SAVING 1 BYT: ;************* THIS ROUTINE********** ATARI CAMAC Assembler Ver 1.0A Page 34 D1:TITLE.ASM PAIR ; IS THE DISPLAY LIST INTERRUPT ;THERE ARE FIVE ROUTINES ; . CHANGE CHARACTER SET TO THE ; SPECIAL MODE 6 SCORE SET, AND ; CHANGE COLPF2 TO WHITE ; . CHANGE BACK TO THE REGULAR ; CHARACTER SET, AND CHANGE COLPF2 ; TO PINK ; . CHANGE 3 COLOR REGS TO ; RED, GREEN, AND SAND OF THE ; VEGETABLE ; . CHANGE THOSE REGS BACK TO ; ORIGINAL COLORS ; . CHANGE COLPF2 BACK TO BLACK ; (IT'S THE BACKGRD COLOR FOR ; MODE 1) 87E3 BACK1 ;SCORE CHAR SET & 87E3 48 PHA ;COLPF2 87E4 8A TXA 87E5 48 PHA 87E6 98 TYA 87E7 48 PHA 87E8 AC581A LDY INDEX1 87EB B94588 LDA CHSET,Y 87EE B6BC LDX COLR,Y 87F0 8D0AD4 STA WSYNC 87F3 8D09D4 STA CHBASE 87F6 8E18D0 STX COLPF2 87F9 C8 INY 87FA C002 CPY #2 87FC D00A ^8808 BNE :EXIT1 87FE A911 LDA #LOW BACK2 8800 8D0002 STA VDSLST 8803 A988 LDA #HIGH BACK2 8805 8D0102 STA VDSLST+1 8808 :EXIT1 8808 8C581A STY INDEX1 880B 68 PLA 880C A8 TAY 880D 68 PLA 880E AA TAX 880F 68 PLA 8810 40 RTI 8811 BACK2 ;3 COLOR REGS 8811 48 PHA 8812 8A TXA 8813 48 PHA 8814 98 TYA 8815 48 PHA 8816 AC591A LDY INDEX2 8819 B9BF00 LDA COLVG0,Y 881C B6C1 LDX COLVG1,Y 881E 8D0AD4 STA WSYNC 8821 8D16D0 STA COLPF0 ATARI CAMAC Assembler Ver 1.0A Page 35 D1:TITLE.ASM PAIR 8824 8E17D0 STX COLPF1 8827 B9C300 LDA COLVG2,Y 882A 8D18D0 STA COLPF2 882D C8 INY 882E C002 CPY #2 8830 D00A ^883C BNE :EXIT2 8832 A9E3 LDA #LOW BACK1 8834 8D0002 STA VDSLST 8837 A987 LDA #HIGH BACK1 8839 8D0102 STA VDSLST+1 883C :EXIT2 883C 8C591A STY INDEX2 883F 68 PLA 8840 A8 TAY 8841 68 PLA 8842 AA TAX 8843 68 PLA 8844 40 RTI 8845 CHSET 8845 80 DB HIGH SCOSET 8846 E0E0 DB HIGH CHASET,HIGH CHASET 8848 OPTCOL 8848 0F4600 DB WHITE,PINK,BLACK 884B 000F DB 0,WHITE ;COLVG FILLS IN 0 884D C894 DB GREEN,BLUE 884F 4446 DB RED,PINK ;VERTICAL BLANK INTERRUPT ROUTINE 8851 VBIHEL 8851 PROC ;SET FIRST DLI AND ATTRACT MODE 8851 A900 LDA #0 8853 8D581A STA INDEX1 8856 8D591A STA INDEX2 8859 A9E3 LDA #LOW BACK1 ;DLI ADDRESS 885B 8D0002 STA VDSLST 885E A987 LDA #HIGH BACK1 8860 8D0102 STA VDSLST+1 8863 A208 LDX #8 = 8865 LACARY SET * ;:LOOP 8865 BD4888 LDA OPTCOL,X ;FROM ROM 8868 454F EOR COLRSH 886A 254E AND DRKMSK 886C 95BC STA OPTCUL,X ;INTO RAM 886E CA DEX 886F 10F4 ^8865 BPL LACARY ;:LOOP 8871 AD571A LDA COLVG ;SAND COLOR FROM RAM 8874 454F EOR COLRSH 8876 254E AND DRKMSK 8878 85BF STA COLVG0 ;INTO RAM ATARI CAMAC Assembler Ver 1.0A Page 36 D1:TITLE.ASM PAIR ;CALL MUSIC ROUTINE!! 887A 2080B5 JSR MUSICK 887D 4C62E4 JMP DEFRTN EPROC 8880 DISP 8880 70 DB BLANK8 8881 70 DB BLANK8 8882 70 DB BLANK8 8883 C2 DB INT+RELOAD+2 8884 1020 DW PLYER1 8886 C6 DB INT+RELOAD+6 8887 503F DW SCORLIN 8889 7030 DB BLANK8,BLANK4 888B 47 DB RELOAD+7 888C B888 DW TITEL ; DB RELOAD+$D ; DW PLACE ; DB $0D,$0D,$0D,$0D,$0D,$0D ; DB $0D,$0D,$0D,$0D,$0D,$0D 888E 7030 DB BLANK8,BLANK4 8890 46 DB RELOAD+6 8891 CA88 DW VLEVEL 8893 86 DB INT+6 8894 70 DB BLANK8 8895 4E DB RELOAD+$0E 8896 B822 DW VEG 8898 0E0E0E DB $0E,$0E,$0E 889B 0E0E0E0E DB $0E,$0E,$0E,$0E 889F 0E0E0E0E DB $0E,$0E,$0E,$0E 88A3 8E DB $0E+INT 88A4 70 DB BLANK8 88A5 46 DB RELOAD+6 88A6 3820 DW SINGLE 88A8 06 DB 6 88A9 70 DB BLANK8 88AA 46 DB RELOAD+6 88AB F088 DW STAR 88AD 06 DB 6 88AE 70 DB BLANK8 88AF F0 DB INT+BLANK8 88B0 42 DB RELOAD+2 88B1 1389 DW COPY 88B3 0202 DB 2,2 88B5 41 DB JMPWT 88B6 8088 DW DISP ;SCREEN DISPLAY AREA ; ;DO NOT SEPARATE THESE FOLLOWING LABELS 88B8 TITEL ATARI CAMAC Assembler Ver 1.0A Page 37 D1:TITLE.ASM PAIR 88B8 0000000000 DB 0,0,0,0,0,0,36,41,39,0 88C2 2435270000 DB 36,53,39,0,0,0,0,0 88CA VLEVEL 88CA 0000303225 DB 0,0,48,50,37,51,51,0,111,112 88D4 74696F6E00 DB 116,105,111,110,0,52,47,0,0,0 88DE 002328212E DB 0,35,40,33,46,39,37,0,36,41,38 88E9 262923352C DB 38,41,35,53,44,52,57 88F0 STAR 88F0 0000303225 DB 0,0,48,50,37,51,51,0,115,116,97 88FB 727400342F DB 114,116,0,52,47,0,0,0,0 8904 0000000030 DB 0,0,0,0,48,44,33,57,0,39,33,45 8910 250000 DB 37,0,0 8913 COPY 8913 0000000000 DB 0,0,0,0,0,35,47,48,57,50,41,39 891F 2834000823 DB 40,52,0,8,35,9,0,17,25,24 8929 1200213421 DB 18,0,33,52,33,50,41,12,0,41,46 8934 230E000000 DB 35,14,0,0,0,0,0 893B 0000000000 DB 0,0,0,0,0,35,47,48,57,50,41,39 8947 2834000823 DB 40,52,0,8,35,9,0,17,25,24 8951 12002E212D DB 18,0,46,33,45,35,47,0,0,0,0 895C 0000000000 DB 0,0,0,0,0,0,0 8963 0000000000 DB 0,0,0,0,0,0,0,0,0,0,33,44,44,0 8971 3229272834 DB 50,41,39,40,52,51,0,50,37,51 897B 2532362524 DB 37,50,54,37,36 8980 0000000000 DB 0,0,0,0,0,0,0,0,0,0,0 898B SINDATA 898B 0000303225 DB 0,0,48,50,37,51,51,0,115,101,108 8996 6563740026 DB 101,99,116,0,38,47,50,0,0 899F 000000 DB 0,0,0 89A2 SWIDATA 89A2 92 DB 146 89A3 00302C2139 DB 0,48,44,33,57,37,50,0,39,33,45 89AE 25 DB 37 89AF PDATA1 89AF 0000000030 DB 0,0,0,0,48,44,33,57,37,50,0 89BA 1100000028 DB 17,0,0,0,$28,$29,$27,$28,$0,$33 89C4 232F322500 DB $23,$2F,$32,$25,0,0,0 89CB 0000000000 DB 0,0,0,0,0,0,0,0,0,0,0,0 ;DONOT SEPARATE THESE TWO 89D7 PDATA2 89D7 302C213925 DB 48,44,33,57,37,50,0,18 89DF 00 DB 0 89E0 DSONG 89E0 0000 DB 0,0 ATARI CAMAC Assembler Ver 1.0A Page 38 D1:TITLE.ASM PAIR 89E2 0029002429 DB 0,41,0,36,41,39,0,43 89EA 2134283239 DB 33,52,40,50,57,46,0,0,0,0 LIST L 89F4 SHOW RESTRT LIST L INCLUDE D2:RESTRT.ASM ;RESTART.ASM ;----------- ;THIS FILE CONTAINS CODE TO ; . ADVANCE TO A NEW LEVEL ; . RESTART DIGDUG AT THE CURRENT ; LEVEL ; . KEEP TRACK OF DETAILS FOR ; SWAPPING RESOURCES IN TWO-PLAYER ; GAME 89F4 PROC 89F4 RESTRT ;IMPORTANT!!! ;------------ ;AT RESTRT, X IS SET TO THE ;VALUE OF PERSON...IT SHOULD ;NOT BE PERMANENTLY MODIFIED ;UNTIL THE BEGINNING OF PLAYLOOP. 89F4 A6ED LDX PERSON ;CURRENT PERSON 89F6 A900 LDA #0 89F8 8D2D1A STA NLFLAG ;NEW LEVEL FLAG 89FB 20818B JSR CLEANUP ;CLEAN UP VARIABLES ;CHECK IF THIS PERSON HAS ANY MEN ;LEFT; IF NOT THEN THE GAME IS ;OVER. 89FE BD0918 LDA MEN,X ;ANY MEN LEFT? 8A01 D00B ^8A0E BNE :MOREMEN;FALL THRU--MEN DEAD 8A03 20F98A JSR GAMOVR ;GAME OVER FOR PERSON 8A06 CE0018 DEC NPRSNS ;ONE LESS PERSON 8A09 D062 ^8A6D BNE :TWOPLY ;SOMEONE STILL GOING? 8A0B 4C5891 JMP ALLOVER ;NO ONE PLAYING NOW 8A0E :MOREMEN 8A0E AD651A LDA DIED ;DID DIGDUG DIE? 8A11 F072 ^8A85 BEQ :NEWLEV ;IF NO, MONSTERS DEAD 8A13 AD0018 LDA NPRSNS ;TWO-PERSON GAME? 8A16 C902 CMP #2 ;... 8A18 B053 ^8A6D BCS :TWOPLY ;... 8A1A BD1B18 LDA LIVE,X ;ANY MONSTERS LEFT? 8A1D F066 ^8A85 BEQ :NEWLEV ;IF NOT, NEW LEVEL 8A1F A940 LDA #PSCR ;PLAYER-SCREEN 8A21 20B792 JSR SETSCR ;SET SCREEN 8A24 4C928A JMP :COMMON ;CONTINUE THIS LEVEL 8A27 SWAPING 8A27 A903 LDA #03 ATARI CAMAC Assembler Ver 1.0A Page 39 D2:RESTRT.ASM PAIR 8A29 8598 STA LDUMMY 8A2B :LOOP 8A2B A698 LDX LDUMMY ;# OF THIS SWAP 8A2D 20B18E JSR SETPOINT ;SET UP POINTERS 8A30 BC3B8A LDY :DEPTH,X ;LENGHT OF TABLE-1 8A33 205B8A JSR MIRROR 8A36 C698 DEC LDUMMY 8A38 10F1 ^8A2B BPL :LOOP 8A3A 60 RTS 8A3B :DEPTH 8A3B 26471011 DB 38,71,16,17 8A3F TABFR 8A3F 4C DB LOW FIRERT 8A40 FF DB LOW BUFYRT 8A41 13 DB LOW DDR1 8A42 22 DB LOW DDR2 8A43 95 DB LOW FYGR2 8A44 B9 DB LOW FYGR3 8A45 DD DB LOW FYGR4 8A46 HTABFR 8A46 A3 DB HIGH FIRERT 8A47 A4 DB HIGH BUFYRT 8A48 83 DB HIGH DDR1 8A49 83 DB HIGH DDR2 8A4A 83 DB HIGH FYGR2 8A4B 83 DB HIGH FYGR3 8A4C 83 DB HIGH FYGR4 8A4D TABTO 8A4D 00 DB LOW FIRELT 8A4E 27 DB LOW BUFYLT 8A4F 6F DB LOW DDL1 8A50 80 DB LOW DDL2 8A51 4A DB LOW FYGL4 8A52 25 DB LOW FYGL3 8A53 00 DB LOW FYGL2 8A54 HTABTO 8A54 17 DB HIGH FIRELT 8A55 17 DB HIGH BUFYLT 8A56 17 DB HIGH DDL1 8A57 17 DB HIGH DDL2 8A58 0D DB HIGH FYGL4 8A59 0D DB HIGH FYGL3 8A5A 0D DB HIGH FYGL2 8A5B MIRROR 8A5B A208 LDX #8 8A5D B1E5 LDA (PTRFR),Y 8A5F :INNER 8A5F 0A ASL A ;SET CARRY CONDITION 8A60 66FD ROR MYTEMP ;DUMMY OF WHAT IS TO BE STORED 8A62 CA DEX 8A63 D0FA ^8A5F BNE :INNER ;DO ALL 8 BITS 8A65 A5FD LDA MYTEMP 8A67 91E7 STA (PTRTO),Y ;PUT INTO LIST 8A69 88 DEY 8A6A 10EF ^8A5B BPL MIRROR ;NEXT BYTE IN LIST 8A6C 60 RTS ATARI CAMAC Assembler Ver 1.0A Page 40 D2:RESTRT.ASM PAIR 8A6D :TWOPLY ;TWO-PLAYER GAME! 8A6D A6ED LDX PERSON ;AND RESTORE X 8A6F 203EB0 JSR PACK ;PACK UP THIS SCREEN 8A72 20EC8A JSR FLIP ;SET OTHER PERSON 8A75 BD1B18 LDA LIVE,X ;NEW LEVEL FOR OTHER? 8A78 F00B ^8A85 BEQ :NEWLEV ;FALL THRU IF NOT 8A7A A940 LDA #PSCR ;PLAYER-SCREEN 8A7C 20B792 JSR SETSCR ;SET SCREEN 8A7F 20ECB0 JSR UNPACK ;UNPACK OTHER SCREEN 8A82 4C928A JMP :COMMON 8A85 :NEWLEV 8A85 A940 LDA #PSCR ;PLAYER-SCREEN 8A87 20B792 JSR SETSCR ;SET SCREEN 8A8A A901 LDA #1 8A8C 8D2D1A STA NLFLAG ;NEW LEVEL FLAG 8A8F 20D98B JSR NEWLEV ;SET UP NEW LEVEL 8A92 :COMMON 8A92 20DDAD JSR SHOMEN ;SHOW HOW MANY MEN 8A95 BD1F18 LDA RCKCO,X ;FALLEN ROCK COUNT 8A98 8D3319 STA ROCKCO ;... 8A9B 20758D JSR SETROK ;SET ROCKS 8A9E 209E8E JSR SPAIR ;SET POOKAS/FYGARS 8AA1 2007AD JSR FCONTRL ;SETUP FLOWERS 8AA4 2053AD JSR FLOWER ;DISPLAY FLOWERS 8AA7 20278A JSR SWAPING ;SET UP MIRROR OF PLAYERS 8AAA A6ED LDX PERSON ;SWAPING KILLED PERSON IN X SO REPL: 8AAC 20888F JSR SETPOK 8AAF A6ED LDX PERSON 8AB1 BD4619 LDA GAMENEW,X 8AB4 F00D ^8AC3 BEQ :FIRST ;THIS IS NEW GAME SO GRAND 8AB6 A900 LDA #00 8AB8 8D1DD0 STA GRACTL 8ABB A904 LDA #04 ;DO TIME DELAY ONLY 8ABD 8D5819 STA DELAYF 8AC0 20A08C JSR ENTER ;DO MODEST ENTRY 8AC3 :FIRST 8AC3 A980 LDA #GSCR 8AC5 20B792 JSR SETSCR 8AC8 A903 LDA #03 8ACA 8D5819 STA DELAYF 8ACD 8D1DD0 STA GRACTL 8AD0 BD4619 LDA GAMENEW,X 8AD3 D00A ^8ADF BNE :NOTFIRST 8AD5 A901 LDA #01 8AD7 9D4619 STA GAMENEW,X 8ADA 85F6 STA NTUNE 8ADC 20A08C JSR ENTER ;DO GRAND ENTRY 8ADF :NOTFIRST 8ADF A900 LDA #0 8AE1 8D651A STA DIED ;RESET DD DIED FLAG 8AE4 A901 LDA #1 8AE6 8D6318 STA NOGHO ;ENABLE GHOSTING 8AE9 4CA090 JMP PLAYLOOP ATARI CAMAC Assembler Ver 1.0A Page 41 D2:RESTRT.ASM PAIR EPROC ;PLAYLOOP WAS HERE ;*** FLIP *** ; ;FLIP PERSON TO OTHER PERSON. 8AEC FLIP PROC 8AEC 2061AE JSR FLPSCO ;FLIP CURRENT PERSON 8AEF 8A TXA ;FLIP VALUE OF PERSON 8AF0 4901 EOR #1 ;... 8AF2 85ED STA PERSON ;... 8AF4 AA TAX ;... 8AF5 2061AE JSR FLPSCO ;FLIP NEW PERSON 8AF8 60 RTS EPROC ;*** GAMOVR *** ; ;GAME OVER FOR PERSON X. 8AF9 GAMOVR PROC 8AF9 A900 LDA #0 8AFB 8D6318 STA NOGHO ;DISABLE GHOST REGS 8AFE A903 LDA #03 ;GAME OVER TUNE 8B00 85F6 STA NTUNE 8B02 20E9AE JSR SCHIGH 8B05 A920 LDA #OSCR ;GAME OVER SCREEN 8B07 20B792 JSR SETSCR 8B0A A6ED LDX PERSON 8B0C 60 RTS EPROC ;*** BITMAP *** ; ;CONDENSE MNSTEN,Y FOR Y=0 TO 7 ;TO LIVE,X AND RENABL,Y FOR Y=0 TO 7 ;TO UNFELL,X FOR PERSON X. ;ALSO SET RENABL TO ZERO. 8B0D BITMAP PROC 8B0D A900 LDA #0 8B0F 9D1B18 STA LIVE,X 8B12 9D1D18 STA UNFELL,X 8B15 9D6619 STA WHODEAD,X 8B18 8A TXA 8B19 48 PHA 8B1A A003 LDY #3 8B1C A97F LDA #$7F ;TEMP GHOST STATE = 8B1E LACARY SET * ;:CHKGHO 8B1E BEAC1A LDX GHOTAB,Y ATARI CAMAC Assembler Ver 1.0A Page 42 D2:RESTRT.ASM PAIR 8B21 3003 ^8B26 BMI *+5 ;:NOPE1 8B23 9D8D18 STA MNSTEN,X ;:NOPE1 8B26 BEB01A LDX NEWGHO,Y 8B29 3003 ^8B2E BMI *+5 ;:NOPE2 8B2B 9D8D18 STA MNSTEN,X ;:NOPE2 8B2E BEB41A LDX OLDGHO,Y 8B31 3003 ^8B36 BMI *+5 ;:NXTGHO 8B33 9D8D18 STA MNSTEN,X ;:NXTGHO 8B36 88 DEY 8B37 10E5 ^8B1E BPL LACARY ;:CHKGHO 8B39 68 PLA 8B3A AA TAX 8B3B A980 LDA #$80 8B3D 85FF STA SHIFT 8B3F A007 LDY #7 = 8B41 LACARY SET * ;:LOOP 8B41 B98D18 LDA MNSTEN,Y 8B44 F011 ^8B57 BEQ :CHKROK 8B46 C97F CMP #$7F ;TEMP GHOST STATE? 8B48 D005 ^8B4F BNE :NOTGHO 8B4A A901 LDA #MNSTDI ;DISABLE AGAIN? 8B4C 998D18 STA MNSTEN,Y 8B4F :NOTGHO 8B4F BD1B18 LDA LIVE,X 8B52 05FF ORA SHIFT 8B54 9D1B18 STA LIVE,X 8B57 :CHKROK 8B57 B91519 LDA RENABL,Y 8B5A F00D ^8B69 BEQ :CHKDED 8B5C BD1D18 LDA UNFELL,X 8B5F 05FF ORA SHIFT 8B61 9D1D18 STA UNFELL,X 8B64 A900 LDA #0 8B66 991519 STA RENABL,Y 8B69 :CHKDED ;CHECK FOR DEAD MONSTERS 8B69 B97B18 LDA DEADMO,Y 8B6C F00D ^8B7B BEQ :NEXT 8B6E BD6619 LDA WHODEAD,X 8B71 05FF ORA SHIFT 8B73 9D6619 STA WHODEAD,X 8B76 A900 LDA #00 8B78 997B18 STA DEADMO,Y 8B7B :NEXT 8B7B 46FF LSR SHIFT 8B7D 88 DEY 8B7E 10C1 ^8B41 BPL LACARY ;:LOOP 8B80 60 RTS EPROC ATARI CAMAC Assembler Ver 1.0A Page 43 D2:RESTRT.ASM PAIR ;**** CLEANUP **** ; ;CLEAN UP SOME VARIABLES UPON RESTART 8B81 CLEANUP PROC 8B81 AD3319 LDA ROCKCO 8B84 9D1F18 STA RCKCO,X 8B87 A900 LDA #00 8B89 A02E LDY #46 ;NOTE WE WANT TO ZERO 42+1 VARIEBLES 8B8B :LOOP 8B8B 99751A STA ZEROES,Y 8B8E 88 DEY 8B8F 10FA ^8B8B BPL :LOOP 8B91 8514 STA $14 ;ZERO CLOCK 8B93 858A STA PADR 8B95 8D211A STA SP0PF 8B98 85FE STA PUMPFL 8B9A 85FC STA HOSTAT 8B9C A9FF LDA #$FF 8B9E A013 LDY #19 ;NOTE WE WANT TO FF 20+1 VARIABLES 8BA0 :FFLOOP 8BA0 99A41A STA FFS,Y 8BA3 85FA STA FYGFIR 8BA5 88 DEY 8BA6 10F8 ^8BA0 BPL :FFLOOP ; LDA #0 ; STA HITCNT ; STA SQUARE ; STA PUMPFL ;INIT PUMP ; STA HOSTAT ;HOSE STATE = 0 ; STA HOINFL ; STA FIRWRN ; STA PAUSE ; STA TUNE6 ;HEADING HOME TUNE ; STA TUNE9 ; STA TUNE15 ; STA TUNE13 ; STA TUNE12 ; STA IFLAGT ;DISABLE INTERRUPT ; STA TUNEND ; STA FGREEN ; STA DONTDIE ;DD SHOULD DIE!!!!! ; STA LOBELO ;NO ROCK FALLING NOW ; STA SP0PF ;RESET R/G,DD COLLIDE 8BA8 A90F LDA #WHITE 8BAA 8DC302 STA PCOLR3 8BAD A907 LDA #07 8BAF 8D3D19 STA HOCOUNT ;HOSE OUT FOR 7 CNTS ATARI CAMAC Assembler Ver 1.0A Page 44 D2:RESTRT.ASM PAIR ; LDA #$FF ;INIT BLOW-UPS ; STA BUMNST ; STA BUMNST+1 ; STA BUCTR ; STA BUCTR+1 ; STA WHICHM ; STA FYGFIR ; STA CONSIDER ; STA OKFIRE ; STA BEHIND ; LDY #3 ;LACARY SET * ;:GLOOP ; LDA #$FF ; STA GHOTAB,Y ; STA NEWGHO,Y ; STA OLDGHO,Y ; LDA #0 ; STA HTAB,Y ; STA VTAB,Y ; STA CORHIL,Y ; STA CORHIR,Y ; STA CORLOL,Y ; STA CORLOR,Y ; DEY ; BPL LACARY ;:GLOOP ; STA GHOCNT 8BB2 A91D LDA #HIGH PLAY1 ;INIT GHOSTS 8BB4 858B STA PADRH ; LDA #0 ; STA GHOSTOP 8BB6 A903 LDA #REPTFIR 8BB8 8D061A STA FIRTIM 8BBB A996 LDA #MDELAY 8BBD 8D131A STA MTIMER 8BC0 A90F LDA #$0F 8BC2 8D4119 STA OLDJOY ;RESET JOY TO MIDDLE 8BC5 A902 LDA #02 8BC7 85F6 STA NTUNE 8BC9 85F7 STA OTUNE 8BCB A915 LDA #21 8BCD 8D4219 STA BACKGR ;RESET BACK TO FIRST 8BD0 206BB5 JSR MUNIT ;INITIALIZE MUSIC 8BD3 2054B8 JSR NOSOUND 8BD6 A6ED LDX PERSON ;RESTORE X TO PERSON 8BD8 60 RTS EPROC ;*** NEWLEV *** ATARI CAMAC Assembler Ver 1.0A Page 45 D2:RESTRT.ASM PAIR ; ;INCREMENT AND SET UP NEW LEVEL OF ;GAME. 8BD9 NEWLEV PROC 8BD9 A900 LDA #0 ;SET MODEST ENTRANCE 8BDB 8D051A STA ENTRANCE ;SET GRAND ENTRANCE 8BDE FE0B18 INC GLEVEL,X ;NEXT LEVEL 8BE1 A912 LDA #18 ;LENGTH OF TUNNELS 8BE3 8D391A STA TUNLEN ; AT LEVELS > 1 8BE6 BD0B18 LDA GLEVEL,X ;THIS LEVEL ONE? 8BE9 C901 CMP #1 8BEB D005 ^8BF2 BNE :NOTONE 8BED A918 LDA #24 ;LENGTH OF TUNNELS 8BEF 8D391A STA TUNLEN ; AT FIRST LEVEL 8BF2 :NOTONE 8BF2 A000 LDY #0 8BF4 BD0B18 LDA GLEVEL,X 8BF7 C912 CMP #18 8BF9 D007 ^8C02 BNE :NOPE 8BFB DD681A CMP FRTCNT,X 8BFE D002 ^8C02 BNE :NOPE 8C00 A002 LDY #2 8C02 :NOPE 8C02 8C6A1A STY THATONE 8C05 20918C JSR MODELT ;GET GAME LEVEL MOD 8C08 2007AD JSR FCONTRL ;SETUP NEW FLOWERS 8C0B 20C68E JSR SANDY ;NEW TUNNELS 8C0E A6ED LDX PERSON ;RESTORE X TO PERSON 8C10 A9FF LDA #$FF 8C12 9D1B18 STA LIVE,X ;ALL MONSTERS ALIVE 8C15 9D1D18 STA UNFELL,X ;ALL ROCKS UNFALLEN 8C18 A900 LDA #0 8C1A 9D1F18 STA RCKCO,X 8C1D A900 LDA #00 8C1F 9D6219 STA VEGFLG,X 8C22 9D6419 STA VERASE,X ;CLEAR VEG THINGS 8C25 9D6619 STA WHODEAD,X 8C28 8D6019 STA VEGTIL 8C2B 8D6119 STA VEGTIH 8C2E A007 LDY #07 = 8C30 LACARY SET * ;:DEADLO 8C30 997B18 STA DEADMO,Y 8C33 88 DEY 8C34 10FA ^8C30 BPL LACARY ;:DEADLO 8C36 A900 LDA #00 8C38 8D5018 STA SPEED 8C3B BC0D18 LDY MODLEV,X ;SET UP SPEEDS 8C3E A901 LDA #01 8C40 8D5118 STA TIMER 8C43 B9658C LDA TSPEED,Y 8C46 48 PHA 8C47 290F AND #$0F 8C49 8D5318 STA TIMER+2 ATARI CAMAC Assembler Ver 1.0A Page 46 D2:RESTRT.ASM PAIR 8C4C 68 PLA 8C4D 4A LSR A 8C4E 4A LSR A 8C4F 4A LSR A 8C50 4A LSR A 8C51 8D5218 STA TIMER+1 8C54 A200 LDX #00 8C56 :LOOPGN 8C56 B9778C LDA TGNOW,Y ;GET TABLE VALUE 8C59 9D421A STA GHONOW,X ;PUT INTO GHONOW 8C5C C8 INY 8C5D E8 INX 8C5E E008 CPX #08 8C60 D0F4 ^8C56 BNE :LOOPGN 8C62 A6ED LDX PERSON 8C64 60 RTS EPROC 8C65 TSPEED 8C65 4444343434 DB $44,$44,$34,$34,$34,$23,$23,$23 8C6D 1313121212 DB $13,$13,$12,$12,$12,$12,$11,$11 8C75 1111 DB $11,$11 8C77 TGNOW 8C77 0008060402 DB 0,8,6,4,2,2,3,2 8C7F 0202030203 DB 2,2,3,2,3,2,1,1 8C87 0101010101 DB 1,1,1,1,1,1,1,1 8C8F 0101 DB 1,1 8C91 MODELT 8C91 PROC ;FIND MODULUS OF LEVEL (LEVEL ;PATTERNS ARE UNIQUE FROM 1-12, ;THEN 13-16 REPEAT) 8C91 BD0B18 LDA GLEVEL,X = 8C94 LACARY SET * ;:CHK17 8C94 C911 CMP #17 ;GREATER THAN 17? 8C96 9004 ^8C9C BCC :FOUND 8C98 E904 SBC #4 ;C ALREADY SET 8C9A B0F8 ^8C94 BCS LACARY ;:CHK17 C STILL SET 8C9C :FOUND 8C9C 9D0D18 STA MODLEV,X 8C9F 60 RTS EPROC ;*** ENTER *** ; ;DIGDUG ENTERS THE SCREEN FROM THE ;RIGHT! 8CA0 ENTER PROC 8CA0 A200 LDX #0 ATARI CAMAC Assembler Ver 1.0A Page 47 D2:RESTRT.ASM PAIR 8CA2 2060B8 JSR WIPE ;ZERO PLAYER 0 8CA5 A901 LDA #1 8CA7 8D0318 STA TFLAG 8CAA AC051A LDY ENTRANCE 8CAD B96D85 LDA DDTAB,Y ;UPPER RIGHT CORNER 8CB0 20198E JSR TUNADR 8CB3 38 SEC 8CB4 AD0418 LDA ADDR 8CB7 F96E85 SBC DDTAB+1,Y 8CBA 858E STA SCREEN 8CBC AD0518 LDA ADDR+1 8CBF E900 SBC #0 8CC1 858F STA SCRENH 8CC3 20E48C JSR READY 8CC6 AC051A LDY ENTRANCE 8CC9 D00E ^8CD9 BNE :RIGHT 8CCB A900 LDA #0 8CCD 85F9 STA DCOUNT 8CCF A938 LDA #$38 8CD1 204E8D JSR CAVEH 8CD4 A934 LDA #$34 8CD6 20248D JSR CAVE ; JMP :RIGHT 8CD9 :RIGHT 8CD9 20F996 JSR RIGHT 8CDC A90D LDA #DDLEN 8CDE 8D051A STA ENTRANCE 8CE1 A6ED LDX PERSON ;RESTORE X TO PERSON 8CE3 60 RTS EPROC 8CE4 READY 8CE4 B96F85 LDA DDTAB+2,Y 8CE7 85F3 STA HZTPOS ;SET INITIALE HORZ 8CE9 8D00D0 STA HPOSP0 8CEC B97085 LDA DDTAB+3,Y 8CEF 85F2 STA VRTPOS ;INIT. DIDDUG HGHT 8CF1 B97185 LDA DDTAB+4,Y 8CF4 85F4 STA RCOUNT 8CF6 B97285 LDA DDTAB+5,Y 8CF9 85F5 STA LCOUNT 8CFB B97385 LDA DDTAB+6,Y 8CFE 8D4E19 STA UCOUNT 8D01 B97485 LDA DDTAB+7,Y 8D04 85F9 STA DCOUNT 8D06 B97585 LDA DDTAB+8,Y 8D09 8D4C19 STA PHASE ;SET TUNNEL PHASE=0 8D0C B97685 LDA DDTAB+9,Y 8D0F 85F8 STA CONTRL ;SET LAST POS.=DWN 8D11 B97785 LDA DDTAB+10,Y 8D14 8D5019 STA DFLAG 8D17 B97885 LDA DDTAB+11,Y 8D1A 8D5119 STA UFLAG 8D1D B97985 LDA DDTAB+12,Y 8D20 8D4F19 STA ROUND ATARI CAMAC Assembler Ver 1.0A Page 48 D2:RESTRT.ASM PAIR 8D23 60 RTS 8D24 CAVE 8D24 PROC 8D24 8D5719 STA TIMES 8D27 AD5819 LDA DELAYF 8D2A D009 ^8D35 BNE :LOOPDWN 8D2C 204995 JSR UP 8D2F 204995 JSR UP 8D32 204995 JSR UP 8D35 :LOOPDWN 8D35 202691 JSR KEYS 8D38 209D94 JSR DOWN 8D3B 2053AD JSR FLOWER 8D3E AD5819 LDA DELAYF 8D41 C903 CMP #03 8D43 D003 ^8D48 BNE *+5 ;:SKIPDA 8D45 2032B8 JSR DELAYS ;:SKIPDA 8D48 CE5719 DEC TIMES 8D4B D0E8 ^8D35 BNE :LOOPDWN 8D4D 60 RTS 8D4E CAVEH 8D4E PROC 8D4E 8D5719 STA TIMES 8D51 AD5819 LDA DELAYF 8D54 D006 ^8D5C BNE :LOOPLFT 8D56 20F996 JSR RIGHT 8D59 20F996 JSR RIGHT 8D5C :LOOPLFT 8D5C 202691 JSR KEYS 8D5F 206E96 JSR LEFT 8D62 2053AD JSR FLOWER 8D65 AD5819 LDA DELAYF 8D68 C903 CMP #03 8D6A D003 ^8D6F BNE *+5 8D6C 2032B8 JSR DELAYS ;:SKIPDE 8D6F CE5719 DEC TIMES 8D72 D0E8 ^8D5C BNE :LOOPLFT 8D74 60 RTS ;*** SETROK *** ; ;SET ROCKS IN POSITION FOR THIS ;LEVEL. 8D75 SETROK PROC ;FIRST GET ADDRESSES OF ROCKS 8D75 8A TXA 8D76 A8 TAY ATARI CAMAC Assembler Ver 1.0A Page 49 D2:RESTRT.ASM PAIR 8D77 B91D18 LDA UNFELL,Y 8D7A 8D0118 STA OLDMAP ;OLD ROCK BITMAP 8D7D A900 LDA #0 8D7F 8D0218 STA NEWMAP ;NEW ROCK BITMAP 8D82 8D5618 STA TNUMROC ;MAX NUMBER OF ROCKS 8D85 8D0318 STA TFLAG ;FLAG TO TUNADR 8D88 BE0D18 LDX MODLEV,Y 8D8B CA DEX 8D8C BC9BBE LDY ROKLEV,X ;ROCK LIST FOR LEVEL 8D8F 84EE STY LSTIDX 8D91 A901 LDA #1 ;BITSET FOR THIS ROCK 8D93 85FF STA SHIFT 8D95 A200 LDX #0 ;ROCK NUMBER 8D97 :LOOP 8D97 A900 LDA #0 8D99 9D1519 STA RENABL,X ;ASSUME NO ROCK 8D9C A4EE LDY LSTIDX 8D9E B96BBF LDA ROKLST,Y ;ROCK DESCR 8DA1 F04A ^8DED BEQ :QUIT 8DA3 4E0118 LSR OLDMAP ;THIS ONE STILL UP? 8DA6 9038 ^8DE0 BCC :NEXT 8DA8 20198E JSR TUNADR ;GET ADDR OF ROCK 8DAB AD0418 LDA ADDR 8DAE 9DFD18 STA ROCKP,X 8DB1 AD0518 LDA ADDR+1 8DB4 9D0319 STA HROCKP,X 8DB7 AD0218 LDA NEWMAP ;FLAG THIS ROCK UP 8DBA 05FF ORA SHIFT 8DBC 8D0218 STA NEWMAP 8DBF A901 LDA #1 ;ENABLE ROCK 8DC1 9D1519 STA RENABL,X 8DC4 A90A LDA #10 8DC6 9D0919 STA RUMBLE,X 8DC9 A906 LDA #06 8DCB 9D4A1A STA RDALLY,X 8DCE A904 LDA #04 8DD0 9D0F19 STA RFILL,X 8DD3 A900 LDA #0 8DD5 9D1B19 STA RANIMA,X 8DD8 9D2719 STA FMONRK,X 8DDB A902 LDA #02 8DDD 9D2119 STA RHOLD,X 8DE0 :NEXT 8DE0 06FF ASL SHIFT ;NEXT ROCK BIT 8DE2 E6EE INC LSTIDX ;NEXT ROCK DESCR 8DE4 E8 INX ;NEXT ROCK INDEX 8DE5 EE5618 INC TNUMROC ;ONE MORE ROCK! 8DE8 AD0118 LDA OLDMAP ;ANY ROCKS LEFT? 8DEB D0AA ^8D97 BNE :LOOP 8DED :QUIT 8DED A6ED LDX PERSON ;SAVE NEW ROCK MAP 8DEF AD0218 LDA NEWMAP 8DF2 9D1D18 STA UNFELL,X ATARI CAMAC Assembler Ver 1.0A Page 50 D2:RESTRT.ASM PAIR ;OTHER INITIALIZATIONS 8DF5 A9CA LDA #LOW ROCK2D 8DF7 8D2F19 STA ROCK2 8DFA A984 LDA #HIGH ROCK2D 8DFC 8D3019 STA HROCK2 8DFF A9E7 LDA #LOW ROCK3D 8E01 8D3119 STA ROCK3 8E04 A984 LDA #HIGH ROCK3D 8E06 8D3219 STA HROCK3 8E09 A9A8 LDA #LOW ROCK1D 8E0B 8D2D19 STA ROCKD 8E0E A984 LDA #HIGH ROCK1D 8E10 8D2E19 STA HROCKD ;DISPLAY ROCKS! 8E13 208AA7 JSR RPUT 8E16 A6ED LDX PERSON ;RESTORE X TO PERSON 8E18 60 RTS EPROC ;*** TUNADR *** ; ;GIVEN ROW (1-10), COL (1-13) IN ;A (HI-NIBBLE, LO-NIBBLE), PRODUCE ;SCREEN ADDRESS OF TUNNEL IN ;[ADDR,2]. 8E19 TUNADR PROC 8E19 8D0618 STA RC 8E1C 8A TXA 8E1D 48 PHA 8E1E AD0618 LDA RC ;GET ROW (HINIB) * 2 8E21 4A LSR A 8E22 4A LSR A 8E23 4A LSR A 8E24 291E AND #$1E ;(CLEAR LOW BIT) 8E26 AA TAX 8E27 CA DEX 8E28 CA DEX 8E29 18 CLC 8E2A BDD281 LDA TRBYT,X ;BYTE OFFSET TO ROW 8E2D 6960 ADC #LOW [VIRSCR+[2*40]] 8E2F 8D0418 STA ADDR 8E32 BDD381 LDA TRBYT+1,X 8E35 6920 ADC #HIGH [VIRSCR+[2*40]] 8E37 8D0518 STA ADDR+1 8E3A AD0618 LDA RC ;GET COLUMN 8E3D 290F AND #$F 8E3F AA TAX 8E40 CA DEX 8E41 18 CLC ATARI CAMAC Assembler Ver 1.0A Page 51 D2:RESTRT.ASM PAIR 8E42 AD0418 LDA ADDR 8E45 7DE681 ADC TCBYT,X 8E48 8D0418 STA ADDR 8E4B 9003 ^8E50 BCC :10 8E4D EE0518 INC ADDR+1 8E50 AD0318 :10 LDA TFLAG ;IF SET, ADD 14 8E53 F011 ^8E66 BEQ :20 ;SCAN LINES 8E55 18 CLC 8E56 AD0418 LDA ADDR 8E59 6930 ADC #LOW [14*40] 8E5B 8D0418 STA ADDR 8E5E AD0518 LDA ADDR+1 8E61 6902 ADC #HIGH [14*40] 8E63 8D0518 STA ADDR+1 8E66 68 :20 PLA 8E67 AA TAX 8E68 60 RTS EPROC 8E69 PROC 8E69 ;INPUT ;PTRFR -POINTER FROM LIST ;PTRTO -POINTER TO LIST ;Y -COUNTER ;X -OFFSET INTO TABLE ; 8E69 PAIR ;MIRROR MODE E BYTE 8E69 A204 LDX #4 8E6B B1E5 LDA (PTRFR),Y ;fetch source byte 8E6D 8598 STA LDUMMY 8E6F :LOOP 8E6F 0698 ASL LDUMMY ;TAKE IMAGE FROM ROM 8E71 6A ROR A 8E72 0698 ASL LDUMMY ;TAKE 2 BITS TO ACC 8E74 6A ROR A 8E75 0A ASL A ;SEND TO PTRT0 8E76 6699 ROR HDUMMY ;use HDUMMY as accumulator of OUTPU: 8E78 0A ASL A 8E79 6699 ROR HDUMMY 8E7B CA DEX 8E7C D0F1 ^8E6F BNE :LOOP 8E7E A599 LDA HDUMMY 8E80 60 RTS ATARI CAMAC Assembler Ver 1.0A Page 52 D2:RESTRT.ASM 12 X 3 MATRIX 8E81 = 8E81 PEEK EQU * ;ON ENTRY 8E81 A024 LDY #36 ;starts from the end 8E83 :B10 8E83 20698E JSR PAIR 8E86 88 DEY 8E87 88 DEY 8E88 91E7 STA (PTRTO),Y ;1->3 PTR X-> 2 BYTE 8E8A C8 INY 8E8B 20698E JSR PAIR 8E8E 91E7 STA (PTRTO),Y ;2->2 PTR X-> 3 BYTE 8E90 88 DEY 8E91 20698E JSR PAIR 8E94 C8 INY 8E95 C8 INY 8E96 91E7 STA (PTRTO),Y ;3->1 PTR X-> 4 BYTE 8E98 88 DEY 8E99 88 DEY 8E9A 88 DEY 8E9B D0E6 ^8E83 BNE :B10 8E9D 60 RTS 8E9E SPAIR 8E9E A206 LDX #6 8EA0 86FD STX MYTEMP 8EA2 :LOOP1 8EA2 20B18E JSR SETPOINT 8EA5 20818E JSR PEEK 8EA8 C6FD DEC MYTEMP 8EAA A6FD LDX MYTEMP 8EAC E003 CPX #3 8EAE D0F2 ^8EA2 BNE :LOOP1 8EB0 60 RTS 8EB1 SETPOINT 8EB1 BD3F8A LDA TABFR,X 8EB4 85E5 STA PTRFR 8EB6 BD468A LDA HTABFR,X 8EB9 85E6 STA PTRFR+1 8EBB BD4D8A LDA TABTO,X 8EBE 85E7 STA PTRTO 8EC0 BD548A LDA HTABTO,X 8EC3 85E8 STA PTRTO+1 8EC5 60 RTS LIST L 8EC6 SHOW SANDY LIST L INCLUDE D2:SANDY.ASM ;*** SANDY *** ; ;DRAW SAND AND TUNNELS 8EC6 SANDY PROC ;FILL SCREEN WITH SAND AND SKY 8EC6 A910 LDA #LOW SCR ;POINT TO BEGINNING 8EC8 8584 STA SCRPTR ;OF SCREEN ATARI CAMAC Assembler Ver 1.0A Page 53 D2:SANDY.ASM 12 X 3 MATRIX 8ECA A920 LDA #HIGH SCR 8ECC 8585 STA SCRPTR+1 8ECE A202 LDX #2 ;BLUE SAND OVERHEAD 8ED0 A955 LDA #$55 8ED2 206F8F JSR SETLIN 8ED5 A20C LDX #12 ;CENTER SKY 8ED7 A900 LDA #0 8ED9 206F8F JSR SETLIN 8EDC A202 LDX #2 ;BLUE SAND UNDERFOOT ; LDA #$55 8EDE A944 LDA #$44 ;SAND NUBS 8EE0 206F8F JSR SETLIN 8EE3 A2B8 LDX #[SLINES-16] ;SAND 8EE5 A955 LDA #$55 8EE7 206F8F JSR SETLIN ;DRAW TUNNELS FOR THIS LEVEL 8EEA A900 LDA #0 8EEC 8D1DD0 STA GRACTL 8EEF 8D5819 STA DELAYF 8EF2 85EE STA LSTIDX ;INDEX FIRST TUNNEL 8EF4 A901 LDA #1 8EF6 8D0318 STA TFLAG ;SET TUNADR FLAG 8EF9 8D371A STA FIRST ;FLAG FIRST TUNNEL 8EFC :LOOP 8EFC A4EE LDY LSTIDX ;POSITION IN LIST 8EFE B9ABBE LDA TUNLST,Y ;ROW,COL 8F01 20198E JSR TUNADR ;CONVERT TO ADDR 8F04 AD0418 LDA ADDR 8F07 858E STA SCREEN 8F09 AD0518 LDA ADDR+1 8F0C 858F STA SCRENH 8F0E A000 LDY #0 8F10 20E48C JSR READY ;READY TO DRAW TUNNEL 8F13 A924 LDA #$24 ;CLUDGE FOR TUNNELS 8F15 85F2 STA VRTPOS ;... 8F17 E6EE INC LSTIDX 8F19 A4EE LDY LSTIDX 8F1B B9ABBE LDA TUNLST,Y ;HOR/VER & FLAGS 8F1E 85F1 STA BYTE ;SAVE THIS BYTE 8F20 2904 AND #H ;HOR OR VER? 8F22 D014 ^8F38 BNE :HORIZ 8F24 :VERT 8F24 18 CLC 8F25 A58E LDA SCREEN 8F27 6950 ADC #[2*40] ;CLUDGE NUB LINEUP 8F29 858E STA SCREEN 8F2B 9002 ^8F2F BCC :15 8F2D E68F INC SCRENH 8F2F AD391A :15 LDA TUNLEN ;LENGTH OF TUNNEL 8F32 20248D JSR CAVE 8F35 4C458F JMP :NEXT ;MERGE 8F38 :HORIZ 8F38 A900 LDA #0 ATARI CAMAC Assembler Ver 1.0A Page 54 D2:SANDY.ASM 12 X 3 MATRIX 8F3A 85F9 STA DCOUNT 8F3C AC371A LDY FIRST 8F3F B9391A LDA TUNLEN,Y ;LENGTH OF TUNNEL 8F42 204E8D JSR CAVEH 8F45 :NEXT 8F45 A5F1 LDA BYTE ;GET FLAGS BYTE 8F47 2908 AND #TY ;MORE TUNNELS? 8F49 F023 ^8F6E BEQ :QUIT ;IF NOT, QUIT 8F4B A5F1 LDA BYTE 8F4D 2940 AND #$40 ;ANOTHER MONSTER 8F4F F002 ^8F53 BEQ :20 ;TO SKIP? 8F51 E6EE INC LSTIDX 8F53 AD371A :20 LDA FIRST ;WAS THIS FIRST TUN? 8F56 F011 ^8F69 BEQ :30 8F58 A900 LDA #0 ;FLAG NO LONGER FIRST 8F5A 8D371A STA FIRST ;... 8F5D A4ED LDY PERSON ;SETUP LSTIDX FOR 8F5F BE0D18 LDX MODLEV,Y ;THIS LEVEL 8F62 CA DEX 8F63 BC8BBE LDY TUNLEV,X 8F66 88 DEY 8F67 84EE STY LSTIDX 8F69 E6EE :30 INC LSTIDX 8F6B 4CFC8E JMP :LOOP 8F6E :QUIT 8F6E 60 RTS ;*** SETLIN *** ; ;SET X 40-BYTE DISPLAY LINES TO A 8F6F SETLIN PROC 8F6F :LOOP1 8F6F A000 LDY #0 8F71 :LOOP2 8F71 9184 STA (SCRPTR),Y 8F73 C8 INY 8F74 C028 CPY #40 ;40 BYTES/LINE 8F76 90F9 ^8F71 BCC :LOOP2 8F78 48 PHA 8F79 18 CLC 8F7A 98 TYA 8F7B 6584 ADC SCRPTR ;BUMP SCREEN PTR 8F7D 8584 STA SCRPTR 8F7F 9002 ^8F83 BCC :10 8F81 E685 INC SCRPTR+1 8F83 68 :10 PLA 8F84 CA DEX ;FOR X LINES 8F85 D0E8 ^8F6F BNE :LOOP1 8F87 60 RTS ;*** SETPOK *** ; ;SET POOKAS AND FYGARS IN THEIR ATARI CAMAC Assembler Ver 1.0A Page 55 D2:SANDY.ASM 12 X 3 MATRIX ;POSITIONS FOR THIS LEVEL. 8F88 SETPOK PROC 8F88 A980 LDA #$80 8F8A 85FF STA SHIFT 8F8C A007 LDY #07 8F8E :NUXT 8F8E BD6619 LDA WHODEAD,X 8F91 25FF AND SHIFT 8F93 F005 ^8F9A BEQ :TRYMO ;NOT SET SO SKIP 8F95 A9FF LDA #$FF 8F97 997B18 STA DEADMO,Y 8F9A :TRYMO 8F9A 46FF LSR SHIFT 8F9C 88 DEY 8F9D 10EF ^8F8E BPL :NUXT ;GO BACK IF MORE 8F9F 8A TXA 8FA0 A8 TAY 8FA1 B91B18 LDA LIVE,Y ;ONLY RESTORE LIVE 8FA4 8D0118 STA OLDMAP ;MONSTERS! 8FA7 A900 LDA #0 8FA9 8D0218 STA NEWMAP 8FAC 8D2E1A STA TMONUM 8FAF 99111A STA MNSLEFT,Y 8FB2 8D0318 STA TFLAG 8FB5 BE0D18 LDX MODLEV,Y 8FB8 CA DEX 8FB9 BC8BBE LDY TUNLEV,X 8FBC 84EE STY LSTIDX 8FBE A901 LDA #1 8FC0 85FF STA SHIFT 8FC2 A207 LDX #7 8FC4 A900 LDA #0 8FC6 :DISABLE 8FC6 9D8D18 STA MNSTEN,X 8FC9 CA DEX 8FCA 10FA ^8FC6 BPL :DISABLE 8FCC A200 LDX #0 ;POOKA NUMBER 8FCE :LOOP 8FCE A4EE LDY LSTIDX 8FD0 B9ABBE LDA TUNLST,Y ;TUNNEL LOCATION 8FD3 8D381A STA ROWCOL ;SAVE IT 8FD6 :LOOP2 8FD6 E6EE INC LSTIDX 8FD8 A4EE LDY LSTIDX 8FDA B9ABBE LDA TUNLST,Y ;TUNNEL & P/F DESCR 8FDD 85F1 STA BYTE ;SAVE IT 8FDF 4E0118 LSR OLDMAP ;THIS STILL ALIVE? 8FE2 B003 ^8FE7 BCS :11 8FE4 4C5990 JMP :NEXT 8FE7 A0FF :11 LDY #[0-1] ;(IF HORIZ) 8FE9 2904 AND #H ;HORIZ OR VERT? 8FEB D002 ^8FEF BNE :12 8FED A010 LDY #$10 ;(VERT) ATARI CAMAC Assembler Ver 1.0A Page 56 D2:SANDY.ASM 12 X 3 MATRIX 8FEF 18 :12 CLC 8FF0 98 TYA 8FF1 6D381A ADC ROWCOL ;ADJUST COORDINATE 8FF4 20198E JSR TUNADR ;AND GET SCR ADDRESS 8FF7 AD0418 LDA ADDR 8FFA 9D9518 STA LPOKAP,X 8FFD AD0518 LDA ADDR+1 9000 9D9D18 STA HPOKAP,X 9003 A5F1 LDA BYTE 9005 2903 AND #3 ;INITIAL DIRECTION 9007 9DB518 STA GOPOOKA,X 900A 2901 AND #1 ;HORIZ/VERT FLAG 900C 9D3318 STA HVFLAG,X 900F A9FF LDA #$FF ;ASSUME FYGAR 9011 A4F1 LDY BYTE ;POOKA OR FYGAR? 9013 3002 ^9017 BMI :15 9015 A900 LDA #0 ;NO, REALLY POOKA 9017 9D8518 :15 STA PFFLAG,X 901A 2057A7 JSR PIFFY ;POOKA, FYGR, OR FYGL 901D A8 TAY 901E B97FA1 LDA PFDATL,Y 9021 9DA518 STA SAVEPP,X 9024 B982A1 LDA PFDATH,Y 9027 9DAD18 STA HSAVEPP,X 902A A918 LDA #$18 ;ALL THE MISC TABLES 902C 9DC518 STA HOWMANY,X 902F A900 LDA #0 9031 9DCE18 STA BBBFLAG,X 9034 9DD718 STA FIRFLG,X 9037 9D3D18 STA FRTLES,X 903A 9D4518 STA MGREEN,X 903D 9DDF18 STA FE1,X 9040 A904 LDA #4 9042 9DBD18 STA POOPHASE,X 9045 A9FF LDA #$FF 9047 9D8D18 STA MNSTEN,X 904A AD0218 LDA NEWMAP ;THIS MONSTER ON 904D 05FF ORA SHIFT 904F 8D0218 STA NEWMAP 9052 8A TXA 9053 A6ED LDX PERSON 9055 FE111A INC MNSLEFT,X ;ANOTHER MONSTER! 9058 AA TAX 9059 :NEXT 9059 06FF ASL SHIFT 905B EE2E1A INC TMONUM 905E E8 INX 905F AD0118 LDA OLDMAP ;IF ALL PROCESSED 9062 F014 ^9078 BEQ :QUIT ;THEN QUIT 9064 A5F1 LDA BYTE ;ANOTHER MONSTER AT 9066 2940 AND #$40 ;THIS COORD? 9068 F003 ^906D BEQ :NEXT2 ATARI CAMAC Assembler Ver 1.0A Page 57 D2:SANDY.ASM 12 X 3 MATRIX 906A 4CD68F JMP :LOOP2 906D :NEXT2 906D A5F1 LDA BYTE ;MORE TUNNELS FOR 906F 2908 AND #TY ;THIS LEVEL? 9071 F005 ^9078 BEQ :QUIT ;IF NOT, QUIT 9073 E6EE INC LSTIDX ;ELSE CONTINUE... 9075 4CCE8F JMP :LOOP 9078 :QUIT 9078 A6ED LDX PERSON 907A AD0218 LDA NEWMAP 907D 9D1B18 STA LIVE,X 9080 AD2D1A LDA NLFLAG ;NEW LEVEL? 9083 F006 ^908B BEQ :NOPE 9085 AD2E1A LDA TMONUM 9088 8D5A19 STA TMONNUM 908B :NOPE ;OTHER INITIALIZATIONS 908B ADAD18 LDA HSAVEPP 908E 8D5519 STA HPOKAD 9091 ADA518 LDA SAVEPP 9094 8D5419 STA LPOKAD 9097 208F9D JSR SONSTERS 909A 208F9D JSR SONSTERS 909D A6ED LDX PERSON ;RESTORE X TO PERSON 909F 60 RTS EPROC LIST L 90A0 SHOW PLAYLOOP LIST L INCLUDE D3:PLAYLOOP.ASM 90A0 PLAYLOOP ;PLAY THE GAME!!! 90A0 PROC 90A0 202691 JSR KEYS ;CHK FUNKKY KEYS 90A3 A6ED LDX PERSON 90A5 BD111A LDA MNSLEFT,X 90A8 C902 CMP #2 ;IF AT LEAST 2 MNSTRS 90AA 900A ^90B6 BCC :SKUPPY ;LEFT, THEN THEY 90AC A5F3 LDA HZTPOS ;SHOULD CHASE DD! 90AE 8D401A STA HCHASE 90B1 A5F2 LDA VRTPOS 90B3 8D411A STA VCHASE 90B6 :SKUPPY 90B6 20E2AF JSR DUGSAND 90B9 207AB4 JSR REVERT ;GHOST REVERSION 90BC 206D99 JSR PUMP 90BF 208F9D JSR SONSTERS ;MONSTER ROUTINE WITH X AND MEND PR: 90C2 206891 JSR SPEEDS ;MUST OCCUR AFTER MON BUT BEFORE RO: 90C5 203394 JSR READJO ;MOVE DD 90C8 20B5A5 JSR BURP 90CB A901 LDA #1 ;REENABLE FYGAR AFTER 90CD 2002A4 JSR FYFIRE ; HE FIRES 90D0 209DA7 JSR ROCK ATARI CAMAC Assembler Ver 1.0A Page 58 D3:PLAYLOOP.AS 12 X 3 MATRIX 90D3 A6ED LDX PERSON 90D5 BD0B18 LDA GLEVEL,X 90D8 20B5AB JSR FRUITY ;(WAS AFTER BYEBYE) 90DB 2053AD JSR FLOWER 90DE 204A9C JSR BYEBYE ;DEATH THROES ;:CHKMNS 90E1 A6ED LDX PERSON ;CHECK IF ONLY ONE 90E3 BD111A LDA MNSLEFT,X ; MONSTER LEFT 90E6 C901 CMP #01 ;IS THIS LAST ONE? 90E8 D003 ^90ED BNE *+5 ;IF NOT, SKIP 90EA 20E991 JSR ONELEFT ;ELSE, RUN AWAY! 90ED A6ED LDX PERSON ;ARE THERE ANY 90EF BD111A LDA MNSLEFT,X ; LEFT AT ALL? 90F2 D0AC ^90A0 BNE PLAYLOOP ;IF SO, PLAY ON! ;:ENDROUND 90F4 8D01D0 STA HPOSP1 ;MOVE BLOWUPS OFF THE SCREEN ACCUMU: 90F7 8D02D0 STA HPOSP2 90FA A5FE LDA PUMPFL ;NO MONSTERS LEFT! 90FC F003 ^9101 BEQ *+5 ;ONLY IF HO OUT 90FE 20959B JSR HOIN 9101 A908 LDA #8 9103 85F6 STA NTUNE ;TRA LA LA... 9105 202A94 JSR WAIT ;WAIT FOR TUNE START 9108 :FINLOOP ;WAIT-LOOP WHEN M'S DEAD 9108 AD081A LDA BTIMER ;WAIT FOR BONUS TO 910B D0FB ^9108 BNE :FINLOOP ;BE ADDED IN 910D AD8219 LDA VTUNE+3 ;WAIT FOR EXTRA MAN 9110 C907 CMP #7 ; TUNE TO BE OVER 9112 F0F4 ^9108 BEQ :FINLOOP 9114 AD7F19 LDA VTUNE ;WAIT FOR LEVEL-OVER 9117 C908 CMP #8 ; TUNE TO BE OVER 9119 F0ED ^9108 BEQ :FINLOOP 911B 202A94 JSR WAIT 911E A900 LDA #0 9120 9D1B18 STA LIVE,X 9123 4CF489 JMP RESTRT ;RESTART NEXT LEVEL EPROC 9126 KEYS 9126 PROC 9126 :LOOP 9126 ADFC02 LDA CH ;CHARACTER BUFFER 9129 C921 CMP #SPACE ;IF SPACE, TOGGLE 912B D00D ^913A BNE :SKIP ;PAUSE FLAG 912D A9FF LDA #$FF 912F 8DFC02 STA CH 9132 AD791A LDA PAUSE 9135 49FF EOR #$FF 9137 8D791A STA PAUSE 913A :SKIP ATARI CAMAC Assembler Ver 1.0A Page 59 D3:PLAYLOOP.AS 12 X 3 MATRIX 913A 2075B8 JSR CONS 913D :START ;<> 913D 4A LSR A ;START A NEW GAME 913E B006 ^9146 BCS :SELOPT 9140 20A4AF JSR CHKBON ;(TURN OFF BONUS) 9143 4CA885 JMP AGAIN 9146 :SELOPT ;<> 9146 4A LSR A 9147 9003 ^914C BCC :OKAY 9149 4A LSR A 914A B003 ^914F BCS :EXIT 914C :OKAY 914C 4C9885 JMP REOPT ;TO THE OPTION SCREEN 914F :EXIT 914F AD791A LDA PAUSE 9152 D0D2 ^9126 BNE :LOOP 9154 20DEB8 JSR DAMMIT ;UNSET ATRACT MODE COLORS 9157 60 RTS EPROC 9158 ALLOVER 9158 PROC 9158 :WAIT 9158 202691 JSR KEYS 915B AD8402 LDA STRIG0 ;CHECK BUTTON 915E 2D8502 AND STRIG1 9161 D0F5 ^9158 BNE :WAIT 9163 854D STA ATRACT ;ACCUMULATOR HAS A ZERO IN IT,UNSET: 9165 4CA885 JMP AGAIN EPROC 9168 SPEEDS 9168 PROC 9168 206F91 JSR SPEEDDO 916B 20CA91 JSR SPEEDCO 916E 60 RTS 916F SPEEDDO 916F AD5018 LDA SPEED 9172 F015 ^9189 BEQ :STAT0 9174 4A LSR A 9175 F009 ^9180 BEQ :STAT1 ;SPEED2 9177 20AC91 JSR FIXTUNE 917A 209591 JSR MOVEM 917D 4C9591 JMP MOVEM 9180 :STAT1 9180 20AC91 JSR FIXTUNE ;SEE IF FRANTIC BREAK IN SHOULKD PL: 9183 209591 JSR MOVEM 9186 4C8F91 JMP DELAY2 9189 :STAT0 9189 2057A0 JSR DELAYM 918C 2057A0 JSR DELAYM 918F DELAY2 918F 2057A0 JSR DELAYM 9192 4C57A0 JMP DELAYM ATARI CAMAC Assembler Ver 1.0A Page 60 D3:PLAYLOOP.AS 12 X 3 MATRIX 9195 MOVEM 9195 EE5418 INC CYCLE 9198 AD5418 LDA CYCLE 919B 2903 AND #03 919D AA TAX 919E BDC691 LDA :HITAB,X 91A1 8D4F18 STA MEND 91A4 BDC591 LDA :LOTAB,X 91A7 AA TAX 91A8 20969D JSR MONSTERS 91AB 60 RTS 91AC FIXTUNE 91AC A5F7 LDA OTUNE 91AE C915 CMP #21 91B0 D012 ^91C4 BNE :OVER9 91B2 A5F6 LDA NTUNE 91B4 C915 CMP #21 91B6 D00C ^91C4 BNE :OVER9 91B8 AD7B1A LDA TUNE9 91BB D007 ^91C4 BNE :OVER9 91BD A909 LDA #09 91BF 85F6 STA NTUNE 91C1 8D7B1A STA TUNE9 91C4 :OVER9 91C4 60 RTS 91C5 :LOTAB 91C5 00 DB 0 91C6 :HITAB 91C6 02040608 DB 2,4,6,8 EPROC 91CA PROC 91CA SPEEDCO 91CA AE5018 LDX SPEED 91CD E002 CPX #02 91CF F010 ^91E1 BEQ :END 91D1 AD5118 LDA TIMER 91D4 1D5218 ORA TIMER+1,X 91D7 F009 ^91E2 BEQ :CHANGE ;MAKE NEW SPEED 91D9 CE5118 DEC TIMER 91DC D003 ^91E1 BNE :END 91DE DE5218 DEC TIMER+1,X 91E1 :END 91E1 60 RTS 91E2 :CHANGE 91E2 EE5018 INC SPEED 91E5 EE5118 INC TIMER 91E8 60 RTS EPROC 91E9 ONELEFT 91E9 PROC 91E9 AD7A1A LDA TUNE6 ;TUNE PLAYED YET? 91EC D054 ^9242 BNE :CHKLIN 91EE A906 LDA #06 ;SET GOING HOME TUNE ATARI CAMAC Assembler Ver 1.0A Page 61 D3:PLAYLOOP.AS 12 X 3 MATRIX 91F0 85F6 STA NTUNE 91F2 8D7A1A STA TUNE6 91F5 A900 LDA #0 ;MAKE MONST RUN AWAY 91F7 8D401A STA HCHASE 91FA A918 LDA #VRTOFF-7 ;WAS VRTOFF+3,BUT FYGAR WOULD SOMET: 91FC 8D411A STA VCHASE 91FF A207 LDX #7 9201 :LOOP 9201 A901 LDA #1 9203 9D421A STA GHONOW,X 9206 A900 LDA #0 9208 9D3D18 STA FRTLES,X 920B CA DEX 920C 10F3 ^9201 BPL :LOOP 920E A001 LDY #1 ;USE BU PLAYER 9210 B9A41A LDA BUMNST,Y ;(WHICHEVER IS FREE) 9213 3001 ^9216 BMI *+3 9215 88 DEY 9216 8C631A STY BLOCK ;WHICH BU PLAYER 9219 98 TYA 921A AA TAX 921B E8 INX 921C 2060B8 JSR WIPE ;CLEAR IT FIRST! 921F A908 LDA #8 ;SET BU PLAYER TAKEN 9221 99A41A STA BUMNST,Y ; LDA #1 ;MAKE A BLUE LINE ; STA SIZEP1,Y ; FOR THE MONSTER TO 9224 A994 LDA #BLUE ; COLLIDE WITH AT 9226 99C102 STA PCOLR1,Y ; LEFT EDGE OF SCRN 9229 A930 LDA #HOROFF+1 922B 9901D0 STA HPOSP1,Y 922E A9FF LDA #$FF 9230 C000 CPY #0 9232 D005 ^9239 BNE :PLAY2 9234 8D271D STA PLAY1+VRTOFF+08 9237 F003 ^923C BEQ :MERGE ;(UNCONDITIONAL) 9239 :PLAY2 9239 8D271E STA PLAY2+VRTOFF+08 923C :MERGE 923C A9FF LDA #$FF 923E 8DAB1A STA BEHIND 9241 60 RTS 9242 :CHKLIN 9242 AC631A LDY BLOCK ;WHICH DECOY 9245 B9221A LDA SP1PF,Y ;COLLIDE WITH LINE? 9248 2906 AND #$06 924A F03A ^9286 BEQ :CHKBLK ;IF SO, FALL THRU 924C ADAB1A LDA BEHIND ;FIRST COLLISION? 924F 1034 ^9285 BPL :QUIT 9251 A900 LDA #0 9253 8DAB1A STA BEHIND 9256 8D6318 STA NOGHO ;TURN OFF GHOSTING 9259 A203 LDX #3 ;USE GHOST REGISTER ATARI CAMAC Assembler Ver 1.0A Page 62 D3:PLAYLOOP.AS 12 X 3 MATRIX 925B 2060B8 JSR WIPE ;CLEAN IT OUT 925E A901 LDA #1 9260 8D0BD0 STA SIZEP3 9263 A994 LDA #BLUE 9265 8D15D0 STA COLPM3 ;STORE COLOR IN HARDWARE AND SHADOW 9268 8DC302 STA PCOLR3 926B A9C0 LDA #HOROFF+160-15 ; STA FYGFIR ;TURN OFF FIRE WHILE SCROLLING OR B: 926D 8D03D0 STA HPOSP3 9270 A00E LDY #14 ;PUT BLUE BLOCK 9272 A91F LDA #$1F ; FOR MONSTER TO 9274 A221 LDX #VRTOFF+2 ; SCROLL BEHIND 9276 :BLOCK 9276 9D001F STA PLAY3,X 9279 E8 INX 927A 88 DEY 927B D0F9 ^9276 BNE :BLOCK 927D A900 LDA #0 ;ERASE SOME NUBS 927F 8D5E20 STA VIRSCR+[2*40]-2 9282 8D5F20 STA VIRSCR+[2*40]-1 9285 :QUIT 9285 60 RTS 9286 :CHKBLK 9286 ADAB1A LDA BEHIND ;BLUE LINE EVER HIT? 9289 30FA ^9285 BMI :QUIT 928B A207 LDX #7 ;FIND THE MONSTER 928D :FINDMN 928D BD8D18 LDA MNSTEN,X 9290 D003 ^9295 BNE :FOUND 9292 CA DEX 9293 10F8 ^928D BPL :FINDMN 9295 :FOUND 9295 BD9518 LDA LPOKAP,X 9298 C95E CMP #$5E 929A D0E9 ^9285 BNE :QUIT 929C A901 LDA #MNSTDI ;AND DISABLE IT 929E 9D8D18 STA MNSTEN,X 92A1 208F9D JSR SONSTERS ;MONSTER ROUTINE WITH X=0 AND MEND=: 92A4 A6ED LDX PERSON 92A6 DE111A DEC MNSLEFT,X 92A9 A900 LDA #0 92AB 8D03D0 STA HPOSP3 ;REMOVE BLUE BLOCK 92AE 8D0BD0 STA SIZEP3 92B1 A90F LDA #$0F 92B3 8DC302 STA PCOLR3 92B6 60 RTS EPROC LIST L 92B7 SHOW SCREENS LIST L INCLUDE D3:SCREENS.ASM ;SCREENS.ASM ;----------- ATARI CAMAC Assembler Ver 1.0A Page 63 D3:SCREENS.ASM 12 X 3 MATRIX ;THIS FILE CONTAINS CODE TO MAP ;MESSAGES ONTO THE SCREEN USING ;THE PLAYERS, AND TO FLIP SCREENS. ;*** SETSCR *** ; ;SET SCREEN. SET DISPLAY LIST TO ;REQUESTED SCREEN BASED ON VALUES OF ;A AND X: ;ARGUMENTS IN A: = 0080 GSCR = $80 ;GAME SCREEN = 0040 PSCR = $40 ;PLAYER X SCREEN = 0020 OSCR = $20 ;GAME OVER FOR X SCREEN 92B7 SETSCR PROC 92B7 0A ASL A ;GAME SCREEN? 92B8 B007 ^92C1 BCS :GSCR 92BA 0A ASL A ;PLAYER X SCREEN? 92BB B009 ^92C6 BCS :PLX 92BD 0A ASL A 92BE B035 ^92F5 BCS :GMOVR ;GAME OVER? 92C0 60 RTS 92C1 :GSCR 92C1 20ED93 JSR SETCLR ;RESET ALL COLORS 92C4 A202 LDX #2 ;INDEX GAME SCREEN ;AND FALL THROUGH 92C6 :PLX 92C6 8A TXA ;SAVE SCREEN # 92C7 48 PHA 92C8 A900 LDA #0 92CA 8D2F02 STA SDMCTL ;TURN ANTIC OFF 92CD 202BB8 JSR DELAY ;WAIT TO SYNC UP 92D0 BD1093 LDA DLLOW,X ;SET APPROPRIATE 92D3 8D3002 STA SDLSTL ; DISPLAY LIST 92D6 BD1393 LDA DLHIGH,X 92D9 8D3102 STA SDLSTH 92DC BD1693 LDA CHARS,X ;AND CHARACTER SET 92DF 8DF402 STA CHBAS 92E2 A93E LDA #$3E 92E4 8D2F02 STA SDMCTL ;AND RESET ANTIC 92E7 68 PLA ;IF SCREEN # WAS 92E8 C902 CMP #2 ; GAME SCREEN, THEN 92EA F006 ^92F2 BEQ *+8 ; SKIP WAIT 92EC 203CB8 JSR NOPLAY ;TOSS OUT PLAYER MUCK 92EF 202A94 JSR WAIT 92F2 A6ED LDX PERSON 92F4 60 RTS 92F5 :GMOVR 92F5 A900 LDA #0 92F7 8D6318 STA NOGHO ;DISABLE GHOSTING 92FA A975 LDA #LOW GAMEOVER ATARI CAMAC Assembler Ver 1.0A Page 64 D3:SCREENS.ASM 12 X 3 MATRIX 92FC 85C7 STA MESSAGE 92FE A993 LDA #HIGH GAMEOVER 9300 85C8 STA MESSAGE+1 9302 A984 LDA #$84 9304 8D601A STA VRTCL 9307 207E93 JSR MSG ;"GAME"/"OVER" 930A 202A94 JSR WAIT 930D A6ED LDX PERSON 930F 60 RTS EPROC 9310 DLLOW 9310 19 DB LOW P1READY 9311 2D DB LOW P2READY 9312 69 DB LOW DLIST 9313 DLHIGH 9313 93 DB HIGH P1READY 9314 93 DB HIGH P2READY 9315 80 DB HIGH DLIST 9316 CHARS 9316 E0 DB HIGH CHASET 9317 E0 DB HIGH CHASET 9318 80 DB HIGH SCOSET 9319 P1READY 9319 707070 DB $70,$70,$70 931C 7070707070 DB $70,$70,$70,$70,$70,$70,$70 9323 46 DB $46 9324 4193 DW PLYONE 9326 70 DB $70 9327 46 DB $46 9328 6193 DW RUDDY 932A 41 DB $41 932B 1993 DW P1READY 932D P2READY 932D 707070 DB $70,$70,$70 9330 7070707070 DB $70,$70,$70,$70,$70,$70,$70 9337 46 DB $46 9338 5193 DW PLYTWO 933A 70 DB $70 933B 46 DB $46 933C 6193 DW RUDDY 933E 41 DB $41 933F 1993 DW P1READY 9341 PLYONE 9341 00000000 DB 0,0,0,0 9345 302C213925 DB $30,$2C,$21,$39,$25,$32 934B 00002F2E25 DB 0,0,$2F,$2E,$25 9350 00 DB 0 ;OVERLAP OF 4 BYTES 9351 PLYTWO 9351 00000000 DB 0,0,0,0 9355 302C213925 DB $30,$2C,$21,$39,$25,$32 935B 000034372F DB 0,0,$34,$37,$2F 9360 00 DB 0 ;OVERLAP OF 4 BYTES 9361 RUDDY 9361 0000000000 DB 0,0,0,0,0,0,0 ATARI CAMAC Assembler Ver 1.0A Page 65 D3:SCREENS.ASM 12 X 3 MATRIX 9368 3225212439 DB $32,$25,$21,$24,$39 936D 0000000000 DB 0,0,0,0,0,0,0,0 9375 GAMEOVER 9375 0245524D45 DB 2,'ERMEAVGO' ;*** MSG *** ; ;PUT MESSAGE UP ON SCREEN USING ;PLAYERS 0-3. MESSAGE MAY HAVE ;SEVERAL LINES OF UP TO 4 CHARACTERS ;EACH; PERMISSIBLE CHARACTERS ARE ;THE UPPERCASE LETTERS A-Z, AND THE ;AT SIGN @ STANDING IN FOR THE SPACE. 937E MSG PROC 937E A000 LDY #0 9380 B1C7 LDA (MESSAGE),Y 9382 8D0618 STA RC ;# ROWS OF LETTERS 9385 E6C7 INC MESSAGE 9387 D002 ^938B BNE *+4 9389 E6C8 INC MESSAGE+1 938B A203 LDX #3 938D 8698 STX LDUMMY ;(PLAYER #) 938F :PLAYER ;FOR EACH PLAYER(0-3) 938F A698 LDX LDUMMY ;(PLAYER #) 9391 2060B8 JSR WIPE ;ZERO THE PLAYER RAM 9394 A900 LDA #0 9396 9D08D0 STA SIZEP0,X ;DOUBLE WIDTH 9399 A90F LDA #WHITE 939B 9DC002 STA PCOLR0,X ;IN WHITE LETTERS 939E BDE993 LDA LHPOS,X 93A1 9D00D0 STA HPOSP0,X ;AT THIS HPOS 93A4 AD0618 LDA RC 93A7 8599 STA HDUMMY 93A9 AD601A LDA VRTCL 93AC 8D611A STA VRTCL1 93AF :LETTER ;FOR EACH LETTER 93AF A000 LDY #0 93B1 B1C7 LDA (MESSAGE),Y 93B3 8D621A STA LETTER 93B6 E6C7 INC MESSAGE 93B8 D002 ^93BC BNE *+4 93BA E6C8 INC MESSAGE+1 93BC 38 SEC 93BD E940 SBC #'@' 93BF 0A ASL A ;GET INDEX TO CHASET 93C0 0A ASL A ; (8 BYTES/LETTER) 93C1 0A ASL A 93C2 AA TAX 93C3 A908 LDA #8 93C5 85F1 STA BYTE 93C7 :BYTE ;FOR EACH BYTE (1-8) 93C7 BD00E1 LDA CHASET+[8*['@'-$20]],X 93CA AC621A LDY LETTER ATARI CAMAC Assembler Ver 1.0A Page 66 D3:SCREENS.ASM 12 X 3 MATRIX 93CD C040 CPY #'@' ;SUBSTITUTE SPACE FOR 93CF D002 ^93D3 BNE *+4 ;AT SIGN 93D1 A900 LDA #0 93D3 AC611A LDY VRTCL1 93D6 91C5 STA (WIPEIT),Y 93D8 E8 INX 93D9 EE611A INC VRTCL1 93DC C6F1 DEC BYTE 93DE D0E7 ^93C7 BNE :BYTE 93E0 C699 DEC HDUMMY 93E2 D0CB ^93AF BNE :LETTER 93E4 C698 DEC LDUMMY 93E6 10A7 ^938F BPL :PLAYER 93E8 60 RTS EPROC 93E9 LHPOS 93E9 70788088 DB $70,$78,$80,$88 ;*** SETCLR *** ; ;SET SAND COLOR TABLE POINTER. ;INDEX TO WORD COLOR TABLE IS ;(((GLEVEL-1)/4) MOD 3) * 2 93ED SETCLR PROC ;SET UP VARIABLE COLOR TABLES 93ED A6ED LDX PERSON 93EF BD0B18 LDA GLEVEL,X ;GET LEVEL 93F2 201C94 JSR LEVCOL ;FIND ITS COLOR LEVL 93F5 0A ASL A ;TIMES 2 FOR WORD 93F6 A8 TAY 93F7 B9BE81 LDA CPTR,Y 93FA 8580 STA COLTBS 93FC B9BF81 LDA CPTR+1,Y 93FF 8581 STA COLTBS+1 ;SET CONSTANT COLORS 9401 A994 LDA #BLUE ;SKY 9403 8DC402 STA COLOR0 9406 A9C8 LDA #GREEN ;FYGAR 9408 8DC502 STA COLOR1 940B A944 LDA #RED ;POOKA 940D 8DC602 STA COLOR2 9410 A90F LDA #WHITE ;DIGDUG & GHOSTS 9412 8DC002 STA PCOLR0 9415 8DC202 STA PCOLR2 9418 8DC302 STA PCOLR3 941B 60 RTS EPROC 941C LEVCOL ATARI CAMAC Assembler Ver 1.0A Page 67 D3:SCREENS.ASM 12 X 3 MATRIX 941C PROC 941C A8 TAY 941D 88 DEY ;(LEVEL MINUS 1) 941E 98 TYA 941F 4A LSR A ;DIVIDE BY 4 9420 4A LSR A 9421 :CHK3 9421 C903 CMP #3 ;COLOR LEVEL 0,1 OR 2 9423 9004 ^9429 BCC :FOUND 9425 E903 SBC #3 ;C ALREADY SET 9427 B0F8 ^9421 BCS :CHK3 ;C STILL SET 9429 :FOUND 9429 60 RTS EPROC 942A WAIT 942A PROC 942A A019 LDY #25 942C :WAIT 942C 2032B8 JSR DELAYS 942F 88 DEY 9430 D0FA ^942C BNE :WAIT 9432 60 RTS EPROC LIST L 9433 SHOW DDWALK LIST L INCLUDE D3:DDWALK.ASM ;DDWALK.ASM ;---------- ;THIS FILE CONTAINS THE ROUTINES ;TO READ THE JOYSTICK AND MAKE ;DIGDUG WALK. ;****************************** ;** SUB TO MAKE DIGDUG WALK ** ;** ON SCREEN AND DIG IN RE- ** ;** SPONSE TO JOYSTICK INPUT ** ;****************************** 9433 READJO PROC 9433 A900 LDA #00 ;ASSUME NOT SAND 9435 8D301A STA BELLY 9438 A5FE LDA PUMPFL 943A D042 ^947E BNE :45 943C 200FB8 JSR RDSTCK = 943F LACARY SET * ;:5 943F 8D3F19 STA SSTICK ;SHADOW STICK 9442 A200 LDX #0 ;TO RESET ATTRACT ;SHIFT OUT EACH DIRECTION BIT 9444 C90E CMP #JUP ;UP? 9446 D008 ^9450 BNE *+10 ATARI CAMAC Assembler Ver 1.0A Page 68 D3:DDWALK.ASM 12 X 3 MATRIX 9448 864D STX ATRACT 944A 208E94 JSR SET21 944D 4C4995 JMP UP ;:10 9450 C90D CMP #JDOWN ;DOWN? 9452 D008 ^945C BNE *+10 9454 864D STX ATRACT 9456 208E94 JSR SET21 9459 4C9D94 JMP DOWN ;:20 945C C90B CMP #JLEFT ;LEFT? 945E D008 ^9468 BNE *+10 9460 864D STX ATRACT 9462 208E94 JSR SET21 9465 4C6E96 JMP LEFT ;:30 9468 C907 CMP #JRIGHT ;RIGHT? 946A D008 ^9474 BNE *+10 946C 864D STX ATRACT 946E 208E94 JSR SET21 9471 4CF996 JMP RIGHT ;:40 9474 C90F CMP #$0F 9476 F006 ^947E BEQ :45 9478 AD4119 LDA OLDJOY 947B 4C3F94 JMP LACARY 947E :45 947E A5F6 LDA NTUNE 9480 C5F7 CMP OTUNE 9482 D004 ^9488 BNE *+6 9484 A912 LDA #18 ;CENTERED. 9486 85F6 STA NTUNE ;:50 9488 A9FF LDA #$FF 948A 8D4019 STA CATCHR ;HOLD ROCK IF ABOVE 948D 60 RTS 948E SET21 948E 8D4119 STA OLDJOY 9491 A5F6 LDA NTUNE 9493 C5F7 CMP OTUNE 9495 D005 ^949C BNE *+7 9497 AD4219 LDA BACKGR 949A 85F6 STA NTUNE ;:60 949C 60 RTS EPROC ;***************************** ;** DIGDUG MOVES DOWN ** ;***************************** 949D DOWN 949D PROC 949D AD3F19 LDA SSTICK 94A0 C90E CMP #JUP ATARI CAMAC Assembler Ver 1.0A Page 69 D3:DDWALK.ASM 12 X 3 MATRIX 94A2 F024 ^94C8 BEQ :CONTDO ;IF WE CAME FROM UP 94A4 A5F5 LDA LCOUNT 94A6 C90B CMP #$0B 94A8 F006 ^94B0 BEQ :RTSTD ;FINISH LEFT & RIGHT 94AA A5F4 LDA RCOUNT 94AC C90B CMP #$0B 94AE D00C ^94BC BNE :CHKVD 94B0 :RTSTD ;IS ROCK THERE? 94B0 E68F INC SCRENH 94B2 A090 LDY #$90 94B4 B18E LDA (SCREEN),Y 94B6 C68F DEC SCRENH 94B8 C94E CMP #$4E 94BA F006 ^94C2 BEQ :CANTD 94BC :CHKVD ;IS IT SCREEN BOUNDRY? 94BC A4F2 LDY VRTPOS 94BE C0D4 CPY #$D4 94C0 9006 ^94C8 BCC :CONTDO 94C2 :CANTD ;YES DD WALKS IN PLACE 94C2 A20B LDX #11 94C4 207797 JSR DRAWDD 94C7 60 RTS 94C8 :CONTDO ;CONTINUE DOWN 94C8 8D301A STA BELLY ;BELLY BITES SAND 94CB A4F8 LDY CONTRL ;WHERE ARE WE FROM? 94CD 98 TYA 94CE C903 CMP #03 ;WAS THIS FROM DOWN? 94D0 F020 ^94F2 BEQ :NORMD ;YES THEN GO NORMAL 94D2 C901 CMP #01 ;UP??? 94D4 D012 ^94E8 BNE :DFRMR 94D6 AD5119 LDA UFLAG 94D9 D006 ^94E1 BNE :OKYDU 94DB 204995 JSR UP 94DE 4C9D94 JMP DOWN 94E1 :OKYDU 94E1 C6F2 DEC VRTPOS 94E3 C6F2 DEC VRTPOS 94E5 4CEB94 JMP :RNRMD 94E8 :DFRMR 94E8 202C96 JSR COMMV1 94EB :RNRMD 94EB 20D098 JSR SETANW ;RESET DSTMP 94EE C6F2 DEC VRTPOS ;SET DD IN PATH 94F0 C6F2 DEC VRTPOS 94F2 :NORMD 94F2 B90A82 LDA TABLED,Y ;GET OFFSET 94F5 204B98 JSR REVRS1 94F8 204E98 JSR REVRSE 94FB A210 LDX #16 94FD A900 LDA #00 94FF 205996 JSR COMMV2 9502 A903 LDA #03 9504 85F8 STA CONTRL ;SET CONTRL FLAG=D 9506 E6F2 INC VRTPOS ATARI CAMAC Assembler Ver 1.0A Page 70 D3:DDWALK.ASM 12 X 3 MATRIX 9508 E6F2 INC VRTPOS 950A A20B LDX #11 950C 207797 JSR DRAWDD 950F ADB419 LDA DWNSTMP+$10 9512 8DB019 STA DWNSTMP+$0C 9515 8DAE19 STA DWNSTMP+$0A 9518 4940 EOR #$40 951A 8DB419 STA DWNSTMP+$10 951D 8DB219 STA DWNSTMP+$0E 9520 ADB319 LDA DWNSTMP+$0F 9523 8DAF19 STA DWNSTMP+$0B 9526 8DAD19 STA DWNSTMP+$09 9529 4901 EOR #$01 952B 8DB319 STA DWNSTMP+$0F 952E 8DB119 STA DWNSTMP+$0D 9531 :DMO 9531 A6F9 LDX DCOUNT 9533 AC4E19 LDY UCOUNT 9536 A90A LDA #10 9538 20A198 JSR MODULO 953B 86F9 STX DCOUNT 953D 8C4E19 STY UCOUNT 9540 AD5019 LDA DFLAG ;SEE IF 2 CYCLES DONE 9543 4901 EOR #01 9545 8D5019 STA DFLAG 9548 60 RTS ;****************************** ;** DIGDUG MOVES UP ** ;****************************** 9549 UP 9549 AD3F19 LDA SSTICK 954C C90D CMP #JDOWN 954E F053 ^95A3 BEQ :CONTUP ;IF WE CAME FROM UP 9550 A5F5 LDA LCOUNT 9552 C90B CMP #$0B 9554 F006 ^955C BEQ :RTSTU ;FINISH LEFT & RIGHT 9556 A5F4 LDA RCOUNT 9558 C90B CMP #$0B 955A D024 ^9580 BNE :CHKVU 955C :RTSTU ;IS ROCK THERE? 955C C68F DEC SCRENH 955E C68F DEC SCRENH 9560 C68F DEC SCRENH 9562 C68F DEC SCRENH 9564 A090 LDY #$90 9566 B18E LDA (SCREEN),Y 9568 E68F INC SCRENH 956A E68F INC SCRENH 956C E68F INC SCRENH 956E E68F INC SCRENH 9570 C94E CMP #$4E 9572 F004 ^9578 BEQ :DINGY 9574 C953 CMP #$53 9576 D008 ^9580 BNE :CHKVU ATARI CAMAC Assembler Ver 1.0A Page 71 D3:DDWALK.ASM 12 X 3 MATRIX 9578 :DINGY 9578 A9FF LDA #$FF 957A 8D4019 STA CATCHR 957D 4C9D95 JMP :CANTW 9580 :CHKVU ;IS IT SCREEN BOUNDRY? 9580 A4F2 LDY VRTPOS 9582 C022 CPY #$22 9584 9003 ^9589 BCC :CANTU 9586 4CA395 JMP :CONTUP 9589 :CANTU ;YES DD HOLDS IN PLACE 9589 A913 LDA #LOW DDR1 958B 8D5319 STA DATAD1 958E 8D5219 STA DATAD2 9591 A983 LDA #HIGH DDR1 9593 8D4919 STA DGDGH2 9596 8D4819 STA DGDGH1 9599 206B98 JSR DRAW 959C 60 RTS 959D :CANTW 959D A203 LDX #03 959F 207797 JSR DRAWDD ;DD WALKS UP IN PLACE 95A2 60 RTS 95A3 :CONTUP 95A3 8D301A STA BELLY 95A6 A4F8 LDY CONTRL ;WHERE ARE WE FROM 95A8 98 TYA 95A9 C901 CMP #01 ;IS THIS FROM UP 95AB F020 ^95CD BEQ :NORMU 95AD C903 CMP #03 ;DOWN 95AF D012 ^95C3 BNE :UFRMR 95B1 AD5019 LDA DFLAG 95B4 D006 ^95BC BNE :OKYUD 95B6 209D94 JSR DOWN 95B9 4C4995 JMP UP 95BC :OKYUD 95BC E6F2 INC VRTPOS 95BE E6F2 INC VRTPOS 95C0 4CC695 JMP :RNRMU 95C3 :UFRMR 95C3 202C96 JSR COMMV1 95C6 :RNRMU 95C6 20D098 JSR SETANW 95C9 E6F2 INC VRTPOS ;SET DD IN PATH 95CB E6F2 INC VRTPOS 95CD :NORMU 95CD B90282 LDA TABLEU,Y 95D0 204B98 JSR REVRS1 95D3 204E98 JSR REVRSE 95D6 A9B0 LDA #176 95D8 204B98 JSR REVRS1 95DB 204E98 JSR REVRSE 95DE A220 LDX #32 95E0 A910 LDA #16 95E2 205996 JSR COMMV2 95E5 A901 LDA #01 95E7 85F8 STA CONTRL 95E9 C6F2 DEC VRTPOS ATARI CAMAC Assembler Ver 1.0A Page 72 D3:DDWALK.ASM 12 X 3 MATRIX 95EB C6F2 DEC VRTPOS 95ED A203 LDX #03 95EF 207797 JSR DRAWDD 95F2 ADBB19 LDA UPSTMP+$06 95F5 8DB719 STA UPSTMP+$02 95F8 8DB519 STA UPSTMP+$00 95FB 4901 EOR #$01 95FD 8DBB19 STA UPSTMP+$06 9600 8DB919 STA UPSTMP+$04 9603 ADBC19 LDA UPSTMP+$07 9606 8DB819 STA UPSTMP+$03 9609 8DB619 STA UPSTMP+$01 960C 4940 EOR #$40 960E 8DBC19 STA UPSTMP+$07 9611 8DBA19 STA UPSTMP+$05 9614 :UMO 9614 AE4E19 LDX UCOUNT 9617 A4F9 LDY DCOUNT 9619 A90A LDA #10 961B 20A198 JSR MODULO 961E 8E4E19 STX UCOUNT 9621 84F9 STY DCOUNT 9623 AD5119 LDA UFLAG ;SEE IF 2 CYCLES DONE 9626 4901 EOR #01 9628 8D5119 STA UFLAG 962B 60 RTS 962C COMMV1 962C C902 CMP #02 ;FROM RIGHT? 962E D013 ^9643 BNE :DFRML ;NO, TRY LEFT 9630 A5F4 LDA RCOUNT 9632 C900 CMP #00 9634 F005 ^963B BEQ :OKYDR ;ALLOW TOGO DOWN 9636 68 PLA 9637 68 PLA 9638 4CF996 JMP RIGHT ;FINISH RIGHT FIRST 963B :OKYDR 963B A901 LDA #01 ;CLUDGE 1 BYTE TOO FEW 963D 205B98 JSR FOWAR1 9640 4C5396 JMP :ZEROP 9643 :DFRML 9643 A5F5 LDA LCOUNT ;CHEK LEFT 9645 C900 CMP #00 9647 F005 ^964E BEQ :OKYDL ;ALLOW TOGO DOWN 9649 68 PLA 964A 68 PLA 964B 4C6E96 JMP LEFT ;FINISH LEFT FIRST 964E :OKYDL 964E A9FF LDA #$FF ;CLUDGE 1 BYTE TOO 9650 204B98 JSR REVRS1 9653 :ZEROP 9653 A900 LDA #00 9655 8D4C19 STA PHASE 9658 60 RTS 9659 COMMV2 9659 8D4A19 STA XEXIT ;SET DATA GRABBERS ATARI CAMAC Assembler Ver 1.0A Page 73 D3:DDWALK.ASM 12 X 3 MATRIX 965C A919 LDA #HIGH DWNSTMP ;SET BASE PTR 965E 8597 STA HDATAD ;FOR UP DOWN 9660 A9A4 LDA #LOW DWNSTMP 9662 8596 STA DATAD 9664 202098 JSR OUTPUT ;GO TO IT MAN 9667 A90B LDA #11 ;RESET RCOUNT LCOUNT 9669 85F4 STA RCOUNT 966B 85F5 STA LCOUNT 966D 60 RTS ;****************************** ;** DIGDUG MOVES LEFT ** ;****************************** 966E LEFT 966E A20F LDX #15 9670 A00E LDY #14 9672 C68F DEC SCRENH 9674 B18E LDA (SCREEN),Y 9676 E68F INC SCRENH 9678 C97B CMP #$7B ;ROCK IN THE WAY 967A F00D ^9689 BEQ :CANTL 967C C93F CMP #$3F ;SPLIT IN THE WAY 967E F009 ^9689 BEQ :CANTL 9680 A4F3 LDY HZTPOS 9682 C035 CPY #$35 9684 9003 ^9689 BCC :CANTL 9686 4C8D96 JMP :CONTLE 9689 :CANTL 9689 207797 JSR DRAWDD 968C 60 RTS 968D :CONTLE 968D 8D301A STA BELLY 9690 A5F8 LDA CONTRL ;WHERE FROM 9692 C904 CMP #04 ;FROM LEFT?? 9694 F024 ^96BA BEQ :OKAYL ;YES GO NORMAL ;:LFRMR 9696 C902 CMP #02 9698 D01B ^96B5 BNE :LFRMV 969A 20B598 JSR IPHASE ;INVERSE PH. 969D 20DB96 JSR LMO ;FIX RL COUNTS 96A0 A903 LDA #03 96A2 8598 STA LDUMMY = 96A4 LACARY SET * ;:LOP90 96A4 20DB96 JSR LMO 96A7 C6F3 DEC HZTPOS 96A9 C698 DEC LDUMMY 96AB D0F7 ^96A4 BNE LACARY 96AD A902 LDA #02 96AF 205B98 JSR FOWAR1 96B2 4CB896 JMP :AOKYL 96B5 :LFRMV 96B5 209697 JSR COMM2 96B8 :AOKYL ATARI CAMAC Assembler Ver 1.0A Page 74 D3:DDWALK.ASM 12 X 3 MATRIX 96B8 E6F3 INC HZTPOS ;SET DD INPATH 96BA :OKAYL 96BA A982 LDA #HIGH [LFTSTMP-1] ;SET PTR 96BC 8597 STA HDATAD ;TO LEFT STAMP 96BE A912 LDA #LOW [LFTSTMP-1] 96C0 8596 STA DATAD 96C2 A9FF LDA #$FF ;SAY THIS IS LEFT 96C4 8D3F1A STA FAX 96C7 20B297 JSR COMM3 96CA B90E82 LDA TABLEL,Y ;GET OFFSET 96CD 20FE97 JSR COMM4 96D0 A904 LDA #04 ;SET CONTRL=LEFT 96D2 85F8 STA CONTRL 96D4 C6F3 DEC HZTPOS 96D6 A20F LDX #15 96D8 207797 JSR DRAWDD 96DB A6F5 LMO LDX LCOUNT ;SET R+L MODULO 12 96DD A4F4 LDY RCOUNT 96DF 20EC96 JSR SETMOD ;FIXES L/R WALK BUG 96E2 A90C LDA #12 96E4 20A198 JSR MODULO 96E7 86F5 STX LCOUNT 96E9 84F4 STY RCOUNT 96EB 60 RTS 96EC SETMOD 96EC C000 CPY #00 96EE D002 ^96F2 BNE *+4 ;DONT SET MODULO 96F0 A00C LDY #$0C ;:NSETY 96F2 E00C CPX #$0C 96F4 D002 ^96F8 BNE *+4 ;DONT SET X MODULO 96F6 A200 LDX #00 ;:NSETX 96F8 60 RTS ;****************************** ;** DIGDUG MOVES RIGHT ** ;****************************** 96F9 RIGHT 96F9 A207 LDX #07 96FB A012 LDY #18 96FD C68F DEC SCRENH 96FF B18E LDA (SCREEN),Y 9701 E68F INC SCRENH 9703 C97B CMP #$7B ;ROCK IN THE WAY 9705 F00A ^9711 BEQ :CANTR 9707 C93F CMP #$3F ;SPLIT IN THE WAY 9709 F006 ^9711 BEQ :CANTR 970B A4F3 LDY HZTPOS 970D C0C4 CPY #$C4 970F 9004 ^9715 BCC :CONTRI 9711 :CANTR 9711 207797 JSR DRAWDD 9714 60 RTS 9715 :CONTRI ATARI CAMAC Assembler Ver 1.0A Page 75 D3:DDWALK.ASM 12 X 3 MATRIX 9715 8D301A STA BELLY 9718 A5F8 LDA CONTRL ;FROM LEFT? 971A C902 CMP #02 971C F024 ^9742 BEQ :OKAYR ;FROM RIGHT?,GO RIGHT ;:RFRML 971E C904 CMP #04 9720 D01B ^973D BNE :RFRMV 9722 20B598 JSR IPHASE 9725 206697 JSR RMO 9728 A903 LDA #03 972A 8598 STA LDUMMY = 972C LACARY SET * ;:LOP91 972C 206697 JSR RMO 972F E6F3 INC HZTPOS 9731 C698 DEC LDUMMY 9733 D0F7 ^972C BNE LACARY 9735 A9FE LDA #$FE ;CUDGE 1 BYTE TOO FEW 9737 204B98 JSR REVRS1 973A 4C4097 JMP :AOKYR 973D :RFRMV 973D 209697 JSR COMM2 9740 :AOKYR 9740 C6F3 DEC HZTPOS ;SET DD INPATH 9742 :OKAYR 9742 A982 LDA #HIGH [RTSTMP-1] ;SET PTR 9744 8597 STA HDATAD ;TO RIGHT STAMP 9746 A992 LDA #LOW [RTSTMP-1] 9748 8596 STA DATAD 974A A900 LDA #00 974C 8D3F1A STA FAX ;SAY THIS IS RIGHT 974F 20B297 JSR COMM3 9752 B90682 LDA TABLER,Y ;GET OFFSET 9755 20FE97 JSR COMM4 9758 A902 LDA #02 975A 8D4998 STA BINGO 975D 85F8 STA CONTRL 975F E6F3 INC HZTPOS ;MOVE PLAYER RIGHT 9761 A207 LDX #07 ;THIS IS RIGHT 9763 207797 JSR DRAWDD 9766 A6F4 RMO LDX RCOUNT ;SET R+L MODULO 12 9768 A4F5 LDY LCOUNT 976A 20EC96 JSR SETMOD ;FIXES L/R WALK BUG 976D A90C LDA #12 976F 20A198 JSR MODULO 9772 86F4 STX RCOUNT 9774 84F5 STY LCOUNT 9776 60 RTS 9777 DRAWDD 9777 BD1098 LDA TABDDD,X 977A 8D4819 STA DGDGH1 977D CA DEX 977E BD1098 LDA TABDDD,X ;TELL WHR DDDATA IS 9781 8D5319 STA DATAD1 ;ANIMATION STATE 1 9784 CA DEX 9785 BD1098 LDA TABDDD,X ATARI CAMAC Assembler Ver 1.0A Page 76 D3:DDWALK.ASM 12 X 3 MATRIX 9788 8D4919 STA DGDGH2 978B CA DEX 978C BD1098 LDA TABDDD,X 978F 8D5219 STA DATAD2 ;ANIMATION STATE 2 9792 206B98 JSR DRAW 9795 60 RTS 9796 COMM2 9796 C901 CMP #01 ;UP?? 9798 D00C ^97A6 BNE :HFRMD 979A AD4E19 LDA UCOUNT ;YES CHECK IF OK 979D C900 CMP #00 ;YES GO NORMALLY 979F F010 ^97B1 BEQ :AOKYH 97A1 68 PLA 97A2 68 PLA 97A3 4C4995 JMP UP ;NO FINISH UP CYCLE 97A6 :HFRMD 97A6 A5F9 LDA DCOUNT 97A8 C900 CMP #00 97AA F005 ^97B1 BEQ :AOKYH ;IF OK THEN GO NORMAL 97AC 68 PLA 97AD 68 PLA 97AE 4C9D94 JMP DOWN ;IF NOT THEN FIN.CYCLE 97B1 :AOKYH 97B1 60 RTS 97B2 COMM3 97B2 A909 LDA #9 97B4 8D4E19 STA UCOUNT ;RESET UCOUNT 97B7 85F9 STA DCOUNT ;RESET DCOUNT 97B9 A901 LDA #01 97BB 8D5019 STA DFLAG 97BE 8D5119 STA UFLAG 97C1 EE4C19 INC PHASE 97C4 AC4C19 LDY PHASE 97C7 BEF381 LDX TABLEX,Y ;SET DATA GRABBERS 97CA B9F281 LDA TABLEA,Y 97CD 8D4A19 STA XEXIT 97D0 C001 CPY #01 ;FIRST PHASE??? 97D2 D01E ^97F2 BNE :FORTHR ;NO SEE IF FOURTH 97D4 AD3F1A LDA FAX 97D7 D00E ^97E7 BNE :L90 97D9 A5F8 LDA CONTRL 97DB C904 CMP #04 ;WE COME FROM LEFT? 97DD F013 ^97F2 BEQ :FORTHR ;YES THEN SKIP 97DF E68E INC SCREEN ;RIGHT 97E1 D00F ^97F2 BNE :FORTHR 97E3 E68F INC SCRENH ;YES,SET POINTER 97E5 D00B ^97F2 BNE :FORTHR 97E7 :L90 97E7 A5F8 LDA CONTRL 97E9 C902 CMP #02 ;WE COME FROM LEFT? 97EB F005 ^97F2 BEQ :FORTHR ;YES THEN SKIP 97ED A9FF LDA #255 ;LEFT 97EF 204B98 JSR REVRS1 ATARI CAMAC Assembler Ver 1.0A Page 77 D3:DDWALK.ASM 12 X 3 MATRIX 97F2 :FORTHR 97F2 C004 CPY #04 ;FOURTH PHASE??? 97F4 D005 ^97FB BNE :NORMR ;NO THEN GO ON 97F6 A900 LDA #00 ;YES THEN RESET PHASE 97F8 8D4C19 STA PHASE 97FB :NORMR 97FB A4F8 LDY CONTRL 97FD 60 RTS 97FE COMM4 97FE 204B98 JSR REVRS1 9801 204E98 JSR REVRSE 9804 A961 LDA #97 9806 204B98 JSR REVRS1 9809 204E98 JSR REVRSE 980C 202098 JSR OUTPUT 980F 60 RTS 9810 TABDDD ;TABLE DIGDUG DATA 9810 5183 DW DDU1 9812 6083 DW DDU2 9814 1383 DW DDR1 9816 2283 DW DDR2 9818 3283 DW DDD1 981A 4183 DW DDD2 981C 6F17 DW DDL1 981E 8017 DW DDL2 ;****************************** ;** OUT PUT TUNNEL STAMP ** ;****************************** 9820 OUTPUT 9820 A000 LDY #00 ;ZERO Y = 9822 LACARY SET * ;:MORE 9822 203998 JSR COMMO1 9825 E68E INC SCREEN 9827 D002 ^982B BNE *+4 9829 E68F INC SCRENH ;:GETOUT 982B 203998 JSR COMMO1 982E A927 LDA #39 9830 205B98 JSR FOWAR1 ;:BYPASS 9833 EC4A19 CPX XEXIT 9836 D0EA ^9822 BNE LACARY 9838 60 RTS 9839 COMMO1 9839 8A TXA 983A A8 TAY 983B A58F LDA SCRENH 983D C921 CMP #HIGH [SCR+$100] 983F 9008 ^9849 BCC BINGO ATARI CAMAC Assembler Ver 1.0A Page 78 D3:DDWALK.ASM 12 X 3 MATRIX 9841 B196 LDA (DATAD),Y ;GET DATA 9843 A000 LDY #00 9845 318E AND (SCREEN),Y ;MASK DATA1 9847 918E STA (SCREEN),Y ;PUOUT DATA1 9849 BINGO 9849 CA DEX 984A 60 RTS ;****************************** ;** TO OFFSET OUR LOCATION ON** ;** THE SCREEN BACKWARDS ** ;****************************** 984B REVRS1 984B 8D4B19 STA OFFSET 984E REVRSE 984E AD4B19 LDA OFFSET 9851 18 CLC 9852 658E ADC SCREEN 9854 858E STA SCREEN 9856 B002 ^985A BCS *+4 9858 C68F DEC SCRENH ;:BIPASS 985A 60 RTS ;****************************** ;** TO OFFSET OUR LOCATION ON** ;** THE SCREEN FOWARDS ** ;****************************** 985B FOWAR1 985B 8D4B19 STA OFFSET 985E FOWARD 985E AD4B19 LDA OFFSET 9861 18 CLC 9862 658E ADC SCREEN 9864 858E STA SCREEN 9866 9002 ^986A BCC *+4 9868 E68F INC SCRENH ;:BBPASS 986A 60 RTS ;****************************** ;** DRAW DIGDUG IN ANIMATED ** ;** POSITIONS UP,DOWN,LE OR R** ;****************************** 986B DRAW 986B A5F3 LDA HZTPOS 986D 8D00D0 STA HPOSP0 9870 AD4D19 LDA STATE ;CHECK ANIMATE ST 9873 4901 EOR #01 ;FLIP THE STATE 9875 8D4D19 STA STATE 9878 F00D ^9887 BEQ :STAT1 ;:STAT2 987A AD4819 LDA DGDGH1 987D 859B STA DGDGHI ATARI CAMAC Assembler Ver 1.0A Page 79 D3:DDWALK.ASM 12 X 3 MATRIX 987F AD5219 LDA DATAD2 ;DIGDUG DATA2 9882 859A STA DIGDUG ;DD POINTER IN PLRAM 9884 4C9198 JMP :SCOOT ;SKIP NEXT PART 9887 :STAT1 9887 AD4919 LDA DGDGH2 988A 859B STA DGDGHI 988C AD5319 LDA DATAD1 ;DD DATA 1 988F 859A STA DIGDUG ;DD POINTER IN PLRAM 9891 :SCOOT 9891 A6F2 LDX VRTPOS 9893 A000 LDY #00 ;SET UP FOR REDRAW DD = 9895 LACARY SET * ;:DRWNG 9895 B19A LDA (DIGDUG),Y ;GET DATA 9897 9D001C STA PLAY0,X ;PUT IN PLAYER RAM 989A E8 INX 989B C8 INY 989C C011 CPY #NUMBYT 989E D0F5 ^9895 BNE LACARY ;IF MORE GET MORE 98A0 60 RTS ;****************************** ;** SUB MAKING VPATHS UNIQUE ** ;****************************** 98A1 MODULO 98A1 8D4F19 STA ROUND 98A4 E8 INX ;SETTING UPWARDS MOD 98A5 EC4F19 CPX ROUND 98A8 D002 ^98AC BNE *+4 98AA A200 LDX #00 ;:MARY 98AC 88 DEY 98AD C000 CPY #00 98AF D003 ^98B4 BNE :MARIE 98B1 AC4F19 LDY ROUND 98B4 :MARIE 98B4 60 RTS ;****************************** ;** SUB TO INVERSE PHASE WHEN * ;** DIGDUG CHANGES HORZ. DIRCT* ;****************************** 98B5 IPHASE 98B5 AD4C19 LDA PHASE 98B8 C900 CMP #00 ;IS IT FOURTH 98BA F00D ^98C9 BEQ :IEXIT1 ;NO ,SEE IF FIRST ;:ONE 98BC C902 CMP #02 ;IS IT FIRST 98BE F009 ^98C9 BEQ :IEXIT1 ;NO, SEE IF SECOND ;:TWO 98C0 C901 CMP #01 ;IS IT SECOND 98C2 D006 ^98CA BNE :THREE ;NO SEE IF THIRD 98C4 A903 LDA #03 ;YES MAKE IT THIRD ATARI CAMAC Assembler Ver 1.0A Page 80 D3:DDWALK.ASM 12 X 3 MATRIX 98C6 8D4C19 STA PHASE 98C9 :IEXIT1 98C9 60 RTS 98CA :THREE 98CA A901 LDA #01 98CC 8D4C19 STA PHASE 98CF 60 RTS ;****************************** ;* RESET UP DOWN TUNNEL STAMP** ;****************************** 98D0 SETANW 98D0 A901 LDA #01 98D2 8DAF19 STA DWNSTMP+$0B 98D5 8DAD19 STA DWNSTMP+$09 98D8 8DB519 STA UPSTMP+$00 98DB 8DB719 STA UPSTMP+$02 98DE A900 LDA #00 98E0 8DB319 STA DWNSTMP+$0F 98E3 8DB119 STA DWNSTMP+$0D 98E6 8DB419 STA DWNSTMP+$10 98E9 8DB219 STA DWNSTMP+$0E 98EC 8DBB19 STA UPSTMP+$06 98EF 8DB919 STA UPSTMP+$04 98F2 8DBC19 STA UPSTMP+$07 98F5 8DBA19 STA UPSTMP+$05 98F8 A940 LDA #$40 98FA 8DB019 STA DWNSTMP+$0C 98FD 8DAE19 STA DWNSTMP+$0A 9900 8DB819 STA UPSTMP+$03 9903 8DB619 STA UPSTMP+$01 9906 60 RTS EPROC LIST L 9907 SHOW HOSE LIST L INCLUDE D1:HOSE.ASM ;HOSE.ASM ;-------- ;THIS FILE CONTAINS ROUTINES TO PUT ;OUT THE HOSE WHEN THE BUTTON IS ;PRESSED. 9907 PROC 9907 TLENGTH 9907 0007060706 DB 0,7,6,7,6 990C THDIR 990C 000E070D0B DB 0,JUP,JRIGHT,JDOWN,JLEFT 9911 TOFFSET 9911 00103AD837 DB 0,16,$3A,216,$37 9916 :TDDA 9916 005113326F DB 0,DDU1&255,DDR1&255,DDD1&255,DDL1&255 ATARI CAMAC Assembler Ver 1.0A Page 81 D1:HOSE.ASM 12 X 3 MATRIX 991B EVHODA 991B 00 DB 0 991C 5199 DW HDEV 991E 2D99 DW HREV 9920 5199 DW HDEV 9922 3E99 DW HLEV 9924 ODHODA 9924 00 DB 0 9925 5F99 DW HDOD 9927 3599 DW HROD 9929 5F99 DW HDOD 992B 4699 DW HLOD 992D HREV 992D 00002A00A2 DB $00,$00,$2A,$00,$A2,$80 9933 8080 DB $80,$80 ;OVERLAP OF 4 BYTES 9935 HROD 9935 0000000080 DB $00,$00,$00,$00,$80,$80 993B A2802A DB $A2,$80,$2A ;OVERLAP OF 3 BYTES 993E HLEV 993E 000000A802 DB $00,$00,$00,$A8,$02,$8A 9944 0202 DB $02,$02 ;OVERLAP OF 4 BYTES 9946 HLOD 9946 0000000002 DB $00,$00,$00,$00,$02,$02 994C 028A00A800 DB $02,$8A,$00,$A8,$00 ;OVERLAP OF 1 BYTE 9951 HDEV 9951 008000A000 DB $00,$80,$00,$A0,$00,$20,$00 9958 20002000A0 DB $20,$00,$20,$00,$A0,$00,$80 995F HDOD 995F 0080028002 DB $00,$80,$02,$80,$02,$00,$02 9966 0002000280 DB $00,$02,$00,$02,$80,$00,$80 996D PUMP 996D AEA81A LDX WHICHM 9970 303A ^99AC BMI :RGUL 9972 201DB8 JSR RDBUTT 9975 D012 ^9989 BNE :RGUL2 9977 200FB8 JSR RDSTCK 997A C90F CMP #$0F 997C F005 ^9983 BEQ *+7 997E CD5A18 CMP HDIR 9981 D006 ^9989 BNE :RGUL2 ;:OKBLOW 9983 A9FF LDA #$FF 9985 9DDF18 STA FE1,X 9988 60 RTS 9989 :RGUL2 9989 A201 LDX #01 = 998B LACARY SET * ;:LREG2 998B BDA61A LDA BUCTR,X ;SET BLOWDOWN TIMERS 998E C91E CMP #$1E 9990 B00F ^99A1 BCS :LASTBLO ;F LAST STAGE ,EXIT 9992 090C ORA #$0C ;TO XF FOR MAX TIME 9994 29FC AND #$FC 9996 9DA61A STA BUCTR,X ATARI CAMAC Assembler Ver 1.0A Page 82 D1:HOSE.ASM 12 X 3 MATRIX 9999 A9FF LDA #$FF ;TELL WORLD IVE MESS- 999B 8D5918 STA FLHDIR ;ED WITH BLOWUP CNT 999E 8D5B18 STA BUTNOP 99A1 :LASTBLO 99A1 CA DEX 99A2 10E7 ^998B BPL LACARY 99A4 A9FF LDA #$FF 99A6 8DA81A STA WHICHM 99A9 4CCB99 JMP :DONOCT 99AC :RGUL 99AC A9FF LDA #$FF 99AE 8DA81A STA WHICHM 99B1 A5FE LDA PUMPFL ;IS IT IN PROCESS? 99B3 F028 ^99DD BEQ :BTEST ;NO TEST BUTTON 99B5 200FB8 JSR RDSTCK 99B8 C90F CMP #$0F 99BA F00A ^99C6 BEQ :DOCNT 99BC CD5A18 CMP HDIR 99BF D00A ^99CB BNE :DONOCT 99C1 AD5918 LDA FLHDIR 99C4 D005 ^99CB BNE :DONOCT 99C6 :DOCNT ;DO COUNT DOWN TIMER 99C6 CE3D19 DEC HOCOUNT ;YES, TIMED OUT?? 99C9 D01C ^99E7 BNE :ABTEST ;N TEST BUTTON 99CB GDONOCT ;GLOBAL VARTIABLE 99CB :DONOCT ;DONT COUNT DOWN TIMER 99CB A900 LDA #00 99CD 8D5918 STA FLHDIR 99D0 A5FE LDA PUMPFL 99D2 F003 ^99D7 BEQ :99 99D4 20959B JSR HOIN ;YES HOSE IN 99D7 :99 99D7 A9FF LDA #$FF 99D9 8D0E1A STA HOONCE ;SET HOSE ONCE FLAG 99DC 60 RTS 99DD :BTEST 99DD 201DB8 JSR RDBUTT 99E0 D021 ^9A03 BNE :HXIT ;NO BUT. THEN EXIT 99E2 AD0E1A LDA HOONCE 99E5 D01B ^9A02 BNE :HXIT2 ;IF NOT 1ST THEN LEVE 99E7 :ABTEST 99E7 AD7C1A LDA TUNE15 99EA D007 ^99F3 BNE *+9 99EC A90F LDA #15 99EE 85F6 STA NTUNE 99F0 8D7C1A STA TUNE15 ;:OVER15 99F3 20099A JSR HOOUT ;PUT OUT HOSE 99F6 20099A JSR HOOUT ;PUT OUT HOSE 99F9 20099A JSR HOOUT ;PUT OUT HOSE 99FC 20099A JSR HOOUT ;PUT OUT HOSE 99FF 20099A JSR HOOUT ;PUT OUT HOSE 9A02 :HXIT2 9A02 60 RTS 9A03 :HXIT 9A03 A900 LDA #00 ATARI CAMAC Assembler Ver 1.0A Page 83 D1:HOSE.ASM 12 X 3 MATRIX 9A05 8D0E1A STA HOONCE ;CLEAR ONCE FLAG 9A08 60 RTS ;CAUSE I FOUND A ZERO 9A09 HOOUT 9A09 207B9A JSR HOWHER ;WHERE TO START? 9A0C 206A9A JSR HEND 9A0F A000 LDY #00 9A11 A5FD LDA MYTEMP 9A13 C904 CMP #04 9A15 D006 ^9A1D BNE :LESKIP ;SKIP BECAUSE THIS NO LEFT STATE 9A17 E69C INC THERE 9A19 D002 ^9A1D BNE :LESKIP 9A1B E69D INC THEREH 9A1D :LESKIP 9A1D B19C LDA (THERE),Y ;IS SOMETING THERE? 9A1F 293F AND #$3F 9A21 F00B ^9A2E BEQ :TRYMO ;NO THEN CONTINUE 9A23 29AA AND #$AA 9A25 F007 ^9A2E BEQ :TRYMO 9A27 A9FF LDA #$FF 9A29 8D5818 STA MONHIT 9A2C D037 ^9A65 BNE :LESS 9A2E :TRYMO 9A2E A5FD LDA MYTEMP ;IF HOSE RIGHT THEN LOOK IN ONE BYT: 9A30 C902 CMP #02 ;(I DONT KNOW IT SEEMS TO HELP WHEN: 9A32 F001 ^9A35 BEQ *+3 ;LEFT TO LOOK IN TWO BYTES TO FIND : 9A34 C8 INY ;:TRYM2 9A35 B19C LDA (THERE),Y 9A37 29FC AND #$FC 9A39 F00B ^9A46 BEQ :CONT 9A3B 29AA AND #$AA 9A3D F026 ^9A65 BEQ :LESS 9A3F A9FF LDA #$FF 9A41 8D5818 STA MONHIT 9A44 D01F ^9A65 BNE :LESS 9A46 :CONT 9A46 A5FD LDA MYTEMP 9A48 C904 CMP #04 9A4A D00A ^9A56 BNE :22 ;SKIP IF NOT LEFT STATE 9A4C C69C DEC THERE 9A4E A59C LDA THERE 9A50 C9FF CMP #$FF 9A52 D002 ^9A56 BNE :22 9A54 C69D DEC THEREH 9A56 :22 9A56 201F9B JSR HOMAP ;MAP HOSE OUT 9A59 E6FC INC HOSTAT ;NEXT STATE 9A5B A5FC LDA HOSTAT 9A5D C905 CMP #05 9A5F 3004 ^9A65 BMI :LESS 9A61 A905 LDA #05 ;NOT GREATER THAN 5 9A63 85FC STA HOSTAT 9A65 :LESS 9A65 A9FF LDA #$FF 9A67 85FE STA PUMPFL ;HOSE IN PROGERSS ATARI CAMAC Assembler Ver 1.0A Page 84 D1:HOSE.ASM 12 X 3 MATRIX 9A69 60 RTS 9A6A HEND 9A6A A58E LDA SCREEN 9A6C 859C STA THERE 9A6E A58F LDA SCRENH 9A70 859D STA THEREH 9A72 A599 LDA HDUMMY 9A74 858F STA SCRENH 9A76 A598 LDA LDUMMY 9A78 858E STA SCREEN 9A7A 60 RTS 9A7B HOWHER 9A7B A58E LDA SCREEN 9A7D 8598 STA LDUMMY 9A7F A58F LDA SCRENH 9A81 8599 STA HDUMMY 9A83 20F29B JSR :COMM9 9A86 86FD STX MYTEMP 9A88 BD0799 LDA TLENGTH,X 9A8B 8D3E19 STA LENGTH 9A8E BD0C99 LDA THDIR,X 9A91 8D5A18 STA HDIR 9A94 BD1199 LDA TOFFSET,X 9A97 204B98 JSR REVRS1 9A9A 8A TXA 9A9B 0A ASL A 9A9C AA TAX 9A9D A5FC LDA HOSTAT 9A9F 6A ROR A 9AA0 B00C ^9AAE BCS :ODDATA 9AA2 BD1B99 LDA EVHODA,X 9AA5 859F STA DATAH 9AA7 CA DEX 9AA8 BD1B99 LDA EVHODA,X 9AAB 4CB79A JMP :OVERHO 9AAE :ODDATA 9AAE BD2499 LDA ODHODA,X 9AB1 859F STA DATAH 9AB3 CA DEX 9AB4 BD2499 LDA ODHODA,X 9AB7 :OVERHO 9AB7 859E STA DATA 9AB9 E001 CPX #01 9ABB D01B ^9AD8 BNE :HRI 9ABD A6FC LDX HOSTAT 9ABF F00D ^9ACE BEQ :SKPHU = 9AC1 LACARY SET * ;:LZPHU 9AC1 A9B0 LDA #$B0 9AC3 204B98 JSR REVRS1 9AC6 A938 LDA #56 9AC8 204B98 JSR REVRS1 9ACB CA DEX ATARI CAMAC Assembler Ver 1.0A Page 85 D1:HOSE.ASM 12 X 3 MATRIX 9ACC D0F3 ^9AC1 BNE LACARY 9ACE :SKPHU 9ACE A5FE LDA PUMPFL 9AD0 D005 ^9AD7 BNE *+7 9AD2 C6F2 DEC VRTPOS 9AD4 206B98 JSR DRAW ;:NULUNG 9AD7 60 RTS 9AD8 :HRI 9AD8 E003 CPX #03 9ADA D012 ^9AEE BNE :HDO 9ADC A986 LDA #134 9ADE 18 CLC 9ADF 65FC ADC HOSTAT 9AE1 204B98 JSR REVRS1 9AE4 A5FE LDA PUMPFL 9AE6 D005 ^9AED BNE *+7 9AE8 E6F3 INC HZTPOS 9AEA 206B98 JSR DRAW ;:NRLUNG 9AED 60 RTS 9AEE :HDO 9AEE E005 CPX #05 9AF0 D01B ^9B0D BNE :HLE 9AF2 A6FC LDX HOSTAT 9AF4 F00D ^9B03 BEQ :SKPHD = 9AF6 LACARY SET * ;:LZPHD 9AF6 A950 LDA #$50 9AF8 205B98 JSR FOWAR1 9AFB A9C8 LDA #200 9AFD 205B98 JSR FOWAR1 9B00 CA DEX 9B01 D0F3 ^9AF6 BNE LACARY 9B03 :SKPHD 9B03 A5FE LDA PUMPFL 9B05 D005 ^9B0C BNE *+7 9B07 E6F2 INC VRTPOS 9B09 206B98 JSR DRAW ;:NDLUNG 9B0C 60 RTS 9B0D :HLE 9B0D A989 LDA #137 9B0F 38 SEC 9B10 E5FC SBC HOSTAT 9B12 204B98 JSR REVRS1 9B15 A5FE LDA PUMPFL 9B17 D005 ^9B1E BNE *+7 9B19 C6F3 DEC HZTPOS 9B1B 206B98 JSR DRAW ;:NLLUNG 9B1E 60 RTS 9B1F HOMAP 9B1F AE3E19 LDX LENGTH = 9B22 LACARY SET * ATARI CAMAC Assembler Ver 1.0A Page 86 D1:HOSE.ASM 12 X 3 MATRIX 9B22 A59D LDA THEREH 9B24 C920 CMP #HIGH SCR 9B26 9050 ^9B78 BCC :TOHIGH 9B28 C93F CMP #[HIGH SCR]+$1F 9B2A B04C ^9B78 BCS :TOHIGH ;OFF BOTTOM SCREEN 9B2C A5F3 LDA HZTPOS ;CHECKING IF DD ON RIGHT OR LEFT 9B2E C950 CMP #80 9B30 B014 ^9B46 BCS :DDONR ;DDONLE ;DIGDUG ON LEFT OF SCREEN 9B32 A59D LDA THEREH 9B34 C921 CMP #HIGH [SCR+$167] 9B36 D01A ^9B52 BNE :OKHOZ ;IT IS NOT OFF THE SCREEN SO GO 9B38 A59C LDA THERE 9B3A C977 CMP #LOW [SCR+$167] 9B3C D014 ^9B52 BNE :OKHOZ ;OFF LEFT EDGE SO NOGO 9B3E :TTHIGH 9B3E A9FF LDA #$FF 9B40 85FE STA PUMPFL 9B42 68 PLA 9B43 68 PLA 9B44 60 RTS 9B45 60 RTS 9B46 :DDONR 9B46 A59D LDA THEREH 9B48 C921 CMP #HIGH [SCR+$166] 9B4A D006 ^9B52 BNE :OKHOZ ;GO TO IT 9B4C A59C LDA THERE 9B4E C976 CMP #LOW [SCR+$166] 9B50 F0EC ^9B3E BEQ :TTHIGH ;OFF THE RIGHT EDGE NOGO 9B52 :OKHOZ 9B52 A000 LDY #00 9B54 20799B JSR :OTORIN 9B57 919C STA (THERE),Y 9B59 C8 INY 9B5A 20799B JSR :OTORIN 9B5D 919C STA (THERE),Y 9B5F 18 CLC 9B60 A59E LDA DATA 9B62 6902 ADC #02 9B64 859E STA DATA 9B66 9002 ^9B6A BCC :NODACA 9B68 E69F INC DATAH 9B6A :NODACA 9B6A 18 CLC 9B6B A59C LDA THERE 9B6D 6928 ADC #40 9B6F 859C STA THERE 9B71 9002 ^9B75 BCC HOVER 9B73 E69D INC THEREH 9B75 HOVER 9B75 CA DEX 9B76 D0AA ^9B22 BNE LACARY 9B78 :TOHIGH 9B78 60 RTS 9B79 :OTORIN ATARI CAMAC Assembler Ver 1.0A Page 87 D1:HOSE.ASM 12 X 3 MATRIX 9B79 AD5718 LDA ERASEH 9B7C F007 ^9B85 BEQ :OUTEND 9B7E B19E LDA (DATA),Y 9B80 49FF EOR #$FF 9B82 319C AND (THERE),Y 9B84 60 RTS 9B85 :OUTEND 9B85 B19E LDA (DATA),Y 9B87 119C ORA (THERE),Y 9B89 85FD STA MYTEMP 9B8B 2955 AND #$55 9B8D 0A ASL A 9B8E 49FF EOR #$FF 9B90 25FD AND MYTEMP 9B92 919C STA (THERE),Y 9B94 60 RTS 9B95 HOIN 9B95 A900 LDA #0 9B97 8D5818 STA MONHIT 9B9A A905 LDA #05 9B9C 8D3D19 STA HOCOUNT 9B9F A9FF LDA #$FF 9BA1 8D5718 STA ERASEH 9BA4 A5FC LDA HOSTAT 9BA6 C905 CMP #05 9BA8 F004 ^9BAE BEQ :NDECHO 9BAA C6FC DEC HOSTAT 9BAC 3010 ^9BBE BMI :STATE0 9BAE :NDECHO 9BAE 207B9A JSR HOWHER 9BB1 206A9A JSR HEND 9BB4 201F9B JSR HOMAP 9BB7 C6FC DEC HOSTAT 9BB9 3003 ^9BBE BMI :STATE0 9BBB 4CAE9B JMP :NDECHO 9BBE :STATE0 9BBE 20F29B JSR :COMM9 9BC1 E001 CPX #01 9BC3 D005 ^9BCA BNE :UNLR 9BC5 :UNLU 9BC5 E6F2 INC VRTPOS 9BC7 4CE29B JMP ERAN1 9BCA :UNLR 9BCA E002 CPX #02 9BCC D005 ^9BD3 BNE :UNLD 9BCE C6F3 DEC HZTPOS 9BD0 4CE29B JMP ERAN1 9BD3 :UNLD 9BD3 E003 CPX #03 9BD5 D005 ^9BDC BNE :UNLL 9BD7 C6F2 DEC VRTPOS 9BD9 4CE29B JMP ERAN1 9BDC :UNLL 9BDC E004 CPX #04 9BDE D005 ^9BE5 BNE *+7 ATARI CAMAC Assembler Ver 1.0A Page 88 D1:HOSE.ASM 12 X 3 MATRIX 9BE0 E6F3 INC HZTPOS 9BE2 ERAN1 9BE2 206B98 JSR DRAW ;ERAN 9BE5 A900 LDA #00 9BE7 8D7C1A STA TUNE15 9BEA 85FE STA PUMPFL 9BEC 85FC STA HOSTAT 9BEE 8D5718 STA ERASEH 9BF1 60 RTS 9BF2 :COMM9 9BF2 A200 LDX #0 ;GET DIR IN X = 9BF4 LACARY SET * ;:LDDP 9BF4 E8 INX 9BF5 AD5219 LDA DATAD2 9BF8 DD1699 CMP :TDDA,X 9BFB D0F7 ^9BF4 BNE LACARY ;GOT IT SO CONTIN. 9BFD 60 RTS LIST L 9BFE SHOW DEATH LIST L INCLUDE D1:DEATH.ASM ;DEATH.ASM ;--------- ;THIS FILE CONTAINS CODE TO PRODUCE ;DIGDUG'S DEATH THROES. ;************************************ ; ;DEATHT - DEATH THROES FOR DIG DUG ; ;THE DATA IS OUTPUT IN THREE STAGES ;WITH A LONG DELAY BETWEEN EACH ;STAGE. THE ROUTINE IN NOT ;EXITED UNTIL DIG DUG IS GONE. AT ;THIS POINT A JUMP TO A RESTART ;LOCTION IS EXECUTED. ; ;VARIABLES AFFECTED: ; ; DTCTR, LDUMMY, HDUMMY, TMPEND ; ;************************************ 9BFE DEATHT: 9BFE 00C3C30081 DB 0,$C3,$C3,0,$81,$81,$BD,$FF 9C06 81958142 DB $81,$95,$81,$42 9C0A 3C3E7F7F3E DB $3C,$3E,$7F,$7F,$3E,$36,$77 9C11 061F070311 DB 6,$1F,7,3,$11,1,$85,$C0,$DC 9C1A 7E3F1999 DB $7E,$3F,$19,$99 9C1E 9DFC7C1818 DB $9D,$FC,$7C,$18,$18,$38 9C24 0000061F07 DB 0,0,6,$1F,7,3,$11,1,$45,0,$5C ATARI CAMAC Assembler Ver 1.0A Page 89 D1:DEATH.ASM 12 X 3 MATRIX 9C2F 7E1FBD DB $7E,$1F,$BD 9C32 FD1DBCFC0C DB $FD,$1D,$BC,$FC,$0C 9C37 0000101010 DB 0,0,$10,$10,$10,$92,$54,$28,0 9C40 EE00285492 DB $EE,$00,$28,$54,$92,$10,$10 9C47 100000 DB $10,0,0 9C4A BYEBYE: 9C4A AD6A1A LDA THATONE 9C4D 0D821A ORA DONTDIE = 0001 IF DEBUG 9C50 0583 ORA ARGH ENDIF 9C52 D02D ^9C81 BNE :SKIP 9C54 AD211A LDA SP0PF ; COLLIDED WITH PLAY 9C57 2906 AND #$06 ; FIELD 1 OR 2? 9C59 4906 EOR #$06 ; MUST BE BOTH! 9C5B F025 ^9C82 BEQ :SUBDT ;IF COLL. THEN DEAD ; ELSE CHECK FLAGS 9C5D :ALIVE 9C5D A900 LDA #0 9C5F 8D5B1A STA DEHOLD ;DEATH COUNTER RESET 9C62 AC6318 LDY NOGHO ;CHECK COLISSIONS - IS GHOSTING ENA: 9C65 F00F ^9C76 BEQ :NOGHO 9C67 0D251A ORA SM0PL ;COLLIDED WITH GHOST? 9C6A 0D261A ORA SM1PL 9C6D 0D271A ORA SM2PL 9C70 0D281A ORA SM3PL 9C73 0D2C1A ORA SP3PL 9C76 :NOGHO 9C76 A4FA LDY FYGFIR ;IS A FYGAR FIRING? 9C78 3003 ^9C7D BMI :NOFIRE ; (IF NOT, DON'T 9C7A 0D2A1A ORA SP1PL ; OR IN FIRE COLL'N) 9C7D :NOFIRE 9C7D 2901 AND #1 9C7F D00C ^9C8D BNE :DTHDD 9C81 :SKIP 9C81 60 RTS 9C82 :SUBDT ;MUST SEE RED/GREEN COLLISION TWICE: 9C82 EE5B1A INC DEHOLD 9C85 AD5B1A LDA DEHOLD 9C88 C903 CMP #03 9C8A F001 ^9C8D BEQ :DTHDD ;IF TWO THEN DIE 9C8C 60 RTS 9C8D :DTHDD: ;FIRST SAVE STATUS OF MONSTERS ;AND ROCKS IN THIS LEVEL FOR ;THIS PERSON, AND THEN DISABLE ;THE MONSTERS! 9C8D 206BB5 JSR MUNIT ;END ALL TUNES 9C90 2054B8 JSR NOSOUND ;ALSO THIS 9C93 A904 LDA #04 9C95 85F6 STA NTUNE ;MON HIT DD SOUND ATARI CAMAC Assembler Ver 1.0A Page 90 D1:DEATH.ASM 12 X 3 MATRIX 9C97 A207 LDX #07 9C99 :HOLDMO ;HOLD MONSTER STILL 9C99 BD8D18 LDA MNSTEN,X 9C9C 1005 ^9CA3 BPL :TRYANO ;TRY ANOTHER 9C9E A9FD LDA #$FD 9CA0 9D8D18 STA MNSTEN,X 9CA3 :TRYANO 9CA3 CA DEX 9CA4 10F3 ^9C99 BPL :HOLDMO 9CA6 EE9D1A INC GHOSTOP ;FREEZE GHOSTS 9CA9 A914 LDA #20 9CAB 8D0F1A STA WAIT2D ;EXTRA DELAY 9CAE A5FE LDA PUMPFL 9CB0 F003 ^9CB5 BEQ :DEATHW 9CB2 20959B JSR HOIN ;TAKE AWAY HOSE 9CB5 :DEATHW 9CB5 202BB8 JSR DELAY 9CB8 202BB8 JSR DELAY ;TO SLOW DOWN FIRE/ROCK 9CBB 202691 JSR KEYS 9CBE 208F9D JSR SONSTERS ;MONSTER ROUTINE WITH X=0 AND MEND=: 9CC1 A900 LDA #0 ;DON'T REENABLE FYGAR 9CC3 2002A4 JSR FYFIRE ; AFTER FIRING 9CC6 209DA7 JSR ROCK 9CC9 A6ED LDX PERSON 9CCB BD0B18 LDA GLEVEL,X 9CCE 20B5AB JSR FRUITY 9CD1 AD831A LDA LOBELO ;WAITING FOR ROCK 9CD4 D0DF ^9CB5 BNE :DEATHW 9CD6 AD8219 LDA VTUNE+3 ;WAIT FOR EXTRA MAN 9CD9 C907 CMP #7 ; TUNE TO BE OVER 9CDB F0D8 ^9CB5 BEQ :DEATHW 9CDD CE0F1A DEC WAIT2D 9CE0 D0D3 ^9CB5 BNE :DEATHW 9CE2 A6ED LDX PERSON 9CE4 200D8B JSR BITMAP ;MNSTEN TO LIVE & ;RENABL TO UNFELL 9CE7 :OKDIE 9CE7 A207 LDX #07 ;SET MO ERASE FLAG 9CE9 :CLERMO 9CE9 BD8D18 LDA MNSTEN,X 9CEC F005 ^9CF3 BEQ :CLERED 9CEE A901 LDA #01 9CF0 9D8D18 STA MNSTEN,X 9CF3 :CLERED 9CF3 CA DEX 9CF4 10F3 ^9CE9 BPL :CLERMO 9CF6 208F9D JSR SONSTERS ;ERASE MONSTERS 9CF9 208F9D JSR SONSTERS ;FOR GOOD MEASURE 9CFC A900 LDA #0 9CFE 8D01D0 STA HPOSP1 ;(AND BLOWUPS/FIRE) 9D01 8D02D0 STA HPOSP2 ATARI CAMAC Assembler Ver 1.0A Page 91 D1:DEATH.ASM 12 X 3 MATRIX 9D04 A9FF LDA #$FF 9D06 8DAC1A STA GHOTAB ;(AND GHOSTS) 9D09 8DAD1A STA GHOTAB+1 9D0C 8DAE1A STA GHOTAB+2 9D0F 8DAF1A STA GHOTAB+3 9D12 A904 LDA #04 9D14 8D6B1A STA FCOUNT 9D17 2053AD JSR FLOWER 9D1A A6ED LDX PERSON 9D1C BD6219 LDA VEGFLG,X ;(YOU DIDN'T EAT YOUR ;VEGETABLES) 9D1F F003 ^9D24 BEQ :NOVEGD 9D21 20C8AC JSR NOBONV ;ONLY IF THERE 9D24 :NOVEGD ;NOW GO THROUGH DEATH THROES. 9D24 A905 LDA #05 9D26 85F6 STA NTUNE 9D28 A9FE LDA #LOW DEATHT 9D2A 8598 STA LDUMMY ;POINT TO DEATH DATA 9D2C A99B LDA #HIGH DEATHT 9D2E 8599 STA HDUMMY 9D30 A000 LDY #0 9D32 8C3C19 STY DTIDX ;SAVE DATA INDEX 9D35 A904 LDA #04 9D37 8D3B19 STA DTCTR ;3 STAGES USED ;SETUP HERE TO ZERO PLAYER 0 9D3A :DT5: 9D3A A200 LDX #0 9D3C 2060B8 JSR WIPE 9D3F AC3C19 LDY DTIDX 9D42 A6F2 LDX VRTPOS ;DIGDUGS VERTICAL POS 9D44 8A TXA 9D45 18 CLC 9D46 6913 ADC #19 9D48 8D3A19 STA TMPEND 9D4B :DT10: 9D4B B198 LDA (LDUMMY),Y ;GET TH DATA 9D4D 9D001C STA PLAY0,X ;INTO THE PLAYER 9D50 C8 INY 9D51 E8 INX 9D52 EC3A19 CPX TMPEND 9D55 D0F4 ^9D4B BNE :DT10 9D57 8C3C19 STY DTIDX ;SAVE WHERE WE ARE 9D5A A019 LDY #25 9D5C :DTTTTW 9D5C 202BB8 JSR DELAY 9D5F 88 DEY 9D60 10FA ^9D5C BPL :DTTTTW ATARI CAMAC Assembler Ver 1.0A Page 92 D1:DEATH.ASM 12 X 3 MATRIX 9D62 CE3B19 DEC DTCTR 9D65 D0D3 ^9D3A BNE :DT5 ;ALL 3 STAGES DONE? 9D67 A200 LDX #0 9D69 2060B8 JSR WIPE ;ZERO DIG DUG.... 9D6C A6ED LDX PERSON 9D6E BD111A LDA MNSLEFT,X ;ANY MONSTERS LEFT? 9D71 D00E ^9D81 BNE :NOTUNE 9D73 A908 LDA #8 9D75 85F6 STA NTUNE ;LEVEL-OVER TUNE 9D77 202A94 JSR WAIT 9D7A :TWAIT 9D7A AD7F19 LDA VTUNE 9D7D C908 CMP #8 9D7F F0F9 ^9D7A BEQ :TWAIT 9D81 :NOTUNE 9D81 A6ED LDX PERSON ;KILL OF A MAN FROM 9D83 DE0918 DEC MEN,X ; THIS PERSON 9D86 A2FF LDX #$FF 9D88 8E651A STX DIED 9D8B 9A TXS ;RESET THE STACK 9D8C 4CF489 JMP RESTRT ;RESTART THE LEVEL LIST L 9D8F SHOW MONSTER LIST L INCLUDE D1:MONSTER.ASM ;MONSTER.ASM ;----------- ;THIS FILE CONTAINS ROUTINES FOR ;THE GAME CHASE LOGIC, AND TO MOVE ;THE POOKAS AND FYGARS. 9D8F SONSTERS 9D8F A200 LDX #00 9D91 A908 LDA #08 9D93 8D4F18 STA MEND 9D96 MONSTERS 9D96 PROC 9D96 8E5919 STX MONNUM 9D99 A9FF LDA #$FF ;TELL THIS IS MONST. 9D9B 85B4 STA MOONLY ; ROUTE 9D9D BD8D18 LDA MNSTEN,X ;IF ZERO THEN SKIIP 9DA0 D006 ^9DA8 BNE :SALLY 9DA2 2057A0 JSR DELAYM 9DA5 4C4F9E JMP :MONEXT 9DA8 :SALLY 9DA8 BD4518 LDA MGREEN,X ;SETTING GREEN 9DAB F003 ^9DB0 BEQ :NOVERT ;NO GREEN(EN FRANCE) 9DAD 8D811A STA FGREEN 9DB0 :NOVERT 9DB0 BD9518 LDA LPOKAP,X 9DB3 8592 STA PUTHER ;UNDRAW MONSTERS ATARI CAMAC Assembler Ver 1.0A Page 93 D1:MONSTER.ASM 12 X 3 MATRIX 9DB5 BD9D18 LDA HPOKAP,X 9DB8 8593 STA HPUTHER 9DBA A9C5 LDA #LOW ZERDAT ;PUT ZERO DATA 9DBC 8590 STA GETHER 9DBE A919 LDA #HIGH ZERDAT 9DC0 8591 STA HGETHER 9DC2 BD8D18 LDA MNSTEN,X ;NO ERASE? 9DC5 C9FE CMP #$FE 9DC7 F033 ^9DFC BEQ :NOTERZ ;SKIP ERASE 9DC9 BC9D18 LDY HPOKAP,X 9DCC BD9518 LDA LPOKAP,X 9DCF 20A4B1 JSR CVTSTP 9DD2 38 SEC 9DD3 E900 SBC #00 9DD5 18 CLC 9DD6 6900 ADC #$00 9DD8 8D4D18 STA MONIS 9DDB C932 CMP #$32 9DDD 900F ^9DEE BCC :WAITVC 9DDF 38 SEC 9DE0 E930 SBC #$30 9DE2 8D4E18 STA SCANBE 9DE5 AD0BD4 LDA VCOUNT 9DE8 2A ROL A 9DE9 CD4E18 CMP SCANBE 9DEC 900B ^9DF9 BCC :ROOMOK 9DEE :WAITVC 9DEE AD0BD4 LDA VCOUNT 9DF1 F006 ^9DF9 BEQ :ROOMOK 9DF3 2A ROL A 9DF4 CD4D18 CMP MONIS 9DF7 90F5 ^9DEE BCC :WAITVC 9DF9 :ROOMOK 9DF9 20689E JSR MAPPIT ;ERASE OLD POSITION 9DFC :NOTERZ 9DFC AE5919 LDX MONNUM 9DFF BD8D18 LDA MNSTEN,X ;IF STATIONERY, 9E02 C9FF CMP #MNSTON ;DON'T COMPUTE NEXT 9E04 D006 ^9E0C BNE :NOMOVE ;ACTION 9E06 20CEA1 JSR PCONTROL 9E09 20E9A0 JSR PMOVES 9E0C :NOMOVE 9E0C BD9518 LDA LPOKAP,X ;SET PUTHER 9E0F 8592 STA PUTHER 9E11 BD9D18 LDA HPOKAP,X 9E14 8593 STA HPUTHER 9E16 BDA518 LDA SAVEPP,X ;SET GET HERE 9E19 8590 STA GETHER 9E1B BDAD18 LDA HSAVEPP,X 9E1E 8591 STA HGETHER 9E20 BD8D18 LDA MNSTEN,X ;SEE IF STATE IS 9E23 C9FD CMP #$FD ;DYNAMIC ERASE,I.E. ATARI CAMAC Assembler Ver 1.0A Page 94 D1:MONSTER.ASM 12 X 3 MATRIX 9E25 D005 ^9E2C BNE :NODYNS ;ERASE ONCE THEN HOLD 9E27 A9FE LDA #$FE ;SAME AS MONSTA 9E29 9D8D18 STA MNSTEN,X 9E2C :NODYNS 9E2C BD8D18 LDA MNSTEN,X 9E2F C901 CMP #MNSTDI ;IF ERASED THEN DIE 9E31 D005 ^9E38 BNE :NTDIE 9E33 A900 LDA #00 ;SETTING TO FORGET 9E35 9D8D18 STA MNSTEN,X 9E38 :NTDIE 9E38 BD8D18 LDA MNSTEN,X ;HIT BY ROCK STATE 9E3B C907 CMP #07 9E3D D005 ^9E44 BNE :NOTDI2 9E3F A901 LDA #01 9E41 9D8D18 STA MNSTEN,X 9E44 :NOTDI2 ;FOR MON HIT BY ROCKS 9E44 BD8D18 LDA MNSTEN,X ;IF GHOSTING/DEAD, 9E47 1006 ^9E4F BPL :MONEXT ;DON'T DRAW AGAIN 9E49 20689E JSR MAPPIT ;DRAW NEW POSITION 9E4C AE5919 LDX MONNUM 9E4F :MONEXT 9E4F AD101A LDA MFRAME 9E52 A900 LDA #00 ;CLEER GREEN 9E54 8D811A STA FGREEN 9E57 E8 INX 9E58 EC4F18 CPX MEND 9E5B F003 ^9E60 BEQ :NOMOMOS 9E5D 4C969D JMP MONSTERS 9E60 :NOMOMOS 9E60 A900 LDA #00 ;NO MORE MONS.ROUTE 9E62 85B4 STA MOONLY ;STOP LOOKING FOR 9E64 8D091A STA TELLMO ;RK MON COLLISION 9E67 60 RTS EPROC 9E68 MAPPIT 9E68 PROC 9E68 BDC518 LDA HOWMANY,X 9E6B 8D5B19 STA PCOUNT 9E6E BDBD18 LDA POOPHASE,X 9E71 0A ASL A 9E72 7DBD18 ADC POOPHASE,X 9E75 85E9 STA PHMASK 9E77 LOOPZZ 9E77 A927 LDA #39 9E79 85B8 STA ADDWHO 9E7B BDCE18 LDA BBBFLAG,X 9E7E 85B9 STA BBBFLG 9E80 F002 ^9E84 BEQ :ADDNOT 9E82 C6B8 DEC ADDWHO 9E84 :ADDNOT 9E84 A9FF LDA #$FF 9E86 85B5 STA GREEN1 9E88 85B6 STA GREEN2 9E8A 85B7 STA GREEN3 ATARI CAMAC Assembler Ver 1.0A Page 95 D1:MONSTER.ASM 12 X 3 MATRIX 9E8C AD811A LDA FGREEN 9E8F F00C ^9E9D BEQ :NVERT9 9E91 A96A LDA #$6A 9E93 85B5 STA GREEN1 9E95 A9AA LDA #$AA 9E97 85B6 STA GREEN2 9E99 A9A9 LDA #$A9 9E9B 85B7 STA GREEN3 9E9D :NVERT9 9E9D 8E5619 STX SAVE 9EA0 A6E9 LDX PHMASK 9EA2 BD019F LDA MASK,X 9EA5 85EA STA ZMASK 9EA7 BD029F LDA MASK+1,X 9EAA 85EB STA ZMASK+1 9EAC BD039F LDA MASK+2,X 9EAF 85EC STA ZMASK+2 9EB1 A200 LDX #0 9EB3 AC5B19 LDY PCOUNT 9EB6 LOOPZ2 9EB6 20109F JSR CHECKH 9EB9 A5EA LDA ZMASK 9EBB 2192 AND (PUTHER,X) 9EBD 1190 ORA (GETHER),Y 9EBF 25B5 AND GREEN1 9EC1 8192 STA (PUTHER,X) 9EC3 88 DEY 9EC4 E692 INC PUTHER 9EC6 D002 ^9ECA BNE *+4 9EC8 E693 INC HPUTHER 9ECA A5B9 LDA BBBFLG 9ECC F014 ^9EE2 BEQ :NOBBB 9ECE 20109F JSR CHECKH 9ED1 A5EB LDA ZMASK+1 9ED3 2192 AND (PUTHER,X) 9ED5 1190 ORA (GETHER),Y 9ED7 25B6 AND GREEN2 9ED9 8192 STA (PUTHER,X) 9EDB 88 DEY 9EDC E692 INC PUTHER 9EDE D002 ^9EE2 BNE *+4 9EE0 E693 INC HPUTHER 9EE2 :NOBBB 9EE2 20109F JSR CHECKH 9EE5 A5EC LDA ZMASK+2 9EE7 2192 AND (PUTHER,X) 9EE9 1190 ORA (GETHER),Y 9EEB 25B7 AND GREEN3 9EED 8192 STA (PUTHER,X) 9EEF 18 CLC 9EF0 A592 LDA PUTHER 9EF2 65B8 ADC ADDWHO 9EF4 8592 STA PUTHER 9EF6 9002 ^9EFA BCC *+4 9EF8 E693 INC HPUTHER ATARI CAMAC Assembler Ver 1.0A Page 96 D1:MONSTER.ASM 12 X 3 MATRIX 9EFA 88 DEY 9EFB D0B9 ^9EB6 BNE LOOPZ2 9EFD AE5619 LDX SAVE 9F00 60 RTS 9F01 MASK 9F01 000000 DB 0,0,0 9F04 FF000F DB $FF,$00,$0F ;PHASE 1 9F07 FC003F DB $FC,$00,$3F ;PHASE 2 9F0A F000FF DB $F0,$00,$FF ;PHASE 3 9F0D C00003 DB $C0,$00,$03 ;PHASE 4 EPROC 9F10 CHECKH ;CHECKING FOR MONHIT 9F10 PROC 9F10 A5B4 LDA MOONLY ;CHECK ONLY IF IN 9F12 F069 ^9F7D BEQ :NORKMO ;MONSTER ROUTINE 9F14 AD5818 LDA MONHIT 9F17 F030 ^9F49 BEQ :NONOTIT 9F19 A592 LDA PUTHER ;CHECKING LOW 9F1B C59C CMP THERE 9F1D D025 ^9F44 BNE :NONEIT 9F1F A593 LDA HPUTHER ;CHECKING HIGH 9F21 C59D CMP THEREH 9F23 D01F ^9F44 BNE :NONEIT 9F25 AE5619 LDX SAVE 9F28 BD8D18 LDA MNSTEN,X 9F2B 1017 ^9F44 BPL :NONEIT 9F2D A9FF LDA #$FF ;HIT HIT HIT HIT 9F2F 9DDF18 STA FE1,X 9F32 8EA81A STX WHICHM ;SAVE WHICH ONE 9F35 A900 LDA #00 ;RESET MONHIT FO LATER 9F37 8D5818 STA MONHIT 9F3A A900 LDA #0 9F3C 201DA0 JSR CONFLICT ;RESOLVE FIRE 9F3F A200 LDX #0 9F41 4C499F JMP :NONOTIT 9F44 :NONEIT 9F44 A9FF LDA #$FF 9F46 8DA81A STA WHICHM 9F49 :NONOTIT 9F49 AD091A LDA TELLMO ;RK MON COLLIDE? 9F4C F02E ^9F7C BEQ :EXIT ;NO RK MON. COLLIDE 9F4E A592 LDA PUTHER 9F50 CD0A1A CMP MONRK 9F53 D027 ^9F7C BNE :EXIT 9F55 A593 LDA HPUTHER 9F57 CD0B1A CMP MONRKH 9F5A D020 ^9F7C BNE :EXIT ;CHECKING SCR. MEM. 9F5C AE5619 LDX SAVE 9F5F A907 LDA #07 ;GOT IT SO ERASE HIM 9F61 9D8D18 STA MNSTEN,X 9F64 98 TYA 9F65 48 PHA 9F66 8A TXA 9F67 A8 TAY ATARI CAMAC Assembler Ver 1.0A Page 97 D1:MONSTER.ASM 12 X 3 MATRIX 9F68 2007A0 JSR HITTY ;SEY THE MONSTER TO BE DEAD 9F6B 98 TYA 9F6C AA TAX 9F6D 68 PLA 9F6E A8 TAY 9F6F A901 LDA #1 9F71 201DA0 JSR CONFLICT ;RESOLVE FIRE/BU 9F74 AE5518 LDX SAVERN 9F77 9D2719 STA FMONRK,X ;MAKE SQUISHED DATA 9F7A A200 LDX #0 9F7C :EXIT 9F7C 60 RTS 9F7D :NORKMO 9F7D AD7518 LDA RGOBOOM 9F80 D001 ^9F83 BNE :VINO 9F82 60 RTS 9F83 :VINO 9F83 4A LSR A 9F84 8A TXA 9F85 48 PHA 9F86 98 TYA 9F87 48 PHA 9F88 9039 ^9FC3 BCC :CHECKA 9F8A :CHRS7 9F8A A203 LDX #03 9F8C :LOOPA 9F8C BC841A LDY HTAB,X 9F8F D00A ^9F9B BNE :GOON 9F91 98 TYA 9F92 9D901A STA CORHIL,X 9F95 9D981A STA CORHIR,X 9F98 4CBB9F JMP :HERE 9F9B :GOON 9F9B BD881A LDA VTAB,X 9F9E 18 CLC 9F9F 6906 ADC #06 9FA1 20FAB1 JSR CVTPTS 9FA4 9D8C1A STA CORLOL,X 9FA7 98 TYA 9FA8 9D901A STA CORHIL,X 9FAB BD8C1A LDA CORLOL,X 9FAE 18 CLC 9FAF 6901 ADC #01 9FB1 9D941A STA CORLOR,X 9FB4 9001 ^9FB7 BCC :LATER 9FB6 C8 INY 9FB7 :LATER 9FB7 98 TYA 9FB8 9D981A STA CORHIR,X 9FBB :HERE 9FBB CA DEX 9FBC 10CE ^9F8C BPL :LOOPA 9FBE A980 LDA #$80 9FC0 8D7518 STA RGOBOOM 9FC3 :CHECKA ATARI CAMAC Assembler Ver 1.0A Page 98 D1:MONSTER.ASM 12 X 3 MATRIX 9FC3 A203 LDX #03 9FC5 :LOOPB 9FC5 A592 LDA PUTHER 9FC7 DD8C1A CMP CORLOL,X 9FCA D00A ^9FD6 BNE :NEXTR 9FCC A593 LDA HPUTHER 9FCE DD901A CMP CORHIL,X 9FD1 D02C ^9FFF BNE :NEXT 9FD3 4CE29F JMP :GOT 9FD6 :NEXTR 9FD6 DD941A CMP CORLOR,X 9FD9 D024 ^9FFF BNE :NEXT 9FDB A593 LDA HPUTHER 9FDD DD981A CMP CORHIR,X 9FE0 D01D ^9FFF BNE :NEXT 9FE2 :GOT 9FE2 BCAC1A LDY GHOTAB,X 9FE5 C0FF CPY #$FF 9FE7 F016 ^9FFF BEQ :NEXT 9FE9 2007A0 JSR HITTY 9FEC AC5518 LDY SAVERN 9FEF A9FF LDA #$FF 9FF1 992719 STA FMONRK,Y 9FF4 9D7618 STA HITGHO,X 9FF7 A900 LDA #00 9FF9 9D841A STA HTAB,X 9FFC 9D881A STA VTAB,X 9FFF :NEXT 9FFF CA DEX A000 10C3 ^9FC5 BPL :LOOPB A002 :NOGHRK A002 68 PLA A003 A8 TAY A004 68 PLA A005 AA TAX A006 60 RTS A007 HITTY A007 C0FF CPY #$FF A009 F011 ^A01C BEQ :DONE A00B B97B18 LDA DEADMO,Y A00E 300C ^A01C BMI :DONE A010 EE751A INC HITCNT A013 A9FF LDA #$FF A015 997B18 STA DEADMO,Y A018 A90A LDA #10 A01A 85F6 STA NTUNE A01C :DONE A01C 60 RTS EPROC A01D CONFLICT A01D PROC ;NEW TRACEY CODE! ATARI CAMAC Assembler Ver 1.0A Page 99 D1:MONSTER.ASM 12 X 3 MATRIX A01D 48 PHA ;SAVE ARGUMENT A01E E4FA CPX FYGFIR ;THIS A FIRY FYGAR? A020 D00B ^A02D BNE :BU A022 2077A4 JSR FIROFF ;TURN OFF FIRE A025 A900 LDA #0 A027 8D01D0 STA HPOSP1 A02A 4C55A0 JMP :QUIT A02D :BU A02D 68 PLA ;CHECK BLOWUP? A02E 48 PHA ;(IF ZERO, DON'T!) A02F F024 ^A055 BEQ :QUIT A031 98 TYA A032 48 PHA A033 A000 LDY #0 A035 8A TXA A036 D9A41A CMP BUMNST,Y ;THIS A BLOWUP? A039 F006 ^A041 BEQ :GOTIT A03B C8 INY A03C D9A41A CMP BUMNST,Y A03F D012 ^A053 BNE :NOTBU A041 :GOTIT A041 A900 LDA #0 A043 9901D0 STA HPOSP1,Y A046 A9FF LDA #$FF A048 99A41A STA BUMNST,Y A04B ECA81A CPX WHICHM A04E D003 ^A053 BNE :NOTBU A050 8DA81A STA WHICHM A053 :NOTBU A053 68 PLA A054 A8 TAY A055 :QUIT A055 68 PLA A056 60 RTS EPROC A057 DELAYM A057 PROC A057 8A TXA A058 48 PHA A059 98 TYA A05A 48 PHA A05B A204 LDX #$04 A05D A000 LDY #$00 A05F :LOOPYM A05F 88 DEY A060 D0FD ^A05F BNE :LOOPYM A062 CA DEX A063 D0FA ^A05F BNE :LOOPYM A065 68 PLA A066 A8 TAY A067 68 PLA A068 AA TAX A069 60 RTS EPROC ATARI CAMAC Assembler Ver 1.0A Page 100 D1:MONSTER.ASM 12 X 3 MATRIX A06A TRY PROC A06A 86FD STX MYTEMP ;SAVE MONSTER # A06C BCB518 LDY GOPOOKA,X ;DIRECTION-->INDEX A06F BDBD18 LDA POOPHASE,X ;ANIMATION PHASE A072 C904 CMP #04 ; FOURTH PHASE? A074 D01C ^A092 BNE :PH123 ;FALL THRU FOR PH4 A076 18 CLC A077 BD9518 LDA LPOKAP,X ;CHECK R/L OF HEAD A07A 79D1A0 ADC :TRYOL,Y A07D 8598 STA LDUMMY A07F BD9D18 LDA HPOKAP,X A082 79D5A0 ADC :TRYOH,Y A085 8599 STA HDUMMY A087 98 TYA A088 AA TAX ;(X NOW = GOPOOKA) A089 2099A0 JSR COMMM ;LOOK AROUND IT A08C A6FD LDX MYTEMP ;RESTORE MONSTER # A08E 9DB518 STA GOPOOKA,X ;SAVE THE RESULT A091 60 RTS A092 :PH123 A092 B9CDA0 LDA :PHOBIA,Y ;GET RESULT IF A095 9DB518 STA GOPOOKA,X ;PHASE 1, 2, OR 3 A098 60 RTS A099 COMMM A099 A000 LDY #0 ;CHECK FIRST BYTE A09B B198 LDA (LDUMMY),Y A09D 3DD9A0 AND :CTAB1,X A0A0 F004 ^A0A6 BEQ :GOON ;IF OCCUPIED THEN END A0A2 29AA AND #$AA A0A4 F024 ^A0CA BEQ :NOGOOD A0A6 :GOON A0A6 BCDDA0 LDY :CTAB2,X ;CHECK SECOND BYTE A0A9 B198 LDA (LDUMMY),Y A0AB 3DE5A0 AND :CTAB4,X A0AE F004 ^A0B4 BEQ :GOON2 A0B0 29AA AND #$AA A0B2 F016 ^A0CA BEQ :NOGOOD A0B4 :GOON2 A0B4 8A TXA ;IF UP/DOWN, SKIP A0B5 4A LSR A ; THE THIRD CHECK A0B6 9010 ^A0C8 BCC :GOOD A0B8 E699 INC HDUMMY ;CHECK THIRD BYTE A0BA BCE1A0 LDY :CTAB3,X A0BD B198 LDA (LDUMMY),Y A0BF 3DD9A0 AND :CTAB1,X A0C2 F004 ^A0C8 BEQ :GOOD ;IF OCCUPIED THEN END A0C4 29AA AND #$AA A0C6 F002 ^A0CA BEQ :NOGOOD A0C8 :GOOD A0C8 8A TXA ;GOOD IS GOPOOKA IN X A0C9 60 RTS A0CA :NOGOOD A0CA A9FF LDA #$FF ;NOGOOD IS $FF A0CC 60 RTS ATARI CAMAC Assembler Ver 1.0A Page 101 D1:MONSTER.ASM 12 X 3 MATRIX A0CD FF01FF03 :PHOBIA DB $FF,1,$FF,3 A0D1 D802E0FF :TRYOL DB -40,2,LOW [12*40],-1 A0D5 FF0001FF :TRYOH DB -1,0,HIGH[12*40],-1 A0D9 3FFC3F3F :CTAB1 DB $3F,$FC,$3F,$3F A0DD 01C801C8 :CTAB2 DB 1,200,1,200 A0E1 00B800B8 :CTAB3 DB 0,184,0,184 A0E5 FCFCFC3F :CTAB4 DB $FC,$FC,$FC,$3F A0E9 PMOVES A0E9 PROC A0E9 206EA1 JSR FYORPO A0EC BDB518 LDA GOPOOKA,X A0EF 4A LSR A ;U/D OR R/L? A0F0 B018 ^A10A BCS :RL A0F2 A8 :UD TAY ;UP OR DOWN A0F3 18 CLC A0F4 BD9518 LDA LPOKAP,X A0F7 798DA1 ADC UPDWNL,Y A0FA 9D9518 STA LPOKAP,X A0FD BD9D18 LDA HPOKAP,X A100 798FA1 ADC UPDWNH,Y A103 9D9D18 STA HPOKAP,X A106 20ACA1 JSR SETUD A109 60 RTS A10A 48 :RL PHA ;SAVE R/L A10B B985A1 LDA MMLO,Y ;Y IS PIFFY # A10E 85BA STA BASE A110 B988A1 LDA MMHI,Y A113 85BB STA BASE+1 A115 20C3A1 JSR SETRL A118 68 PLA A119 A8 TAY ;LET POOPHASE= ; ((POOPHASE+PHADIR(Y))&3)+1 A11A 18 CLC A11B BDBD18 LDA POOPHASE,X A11E 798BA1 ADC PHADIR,Y A121 2903 AND #3 A123 9DBD18 STA POOPHASE,X A126 FEBD18 INC POOPHASE,X A129 C000 CPY #0 ;NOW WE DIVERGE FOR A12B F01C ^A149 BEQ :PORIGHT ;LEFT VS. RIGHT A12D :POLEFT A12D C900 CMP #00 ;(REALLY PH=1) A12F D010 ^A141 BNE :TRY4 A131 DE9518 DEC LPOKAP,X A134 BD9518 LDA LPOKAP,X A137 C9FF CMP #$FF A139 D003 ^A13E BNE :NOBOUND ATARI CAMAC Assembler Ver 1.0A Page 102 D1:MONSTER.ASM 12 X 3 MATRIX A13B DE9D18 DEC HPOKAP,X A13E :NOBOUND A13E 4C59A1 JMP :LZ A141 :TRY4 A141 C903 CMP #03 ;(REALLY PH=4) A143 D014 ^A159 BNE :LZ A145 20ACA1 JSR SETUD A148 60 RTS A149 :PORIGHT A149 C903 CMP #03 ;(REALLY PH=4) A14B D00C ^A159 BNE :LZ A14D 20ACA1 JSR SETUD ;MAKE TWO BYTES WIDE A150 FE9518 INC LPOKAP,X A153 D003 ^A158 BNE :RNBOUND A155 FE9D18 INC HPOKAP,X A158 :RNBOUND A158 60 RTS A159 :LZ A159 205DA1 JSR CHOICE A15C 60 RTS A15D CHOICE A15D BDBD18 LDA POOPHASE,X A160 0A ASL A A161 A8 TAY A162 B1BA LDA (BASE),Y A164 9DAD18 STA HSAVEPP,X A167 88 DEY A168 B1BA LDA (BASE),Y A16A 9DA518 STA SAVEPP,X A16D 60 RTS A16E FYORPO A16E 2057A7 JSR PIFFY ;POOKA, OR FYGAR R/L A171 A8 TAY A172 B97FA1 LDA PFDATL,Y A175 8D5419 STA LPOKAD A178 B982A1 LDA PFDATH,Y A17B 8D5519 STA HPOKAD A17E 60 RTS A17F PFDATL A17F 257101 DB LOW LRPO1,LOW FYGR1,LOW FYGL1 A182 PFDATH A182 848384 DB HIGH LRPO1,HIGH FYGR1,HIGH FYGL1 A185 MMLO A185 9AA391 DB LOW LPO,LOW RFY,LOW LFY A188 MMHI A188 A1A1A1 DB HIGH LPO,HIGH RFY,HIGH LFY A18B PHADIR A18B FE00 DB [0-2],0 A18D UPDWNL A18D B050 DB [0-80],80 ATARI CAMAC Assembler Ver 1.0A Page 103 D1:MONSTER.ASM 12 X 3 MATRIX A18F UPDWNH A18F FF00 DB $FF,0 A191 LFY A191 00 DB 0 A192 000D DW FYGL2 A194 250D DW FYGL3 A196 4A0D DW FYGL4 A198 0184 DW FYGL1 A19A LPO A19A 00 DB 0 A19B 3C84 DW LRPO2 A19D 6084 DW LRPO3 A19F 8484 DW LRPO4 A1A1 2584 DW LRPO1 A1A3 RFY A1A3 00 DB 0 A1A4 9583 DW FYGR2 A1A6 B983 DW FYGR3 A1A8 DD83 DW FYGR4 A1AA 7183 DW FYGR1 A1AC SETUD A1AC AD5419 LDA LPOKAD ;SET GET HER A1AF 9DA518 STA SAVEPP,X A1B2 AD5519 LDA HPOKAD A1B5 9DAD18 STA HSAVEPP,X A1B8 SETUDR ;ROCK ENTRY POINT A1B8 A918 LDA #24 A1BA 9DC518 STA HOWMANY,X A1BD A900 LDA #00 A1BF 9DCE18 STA BBBFLAG,X A1C2 60 RTS A1C3 SETRL A1C3 A924 LDA #36 A1C5 9DC518 STA HOWMANY,X A1C8 A901 LDA #$01 A1CA 9DCE18 STA BBBFLAG,X A1CD 60 RTS EPROC LIST L A1CE SHOW CHASE LIST L INCLUDE D1:CHASE.ASM ;**** PCONTROL **** ; ;CHOOSE ACTION FOR POOKA OR FYGAR: ;DIRECTION TO GO IN, OR ELSE GHOSTING ;OR BREATHING FIRE. ; ;THE ARGUMENT IN CONSIDER IS A FLAG: ; IF 0, THEN DO NOT GHOST OR ; BREATHE FIRE; JUST CHOOSE THE ; BEST DIRECTION TO GO IN. ; IF NOT 0, THEN ALL ACTIONS MAY BE ; CONSIDERED EXCEPT DO NOT ATARI CAMAC Assembler Ver 1.0A Page 104 D1:CHASE.ASM 12 X 3 MATRIX ; REVERSE DIRECTIONS UNLESS THE ; CURRENT DIRECTION IS IMPOSSIBLE. A1CE PCONTROL A1CE PROC A1CE BDB518 LDA GOPOOKA,X A1D1 8D3B18 STA CURDIR ;SAVE CURRENT DIR A1D4 4902 EOR #2 A1D6 8D3C18 STA OPPCUR ;OPPOSITE DIRECTION ;CHOOSE THE BEST POSSIBLE ;DIRECTION. A1D9 20E9A2 JSR HAROLD ;RANK THE DIR'S A1DC A000 LDY #0 A1DE 8C5C19 STY PRIOR ;INDEX BEST DIR'S A1E1 :LOOP A1E1 B9141A LDA BEST,Y ;GET A DIRECTION A1E4 9DB518 STA GOPOOKA,X A1E7 CD3C18 CMP OPPCUR ;THIS OPPOSITE DIR? A1EA D005 ^A1F1 BNE :TRYIT A1EC ADA91A LDA CONSIDER ;OPPOS IS 4TH CHOICE A1EF D007 ^A1F8 BNE :NOTPOS ;IF CONSIDER NONZERO A1F1 :TRYIT A1F1 206AA0 JSR TRY ;TRY THIS DIRECTION A1F4 C900 CMP #0 ;POSSIBLE? A1F6 1010 ^A208 BPL :FOUND ;IF SO, GREAT! A1F8 :NOTPOS A1F8 EE5C19 INC PRIOR A1FB AC5C19 LDY PRIOR A1FE C004 CPY #4 A200 90DF ^A1E1 BCC :LOOP A202 AD3C18 LDA OPPCUR ;IF ALL ELSE FAILS, A205 9DB518 STA GOPOOKA,X ;OPPOSITE ALWAYS OK A208 :FOUND A208 BDDF18 LDA FE1,X ;IS PUMP IN BELLY? A20B D005 ^A212 BNE :NFIRGH ;IF SO, NO FIRE/GHOST A20D ADA91A LDA CONSIDER A210 D003 ^A215 BNE :CHKFIR A212 :NFIRGH A212 4CDEA2 JMP :QUIT ;IF FYGAR IS ON SAME HORIZONTAL ;TUNNEL AS DIGDUG, FACING DIGDUG, ;AND WITHIN A CERTAIN DISTANCE, ;THEN FIRE. A215 :CHKFIR A215 BD8518 LDA PFFLAG,X ;POOKA OR FYGAR? A218 F05E ^A278 BEQ :NOFIRE ;POOKAS DON'T FIRE A21A A514 LDA $14 ;FIRE IF CLOCK=0 A21C F02D ^A24B BEQ :WANTTO ; LDA OKFIRE ;CHECK IF GHOST ; BEQ :NOFIRE ; USING FIRE PLAYER A21E 38 SEC ;FYGAR NEAR DD? A21F BDE718 LDA VPOS,X ;FYGAR'S VERT'L ATARI CAMAC Assembler Ver 1.0A Page 105 D1:CHASE.ASM 12 X 3 MATRIX A222 ED411A SBC VCHASE ;DD'S VERT'L POS A225 C902 CMP #2 ;SAME LEVEL? A227 D04F ^A278 BNE :NOFIRE A229 38 SEC A22A AD401A LDA HCHASE ;DD'S HORIZ'L POS A22D FDEF18 SBC HPOS,X ;FYGAR'S HORIZ'L A230 A8 TAY A231 300D ^A240 BMI :FACEL A233 BDB518 LDA GOPOOKA,X ;FACING RIGHT? A236 C901 CMP #1 A238 D03E ^A278 BNE :NOFIRE A23A C018 CPY #FIRDST ;< FIRDST PIXELS? A23C 103A ^A278 BPL :NOFIRE A23E 300B ^A24B BMI :WANTTO A240 :FACEL A240 BDB518 LDA GOPOOKA,X ;FACING LEFT? A243 C903 CMP #3 A245 D031 ^A278 BNE :NOFIRE A247 C0E8 CPY #[0-FIRDST] ;< FIRDST PIXELS? A249 302D ^A278 BMI :NOFIRE A24B :WANTTO ;FYGAR WANTS TO FIRE A24B A5FA LDA FYGFIR ;IS ANOTHER FYGAR A24D 1029 ^A278 BPL :NOFIRE ; ALREADY FIRING? A24F ECA41A CPX BUMNST ;THIS FYGAR BEING A252 F024 ^A278 BEQ :NOFIRE ; BLOWN UP? A254 ECA51A CPX BUMNST+1 ; ... A257 F01F ^A278 BEQ :NOFIRE ; ... A259 ADA41A LDA BUMNST ;BU USING REGISTER? A25C 101A ^A278 BPL :NOFIRE A25E BDB518 LDA GOPOOKA,X ;FYGAR MUST BE A261 4A LSR A ;GOING HORIZ'LY A262 9014 ^A278 BCC :NOFIRE A264 AD6318 LDA NOGHO A267 F00F ^A278 BEQ :NOFIRE A269 :FIRE A269 86FA STX FYGFIR A26B A900 LDA #0 A26D 9D3D18 STA FRTLES,X A270 A9FF LDA #$FF A272 9DD718 STA FIRFLG,X A275 4CDEA2 JMP :QUIT A278 :NOFIRE ;NOW IF FRUITLESS COUNTER EXCEEDS ;GHOSTING COUNT, THEN SEE IF IT ;CAN GHOST. = 0001 IF DEBUG A278 AD6318 LDA NOGHO A27B F049 ^A2C6 BEQ :NOGHO ;WHO KNOWS?!?!? ENDIF A27D BD3D18 LDA FRTLES,X ;HOW MANY? A280 DD421A CMP GHONOW,X ;SHOULD WE GHOST? A283 9041 ^A2C6 BCC :NOGHO A285 AD9C1A LDA GHOCNT ;GHOSTS ALL TAKEN? ATARI CAMAC Assembler Ver 1.0A Page 106 D1:CHASE.ASM 12 X 3 MATRIX A288 C903 CMP #GHOLIM-1 A28A 103A ^A2C6 BPL :NOGHO ;MAYBE NEXT TIME ; LDA FYGFIR ;DON'T GHOST IF ; BPL :NOGHO ;FYGAR IS FIRING A28C BD9D18 LDA HPOKAP,X ;DON'T GHOST IN SKY A28F C923 CMP #HIGH [SCR+[LPT*40]] A291 9033 ^A2C6 BCC :NOGHO A293 D009 ^A29E BNE :GHOOK A295 BD9518 LDA LPOKAP,X A298 C930 CMP #LOW [SCR+[LPT*40]] A29A 902A ^A2C6 BCC :NOGHO A29C F028 ^A2C6 BEQ :NOGHO A29E :GHOOK A29E BDDF18 LDA FE1,X A2A1 D01E ^A2C1 BNE :NOGH1 A2A3 BD8D18 LDA MNSTEN,X A2A6 C9FF CMP #$FF A2A8 D017 ^A2C1 BNE :NOGH1 A2AA EE9C1A INC GHOCNT ;ONE MORE GHOST A2AD AC9C1A LDY GHOCNT A2B0 8A TXA A2B1 99B01A STA NEWGHO,Y ;FLAG NEW GHOST A2B4 A900 LDA #0 A2B6 9D3D18 STA FRTLES,X A2B9 A901 LDA #MNSTDI ;DISABLE MONSTER A2BB 9D8D18 STA MNSTEN,X A2BE 4CDEA2 JMP :QUIT A2C1 :NOGH1 A2C1 A900 LDA #0 A2C3 9D3D18 STA FRTLES,X A2C6 :NOGHO ;DON'T GHOST AND DON'T FIRE-- ;GO IN THIS DIRECTION! BUT ;FIRST CHECK IF THIS IS A ;CHANGE OF DIRECTION--IF SO ;THEN FLIP HVFLAG. AND IF ;THE CHANGE WASN'T TO ONE OF ;THE TWO BEST DIRECTIONS, THEN ;INCREMENT THE FRUITLESS-CHANGE- ;OF-DIRECTION COUNTER. A2C6 BDB518 LDA GOPOOKA,X A2C9 CD3B18 CMP CURDIR A2CC F010 ^A2DE BEQ :QUIT A2CE FE3318 INC HVFLAG,X A2D1 CD141A CMP BEST A2D4 F008 ^A2DE BEQ :QUIT A2D6 CD151A CMP BEST+1 A2D9 F003 ^A2DE BEQ :QUIT A2DB FE3D18 INC FRTLES,X A2DE :QUIT A2DE 18 CLC A2DF BD3318 LDA HVFLAG,X A2E2 7DB518 ADC GOPOOKA,X ATARI CAMAC Assembler Ver 1.0A Page 107 D1:CHASE.ASM 12 X 3 MATRIX A2E5 9D3318 STA HVFLAG,X A2E8 60 RTS EPROC ;**** HAROLD **** ; ;RETURN THE FOUR DIRECTIONS IN ;PRIORITY ORDER IN BEST. ; ;BEST HORIZONTAL DIRECTION IS THE ;DIRECTION TOWARD DIGDUG (OR LEFT IF ;MONSTER & DIGDUG IN SAME COLUMN). ;BEST VERTICAL DIRECTION IS THE ;DIRECTION TOWARD DIGDUG (OR UP IF ;MONSTER & DIGDUG IN SAME ROW). ; ;WHICH OF THESE DIRECTIONS IS BEST ;DEPENDS ON THE HORIZONTAL/VERTICAL ;PREFERENCE FLAG FOR THAT MONSTER, ;WHICH IS FLIPPED EACH TIME A CHANGE ;OF DIRECTION OCCURS. ; ;IF FLAG IS HORIZONTAL, ORDER IS: ; 1. BEST HORIZONTAL ; 2. BEST VERTICAL ; 3. OPPOSITE OF BEST HORIZONTAL ; 4. OPPOSITE OF BEST VERTICAL ; ;IF FLAG IS VERTICAL, ORDER IS: ; 1. BEST VERTICAL ; 2. BEST HORIZONTAL ; 3. OPPOSITE OF BEST VERTICAL ; 4. OPPOSITE OF BEST HORIZONTAL ; ;NOTE THAT THE PRIORITIES HAVE ;NOTHING TO DO WITH WHAT DIRECTION ;THE MONSTER IS CURRENTLY TRAVELLING ;IN. = 0000 ZUP = 0 = 0002 ZDOWN = 2 = 0003 ZLEFT = 3 = 0001 ZRIGHT = 1 A2E9 HAROLD A2E9 PROC ;CONVERT THE MONSTER'S ADDRESS ;TO PLAYER COORDINATES SO IT ;CAN BE COMPARED TO DIGDUG'S ;POSITION. A2E9 BD9518 LDA LPOKAP,X A2EC BC9D18 LDY HPOKAP,X A2EF 20A4B1 JSR CVTSTP ;SCREEN TO PLAYER A2F2 9DE718 STA VPOS,X ATARI CAMAC Assembler Ver 1.0A Page 108 D1:CHASE.ASM 12 X 3 MATRIX A2F5 98 TYA A2F6 9DEF18 STA HPOS,X ;FIND BEST HORIZONTAL: ; LEFT IF DD <= MONSTER ; RIGHT OTHERWISE A2F9 A903 LDA #ZLEFT ;ASSUME LEFT A2FB 8D3218 STA BESTH A2FE AD401A LDA HCHASE ;DIGDUG HORIZONTAL A301 DDEF18 CMP HPOS,X A304 9007 ^A30D BCC :BESTV A306 F005 ^A30D BEQ :BESTV A308 A901 LDA #ZRIGHT A30A 8D3218 STA BESTH A30D :BESTV ;FIND BEST VERTICAL: ; UP IF DD <= MONSTER ; DOWN OTHERWISE A30D A900 LDA #ZUP ;ASSUME UP A30F 8D3118 STA BESTV A312 18 CLC A313 AD411A LDA VCHASE ;DIGDUG VERTICAL A316 6903 ADC #3 ;LOOK AT DD'S CHIN A318 DDE718 CMP VPOS,X A31B 9007 ^A324 BCC :BESTALL A31D F005 ^A324 BEQ :BESTALL A31F A902 LDA #ZDOWN A321 8D3118 STA BESTV A324 :BESTALL ;FIND BEST DIRECTION OF ALL FROM ;HORIZONTAL/VERTICAL PREFERENCE ;FLAG A324 BD3318 LDA HVFLAG,X A327 2901 AND #1 ;FLAG IS LOW BIT A329 F009 ^A334 BEQ :OTHER A32B AD3218 LDA BESTH ;1 IS HORIZONTAL A32E AC3118 LDY BESTV A331 4C3AA3 JMP :SETPRI A334 :OTHER A334 AD3118 LDA BESTV ;0 IS VERTICAL A337 AC3218 LDY BESTH A33A :SETPRI ;LOAD BEST WITH CORRECT VALUES A33A 8D141A STA BEST A33D 4902 EOR #2 A33F 8D161A STA BEST+2 A342 98 TYA A343 8D151A STA BEST+1 A346 4902 EOR #2 A348 8D171A STA BEST+3 ATARI CAMAC Assembler Ver 1.0A Page 109 D1:CHASE.ASM 12 X 3 MATRIX A34B 60 RTS EPROC LIST L A34C SHOW FIRE LIST L INCLUDE D1:FIRE.ASM ;******************************** ;*** THE ROASTING OF DIGDUG *** ;******************************** ;************************************ ; ; FYFIRE - FYGARS FIRE ; ;THE X REG CONTAINS THE INDEX INTO ;THE POKAP TABLE FOR WHICH FYGAR TO ;PUT FIRE FROM. THE HPOS,VPOS VALUES ;ARE DETERMINED THEN THE FIRE IS PUT ;OUT IN 3 STAGES, EACH STAGE YELLOW ;THEN RED. ; ;FIRCTR DESCRIPTION ; 1111 1111 - INITIALIZE VALUE ; 0000 0000 - STAGE I YELLOW ; 0001 - CHANGE COLOR TO RED ; 0010 - STAGE II YELLOW ; 0011 - CHANGE COLOR TO RED ; 0100 - STAGE III YELLOW ; 0101 - CHANGE COLOR TO RED ; 0110 - RESET AND LEAVE ; ;VARIBLES AFFECTED: ; LDUMMY, HDUMMY, HPOS, VPOS, ; FIRFLG, FIRCTR,DATAPL,DATAPH, ; FIRIDX,FRVPOS ; ;************************************ ; FIRE GOING RIGHT A34C FIRERT A34C 00 DB 0 A34D C0E0606030 DB $C0,$E0,$60,$60,$30,$30 A353 0000000000 DB 0,0,0,0,0,0 ;STAGE 1 A359 00 DB 0 A35A 20C0E66D7E DB $20,$C0,$E6,$6D,$7E,$3E,$2B,$2B A362 01010000 DB 1,1,0,0 ;STAGE II A366 CC64D7E66D DB $CC,$64,$D7,$E6,$6D,$7E,$3E A36D 3B6B4D5982 DB $3B,$6B,$4D,$59,$82,6 ; STAGE III ; FIRE GOING LEFT-CREATE IN RAM FROM MIRROR ;FIRELT ;DB 0,3,7,6,6,$0C,$0C ;DB 0,0,0,0,0,0 ;STAGE I ;DB 0 ;DB 4,3,$67,$B6,$7E,$7C,$D4 ATARI CAMAC Assembler Ver 1.0A Page 110 D1:FIRE.ASM 12 X 3 MATRIX ;DB $D4,$80,$80,0,0 ;STAGE II ;DB $33,$26,$EB,$67,$B6,$7E,$7C ;DB $DC,$D6,$B2,$9A,$41,$60 ;STGE III ;*********************************** ;SETUP HPOS,VPOS AND PLAYER FOR FIRE ;*********************************** A373 SETUP: A373 PROC A373 A9FD LDA #MONSTA ;MAKE HIM STATIONERY A375 9D8D18 STA MNSTEN,X A378 BC9D18 LDY HPOKAP,X A37B BD9518 LDA LPOKAP,X A37E 20A4B1 JSR CVTSTP A381 9DE718 STA VPOS,X A384 98 TYA A385 9DEF18 STA HPOS,X A388 BDB518 LDA GOPOOKA,X ;WHICH WAY IS FYGAR LOOKING? A38B C901 CMP #01 ;IF =01 THEN LOOKING RIGHT A38D F030 ^A3BF BEQ :LOOKR ;:LOOKL: A38F BD9518 LDA LPOKAP,X A392 38 SEC A393 E902 SBC #02 ;LOOK 2 AHEAD A395 8594 STA DATAPL A397 BC9D18 LDY HPOKAP,X A39A B001 ^A39D BCS *+3 ;:LL70 A39C 88 DEY ;:LL70: A39D 8495 STY DATAPH A39F 20EDA3 JSR FIRSZ ;GET FIRE SIZE A3A2 38 SEC A3A3 BDEF18 LDA HPOS,X ;ELSE LEFT A3A6 C000 CPY #00 ;DOUBLE SIZE ADD 33 A3A8 F005 ^A3AF BEQ :LL80 ;NORMAL SIZE ADD 41 A3AA E90F SBC #15 A3AC 4CB1A3 JMP :LL90 A3AF :LL80: A3AF E907 SBC #7 A3B1 :LL90: A3B1 8D01D0 STA HPOSP1 ;SET PLAYER HORIZ POS A3B4 A900 LDA #LOW FIRELT A3B6 8594 STA DATAPL ;ADDRESS POINTER A3B8 A917 LDA #HIGH FIRELT A3BA 8595 STA DATAPH A3BC 4CE3A3 JMP :PUTFIR A3BF :LOOKR: A3BF BD9518 LDA LPOKAP,X ;LONG OR SHORT FIRE A3C2 18 CLC A3C3 6902 ADC #02 ;LOOK 2 BYTES AHEAD ATARI CAMAC Assembler Ver 1.0A Page 111 D1:FIRE.ASM 12 X 3 MATRIX A3C5 8594 STA DATAPL A3C7 BC9D18 LDY HPOKAP,X A3CA 9001 ^A3CD BCC *+3 ;:SS60 A3CC C8 INY ;ALLOW FOR OVERFLOW ;:SS60: A3CD 8495 STY DATAPH A3CF 20EDA3 JSR FIRSZ ;SET FIRE SIZE A3D2 BDEF18 LDA HPOS,X ;RIGHT SO INC HORIZ A3D5 18 CLC A3D6 6909 ADC #09 ;OFFSET=47+FYGAR WID. A3D8 8D01D0 STA HPOSP1 A3DB A94C LDA #LOW FIRERT A3DD 8594 STA DATAPL A3DF A9A3 LDA #HIGH FIRERT A3E1 8595 STA DATAPH ;ADDR PTRS TO RT FIRE A3E3 :PUTFIR: A3E3 18 CLC A3E4 BDE718 LDA VPOS,X ;WHERE IN PLAYER TO PUT FIRE A3E7 6902 ADC #$02 A3E9 8D5F19 STA FRVPOS ;SAVE VERT POSITION A3EC 60 RTS A3ED FIRSZ: A3ED A000 LDY #00 ;SHORT FIRE A3EF B194 LDA (DATAPL),Y A3F1 F004 ^A3F7 BEQ :MKLONG A3F3 29AA AND #$AA ;IS IT A FYGAR? A3F5 F002 ^A3F9 BEQ :LL60 A3F7 :MKLONG: A3F7 A001 LDY #01 A3F9 :LL60: A3F9 8C09D0 STY SIZEP1 A3FC A900 LDA #0 A3FE 8D5E19 STA FIRIDX A401 60 RTS EPROC ;*********************************** ; MAIN ROUTINE ;*********************************** A402 FYFIRE: A402 PROC A402 8D661A STA STUCK ;SAVE ARGUMENT A405 A6FA LDX FYGFIR A407 1001 ^A40A BPL *+3 ;:CKFIRE A409 60 RTS ;:CKFIRE: ATARI CAMAC Assembler Ver 1.0A Page 112 D1:FIRE.ASM 12 X 3 MATRIX A40A AD781A LDA FIRWRN ;WARNING PAUSE YET? A40D D01B ^A42A BNE :MORWRN ;FALL THRU IF INIT A40F BDBD18 LDA POOPHASE,X A412 C903 CMP #3 ;IS MOUTH OPEN? A414 1001 ^A417 BPL *+3 ;(POOPHASE=3 OR 4) A416 60 RTS ;WAIT FOR OPEN MOUTH A417 EE781A INC FIRWRN A41A A9FD LDA #MONSTA A41C 9D8D18 STA MNSTEN,X A41F A9FF LDA #$FF A421 8D5D19 STA FIRCTR A424 A903 LDA #REPTFIR A426 8D061A STA FIRTIM A429 60 RTS A42A :MORWRN A42A C90C CMP #WARNING A42C B004 ^A432 BCS :EXHALE A42E EE781A INC FIRWRN A431 60 RTS A432 :EXHALE A432 AD4519 LDA TUNE14 A435 D007 ^A43E BNE :OVR14 A437 A90E LDA #14 A439 85F6 STA NTUNE A43B 8D4519 STA TUNE14 A43E :OVR14 A43E EE5D19 INC FIRCTR ;COUNTER==>WHAT TO DO A441 AD5D19 LDA FIRCTR A444 6A ROR A A445 9006 ^A44D BCC :F40 ;IF BIT0=0 THEN NEW STAGE A447 A934 LDA #$34 ;ELSE CHANGE TO RED A449 8DC102 STA PCOLR1 A44C 60 RTS A44D :F40: A44D 2A ROL A A44E D003 ^A453 BNE *+5 ;IF FIRST TIME A450 2073A3 JSR SETUP ;THEN SETUP PLAYER ;:F20: A453 A201 LDX #1 A455 2060B8 JSR WIPE ;ZERO PLAYER 1 A458 A6FA LDX FYGFIR ;RESTORE X A45A AD5D19 LDA FIRCTR ;IF 6 THEN NEXT ITER. A45D C906 CMP #06 ;ELSE DO NEXT STAGE A45F D036 ^A497 BNE :NSTAGE A461 A9FF LDA #$FF ;INIT STATE A463 8D5D19 STA FIRCTR ;FOR COUNTER A466 CE061A DEC FIRTIM ;IF 0 THEN WE'RE DONE A469 D0C7 ^A432 BNE :EXHALE A46B A6FA LDX FYGFIR ;GET MONSTER # A46D AD661A LDA STUCK ;SHD HE BE REENABLED? A470 F005 ^A477 BEQ FIROFF ;IF NOT, SKIP ATARI CAMAC Assembler Ver 1.0A Page 113 D1:FIRE.ASM 12 X 3 MATRIX A472 A9FF LDA #MNSTON ;ENABLE MONSTER A474 9D8D18 STA MNSTEN,X A477 FIROFF ;ENTRY POINT FROM BLOWUP!!! A477 A9FF LDA #$FF A479 85FA STA FYGFIR A47B A900 LDA #00 A47D 8D781A STA FIRWRN A480 8D4519 STA TUNE14 A483 9DD718 STA FIRFLG,X ;CLEAR THE FIRE FLAG A486 A5F6 LDA NTUNE A488 C912 CMP #18 A48A D00A ^A496 BNE :NO6 A48C A5F7 LDA OTUNE A48E C912 CMP #18 A490 D004 ^A496 BNE :NO6 A492 A915 LDA #21 A494 85F6 STA NTUNE A496 :NO6 A496 60 RTS A497 :NSTAGE: A497 AC5E19 LDY FIRIDX ;INDEX INTO FIRE DATA A49A AE5F19 LDX FRVPOS ;INDEX INTO PLAYER A49D 8A TXA ;GET END VALUE A49E 18 CLC A49F 690D ADC #$0D ; 0 TO 12 +1 A4A1 8599 STA HDUMMY = A4A3 LACARY SET * ;:F50: A4A3 B194 LDA (DATAPL),Y ;GET FIRE DATA A4A5 9D001D STA PLAY1,X ;INTO PLAYER RAM A4A8 C8 INY A4A9 E8 INX A4AA E499 CPX HDUMMY A4AC D0F5 ^A4A3 BNE LACARY A4AE 8C5E19 STY FIRIDX ;UPDATE DATA INDEX A4B1 A92A LDA #$2A ;COLOR IT YELLOW A4B3 8DC102 STA PCOLR1 A4B6 60 RTS EPROC LIST L A4B7 SHOW BLOWUP LIST L INCLUDE D1:BLOWUP.ASM ;BLOWUP.ASM ;---------- ;THIS FILE CONTAINS ROUTINES TO BLOW ;UP POOKAS AND FYGARS. ;************************************ ; ;BLOWUP - BLOW UP POOKA AND FYGAR ; ATARI CAMAC Assembler Ver 1.0A Page 114 D1:BLOWUP.ASM 12 X 3 MATRIX ;THE DATA IS CONTAINED IN THE ;FOLLOWING TABLES. FYGAR BLOWS UP ;LOOKING EITHER LEFT OR RIGHT, BUT ;POOKA BLOWS UP IN ONLY 1 DIRECTION. ; ;THE DATA IS 24 BYTES FOR EACH ;STAGE. WHEN BLOW UP BEGINS THE ;MONSTER ENABLE BIT IS CLEARED AND ;SET AGAIN IF THE MONSTER RETURNS TO ;NORMAL. ; ;A COUNTER IS USED TO MAKE THE SHRINK ;& GROWTH DELAY VARIABLE. BUCTR(X) ;IS USED FOR EACH MONSTER BEING ;BLOWN UP. ; ; CURRENTLY....BUCTR ; 111 1111 INITIALIZE ; 000 0000 STAGE I OUT ; 0001 ; . WAIT ; 1111 ; 1 0000 STAGE II OUT ; 1 0001 ; . WAIT ; 1 1111 ; 010 0000 STAGE III OUT ; (NO COMPRESS TO ; NORMAL FROM HERE) ; 0010 1111 REMOVE FROM SCREEN ; ;VARIABLES AFFECTED: ; ; BUCTR(0,1) -COUNTER FOR EACH ; MONSTER BEING BLOWN UP ; BUDIDX(0,1)-INDEX INTO BLOWUP DATA ; BUMNST(0,1)-INDEX (0-7) OF MONSTER ; BEING BLOWN UP ; BUPTRL(0,1)-POINTER TO BLOW UP ; DATA FOR SELECTED ; BUPTRH(0,1) MONSTER ; TMPEND -TEMPORARY STORE END ; OF PLAYER DATA ; ; ;************************************ ;BLOW UP POOKA A4B7 BUPUKA: A4B7 000000003C DB 0,0,0,0,$3C,$7E,$FE,$FE A4BF FAE8C08101 DB $FA,$E8,$C0,$81,$01,$C3,$E7,$FF A4C7 7E7E5A4360 DB $7E,$7E,$5A,$43,$60,0,0,0 A4CF 00001C3E7F DB 0,0,$1C,$3E,$7F,$FF,$FF,$FF A4D7 FDC8C08001 DB $FD,$C8,$C0,$80,$01,$81,$CB,$FF A4DF FEFE7A6243 DB $FE,$FE,$7A,$62,$43,$60,0,0 ATARI CAMAC Assembler Ver 1.0A Page 115 D1:BLOWUP.ASM 12 X 3 MATRIX A4E7 00011C3C78 DB 0,$01,$1C,$3C,$78,$78,$7D,$F8 A4EF E4C0849510 DB $E4,$C0,$84,$95,$10,$C0,$E1,$FC A4F7 7C7E7E3670 DB $7C,$7E,$7E,$36,$70,$B8,$AC,$20 ;BLOW UP FYGAR RIGHT A4FF BUFYRT: A4FF 0000000000 DB 0,0,0,0,0,$3C,$7E,$FE A507 D0D07E20F8 DB $D0,$D0,$7E,$20,$F8,$FC,$1E,$DE A50F FE7E331800 DB $FE,$7E,$33,$18,0,0,0,0 A517 0000003C7E DB 0,0,0,$3C,$7E,$7E,$FF,$FF A51F D2D07F20FC DB $D2,$D0,$7F,$20,$FC,$FE,$3F,$DF A527 FFFFFE7C34 DB $FF,$FF,$FE,$7C,$34,$26,$30,0 A52F 00061C70E2 DB 0,6,$1C,$70,$E2,$A6 A535 BCF9606530 DB $BC,$F9,$60,$65,$30,$14 A53B 5990B8B0F4 DB $59,$90,$B8,$B0,$F4,$79 A541 3041049000 DB $30,$41,4,$90,0,0 ;BLOW FYGAR LEFT ;BUFYLT: ;DB 0,0,0,0,0,$3C,$7E,$7F ;DB $0B,$0B,$7E,$04,$1F,$3F,$78,$7B ;DB $7F,$7E,$CC,$18,0,0,0,0 ; ;DB 0,0,0,$3C,$7E,$7E,$FF,$FF ;DB $4B,$0B,$FE,$04,$3F,$7F,$FC,$FB ;DB $FF,$FF,$7F,$3E,$2C,$64,$0C,0 ; ;DB 0,$60,$38,$0E,$47,$65 ;DB $3D,$9F,6,$A6,$0C,$28 ;DB $9A,9,$1D,$0D,$2F,$9E ;DB $0C,$82,$20,9,0,0 A547 BUDATL A547 B7 DB LOW BUPUKA A548 FF DB LOW BUFYRT A549 27 DB LOW BUFYLT A54A BUDATH A54A A4 DB HIGH BUPUKA A54B A4 DB HIGH BUFYRT A54C 17 DB HIGH BUFYLT A54D BUCOLR A54D 44C8C8 DB RED,GREEN,GREEN ;************************************ ; ;BUINIT - INITIALIZE THE PLAYER FOR A ; BLOW UP SEQUENCE ; ;************************************ ATARI CAMAC Assembler Ver 1.0A Page 116 D1:BLOWUP.ASM 12 X 3 MATRIX A550 BUINIT: A550 PROC A550 8698 STX LDUMMY ;MONSTER # A552 8499 STY HDUMMY ;BU # A554 2057A7 JSR PIFFY ;GET POO,FYR,FYL IDX A557 8D3A19 STA TMPEND ;PIFFY # A55A AA TAX A55B BD47A5 LDA BUDATL,X ;POINT TO BU DATA A55E 993819 STA BUPTRL,Y A561 BD4AA5 LDA BUDATH,X A564 993619 STA BUPTRH,Y A567 A698 LDX LDUMMY ;(MONSTER #) A569 BC9D18 LDY HPOKAP,X A56C BD9518 LDA LPOKAP,X A56F 20A4B1 JSR CVTSTP ;GET PLAYER COORDS A572 C922 CMP #$22 ;IF ABOVE SKYLINE, A574 B007 ^A57D BCS :OKAY ;THEN SCROLLING-- A576 18 CLC ;ADJUST COORDS A577 98 TYA A578 6960 ADC #$60 A57A A8 TAY A57B A922 LDA #$22 A57D :OKAY A57D 9DE718 STA VPOS,X A580 98 TYA A581 9DEF18 STA HPOS,X A584 AA TAX ;(HPOS) A585 AC3A19 LDY TMPEND ;(PIFFY #) A588 B94DA5 LDA BUCOLR,Y A58B A499 LDY HDUMMY ;(BU #) A58D 9913D0 STA COLPM1,Y ;SET COLOR IN HARDWARE AND SHADOW A590 99C102 STA PCOLR1,Y A593 8A TXA A594 9901D0 STA HPOSP1,Y A597 A900 LDA #00 A599 9909D0 STA SIZEP1,Y A59C 993419 STA BUDIDX,Y ;BEGINNING OF DATA A59F A698 LDX LDUMMY ;(MONSTER #) A5A1 60 RTS ;************************************ ; ZERO PLAYER RAM SUBROUTINE ;************************************ A5A2 ZERM: A5A2 PROC A5A2 8A TXA A5A3 48 PHA A5A4 98 TYA ;BU # A5A5 48 PHA A5A6 A201 LDX #1 ;ASSUME PLAYER 1 A5A8 C900 CMP #0 ;THAT'S IF A=0 A5AA F001 ^A5AD BEQ *+3 A5AC E8 INX ;ELSE PLAYER 2 A5AD 2060B8 JSR WIPE ;ZERO THE PLAYER ATARI CAMAC Assembler Ver 1.0A Page 117 D1:BLOWUP.ASM 12 X 3 MATRIX A5B0 68 PLA A5B1 A8 TAY A5B2 68 PLA A5B3 AA TAX A5B4 60 RTS EPROC ;************************************ ; ;BURP - BLOW UP POOKA AND/OR FYGAR ; ;A COUNTER TRACKS WHICH FRAMES TO ;CHANGE DATA ON AND WHICH TO USE AS ;DELAYS. TWO SETS OF DATA ARE ;MAINTAINED AND INDEX BY X=0,1. ;Y INDEXES INTO THE MONSTER TABLES ;(0 TO 7). A MONSTER CAN BE EXPANDED ;OR COMPRESSED BACK TO NORMAL. ; ;************************************ A5B5 BURP: A5B5 A207 LDX #07 ;CYCLE THRU MONSTERS A5B7 :LOOP A5B7 BDDF18 LDA FE1,X ;PUMP THERE? A5BA D045 ^A601 BNE :BUHOSE A5BC :NOHOSE A5BC 203CA7 JSR BUTAB A5BF F003 ^A5C4 BEQ :FND1 ;MONSTER FOUND A5C1 4C30A7 JMP :NEXT A5C4 :FND1 A5C4 B9A61A LDA BUCTR,Y ;KLUDGE-IF PUMP GONE A5C7 F025 ^A5EE BEQ :RESTOR ;AFTER 1ST COUNT A5C9 C920 CMP #$20 ;EXACTLY STAGE III? A5CB B075 ^A642 BCS :FND2 ;IF SO, NO WAY OUT... A5CD 38 SEC A5CE E901 SBC #1 ;COUNT DOWN A5D0 99A61A STA BUCTR,Y A5D3 290F AND #$0F ;IS IT A WAIT? A5D5 F003 ^A5DA BEQ :DWNSTG ;IF WAIT THEN LEAVE A5D7 4C30A7 JMP :NEXT A5DA :DWNSTG A5DA 20A2A5 JSR ZERM ;ZERO PLAYER A5DD B9A61A LDA BUCTR,Y ;IF COUNTER=ZERO? A5E0 F00C ^A5EE BEQ :RESTOR ; THEN BACK TO NORMAL A5E2 38 SEC A5E3 B93419 LDA BUDIDX,Y ;COMPRESS FIGURE A5E6 E930 SBC #48 ;INDEX PREV STAGE A5E8 993419 STA BUDIDX,Y A5EB 4CDDA6 JMP :STGOUT ;OUTPUT PREV.STAGE A5EE :RESTOR A5EE BEA41A LDX BUMNST,Y ;GET MONSTER # ATARI CAMAC Assembler Ver 1.0A Page 118 D1:BLOWUP.ASM 12 X 3 MATRIX A5F1 A9FF LDA #MNSTON A5F3 9D8D18 STA MNSTEN,X ;ENABLE MNSTER AGAIN A5F6 A900 LDA #00 A5F8 9D4518 STA MGREEN,X ;NO GREEN MONSTER A5FB 8D5B18 STA BUTNOP ;RESET UNPRESSED FL. A5FE 4C25A7 JMP :RESET A601 :BUHOSE A601 203CA7 JSR BUTAB ;LOOK FOR MONSTER A604 F03C ^A642 BEQ :FND2 ;IF NOT FOUND, A606 C0FF CPY #$FF ;WAS THERE FREE SLOT? A608 D003 ^A60D BNE :NEWBU A60A 4C30A7 JMP :NEXT ;IF NOT, LEAVE A60D :NEWBU A60D A9FD LDA #MONSTA A60F 9D8D18 STA MNSTEN,X ;MAKE IT STATIONERY A612 A9FF LDA #$FF A614 9D4518 STA MGREEN,X ;DRAW MONSTER GREEN A617 8A TXA A618 48 PHA A619 98 TYA A61A 48 PHA A61B E8 INX A61C 8E4F18 STX MEND A61F CA DEX A620 20969D JSR MONSTERS A623 68 PLA A624 A8 TAY A625 68 PLA A626 AA TAX A627 8A TXA A628 99A41A STA BUMNST,Y ;PUT IT INTO TABLE A62B 8698 STX LDUMMY ;SAVE BU MONSTER A62D C000 CPY #0 ;IF SHARED FIRE REG, A62F D00C ^A63D BNE :NOFIRE ; INTERRUPT FIRE A631 A6FA LDX FYGFIR ;GET FIRING FYGAR A633 3008 ^A63D BMI :NOFIRE ; (IF ANY) A635 2077A4 JSR FIROFF ;TURN OFF FIRE A638 A9FF LDA #MNSTON ;AND ENABLE FYGAR A63A 9D8D18 STA MNSTEN,X A63D :NOFIRE A63D A698 LDX LDUMMY ;RESTORE BU MONSTER A63F 2050A5 JSR BUINIT ;AND INIT PLAYER A642 :FND2 A642 AD5B18 LDA BUTNOP A645 F011 ^A658 BEQ :SKIPOB ;CONTIN BUTTON DOWN A647 B9A61A LDA BUCTR,Y ;IF REDOWN BUMP STAGE A64A C920 CMP #$20 A64C B00A ^A658 BCS :SKIPOB A64E 090F ORA #$0F A650 99A61A STA BUCTR,Y A653 A900 LDA #00 A655 8D5B18 STA BUTNOP ATARI CAMAC Assembler Ver 1.0A Page 119 D1:BLOWUP.ASM 12 X 3 MATRIX A658 :SKIPOB A658 18 CLC A659 B9A61A LDA BUCTR,Y A65C 6901 ADC #1 ;BUMP COUNTER A65E 99A61A STA BUCTR,Y A661 C920 CMP #$20 ;ENABLE BITMAP A663 B00F ^A674 BCS :DISABL ;UNLESS FINAL A665 AD4319 LDA TUNE16 A668 D007 ^A671 BNE :OVR16 A66A A910 LDA #16 A66C 8D4319 STA TUNE16 A66F 85F6 STA NTUNE ;INFLATING SOUND A671 :OVR16 A671 4C94A6 JMP :MERGE A674 :DISABL A674 A901 LDA #MNSTDI A676 9D8D18 STA MNSTEN,X A679 AD4419 LDA TUNE11 A67C D016 ^A694 BNE :OVR11 A67E A90B LDA #11 A680 85F6 STA NTUNE ;TUNE TO BURST A682 8D4419 STA TUNE11 A685 A5FE LDA PUMPFL ;ERASE HOSE IF OUT A687 F00B ^A694 BEQ :HOSENO A689 8A TXA A68A 48 PHA A68B 98 TYA A68C 48 PHA A68D 20CB99 JSR GDONOCT A690 68 PLA A691 A8 TAY A692 68 PLA A693 AA TAX A694 :HOSENO A694 :OVR11 A694 :MERGE A694 B9A61A LDA BUCTR,Y A697 C921 CMP #$21 A699 9007 ^A6A2 BCC :MOTYET ;DONT LOOK FOR SCROLL YET A69B ADC302 LDA PCOLR3 A69E C994 CMP #BLUE A6A0 F007 ^A6A9 BEQ :LASTMO ;LAST MONSTER SO BURST IMMEDIATLY,S: A6A2 :MOTYET A6A2 B9A61A LDA BUCTR,Y ;ARE WE DONE? A6A5 C925 CMP #$25 A6A7 9025 ^A6CE BCC :UPSTG A6A9 :LASTMO A6A9 20A2A5 JSR ZERM ;IF DONE, ZERO PLAYER A6AC A9FF LDA #$FF ;UNSET WHICH MONSTER A6AE 8DA81A STA WHICHM A6B1 :BURST A6B1 8698 STX LDUMMY ;MONSTER # A6B3 8499 STY HDUMMY ;BU # ; LDA PUMPFL ;IF PUMP OUT, ; BEQ *+5 ; THEN PULL IT IN!!! ATARI CAMAC Assembler Ver 1.0A Page 120 D1:BLOWUP.ASM 12 X 3 MATRIX ; JSR HOIN ; QUICK!!! A6B5 A900 LDA #BONBU ;BLOWUP BONUS!!! A6B7 2015AF JSR BONUS ;HOORAY!!! A6BA A6ED LDX PERSON A6BC DE111A DEC MNSLEFT,X A6BF A698 LDX LDUMMY A6C1 A499 LDY HDUMMY A6C3 A900 LDA #00 A6C5 8D4419 STA TUNE11 A6C8 8D4319 STA TUNE16 A6CB 4C25A7 JMP :RESET A6CE :UPSTG A6CE B9A61A LDA BUCTR,Y ;IF LOW NIBBLE /= 0 A6D1 290F AND #$0F ;THEN WAIT A6D3 D05B ^A730 BNE :NEXT A6D5 A900 LDA #00 A6D7 8D4319 STA TUNE16 A6DA 20A2A5 JSR ZERM ;OUTPUT NEXT STAGE A6DD :STGOUT A6DD BEA41A LDX BUMNST,Y A6E0 B93819 LDA BUPTRL,Y ;XFER TO PAGEZERO A6E3 8598 STA LDUMMY ;POINTER A6E5 B93619 LDA BUPTRH,Y A6E8 8599 STA HDUMMY A6EA 98 TYA A6EB 48 PHA ;SAVE BU # A6EC BDE718 LDA VPOS,X ;VER POS FOR DATA A6EF 48 PHA ;SAVE VPOS A6F0 B93419 LDA BUDIDX,Y ;DATA INDEX A6F3 A8 TAY A6F4 68 PLA ;GET VPOS A6F5 38 SEC A6F6 E906 SBC #6 A6F8 AA TAX ;BEGINNING OF DATA A6F9 18 CLC A6FA 6918 ADC #24 ;END OF DATA A6FC 8D3A19 STA TMPEND A6FF :STGLOOP A6FF 68 PLA ;GET 0,1 INDEX A700 48 PHA A701 D00B ^A70E BNE :PLAY2 ;WHICH PLAYER? A703 B198 LDA (LDUMMY),Y A705 9D001D STA PLAY1,X A708 EE3419 INC BUDIDX ; PLAYER 1 A70B 4C16A7 JMP :MRGE A70E :PLAY2 A70E B198 LDA (LDUMMY),Y A710 9D001E STA PLAY2,X A713 EE3519 INC BUDIDX+1 ;PLAYER 2 A716 :MRGE A716 C8 INY A717 E8 INX A718 EC3A19 CPX TMPEND ATARI CAMAC Assembler Ver 1.0A Page 121 D1:BLOWUP.ASM 12 X 3 MATRIX A71B D0E2 ^A6FF BNE :STGLOOP A71D 68 PLA ;RESTORE BU # A71E A8 TAY A71F BEA41A LDX BUMNST,Y ;RESTORE MONSTER # A722 4C30A7 JMP :NEXT A725 :RESET A725 BEA41A LDX BUMNST,Y ;CHRIS A728 A9FF LDA #$FF A72A 99A41A STA BUMNST,Y ;RESET VARIABLES A72D 99A61A STA BUCTR,Y ;& CTR TO INIT STATE A730 :NEXT A730 A900 LDA #00 ;CLEAR FE1 A732 9DDF18 STA FE1,X ;WAIT FOR PUMP A735 CA DEX A736 3003 ^A73B BMI :EXIT A738 4CB7A5 JMP :LOOP A73B :EXIT A73B 60 RTS ;*** BUTAB *** ; ;GIVEN THE MONSTER # IN X, BUTAB ;RETURNS ; A=0, Y=BU # IF FOUND IN BU TABLE ; A#0, Y=BU # IF NOT FOUND, BUT ; SLOT Y IS EMPTY ; A#0, Y=$FF IF NOT FOUND AND ; TABLE IS FULL ;ON RETURN, THE STATUS FLAGS WILL ;REFLECT THE CONTENTS OF A. A73C BUTAB A73C PROC A73C 8A TXA A73D A000 LDY #0 A73F :FINDM ;FIND MONSTER A73F D9A41A CMP BUMNST,Y A742 F010 ^A754 BEQ :FOUND A744 C8 INY A745 C002 CPY #2 A747 90F6 ^A73F BCC :FINDM A749 88 DEY A74A :FINDE ;FIND EMPTY SLOT A74A B9A41A LDA BUMNST,Y A74D 3007 ^A756 BMI :SLOT A74F 88 DEY A750 10F8 ^A74A BPL :FINDE A752 98 TYA ;RETURN--TABLE FULL A753 60 RTS A754 :FOUND A754 A900 LDA #0 ;RETURN--MNSTER FOUND A756 :SLOT ATARI CAMAC Assembler Ver 1.0A Page 122 D1:BLOWUP.ASM 12 X 3 MATRIX A756 60 RTS ;RETURN--SLOT FOUND EPROC ;*** PIFFY *** ; ;GIVEN THE MONSTER # IN X, RETURN ;IN A: ; 0 IF A POOKA ; 1 IF A FYGAR GOING RIGHT ; 2 IF A FYGAR GOING IN ANY OTHER ; DIRECTION A757 PIFFY A757 PROC A757 BD8518 LDA PFFLAG,X A75A F009 ^A765 BEQ :EXIT A75C BDB518 LDA GOPOOKA,X A75F C901 CMP #1 A761 F002 ^A765 BEQ :EXIT A763 A902 LDA #2 A765 :EXIT A765 60 RTS EPROC LIST L A766 SHOW ROCK LIST L INCLUDE D1:ROCK.ASM ;ROCK.ASM ;-------- ;THIS FILE CONTAINS ROUTINES TO MAKE ;ROCKS FALL AND CRUMBLE. ;*********************************** ;*** HOW TO ROCK AND ROLL *** ;*********************************** A766 ROCKQD A766 000000EC3E DB 0,$00,$00,$EC,$3E,$A8,$3A,$A8,$0A A76F F02FF02FFC DB $F0,$2F,$F0,$2F,$FC,$3B,$FC,$3B A777 F00BF00BFC DB $F0,$0B,$F0,$0B,$FC,$0E,$F8,$00 A77F 0000000000 DB $00,$00,$00,$00,0,0,0,0,0,0,0 A78A RPUT A78A PROC A78A A200 LDX #0 = A78C LACARY SET * ;:RLOOP0 A78C BD1519 LDA RENABL,X A78F F005 ^A796 BEQ :RRNEXT A791 A005 LDY #05 A793 20DDA8 JSR :COMM3 ;PUTOUT YELLOWED R A796 :RRNEXT A796 E8 INX A797 EC5618 CPX TNUMROC A79A 90F0 ^A78C BCC LACARY ;:RLOOP0 ATARI CAMAC Assembler Ver 1.0A Page 123 D1:ROCK.ASM 12 X 3 MATRIX A79C 60 RTS A79D ROCK A79D A200 LDX #0 = A79F LACARY SET * ;:LOOPRO A79F BD1519 LDA RENABL,X ;CHECK IF ENABLED A7A2 F012 ^A7B6 BEQ :RNEXTX ;NO THEN TRY NEXT ROCK A7A4 AD4019 LDA CATCHR A7A7 F007 ^A7B0 BEQ :TOOLATE A7A9 BD0919 LDA RUMBLE,X ;ONLY CATCH ONCE A7AC C90A CMP #10 A7AE B006 ^A7B6 BCS :RNEXTX A7B0 :TOOLATE A7B0 20C2A7 JSR :RTST ;SHOULD ROCK FALL? A7B3 2047A8 JSR :RMOVE ;MOVE ROCK SUB X A7B6 :RNEXTX A7B6 E8 INX A7B7 EC5618 CPX TNUMROC A7BA 90E3 ^A79F BCC LACARY ;:LOOPRO ;CAFS A7BC A900 LDA #00 ;DONT FALL DIGDUG HOLD A7BE 8D4019 STA CATCHR ;ING UP ROCK SO EXIT A7C1 60 RTS A7C2 :RTST A7C2 BD1B19 LDA RANIMA,X A7C5 F001 ^A7C8 BEQ *+3 ;:RTST1 A7C7 60 RTS ;:RTST1 A7C8 20CEA9 JSR :PHSCRN ;PUSH SCREEN ONTO STK A7CB A950 LDA #80 A7CD 205B98 JSR FOWAR1 A7D0 A9C8 LDA #200 A7D2 205B98 JSR FOWAR1 A7D5 202FA8 JSR :COMM1 A7D8 F02C ^A806 BEQ :OKFALL A7DA 29AA AND #$AA ;ELIMINATE WALL A7DC F012 ^A7F0 BEQ :CONTCK ;WAS WALL SO CONT. A7DE A58E LDA SCREEN ;GOT A MON A7E0 8D0A1A STA MONRK A7E3 A58F LDA SCRENH A7E5 8D0B1A STA MONRKH A7E8 8E5518 STX SAVERN ;SAVE ROCK NUMBER A7EB 8D091A STA TELLMO A7EE D016 ^A806 BNE :OKFALL ;JUMP TO FALL A7F0 :CONTCK A7F0 A9F0 LDA #240 A7F2 8D4B19 STA OFFSET A7F5 202FA8 JSR :COMM1 ;LOOKING A LITTLE FURTHER A7F8 F00C ^A806 BEQ :OKFALL A7FA 29AA AND #$AA A7FC D008 ^A806 BNE :OKFALL ;WALL IT WUZ A7FE :NOGORO A7FE A900 LDA #00 ATARI CAMAC Assembler Ver 1.0A Page 124 D1:ROCK.ASM 12 X 3 MATRIX A800 9DF718 STA DROPRO,X ;NO FALL A803 4C26A8 JMP :TOVER A806 :OKFALL A806 BD4A1A LDA RDALLY,X A809 F006 ^A811 BEQ :RFUDER A80B DE4A1A DEC RDALLY,X A80E 4CFEA7 JMP :NOGORO A811 :RFUDER A811 BD0319 LDA HROCKP,X ;FALL OFF BOTTOM?? A814 C93B CMP #[HIGH SCR]+$1B A816 9009 ^A821 BCC :OKFL1 ;SMALLER SO OK A818 D0E4 ^A7FE BNE :NOGORO ;GRATER SO NO GO A81A BDFD18 LDA ROCKP,X A81D C990 CMP #$90 A81F B0DD ^A7FE BCS :NOGORO ;SAME PAGE CHECK A821 :OKFL1 A821 A901 LDA #01 A823 9DF718 STA DROPRO,X ;YES FALL A826 :TOVER A826 A599 LDA HDUMMY A828 858F STA SCRENH A82A A598 LDA LDUMMY A82C 858E STA SCREEN ;RESTORE SCREEN POINTS A82E 60 RTS A82F :COMM1 A82F 205E98 JSR FOWARD A832 205E98 JSR FOWARD A835 A000 LDY #00 A837 B18E LDA (SCREEN),Y ;CHECK SCREEN MEM. A839 293F AND #$3F ;MASK OUT NIBBLES A83B 8D0C1A STA HOLDLE A83E C8 INY A83F B18E LDA (SCREEN),Y A841 29FC AND #$FC A843 0D0C1A ORA HOLDLE A846 60 RTS A847 :RMOVE A847 BDF718 LDA DROPRO,X A84A F003 ^A84F BEQ *+5 ;FALL OR SHAKE A84C 4CF1A8 JMP :ROCKY ;:ROHERE A84F BD0919 LDA RUMBLE,X A852 D044 ^A898 BNE :RKEND ;EXIT A854 AD7E1A LDA TUNE12 A857 D007 ^A860 BNE :CRUMBLE A859 A90C LDA #12 A85B 85F6 STA NTUNE A85D 8D7E1A STA TUNE12 A860 :CRUMBLE A860 DE2119 DEC RHOLD,X ;WAITING A863 BD2119 LDA RHOLD,X A866 D030 ^A898 BNE :RKEND A868 FE1B19 INC RANIMA,X ;NEXT ANIMATED STATE A86B BC1B19 LDY RANIMA,X A86E 88 DEY ATARI CAMAC Assembler Ver 1.0A Page 125 D1:ROCK.ASM 12 X 3 MATRIX A86F C000 CPY #00 A871 D026 ^A899 BNE :RSTP2 ;TEST IF STATE 1 OR 2 A873 20BFA8 JSR :COMM2 A876 AD751A LDA HITCNT ;ANY MONSTER HIT? A879 F01D ^A898 BEQ :RKEND ;SKIP IF NONE A87B 8A TXA A87C 48 PHA A87D A901 LDA #BONCRSH ;BONUS FOR CRUSHING A87F AE751A LDX HITCNT ;NUMBER OF MONS HIT A882 2015AF JSR BONUS A885 38 SEC A886 A6ED LDX PERSON A888 BD111A LDA MNSLEFT,X A88B ED751A SBC HITCNT A88E 9D111A STA MNSLEFT,X A891 68 PLA A892 AA TAX A893 A900 LDA #0 A895 8D751A STA HITCNT A898 :RKEND A898 60 RTS A899 :RSTP2 A899 C001 CPY #01 A89B D00A ^A8A7 BNE :RSTP3 ;IF NOT 2 THEN 3 A89D 20BFA8 JSR :COMM2 A8A0 20E1A9 JSR :DECROK A8A3 2065A9 JSR :FILLUP ;FINISH FILL ABOVE A8A6 60 RTS A8A7 :RSTP3 A8A7 A900 LDA #00 A8A9 9D1519 STA RENABLE,X ;DISABLE ROCK SUB X A8AC 8D7E1A STA TUNE12 ;REENABLE TUNES FOR A8AF 8D7D1A STA TUNE13 ;NEXT ROCK FALL A8B2 8D831A STA LOBELO ;ROCK FINISHD FALLING A8B5 EE3319 INC ROCKCO A8B8 20E1A9 JSR :DECROK A8BB 20BFA8 JSR :COMM2 A8BE 60 RTS A8BF :COMM2 A8BF 20DDA8 JSR :COMM3 A8C2 A905 LDA #$05 A8C4 9D2119 STA RHOLD,X ;HOLDING RESET A8C7 60 RTS A8C8 :TRDAL A8C8 0826C5 DB ROCKSD&255,ROCKCD&255,ZERDAT&255 A8CB A8CAE7 DB ROCK1D&255,ROCK2D&255,ROCK3D&255 A8CE 66 DB ROCKQD&255 A8CF :TRDAH A8CF 858519 DB ROCKSD/256,ROCKCD/256,ZERDAT/256 A8D2 848484 DB ROCK1D/256,ROCK2D/256,ROCK3D/256 A8D5 A7 DB ROCKQD/256 A8D6 :TPCNT A8D6 1E1E0E221E DB 30,30,14,34,30,32,34 A8DD :COMM3 A8DD B9D6A8 LDA :TPCNT,Y ATARI CAMAC Assembler Ver 1.0A Page 126 D1:ROCK.ASM 12 X 3 MATRIX A8E0 8D5B19 STA PCOUNT A8E3 B9C8A8 LDA :TRDAL,Y A8E6 8590 STA GETHER A8E8 B9CFA8 LDA :TRDAH,Y A8EB 8591 STA HGETHER A8ED 20B3A9 JSR :RMAP A8F0 60 RTS A8F1 :ROCKY ;FALL OR SHAKE A8F1 BD0919 LDA RUMBLE,X A8F4 F017 ^A90D BEQ :RINIT A8F6 A9FF LDA #$FF A8F8 8D831A STA LOBELO ;AVALANCHE!!!! A8FB A004 LDY #04 A8FD BD0919 LDA RUMBLE,X A900 2904 AND #04 ;SHAKE A902 F002 ^A906 BEQ *+4 A904 A005 LDY #05 ;:RSTT2 A906 20DDA8 JSR :COMM3 A909 DE0919 DEC RUMBLE,X A90C 60 RTS A90D :RINIT ;FALL ;TRACEY'S NEW CODE TO MAKE ;MONSTERS SHIVER WITH FRIGHT ;AT THE FALLING ROCKS A90D A900 LDA #0 A90F 8D821A STA DONTDIE A912 8A TXA A913 48 PHA A914 A6ED LDX PERSON A916 BD111A LDA MNSLEFT,X A919 C902 CMP #2 ;MORE THAN 1 MONSTER? A91B B00D ^A92A BCS :UPDOWN A91D A207 LDX #7 A91F A902 LDA #2 = A921 LACARY SET * ;:GHOAWAY A921 9D3D18 STA FRTLES,X A924 CA DEX A925 10FA ^A921 BPL LACARY A927 4C3BA9 JMP :FINTRA A92A :UPDOWN A92A A207 LDX #7 = A92C LACARY SET * ;:MNSTUP A92C BDB518 LDA GOPOOKA,X A92F C900 CMP #ZUP A931 D005 ^A938 BNE :NOTUP A933 A902 LDA #ZDOWN A935 9DB518 STA GOPOOKA,X A938 :NOTUP A938 CA DEX A939 10F1 ^A92C BPL LACARY ;:MNSTUP ATARI CAMAC Assembler Ver 1.0A Page 127 D1:ROCK.ASM 12 X 3 MATRIX A93B :FINTRA A93B 68 PLA A93C AA TAX A93D AD7D1A LDA TUNE13 A940 D007 ^A949 BNE :OVR13 A942 A90D LDA #13 ;ROCK DISLODGE TUNE A944 85F6 STA NTUNE A946 8D7D1A STA TUNE13 A949 :OVR13 A949 20E1A9 JSR :DECROK A94C A9FF LDA #$FF A94E 8D7518 STA RGOBOOM A951 8E5518 STX SAVERN A954 A003 LDY #03 ;ASSUME NO SQUISH A956 BD2719 LDA FMONRK,X A959 F002 ^A95D BEQ *+4 A95B A006 LDY #06 ;:WEHO A95D 20DDA8 JSR :COMM3 A960 A900 LDA #00 A962 8D7518 STA RGOBOOM A965 :FILLUP A965 BD0F19 LDA RFILL,X A968 F048 ^A9B2 BEQ :ROVERR ;FILL ONLY WHERE WAS A96A 20CEA9 JSR :PHSCRN ;FREEN SCREEN A96D A910 LDA #16 A96F 204B98 JSR REVRS1 A972 A9D8 LDA #$D8 A974 204B98 JSR REVRS1 ;MOVE FILLUP A BIT HIGHER A977 A000 LDY #00 A979 A955 LDA #$55 A97B 918E STA (SCREEN),Y ;FILL ABOVE ROCK A97D C8 INY A97E 918E STA (SCREEN),Y A980 A028 LDY #40 A982 918E STA (SCREEN),Y A984 C8 INY A985 918E STA (SCREEN),Y A987 A050 LDY #80 A989 918E STA (SCREEN),Y A98B C8 INY A98C 918E STA (SCREEN),Y A98E A078 LDY #120 A990 918E STA (SCREEN),Y A992 C8 INY A993 918E STA (SCREEN),Y A995 A0A0 LDY #160 A997 918E STA (SCREEN),Y A999 C8 INY A99A 918E STA (SCREEN),Y A99C A944 LDA #$44 A99E A0C8 LDY #200 A9A0 918E STA (SCREEN),Y A9A2 C8 INY A9A3 918E STA (SCREEN),Y A9A5 A0F0 LDY #240 ATARI CAMAC Assembler Ver 1.0A Page 128 D1:ROCK.ASM 12 X 3 MATRIX A9A7 918E STA (SCREEN),Y A9A9 C8 INY A9AA 918E STA (SCREEN),Y A9AC 2026A8 JSR :TOVER ;RECOVER SCREEN A9AF DE0F19 DEC RFILL,X A9B2 :ROVERR A9B2 60 RTS A9B3 :RMAP A9B3 BDFD18 LDA ROCKP,X ;MAPPING OUT THE ROCK A9B6 8592 STA PUTHER A9B8 BD0319 LDA HROCKP,X A9BB 8593 STA HPUTHER A9BD A90C LDA #[4*3] A9BF 85E9 STA PHMASK A9C1 8A TXA ;SAVE X A9C2 48 PHA A9C3 A208 LDX #08 ;SO ROCK NO INTERFERE A9C5 20B8A1 JSR SETUDR A9C8 20779E JSR LOOPZZ A9CB 68 PLA A9CC AA TAX ;RETREIVE X A9CD 60 RTS A9CE :PHSCRN A9CE A58E LDA SCREEN A9D0 8598 STA LDUMMY A9D2 A58F LDA SCRENH A9D4 8599 STA HDUMMY ;SAVE SCREEN POINTERS A9D6 BDFD18 LDA ROCKP,X A9D9 858E STA SCREEN A9DB BD0319 LDA HROCKP,X A9DE 858F STA SCRENH ;OFFSET ROCK POSITION A9E0 60 RTS A9E1 :DECROK A9E1 18 CLC A9E2 BDFD18 LDA ROCKP,X A9E5 69C8 ADC #$C8 ;FALLS 4 SCAN LINES A9E7 9DFD18 STA ROCKP,X A9EA 9003 ^A9EF BCC :DECRKE A9EC FE0319 INC HROCKP,X A9EF :DECRKE A9EF 60 RTS EPROC LIST L A9F0 SHOW FRUIT LIST L INCLUDE D3:FRUIT.ASM ;THIS ROUTINE CHECKS AND DISPLAYS ;FRUITS A9F0 VEDGEL A9F0 00717174 DB $00,$71,$71,$74 A9F4 7272727274 DB $72,$72,$72,$72,$74 A9F9 74727273 DB $74,$72,$72,$73 A9FD 7370707171 DB $73,$70,$70,$71,$71 AA02 VEDGER AA02 00828283 DB $00,$82,$82,$83 AA06 8282828283 DB $82,$82,$82,$82,$83 ATARI CAMAC Assembler Ver 1.0A Page 129 D3:FRUIT.ASM 12 X 3 MATRIX AA0B 83858584 DB $83,$85,$85,$84 AA0F 8488888484 DB $84,$88,$88,$84,$84 AA14 PROC AA14 TABFRU AA14 0000 DW 0 AA16 A9AA DW :CARROT AA18 8AAB DW :TURNIP AA1A 36AA DW :MUSH AA1C 7EAA DW :ZUCCINI AA1E 7EAA DW :ZUCCINI AA20 5FAB DW :EGG AA22 5FAB DW :EGG AA24 42AB DW :PEPPER AA26 42AB DW :PEPPER AA28 25AB DW :TOMATO AA2A 25AB DW :TOMATO AA2C 53AA DW :GARLIC AA2E 53AA DW :GARLIC AA30 CFAA DW :WATERM AA32 CFAA DW :WATERM AA34 08AB DW :PINEAP ;EXPLANATION OF THE FRUIT OPTION BYTE ;(FRUOPT) THAT PRECEDES EACH FRUIT: ;THIS BYTE IS USED TO RESTORE THE ;CONSTANT DATA THAT WAS TRIMMED FROM ;THE FRUIT TO SAVE ROM. ; ;IF FRUOPT=0, THEN NOTHING TRIMMED ; 1, THEN LEFT COLUMN GONE ; 4, THEN RIGHT COLUMN GONE ; 5, THEN BOTH LEFT AND ; RIGHT COLUMNS GONE AA36 :MUSH AA36 05 DB 5 AA37 00000550 DB $00,$00,$05,$50 AA3B 15545A55 DB $15,$54,$5A,$55 AA3F 597D555D DB $59,$7D,$55,$5D AA43 77DDFFFF DB $77,$DD,$FF,$FF AA47 0D400140 DB $0D,$40,$01,$40 AA4B 01400540 DB $01,$40,$05,$40 AA4F 15000500 DB $15,$00,$05,$00 AA53 :GARLIC AA53 01 DB 1 AA54 0150000150 DB $01,$50,$00,$01,$50,$00 AA5A 05540015F5 DB $05,$54,$00,$15,$F5,$00 AA60 567D40595D DB $56,$7D,$40,$59,$5D,$40 AA66 595D405A5D DB $59,$5D,$40,$5A,$5D,$40 AA6C 16B5001555 DB $16,$B5,$00,$15,$55,$00 AA72 2222002222 DB $22,$22,$00,$22,$22,$00 AA78 8220800000 DB $82,$20,$80,$00,$00,$00 AA7E :ZUCCINI AA7E 04 DB 4 AA7F 0000000000 DB $00,$00,$00,$00,$00,$08 ATARI CAMAC Assembler Ver 1.0A Page 130 D3:FRUIT.ASM 12 X 3 MATRIX AA85 00002A0000 DB $00,$00,$2A,$00,$00,$26 AA8B 0000AA0002 DB $00,$00,$AA,$00,$02,$98 AA91 000AA80026 DB $00,$0A,$A8,$00,$26,$A0 AA97 02AA600A9A DB $02,$AA,$60,$0A,$9A,$A0 AA9D 09A9800AAA DB $09,$A9,$80,$0A,$AA,$00 AAA3 02A0000000 DB $02,$A0,$00,$00,$00,$00 AAA9 :CARROT AAA9 04 DB 4 AAAA 0000020000 DB $00,$00,$02,$00,$00,$02 AAB0 00015A0005 DB $00,$01,$5A,$00,$05,$50 AAB6 0005500016 DB $00,$05,$50,$00,$16,$50 AABC 0015400055 DB $00,$15,$40,$00,$55,$00 AAC2 0056000154 DB $00,$56,$00,$01,$54,$00 AAC8 0150000540 DB $01,$50,$00,$05,$40,$00 AACE 04 DB $04 AACF :WATERM AACF 00 DB 0 AAD0 0000000000 DB $00,$00,$00,$00,$00,$00,$00,$00 AAD8 00000000BF DB $00,$00,$00,$00,$BF,$FF,$FF,$FE AAE0 BDFFFF7EBF DB $BD,$FF,$FF,$7E,$BF,$FF,$FF,$FE AAE8 AF7FFFFA2F DB $AF,$7F,$FF,$FA,$2F,$FF,$FD,$F8 AAF0 2BF7DFE80A DB $2B,$F7,$DF,$E8,$0A,$FF,$FF,$A0 AAF8 02BFFC8000 DB $02,$BF,$FC,$80,$00,$AA,$AE,$00 AB00 000AAA0000 DB $00,$0A,$AA,$00,$00,$00,$00,$00 AB08 :PINEAP AB08 05 DB 5 AB09 0880A228 DB $08,$80,$A2,$28 AB0D 28A0A668 DB $28,$A0,$A6,$68 AB11 377015D4 DB $37,$70,$15,$D4 AB15 577515D4 DB $57,$75,$15,$D4 AB19 577515D4 DB $57,$75,$15,$D4 AB1D 57751554 DB $57,$75,$15,$54 AB21 04500000 DB $04,$50,$00,$00 AB25 :TOMATO AB25 05 DB 5 AB26 00000080 DB $00,$00,$00,$80 AB2A 0BB03EAA DB $0B,$B0,$3E,$AA AB2E FFBFFFFF DB $FF,$BF,$FF,$FF AB32 EFFFEFFF DB $EF,$FF,$EF,$FF AB36 FBFFFFFF DB $FB,$FF,$FF,$FF AB3A 3BFC3BFC DB $3B,$FC,$3B,$FC AB3E 03F00000 DB $03,$F0,$00,$00 AB42 :PEPPER AB42 05 DB 5 AB43 02000280 DB $02,$00,$02,$80 AB47 008808AA DB $00,$88,$08,$AA AB4B 2AAA2ABA DB $2A,$AA,$2A,$BA AB4F 2AEA2BBA DB $2A,$EA,$2B,$BA AB53 2AAA2BBA DB $2A,$AA,$2B,$BA AB57 2AEA2AAA DB $2A,$EA,$2A,$AA AB5B 0A280000 DB $0A,$28,$00,$00 AB5F :EGG AB5F 04 DB 4 AB60 0000200000 DB $00,$00,$20,$00,$00,$E8 AB66 0002A80001 DB $00,$02,$A8,$00,$01,$94 AB6C 0001540005 DB $00,$01,$54,$00,$05,$54 AB72 0055540069 DB $00,$55,$54,$00,$69,$54 ATARI CAMAC Assembler Ver 1.0A Page 131 D3:FRUIT.ASM 12 X 3 MATRIX AB78 01655005A5 DB $01,$65,$50,$05,$A5,$50 AB7E 0595400555 DB $05,$95,$40,$05,$55,$00 AB84 0154000000 DB $01,$54,$00,$00,$00,$00 AB8A :TURNIP AB8A 04 DB 4 AB8B 0000080000 DB $00,$00,$08,$00,$00,$08 AB91 0000880154 DB $00,$00,$88,$01,$54,$A0 AB97 0155AA0555 DB $01,$55,$AA,$05,$55,$40 AB9D 0555500555 DB $05,$55,$50,$05,$55,$50 ABA3 0555500555 DB $05,$55,$50,$05,$55,$50 ABA9 0555400555 DB $05,$55,$40,$05,$55,$40 ABAF 1555000000 DB $15,$55,$00,$00,$00,$00 EPROC ;START OF PROGRAM ABB5 FRUITY ABB5 20BCAB JSR CONVEG ABB8 2082AC JSR EATVEG ABBB 60 RTS ABBC CONVEG ;VEGGIE CONTROL ABBC PROC ABBC 8D501A STA FRULEV ABBF A6ED LDX PERSON ABC1 BD6419 LDA VERASE,X ABC4 D007 ^ABCD BNE :GEVDNE ;IF ERASED DONT PUT ABC6 A901 LDA #1 ;THIS CHECKS IF ABC8 CD3319 CMP ROCKCO ;2 ROCKS HAVE FALLEN ABCB 9001 ^ABCE BCC :PUTOUT ;YES- DISPLAY FRUIT ABCD :GEVDNE ;MIRROR OF VEGEND ABCD 60 RTS ;OTHERWISE GO BACK ABCE :PUTOUT ABCE AD6019 LDA VEGTIL ABD1 0D6119 ORA VEGTIH ABD4 D00A ^ABE0 BNE :VEGGUM ABD6 A900 LDA #00 ABD8 8D6119 STA VEGTIH ABDB A9C0 LDA #$C0 ABDD 8D6019 STA VEGTIL ABE0 :VEGGUM ABE0 AD6019 LDA VEGTIL ABE3 38 SEC ABE4 E901 SBC #01 ABE6 8D6019 STA VEGTIL ABE9 B003 ^ABEE BCS *+5 ABEB CE6119 DEC VEGTIH ;:SAFETY ABEE AD501A LDA FRULEV ;LEVEL OF FRUIT ABF1 C910 CMP #16 ;ARE WE PAST QUAT ABF3 3002 ^ABF7 BMI *+4 ;NOPE JUMP ABF5 A910 LDA #16 ;PUT PINEAPPLE ;OFFSET IN ACUM ;:NOPINE ABF7 0A ASL A ;SET UP POINTER ATARI CAMAC Assembler Ver 1.0A Page 132 D3:FRUIT.ASM 12 X 3 MATRIX ABF8 AA TAX ABF9 BD14AA LDA TABFRU,X ;GET POINTER ABFC 85A0 STA FRUITL ;STORE LOWBYTE ABFE BD15AA LDA TABFRU+1,X ;GET + AC01 85A1 STA FRUITH ;STORE HIGHBYTE ;+++++++++++++++++++++++++++++++ ; DISPLAY FRUIT ;+++++++++++++++++++++++++++++++ AC03 VEGOUT AC03 AD521A LDA GARDEN ;FIRST SET AC06 85A2 STA VEGTL ; UP TEMP AC08 AD531A LDA GARDEN+1 ; REG. AC0B 85A3 STA VEGTH AC0D A000 LDY #0 ;GET FRUIT OPTION AC0F B1A0 LDA (FRUITL),Y AC11 8D3B1A STA FRUOPT AC14 A90E LDA #14 ;14 SCAN LINES AC16 8D3C1A STA LINES AC19 A901 LDA #1 ;INDEX FRUIT DATA AC1B 8D3D1A STA GET = AC1E LACARY SET * ;:RATATO AC1E A901 LDA #1 ;INDEX ALONG SCANLINE AC20 8D3E1A STA PUT AC23 :LOOPV8 AC23 2902 AND #2 ;(IF 2 OR 3, SKIP) AC25 D00C ^AC33 BNE :GETBYT AC27 AD3E1A LDA PUT ;CHECK IF COLUMN OF AC2A 2D3B1A AND FRUOPT ;DATA TO BE RESTORED AC2D F004 ^AC33 BEQ :GETBYT AC2F A900 LDA #0 AC31 F008 ^AC3B BEQ :NUBBY AC33 :GETBYT AC33 AC3D1A LDY GET AC36 B1A0 LDA (FRUITL),Y AC38 EE3D1A INC GET AC3B :NUBBY AC3B AE5A1A LDX NUBFLG ;IF NUBFLG TRUE AND AC3E F018 ^AC58 BEQ :PUTBYT ; ... AC40 AE3C1A LDX LINES ; LINES >= 13 AND AC43 E00D CPX #13 ; ... AC45 9011 ^AC58 BCC :PUTBYT ; ... AC47 AE3E1A LDX PUT ; PUT = 1 OR 4 AND AC4A E001 CPX #1 ; ... AC4C F004 ^AC52 BEQ *+6 ; ... AC4E E004 CPX #4 ; ... AC50 D006 ^AC58 BNE :PUTBYT ; ... AC52 C900 CMP #0 ; BYTE = 0 THEN AC54 D002 ^AC58 BNE :PUTBYT ; ... AC56 A944 LDA #$44 ; LET BYTE:=NUBS AC58 :PUTBYT AC58 AC3E1A LDY PUT AC5B 91A2 STA (VEGTL),Y AC5D EE3E1A INC PUT ATARI CAMAC Assembler Ver 1.0A Page 133 D3:FRUIT.ASM 12 X 3 MATRIX AC60 AD3E1A LDA PUT AC63 C905 CMP #5 AC65 90BC ^AC23 BCC :LOOPV8 ;4 BYTES PUT OUT? AC67 CE3C1A DEC LINES AC6A F00E ^AC7A BEQ :ENDVEG ;14 LINES PUT OUT? AC6C A5A2 LDA VEGTL ;NO ADD AC6E 18 CLC ;40 FOR NEXT AC6F 6928 ADC #40 ;LINE AC71 85A2 STA VEGTL AC73 9002 ^AC77 BCC *+4 ;NO CARRY AC75 E6A3 INC VEGTH ;:MISS AC77 4C1EAC JMP LACARY AC7A :ENDVEG AC7A A9FF LDA #$FF AC7C A6ED LDX PERSON AC7E 9D6219 STA VEGFLG,X ;SET FLAG=VEG IS OUT AC81 60 RTS AC82 EATVEG AC82 PROC AC82 A6ED LDX PERSON AC84 BD6419 LDA VERASE,X AC87 D051 ^ACDA BNE :NOV8 ;DONT RE-ERASE AC89 BD6219 LDA VEGFLG,X AC8C F04C ^ACDA BEQ :NOV8 ;SKIP IF VEG AINT OUT AC8E AD6019 LDA VEGTIL AC91 0D6119 ORA VEGTIH AC94 F032 ^ACC8 BEQ NOBONV ;TIMES OUT ERASE VEG AC96 A5F2 LDA VRTPOS AC98 C976 CMP #$76 ;TOP AC9A 903E ^ACDA BCC :NOV8 AC9C C991 CMP #$91 ;BOT AC9E B03A ^ACDA BCS :NOV8 ACA0 A6ED LDX PERSON ACA2 BD0B18 LDA GLEVEL,X ACA5 C910 CMP #16 ACA7 9002 ^ACAB BCC *+4 ;IS IT OVER 18 ACA9 A910 LDA #16 ;YES ;:NOTO18 ACAB AA TAX ;LEVEL IN X ACAC BDF0A9 LDA VEDGEL,X ACAF C5F3 CMP HZTPOS ;LEFT ACB1 B027 ^ACDA BCS :NOV8 ACB3 BD02AA LDA VEDGER,X ACB6 C5F3 CMP HZTPOS ;RIGHT ACB8 9020 ^ACDA BCC :NOV8 ACBA :ICHHAV8 ;GUESS WHAT THIS MEANS ACBA A902 LDA #BONFRT ;VEGGIE # STILL IN X ACBC 2015AF JSR BONUS ACBF A913 LDA #19 ACC1 85F6 STA NTUNE ACC3 A6ED LDX PERSON ACC5 FE681A INC FRTCNT,X ACC8 NOBONV ACC8 A919 LDA #HIGH ZERDAT ATARI CAMAC Assembler Ver 1.0A Page 134 D3:FRUIT.ASM 12 X 3 MATRIX ACCA 85A1 STA FRUITH ACCC A9C5 LDA #LOW ZERDAT ACCE 85A0 STA FRUITL ;POINT TO ZEROES ACD0 2003AC JSR VEGOUT ACD3 A9FF LDA #$FF ;SET ERASED FLAG ACD5 A6ED LDX PERSON ACD7 9D6419 STA VERASE,X ACDA :NOV8 ACDA 60 RTS EPROC LIST L ACDB SHOW FLOWER LIST L INCLUDE D3:FLOWER.ASM ;*********************************** ;***** FLOWER ******* ;*********************************** ACDB FLODAT ;LARGE FLOWER ACDB 0550255851 DB $05,$50,$25,$58,$51,$44,$56,$94 ACE3 5694514425 DB $56,$94,$51,$44,$25,$58,$05,$50 ACEB A080208022 DB $A0,$80,$20,$80,$22,$08,$2A,$28 ACF3 0AA0 DB $0A,$A0 ;SMALL FLOWER ACF5 0980165026 DB $09,$80,$16,$50,$26,$60,$16,$50 ACFD 0980820022 DB $09,$80,$82,$00,$22,$00,$22,$A0 AD05 0A80 DB $0A,$80 AD07 FCONTRL AD07 PROC AD07 A000 LDY #00 AD09 A6ED LDX PERSON AD0B BD0B18 LDA GLEVEL,X ;PERSONAL LEVEL = AD0E LACARY SET * ;:OVER10 AD0E C90A CMP #10 ;# OF BIG ONES AD10 9007 ^AD19 BCC :UDER10 AD12 C8 INY AD13 38 SEC AD14 E90A SBC #10 AD16 4C0EAD JMP LACARY ;:OVER10 AD19 :UDER10 AD19 8D6F1A STA FLONUM ;SAVE # 0F LIL AD1C 0A ASL A AD1D 8D711A STA FLOLOW ;DOUBLE LIL VALUE AD20 98 TYA AD21 8D701A STA FLONUM+1 ;SAVE # OF BIG AD24 0A ASL A AD25 8D721A STA FLOLOW+1 ;DOUBLE BIG VALUE AD28 38 SEC ;START OF BIG FLOWERS AD29 A95E LDA #LOW [LMARGE+1] AD2B ED721A SBC FLOLOW+1 AD2E 8D721A STA FLOLOW+1 ATARI CAMAC Assembler Ver 1.0A Page 135 D3:FLOWER.ASM 12 X 3 MATRIX AD31 A920 LDA #HIGH [LMARGE+1] AD33 E900 SBC #0 AD35 8D741A STA FLOHIGH+1 AD38 8D731A STA FLOHIGH AD3B 38 SEC ;START OF LIL FLOWERS AD3C AD721A LDA FLOLOW+1 AD3F ED711A SBC FLOLOW AD42 B003 ^AD47 BCS *+5 AD44 CE731A DEC FLOHIGH ;:NCRFL AD47 18 CLC ;ADJUST FOR HEIGHT AD48 69A0 ADC #160 AD4A 8D711A STA FLOLOW AD4D 9003 ^AD52 BCC *+5 AD4F EE731A INC FLOHIGH ;:NCFLOW AD52 60 RTS EPROC AD53 FLOWER ;PLAYLOOP FLOWER ROUTINE AD53 PROC AD53 EE6B1A INC FCOUNT ;PUT OUT ONLY EVERY AD56 AD6B1A LDA FCOUNT AD59 C904 CMP #04 ;FOURTH TIME AD5B B001 ^AD5E BCS *+3 ;SO WE DONT CAUSE AD5D 60 RTS ;MONSTER INTERFERENCE ;:OKFLOW AD5E A900 LDA #00 AD60 8D6B1A STA FCOUNT ;:FBIG AD63 A201 LDX #1 AD65 20B1AD JSR SETFLO ;SET UP FOR BIG LEFT AD68 A200 LDX #00 AD6A A91A LDA #26 ;DATA GRABBERS AD6C 8D6C1A STA FLOENX AD6F 2082AD JSR FLOOUT ;OUTPUT BIG FLO'S ;:FLITTLE AD72 A200 LDX #0 AD74 20B1AD JSR SETFLO ;SETUP FOR LIL LEFT AD77 A21A LDX #26 AD79 A92C LDA #44 ;SET DATA GRABBERS AD7B 8D6C1A STA FLOENX AD7E 2082AD JSR FLOOUT ;OUTPUT LIL FLO'S AD81 60 RTS EPROC AD82 FLOOUT ;PUT OUT THE FLOWER AD82 PROC AD82 AD6D1A LDA FNUMT AD85 8D6E1A STA FNUMBR AD88 A000 LDY #0 = AD8A LACARY SET * ;:FMORE AD8A CE6E1A DEC FNUMBR AD8D 300F ^AD9E BMI :ENDFLO ;A FLOWER HERE? ATARI CAMAC Assembler Ver 1.0A Page 136 D3:FLOWER.ASM 12 X 3 MATRIX AD8F BDDBAC LDA FLODAT,X ;FIRST BYTE AD92 91A4 STA (FLOADD),Y AD94 C8 INY AD95 BDDCAC LDA FLODAT+1,X ;SECOND BYTE AD98 91A4 STA (FLOADD),Y AD9A C8 INY AD9B 4C8AAD JMP LACARY ;NEXT FLOWER AD9E :ENDFLO AD9E 18 CLC ;NEXT SCAN LINE AD9F A5A4 LDA FLOADD ADA1 6928 ADC #40 ADA3 85A4 STA FLOADD ADA5 9002 ^ADA9 BCC :NOFLOC ADA7 E6A5 INC FLOADD+1 ADA9 :NOFLOC ADA9 E8 INX ;CHECKING HEIGHT ADAA E8 INX ADAB EC6C1A CPX FLOENX ADAE 90D2 ^AD82 BCC FLOOUT ADB0 60 RTS EPROC ADB1 SETFLO ADB1 BD6F1A LDA FLONUM,X ;# OF BIG ONES ADB4 8D6D1A STA FNUMT ADB7 BD711A LDA FLOLOW,X ;SCREEN ADD OF BIG ADBA 85A4 STA FLOADD ADBC BD731A LDA FLOHIGH,X ADBF 85A5 STA FLOADD+1 ADC1 60 RTS LIST L ADC2 SHOW SCORE LIST L INCLUDE D3:SCORE.ASM ;SCORE.ASM ;--------- ;THIS FILE CONTAINS ROUTINES TO ;COMPUTE AND DISPLAY THE SCORES ON ;THE SCORELINE. ;*** SETSCO *** ; ;INITIALIZE SCORELINE. ADC2 SETSCO PROC ;SET SCORELINE TO ALL BLANKS ADC2 A027 LDY #39 ADC4 A98B LDA #CHB ADC6 :LOOP ADC6 99503F STA SCORLIN,Y ATARI CAMAC Assembler Ver 1.0A Page 137 D3:SCORE.ASM 12 X 3 MATRIX ADC9 88 DEY ADCA 10FA ^ADC6 BPL :LOOP ;PUT INITIAL SCORES ON SCORELINE ADCC A201 LDX #1 ;SECOND PERSON ADCE AD2F1A LDA TWOTWO ;...2ND PERSON IN? ADD1 C902 CMP #2 ADD3 9003 ^ADD8 BCC :P1 ADD5 2018AE JSR SHOSCO ADD8 CA :P1 DEX ;FIRST PERSON ADD9 2018AE JSR SHOSCO ADDC 60 RTS EPROC ;*** SHOMEN *** ; ;SHOW NUMBER OF MEN LEFT FOR PERSON ADDD SHOMEN PROC ADDD BC0918 LDY MEN,X ;TOTAL NUMBER OF MEN ADE0 88 DEY ;NUMBER OF MEN LEFT ADE1 8C6919 STY MENLEFT ADE4 BC6580 LDY DPOS,X ;POSITION ON LINE ADE7 A900 LDA #0 ADE9 8D6819 STA DLEN ADEC :LOOP ADEC AD6819 LDA DLEN ADEF CD6919 CMP MENLEFT ADF2 B005 ^ADF9 BCS :10 ADF4 A98A LDA #CHD ;DIGDUG CHARACTER ADF6 4CFBAD JMP :GOON ADF9 A98B :10 LDA #CHB ;BLANK CHARACTER ADFB :GOON ADFB 99503F STA SCORLIN,Y ADFE C8 INY ADFF BD6780 LDA DDIR,X ;IF +, TO RIGHT AE02 1002 ^AE06 BPL :20 ;ELSE TO LEFT AE04 88 DEY AE05 88 DEY AE06 EE6819 :20 INC DLEN AE09 AD6819 LDA DLEN AE0C C906 CMP #6 ;LENGTH OF DD FIELD AE0E 90DC ^ADEC BCC :LOOP AE10 60 RTS EPROC ;*** SHOSCO, SHOBON, SHOHIS *** ; ;SHOW SCORE OF PERSON, BONUS, OR ;HIGH SCORE. AE11 SHOHIS AE11 PROC AE11 A203 LDX #3 ;INDEX HIGH SCORE ATARI CAMAC Assembler Ver 1.0A Page 138 D3:SCORE.ASM 12 X 3 MATRIX AE13 4C18AE JMP SHOSCO AE16 SHOBON AE16 A202 LDX #2 ;INDEX BONUS AE18 SHOSCO AE18 A98B LDA #CHB ;NO LEADING ZEROS AE1A 8D071A STA BLANK AE1D BC6280 LDY SPOS,X AE20 BD0F18 LDA SCOREH,X ;HIGH BYTE OF SCORE AE23 2038AE JSR SHOVE AE26 BD1318 LDA SCOREM,X ;MIDDLE BYTE AE29 2038AE JSR SHOVE AE2C A980 LDA #CH0 ;LEADING 0'S NOW AE2E 8D071A STA BLANK AE31 BD1718 LDA SCOREL,X ;LOW BYTE AE34 2038AE JSR SHOVE AE37 60 RTS AE38 SHOVE AE38 48 PHA AE39 4A LSR A ;GET HIGH NIBBLE AE3A 4A LSR A AE3B 4A LSR A AE3C 4A LSR A AE3D 2047AE JSR DIGIT AE40 68 PLA AE41 290F AND #$0F ;GET LOW NIBBLE AE43 2047AE JSR DIGIT AE46 60 RTS AE47 DIGIT AE47 C900 CMP #0 ;ZERO? AE49 F00E ^AE59 BEQ :ZERO AE4B 18 CLC AE4C 6980 ADC #CH0 AE4E 99503F STA SCORLIN,Y AE51 A980 LDA #CH0 AE53 8D071A STA BLANK AE56 4C5FAE JMP :QUITD AE59 :ZERO AE59 AD071A LDA BLANK AE5C 99503F STA SCORLIN,Y AE5F :QUITD AE5F C8 INY AE60 60 RTS EPROC ;*** FLPSCO *** ; ;FLIP SIZE OF SCORES ON SCREEN BY ;FLIPPING BIT 1 OF EACH BYTE IN ;THE PERSON'S SCORE FIELD. AE61 FLPSCO PROC AE61 BC6080 LDY FIELD,X AE64 A906 LDA #FLDLEN AE66 8D6819 STA DLEN ATARI CAMAC Assembler Ver 1.0A Page 139 D3:SCORE.ASM 12 X 3 MATRIX AE69 :LOOP AE69 B9503F LDA SCORLIN,Y AE6C 4940 EOR #FLIPPER ;FLIP BIT ONE AE6E 99503F STA SCORLIN,Y AE71 C8 INY AE72 CE6819 DEC DLEN AE75 D0F2 ^AE69 BNE :LOOP AE77 60 RTS EPROC ;*** ADDSCO *** ; ;ADD ADDIT INTO SCORE. AE78 ADDSCO PROC AE78 F8 SED AE79 18 CLC AE7A BD1718 LDA SCOREL,X AE7D 6D331A ADC ADDIT+2 AE80 9D1718 STA SCOREL,X AE83 BD1318 LDA SCOREM,X AE86 6D321A ADC ADDIT+1 AE89 9D1318 STA SCOREM,X AE8C BD0F18 LDA SCOREH,X AE8F 6D311A ADC ADDIT AE92 9D0F18 STA SCOREH,X AE95 20B7AE JSR NEWMAN ;CHECK FOR NEW MAN AE98 D8 CLD AE99 60 RTS EPROC ;*** CMPSCO *** ; ;COMPARE CURRENT PERSON'S SCORE TO ;CMPIT. RETURNS C SET IF THIS ;SCORE IS GREATER THAN OR EQUAL TO ;CMPIT, C CLEAR OTHERWISE; Z SET ;IF EQUAL TO CMPIT, Z CLEAR OTHER- ;WISE. AE9A CMPSCO PROC AE9A F8 SED AE9B BD0F18 LDA SCOREH,X AE9E CD341A CMP CMPIT AEA1 9012 ^AEB5 BCC :FIN ;IF LESS, THEN LESS AEA3 D010 ^AEB5 BNE :FIN ;IF /=, THEN MORE AEA5 BD1318 LDA SCOREM,X AEA8 CD351A CMP CMPIT+1 AEAB 9008 ^AEB5 BCC :FIN ;DITTO AEAD D006 ^AEB5 BNE :FIN AEAF BD1718 LDA SCOREL,X AEB2 CD361A CMP CMPIT+2 AEB5 :FIN AEB5 D8 CLD AEB6 60 RTS EPROC ATARI CAMAC Assembler Ver 1.0A Page 140 D3:SCORE.ASM 12 X 3 MATRIX ;*** NEWMAN *** ; ;CHECK IF SCORE EXCEEDS LEVEL ;REQUIRED TO GET ANOTHER MAN. AEB7 NEWMAN AEB7 PROC AEB7 BD1B1A LDA MENLEV,X AEBA D008 ^AEC4 BNE :MULT40 AEBC A901 LDA #1 AEBE 8D341A STA CMPIT AEC1 4CCEAE JMP :CONTINUE AEC4 :MULT40 AEC4 A8 TAY AEC5 A902 LDA #2 AEC7 :LOOP AEC7 0A ASL A AEC8 88 DEY AEC9 D0FC ^AEC7 BNE :LOOP AECB 8D341A STA CMPIT AECE :CONTINUE AECE A900 LDA #0 AED0 8D351A STA CMPIT+1 AED3 8D361A STA CMPIT+2 AED6 209AAE JSR CMPSCO AED9 900D ^AEE8 BCC :SKIP AEDB FE0918 INC MEN,X ;GOT IT!!!! AEDE FE1B1A INC MENLEV,X ;NEXT SCORE REQ'D ;TUNE HOOK HERE AEE1 A907 LDA #07 AEE3 85F6 STA NTUNE ;EXTRA MAN TUNE AEE5 20DDAD JSR SHOMEN AEE8 :SKIP AEE8 60 RTS EPROC ;*** SCHIGH *** ; ;COMPUTE NEW HIGH SCORE AT END OF ;GAME. X SHOULD BE NUMBER OF PERSON. AEE9 SCHIGH AEE9 PROC AEE9 AD1218 LDA SCOREH+3 ;HIGH SCORE--HIBYTE AEEC 8D341A STA CMPIT AEEF AD1618 LDA SCOREM+3 ;--MIDDLE BYTE AEF2 8D351A STA CMPIT+1 AEF5 AD1A18 LDA SCOREL+3 ;--LOW BYTE AEF8 8D361A STA CMPIT+2 AEFB 209AAE JSR CMPSCO AEFE 9014 ^AF14 BCC :QUIT AF00 F012 ^AF14 BEQ :QUIT AF02 BD0F18 LDA SCOREH,X ;LOAD NEW HIGH SCORE AF05 8D1218 STA SCOREH+3 ATARI CAMAC Assembler Ver 1.0A Page 141 D3:SCORE.ASM 12 X 3 MATRIX AF08 BD1318 LDA SCOREM,X AF0B 8D1618 STA SCOREM+3 AF0E BD1718 LDA SCOREL,X AF11 8D1A18 STA SCOREL+3 AF14 :QUIT AF14 60 RTS EPROC ;*** BONUS *** ; ;COMPUTE BONUS AND FLASH IT ON THE ;SCORE LINE. ARGUMENTS A SHOULD ;CONTAIN CODE FOR TYPE OF BONUS, ;AND X SHOULD CONTAIN AUXILIARY ;INFORMATION. = 0000 BONBU = 0 ;BLOWUP--X IS MONSTER # = 0001 BONCRSH = 1 ;CRUSH--X IS # MONSTERS = 0002 BONFRT = 2 ;FRUIT--X? = 0078 BONTIM = 120 ;FLASH FOR 2 SECONDS AF15 BONUS PROC AF15 48 PHA AF16 8A TXA AF17 48 PHA AF18 A900 LDA #0 AF1A 20A4AF JSR CHKBON ;OLD BONUS STILL UP? AF1D 68 PLA AF1E AA TAX AF1F 68 PLA AF20 C900 CMP #BONBU AF22 D006 ^AF2A BNE :10 AF24 2047AF JSR :BONBU AF27 4C3EAF JMP :PUTBON AF2A C901 :10 CMP #BONCRSH AF2C D006 ^AF34 BNE :20 AF2E 207FAF JSR :BONCRSH AF31 4C3EAF JMP :PUTBON AF34 C902 :20 CMP #BONFRT AF36 D00E ^AF46 BNE :FIN AF38 2092AF JSR :BONFRT AF3B 4C3EAF JMP :PUTBON AF3E :PUTBON AF3E 2016AE JSR SHOBON ;DISPLAY BONUS AF41 A978 LDA #BONTIM ;SET BONUS TIMER AF43 8D081A STA BTIMER AF46 :FIN AF46 60 RTS AF47 :BONBU ;COMPUTE STRIP OF SAND WHERE ;BLOWUP TOOK PLACE. AF47 BD9518 LDA LPOKAP,X ATARI CAMAC Assembler Ver 1.0A Page 142 D3:SCORE.ASM 12 X 3 MATRIX AF4A BC9D18 LDY HPOKAP,X AF4D 20A4B1 JSR CVTSTP ;GET VERT.POS. IN A AF50 A005 LDY #STRIPLEN AF52 :FNDSTRP AF52 D90BB0 CMP STRIP-1,Y ;SCAN LINE < STRIP? AF55 9003 ^AF5A BCC :FOUND AF57 88 DEY AF58 D0F8 ^AF52 BNE :FNDSTRP AF5A :FOUND AF5A BD8518 LDA PFFLAG,X ;POOKA OR FYGAR? AF5D F00F ^AF6E BEQ :STRSCO ;SKIP IF POOKA AF5F A5F8 LDA CONTRL ;DIR OF PUMP AF61 C901 CMP #1 ;SKIP IF UP AF63 F009 ^AF6E BEQ :STRSCO AF65 C903 CMP #3 ;SKIP IF DOWN AF67 F005 ^AF6E BEQ :STRSCO AF69 C8 INY AF6A C8 INY AF6B C8 INY AF6C C8 INY AF6D C8 INY AF6E :STRSCO ;SAND STRIP SCORES ARE CHARAC- ;TERIZED BY A NON-ZERO MIDDLE ;BYTE, BUT ZERO HIGH AND LOW ;BYTES. AF6E A900 LDA #0 AF70 8D1118 STA SCOREH+2 AF73 B911B0 LDA BUSCOM,Y AF76 8D1518 STA SCOREM+2 AF79 A900 LDA #0 AF7B 8D1918 STA SCOREL+2 AF7E 60 RTS AF7F :BONCRSH ;CRUSHING BONUSES ARE CHARAC- ;TERIZED BY A ZERO LOW BYTE. AF7F CA DEX AF80 BD1CB0 LDA CRSCOH,X AF83 8D1118 STA SCOREH+2 AF86 BD24B0 LDA CRSCOM,X AF89 8D1518 STA SCOREM+2 AF8C A900 LDA #0 AF8E 8D1918 STA SCOREL+2 AF91 60 RTS AF92 :BONFRT ;FRUIT SCORES ARE CHARAC- ;TERIZED BY A NON-ZERO MIDDLE ;BYTE, BUT ZERO HIGH AND LOW ;BYTES. ATARI CAMAC Assembler Ver 1.0A Page 143 D3:SCORE.ASM 12 X 3 MATRIX AF92 CA DEX AF93 A900 LDA #0 AF95 8D1118 STA SCOREH+2 AF98 BD2CB0 LDA FRSCOM,X AF9B 8D1518 STA SCOREM+2 AF9E A900 LDA #0 AFA0 8D1918 STA SCOREL+2 AFA3 60 RTS EPROC ;*** CHKBON *** ; ;IF OLD BONUS IS STILL UP, THEN ;TURN IT OFF. ARGUMENT A (WHICH ;IS PASSED TO BONOFF) IS ZERO TO ;NOT REDISPLAY NUMBER OF MEN, AND ;NON-ZERO TO DISPLAY THEM. ; ;NOTE: IT IS IMPORTANT THAT THE ; VERTICAL BLANK TIMER NOT ; TIME OUT DURING THIS ROUTINE, ; OR THE BONUS WILL BE ADDED IN ; TWICE!! THUS WE WILL TURN ; OFF THE VBI VERY BRIEFLY ; DURING THIS ROUTINE. AFA4 CHKBON PROC AFA4 48 PHA ;SAVE ARGUMENT AFA5 A980 LDA #$80 ;DLI BUT NOT VBI AFA7 8D0ED4 STA NMIEN ;VBI TURNED OFF AFAA AD081A LDA BTIMER ;TIMER ACTIVE? AFAD F00A ^AFB9 BEQ :QUIT ;IF NOT, SKIP IT AFAF A900 LDA #0 ;TURN TIMER OFF AFB1 8D081A STA BTIMER AFB4 68 PLA ;RETRIEVE ARGUMENT AFB5 48 PHA AFB6 20C0AF JSR BONOFF ;TURN OFF BONUS AFB9 :QUIT AFB9 68 PLA ;FIX UP STACK AFBA A9FF LDA #$FF ;RESTORE VBI AFBC 8D0ED4 STA NMIEN AFBF 60 RTS EPROC ;*** BONOFF *** ; ;TURN OFF BONUS DISPLAY, ADD ;BONUS INTO SCORE, AND DISPLAY NEW ;SCORE. IF ARGUMENT A IS NON-ZERO ;THEN ALSO SHOW NUMBER OF MEN. ;(ASSUMPTION IS THAT SCORLINE ;USES SAME AREA FOR MEN AND BONUS.) AFC0 BONOFF PROC AFC0 48 PHA ;SAVE ARGUMENT AFC1 AD1118 LDA SCOREH+2 ATARI CAMAC Assembler Ver 1.0A Page 144 D3:SCORE.ASM 12 X 3 MATRIX AFC4 8D311A STA ADDIT AFC7 AD1518 LDA SCOREM+2 AFCA 8D321A STA ADDIT+1 AFCD AD1918 LDA SCOREL+2 AFD0 8D331A STA ADDIT+2 AFD3 A6ED LDX PERSON AFD5 2078AE JSR ADDSCO ;ADD BONUS TO SCORE AFD8 2018AE JSR SHOSCO ;SHOW NEW SCORE ;COMPUTE ANY EXTRA MEN HERE!! AFDB 68 PLA ;SHOULD WE SHOW MEN? AFDC F003 ^AFE1 BEQ :QUIT AFDE 20DDAD JSR SHOMEN ;SHOW # OF MEN AFE1 :QUIT AFE1 60 RTS EPROC ;*** DUGSAND *** AFE2 DUGSAND AFE2 PROC AFE2 AD301A LDA BELLY AFE5 C955 CMP #$55 AFE7 D022 ^B00B BNE :QUIT AFE9 EE761A INC SQUARE ;SAND WAS DUG! AFEC AD761A LDA SQUARE AFEF C909 CMP #NSQUARE AFF1 9018 ^B00B BCC :QUIT AFF3 A900 LDA #0 AFF5 8D761A STA SQUARE AFF8 8D311A STA ADDIT AFFB 8D321A STA ADDIT+1 AFFE A910 LDA #$10 B000 8D331A STA ADDIT+2 B003 A6ED LDX PERSON B005 2078AE JSR ADDSCO B008 2018AE JSR SHOSCO B00B :QUIT B00B 60 RTS EPROC ;ROM SCORE TABLES B00C F0C294662E STRIP DB 240,194,148,102,46 = 0005 STRIPLEN = *-STRIP B011 0005040302 BUSCOM DB 0,$05,$04,$03,$02,$02 B017 1008060402 DB $10,$08,$06,$04,$02 B01C 0000000000 CRSCOH DB $00,$00,$00,$00,$00 B021 010101 DB $01,$01,$01 B024 1025406080 CRSCOM DB $10,$25,$40,$60,$80 B029 002040 DB $00,$20,$40 B02C 0406081010 FRSCOM DB $04,$06,$08,$10,$10 ATARI CAMAC Assembler Ver 1.0A Page 145 D3:SCORE.ASM 12 X 3 MATRIX B031 2020303040 DB $20,$20,$30,$30,$40 B036 4050506060 DB $40,$50,$50,$60,$60 B03B 707080 DB $70,$70,$80 LIST L B03E SHOW PACK LIST L INCLUDE D3:PACK.ASM ;**** PACK **** ; ;PACK THE SCREEN DATA INTO A SMALLER ;AREA OF MEMORY. DATA IS PACKED INTO ;RUNS OF PIXELS AS FOLLOWS: ; ; 7 6 5 4 3 2 1 0 ; +-+-+------------+ ; |0|P|COUNT (0-3F)| ; +-+-+------------+ ; ; ; 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 ; +-+-+------------+---------------+ ; |1|P|COUNT (14 BITS, 0-3FFF) | ; +-+-+------------+---------------+ ; ;WHERE P IS THE PIXEL--1 IF THE PIXEL ;IS 01, AND 0 OTHERWISE. ; ;TO CONSERVE MEMORY, ONLY EVERY OTHER ;SCREEN LINE IS PACKED; THE UNPACKER ;WILL HAVE TO DOUBLE THE LINES. ;(THIS WORKS BECAUSE SCAN LINES ;APPEAR IN PAIRS ON THE SCREEN.) B03E PACK PROC ;PUT ADDRESS OF SCREEN AND OF ;RUN BUFFER INTO PAGE-ZERO ;POINTERS B03E A910 LDA #LOW SCR B040 8584 STA SCRPTR B042 A920 LDA #HIGH SCR B044 8585 STA SCRPTR+1 B046 BDC481 LDA RUNL,X B049 8586 STA RUNPTR B04B BDC681 LDA RUNH,X B04E 8587 STA RUNPTR+1 ;INITIALIZE RUN DATA B050 A000 LDY #0 B052 84EF STY COUNT B054 84F0 STY COUNT+1 B056 B184 LDA (SCRPTR),Y B058 29C0 AND #$C0 ;EXTRACT FIRST PIXEL B05A C940 CMP #$40 ;PIXEL=01? B05C F002 ^B060 BEQ :10 ATARI CAMAC Assembler Ver 1.0A Page 146 D3:PACK.ASM 12 X 3 MATRIX B05E A900 LDA #0 ;IF NOT, THEN PIXEL=0 B060 8D0718 :10 STA PIXEL B063 A9C8 LDA #SLINES ;COUNT LINES LEFT B065 8D0818 STA LINLFT ;UNTIL LINES_LEFT = 0 B068 :LOOP B068 B184 LDA (SCRPTR),Y B06A 85F1 STA BYTE B06C A204 LDX #4 B06E :LOOP2 ;EACH PIXEL IN BYTE B06E A5F1 LDA BYTE B070 06F1 ASL BYTE B072 06F1 ASL BYTE B074 29C0 AND #$C0 ;EXTRACT PIXEL B076 C940 CMP #$40 ;PIXEL=01? B078 F002 ^B07C BEQ :20 B07A A900 LDA #0 ;IF NOT, THEN PIXEL=0 B07C CD0718 :20 CMP PIXEL ;CURRENT RUN? B07F D009 ^B08A BNE :NEWRUN ;PART OF CURRENT RUN B081 E6EF INC COUNT B083 D002 ^B087 BNE :30 B085 E6F0 INC COUNT+1 B087 4C98B0 :30 JMP :NEXT2 ;PUT OLD RUN; START NEW RUN B08A :NEWRUN B08A 20B6B0 JSR PUTRUN B08D 8D0718 STA PIXEL B090 A901 LDA #1 B092 85EF STA COUNT B094 A900 LDA #0 B096 85F0 STA COUNT+1 B098 :NEXT2 B098 CA DEX B099 D0D3 ^B06E BNE :LOOP2 ;CHECK IF WE'RE AT END OF SCAN ;LINE; IF SO, THEN SKIP NEXT LINE B09B C8 INY B09C C028 CPY #40 ;END OF SCAN LINE? B09E 900D ^B0AD BCC :NEXT B0A0 2098B1 JSR NXTLIN ;GET ADR OF NEXT LINE B0A3 A000 LDY #0 B0A5 CE0818 DEC LINLFT B0A8 CE0818 DEC LINLFT B0AB F003 ^B0B0 BEQ :DONE B0AD :NEXT ATARI CAMAC Assembler Ver 1.0A Page 147 D3:PACK.ASM 12 X 3 MATRIX B0AD 4C68B0 JMP :LOOP ;PUT LAST RUN B0B0 :DONE B0B0 20B6B0 JSR PUTRUN B0B3 A6ED LDX PERSON B0B5 60 RTS B0B6 PUTRUN B0B6 48 PHA B0B7 98 TYA B0B8 48 PHA B0B9 A000 LDY #0 B0BB A5F0 LDA COUNT+1 ;COUNT WITHIN 63? B0BD D010 ^B0CF BNE :2BYTE B0BF A5EF LDA COUNT B0C1 C940 CMP #64 B0C3 100A ^B0CF BPL :2BYTE ;ONE-BYTE RUN B0C5 0D0718 ORA PIXEL B0C8 9186 STA (RUNPTR),Y B0CA A901 LDA #1 ;ONE BYTE B0CC 4CDFB0 JMP :FIN ;TWO-BYTE RUN B0CF :2BYTE B0CF A5F0 LDA COUNT+1 B0D1 0D0718 ORA PIXEL B0D4 0980 ORA #$80 ;TWO-BYTE FLAG B0D6 9186 STA (RUNPTR),Y B0D8 C8 INY B0D9 A5EF LDA COUNT B0DB 9186 STA (RUNPTR),Y B0DD A902 LDA #2 ;TWO BYTES B0DF :FIN B0DF 18 CLC B0E0 6586 ADC RUNPTR B0E2 8586 STA RUNPTR B0E4 9002 ^B0E8 BCC :50 B0E6 E687 INC RUNPTR+1 B0E8 68 :50 PLA B0E9 A8 TAY B0EA 68 PLA B0EB 60 RTS EPROC ;**** UNPACK **** ; ;UNPACK LIST OF RUNS PRODUCED BY ;PACK. EACH SCREEN LINE IS DOUBLED. ATARI CAMAC Assembler Ver 1.0A Page 148 D3:PACK.ASM 12 X 3 MATRIX B0EC UNPACK PROC ;PUT ADDRESS OF SCREEN AND OF ;RUN BUFFER INTO PAGE-ZERO ;POINTERS B0EC A910 LDA #LOW SCR B0EE 8584 STA SCRPTR B0F0 A920 LDA #HIGH SCR B0F2 8585 STA SCRPTR+1 B0F4 BDC481 LDA RUNL,X B0F7 8586 STA RUNPTR B0F9 BDC681 LDA RUNH,X B0FC 8587 STA RUNPTR+1 B0FE A938 LDA #LOW [SCR+40] ;LINE BELOW B100 8588 STA BELOW B102 A920 LDA #HIGH [SCR+40] B104 8589 STA BELOW+1 ;INITIALIZE RUN DATA B106 A000 LDY #0 B108 84EF STY COUNT B10A 84F0 STY COUNT+1 B10C A9C8 LDA #SLINES ;COUNT LINES LEFT B10E 8D0818 STA LINLFT ;UNTIL LINES_LEFT = 0 B111 :LOOP B111 A204 LDX #4 ;4 PIXELS INTO BYTE ;SHIFT 4 PIXELS INTO A BYTE B113 :LOOP2 B113 A5EF LDA COUNT ;IF COUNT=0... B115 D007 ^B11E BNE :10 B117 A5F0 LDA COUNT+1 B119 D003 ^B11E BNE :10 B11B 205FB1 JSR GETRUN ;...THEN GET NEW RUN B11E AD0718 :10 LDA PIXEL B121 0A ASL A ;SHIFT PIXEL IN B122 26F1 ROL BYTE B124 0A ASL A B125 26F1 ROL BYTE B127 C6EF DEC COUNT ;COUNT=COUNT-1 B129 A5EF LDA COUNT B12B C9FF CMP #$FF B12D D002 ^B131 BNE :20 B12F C6F0 DEC COUNT+1 B131 CA :20 DEX B132 D0DF ^B113 BNE :LOOP2 ;PUT BYTE ONTO SCREEN ON CURRENT ATARI CAMAC Assembler Ver 1.0A Page 149 D3:PACK.ASM 12 X 3 MATRIX ;SCAN LINE AND ON LINE JUST BELOW B134 A5F1 LDA BYTE B136 9184 STA (SCRPTR),Y B138 9188 STA (BELOW),Y ;CHECK IF WE'RE AT END OF SCAN ;LINE; IF SO, THEN SKIP NEXT ;LINE. B13A C8 INY B13B C028 CPY #40 ;END OF SCAN LINE? B13D 901A ^B159 BCC :NEXT B13F 2098B1 JSR NXTLIN ;GET ADR OF NEXT LINE B142 A000 LDY #0 B144 CE0818 DEC LINLFT B147 CE0818 DEC LINLFT B14A F010 ^B15C BEQ :DONE B14C 18 CLC B14D A584 LDA SCRPTR B14F 6928 ADC #40 B151 8588 STA BELOW B153 A585 LDA SCRPTR+1 B155 6900 ADC #0 B157 8589 STA BELOW+1 B159 :NEXT B159 4C11B1 JMP :LOOP B15C :DONE B15C A6ED LDX PERSON B15E 60 RTS B15F GETRUN B15F 48 PHA B160 98 TYA B161 48 PHA B162 A000 LDY #0 ;GET FIRST RUN BYTE B164 B186 LDA (RUNPTR),Y B166 85EF STA COUNT B168 2940 AND #$40 ;EXTRACT PIXEL B16A 8D0718 STA PIXEL B16D A5EF LDA COUNT ;IS IT ONE BYTE? B16F 300F ^B180 BMI :2BYTE ;RUN IS ONE BYTE B171 A5EF LDA COUNT B173 293F AND #$3F B175 85EF STA COUNT B177 A900 LDA #0 B179 85F0 STA COUNT+1 ;ZERO HIGH BYTE B17B A901 LDA #1 ;ONE BYTE B17D 4C8BB1 JMP :FIN ;RUN IS TWO BYTES ATARI CAMAC Assembler Ver 1.0A Page 150 D3:PACK.ASM 12 X 3 MATRIX B180 :2BYTE B180 293F AND #$3F B182 85F0 STA COUNT+1 B184 C8 INY ;GET SECOND BYTE B185 B186 LDA (RUNPTR),Y B187 85EF STA COUNT B189 A902 LDA #2 ;TWO BYTES B18B :FIN B18B 18 CLC B18C 6586 ADC RUNPTR B18E 8586 STA RUNPTR B190 9002 ^B194 BCC :50 B192 E687 INC RUNPTR+1 B194 68 :50 PLA B195 A8 TAY B196 68 PLA B197 60 RTS EPROC B198 NXTLIN PROC B198 18 CLC ;ADD 2*40 TO SCRPTR B199 A584 LDA SCRPTR B19B 6950 ADC #[2*40] B19D 8584 STA SCRPTR B19F 9002 ^B1A3 BCC :50 B1A1 E685 INC SCRPTR+1 B1A3 60 :50 RTS EPROC LIST L B1A4 SHOW CONVERT LIST L INCLUDE D1:CONVERT.ASM ;CONVERT.ASM ;----------- ;THIS FILE CONTAINS ROUTINES TO ;CONVERT BETWEEN PLAYER COORDINATES ;AND SCREEN ADDRESSES. = 002F HOROFF = $2F = 001F VRTOFF = $1F ;**** CVTSTP **** ; ;CONVERT SCREEN ADDRESS TO PLAYER ;COORDINATES. ; ;THE SCREEN ADDRESS SHOULD BE PASSED ;LOW BYTE IN A, HIGH BYTE IN Y. ATARI CAMAC Assembler Ver 1.0A Page 151 D1:CONVERT.ASM 12 X 3 MATRIX ; ;THE PLAYER COORDINATES ARE RETURNED ;VERTICAL POSITION IN A, HORIZONTAL ;POSITION IN Y. ; ;(ANTIC MODE E, SINGLE LINE RES'N) B1A4 CVTSTP PROC B1A4 38 SEC ;SUBTR BEG'G OF SCR'N B1A5 E910 SBC #LOW SCR B1A7 8D5C18 STA NUM B1AA 98 TYA B1AB E920 SBC #HIGH SCR B1AD 8D5D18 STA NUM+1 B1B0 A928 LDA #40 ;40 BYTES/LINE B1B2 8D5E18 STA BY B1B5 202DB2 JSR DIV ;DIVIDE BY 40 B1B8 AD6118 LDA REM ;BYTE # ALONG LINE B1BB 0A ASL A ;TIMES 4 PIXELS/BYTE B1BC 0A ASL A ;... B1BD 18 CLC ;PLUS HORIZ. OFFSET B1BE 6930 ADC #HOROFF+1 B1C0 8D6118 STA REM B1C3 AD5F18 LDA ANSWER ;SCAN LINE B1C6 18 CLC B1C7 6920 ADC #VRTOFF+1 ;PLUS VERT. OFFSET B1C9 8D5F18 STA ANSWER B1CC BDB518 LDA GOPOOKA,X B1CF 4A LSR A B1D0 9021 ^B1F3 BCC :MERGE ;SKIP IF UP OR DOWN B1D2 D011 ^B1E5 BNE :LEFT B1D4 :RIGHT B1D4 BCBD18 LDY POOPHASE,X B1D7 88 DEY B1D8 18 CLC B1D9 AD6118 LDA REM B1DC 798785 ADC PHTABR,Y B1DF 8D6118 STA REM B1E2 4CF3B1 JMP :MERGE B1E5 :LEFT B1E5 BCBD18 LDY POOPHASE,X B1E8 88 DEY B1E9 18 CLC B1EA AD6118 LDA REM B1ED 798785 ADC PHTABL,Y B1F0 8D6118 STA REM B1F3 :MERGE B1F3 AC6118 LDY REM B1F6 AD5F18 LDA ANSWER B1F9 60 RTS EPROC ATARI CAMAC Assembler Ver 1.0A Page 152 D1:CONVERT.ASM 12 X 3 MATRIX ;**** CVTPTS **** ; ;CONVERT PLAYER COORDINATES TO SCREEN ;ADDRESS. ; ;THE PLAYER COORDINATES SHOULD BE ;PASSED VERTICAL POSITION IN A, ;HORIZONTAL POSITION IN Y. ; ;THE SCREEN ADDRESS IS RETURNED LOW ;BYTE IN A, HIGH BYTE IN Y. ; ;(ANTIC MODE E, SINGLE LINE RES'N) B1FA CVTPTS PROC B1FA 38 SEC B1FB E920 SBC #VRTOFF+1 ;SUBTR VERT. OFFSET B1FD 8D5C18 STA NUM B200 A928 LDA #40 ;40 BYTES/LINE B202 8D5E18 STA BY B205 204EB2 JSR MULT B208 38 SEC B209 98 TYA ;HORIZ. POSITION B20A E92F SBC #HOROFF ;SUBTR HORZ. OFFSET B20C 4A LSR A ;DIVIDED BY 4... B20D 4A LSR A ;...PIXELS/BYTE B20E 18 CLC B20F 6D5F18 ADC ANSWER ;ADD SCAN LINE BYTES B212 8D5F18 STA ANSWER B215 9003 ^B21A BCC :10 B217 EE6018 INC ANSWER+1 B21A 18 :10 CLC ;ADD BEG'G SCR ADDR B21B AD5F18 LDA ANSWER B21E 6910 ADC #LOW SCR B220 8D5F18 STA ANSWER B223 AD6018 LDA ANSWER+1 B226 6920 ADC #HIGH SCR B228 A8 TAY B229 AD5F18 LDA ANSWER B22C 60 RTS EPROC LIST L B22D SHOW MATH LIST L INCLUDE D1:MATH.ASM ;MATH.ASM ;-------- ;THIS FILE CONTAINS 16-BIT MATH ;ROUTINES. ;**** DIV **** ; ;16-BIT DIVIDE BY 8-BIT DIVISOR. ;MODIFIES REGISTERS A, Y. ATARI CAMAC Assembler Ver 1.0A Page 153 D1:MATH.ASM 12 X 3 MATRIX B22D DIV PROC B22D A011 LDY #17 B22F A900 LDA #0 B231 18 CLC B232 :LOOP B232 2A ROL A B233 CD5E18 CMP BY B236 9003 ^B23B BCC :SKIP B238 ED5E18 SBC BY B23B :SKIP B23B 2E5F18 ROL ANSWER B23E 2E6018 ROL ANSWER+1 B241 0E5C18 ASL NUM B244 2E5D18 ROL NUM+1 B247 88 DEY B248 D0E8 ^B232 BNE :LOOP B24A 8D6118 STA REM B24D 60 RTS EPROC ;**** MULT **** ; ;MULTIPLY TWO 8-BIT QUANTITIES FOR ;A 16-BIT PRODUCT. B24E MULT PROC B24E A900 LDA #0 ;SET HIGH BYTE TO 0 B250 8D5D18 STA NUM+1 ;... B253 8D5F18 STA ANSWER ;INIT SUM TO ZERO B256 8D6018 STA ANSWER+1 ;... B259 :LOOP B259 4E5E18 LSR BY ;THIS BIT ON? B25C 9013 ^B271 BCC :NEXT B25E 18 CLC ;IF SO,... B25F AD5F18 LDA ANSWER ;..ADD NUM TO ANSW B262 6D5C18 ADC NUM B265 8D5F18 STA ANSWER B268 AD6018 LDA ANSWER+1 B26B 6D5D18 ADC NUM+1 B26E 8D6018 STA ANSWER+1 B271 :NEXT B271 0E5C18 ASL NUM ;16 BIT LEFT SHIFT B274 2E5D18 ROL NUM+1 B277 AD5E18 LDA BY ;BITS LEFT? B27A D0DD ^B259 BNE :LOOP B27C 60 RTS EPROC LIST L B27D SHOW GHOST LIST L ATARI CAMAC Assembler Ver 1.0A Page 154 D1:DIGDUG.ASM 12 X 3 MATRIX INCLUDE D3:GHOST.ASM ; GHOSTING ROUTINES 20 OCT 82 ; MODIFIED BY TRACEY 23 OCT 82, ... = 0020 INUM = $20 = 0005 ANUM = 5 = 0000 NGSW = 0 B27D GHOST B27D PROC B27D AD6318 LDA NOGHO ;CHECK DEBUGGING B280 D001 ^B283 BNE :GHOON ;SWITCH B282 60 RTS B283 :GHOON B283 A4FB LDY GHOPTR B285 A6FB LDX GHOPTR B287 AD9C1A LDA GHOCNT ; ANY GHOSTS? B28A 3054 ^B2E0 BMI :GHO1 B28C B9AC1A LDA GHOTAB,Y B28F 304F ^B2E0 BMI :GHO1 B291 B97618 LDA HITGHO,Y B294 D008 ^B29E BNE :AMEN ;I HOPE THGIS WORKS!? B296 AD9D1A LDA GHOSTOP ;DON'T REVERT IF B299 0D791A ORA PAUSE ;GHOSTS STATIONARY B29C D042 ^B2E0 BNE :GHO1 B29E :AMEN B29E DE6C18 DEC DLYTAB,X B2A1 103D ^B2E0 BPL :GHO1 B2A3 FE6C18 INC DLYTAB,X B2A6 :GHO0 B2A6 B97618 LDA HITGHO,Y ;WAS HIT BY ROCK??? B2A9 F00D ^B2B8 BEQ :CHRS2 B2AB A900 LDA #00 ;YES B2AD 997618 STA HITGHO,Y ;CLEAR THE HIT B2B0 A9FF LDA #$FF B2B2 8D8418 STA CRUSHG ;DONT MAKE A MONSTER B2B5 4CDAB2 JMP :CHRS3 B2B8 :CHRS2 B2B8 B9881A LDA VTAB,Y ;IF GHOST IN SKY, THEN B2BB C92C CMP #$2C ; REVERT IT B2BD 901B ^B2DA BCC :CHRS3 B2BF AE6218 LDX PLANUM ; WHICH PLAYER? B2C2 D006 ^B2CA BNE :MISSILE B2C4 AD241A LDA SP3PF ;CHECK FOR TUNNEL B2C7 4CD6B2 JMP :MERGE B2CA :MISSILE B2CA AD1D1A LDA SM0PF B2CD 0D1E1A ORA SM1PF B2D0 0D1F1A ORA SM2PF B2D3 0D201A ORA SM3PF B2D6 :MERGE B2D6 29FD AND #$FD ;OK TO COLLIDE W/GREEN B2D8 D006 ^B2E0 BNE :GHO1 ;IF SO, DON'T REVERT B2DA :CHRS3 ATARI CAMAC Assembler Ver 1.0A Page 155 D3:GHOST.ASM 12 X 3 MATRIX B2DA 205BB3 JSR GHOFF ; REVERT TO MONSTER B2DD 200DB4 JSR ZAP ; ERASE THE GHOST (?) B2E0 :GHO1 B2E0 20FFB2 JSR NEXGHO ; DO NEXT GHOST B2E3 A4FB LDY GHOPTR B2E5 B9AC1A LDA GHOTAB,Y ; GHOST? B2E8 1003 ^B2ED BPL :GHO3 B2EA :GHO2 B2EA 200FB3 JSR CHKNU ; NEW GHOST? B2ED :GHO3 B2ED 209CB3 JSR ANIM B2F0 200DB4 JSR ZAP B2F3 2032B4 JSR PKORFYG B2F6 B9AC1A LDA GHOTAB,Y B2F9 3003 ^B2FE BMI :GHOUT B2FB 204AB4 JSR GDRAW B2FE :GHOUT B2FE 60 RTS EPROC B2FF NEXGHO B2FF PROC B2FF EE7218 INC GCOUNT B302 AD7218 LDA GCOUNT B305 2903 AND #3 B307 85FB STA GHOPTR B309 2901 AND #1 B30B 8D6218 STA PLANUM B30E 60 RTS B30F CHKNU ; NEW GHOST? B30F A203 LDX #GHOLIM-1 B311 :CHK1 B311 BDB01A LDA NEWGHO,X B314 1006 ^B31C BPL :FNDGHO B316 CA DEX B317 10F8 ^B311 BPL :CHK1 B319 4C28B3 JMP :CHKOUT B31C :FNDGHO B31C 48 PHA B31D A9FF LDA #$FF B31F 9DB01A STA NEWGHO,X B322 68 PLA B323 2029B3 JSR ADDGHO B326 A4FB LDY GHOPTR B328 :CHKOUT B328 60 RTS EPROC B329 ADDGHO B329 PROC B329 99AC1A STA GHOTAB,Y B32C AA TAX B32D A920 LDA #INUM B32F 996C18 STA DLYTAB,Y B332 BD8518 LDA PFFLAG,X ATARI CAMAC Assembler Ver 1.0A Page 156 D3:GHOST.ASM 12 X 3 MATRIX B335 996418 STA PFTABL,Y ; SET POOKA/FYGAR B338 BC9D18 LDY HPOKAP,X ; CONVERT MONSTER B33B BD9518 LDA LPOKAP,X ; COORDS TO PLAYER B33E 20A4B1 JSR CVTSTP ; COORDS B341 A6FB LDX GHOPTR B343 9D881A STA VTAB,X B346 98 TYA B347 9D841A STA HTAB,X B34A A4FB LDY GHOPTR B34C A900 LDA #00 B34E 99981A STA CORHIR,Y B351 99901A STA CORHIL,Y B354 99941A STA CORLOR,Y B357 998C1A STA CORLOL,Y B35A 60 RTS B35B GHOFF B35B BEAC1A LDX GHOTAB,Y B35E 8E7418 STX MNSNUM B361 A9FF LDA #$FF B363 99AC1A STA GHOTAB,Y B366 A6FB LDX GHOPTR ;***********CHRIS WAS HERE******* B368 AD8418 LDA CRUSHG B36B F00B ^B378 BEQ :HARRY B36D A900 LDA #00 B36F 8D8418 STA CRUSHG B372 CE9C1A DEC GHOCNT B375 4C93B3 JMP :EXIT B378 :HARRY ;************TOHERE************** B378 BC841A LDY HTAB,X B37B BD881A LDA VTAB,X B37E 29FE AND #$FE ;FORCE EVEN SCAN LINE B380 20FAB1 JSR CVTPTS B383 AE7418 LDX MNSNUM B386 9D9518 STA LPOKAP,X B389 98 TYA B38A 9D9D18 STA HPOKAP,X B38D 8A TXA B38E A6FB LDX GHOPTR B390 9DB41A STA OLDGHO,X B393 :EXIT B393 A900 LDA #0 B395 9D841A STA HTAB,X B398 9D881A STA VTAB,X B39B 60 RTS EPROC B39C ANIM B39C PROC B39C CE7318 DEC ACLOK B39F 3002 ^B3A3 BMI :AN1 B3A1 D01B ^B3BE BNE :AOUT B3A3 :AN1 ATARI CAMAC Assembler Ver 1.0A Page 157 D3:GHOST.ASM 12 X 3 MATRIX B3A3 A905 LDA #ANUM B3A5 8D7318 STA ACLOK B3A8 B96818 LDA ASWTAB,Y B3AB 4901 EOR #1 B3AD 996818 STA ASWTAB,Y B3B0 AD9D1A LDA GHOSTOP ;IF GHOSTOP SET, OR B3B3 0D791A ORA PAUSE ;PAUSE MODE, THEN B3B6 D006 ^B3BE BNE :AOUT ;GHOSTS DON'T MOVE B3B8 20BFB3 JSR HMOVE B3BB 20F0B3 JSR VMOVE B3BE :AOUT B3BE 60 RTS EPROC B3BF HMOVE B3BF PROC B3BF B9841A LDA HTAB,Y B3C2 F02B ^B3EF BEQ :HMOUT B3C4 B99E1A LDA GTOGGLE,Y ;SEE IF GHOST MOVES 1 OR 2 PIXELS B3C7 4901 EOR #01 B3C9 999E1A STA GTOGGLE,Y B3CC 18 CLC B3CD 6901 ADC #01 B3CF 8DA21A STA LOMOVE ;EITHER 1 OR 2 B3D2 0A ASL A ;DOULBLE A B3D3 8DA31A STA HIMOVE ;EITHER 2 OR 4 B3D6 B9841A LDA HTAB,Y B3D9 CD401A CMP HCHASE B3DC 9004 ^B3E2 BCC :HM0 B3DE 38 SEC B3DF EDA31A SBC HIMOVE ;EITHERE 2 OR 4 B3E2 :HM0 B3E2 18 CLC B3E3 6DA21A ADC LOMOVE ;EITHER 1 OR 2 B3E6 C934 CMP #[HOROFF+5] B3E8 B002 ^B3EC BCS *+4 B3EA A934 LDA #[HOROFF+5] B3EC 99841A STA HTAB,Y B3EF :HMOUT B3EF 60 RTS B3F0 VMOVE B3F0 B9881A LDA VTAB,Y B3F3 F017 ^B40C BEQ :SKIPVT B3F5 38 SEC B3F6 B9881A LDA VTAB,Y B3F9 E903 SBC #3 B3FB CD411A CMP VCHASE B3FE B003 ^B403 BCS :VM0 B400 18 CLC B401 6906 ADC #6 B403 :VM0 B403 C9F8 CMP #[$FF-GHOLEN+1] B405 9002 ^B409 BCC *+4 B407 A9F8 LDA #[$FF-GHOLEN+1] B409 99881A STA VTAB,Y B40C :SKIPVT ATARI CAMAC Assembler Ver 1.0A Page 158 D3:GHOST.ASM 12 X 3 MATRIX B40C 60 RTS EPROC B40D ZAP B40D PROC B40D AE6218 LDX PLANUM B410 D005 ^B417 BNE :MISSILE B412 A91F LDA #HIGH PLAY3 B414 4C19B4 JMP :MERGE B417 :MISSILE B417 A91B LDA #HIGH PLAY4 B419 :MERGE B419 858B STA PADRH B41B BD7018 LDA ZAPGHO,X B41E 858A STA PADR B420 A900 LDA #0 B422 A007 LDY #GHOLEN-1 B424 :ZAP1 B424 918A STA (PADR),Y B426 88 DEY B427 10FB ^B424 BPL :ZAP1 B429 A4FB LDY GHOPTR B42B B9881A LDA VTAB,Y B42E 9D7018 STA ZAPGHO,X B431 60 RTS EPROC B432 PKORFYG B432 PROC B432 B96418 LDA PFTABL,Y B435 18 CLC B436 6901 ADC #1 B438 0A ASL A B439 18 CLC B43A 796818 ADC ASWTAB,Y B43D 0A ASL A B43E AA TAX B43F BD4585 LDA GHTAB,X B442 858C STA GADR B444 BD4685 LDA GHTAB+1,X B447 858D STA GADRH B449 60 RTS B44A GDRAW B44A B9881A LDA VTAB,Y B44D 858A STA PADR B44F B9841A LDA HTAB,Y B452 A8 TAY B453 AE6218 LDX PLANUM B456 D006 ^B45E BNE :MISSILE B458 8C03D0 STY HPOSP3 B45B 4C70B4 JMP :MERGE B45E :MISSILE B45E 8C07D0 STY HPOSM3 B461 C8 INY B462 C8 INY B463 8C06D0 STY HPOSM2 ATARI CAMAC Assembler Ver 1.0A Page 159 D3:GHOST.ASM 12 X 3 MATRIX B466 C8 INY B467 C8 INY B468 8C05D0 STY HPOSM1 B46B C8 INY B46C C8 INY B46D 8C04D0 STY HPOSM0 B470 :MERGE B470 A007 LDY #GHOLEN-1 B472 :GDR1 B472 B18C LDA (GADR),Y B474 918A STA (PADR),Y B476 88 DEY B477 10F9 ^B472 BPL :GDR1 B479 60 RTS EPROC LIST L B47A SHOW REVERT LIST L INCLUDE D3:REVERT.ASM ;REVERT.ASM ;---------- ;THIS FILE CONTAINS ROUTINES TO ;FINISH THE REVERSION FROM GHOST ;BACK TO MONSTER. = 0000 HEAD = 0 = 0001 FEET = 1 B47A REVERT B47A PROC B47A A003 LDY #GHOLIM-1 B47C :FIND B47C BEB41A LDX OLDGHO,Y B47F 1003 ^B484 BPL :REVIT B481 4CCBB4 JMP :NEXT B484 :REVIT B484 98 TYA B485 48 PHA B486 A900 LDA #HEAD ;TEST HEAD POSITION B488 20D2B4 JSR CHECK B48B A901 LDA #FEET ;TEST FEET POSITION B48D 20D2B4 JSR CHECK B490 :POSOK B490 A904 LDA #04 ;START AT PH=4 B492 9DBD18 STA POOPHASE,X B495 A900 LDA #0 B497 8DA91A STA CONSIDER B49A 20CEA1 JSR PCONTROL ;GET NEW DIRECTION B49D A9FF LDA #$FF B49F 8DA91A STA CONSIDER B4A2 A918 LDA #$18 B4A4 9DC518 STA HOWMANY,X B4A7 A900 LDA #0 B4A9 9DCE18 STA BBBFLAG,X ATARI CAMAC Assembler Ver 1.0A Page 160 D3:REVERT.ASM 12 X 3 MATRIX B4AC 2057A7 JSR PIFFY B4AF A8 TAY B4B0 B97FA1 LDA PFDATL,Y B4B3 9DA518 STA SAVEPP,X B4B6 B982A1 LDA PFDATH,Y B4B9 9DAD18 STA HSAVEPP,X B4BC A9FF LDA #MNSTON B4BE 9D8D18 STA MNSTEN,X B4C1 68 PLA B4C2 A8 TAY B4C3 A9FF LDA #$FF B4C5 99B41A STA OLDGHO,Y B4C8 CE9C1A DEC GHOCNT B4CB :NEXT B4CB 88 DEY B4CC 3003 ^B4D1 BMI :QUIT B4CE 4C7CB4 JMP :FIND B4D1 :QUIT B4D1 60 RTS EPROC B4D2 CHECK B4D2 PROC B4D2 8D1A1A STA HEDFET ;HEAD OR FEET TEST B4D5 :RETEST B4D5 AD1A1A LDA HEDFET B4D8 D00D ^B4E7 BNE :FET B4DA BD9518 LDA LPOKAP,X B4DD 85B2 STA REVCHK B4DF BD9D18 LDA HPOKAP,X B4E2 85B3 STA REVCHK+1 B4E4 4CF6B4 JMP :GOGO B4E7 :FET B4E7 18 CLC B4E8 BD9518 LDA LPOKAP,X B4EB 69B8 ADC #LOW [11*40] B4ED 85B2 STA REVCHK B4EF BD9D18 LDA HPOKAP,X B4F2 6901 ADC #HIGH [11*40] B4F4 85B3 STA REVCHK+1 B4F6 :GOGO B4F6 A000 LDY #0 B4F8 8C191A STY BYTEOK B4FB B1B2 LDA (REVCHK),Y ;BYTE 1 B4FD 293F AND #$3F B4FF F007 ^B508 BEQ :BYTE2 B501 29AA AND #$AA B503 D003 ^B508 BNE :BYTE2 B505 EE191A INC BYTEOK B508 :BYTE2 B508 C8 INY B509 B1B2 LDA (REVCHK),Y ;BYTE 2 ATARI CAMAC Assembler Ver 1.0A Page 161 D3:REVERT.ASM 12 X 3 MATRIX B50B 29FC AND #$FC B50D F00C ^B51B BEQ :CHK1 B50F 29AA AND #$AA B511 D008 ^B51B BNE :CHK1 B513 AD191A LDA BYTEOK B516 0902 ORA #2 B518 8D191A STA BYTEOK B51B :CHK1 B51B AD191A LDA BYTEOK B51E F04A ^B56A BEQ :OK ;IF 0, NO ADJUSTMENT B520 C901 CMP #1 B522 D00B ^B52F BNE :CHK2 B524 FE9518 INC LPOKAP,X ;IF 1, TOO FAR TO B527 D003 ^B52C BNE :10 ;LEFT B529 FE9D18 INC HPOKAP,X B52C 4CD5B4 :10 JMP :RETEST B52F :CHK2 B52F C902 CMP #2 B531 D010 ^B543 BNE :CHK3 B533 DE9518 DEC LPOKAP,X ;IF 2, TOO FAR TO B536 BD9518 LDA LPOKAP,X ;RIGHT B539 C9FF CMP #$FF B53B D003 ^B540 BNE :20 B53D DE9D18 DEC HPOKAP,X B540 4CD5B4 :20 JMP :RETEST B543 :CHK3 B543 AD1A1A LDA HEDFET B546 D011 ^B559 BNE :FEET B548 18 CLC B549 BD9518 LDA LPOKAP,X B54C 6928 ADC #40 B54E 9D9518 STA LPOKAP,X B551 9003 ^B556 BCC :30 B553 FE9D18 INC HPOKAP,X B556 4CD5B4 :30 JMP :RETEST B559 :FEET B559 38 SEC B55A BD9518 LDA LPOKAP,X B55D E928 SBC #40 B55F 9D9518 STA LPOKAP,X B562 B003 ^B567 BCS :40 B564 DE9D18 DEC HPOKAP,X B567 4CD5B4 :40 JMP :RETEST B56A :OK B56A 60 RTS EPROC LIST L B56B SHOW DIGGIT LIST L INCLUDE D3:DIGGIT.ASM = 000F MFOREVER = $0F ; * * ; * INITIALIZATION * ; * SUBROUTINE * ; ;THIS SUBROUTINE SHOULD BE EXECUTED ATARI CAMAC Assembler Ver 1.0A Page 162 D3:DIGGIT.ASM 12 X 3 MATRIX ;IN MAINLINE DURING PROGRAM ;INITIALIZATION AND IS AN INTEGRAL ;PART OF THIS MUSIC/SOUND GENERATOR. B56B MUNIT B56B PROC B56B A900 LDA #0 B56D 8D08D2 STA AUDCTL B570 A203 LDX #3 B572 :LOOPX B572 A900 LDA #0 B574 9D9B19 STA SNSTAT,X B577 A9FF LDA #$FF B579 9D7F19 STA VTUNE,X B57C CA DEX B57D 10F3 ^B572 BPL :LOOPX B57F 60 RTS B580 PROC ; ; *** THE MUSIC BOX *** ; ;THIS MUSIC/SOUND GENERATOR WAS ;DESIGNED TO RUN DURING ;THE VERTICAL BLANK PERIOD AND ;DEPENDS UPON IT FOR TIMING. ; ;THERE ARE TWO SUBROUTINES TO THIS ;MODULE. ; ; I. THE COMMAND PROCESSING ROUTINE ; ALLOWS THE CALLING PROGRAM TO: ; ; A. INITIATE THE PLAYING OF A ; TUNE ; B. INTERRUPT A TUNE THAT IS ; ALREADY PLAYING ; C. CONTINUE AN INTERRUPTED TUNE ; D. TERMINATE A TUNE THAT IS ; PLAYING ; ; ; TWO 1-BYTE ARGUMENTS MUST BE ; PASSED TO THE SUBROUTINE: ; ; 1) THE X-REGISTER SHOULD CONTAIN ; THE TUNE I.D.# (THE POSITION ; OF THE TUNE PARAMETER ; TABLE ADDRESS IN THE MASTER ; INDEX "MTAB" ) ; ; 2) THE ACCUMULATOR SHOULD ; CONTAIN THE COMMAND CODE AS ; FOLLOWS: ; ; $80=START FROM THE BEGINNING ; ATARI CAMAC Assembler Ver 1.0A Page 163 D3:DIGGIT.ASM 12 X 3 MATRIX ; $40=INTERRUPT THE TUNE ; ; $20=CONTINUE THE TUNE ; ; $00=STOP THE TUNE ; ; ; ; II. THE PLAY SUBROUTINE IS SELF ; CONTAINED TO PLAY MUSIC/SOUNDS ; THAT WERE PREVIOUSLY INITIATED ; THROUGH THE COMMAND PROCESSOR ; ROUTINE. ; IT MUST BE CALLED EVERY VBLANK ; NO ARGUMENTS ARE PASSED. ; WHEN A TUNE/SOUND HAS RUN ITS ; COURSE THE TUNE IS REMOVED ; FROM THE VOICE TABLE AND THE ; STATUS BYTES FOR THE AFFECTED ; VOICES ARE UPDATED B580 MUSICK B580 PROC ; LDR MUSICK ;IF TUNEND/=0 AND ; SNSTAT(3)/=0 THEN GOTO PLAYIT ;ENDIF B580 AD801A LDA TUNEND B583 F008 ^B58D BEQ :TUNORM ;DO IT MISSIONARY WAY B585 AD9E19 LDA SNSTAT+3 B588 F003 ^B58D BEQ :TUNORM B58A 4C0CB6 JMP :PLAYIT B58D :TUNORM ;X:=OTUNE:=NTUNE ;IF NTIME/=0 THEN ; IF NTUNE/=BACKGR OR ; IFLAGT=0 THEN ; INC NTIME ; A:=$80 ; GOTO CONIT ; ELSE ; IFLAGT:=NTIME:=0 ; A:=$20 ; GOTO CONIT ; ENDIF ;ENDIF B58D AD6A19 LDA NTIME ;IS IT NEXT TIME YET? B590 F024 ^B5B6 BEQ :BEYON1 B592 A5F6 LDA NTUNE B594 85F7 STA OTUNE B596 AA TAX B597 CD4219 CMP BACKGR ATARI CAMAC Assembler Ver 1.0A Page 164 D3:DIGGIT.ASM 12 X 3 MATRIX B59A D005 ^B5A1 BNE :NOINT B59C AD7F1A LDA IFLAGT B59F D008 ^B5A9 BNE :RESUME B5A1 :NOINT B5A1 EE6A19 INC NTIME ;ZERO NTIME B5A4 A980 LDA #$80 B5A6 4C09B6 JMP :CONIT ;NOW PLAY THIS TUNE B5A9 :RESUME B5A9 A900 LDA #00 B5AB 8D7F1A STA IFLAGT B5AE 8D6A19 STA NTIME B5B1 A920 LDA #$20 B5B3 4C09B6 JMP :CONIT B5B6 :BEYON1 ;IF NTUNE=OTUNE THEN GOTO PLAYIT ;ENDIF B5B6 A5F6 LDA NTUNE B5B8 C5F7 CMP OTUNE ;IS NEW = OLD? B5BA F050 ^B60C BEQ :PLAYIT ;SHOULD TUNE BE SOLO? B5BC :CSOLO ;CASE NTUNE OF ; [18]: ; IF OTUNE=BACKGR THEN ; NTIME:=IFLAGT:=$FF ; X:=OTUNE ; A:=$40 ; GOTO CONIT ; FALL THROUGH ; [0,1,3,4,5,8,17,21]: ; NTIME:=$FF ; X:=OTUNE ; A:=0 ; GOTO CONIT ; [9]: ; BACKGR:=17 ; FALL THROUGH ; [6]: ; TUNEND:=$FF ; JSR SPECIAL ; GOTO CONIT ; ELSE ; X:=NTUNE ; NTUNE:=OTUNE ; A:=$80 ; GOTO CONIT ;ENDCASE B5BC A8 TAY B5BD 18 CLC B5BE B91EB6 LDA CASETAB,Y B5C1 69D0 ADC #LOW :CASES B5C3 8D5C1A STA CASE ATARI CAMAC Assembler Ver 1.0A Page 165 D3:DIGGIT.ASM 12 X 3 MATRIX B5C6 A900 LDA #0 B5C8 69B5 ADC #HIGH :CASES B5CA 8D5D1A STA CASE+1 B5CD 6C5C1A JMP (CASE) B5D0 :CASES B5D0 :NT18 B5D0 A5F7 LDA OTUNE ;MUST INTERUPRT#21 B5D2 CD4219 CMP BACKGR B5D5 D00E ^B5E5 BNE :TUNOFF B5D7 AA TAX ;TUNE IN X B5D8 A9FF LDA #$FF ;SET NEXT TIME B5DA 8D6A19 STA NTIME B5DD 8D7F1A STA IFLAGT ;INTERUPTED TUNE FLAG B5E0 A940 LDA #$40 B5E2 4C09B6 JMP :CONIT B5E5 :TUNOFF B5E5 A9FF LDA #$FF ;SET UP FOR NEXT TIME B5E7 8D6A19 STA NTIME B5EA A900 LDA #00 ;TURN OFF OLD TUNE B5EC A6F7 LDX OTUNE B5EE 4C09B6 JMP :CONIT B5F1 :NT9 B5F1 A911 LDA #17 B5F3 8D4219 STA BACKGR B5F6 :NT6 B5F6 A9FF LDA #$FF B5F8 8D801A STA TUNEND B5FB 2010B6 JSR SPECIAL B5FE 4C09B6 JMP :CONIT B601 :NOSOLO B601 A6F6 LDX NTUNE B603 A5F7 LDA OTUNE B605 85F6 STA NTUNE B607 A980 LDA #$80 B609 :CONIT B609 2034B6 JSR SCMND ;SET UP CONTROLS B60C :PLAYIT B60C 2076B6 JSR PLAY ;PLAY THE TUNE B60F 60 RTS B610 SPECIAL B610 A900 LDA #00 B612 A6F7 LDX OTUNE ;OUT WITH THE OLD B614 2034B6 JSR SCMND B617 A980 LDA #$80 ;IN WITH THE NEW B619 A6F6 LDX NTUNE ;(THIS PROGRAM IS A B61B 86F7 STX OTUNE ;CLICHE') B61D 60 RTS B61E CASETAB ATARI CAMAC Assembler Ver 1.0A Page 166 D3:DIGGIT.ASM 12 X 3 MATRIX B61E 15 DB :TUNOFF-:CASES ;TUNE 0 B61F 15 DB :TUNOFF-:CASES ;TUNE 1 B620 31 DB :NOSOLO-:CASES ;TUNE 2 B621 15 DB :TUNOFF-:CASES ;TUNE 3 B622 15 DB :TUNOFF-:CASES ;TUNE 4 B623 15 DB :TUNOFF-:CASES ;TUNE 5 B624 26 DB :NT6-:CASES ;TUNE 6 B625 31 DB :NOSOLO-:CASES ;TUNE 7 B626 15 DB :TUNOFF-:CASES ;TUNE 8 B627 21 DB :NT9-:CASES ;TUNE 9 B628 31 DB :NOSOLO-:CASES ;TUNE 10 B629 31 DB :NOSOLO-:CASES ;TUNE 11 B62A 31 DB :NOSOLO-:CASES ;TUNE 12 B62B 31 DB :NOSOLO-:CASES ;TUNE 13 B62C 31 DB :NOSOLO-:CASES ;TUNE 14 B62D 31 DB :NOSOLO-:CASES ;TUNE 15 B62E 26 DB :NT6-:CASES ;TUNE 16 B62F 15 DB :TUNOFF-:CASES ;TUNE 17 B630 00 DB :NT18-:CASES ;TUNE 18 B631 31 DB :NOSOLO-:CASES ;TUNE 19 B632 31 DB :NOSOLO-:CASES ;TUNE 20 B633 15 DB :TUNOFF-:CASES ;TUNE 21 EPROC ; * * ; * COMMAND PROCESSOR * ; * * B634 SCMND B634 PROC ; LDR SCMND B634 C980 CMP #$80 B636 F02D ^B665 BEQ :ACTIV B638 8DA319 STA CMND ;SAVE COMMAND # B63B 8A TXA ;SAVE TUNE # B63C A203 LDX #3 B63E :CLOOP B63E 48 PHA ;SEARCH VOICE TABLE FOR TUNE # B63F DD7F19 CMP VTUNE,X B642 D01C ^B660 BNE :NEXT B644 ADA319 LDA CMND ;ACTION DIFFERS WITH B647 :INTER B647 C940 CMP #$40 ;COMMAND B649 D007 ^B652 BNE :CONTIN B64B 206AB6 JSR :VOFF ;TURN OFF VOICE B64E A940 LDA #$40 ;INSERT INTERRUPT B650 D006 ^B658 BNE :STAT ;STATUS FOR VOICE B652 :CONTIN B652 C920 CMP #$20 B654 D007 ^B65D BNE :TOFF B656 A980 LDA #$80 ;SET STATUS TO PLAY ATARI CAMAC Assembler Ver 1.0A Page 167 D3:DIGGIT.ASM 12 X 3 MATRIX B658 :STAT B658 9D9B19 STA SNSTAT,X B65B D003 ^B660 BNE :NEXT ;(STATUS NEVER 0!) B65D :TOFF B65D 2001B8 JSR :DONE ;TURN IT OFF B660 :NEXT B660 68 PLA B661 CA DEX B662 10DA ^B63E BPL :CLOOP B664 60 RTS B665 :ACTIV B665 8A TXA B666 208BB6 JSR :SOUND B669 60 RTS ;TURN OFF VOICE ROUTINE B66A :VOFF B66A 8A TXA ;DOUBLE VOICE # B66B 0A ASL A B66C A8 TAY B66D A900 LDA #0 B66F 9900D2 STA AUDF1,Y ;TURN OFF VOICE B672 9901D2 STA AUDC1,Y B675 60 RTS ; ********************* ; * * ; * PLAY MODULE * ; * * ; ********************* B676 PLAY ; LDR PLAY B676 A203 LDX #3 ;CHECK ALL 4 VOICES B678 86AF STX QSCNT B67A :DOIT B67A A6AF LDX QSCNT B67C BD9B19 LDA SNSTAT,X B67F C980 CMP #$80 B681 D003 ^B686 BNE :DX5 ;IF NOT ACTIVE PASS B683 20F0B6 JSR :SOUN0 ;GO PLAY B686 :DX5 B686 C6AF DEC QSCNT B688 10F0 ^B67A BPL :DOIT B68A 60 RTS ;************************************ ; ; ; SET UP TO PLAY TUNE/SOUND ; ; ACCUMULATOR = TUNE # ATARI CAMAC Assembler Ver 1.0A Page 168 D3:DIGGIT.ASM 12 X 3 MATRIX ;;;;SOUND REVISED BY TMS B68B :SOUND B68B 85AC STA QTEMB4 ;SAVE TUNE # B68D 0A ASL A ;DOUBLE IT B68E A8 TAY B68F B9EDB8 LDA MTAB,Y ;GET PARM TABLE ADDR ;FROM MASTER INDEX B692 85A8 STA QTEMP1 B694 B9EEB8 LDA MTAB+1,Y B697 85A9 STA QTEMP1+1 ;GET TUNE/SOUND PARMS FROM TABLE B699 A000 LDY #0 B69B B1A8 LDA (QTEMP1),Y ;GET VOICE #S FROM ;2-BIT BYTE ARRAY B69D 85AA STA QTEMB2 B69F :LOOP B69F A900 LDA #0 B6A1 06AA ASL QTEMB2 ;SHIFT OUT VOICE # B6A3 2A ROL A B6A4 06AA ASL QTEMB2 B6A6 2A ROL A ;GOT VOICE # B6A7 85AB STA QTEMB3 B6A9 AA TAX B6AA C8 INY B6AB 18 CLC B6AC B1A8 LDA (QTEMP1),Y B6AE 65A8 ADC QTEMP1 B6B0 9D6B19 STA STARTL,X ;ADDR. WHERE IND'L ;VOICE PARAMETERS B6B3 85A6 STA QTEMP B6B5 A900 LDA #0 ;FOR THIS VOICE B6B7 65A9 ADC QTEMP1+1 B6B9 9D6F19 STA STARTH,X B6BC 85A7 STA QTEMP+1 B6BE 98 TYA ;SAVE PARM TABLE PTR B6BF 48 PHA B6C0 38 SEC B6C1 A5A6 LDA QTEMP ;BACKUP 1 TO GET ;PATTERN COUNT B6C3 E901 SBC #1 B6C5 85A6 STA QTEMP B6C7 A5A7 LDA QTEMP+1 B6C9 E900 SBC #0 B6CB 85A7 STA QTEMP+1 B6CD A000 LDY #0 B6CF B1A6 LDA (QTEMP),Y B6D1 9D7B19 STA MPPTR,X ;SAVE PATTERN COUNTER B6D4 20BBB7 JSR :INIM ;GO TO INIT ROUTINES B6D7 20EDB7 JSR :INIM2 B6DA A980 LDA #$80 B6DC 9D9B19 STA SNSTAT,X ;SET STATUS TO PLAY B6DF A901 LDA #1 ;SET UP TO BEGIN FOR ;PLAY ROUTINE ATARI CAMAC Assembler Ver 1.0A Page 169 D3:DIGGIT.ASM 12 X 3 MATRIX B6E1 9D8F19 STA MTIME,X B6E4 A5AC LDA QTEMB4 B6E6 9D7F19 STA VTUNE,X ;SAVE TUNE NUMBER IN ;VOICE TABLE B6E9 68 PLA B6EA A8 TAY ;RETRIEVE PARAMETER ;TABLE POINTER B6EB A5AA LDA QTEMB2 ;ALL SHIFTED OUT? B6ED D0B0 ^B69F BNE :LOOP ;IF NO, ANOTHER VOICE B6EF 60 RTS ;************************************ ; ; SOUND GENERATOR X-REG = VOICE B6F0 :SOUN0 B6F0 DE8F19 DEC MTIME,X ;COUNT DOWN TIMER B6F3 F01E ^B713 BEQ :SOUN1 ;GO IF TIME FOR A ;NEW TONE B6F5 BD8B19 LDA DCY,X ;TIMEOUT TO BEGIN ;DECAY B6F8 F005 ^B6FF BEQ :B2 ;IF ITS TIME THEN GO B6FA DE8B19 DEC DCY,X ;ELSE DECREMENT TIMER B6FD 1013 ^B712 BPL :LEAVE ;AND LEAVE B6FF :B2 B6FF BD8719 LDA VOL,X ;DECAY HERE B702 290F AND #$0F ;UNLESS 0 VOL B704 F00C ^B712 BEQ :LEAVE B706 DE8719 DEC VOL,X ;REDUCE VOLUME B709 8A TXA ;DOUBLE VOICE # B70A 0A ASL A B70B A8 TAY B70C BD8719 LDA VOL,X ;INSERT NEW VOLUME B70F 9901D2 STA AUDC1,Y B712 :LEAVE B712 60 RTS ;INITIALIZE NEW TONE ;;;;SOUN1 REVISED BY TMS B713 :SOUN1 B713 8A TXA ;SAVE VOICE # B714 85B0 STA QXSAV1 B716 0A ASL A B717 85B1 STA QXSAV2 ;SAVE TWICE VOICE # B719 BD7319 LDA MELCNT,X ;ANY MORE ELEMENTS ;OF PATTERN? B71C D010 ^B72E BNE :A1 ;YES- THEN CONTINUE B71E BD7719 LDA MREPCNT,X ;ANY REPET'NS LEFT? B721 D06B ^B78E BNE :NXRP ;YES- SET IT UP B723 BD7B19 LDA MPPTR,X ;ANY PATTERNS LEFT B726 F003 ^B72B BEQ OHGOD ;YES- SET IT UP B728 4C9EB7 JMP :CON22 B72B OHGOD B72B 4C01B8 JMP :DONE ;OR ELSE WE'RE DONE ;WITH THIS VOICE ATARI CAMAC Assembler Ver 1.0A Page 170 D3:DIGGIT.ASM 12 X 3 MATRIX B72E :A1 B72E BD9319 LDA CURPSL,X ;SOUND DATA POINTER ;FOR THIS VOICE B731 85AD STA QSNAD B733 BD9719 LDA CURPSH,X B736 85AE STA QSNAD+1 B738 A900 LDA #00 B73A 8D08D2 STA $D208 B73D A903 LDA #03 B73F 8D0FD2 STA $D20F B742 A903 LDA #03 B744 8D3202 STA $232 B747 A000 LDY #0 B749 B1AD LDA (QSNAD),Y B74B A6B1 LDX QXSAV2 B74D 9D00D2 STA AUDF1,X ;LOAD FREQUENCY B750 A6B0 LDX QXSAV1 B752 BD9F19 LDA MCONST,X ;CONSTANT TIMING? B755 D003 ^B75A BNE :GOTTIME ;IF SO, SKIP B757 C8 INY B758 B1AD LDA (QSNAD),Y ;GET TIMING DATA B75A :GOTTIME B75A 48 PHA ;SAVE FOR LATER B75B 290F AND #$0F ;GRAB DECAY DELAY B75D 9D8B19 STA DCY,X B760 D005 ^B767 BNE :B3 ;IF NOT ZERO GO SET ;UP DELAY B762 9D8719 STA VOL,X ;IF ZERO, THEN THIS ;IS SILENT INTERVAL B765 F006 ^B76D BEQ :B4 B767 :B3 B767 BD8319 LDA XVOL,X ;GET VOLUME DATA B76A 9D8719 STA VOL,X ;USE IT FOR THIS TONE B76D :B4 B76D A6B1 LDX QXSAV2 B76F 9D01D2 STA AUDC1,X ;NOW INSERT IN HW REG B772 A6B0 LDX QXSAV1 B774 18 CLC B775 C8 INY B776 98 TYA B777 7D9319 ADC CURPSL,X ;ADVANCE POINTER B77A 9D9319 STA CURPSL,X B77D 9003 ^B782 BCC :OK B77F FE9719 INC CURPSH,X B782 :OK B782 68 PLA ;RETRIEVE TIMING DATA B783 4A LSR A ;GET FULL TIME VALUE B784 4A LSR A ;FROM LEFT NYBLE B785 4A LSR A B786 4A LSR A B787 9D8F19 STA MTIME,X ;STORE TIME B78A DE7319 DEC MELCNT,X ;DECR ELEMENT CNTR B78D 60 RTS ;YES! PATTERN COMPLETE. ATARI CAMAC Assembler Ver 1.0A Page 171 D3:DIGGIT.ASM 12 X 3 MATRIX ;SHOULD WE REPEAT IT?? B78E :NXRP B78E BD7719 LDA MREPCNT,X ;THIS "FOREVER" B791 C90F CMP #MFOREVER ; TUNE? B793 F003 ^B798 BEQ :FOREVER B795 DE7719 DEC MREPCNT,X ;DECR REPET'N CNTR B798 :FOREVER B798 20BBB7 JSR :INIM ;RESTART PATTERN B79B 4C2EB7 JMP :A1 ;AND GO PLAY ;;;;CON22 REVISED BY TMS B79E :CON22 B79E DE7B19 DEC MPPTR,X B7A1 BD6B19 LDA STARTL,X ;SET NEW PATTERN B7A4 18 CLC B7A5 6904 ADC #4 B7A7 9D6B19 STA STARTL,X B7AA BD6F19 LDA STARTH,X B7AD 6900 ADC #0 B7AF 9D6F19 STA STARTH,X B7B2 20BBB7 JSR :INIM B7B5 20EDB7 JSR :INIM2 B7B8 4C2EB7 JMP :A1 ; ;INITIALIZATION ROUTINES ;;;;INIM & INIM2 REVISED BY TMS B7BB :INIM B7BB BD6B19 LDA STARTL,X ;GET PRMS FROM TABLE B7BE 85A6 STA QTEMP B7C0 BD6F19 LDA STARTH,X B7C3 85A7 STA QTEMP+1 B7C5 18 CLC B7C6 A000 LDY #0 B7C8 B1A6 LDA (QTEMP),Y B7CA 85AD STA QSNAD ;POINT TO CONSTANT B7CC 6901 ADC #1 B7CE 9D9319 STA CURPSL,X ;INITIALIZE TUNE ;DATA TABLE POINTER B7D1 C8 INY B7D2 B1A6 LDA (QTEMP),Y B7D4 85AE STA QSNAD+1 B7D6 6900 ADC #0 B7D8 9D9719 STA CURPSH,X B7DB 98 TYA B7DC 48 PHA B7DD A000 LDY #0 B7DF B1AD LDA (QSNAD),Y ;GET PATTERN'S B7E1 9D9F19 STA MCONST,X ;CONSTANT TIMING B7E4 68 PLA B7E5 A8 TAY B7E6 C8 INY B7E7 B1A6 LDA (QTEMP),Y ATARI CAMAC Assembler Ver 1.0A Page 172 D3:DIGGIT.ASM 12 X 3 MATRIX B7E9 9D7319 STA MELCNT,X ;INIT ELEMENT CNTR B7EC 60 RTS B7ED :INIM2 B7ED C8 INY B7EE B1A6 LDA (QTEMP),Y B7F0 4A LSR A ;EXTRACT HIGH NIB B7F1 4A LSR A B7F2 4A LSR A B7F3 4A LSR A B7F4 9D7719 STA MREPCNT,X ;INIT REP'N COUNTER B7F7 B1A6 LDA (QTEMP),Y B7F9 290F AND #$0F ;MASK OUT HIGH NIBBLE B7FB 09A0 ORA #$A0 ;INSERT DISTORTION B7FD 9D8319 STA XVOL,X ;GET VOLUME AND ;DISTORTION FOR THIS ;PATTERN B800 60 RTS B801 :DONE B801 A900 LDA #0 ;TURN OF SOUND FOR ;VOICE X B803 9D9B19 STA SNSTAT,X B806 A9FF LDA #$FF B808 9D7F19 STA VTUNE,X B80B 206AB6 JSR :VOFF B80E OUT B80E 60 RTS EPROC LIST L B80F SHOW MISC LIST L INCLUDE D1:MISC.ASM ;MISC.ASM ;-------- ;MISCELLANEOUS ROUTINES. B80F RDSTCK ;READ JOYSTICK B80F 8E0D1A STX HELPME B812 A6ED LDX PERSON B814 BD7802 LDA STICK0,X B817 AE0D1A LDX HELPME B81A C900 CMP #00 B81C 60 RTS B81D RDBUTT ;READ BUTTON B81D 8E0D1A STX HELPME B820 A6ED LDX PERSON B822 BD8402 LDA STRIG0,X B825 AE0D1A LDX HELPME B828 C900 CMP #00 B82A 60 RTS B82B DELAY B82B A514 LDA $14 ATARI CAMAC Assembler Ver 1.0A Page 173 D1:MISC.ASM 12 X 3 MATRIX B82D WAITS B82D C514 CMP $14 B82F F0FC ^B82D BEQ WAITS B831 60 RTS B832 DELAYS B832 202BB8 JSR DELAY B835 202BB8 JSR DELAY B838 202BB8 JSR DELAY B83B 60 RTS B83C NOPLAY B83C PROC ;CLEAN OUT ALL THE PLAYER MUCK B83C A207 LDX #7 B83E A900 LDA #0 B840 :MUCK1 B840 9D00D0 STA HPOSP0,X ;TOSS IT OFF THE SCR B843 9D08D0 STA SIZEP0,X ;(JUST IN CASE) B846 CA DEX B847 10F7 ^B840 BPL :MUCK1 B849 A2FF LDX #$FF B84B :MUCK2 B84B 2060B8 JSR WIPE ;& THEN WIPE IT OUT B84E E8 INX B84F E004 CPX #4 B851 90F8 ^B84B BCC :MUCK2 B853 60 RTS EPROC B854 NOSOUND B854 PROC B854 A006 LDY #6 ;TURN SOUND OFF B856 A900 LDA #0 B858 :VOLOFF B858 9901D2 STA AUDC1,Y B85B 88 DEY B85C 88 DEY B85D 10F9 ^B858 BPL :VOLOFF B85F 60 RTS EPROC B860 WIPE B860 PROC B860 98 TYA B861 48 PHA B862 18 CLC ;ERASE PLAYER X B863 8A TXA ;($FF-3) B864 691C ADC #HIGH PLAY0 B866 85C6 STA WIPEIT+1 B868 A900 LDA #0 B86A 85C5 STA WIPEIT B86C A8 TAY B86D :LOOP ATARI CAMAC Assembler Ver 1.0A Page 174 D1:MISC.ASM 12 X 3 MATRIX B86D 91C5 STA (WIPEIT),Y B86F 88 DEY B870 D0FB ^B86D BNE :LOOP B872 68 PLA B873 A8 TAY B874 60 RTS EPROC B875 CONS B875 PROC B875 A900 LDA #0 B877 8D641A STA CONKEY ;ASSUME NONE PRESSED B87A :LOOP B87A A908 LDA #8 ;LOAD CONSOLE BUTTON B87C 8D1FD0 STA CONSOL B87F AD1FD0 LDA CONSOL B882 2907 AND #7 ;ONLY WANT 3 BUTTONS B884 4907 EOR #7 ;FLIP BITS B886 F00A ^B892 BEQ :QUIT ;WHEN RELEASED, QUIT B888 8D641A STA CONKEY ;SAVE BUTTON B88B A900 LDA #0 ;AND TURN OFF B88D 854D STA ATRACT ; ATTRACT MODE B88F 4C7AB8 JMP :LOOP ;AND WAIT FOR RELEASE B892 :QUIT B892 AD641A LDA CONKEY ;RESTORE LAST BUTTON B895 4907 EOR #7 B897 60 RTS EPROC LIST L B898 SHOW VBI LIST L INCLUDE D1:VBI.ASM ;VERTICAL BLANK INTERRUPT ROUTINE B898 VBI PROC ;START DLI'S FROM BEGINNING B898 A900 LDA #0 B89A 8582 STA COLIDX B89C A93D LDA #LOW DLINT B89E 8D0002 STA VDSLST B8A1 A981 LDA #HIGH DLINT B8A3 8D0102 STA VDSLST+1 ;ATTRACT COLORS B8A6 A54D LDA $4D ;ATRACT FLAG B8A8 1003 ^B8AD BPL :FORSHAME B8AA 20DEB8 JSR DAMMIT B8AD :FORSHAME ;SAVE COLLISIONS ATARI CAMAC Assembler Ver 1.0A Page 175 D1:VBI.ASM 12 X 3 MATRIX B8AD HITS B8AD A20F LDX #$0F B8AF :LOOP B8AF BD00D0 LDA M0PF,X B8B2 9D1D1A STA SM0PF,X B8B5 CA DEX B8B6 10F7 ^B8AF BPL :LOOP B8B8 8D1ED0 STA HITCLR B8BB :SKIPPY ;CALL GHOST ROUTINE!! B8BB 207DB2 JSR GHOST ;CHECK IF GAME IS CURRENTLY IN ;PAUSE STATE B8BE AD791A LDA PAUSE B8C1 F006 ^B8C9 BEQ :CONTINUE B8C3 2054B8 JSR NOSOUND ;TURN OFF SOUND B8C6 4CDBB8 JMP :SKIP ;IF PAUSED, SKIP REST B8C9 :CONTINUE ;CALL MUSIC ROUTINE!! B8C9 2080B5 JSR MUSICK ;CHECK BONUS SCORE B8CC AD081A LDA BTIMER ;TIMER OFF? B8CF F00A ^B8DB BEQ :SKIP B8D1 CE081A DEC BTIMER ;IF NOT, DECR IT B8D4 D005 ^B8DB BNE :SKIP ;WHEN IT HITS ZERO, B8D6 A901 LDA #1 ;REDISPLAY MEN WHEN B8D8 20C0AF JSR BONOFF ;TURNING BONUS OFF B8DB :SKIP B8DB 4C62E4 JMP DEFRTN EPROC ;TO SET UP THE INIT COLORS AND HANDLE ATTRACT COLORS B8DE DAMMIT B8DE A21B LDX #COLLEN-1 B8E0 :ATTRACT B8E0 BD9F81 LDA COLORS,X B8E3 454F EOR COLRSH B8E5 254E AND DRKMSK B8E7 95C9 STA ATRCOL,X B8E9 CA DEX B8EA 10F4 ^B8E0 BPL :ATTRACT B8EC 60 RTS LIST L B8ED SHOW DIGTUNE LIST L INCLUDE D3:DIGTUNE.ASM ;;;;REVISED TABLE FORMATS BY TMS ATARI CAMAC Assembler Ver 1.0A Page 176 D3:DIGTUNE.ASM 12 X 3 MATRIX = B8ED MTAB EQU * ; DIG DUG TUNES B8ED PROC B8ED :MTAB B8ED 19B91BB946 DW :TN0,:TN1,:TN2,:TN3,:TN4,:TN5 B8F9 77B984B9 DW :TN6,:TN7 B8FD 8BB99EB9AB DW :TN8,:TN9,:TN10,:TN11,:TN12 B907 06BA15BA DW :TN13,:TN14 B90B 22BA31BA46 DW :TN15,:TN16,:TN17,:TN18,:TN19 B915 61BA63BA DW :TN20,:TN21 B919 :TN0 B919 0000 DW 0 B91B :TN1 B91B 18 DB $18 B91C 050E1B DB :M1V1-:TN1,:M1V2-:TN1,:M1V3-:TN1 B91F 01 DB 1 B920 :M1V1 B920 70BA DW :T1VA B922 0C06 DB 12,$06 B924 7DBA DW :T1V1 B926 1706 DB 23,$06 B928 02 DB 2 B929 :M1V2 B929 70BA DW :T1VA B92B 0C06 DB 12,$06 B92D ACBA DW :T1V2A B92F 1F06 DB 31,$06 B931 CCBA DW :T1V2B B933 0206 DB 2,$06 B935 03 DB 3 B936 :M1V3 B936 70BA DW :T1VA B938 0C06 DB 12,$06 B93A CFBA DW :T1V3A B93C 0506 DB 5,$06 B93E DABA DW :T1V3B B940 1806 DB 24,$06 B942 CCBA DW :T1V3C B944 0206 DB 2,$06 B946 :TN2 B946 0000 DW 0 B948 :TN3 B948 10 DB $10 B949 0409 DB :M3V1-:TN3,:M3V2-:TN3 B94B 00 DB 0 B94C :M3V1 B94C F3BA DW :T3V1 B94E 0E04 DB 14,$04 B950 00 DB 0 B951 :M3V2 ATARI CAMAC Assembler Ver 1.0A Page 177 D3:DIGTUNE.ASM 12 X 3 MATRIX B951 10BB DW :T3V2 B953 0907 DB 9,$07 B955 :TN4 B955 B0 DB $B0 B956 0409 DB :M4V1-:TN4,:M4V2-:TN4 B958 00 DB 0 B959 :M4V1 B959 23BB DW :T4V1 B95B 1206 DB 18,$06 B95D 02 DB 2 B95E :M4V2 B95E 48BB DW :T4V2A B960 0906 DB 9,$06 B962 52BB DW :T4V2B B964 0106 DB 1,$06 B966 55BB DW :T4V2C B968 0A06 DB 10,$06 B96A :TN5 B96A 70 DB $70 B96B 0409 DB :M5V1-:TN5,:M5V2-:TN5 B96D 00 DB 0 B96E :M5V1 B96E 60BB DW :T5V1 B970 1D06 DB 29,$06 B972 00 DB 0 B973 :M5V2 B973 7EBB DW :T5V2 B975 1D06 DB 29,$06 B977 :TN6 B977 B0 DB $B0 B978 0409 DB :M6V1-:TN6,:M6V2-:TN6 B97A 00 DB 0 B97B :M6V1 B97B 9CBB DW :T6V1 B97D 0E06 DB 14,$06 B97F 00 DB 0 B980 :M6V2 B980 B9BB DW :T6V2 B982 1006 DB 16,$06 B984 :TN7 B984 C0 DB $C0 B985 03 DB :M7-:TN7 B986 00 DB 0 B987 :M7 B987 DABB DW :T7 B989 0706 DB 7,$06 B98B :TN8 B98B 18 DB $18 B98C 050A0F DB :M8V1-:TN8,:M8V2-:TN8,:M8V3-:TN8 B98F 00 DB 0 B990 :M8V1 B990 E9BB DW :T8V1 ATARI CAMAC Assembler Ver 1.0A Page 178 D3:DIGTUNE.ASM 12 X 3 MATRIX B992 1006 DB 16,$06 B994 00 DB 0 B995 :M8V2 B995 0ABC DW :T8V2 B997 0D06 DB 13,$06 B999 00 DB 0 B99A :M8V3 B99A 25BC DW :T8V3 B99C 0E06 DB 14,$06 B99E :TN9 B99E B0 DB $B0 B99F 0409 DB :M9V1-:TN9,:M9V2-:TN9 B9A1 00 DB 0 B9A2 :M9V1 B9A2 42BC DW :T9V1 B9A4 0426 DB 4,$26 B9A6 00 DB 0 B9A7 :M9V2 B9A7 47BC DW :T9V2 B9A9 0426 DB 4,$26 B9AB :TN10 B9AB B0 DB $B0 B9AC 0429 DB :M10V1-:TN10,:M10V2-:TN10 B9AE 08 DB 8 B9AF :M10V1 B9AF 50BC DW :T10A1 B9B1 0202 DB 2,$02 B9B3 53BC DW :T10B1 B9B5 0303 DB 3,$03 B9B7 5ABC DW :T10C1 B9B9 0105 DB 1,$05 B9BB 5DBC DW :T10D1 B9BD 0108 DB 1,$08 B9BF 60BC DW :T10E1 B9C1 030C DB 3,$0C B9C3 64BC DW :T10F1 B9C5 010A DB 1,$0A B9C7 67BC DW :T10G1 B9C9 0108 DB 1,$08 B9CB 6ABC DW :T10H1 B9CD 0106 DB 1,$06 B9CF 6DBC DW :T10I1 B9D1 0204 DB 2,$04 B9D3 03 DB 3 B9D4 :M10V2 B9D4 70BC DW :T10A2 B9D6 0202 DB 2,$02 B9D8 73BC DW :T10B2 B9DA 031A DB 3,$1A B9DC 7ABC DW :T10C2 B9DE 0407 DB 4,$07 B9E0 83BC DW :T10D2 B9E2 0103 DB 1,$03 B9E4 :TN11 ATARI CAMAC Assembler Ver 1.0A Page 179 D3:DIGTUNE.ASM 12 X 3 MATRIX B9E4 C0 DB $C0 B9E5 03 DB :M11-:TN11 B9E6 03 DB 3 B9E7 :M11 B9E7 86BC DW :T11A1 B9E9 0206 DB 2,$06 B9EB 8BBC DW :T11B1 B9ED 0306 DB 3,$06 B9EF 92BC DW :T11C1 B9F1 0306 DB 3,$06 B9F3 96BC DW :T11D1 B9F5 0606 DB 6,$06 B9F7 :TN12 B9F7 C0 DB $C0 B9F8 03 DB :M12-:TN12 B9F9 02 DB 2 B9FA :M12 B9FA A3BC DW :T12A1 B9FC 0506 DB 5,$06 B9FE AEBC DW :T12B1 BA00 0306 DB 3,$06 BA02 B2BC DW :T12C1 BA04 0706 DB 7,$06 BA06 :TN13 BA06 C0 DB $C0 BA07 03 DB :M13-:TN13 BA08 02 DB 2 BA09 :M13 BA09 BABC DW :T13A1 BA0B 0206 DB 2,$06 BA0D BDBC DW :T13B1 BA0F 0206 DB 2,$06 BA11 C0BC DW :T13C1 BA13 0106 DB 1,$06 BA15 :TN14 BA15 B0 DB $B0 BA16 0409 DB :M14V1-:TN14,:M14V2-:TN14 BA18 00 DB 0 BA19 :M14V1 BA19 C3BC DW :T14V1 BA1B 02B6 DB 2,$B6 BA1D 00 DB 0 BA1E :M14V2 BA1E C6BC DW :T14V2 BA20 1806 DB 24,$06 BA22 :TN15 BA22 C0 DB $C0 BA23 03 DB :M15-:TN15 BA24 02 DB 2 BA25 :M15 BA25 DFBC DW :T15A1 BA27 0616 DB 6,$16 BA29 DFBC DW :T15A1 ATARI CAMAC Assembler Ver 1.0A Page 180 D3:DIGTUNE.ASM 12 X 3 MATRIX BA2B 0306 DB 3,$06 BA2D ECBC DW :T15B1 BA2F 0106 DB 1,$06 BA31 :TN16 BA31 B0 DB $B0 BA32 040D DB :M16V1-:TN16,:M16V2-:TN16 BA34 01 DB 1 BA35 :M16V1 BA35 EFBC DW :T16A1 BA37 0236 DB 2,$36 BA39 F2BC DW :T16B1 BA3B 0906 DB 9,$06 BA3D 01 DB 1 BA3E :M16V2 BA3E EFBC DW :T16A2 BA40 0236 DB 2,$36 BA42 FCBC DW :T16B2 BA44 0706 DB 7,$06 BA46 :TN17 BA46 10 DB $10 BA47 0409 DB :M17V1-:TN17,:M17V2-:TN17 BA49 00 DB 0 BA4A :M17V1 BA4A 0BBD DW :T17V1 BA4C 40F5 DB 64,[MFOREVER*16]+$05 BA4E 00 DB 0 BA4F :M17V2 BA4F 4CBD DW :T17V2 BA51 38F5 DB 56,[MFOREVER*16]+$05 BA53 :TN18 BA53 80 DB $80 BA54 03 DB :M18-:TN18 BA55 00 DB 0 BA56 :M18 BA56 BDBD DW :T18 BA58 0CF6 DB 12,[MFOREVER*16]+$06 BA5A :TN19 BA5A C0 DB $C0 BA5B 03 DB :M19-:TN19 BA5C 00 DB 0 BA5D :M19 BA5D CABD DW :T19 BA5F 0606 DB 6,$06 BA61 :TN20 BA61 0000 DW 0 BA63 :TN21 BA63 10 DB $10 BA64 0409 DB :M21V1-:TN21,:M21V2-:TN21 BA66 00 DB 0 BA67 :M21V1 BA67 D1BD DW :T21V1 ATARI CAMAC Assembler Ver 1.0A Page 181 D3:DIGTUNE.ASM 12 X 3 MATRIX BA69 40F6 DB 64,[MFOREVER*16]+$06 BA6B 00 DB 0 BA6C :M21V2 BA6C 12BE DW :T21V2 BA6E 3CF6 DB 60,[MFOREVER*16]+$06 ************************************* ; **************** ; * * ; * TUNE DATA * ; * * ; **************** ; SOUND 1 - INTRO- ; 3 VOICES UNISON - CHANNELS 1 - 3 ; 12 ELEMENTS BA70 :T1VA BA70 72 DB $72 BA71 2828 DB 40,40 BA73 2828 DB 40,40 BA75 5151 DB 81,81 BA77 5151 DB 81,81 BA79 A2A2 DB 162,162 BA7B A2A2 DB 162,162 ; INTRO CONTINUED - ; SEPARATE VOICES ; 23-ELEMENTS VOICE 1 BA7D :T1V1 BA7D 00 DB 0 BA7E 2872287228 DB 40,$72,40,$72,40,$72 BA84 28E62FE6 DB 40,$E6,47,$E6 BA88 28722FE628 DB 40,$72,47,$E6,40,$72 BA8E 23722FEE2F DB 35,$72,47,$EE,47,$72 ;NOTE 47 NO DECAY FOR "E" VBLS ;THEN DECAY FOR 7 BA94 007035723C DB 0,$70,53,$72,60,$E5 BA9A 39E551E5 DB 57,$E5,81,$E5 BA9E 397251E539 DB 57,$72,81,$E5,57,$E5,53,$72 BAA6 3572357235 DB 53,$72,53,$72,53,$EE ; 31 ELEMENTS VOICE 2 BAAC :T1V2A BAAC 72 DB $72 BAAD 514840 DB 81,72,64 BAB0 3C513C51 DB 60,81,60,81 BAB4 3C513C51 DB 60,81,60,81 BAB8 3C513C51 DB 60,81,60,81 ATARI CAMAC Assembler Ver 1.0A Page 182 D3:DIGTUNE.ASM 12 X 3 MATRIX BABC 3C513C51 DB 60,81,60,81 BAC0 39513951 DB 57,81,57,81 BAC4 39513951 DB 57,81,57,81 BAC8 39513551 DB 57,81,53,81 ; 2 ELEMENTS BACC :T1V2B BACC E0 DB $E0 BACD 0000 DB 0,0 ; 5 ELEMENTS VOICE 3 BACF :T1V3A BACF 00 DB 0 BAD0 00E000E000 DB 0,$E0,0,$E0,0,$70,47,$72,81,$72 ; 24 ELEMENTS BADA :T1V3B BADA 72 DB $72 BADB 2F512F51 DB 47,81,47,81 BADF 2F512F51 DB 47,81,47,81 BAE3 2F512F51 DB 47,81,47,81 BAE7 40514051 DB 64,81,64,81 BAEB 40514051 DB 64,81,64,81 BAEF 40514051 DB 64,81,64,81 ; 2 ELEMENTS = BACC :T1V3C = :T1V2B ; SOUND 2 ; SOUND 3 ; 14 ELEMENTS VOICE 1 BAF3 :T3V1 BAF3 00 DB 0 BAF4 A252995290 DB 162,$52,153,$52,144,$52,136,$52 BAFC 80527952 DB 128,$52,121,$52 BB00 60A451F548 DB 96,$A4,81,$F5,72,$52,60,$F5 BB08 51A43C553C DB 81,$A4,60,$55,60,$FF,60,$F8 ; 9 ELEMENTS VOICE 2 BB10 :T3V2 BB10 00 DB 0 BB11 3CF840F844 DB 60,$F8,64,$F8,68,$F8,72,$F8 BB19 4CF851A4 DB 76,$F8,81,$A4 BB1D 3C553CFF79 DB 60,$55,60,$FF,121,$F8 ; SOUND 4 ATARI CAMAC Assembler Ver 1.0A Page 183 D3:DIGTUNE.ASM 12 X 3 MATRIX ; 18 ELEMENTS VOICE 1 BB23 :T4V1 BB23 00 DB 0 BB24 7922771179 DB 121,$22,119,$11,121,$11,123,$21 BB2C 90118E1190 DB 144,$11,142,$11,144,$11 BB32 9221991197 DB 146,$21,153,$11,151,$11,153,$11 BB3A 9B21781179 DB 155,$21,120,$11,121,$11 BB40 7B11791178 DB 123,$11,121,$11,120,$11,121,$11 ; 9 ELEMENTS VOICE 2 BB48 :T4V2A BB48 11 DB $11 BB49 ADAEADAC DB 173,174,173,172 BB4D ADAEAD DB 173,174,173 BB50 ACAD DB 172,173 ; 1 ELEMENT BB52 :T4V2B BB52 00 DB 0 BB53 0030 DB 0,$30 ; 10 ELEMENTS BB55 :T4V2C BB55 11 DB $11 BB56 AE DB 174 BB57 ADACAD DB 173,172,173 BB5A AEADACAD DB 174,173,172,173 BB5E AEAD DB 174,173 ; SOUND 5 ; 29 ELEMENTS BB60 :T5V1 BB60 11 DB $11 BB61 28202830 DB 40,32,40,48 BB65 28303830 DB 40,48,56,48 BB69 38 DB 56 BB6A 40384048 DB 64,56,64,72 BB6E 40485048 DB 64,72,80,72 BB72 50585058 DB 80,88,80,88 BB76 60586068 DB 96,88,96,104 BB7A 58 DB 88 BB7B 483832 DB 72,56,50 ; 29 ELEMENTS BB7E :T5V2 BB7E 11 DB $11 BB7F 58505860 DB 88,80,88,96 BB83 58606860 DB 88,96,104,96 ATARI CAMAC Assembler Ver 1.0A Page 184 D3:DIGTUNE.ASM 12 X 3 MATRIX BB87 68706870 DB 104,112,104,112 BB8B 787078 DB 120,112,120 BB8E 80788088 DB 128,120,128,136 BB92 808890 DB 128,136,144 BB95 88909888 DB 136,144,152,136 BB99 786858 DB 120,104,88 ; SOUND 6 ; 2ND ENDING - LEAD IN TO FAST THEME ; 14 ELEMENTS VOICE 1 BB9C :T6V1 BB9C 00 DB 0 BB9D 00C000C051 DB 0,$C0,0,$C0,81,$82,72,$82,64,$82 BBA7 3C82 DB 60,$82 BBA9 3582 DB 53,$82 BBAB 2F822F822F DB 47,$82,47,$82,47,$82,47,$82 BBB3 00E000E000 DB 0,$E0,0,$E0,0,$40 ; 16 ELEMENTS VOICE 2 BBB9 :T6V2 BBB9 00 DB 0 BBBA 3C8251E200 DB 60,$82,81,$E2,0,$20,81,$82 BBC2 3C82 DB 60,$82 BBC4 51E2002051 DB 81,$E2,0,$20,81,$82 BBCA 3C8251E200 DB 60,$82,81,$E2,0,$20,81,$E2,0,$20 BBD4 5182 DB 81,$82 BBD6 51825182 DB 81,$82,81,$82 ; SOUND 7 ; 7 ELEMENTS BBDA :T7 BBDA 00 DB 0 BBDB 5164486440 DB 81,$64,72,$64,64,$64,47,$64 BBE3 3CC823C828 DB 60,$C8,35,$C8,40,$FC ; SOUND 8 TAG END ; 16 ELEMENTS VOICE 1 BBE9 :T8V1 BBE9 00 DB 0 BBEA 00A03C5335 DB 0,$A0,60,$53,53,$53,47,$53 BBF2 2D53 DB 45,$53 BBF4 28A32F532D DB 40,$A3,47,$53,45,$A3 BBFA 35532FA33C DB 53,$53,47,$A3,60,$53 BC00 35A340533C DB 53,$A3,64,$53,60,$F5 BC06 1DA33C53 DB 29,$A3,60,$53 ; 13 ELEMENTS VOICE 2 ATARI CAMAC Assembler Ver 1.0A Page 185 D3:DIGTUNE.ASM 12 X 3 MATRIX BC0A :T8V2 BC0A 00 DB 0 BC0B 00F000F051 DB 0,$F0,0,$F0,81,$A7,0,$50,76,$A7 BC15 0050 DB 0,$50 BC17 48A7005040 DB 72,$A7,0,$50,64,$A7,0,$50,60,$A7 BC21 005000F0 DB 0,$50,0,$F0 ; 14 ELEMENTS VOICE 3 BC25 :T8V3 BC25 00 DB 0 BC26 00F000F0A2 DB 0,$F0,0,$F0,162,$A7,0,$50 BC2E 99A70050 DB 153,$A7,0,$50 BC32 90A7005080 DB 144,$A7,0,$50,128,$A7,0,$50 BC3A 79A70050 DB 121,$A7,0,$50 BC3E 00A07954 DB 0,$A0,121,$54 ; SOUND 9 ; 4 ELEMENTS (PATTERN REPEATED 3X ) ; VOICE 1 BC42 :T9V1 BC42 73 DB $73 BC43 25282528 DB 37,40,37,40 ; 4 ELEMENTS VOICE 2 BC47 :T9V2 BC47 00 DB 0 BC48 2A732D7300 DB 42,$73,45,$73,0,$70,45,$73 ; SOUND 10 ; 2 ELEMENTS BC50 :T10A1 BC50 21 DB $21 BC51 6878 DB 104,120 ; 3 ELEMENTS BC53 :T10B1 BC53 00 DB 0 BC54 9011981190 DB 144,$11,152,$11,144,$21 ; 1 ELEMENT BC5A :T10C1 BC5A 00 DB 0 BC5B 8021 DB 128,$21 ; 1 ELEMENT BC5D :T10D1 BC5D 00 DB 0 BC5E 7821 DB 120,$21 ; 3 ELEMENTS BC60 :T10E1 BC60 11 DB $11 BC61 706860 DB 112,104,96 ATARI CAMAC Assembler Ver 1.0A Page 186 D3:DIGTUNE.ASM 12 X 3 MATRIX ; 1 ELEMENT BC64 :T10F1 BC64 00 DB 0 BC65 5811 DB 88,$11 ; 1 ELEMENT BC67 :T10G1 BC67 00 DB 0 BC68 5011 DB 80,$11 ; 1 ELEMENT BC6A :T10H1 BC6A 00 DB 0 BC6B 4811 DB 72,$11 ; 2 ELEMENTS BC6D :T10I1 BC6D 11 DB $11 BC6E 4030 DB 64,48 ; VOICE 2 ; 2 ELEMENTS BC70 :T10A2 BC70 21 DB $21 BC71 5060 DB 80,96 ; 3 ELEMENTS BC73 :T10B2 BC73 00 DB 0 BC74 7011782170 DB 112,$11,120,$21,112,$21 ; 4 ELEMENTS BC7A :T10C2 BC7A 00 DB 0 BC7B 6811582150 DB 104,$11,88,$21,80,$11,64,$21 ; 1 ELEMENT BC83 :T10D2 BC83 00 DB 0 BC84 3052 DB 48,$52 ; SOUND 11 ; 2 ELEMENTS BC86 :T11A1 BC86 00 DB 0 BC87 C811C022 DB 200,$11,192,$22 ; 3 ELEMENTS BC8B :T11B1 BC8B 00 DB 0 BC8C B822B011A8 DB 184,$22,176,$11,168,$11 ; 3 ELEMENTS BC92 :T11C1 ATARI CAMAC Assembler Ver 1.0A Page 187 D3:DIGTUNE.ASM 12 X 3 MATRIX BC92 11 DB $11 BC93 A09C24 DB 160,156,36 ; 6 ELEMENTS BC96 :T11D1 BC96 00 DB 0 BC97 7011581148 DB 112,$11,88,$11,72,$22,64,$22 BC9F 48224022 DB 72,$22,64,$22 ; SOUND 12 ; 5 ELEMENTS BCA3 :T12A1 BCA3 00 DB 0 BCA4 A2119F11A2 DB 162,$11,159,$11,162,$22,159,$11 BCAC A222 DB 162,$22 ; 3 ELEMENTS BCAE :T12B1 BCAE 11 DB $11 BCAF 9F9890 DB 159,152,144 ; 7 ELEMENTS BCB2 :T12C1 BCB2 11 DB $11 BCB3 8A858680 DB 138,133,134,128 BCB7 7C7A79 DB 124,122,121 ; SOUND 13 ; 2 ELEMENTS BCBA :T13A1 BCBA 32 DB $32 BCBB 2823 DB 40,35 ; 2 ELEMENTS BCBD :T13B1 BCBD 32 DB $32 BCBE 211F DB 33,31 ; 1 ELEMENT BCC0 :T13C1 BCC0 00 DB 0 BCC1 1C32 DB 28,$32 ; SOUND 14 ; VOICE 1 ; 2 ELEMENTS (PATTERN IS 12X ) BCC3 :T14V1 BCC3 11 DB $11 BCC4 706B DB 112,107 ; VOICE 2 ATARI CAMAC Assembler Ver 1.0A Page 188 D3:DIGTUNE.ASM 12 X 3 MATRIX ; 24 ELEMENTS BCC6 :T14V2 BCC6 11 DB $11 BCC7 A299A299 DB 162,153,162,153 BCCB 9990 DB 153,144 BCCD 99909088 DB 153,144,144,136 BCD1 9088 DB 144,136 BCD3 90999099 DB 144,153,144,153 BCD7 A299 DB 162,153 BCD9 A299A299 DB 162,153,162,153 BCDD A299 DB 162,153 ; SOUND 15 (PATTERN HAS REPEATS) ; 6 ELEMENTS BCDF :T15A1 BCDF 00 DB 0 BCE0 2811261128 DB 40,$11,38,$11,40,$21 BCE6 2311211123 DB 35,$11,33,$11,35,$11 ; 1 ELEMENT BCEC :T15B1 BCEC 00 DB 0 BCED 1F42 DB 31,$42 ; SOUND 16 (PATTERN HAS REPEATS) ; VOICE 1 ; 2 ELEMENTS BCEF :T16A1 BCEF 11 DB $11 BCF0 1F1C DB 31,28 ; 9 ELEMENTS BCF2 :T16B1 BCF2 11 DB $11 BCF3 20283038 DB 32,40,48,56 BCF7 40485058 DB 64,72,80,88 BCFB 6C DB 108 ; VOICE 2 ( USES SOME VOICE 1 DATA) = BCEF :T16A2 = :T16A1 ; 7 ELEMENTS BCFC :T16B2 BCFC 00 DB 0 BCFD 1F111E111D DB 31,$11,30,$11,29,$11,28,$11 BD05 1B111A1119 DB 27,$11,26,$11,25,$31 ; SOUND 17 FAST MAIN THEME ATARI CAMAC Assembler Ver 1.0A Page 189 D3:DIGTUNE.ASM 12 X 3 MATRIX ; 56 ELEMENTS VOICE 1 BD0B :T17V1 BD0B 51 DB $51 BD0C 3C2F3C2F DB 60,47,60,47 BD10 402F402F DB 64,47,64,47 BD14 442F442F DB 68,47,68,47 BD18 482F482F DB 72,47,72,47 BD1C 4C354C35 DB 76,53,76,53 BD20 4C354C35 DB 76,53,76,53 BD24 51355135 DB 81,53,81,53 BD28 48354035 DB 72,53,64,53 BD2C 403C3C3C DB 64,60,60,60 BD30 403C403C DB 64,60,64,60 BD34 443C443C DB 68,60,68,60 BD38 483C483C DB 72,60,72,60 BD3C 4C354C35 DB 76,53,76,53 BD40 4C354C35 DB 76,53,76,53 ; 8 ELEMENTS 1ST ENDING BD44 51355135 DB 81,53,81,53 BD48 48354035 DB 72,53,64,53 ; 52 ELEMENTS VOICE 2 BD4C :T17V2 BD4C 00 DB 0 BD4D 2A51285128 DB 42,$51,40,$51,40,$51,40,$51 BD55 0050285128 DB 0,$50,40,$51,40,$51,40,$51 BD5D 2851285128 DB 40,$51,40,$51,40,$51,40,$51 BD65 0050285128 DB 0,$50,40,$51,40,$51,40,$51 BD6D 2F512D5135 DB 47,$51,45,$51,53,$51,47,$51 BD75 00502D512F DB 0,$50,45,$51,47,$51,45,$51 BD7D 2F5100F035 DB 47,$51,0,$F0,53,$51,0,$F0 BD85 32512F512F DB 50,$51,47,$51,47,$51,47,$51 BD8D 00502F512F DB 0,$50,47,$51,47,$51,47,$51 BD95 2F512F512F DB 47,$51,47,$51,47,$51,47,$51 BD9D 00502F512F DB 0,$50,47,$51,47,$51,47,$51 BDA5 2F512D5135 DB 47,$51,45,$51,53,$51,47,$51 BDAD 00502D512F DB 0,$50,45,$51,47,$51,45,$51 ; 4 ELEMENTS 1ST ENDING BDB5 285100F000 DB 40,$51,0,$F0,0,$A0,0,$A0 ; SOUND 18 - TRILL ; 12 ELEMENTS VOICE 1 ATARI CAMAC Assembler Ver 1.0A Page 190 D3:DIGTUNE.ASM 12 X 3 MATRIX BDBD :T18 BDBD 21 DB $21 BDBE 28252828 DB 40,37,40,40 BDC2 2528 DB 37,40 BDC4 514C5151 DB 81,76,81,81 BDC8 4C28 DB 76,40 ; SOUND 19 ; 6 ELEMENTS BDCA :T19 BDCA 31 DB $31 BDCB 1D190C0F DB 29,25,12,15 BDCF 190F DB 25,15 ; SOUND 20 ; SOUND 21 MAIN THEME ; 56 ELEMENTS VOICE 1 BDD1 :T21V1 BDD1 82 DB $82 BDD2 3C2F3C2F DB 60,47,60,47 BDD6 402F402F DB 64,47,64,47 BDDA 442F442F DB 68,47,68,47 BDDE 482F482F DB 72,47,72,47 BDE2 4C354C35 DB 76,53,76,53 BDE6 4C354C35 DB 76,53,76,53 BDEA 51355135 DB 81,53,81,53 BDEE 48354035 DB 72,53,64,53 BDF2 3C2F3C2F DB 60,47,60,47 BDF6 403C403C DB 64,60,64,60 BDFA 443C443C DB 68,60,68,60 BDFE 483C483C DB 72,60,72,60 BE02 4C354C35 DB 76,53,76,53 BE06 4C354C35 DB 76,53,76,53 ; 8 ELEMENTS 1ST ENDING BE0A 51355135 DB 81,53,81,53 BE0E 48354035 DB 72,53,64,53 ; 54 ELEMENTS VOICE 2 BE12 :T21V2 BE12 00 DB 0 BE13 2A85288528 DB 42,$85,40,$85,40,$85,40,$85 BE1B 0080288528 DB 0,$80,40,$85,40,$85,40,$85 BE23 2885288528 DB 40,$85,40,$85,40,$85,40,$85 BE2B 0080288528 DB 0,$80,40,$85,40,$85,40,$85 ATARI CAMAC Assembler Ver 1.0A Page 191 D3:DIGTUNE.ASM 12 X 3 MATRIX BE33 2F852D8535 DB 47,$85,45,$85,53,$85,47,$85 BE3B 00802D852F DB 0,$80,45,$85,47,$85,45,$85 BE43 2F8500C000 DB 47,$85,0,$C0,0,$C0,53,$85,0,$C0 BE4D 00C0 DB 0,$C0 BE4F 32852F852F DB 50,$85,47,$85,47,$85,47,$85 BE57 00802F852F DB 0,$80,47,$85,47,$85,47,$85 BE5F 2F852F852F DB 47,$85,47,$85,47,$85,47,$85 BE67 00802F852F DB 0,$80,47,$85,47,$85,47,$85 BE6F 2F852D8535 DB 47,$85,45,$85,53,$85,47,$85 BE77 00802D852F DB 0,$80,45,$85,47,$85,45,$85 ; 6 ELEMENTS 1ST ENDING BE7F 288500C000 DB 40,$85,0,$C0,0,$C0,0,$C0,0,$C0 BE89 0080 DB 0,$80 EPROC LIST L BE8B SHOW LEVELS LIST L INCLUDE D2:LEVELS.ASM ;LEVELS.ASM ;---------- ;THIS FILE CONTAINS THE DATA FOR THE ;INITIAL TUNNELS, ROCKS, AND MONSTERS ;FOR THE DIFFERENT LEVELS. ;THE FOLLOWING VARIABLES ARE INDEXED ;BY THE CURRENT LEVEL. BE8B PROC BE8B TUNLEV BE8B 02 DB :TLV01-TUNLST BE8C 0A DB :TLV02-TUNLST BE8D 14 DB :TLV03-TUNLST BE8E 1E DB :TLV04-TUNLST BE8F 28 DB :TLV05-TUNLST BE90 34 DB :TLV06-TUNLST BE91 3E DB :TLV07-TUNLST BE92 49 DB :TLV08-TUNLST BE93 56 DB :TLV09-TUNLST BE94 64 DB :TLV10-TUNLST BE95 72 DB :TLV11-TUNLST BE96 7E DB :TLV12-TUNLST BE97 8B DB :TLV13-TUNLST BE98 98 DB :TLV14-TUNLST BE99 A5 DB :TLV15-TUNLST BE9A B3 DB :TLV16-TUNLST BE9B ROKLEV BE9B 00 DB :RLV01-ROKLST BE9C 04 DB :RLV02-ROKLST BE9D 09 DB :RLV03-ROKLST ATARI CAMAC Assembler Ver 1.0A Page 192 D2:LEVELS.ASM 12 X 3 MATRIX BE9E 0E DB :RLV04-ROKLST BE9F 14 DB :RLV05-ROKLST BEA0 1A DB :RLV06-ROKLST BEA1 1F DB :RLV07-ROKLST BEA2 24 DB :RLV08-ROKLST BEA3 29 DB :RLV09-ROKLST BEA4 2F DB :RLV10-ROKLST BEA5 34 DB :RLV11-ROKLST BEA6 39 DB :RLV12-ROKLST BEA7 3E DB :RLV13-ROKLST BEA8 43 DB :RLV14-ROKLST BEA9 48 DB :RLV15-ROKLST BEAA 4D DB :RLV16-ROKLST ;THE FOLLOWING TABLE OF INITIAL ;TUNNELS AND MONSTERS IS INDEXED ;BY THE VALUE OF TUNLEV,Y. ;DESCRIPTION OF TUNNEL/MONSTER ;DATA STRUCTURE: ; ;EACH LEVEL CONTAINS A SET OF ;TUNNELS. EACH TUNNEL MAY CONTAIN ;1, OR 2 MONSTERS. THE FIRST ;BYTE OF THE TUNNEL IS ITS ROW/COL ;COORDINATES (HI-NIBBLE, LO-NIBBLE). ;THE NEXT BYTE CONTAINS MORE ;INFORMATION ABOUT THE TUNNEL AS ;WELL AS THE FIRST MONSTER: ; ; BIT 7 -- POOKA (0) OR FYGAR (1) ; 6 -- ANOTHER MONSTER BYTE ; FOLLOWS (1) ; 5 -- IGNORED ; 4 -- IGNORED ; 3 -- ANOTHER TUNNEL FOLLOWS ; (1) ; 2 -- HORIZONTAL (1) OR ; VERTICAL (0) ; 0,1 -- DIRECTION OF MONSTER ; ;IF ANOTHER MONSTER BYTE FOLLOWS, ;IT USES ONLY BITS 7, 3 (REDUNDANT), ;2 (REDUNDANT), AND 0,1. = 0004 H = $04 ;HORIZONTAL = 0000 V = $00 ;VERTICAL = 0008 TY = $08 ;MORE TUNNELS = 0000 TN = $00 ;LAST TUNNEL = 0000 PO = $00 ;POOKA = 0080 FY = $80 ;FYGAR = 0001 NA = $01 ;NO MONSTER TUNNEL MACRO ROW,COL,HV,MORE,MONST1,DIR1,MONST2,DIR2 %L DB [%1*16]+%2 IF %7=NA ATARI CAMAC Assembler Ver 1.0A Page 193 D2:LEVELS.ASM 12 X 3 MATRIX DB %5+%4+%3+%6 ELSE DB %5+$40+%4+%3+%6 DB %7+%4+%3+%8 ENDIF ENDM BEAB TUNLST BEAB TUNNEL 6,8,H,TY,NA,NA,NA,NA BEAD :TLV01 BEAD TUNNEL 7,10,V,TY,PO,ZDOWN,NA,NA BEAF TUNNEL 8,6,H,TY,FY,ZRIGHT,NA,NA BEB1 TUNNEL 3,12,H,TY,PO,ZLEFT,NA,NA BEB3 TUNNEL 3,2,V,TN,PO,ZUP,NA,NA BEB5 :TLV02 BEB5 TUNNEL 10,12,H,TY,FY,ZRIGHT,NA,NA BEB7 TUNNEL 8,9,H,TY,PO,ZLEFT,NA,NA BEB9 TUNNEL 7,2,V,TY,PO,ZUP,NA,NA BEBB TUNNEL 4,12,H,TY,FY,ZRIGHT,NA,NA BEBD TUNNEL 5,4,H,TN,PO,ZLEFT,NA,NA BEBF :TLV03 BEBF TUNNEL 9,11,H,TY,FY,ZLEFT,NA,NA BEC1 TUNNEL 3,12,H,TY,FY,ZLEFT,NA,NA BEC3 TUNNEL 3,8,V,TY,PO,ZUP,NA,NA BEC5 TUNNEL 8,6,V,TY,PO,ZDOWN,NA,NA BEC7 TUNNEL 5,4,H,TN,PO,ZRIGHT,NA,NA BEC9 :TLV04 BEC9 TUNNEL 10,10,H,TY,PO,ZRIGHT,NA,NA BECB TUNNEL 6,11,V,TY,FY,ZUP,NA,NA BECD TUNNEL 3,8,V,TY,PO,ZDOWN,NA,NA BECF TUNNEL 8,6,H,TY,FY,ZRIGHT,NA,NA BED1 TUNNEL 3,6,H,TN,PO,ZLEFT,NA,NA BED3 :TLV05 BED3 TUNNEL 8,12,H,TY,FY,ZLEFT,NA,NA BED5 TUNNEL 4,11,V,TY,FY,ZUP,NA,NA BED7 TUNNEL 2,10,V,TY,PO,ZDOWN,NA,NA BED9 TUNNEL 3,6,V,TY,PO,ZDOWN,NA,NA BEDB TUNNEL 8,5,H,TY,FY,ZRIGHT,NA,NA BEDD TUNNEL 3,4,H,TN,PO,ZRIGHT,NA,NA BEDF :TLV06 BEDF TUNNEL 7,12,H,TY,FY,ZLEFT,NA,NA BEE1 TUNNEL 9,8,H,TY,FY,ZLEFT,NA,NA BEE3 TUNNEL 8,4,H,TY,FY,ZRIGHT,NA,NA BEE5 TUNNEL 4,3,V,TY,FY,ZDOWN,NA,NA BEE7 TUNNEL 3,6,H,TN,PO,ZRIGHT,NA,NA BEE9 :TLV07 BEE9 TUNNEL 9,10,H,TY,FY,ZRIGHT,NA,NA BEEB TUNNEL 4,12,H,TY,PO,ZLEFT,FY,ZRIGHT BEEE TUNNEL 3,6,V,TY,PO,ZUP,PO,ZUP BEF1 TUNNEL 8,5,H,TN,PO,ZRIGHT,FY,ZLEFT BEF4 :TLV08 BEF4 TUNNEL 7,11,H,TY,FY,ZLEFT,NA,NA BEF6 TUNNEL 4,11,H,TY,PO,ZRIGHT,NA,NA BEF8 TUNNEL 9,7,H,TY,PO,ZLEFT,NA,NA BEFA TUNNEL 3,6,V,TY,PO,ZDOWN,PO,ZDOWN BEFD TUNNEL 6,3,V,TY,FY,ZUP,NA,NA BEFF TUNNEL 3,4,H,TN,FY,ZRIGHT,NA,NA ATARI CAMAC Assembler Ver 1.0A Page 194 D2:LEVELS.ASM 12 X 3 MATRIX BF01 :TLV09 BF01 TUNNEL 9,13,H,TY,FY,ZLEFT,NA,NA BF03 TUNNEL 5,13,V,TY,PO,ZDOWN,NA,NA BF05 TUNNEL 5,11,H,TY,PO,ZLEFT,PO,ZLEFT BF08 TUNNEL 8,8,H,TY,FY,ZLEFT,NA,NA BF0A TUNNEL 9,4,H,TY,FY,ZLEFT,FY,ZRIGHT BF0D TUNNEL 3,5,V,TN,PO,ZUP,NA,NA BF0F :TLV10 BF0F TUNNEL 9,12,H,TY,PO,ZLEFT,NA,NA BF11 TUNNEL 3,12,V,TY,PO,ZUP,PO,ZDOWN BF14 TUNNEL 5,10,V,TY,FY,ZDOWN,NA,NA BF16 TUNNEL 3,10,H,TY,PO,ZRIGHT,FY,ZRIGHT BF19 TUNNEL 8,6,H,TY,FY,ZLEFT,NA,NA BF1B TUNNEL 4,4,V,TN,FY,ZUP,NA,NA BF1D :TLV11 BF1D TUNNEL 5,12,V,TY,FY,ZUP,NA,NA BF1F TUNNEL 3,9,V,TY,PO,ZDOWN,FY,ZDOWN BF22 TUNNEL 7,3,V,TY,FY,ZUP,NA,NA BF24 TUNNEL 5,4,H,TY,PO,ZRIGHT,NA,NA BF26 TUNNEL 3,6,H,TN,PO,ZRIGHT,FY,ZLEFT BF29 :TLV12 BF29 TUNNEL 3,12,V,TY,PO,ZDOWN,NA,NA BF2B TUNNEL 8,11,H,TY,FY,ZLEFT,FY,ZRIGHT BF2E TUNNEL 4,10,H,TY,PO,ZLEFT,PO,ZLEFT BF31 TUNNEL 9,7,H,TY,FY,ZRIGHT,NA,NA BF33 TUNNEL 4,5,H,TN,FY,ZRIGHT,PO,ZLEFT BF36 :TLV13 BF36 TUNNEL 10,13,H,TY,FY,ZLEFT,FY,ZRIGHT BF39 TUNNEL 6,12,V,TY,PO,ZDOWN,NA,NA BF3B TUNNEL 4,12,H,TY,PO,ZLEFT,PO,ZLEFT BF3E TUNNEL 8,8,H,TY,FY,ZRIGHT,FY,ZLEFT BF41 TUNNEL 4,4,V,TN,PO,ZUP,NA,NA BF43 :TLV14 BF43 TUNNEL 4,12,V,TY,PO,ZDOWN,NA,NA BF45 TUNNEL 3,10,H,TY,PO,ZLEFT,PO,ZLEFT BF48 TUNNEL 7,11,H,TY,FY,ZLEFT,NA,NA BF4A TUNNEL 8,6,H,TY,FY,ZRIGHT,FY,ZLEFT BF4D TUNNEL 3,4,V,TN,FY,ZDOWN,PO,ZDOWN BF50 :TLV15 BF50 TUNNEL 5,12,H,TY,PO,ZRIGHT,NA,NA BF52 TUNNEL 3,13,H,TY,PO,ZLEFT,NA,NA BF54 TUNNEL 8,8,V,TY,FY,ZUP,NA,NA BF56 TUNNEL 8,6,V,TY,FY,ZUP,NA,NA BF58 TUNNEL 6,4,H,TY,FY,ZRIGHT,FY,ZLEFT BF5B TUNNEL 3,6,V,TN,PO,ZDOWN,PO,ZDOWN BF5E :TLV16 BF5E TUNNEL 8,11,H,TY,FY,ZLEFT,FY,ZRIGHT BF61 TUNNEL 4,12,V,TY,PO,ZUP,NA,NA BF63 TUNNEL 5,10,H,TY,PO,ZRIGHT,PO,ZRIGHT BF66 TUNNEL 9,7,H,TY,FY,ZLEFT,NA,NA BF68 TUNNEL 4,5,H,TN,FY,ZRIGHT,PO,ZLEFT ;THE FOLLOWING TABLE OF INITIAL ;ROCK POSITIONS IS INDEXED BY THE ;VALUE OF ROKLEV,Y. ATARI CAMAC Assembler Ver 1.0A Page 195 D2:LEVELS.ASM 12 X 3 MATRIX RUCKUS MACRO ROW,COL %L DB [%1*16]+%2 ENDM BF6B ROKLST BF6B :RLV01 BF6B RUCKUS 4,5 BF6C RUCKUS 9,4 BF6D RUCKUS 7,11 BF6E 00 DB 0 BF6F :RLV02 BF6F RUCKUS 3,3 BF70 RUCKUS 4,9 BF71 RUCKUS 9,5 BF72 RUCKUS 7,12 BF73 00 DB 0 BF74 :RLV03 BF74 RUCKUS 3,3 BF75 RUCKUS 8,4 BF76 RUCKUS 5,11 BF77 RUCKUS 8,12 BF78 00 DB 0 BF79 :RLV04 BF79 RUCKUS 4,3 BF7A RUCKUS 6,4 BF7B RUCKUS 2,10 BF7C RUCKUS 4,11 BF7D RUCKUS 9,12 BF7E 00 DB 0 BF7F :RLV05 BF7F RUCKUS 5,3 BF80 RUCKUS 9,6 BF81 RUCKUS 2,9 BF82 RUCKUS 3,12 BF83 RUCKUS 9,10 BF84 00 DB 0 BF85 :RLV06 BF85 RUCKUS 9,3 BF86 RUCKUS 3,8 BF87 RUCKUS 7,7 BF88 RUCKUS 5,11 BF89 00 DB 0 BF8A :RLV07 BF8A RUCKUS 5,2 BF8B RUCKUS 3,9 BF8C RUCKUS 6,12 BF8D RUCKUS 8,11 BF8E 00 DB 0 BF8F :RLV08 BF8F RUCKUS 5,4 BF90 RUCKUS 7,6 BF91 RUCKUS 8,8 BF92 RUCKUS 5,12 BF93 00 DB 0 BF94 :RLV09 BF94 RUCKUS 6,2 BF95 RUCKUS 9,6 ATARI CAMAC Assembler Ver 1.0A Page 196 D2:LEVELS.ASM 12 X 3 MATRIX BF96 RUCKUS 3,8 BF97 RUCKUS 6,10 BF98 RUCKUS 4,12 BF99 00 DB 0 BF9A :RLV10 BF9A RUCKUS 6,2 BF9B RUCKUS 2,4 BF9C RUCKUS 9,8 BF9D RUCKUS 7,12 BF9E 00 DB 0 BF9F :RLV11 BF9F RUCKUS 3,3 BFA0 RUCKUS 8,6 BFA1 RUCKUS 2,10 BFA2 RUCKUS 9,11 BFA3 00 DB 0 BFA4 :RLV12 BFA4 RUCKUS 7,2 BFA5 RUCKUS 2,9 BFA6 RUCKUS 6,10 BFA7 RUCKUS 9,8 BFA8 00 DB 0 BFA9 :RLV13 BFA9 RUCKUS 3,2 BFAA RUCKUS 8,3 BFAB RUCKUS 3,9 BFAC RUCKUS 9,10 BFAD 00 DB 0 BFAE :RLV14 BFAE RUCKUS 3,2 BFAF RUCKUS 6,3 BFB0 RUCKUS 9,8 BFB1 RUCKUS 4,11 BFB2 00 DB 0 BFB3 :RLV15 BFB3 RUCKUS 4,2 BFB4 RUCKUS 9,4 BFB5 RUCKUS 4,9 BFB6 RUCKUS 8,10 BFB7 00 DB 0 BFB8 :RLV16 BFB8 RUCKUS 7,2 BFB9 RUCKUS 3,9 BFBA RUCKUS 6,10 BFBB RUCKUS 9,9 BFBC 00 DB 0 EPROC LIST L BFBD DDKOKO ;(INIT ADDRESS) BFBD 60 RTS BFBE SHOW ENDROM BFBE PROC = 0008 WARMST = $08 = 000A DOSVEC = $0A BFBE BOOT ATARI CAMAC Assembler Ver 1.0A Page 197 D1:DIGDUG.ASM 12 X 3 MATRIX ;CODE TO ALLOW THE RESET KEY TO WORK CORREC: BFBE A508 LDA WARMST BFC0 F003 ^BFC5 BEQ :COLD BFC2 4C9885 JMP REOPT BFC5 :COLD BFC5 A9BE LDA #LOW BOOT BFC7 850A STA DOSVEC BFC9 A9BF LDA #HIGH BOOT BFCB 850B STA DOSVEC+1 BFCD 4C8E85 JMP RUNHERE EPROC BFD0 02BB5A305F DB $02,$BB,$5A,$30,$5F,$EE,$3D,$A8 I BFD8 EAEAEA LDR ENDROM ASSERT *<=$BFFA ;CARTRIDGE VECTOR ;---------------- BFDB = BFFA ORG $BFFA ;(16K = CART B???) BFFA BEBF DW BOOT ; DW IIGLOO ;START ADDRESS BFFC 00 DB 0 ;(MANDATORY ZERO) BFFD 04 DB $04 ;OPTION BYTE BFFE BDBF DW DDKOKO ;INIT ADDRESS ;GLOBAL ASSERTIONS ;----------------- ;(CHECK THAT SCR-$10 BEGINS ON ;4K BOUNDARY) ASSERT [[SCR-$10] MOD [4*K]]=0 ;(CHECK THAT PLAYER/MISSILE AREA ;BEGINS ON 2K BOUNDARY) ASSERT [PMAREA MOD [2*K]] = 0 ;(CHECK THAT ALTERNATE CHARACTER ;SET BEGINS ON 0.5K BOUNDARY) ASSERT [SCOSET MOD [K/2]] = 0 ;(CHECK THAT DISPLAY LIST DOES ;NOT CROSS 1K BOUNDARY) ASSERT [DLIST&[-K]]=[ENDDLI&[-K]] ;SYMBOL TABLE FOR DBUG ;--------------------- ; ORG $2303 ; LIST L ; INCLUDE D2:SYMTAB.ASM ; LIST L C000 END BOOT 2 ERRORs, 1564 Labels, $2135 free. *Error page 197 ATARI CAMAC Assembler Ver 1.0A Page 198 D1:DIGDUG.ASM 12 X 3 MATRIX Last error occurred on Page 197 ACLOK 1873 7#57 156/58 157/ 6 ADDGHO B329 155/49 155#55 ADDIT 1A31 11#38 139/24 139/27 139/30 144/ 5 144/ 7 144/ 9 144/38 144/39 144/41 ADDR 1804 6#32 47/12 47/15 49/28 49/30 50/52 50/55 51/ 5 51/ 7 51/ 9 51/14 51/16 51/17 51/19 53/36 53/38 56/ 9 56/11 ADDSCO AE78 139#20 144/11 144/43 ADDWHO 00B8 5#17 94/52 94/56 95/58 AGAIN 85A8 25#25 59/10 59/34 ALLOVE 9158 38/46 59#26 ANIM B39C 155/16 156#56 ANSWER 185F 7#42 151/29 151/32 151/58 152/33 152/34 152/36 152/38 152/40 152/41 152/44 153/16 153/17 153/35 153/36 153/43 153/45 153/46 153/48 ANUM 0005 154#10 157/ 5 ARGH 0083 4#23 24/53 89/16 ASWTAB 1868 7#53 157/ 7 157/ 9 158/39 ATRACT 004D 3#14 29/30 59/33 68/ 5 68/11 68/17 68/23 174/26 ATRCOL 00C9 5#29 175/51 AUDC1 D201 3# 8 167/29 169/38 170/42 173/43 n AUDC2 D203 3# 9 n AUDC3 D205 3#10 n AUDC4 D207 3#11 AUDCTL D208 3#12 162/12 AUDF1 D200 3# 7 167/28 170/22 BACK1 87E3 34#22 35/11 35/13 35/45 35/47 BACK2 8811 34/37 34/39 34#51 BACKGR 1942 9#12 44/51 68/47 163/61 165/13 165/31 BASE 00BA 5#19 101/35 101/37 102/32 102/35 BBBFLA 18CE 8#26 56/35 94/53 103/36 103/43 159/61 BBBFLG 00B9 5#18 94/54 95/35 BEHIND 1AAB 13#10 61/47 61/55 61/58 62/31 BELLY 1A30 11#36 67/49 69/29 71/28 73/38 75/ 5 144/29 BELOW 0088 4#26 148/21 148/23 149/ 9 149/27 149/30 BEST 1A14 10#61 104/22 106/52 106/54 108/55 108/57 108/59 108/61 BESTH 1832 7#15 108/13 108/19 108/45 108/50 BESTV 1831 7#14 108/27 108/35 108/46 108/49 BINGO 9849 75/40 77/61 78# 9 BITMAP 8B0D 41#50 90/42 BLACK 0000 3#42 29/59 35/30 BLANK 1A07 10#37 138/10 138/17 138/41 138/44 BLANK4 0030 28#28 36/22 36/29 BLANK8 0070 28#27 36/15 36/16 36/17 36/22 36/29 36/33 36/40 36/44 36/48 36/49 BLOCK 1A63 12#18 61/25 61/51 BLUE 0094 3#36 18/13 26/39 30/ 5 35/32 61/34 62/ 8 66/47 119/46 BONBU 0000 120/ 6 141#23 141/38 BONCRS 0001 125/12 141#24 141/42 ATARI CAMAC Assembler Ver 1.0A Page 199 D1:DIGDUG.ASM BONFRT 0002 133/54 141#25 141/46 BONOFF AFC0 143/42 143#59 175/39 BONTIM 0078 141#27 141/52 BONUS AF15 120/ 7 125/14 133/55 141#29 BOOT BFBE 196#61 197/10 197/12 197/24 197/58 BTIMER 1A08 10#38 25/44 58/31 141/53 143/36 143/39 175/34 175/36 BUCOLR A54D 115#52 116/34 BUCTR 1AA6 13# 6 81/56 81/61 117/39 117/45 117/52 118/55 118/59 119/ 7 119/ 9 119/42 119/49 120/19 121/16 BUDATH A54A 115#48 116/15 BUDATL A547 115#44 116/13 BUDIDX 1934 8#55 116/42 117/55 117/57 120/36 120/52 120/57 BUFYLT 1727 13#53 39/34 39/42 115/47 115/51 BUFYRT A4FF 39/18 39/26 115#12 115/46 115/50 BUINIT A550 116# 6 118/50 BUMNST 1AA4 13# 5 61/22 61/31 99/20 99/23 99/30 105/29 105/31 105/33 117/61 118/37 120/27 121/ 9 121/13 121/15 121/46 121/53 BUPTRH 1936 8#58 116/16 120/30 BUPTRL 1938 8#59 116/14 120/28 BUPUKA A4B7 114#54 115/45 115/49 BURP A5B5 57/58 117#26 BUSCOM B011 142/36 144#55 BUTAB A73C 117/34 118/13 121#41 BUTNOP 185B 7#36 82/ 7 118/ 9 118/53 118/61 BY 185E 7#41 151/20 152/25 153/12 153/14 153/39 153/53 BYEBYE 9C4A 58/ 9 89#12 BYTE 00F1 5#46 53/47 54/10 54/13 55/54 56/14 56/21 56/59 57/ 7 65/58 66/12 146/14 146/18 146/19 146/20 148/49 148/51 149/ 7 n BYTE0 1A5E 12#13 n BYTE1 1A5F 12#14 BYTEOK 1A19 11# 6 160/52 160/58 161/ 9 161/11 161/13 CASE 1A5C 12#12 164/61 165/ 7 165/ 8 CASETA B61E 164/59 165#61 CATCHR 1940 9# 9 68/39 71/ 7 123/14 123/28 CAVE 8D24 47/26 48# 8 53/58 CAVEH 8D4E 47/24 48#30 54/ 8 CH 02FC 2#56 58/53 58/57 CH0 0080 15#11 138/16 138/38 138/40 CHARS 9316 63/46 64#24 CHASET E000 3#27 29/49 35/27 35/27 64/25 64/26 65/60 CHB 008B 15#13 33/55 136/59 137/38 138/ 9 CHBAS 02F4 3#23 29/50 63/47 CHBASE D409 3#22 34/32 CHD 008A 15#12 137/36 CHECK B4D2 159/46 159/48 160#31 CHECKH 9F10 95/25 95/38 95/50 96#18 CHKBON AFA4 59/ 9 141/34 143#32 CHKNU B30F 155/14 155#36 CHOICE A15D 102/25 102#28 CHOOSE 8781 29/23 32#42 CHSET 8845 34/29 35#25 CLEANU 8B81 38/35 43#10 CLEAR 872B 29/ 7 30#33 CMND 19A3 10#23 166/43 166/51 ATARI CAMAC Assembler Ver 1.0A Page 200 D1:DIGDUG.ASM CMPIT 1A34 11#40 139/49 139/53 139/57 140/16 140/25 140/28 140/29 140/52 140/54 140/56 CMPSCO AE9A 139#46 140/30 140/57 COLBK D01A 2#43 16/51 17/43 COLIDX 0082 4#22 17/40 17/46 26/32 174/45 COLLEN 001C 18#25 175/46 COLOR0 02C4 2#38 26/40 30/ 8 66/48 COLOR1 02C5 2#39 30/ 6 66/50 COLOR2 02C6 2#40 29/60 66/52 COLOR3 02C7 2#41 17/19 26/43 COLOR4 02C8 2#42 29/61 COLORS 819F 18#12 18/25 175/48 COLPF0 D016 2#39 16/52 17/45 34/61 COLPF1 D017 2#40 35/ 5 COLPF2 D018 2#41 16/53 17/18 34/33 35/ 7 COLPF3 D019 2#42 16/55 17/22 n COLPM0 D012 2# 8 COLPM1 D013 2# 9 116/36 n COLPM2 D014 2#10 COLPM3 D015 2#11 62/ 9 COLR 00BC 5#22 34/30 COLRRR 8704 29/ 6 29#57 COLRSH 004F 3#16 17/20 35/53 35/59 175/49 COLTB1 00D3 5#35 18/33 COLTB2 00D9 5#36 18/34 COLTB3 00DF 5#37 18/35 COLTBB 00CD 5#34 17/41 COLTBS 0080 4#21 17/44 66/41 66/43 COLTBV 81BB 18#27 30/20 COLVG 1A57 12# 7 30/21 35/58 COLVG0 00BF 5#23 34/58 35/61 COLVG1 00C1 5#24 34/59 COLVG2 00C3 5#25 35/ 6 COMM2 9796 73/59 75/26 76#12 COMM3 97B2 74/13 75/36 76#31 COMM4 97FE 74/15 75/38 77#14 COMMM A099 100/21 100#30 COMMO1 9839 77/42 77/48 77#56 COMMV1 962C 69/45 71/44 72#32 COMMV2 9659 69/58 71/58 72#60 CONFLI A01D 96/40 97/11 98#57 CONKEY 1A64 12#19 174/16 174/24 174/29 CONS B875 29/20 59/ 5 174#13 CONSID 1AA9 13# 8 104/26 104/43 159/54 159/57 CONSOL D01F 2#55 174/19 174/20 CONTRL 00F8 5#53 47/55 69/30 69/60 71/29 71/60 73/39 74/17 75/ 6 75/41 76/49 76/57 77/11 142/16 CONVEG ABBC 30/23 131/23 131#27 COPY 8913 36/51 37#22 CORHIL 1A90 12#53 97/35 97/45 98/11 156/16 CORHIR 1A98 12#55 97/36 97/54 98/18 156/15 CORLOL 1A8C 12#52 97/43 97/46 98/ 8 156/18 CORLOR 1A94 12#54 97/49 98/15 156/17 COUNT 00EF 5#45 145/56 145/57 146/30 146/32 146/41 146/43 147/19 147/21 147/35 147/40 148/28 148/29 148/41 148/43 148/52 148/53 148/56 149/45 149/48 149/53 149/55 149/57 150/ 8 150/11 ATARI CAMAC Assembler Ver 1.0A Page 201 D1:DIGDUG.ASM n COUNT0 1A54 11#61 n COUNTT 1A55 12# 5 n CPOSSI 1A18 11# 5 CPTR 81BE 18#32 66/40 66/42 CRSCOH B01C 142/48 144#57 CRSCOM B024 142/50 144#59 CRUSHG 1884 8#12 154/41 156/29 156/32 CURDIR 183B 7#17 104/11 106/49 CURPSH 1997 10#20 170/10 170/50 171/52 CURPSL 1993 10#19 170/ 7 170/47 170/48 171/46 CVTPTS B1FA 97/42 152#20 156/41 CVTSTP B1A4 93/18 107/60 110/20 116/20 142/ 6 151#12 156/ 8 CYCLE 1854 7#27 60/ 6 60/ 7 DAMMIT B8DE 25/26 59/21 174/56 175#45 DATA 009E 4#49 84/49 86/44 86/46 87/ 7 87/12 DATAD 0096 4#41 73/ 8 74/10 75/33 78/ 5 DATAD1 1953 9#36 71/16 75/59 79/11 DATAD2 1952 9#35 71/17 76/ 8 79/ 5 88/20 DATAH 009F 4#50 84/39 84/45 86/48 DATAPH 0095 4#40 110/38 110/55 111/10 111/21 DATAPL 0094 4#39 110/33 110/53 111/ 5 111/19 111/35 113/36 DCOUNT 00F9 5#54 47/22 47/51 54/ 5 70/21 70/25 72/22 72/26 76/22 76/34 DCY 198B 10#17 169/24 169/27 170/31 DDD1 8332 20#34 77/28 80/60 DDD2 8341 20#38 77/29 DDIR 8067 14#61 137/42 DDKOKO BFBD 196#54 197/28 DDL1 176F 13#55 39/35 39/43 77/30 80/60 DDL2 1780 13#57 39/36 39/44 77/31 DDLEN 000D 24#18 47/31 DDR1 8313 20#16 39/19 39/27 71/15 71/18 77/26 80/60 DDR2 8322 20#20 39/20 39/28 77/27 DDTAB 856D 24#15 24/18 47/ 9 47/13 47/39 47/42 47/44 47/46 47/48 47/50 47/52 47/54 47/56 47/58 47/60 DDU1 8351 20#43 77/24 80/60 DDU2 8360 20#47 77/25 DEADMO 187B 8#10 42/47 42/53 45/49 55/16 98/45 98/49 DEATHT 9BFE 88#53 91/24 91/26 DEBUG 0001 1#30 24/51 89/15 105/54 DEEMPH 00F8 16#40 18/13 DEFRTN E462 3#26 36/10 175/42 DEHOLD 1A5B 12#11 89/26 89/46 89/47 DELAY B82B 26/22 29/10 63/41 90/23 90/24 91/58 172#60 173/11 173/12 173/13 DELAY2 918F 59/55 59#59 DELAYF 1958 9#41 40/41 40/47 48/11 48/20 48/33 48/41 53/25 DELAYM A057 59/57 59/58 59/60 59/61 92/52 99#42 DELAYS B832 29/19 33/26 48/23 48/44 67/25 173#10 DFLAG 1950 9#33 47/57 70/27 70/29 71/35 76/36 DGDGH1 1948 9#21 71/20 75/56 78/60 DGDGH2 1949 9#22 71/19 76/ 5 79/ 9 DGDGHI 009B 4#46 78/61 79/10 DIED 1A65 12#20 27/33 38/49 40/58 92/26 DIGDUG 009A 4#45 79/ 6 79/12 79/18 ATARI CAMAC Assembler Ver 1.0A Page 202 D1:DIGDUG.ASM DIGIT AE47 138/28 138/31 138#34 DISP 8880 28/50 28/52 36#14 36/54 DIV B22D 151/21 153# 6 DLEN 1968 9#56 137/31 137/33 137/46 137/47 138/61 139/10 DLHIGH 9313 63/44 64#20 DLINT 813D 16#44 26/27 26/29 174/46 174/48 DLINT2 8163 16/56 16/58 17#12 DLINT3 8186 17/23 17/25 17#36 DLIST 8069 15#30 16/29 64/19 64/23 197/47 DLLOW 9310 63/42 64#16 DLYTAB 186C 7#54 154/31 154/33 155/60 DONTDI 1A82 12#48 89/14 126/35 DOSVEC 000A 196#60 197/11 197/13 DOWN 949D 48/18 68/13 68#58 69/39 71/37 76/27 DPOS 8065 14#59 137/29 DRAW 986B 71/21 76/ 9 78#52 85/10 85/23 85/43 85/54 88/ 7 DRAWDD 9777 69/25 70/ 7 71/25 72/ 7 73/35 74/20 74/59 75/44 75#54 DRKMSK 004E 3#15 17/21 35/54 35/60 175/50 DROPRO 18F7 8#37 124/ 5 124/23 124/44 DSONG 89E0 32/22 37#60 DTCTR 193B 8#61 91/32 92/ 5 DTIDX 193C 9# 5 91/29 91/39 91/54 DUGSAN AFE2 57/52 144#27 DWNSTM 19A4 10#27 27/53 70/ 8 70/ 9 70/10 70/12 70/13 70/14 70/15 70/16 70/18 70/19 73/ 5 73/ 7 80/21 80/22 80/26 80/27 80/28 80/29 80/35 80/36 EATVEG AC82 131/24 133#25 EMPH 00FC 16#39 18/13 ENDDLI 813D 16#33 197/47 ENTER 8CA0 40/42 40/54 46#60 ENTRAN 1A05 10#32 45/11 47/ 8 47/19 47/32 ERAN1 9BE2 87/48 87/53 87/58 88# 6 ERASEH 1857 7#32 87/ 5 87/29 88/13 EVHODA 991B 81# 6 84/38 84/41 FAX 1A3F 11#49 74/12 75/35 76/46 FCONTR AD07 40/30 45/31 134#36 FCOUNT 1A6B 12#26 91/11 135/27 135/28 135/35 FE1 18DF 8#28 56/39 81/50 96/35 104/41 106/18 117/30 121/20 FEET 0001 159#31 159/47 FFS 1AA4 12#61 43/32 FGHOS1 855D 23/47 23#61 FGHOS2 8565 23/48 24# 8 FGREEN 1A81 12#47 92/57 94/30 95/ 5 FIELD 8060 14#55 138/59 n FINISH 1A56 12# 6 FIRCTR 195D 9#46 112/16 112/34 112/35 112/51 112/55 FIRDST 0018 4# 6 105/16 105/23 FIRELT 1700 13#51 39/33 39/41 110/52 110/54 FIRERT A34C 39/17 39/25 109#46 111/18 111/20 FIRFLG 18D7 8#27 56/36 105/46 113/13 FIRIDX 195E 9#47 111/44 113/27 113/42 FIROFF A477 99/ 8 112/61 113# 7 118/44 FIRST 1A37 11#41 53/30 54/ 6 54/17 54/20 ATARI CAMAC Assembler Ver 1.0A Page 203 D1:DIGDUG.ASM FIRSZ A3ED 110/40 111/12 111#33 FIRTIM 1A06 10#33 44/41 112/18 112/56 FIRWRN 1A78 12#38 112/ 5 112/12 112/24 113/11 FIXTUN 91AC 59/49 59/53 60#16 FLDLEN 0006 15# 9 138/60 FLHDIR 1859 7#34 82/ 6 82/24 82/32 FLIP 8AEC 40/ 8 41#15 FLIPPE 0040 15#10 139/ 7 FLOADD 00A4 4#56 136/ 6 136/ 9 136/14 136/16 136/18 136/31 136/33 FLODAT ACDB 134#24 136/ 5 136/ 8 FLOENX 1A6C 12#27 135/41 135/48 136/22 FLOHIG 1A73 12#32 135/ 7 135/ 8 135/14 135/20 136/32 FLOLOW 1A71 12#31 134/52 134/56 134/60 134/61 135/11 135/12 135/18 136/30 FLONUM 1A6F 12#30 134/50 134/54 136/28 FLOOUT AD82 135/42 135/49 135#53 136/23 FLOWER AD53 40/31 48/19 48/40 58/ 8 91/12 135#25 FLPSCO AE61 27/30 41/16 41/21 138#58 FMONRK 1927 8#45 49/45 97/13 98/27 127/20 FNUMBR 1A6E 12#29 135/56 135/60 FNUMT 1A6D 12#28 135/55 136/29 FOWAR1 985B 72/43 73/56 77/50 78#35 85/34 85/36 123/38 123/40 FOWARD 985E 78#37 124/31 124/32 FRSCOM B02C 143/ 9 144#61 FRTCNT 1A68 12#24 27/21 45/25 133/59 FRTLES 183D 7#19 56/37 61/17 105/44 105/58 106/28 106/35 106/56 126/46 FRUITH 00A1 4#53 132/ 9 134/ 5 FRUITL 00A0 4#52 132/ 7 132/22 132/42 134/ 7 FRUITY ABB5 58/ 7 90/32 131#22 FRULEV 1A50 11#57 131/29 131/55 FRUOPT 1A3B 11#44 132/23 132/36 FRVPOS 195F 9#48 111/27 113/28 FY 0080 192#56 193/17 193/21 193/24 193/27 193/28 193/34 193/36 193/39 193/40 193/43 193/46 193/47 193/48 193/49 193/52 193/53 193/53 193/55 193/55 193/57 193/61 194/ 5 194/ 7 194/10 194/11 194/11 194/11 194/16 194/17 194/17 194/18 194/19 194/21 194/22 194/22 194/23 194/25 194/25 194/28 194/28 194/28 194/30 194/31 194/33 194/33 194/33 194/36 194/36 194/36 194/41 194/42 194/42 194/42 194/43 194/47 194/48 194/49 194/49 194/49 194/52 194/52 194/52 194/55 194/56 FYFIRE A402 57/60 90/28 111#53 FYGFIR 00FA 5#55 43/33 89/35 99/ 6 105/27 105/42 111/56 112/50 112/59 113/ 9 118/42 FYGL1 8401 21#30 102/49 102/51 103/13 FYGL2 0D00 13#39 39/39 39/47 103/10 FYGL3 0D25 13#41 39/38 39/46 103/11 FYGL4 0D4A 13#43 39/37 39/45 103/12 FYGR1 8371 20#55 102/49 102/51 103/25 FYGR2 8395 21# 5 39/21 39/29 103/22 FYGR3 83B9 21#13 39/22 39/30 103/23 FYGR4 83DD 21#21 39/23 39/31 103/24 FYORPO A16E 101/18 102#39 ATARI CAMAC Assembler Ver 1.0A Page 204 D1:DIGDUG.ASM GADR 008C 4#30 158/43 159/14 GADRH 008D 4#31 158/45 GAMENE 1946 9#19 27/22 40/36 40/49 40/52 GAMEOV 9375 63/61 64/ 6 65# 8 GAMOVR 8AF9 38/43 41#30 GARDEN 1A52 11#60 26/49 26/51 29/40 29/42 132/17 132/19 GCOUNT 1872 7#56 155/28 155/29 GDONOC 99CB 82#29 119/33 GDRAW B44A 155/21 158#48 GET 1A3D 11#46 132/27 132/41 132/43 GETHER 0090 4#35 93/ 8 93/56 95/28 95/41 95/53 126/ 7 GETRUN B15F 148/45 149#39 GHOCNT 1A9C 12#56 105/61 106/23 106/24 154/21 156/33 160/19 GHOFF B35B 155/ 5 156#21 GHOLEN 0008 23#55 157/57 157/59 158/21 159/12 GHOLIM 0004 3#55 106/ 5 155/37 159/35 GHONOW 1A42 11#54 46/15 61/15 105/59 GHOPTR 00FB 5#56 154/19 154/20 155/10 155/31 155/50 156/ 9 156/13 156/26 156/47 158/26 GHOST B27D 154#13 175/17 GHOSTO 1A9D 12#57 90/15 154/27 157/10 GHOTAB 1AAC 13#11 41/61 91/ 6 91/ 7 91/ 8 91/ 9 98/21 154/23 155/11 155/19 155/57 156/22 156/25 GHTAB 8545 23#46 158/42 158/44 GLEVEL 180B 6#43 27/12 27/13 45/12 45/15 45/22 46/42 58/ 6 66/36 90/31 133/41 134/40 GOPOOK 18B5 8#23 56/16 100/ 8 100/23 100/27 101/19 104/10 104/23 104/38 105/13 105/20 105/35 106/48 106/61 110/25 122/22 126/54 126/58 151/34 GPRIOR 026F 2#15 25/20 GRACTL D01D 2#12 40/39 40/48 53/24 n GRAFM D011 2#35 n GRAFP0 D00D 2#31 n GRAFP1 D00E 2#32 n GRAFP2 D00F 2#33 n GRAFP3 D010 2#34 GREEN 00C8 3#38 35/32 66/49 115/53 115/53 GREEN1 00B5 5#14 94/59 95/ 8 95/29 GREEN2 00B6 5#15 94/60 95/10 95/42 GREEN3 00B7 5#16 94/61 95/12 95/54 GSCR 0080 40/44 63#18 GTOGGL 1A9E 12#58 157/23 157/25 H 0004 53/48 55/59 192#51 193/14 193/17 193/18 193/21 193/22 193/24 193/25 193/27 193/28 193/31 193/33 193/36 193/37 193/39 193/43 193/44 193/46 193/47 193/48 193/50 193/52 193/53 193/53 193/55 193/55 193/57 193/58 193/59 194/ 5 194/ 7 194/ 9 194/ 9 194/10 194/11 194/11 194/14 194/17 194/17 194/18 194/24 194/25 194/25 194/28 194/28 194/29 194/29 194/30 194/31 194/31 194/33 194/33 194/35 194/35 194/36 194/36 194/40 194/40 194/41 194/42 194/42 194/45 194/46 194/49 194/49 194/52 194/52 194/54 194/54 194/55 194/56 194/56 HAROLD A2E9 104/18 107#50 HCHASE 1A40 11#51 57/48 61/ 8 105/ 9 108/14 157/32 HDATAD 0097 4#42 73/ 6 74/ 8 75/31 HDEV 9951 81/ 8 81/10 81#31 ATARI CAMAC Assembler Ver 1.0A Page 205 D1:DIGDUG.ASM HDIR 185A 7#35 81/46 82/22 84/28 HDOD 995F 81/14 81/16 81#34 HDUMMY 0099 4#44 24/57 51/43 51/45 51/48 65/41 66/14 84/12 84/22 91/27 100/18 100/48 113/32 113/40 116/ 9 116/35 119/59 120/11 120/31 124/25 128/31 HEAD 0000 159#30 159/45 HEDFET 1A1A 11# 7 160/33 160/35 161/31 HELEN 8691 25/22 28#46 HELPME 1A0D 10#52 172/44 172/47 172/52 172/55 HEND 9A6A 83/ 9 84# 7 87/37 HGETHE 0091 4#36 93/10 93/58 126/ 9 HIMOVE 1AA3 12#60 157/30 157/35 HITCLR D01E 2#13 175/12 HITCNT 1A75 12#35 98/47 125/ 8 125/13 125/18 125/23 HITGHO 1876 7#61 98/28 154/25 154/36 154/39 n HITS B8AD 175# 5 HITTY A007 97/ 5 98/24 98#42 HLEV 993E 81/11 81#25 HLOD 9946 81/17 81#28 HMOVE B3BF 157/13 157#19 HOCOUN 193D 9# 6 43/61 82/27 87/27 HOIN 9B95 58/25 82/35 87#23 90/21 n HOINFL 1A77 12#37 HOLDLE 1A0C 10#50 124/36 124/40 HOMAP 9B1F 83/52 85#59 87/38 HOONCE 1A0E 10#53 82/39 82/44 83/ 5 HOOUT 9A09 82/53 82/54 82/55 82/56 82/57 83# 7 HOROFF 002F 61/36 62/11 150#52 151/26 152/29 157/39 157/41 HOSTAT 00FC 5#57 43/28 83/53 83/54 83/58 84/35 84/53 85/18 85/29 85/49 87/30 87/33 87/39 88/12 HOVER 9B75 86/54 86#56 HOWHER 9A7B 83/ 8 84#18 87/36 HOWMAN 18C5 8#25 56/33 94/44 103/34 103/41 159/59 HPOKAD 1955 9#38 57/27 102/45 103/30 HPOKAP 189D 8#20 56/12 93/ 5 93/16 93/53 100/16 101/27 101/29 102/ 5 102/20 106/ 9 107/59 110/18 110/34 111/ 6 116/18 142/ 5 156/ 6 156/45 160/39 160/47 161/19 161/28 161/38 161/46 HPOS 18EF 8#30 105/10 108/ 6 108/15 110/23 110/43 111/14 116/31 HPOSM0 D004 2#21 159/10 HPOSM1 D005 2#22 159/ 7 HPOSM2 D006 2#23 158/61 HPOSM3 D007 2#24 158/58 HPOSP0 D000 2#17 47/41 65/39 78/54 173/25 HPOSP1 D001 2#18 58/21 61/37 90/60 99/10 99/28 110/51 111/17 116/39 HPOSP2 D002 2#19 58/22 90/61 HPOSP3 D003 2#20 62/13 62/50 158/55 HPUTHE 0093 4#38 93/ 6 93/54 95/34 95/47 95/61 96/28 96/52 98/10 98/17 128/16 HREV 992D 81/ 9 81#19 HROCK2 1930 8#50 50/10 HROCK3 1932 8#52 50/14 HROCKD 192E 8#48 50/18 HROCKP 1903 8#39 49/31 124/14 128/15 128/34 128/43 HROD 9935 81/15 81#22 ATARI CAMAC Assembler Ver 1.0A Page 206 D1:DIGDUG.ASM HSAVEP 18AD 8#22 56/30 57/26 93/57 102/33 103/31 160/11 HTAB 1A84 12#50 97/32 98/30 156/12 156/38 156/51 157/21 157/31 157/42 158/51 HTABFR 8A46 39#24 52/41 HTABTO 8A54 39#40 52/45 HVFLAG 1833 7#16 56/18 106/51 106/60 107/ 5 108/42 HZTPOS 00F3 5#48 47/40 57/47 73/30 73/52 74/ 5 74/18 74/55 75/19 75/28 75/42 78/53 85/22 85/53 86/11 87/52 88/ 5 133/48 133/51 IFLAGT 1A7F 12#45 164/ 6 164/14 165/18 n IIGLOO 858B 24#27 INDEX1 1A58 12# 8 34/28 34/42 35/43 INDEX2 1A59 12# 9 34/57 35/16 35/44 INIT 85D3 25/24 26#14 INITE 86E4 29/ 5 29#37 INT 0080 28#31 36/18 36/20 36/32 36/39 36/49 INUM 0020 154# 9 155/59 IPHASE 98B5 73/45 75/12 79#49 JDOWN 000D 2#51 68/ 9 70/39 80/56 JLEFT 000B 2#52 68/15 80/56 JMPWT 0041 28#29 36/53 JRIGHT 0007 2#53 68/21 80/56 JUP 000E 2#50 67/60 68/61 80/56 K 0400 1#31 13/29 197/35 197/39 197/43 197/47 197/47 KEYS 9126 48/17 48/38 57/42 58#50 59/29 90/25 LACARY AD8A 29#17 29/27 31#46 31/53 31#60 32/ 8 33#37 33/42 35#50 35/57 41#59 42/17 42#24 42/57 45#47 45/51 46#43 46/48 67#53 68/30 73#49 73/54 75#16 75/21 77#40 77/53 79#16 79/23 81#54 82/10 84#55 85/ 5 85#31 85/38 85#61 86/58 88#17 88/22 113#34 113/41 122#52 122/61 123#10 123/25 126#44 126/48 126#52 126/61 132#28 133/17 134#41 134/48 135#58 136/11 LCOUNT 00F5 5#50 47/47 69/ 6 70/41 72/46 73/12 74/21 74/26 75/46 75/51 LDUMMY 0098 4#43 39/ 5 39/ 7 39/11 51/36 51/38 51/40 65/30 65/32 66/16 73/48 73/53 75/15 75/20 84/14 84/20 91/25 91/47 100/15 100/32 100/39 100/50 116/ 8 116/17 116/43 118/39 118/49 119/58 120/10 120/29 120/50 120/55 124/27 128/29 LEFT 966E 48/39 68/19 72/51 73#20 n LEMO1H 1822 6#54 n LEMO1L 1821 6#53 n LEMO2H 1824 6#56 n LEMO2L 1823 6#55 n LEMO3H 1826 6#58 n LEMO3L 1825 6#57 n LEMO4H 1828 6#60 n LEMO4L 1827 6#59 LENGTH 193E 9# 7 84/26 85/60 LETTER 1A62 12#17 65/47 65/61 LEVCOL 941C 30/18 66/37 66#61 LFTSTM 8213 19#31 74/ 7 74/ 9 LFY A191 102/54 102/56 103# 8 LHPOS 93E9 65/38 66#21 LINES 1A3C 11#45 132/25 132/47 133/ 8 LINLFT 1808 6#36 146/ 8 146/57 146/58 148/31 149/21 149/22 ATARI CAMAC Assembler Ver 1.0A Page 207 D1:DIGDUG.ASM LIVE 181B 6#48 27/19 38/54 40/ 9 41/52 42/33 42/35 45/36 55/23 57/16 58/42 LMARGE 205D 4# 5 134/59 135/ 5 LMO 96DB 73/46 73/51 74#21 LOBELO 1A83 12#49 90/33 125/39 126/17 LOMOVE 1AA2 12#59 157/28 157/38 n LONGTU FFFE 4# 8 LOOPZ2 9EB6 95#24 96/ 6 LOOPZZ 9E77 94#50 128/23 LPO A19A 102/54 102/56 103#14 LPOKAD 1954 9#37 57/29 102/43 103/28 LPOKAP 1895 8#19 56/10 62/41 92/60 93/17 93/51 100/13 101/24 101/26 101/58 101/59 102/18 106/13 107/58 110/19 110/30 110/59 116/19 141/61 156/ 7 156/43 160/37 160/44 161/17 161/24 161/25 161/34 161/36 161/42 161/44 LPT 0014 3#56 18/57 18/57 18/57 18/57 18/57 18/57 18/57 18/57 18/57 18/57 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 19/ 7 106/10 106/14 LRPO1 8425 22# 8 102/49 102/51 103/19 LRPO2 843C 22#22 103/16 LRPO3 8460 22#36 103/17 LRPO4 8484 22#50 103/18 LSTIDX 00EE 5#44 49/14 49/22 49/51 53/26 53/33 53/44 53/45 54/16 54/26 54/27 55/33 55/47 55/51 55/52 57/10 M0PF D000 2#18 175/ 8 n M0PL D008 2#25 n M1PF D001 2#19 n M1PL D009 2#26 n M2PF D002 2#20 n M2PL D00A 2#27 n M3PF D003 2#21 n M3PL D00B 2#28 MAPPIT 9E68 93/40 94/24 94#42 MASK 9F01 95/16 95/18 95/20 96#10 MCONST 199F 10#22 170/24 171/57 MDELAY 0096 3#60 44/42 MELCNT 1973 10# 9 169/51 170/58 172/ 5 MEN 1809 6#42 27/24 38/41 92/24 137/26 140/32 MEND 184F 7#24 60/11 92/43 94/32 118/28 MENLEF 1969 9#57 137/28 137/34 MENLEV 1A1B 11# 9 27/20 140/13 140/33 MESSAG 00C7 5#27 64/ 5 64/ 7 65/24 65/26 65/28 65/46 65/48 65/50 MFOREV 000F 161#55 171/ 9 180/31 180/35 180/43 181/ 5 181/ 9 MFRAME 1A10 10#55 94/28 MGREEN 1845 7#20 56/38 92/55 118/ 8 118/22 MIRROR 8A5B 39/10 39#48 39/59 MMHI A188 101/36 102#55 MMLO A185 101/34 102#53 MNSLEF 1A11 10#57 55/28 56/50 57/44 58/12 58/17 62/48 92/12 120/ 9 125/17 125/19 126/39 MNSNUM 1874 7#59 156/23 156/42 MNSTDI 0001 3#49 42/30 62/44 94/10 106/29 119/20 MNSTEN 188D 8#18 42/ 6 42/10 42/14 42/26 42/31 55/40 ATARI CAMAC Assembler Ver 1.0A Page 208 D1:DIGDUG.ASM 56/43 62/36 62/45 90/ 8 90/11 90/48 90/51 92/50 93/12 93/44 93/60 94/ 7 94/ 9 94/13 94/15 94/19 94/22 96/32 96/57 106/20 106/30 110/17 112/14 113/ 6 118/ 6 118/20 118/46 119/21 160/14 MNSTON 00FF 3#47 93/45 113/ 5 118/ 5 118/45 160/13 MODELT 8C91 27/14 45/30 46#35 MODLEV 180D 6#44 45/55 46/50 49/11 54/22 55/30 MODULO 98A1 70/24 72/24 74/25 75/49 79#30 MONHIT 1858 7#33 83/25 83/39 87/25 96/23 96/38 MONIS 184D 7#22 93/23 93/37 MONNUM 1959 9#42 92/47 93/43 94/25 MONRK 1A0A 10#48 96/50 123/46 MONRKH 1A0B 10#49 96/53 123/48 MONSTA 00FD 3#48 110/16 112/13 118/19 MONSTE 9D96 60/14 92#45 94/34 118/30 MOONLY 00B4 5#13 92/49 94/37 96/20 MOVEM 9195 59/50 59/51 59/54 60# 5 MPPTR 197B 10#13 168/55 169/56 171/19 MREPCN 1977 10#11 169/54 171/ 8 171/11 172/15 MSG 937E 64/10 65#21 MTAB B8ED 168/11 168/14 176# 5 MTIME 198F 10#18 169/ 5 169/21 170/57 MTIMER 1A13 10#59 44/43 MULT B24E 152/26 153#32 MUNIT B56B 29/14 44/53 89/58 162# 9 MUSICK B580 36/ 8 163#26 175/30 MYTEMP 00FD 5#58 39/53 39/56 52/29 52/33 52/34 83/12 83/28 83/42 84/24 87/14 87/18 100/ 7 100/22 NA 0001 192#57 193/14 193/14 193/14 193/14 193/16 193/16 193/17 193/17 193/18 193/18 193/19 193/19 193/21 193/21 193/22 193/22 193/23 193/23 193/24 193/24 193/25 193/25 193/27 193/27 193/28 193/28 193/29 193/29 193/30 193/30 193/31 193/31 193/33 193/33 193/34 193/34 193/35 193/35 193/36 193/36 193/37 193/37 193/39 193/39 193/40 193/40 193/41 193/41 193/42 193/42 193/43 193/43 193/44 193/44 193/46 193/46 193/47 193/47 193/48 193/48 193/49 193/49 193/50 193/50 193/52 193/52 193/53 193/54 193/55 193/57 193/57 193/58 193/58 193/59 193/59 193/60 193/61 193/61 194/ 5 194/ 5 194/ 7 194/ 7 194/ 8 194/ 8 194/ 9 194/10 194/10 194/11 194/12 194/12 194/14 194/14 194/15 194/16 194/16 194/17 194/18 194/18 194/19 194/19 194/21 194/21 194/22 194/23 194/23 194/24 194/24 194/25 194/27 194/27 194/28 194/29 194/30 194/30 194/31 194/33 194/34 194/34 194/35 194/36 194/37 194/37 194/39 194/39 194/40 194/41 194/41 194/42 194/43 194/45 194/45 194/46 194/46 194/47 194/47 194/48 194/48 194/49 194/50 194/52 194/53 194/53 194/54 194/55 194/55 194/56 NEWGAM 8614 25/28 27# 6 NEWGHO 1AB0 13#12 42/ 8 106/26 155/39 155/47 NEWLEV 8BD9 40/21 45# 9 NEWMAN AEB7 139/32 140#11 NEWMAP 1802 6#30 49/ 8 49/32 49/34 49/59 55/26 56/45 56/47 57/15 NEXGHO B2FF 155/ 9 155#26 ATARI CAMAC Assembler Ver 1.0A Page 209 D1:DIGDUG.ASM n NGSW 0000 154#11 NLFLAG 1A2D 11#33 38/34 40/20 57/18 NMIEN D40E 3# 5 26/34 28/59 143/35 143/46 n NMIST D40F 3# 6 NOBONV ACC8 91/17 133/34 133#60 NOGHO 1863 7#47 40/60 41/32 61/59 63/60 89/27 105/38 105/55 154/15 NOPLAY B83C 28/61 63/53 173#17 NOSOUN B854 25/27 29/15 44/54 89/59 173#38 175/24 NPRSNS 1800 6#24 27/ 8 38/44 38/51 NSQUAR 0009 4# 7 144/34 NTIME 196A 9#61 163/56 164/ 9 164/15 165/17 165/24 NTUNE 00F6 5#51 33/14 33/25 40/53 41/34 44/48 58/27 60/20 60/26 61/ 5 68/32 68/36 68/44 68/48 82/50 89/61 91/23 92/15 98/51 112/31 113/14 113/21 119/16 119/25 124/53 127/12 133/57 140/36 163/58 164/24 165/40 165/42 165/57 NUBFLG 1A5A 12#10 26/53 29/48 132/45 NUM 185C 7#40 151/15 151/18 152/23 153/18 153/19 153/34 153/44 153/47 153/51 153/52 NUMBYT 0011 3#57 79/22 NUMMEN 0003 3#54 27/23 NXTLIN B198 146/55 149/19 150#29 n NXTPAG mac 1#41 ODHODA 9924 81#12 84/44 84/47 OFFSET 194B 9#24 78/19 78/21 78/36 78/38 123/54 OHGOD B72B 169/57 169#59 n OKFIRE 1AAA 13# 9 OLDGHO 1AB4 13#13 42/12 156/48 159/37 160/18 OLDJOY 1941 9#10 44/46 68/29 68/43 OLDMAP 1801 6#29 49/ 6 49/25 49/54 55/24 55/55 56/57 ONELEF 91E9 58/15 60#56 ONETIM 85B7 25/13 25#37 OPPCUR 183C 7#18 104/13 104/24 104/37 OPTCOL 8848 35#29 35/52 OPTCUL 00BC 5#21 35/55 OSCR 0020 41/36 63#20 OTUNE 00F7 5#52 44/49 60/17 68/33 68/45 113/17 163/59 164/25 165/12 165/26 165/41 165/54 165/58 n OUT B80E 172#31 OUTPUT 9820 73/ 9 77/20 77#38 n P0PF D004 2#22 n P0PL D00C 2#29 n P1PF D005 2#23 n P1PL D00D 2#30 P1READ 9319 64/17 64/21 64#29 64/38 64/48 n P2PF D006 2#24 n P2PL D00E 2#31 P2READ 932D 64/18 64/22 64#39 n P3PF D007 2#25 n P3PL D00F 2#32 PACK B03E 40/ 7 145#38 PADR 008A 4#28 43/25 158/19 158/23 158/50 159/15 PADRH 008B 4#29 44/36 158/17 PAIR 8E69 51#33 52/ 9 52/14 52/17 PAUSE 1A79 12#39 58/58 58/60 59/19 154/28 157/11 175/22 PCOLR0 02C0 2# 7 65/37 66/54 ATARI CAMAC Assembler Ver 1.0A Page 210 D1:DIGDUG.ASM PCOLR1 02C1 2# 8 61/35 112/39 113/44 116/37 PCOLR2 02C2 2# 9 66/55 PCOLR3 02C3 2#10 26/42 43/58 62/10 62/53 66/56 119/45 PCONTR A1CE 93/47 104# 8 159/55 PCOUNT 195B 9#44 94/45 95/23 126/ 5 PDATA1 89AF 31/48 37#50 PDATA2 89D7 32/ 5 33/39 37#57 PEEK 8E81 52# 5 52/32 PERSON 00ED 5#43 27/32 38/31 40/ 6 40/33 40/35 41/19 41/38 44/56 45/34 46/20 47/33 49/58 50/24 54/21 56/49 57/14 57/33 57/43 58/ 5 58/11 58/16 62/47 63/55 64/12 66/35 90/30 90/41 91/13 92/11 92/23 120/ 8 125/16 126/38 131/30 133/20 133/27 133/40 133/58 134/10 134/39 144/10 144/42 147/11 149/36 172/45 172/53 PFDATH A182 56/29 102/44 102#50 160/10 PFDATL A17F 56/27 102/42 102#48 160/ 8 PFFLAG 1885 8#17 56/24 104/54 122/20 142/14 155/61 PFTABL 1864 7#52 156/ 5 158/34 PGHOS1 854D 23/49 23#52 23/55 PGHOS2 8555 23/50 23#57 PHADIR A18B 101/47 102#58 PHASE 194C 9#25 47/53 72/57 76/38 76/39 77/ 9 79/50 80/ 5 80/11 PHMASK 00E9 5#41 94/49 95/15 128/18 PHTABL 8587 24#23 151/53 PHTABR 8587 24#22 151/44 PIFFY A757 56/25 102/40 116/10 122#18 160/ 6 PINK 0046 3#40 35/30 35/33 PIXEL 1807 6#34 146/ 6 146/25 146/39 147/27 147/36 148/47 149/47 PKORFY B432 155/18 158#32 n PLACE 2060 28#23 PLANUM 1862 7#46 154/48 155/33 158/10 158/53 PLAY B676 165/48 167#40 PLAY0 1C00 13#31 79/19 91/48 173/56 PLAY1 1D00 13#32 44/35 61/41 113/37 120/51 PLAY2 1E00 13#33 61/44 120/56 PLAY3 1F00 13#34 62/19 158/12 PLAY4 1B00 13#30 158/15 PLAYLO 90A0 40/61 57#40 58/18 PLYER1 2010 28#19 31/49 36/19 PLYER2 202C 28#20 32/ 6 33/40 33/49 PLYONE 9341 64/33 64#50 PLYTWO 9351 64/43 64#55 PMAREA 1800 13#28 13/30 13/31 13/32 13/33 13/34 25/17 197/39 PMBASE D407 2#14 25/18 PMOVES A0E9 93/48 101#16 PO 0000 192#55 193/16 193/18 193/19 193/22 193/23 193/25 193/29 193/30 193/31 193/33 193/35 193/37 193/41 193/42 193/44 193/50 193/53 193/54 193/54 193/54 193/55 193/58 193/59 193/60 193/60 193/60 194/ 8 194/ 9 194/ 9 194/ 9 194/12 194/14 194/15 194/15 194/15 194/17 194/22 194/24 194/25 194/27 194/29 194/29 194/29 194/31 194/31 194/34 194/35 194/35 194/35 194/37 194/39 194/40 194/40 194/40 194/43 ATARI CAMAC Assembler Ver 1.0A Page 211 D1:DIGDUG.ASM 194/43 194/45 194/46 194/50 194/50 194/50 194/53 194/54 194/54 194/54 194/56 194/56 POOPHA 18BD 8#24 56/41 94/46 94/48 100/ 9 101/46 101/49 101/50 102/29 112/ 7 151/40 151/49 159/52 PRIOR 195C 9#45 104/20 104/33 104/34 PSCR 0040 38/56 40/11 40/17 63#19 PTRFR 00E5 5#39 39/50 51/35 52/40 52/42 PTRTO 00E7 5#40 39/57 52/12 52/15 52/20 52/44 52/46 PUMP 996D 57/54 81#38 PUMPFL 00FE 5#59 43/27 58/23 67/50 82/17 82/33 83/61 85/ 7 85/20 85/40 85/51 86/23 88/11 90/19 119/27 PUT 1A3E 11#47 132/31 132/35 132/50 132/59 132/61 133/ 5 PUTHER 0092 4#37 92/61 93/52 95/27 95/30 95/32 95/40 95/43 95/45 95/52 95/55 95/57 95/59 96/25 96/49 98/ 7 128/14 PUTRUN B0B6 146/38 147/10 147#14 QSCNT 00AF 5# 7 167/43 167/45 167/51 QSNAD 00AD 5# 6 170/ 9 170/11 170/20 170/27 171/44 171/50 171/56 QTEMB2 00AA 4#60 168/22 168/26 168/28 169/12 QTEMB3 00AB 4#61 168/30 QTEMB4 00AC 5# 5 168/ 8 169/ 6 QTEMP 00A6 4#58 168/38 168/42 168/46 168/49 168/50 168/52 168/54 171/38 171/40 171/43 171/49 171/61 172/10 172/16 QTEMP1 00A8 4#59 168/13 168/15 168/20 168/34 168/35 168/40 QXSAV1 00B0 5# 8 169/48 170/23 170/43 QXSAV2 00B1 5# 9 169/50 170/21 170/41 RANIMA 191B 8#43 49/44 123/32 124/59 124/60 RC 1806 6#33 50/37 50/41 50/57 65/25 65/40 RCKCO 181F 6#50 40/25 43/12 45/39 RCOUNT 00F4 5#49 47/45 69/ 9 70/44 72/35 73/11 74/22 74/27 75/45 75/50 RDALLY 1A4A 11#56 49/40 124/ 8 124/10 RDBUTT B81D 81/41 82/42 172#51 RDSTCK B80F 67/52 81/43 82/19 172#43 READJO 9433 57/57 67#47 READY 8CE4 47/18 47#38 53/41 RED 0044 3#39 18/13 35/33 66/51 115/53 n REGAME 85A5 25#23 RELOAD 0040 28#30 36/18 36/20 36/23 36/30 36/34 36/41 36/45 36/50 REM 1861 7#43 151/22 151/27 151/43 151/45 151/52 151/54 151/57 153/22 RENABL 1915 8#42 42/38 42/44 49/21 49/36 122/54 123/12 125/36 REOPT 8598 25#14 59/17 197/ 8 REPTFI 0003 3#59 44/40 112/17 RESTRT 89F4 25/30 38#22 58/43 92/28 REVCHK 00B2 5#11 160/38 160/40 160/46 160/49 160/53 160/61 REVERT B47A 57/53 159#33 REVRS1 984B 69/54 71/51 71/54 72/54 75/23 76/61 77/15 77/18 78#18 84/30 84/58 84/60 85/19 85/50 127/32 127/34 REVRSE 984E 69/55 71/52 71/55 77/16 77/19 78#20 RFILL 190F 8#41 49/42 127/28 128/ 9 ATARI CAMAC Assembler Ver 1.0A Page 212 D1:DIGDUG.ASM RFY A1A3 102/54 102/56 103#20 RGOBOO 1875 7#60 97/19 97/59 127/17 127/26 RHOLD 1921 8#44 49/47 124/56 124/57 125/47 RIGHT 96F9 47/30 48/35 48/36 68/25 72/40 74#45 n RIMO1H 182A 7# 5 n RIMO1L 1829 6#61 n RIMO2H 182C 7# 7 n RIMO2L 182B 7# 6 n RIMO3H 182E 7# 9 n RIMO3L 182D 7# 8 n RIMO4H 1830 7#11 n RIMO4L 182F 7#10 RMO 9766 75/13 75/18 75#45 ROCK A79D 57/61 90/29 123# 8 ROCK1D 84A8 23#12 50/15 50/17 125/52 125/56 ROCK2 192F 8#49 50/ 8 ROCK2D 84CA 23#18 50/ 7 50/ 9 125/52 125/56 ROCK3 1931 8#51 50/12 ROCK3D 84E7 23#24 50/11 50/13 125/52 125/56 ROCKCD 8526 23#37 125/51 125/55 ROCKCO 1933 8#53 29/44 40/26 43/11 125/40 131/34 ROCKD 192D 8#47 50/16 ROCKP 18FD 8#38 49/29 124/18 128/13 128/32 128/39 128/41 ROCKQD A766 122#43 125/53 125/57 ROCKSD 8508 23#31 125/51 125/55 ROKLEV BE9B 49/13 191#58 ROKLST BF6B 49/23 191/59 191/60 191/61 192/ 5 192/ 6 192/ 7 192/ 8 192/ 9 192/10 192/11 192/12 192/13 192/14 192/15 192/16 192/17 195# 9 ROMDBS 867B 25/29 27#48 ROUND 194F 9#32 47/61 79/31 79/33 79/40 ROWCOL 1A38 11#42 55/49 56/ 7 RPUT A78A 50/22 122#49 RTSTMP 8293 19#51 75/30 75/32 RUCKUS mac 195# 5 195/12 195/13 195/14 195/17 195/18 195/19 195/20 195/23 195/24 195/25 195/26 195/29 195/30 195/31 195/32 195/33 195/36 195/37 195/38 195/39 195/40 195/43 195/44 195/45 195/46 195/49 195/50 195/51 195/52 195/55 195/56 195/57 195/58 195/61 196/ 5 196/ 6 196/ 7 196/ 8 196/11 196/12 196/13 196/14 196/17 196/18 196/19 196/20 196/23 196/24 196/25 196/26 196/29 196/30 196/31 196/32 196/35 196/36 196/37 196/38 196/41 196/42 196/43 196/44 196/47 196/48 196/49 196/50 RUDDY 9361 64/36 64/46 64#60 RUMBLE 1909 8#40 49/38 123/16 124/48 126/14 126/19 126/25 RUN1 0400 13#38 18/41 18/44 RUN2 0E00 13#48 18/42 18/45 RUNH 81C6 18#43 145/50 148/18 RUNHER 858E 24#41 197/14 RUNL 81C4 18#40 145/48 148/16 RUNPTR 0086 4#25 145/49 145/51 147/28 147/38 147/41 147/46 147/47 147/49 148/17 148/19 149/44 150/10 150/16 150/17 150/19 SANDY 8EC6 45/32 52#56 SAVE 1956 9#39 95/14 96/ 8 96/31 96/55 SAVEPP 18A5 8#21 56/28 57/28 93/55 102/36 103/29 160/ 9 ATARI CAMAC Assembler Ver 1.0A Page 213 D1:DIGDUG.ASM SAVERN 1855 7#29 97/12 98/25 123/49 127/18 SAVORG 8691 28#17 28/25 SBLUE 00CA 5#31 16/48 SCANBE 184E 7#23 93/28 93/31 SCHIGH AEE9 41/35 140#48 SCMND B634 165/46 165/55 166#37 SCOREH 180F 6#45 25/45 27/16 138/12 139/29 139/31 139/48 140/51 140/60 140/61 142/35 142/49 143/ 8 143/61 SCOREL 1817 6#47 25/47 27/18 138/18 139/23 139/25 139/56 140/55 141/ 7 141/ 8 142/39 142/53 143/12 144/ 8 SCOREM 1813 6#46 25/46 27/17 138/14 139/26 139/28 139/52 140/53 141/ 5 141/ 6 142/37 142/51 143/10 144/ 6 SCORLI 3F50 13#23 15/36 33/56 36/21 136/61 137/40 138/39 138/45 139/ 6 139/ 8 SCOSET 8000 14#24 35/26 64/27 197/43 SCR 2010 13#20 13/22 15/42 16/13 26/48 26/50 28/18 52/60 53/ 5 77/60 86/ 6 86/ 8 86/16 86/19 86/30 86/33 106/10 106/14 124/15 145/44 145/46 148/12 148/14 148/20 148/22 151/14 151/17 152/39 152/42 197/35 SCREEN 008E 4#33 47/14 53/37 53/52 53/54 69/15 70/53 73/24 74/49 76/52 77/44 78/ 7 78/ 8 78/23 78/24 78/40 78/41 84/ 8 84/15 84/19 123/45 124/28 124/34 124/38 127/37 127/39 127/41 127/43 127/45 127/47 127/49 127/51 127/53 127/55 127/58 127/60 128/ 5 128/ 7 128/28 128/33 SCRENH 008F 4#34 47/17 53/39 53/56 69/13 69/16 70/48 70/49 70/50 70/51 70/54 70/55 70/56 70/57 73/23 73/25 74/48 74/50 76/54 77/46 77/59 78/26 78/43 84/10 84/13 84/21 123/47 124/26 128/30 128/35 SCRPTR 0084 4#24 30/36 30/38 52/61 53/ 6 54/42 54/49 54/50 54/52 145/45 145/47 145/58 146/13 148/13 148/15 149/ 8 149/25 149/28 150/31 150/33 150/35 SDEEMP 00CC 5#33 16/54 SDLSTH 0231 3#21 28/53 63/45 SDLSTL 0230 3#20 28/51 63/43 SDMCTL 022F 3#18 26/21 29/13 63/40 63/49 SEMPH 00CB 5#32 16/49 SET21 948E 68/ 6 68/12 68/18 68/24 68#42 SETANW 98D0 69/48 71/46 80#19 SETCLR 93ED 63/32 66#31 SETFLO ADB1 135/38 135/45 136#27 SETLIN 8F6F 30/41 53/ 9 53/12 53/16 53/19 54#38 SETMOD 96EC 74/23 74#30 75/47 SETPOI 8EB1 39/ 8 52/31 52#38 SETPOK 8F88 40/34 55# 7 SETRL A1C3 101/38 103#39 SETROK 8D75 40/28 48#56 SETSCO ADC2 27/28 32/10 136#54 SETSCR 92B7 38/57 40/12 40/18 40/45 41/37 63#22 SETUD A1AC 101/30 102/11 102/17 103#27 SETUDR A1B8 103#32 128/22 SETUP A373 110#14 112/45 SETVBV E45C 3#25 26/26 28/57 SHIFT 00FF 5#60 42/21 42/34 42/41 42/50 42/55 49/16 49/33 49/50 55/ 9 55/13 55/18 55/35 56/46 ATARI CAMAC Assembler Ver 1.0A Page 214 D1:DIGDUG.ASM 56/54 SHOBON AE16 138# 6 141/51 n SHOHIS AE11 137#59 SHOMEN ADDD 27/34 40/24 137#25 140/37 144/18 SHOSCO AE18 32/12 33/44 137/14 137/16 138/ 5 138# 8 144/12 144/44 SHOVE AE38 138/13 138/15 138/19 138#22 SHOVEG 8717 30#15 32/13 33/15 SHOW mac 1#50 4/17 6/ 7 6/14 13/16 13/20 13/28 13/38 13/48 13/60 14/10 14/12 15/17 16/35 17/56 24/30 28/10 38/ 9 52/50 57/38 62/58 67/33 80/44 88/28 92/32 103/48 109/11 113/50 122/32 128/49 134/18 136/41 145/10 150/43 152/50 153/61 159/22 161/53 172/36 174/36 175/58 191/28 196/58 SINDAT 898B 31/50 37#40 SING 873B 29/ 9 31#43 SINGLE 2038 28#21 31/51 32/23 36/42 n SIZEM D00C 2#30 SIZEP0 D008 2#26 65/35 173/26 SIZEP1 D009 2#27 111/42 116/41 n SIZEP2 D00A 2#28 SIZEP3 D00B 2#29 62/ 7 62/51 SLEVEL 1A51 11#59 25/54 27/11 30/17 30/22 32/59 32/60 33/ 7 33/11 SLINES 00C8 3#58 13/21 53/17 146/ 7 148/30 SM0PF 1A1D 11#15 154/53 175/ 9 SM0PL 1A25 11#23 89/29 SM1PF 1A1E 11#16 154/54 SM1PL 1A26 11#24 89/30 SM2PF 1A1F 11#17 154/55 SM2PL 1A27 11#25 89/31 SM3PF 1A20 11#18 154/56 SM3PL 1A28 11#26 89/32 SNSTAT 199B 10#21 162/16 163/36 167/ 6 167/46 168/59 172/27 SONGS 876F 29/24 32#16 SONSTE 9D8F 57/31 57/32 57/55 62/46 90/26 90/57 90/58 92#40 SP0PF 1A21 11#19 43/26 89/19 n SP0PL 1A29 11#27 SP1PF 1A22 11#20 61/52 SP1PL 1A2A 11#28 89/37 n SP2PF 1A23 11#21 n SP2PL 1A2B 11#29 SP3PF 1A24 11#22 154/50 SP3PL 1A2C 11#30 89/33 SPACE 0021 2#57 58/54 SPAIR 8E9E 40/29 52#27 SPECIA B610 165/36 165#52 SPEED 1850 7#25 45/54 59/44 60/37 60/49 SPEEDC 91CA 59/41 60#36 SPEEDD 916F 59/40 59#43 SPEEDS 9168 57/56 59#38 SPOS 8062 14#57 138/11 SQUARE 1A76 12#36 144/32 144/33 144/37 SRED 00C9 5#30 17/16 SSTICK 193F 9# 8 67/55 68/60 70/38 ATARI CAMAC Assembler Ver 1.0A Page 215 D1:DIGDUG.ASM STAR 88F0 36/46 37#16 STARTH 196F 10# 7 168/41 171/24 171/26 171/39 STARTL 196B 10# 6 168/36 171/20 171/23 171/37 STATE 194D 9#26 78/55 78/57 STICK0 0278 2#46 172/46 n STICK1 0279 2#47 STRIG0 0284 2#48 29/25 32/18 59/30 172/54 STRIG1 0285 2#49 29/26 59/31 STRIP B00C 142/ 9 144#52 144/53 STRIPL 0005 142/ 7 144#53 STUCK 1A66 12#22 111/55 112/60 SWAPIN 8A27 38#60 40/32 n SWIDAT 89A2 37#45 SWITCH 204F 28#22 31/58 33/31 TABDDD 9810 75/55 75/58 75/61 76/ 7 77#23 TABFR 8A3F 39#16 52/39 TABFRU AA14 129# 9 132/ 6 132/ 8 TABLEA 81F2 19#14 76/41 TABLED 820A 19#22 69/53 TABLEL 820E 19#23 74/14 TABLER 8206 19#21 75/37 TABLEU 8202 19#20 71/50 TABLEX 81F3 19#13 19/14 76/40 TABTO 8A4D 39#32 52/43 TCBYT 81E6 19# 8 51/ 6 TELLMO 1A09 10#46 94/38 96/47 123/50 TFLAG 1803 6#31 47/ 7 49/10 51/11 53/29 55/29 TGNOW 8C77 46/14 46#28 THATON 1A6A 12#25 45/29 89/13 THDIR 990C 80#55 84/27 THERE 009C 4#47 83/15 83/19 83/33 83/45 83/46 84/ 9 86/18 86/32 86/39 86/42 86/51 86/53 87/ 9 87/13 87/19 96/26 THEREH 009D 4#48 83/17 83/49 84/11 86/ 5 86/15 86/29 86/55 96/29 TIMER 1851 7#26 45/57 45/61 46/10 60/40 60/41 60/43 60/45 60/50 TIMES 1957 9#40 48/10 48/25 48/32 48/46 TITEL 88B8 36/24 36#61 TL 00C8 18#51 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 18/57 18/57 18#57 TLENGT 9907 80#53 84/25 TMONNU 195A 9#43 57/21 TMONUM 1A2E 11#34 55/27 56/55 57/20 TMPEND 193A 8#60 91/44 91/51 116/11 116/33 120/44 120/61 TN 0000 192#54 193/19 193/25 193/31 193/37 193/44 193/50 193/55 193/55 194/ 5 194/12 194/19 194/25 194/25 194/31 194/31 194/37 194/43 194/43 194/50 194/50 194/56 194/56 TNUMRO 1856 7#30 49/ 9 49/53 122/60 123/24 TOFFSE 9911 80#57 84/29 TR 1F40 18#58 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 ATARI CAMAC Assembler Ver 1.0A Page 216 D1:DIGDUG.ASM 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 19/ 7 19/ 7 19# 7 TRBYT 81D2 18#59 50/50 50/53 TRY A06A 100# 6 104/29 TSPEED 8C65 45/58 46#23 TUNADR 8E19 47/10 49/27 50#36 53/35 56/ 8 TUNE11 1944 9#15 119/22 119/26 120/13 TUNE12 1A7E 12#44 124/50 124/54 125/37 TUNE13 1A7D 12#43 125/38 127/ 9 127/13 TUNE14 1945 9#18 112/28 112/32 113/12 TUNE15 1A7C 12#42 82/47 82/51 88/10 TUNE16 1943 9#14 119/12 119/15 120/14 120/23 TUNE6 1A7A 12#40 60/58 61/ 6 n TUNE8 1A67 12#23 TUNE9 1A7B 12#41 60/23 60/27 TUNEND 1A80 12#46 163/34 165/35 TUNLEN 1A39 11#43 25/57 45/14 45/19 53/57 54/ 7 TUNLEV BE8B 54/24 55/32 191#40 n TUNLIN 81C8 18#52 TUNLST BEAB 53/34 53/46 55/48 55/53 191/41 191/42 191/43 191/44 191/45 191/46 191/47 191/48 191/49 191/50 191/51 191/52 191/53 191/54 191/55 191/56 193#12 TUNNEL mac 192#59 193/14 193/16 193/17 193/18 193/19 193/21 193/22 193/23 193/24 193/25 193/27 193/28 193/29 193/30 193/31 193/33 193/34 193/35 193/36 193/37 193/39 193/40 193/41 193/42 193/43 193/44 193/46 193/47 193/48 193/49 193/50 193/52 193/53 193/54 193/55 193/57 193/58 193/59 193/60 193/61 194/ 5 194/ 7 194/ 8 194/ 9 194/10 194/11 194/12 194/14 194/15 194/16 194/17 194/18 194/19 194/21 194/22 194/23 194/24 194/25 194/27 194/28 194/29 194/30 194/31 194/33 194/34 194/35 194/36 194/37 194/39 194/40 194/41 194/42 194/43 194/45 194/46 194/47 194/48 194/49 194/50 194/52 194/53 194/54 194/55 194/56 TWOTWO 1A2F 11#35 25/53 27/ 7 31/54 33/21 33/23 33/30 137/11 TY 0008 54/11 57/ 8 192#53 193/14 193/16 193/17 193/18 193/21 193/22 193/23 193/24 193/27 193/28 193/29 193/30 193/33 193/34 193/35 193/36 193/39 193/40 193/41 193/42 193/43 193/46 193/47 193/48 193/49 193/52 193/53 193/53 193/54 193/54 193/57 193/58 193/59 193/60 193/60 193/61 194/ 7 194/ 8 194/ 9 194/ 9 194/10 194/11 194/11 194/14 194/15 194/15 194/16 194/17 194/17 194/18 194/21 194/22 194/22 194/23 194/24 194/27 194/28 194/28 194/29 194/29 194/30 194/33 194/33 194/34 194/35 194/35 194/36 194/36 194/39 194/40 194/40 194/41 194/42 194/42 194/45 194/46 194/47 194/48 194/49 194/49 194/52 194/52 194/53 194/54 194/54 194/55 UCOUNT 194E 9#31 47/49 70/22 70/26 72/21 72/25 76/15 76/33 UFLAG 1951 9#34 47/59 69/36 72/27 72/29 76/37 UNFELL 181D 6#49 41/53 42/40 42/42 45/37 49/ 5 49/60 UNPACK B0EC 40/13 148# 6 UP 9549 48/13 48/14 48/15 68/ 7 69/38 70#37 71/38 76/20 ATARI CAMAC Assembler Ver 1.0A Page 217 D1:DIGDUG.ASM UPDWNH A18F 101/28 103# 5 UPDWNL A18D 101/25 102#60 UPSTMP 19B5 10#28 72/ 8 72/ 9 72/10 72/12 72/13 72/14 72/15 72/16 72/18 72/19 80/23 80/24 80/30 80/31 80/32 80/33 80/37 80/38 V 0000 192#52 193/16 193/19 193/23 193/29 193/30 193/34 193/35 193/40 193/41 193/42 193/49 193/54 193/54 193/60 193/60 193/61 194/ 8 194/12 194/15 194/15 194/16 194/19 194/21 194/22 194/22 194/23 194/27 194/34 194/37 194/39 194/43 194/43 194/47 194/48 194/50 194/50 194/53 VBI B898 26/23 26/24 174#40 VBIHEL 8851 28/54 28/55 35#37 VCHASE 1A41 11#52 57/50 61/10 105/ 5 108/29 157/52 VCOUNT D40B 3#13 93/29 93/34 VDSLST 0200 3#19 16/57 16/59 17/24 17/26 26/28 26/30 34/38 34/40 35/12 35/14 35/46 35/48 174/47 174/49 VEDGEL A9F0 128#54 133/47 VEDGER AA02 128#59 133/50 VEG 22B8 28#24 29/39 29/41 30/35 30/37 36/35 VEGFLG 1962 9#52 45/41 91/14 133/21 133/30 VEGOUT AC03 132#16 134/ 8 VEGTH 00A3 4#55 132/20 133/15 VEGTIH 1961 9#51 45/45 131/41 131/44 131/53 133/33 VEGTIL 1960 9#50 45/44 131/40 131/46 131/48 131/51 133/32 VEGTL 00A2 4#54 132/18 132/60 133/10 133/13 VERASE 1964 9#53 29/46 29/47 45/42 131/31 133/28 134/11 VIRSCR 2010 13#22 50/51 50/54 62/25 62/26 VLEVEL 88CA 36/31 37#10 VMOVE B3F0 157/14 157#46 VOL 1987 10#16 169/30 169/33 169/37 170/34 170/39 VPOS 18E7 8#29 104/61 107/61 108/31 110/21 111/25 116/29 120/34 VRTCL 1A60 12#15 64/ 9 65/42 VRTCL1 1A61 12#16 65/43 66/ 8 66/11 VRTOFF 001F 61/ 9 61/41 61/44 62/17 150#53 151/31 152/22 VRTPOS 00F2 5#47 47/43 53/43 57/49 69/20 69/41 69/42 69/50 69/51 69/61 70/ 5 71/10 71/40 71/41 71/47 71/48 71/61 72/ 5 79/14 85/ 9 85/42 87/47 87/57 91/40 133/35 VTAB 1A88 12#51 97/39 98/31 154/45 156/10 156/39 156/52 157/47 157/50 157/60 158/27 158/49 VTUNE 197F 10#14 58/33 58/36 90/35 92/18 162/18 166/49 169/ 7 172/29 WAIT 942A 58/28 58/40 63/54 64/11 67#21 92/16 WAIT2D 1A0F 10#54 90/18 90/38 WAITS B82D 173# 5 173/ 7 WARMST 0008 196#59 197/ 6 WARNIN 000C 4# 9 112/22 n WHCHMN 1883 8#11 n WHICHG 187A 8# 5 WHICHM 1AA8 13# 7 81/39 82/12 82/16 96/36 96/45 99/31 99/33 119/55 WHITE 000F 3#37 26/41 30/ 7 35/30 35/31 43/57 65/36 66/53 WHODEA 1966 9#54 41/54 42/49 42/51 45/43 55/12 ATARI CAMAC Assembler Ver 1.0A Page 218 D1:DIGDUG.ASM WIPE B860 47/ 5 61/29 62/ 5 65/33 91/38 92/ 9 112/49 116/61 173/31 173#50 WIPEIT 00C5 5#26 66/ 9 173/57 173/59 174/ 5 WSYNC D40A 2#61 16/50 17/17 17/42 34/31 34/60 XEXIT 194A 9#23 72/61 76/42 77/52 XVOL 1983 10#15 170/38 172/19 n YELLOW 002A 3#41 ZAP B40D 155/ 6 155/17 158# 8 ZAPGHO 1870 7#55 158/18 158/28 ZDOWN 0002 107#46 108/34 126/57 193/16 193/30 193/35 193/41 193/42 193/49 193/60 193/60 194/ 8 194/15 194/16 194/22 194/22 194/27 194/34 194/39 194/43 194/43 194/50 194/50 ZDWNST 865A 27#39 27/52 ZERDAT 19C5 10#29 27/60 93/ 7 93/ 9 125/51 125/55 133/61 134/ 6 ZERM A5A2 116#51 117/51 119/53 120/24 ZEROES 1A75 12#34 43/21 ZLEFT 0003 107#47 108/12 193/18 193/22 193/25 193/27 193/28 193/37 193/39 193/46 193/47 193/53 193/55 193/57 193/59 194/ 7 194/ 9 194/ 9 194/10 194/11 194/14 194/18 194/25 194/28 194/29 194/29 194/31 194/33 194/35 194/35 194/36 194/40 194/40 194/41 194/42 194/46 194/49 194/52 194/55 194/56 ZMASK 00EA 5#42 95/17 95/19 95/21 95/26 95/39 95/51 ZRIGHT 0001 107#48 108/18 193/17 193/21 193/24 193/31 193/33 193/36 193/43 193/44 193/48 193/50 193/52 193/53 193/55 193/58 194/ 5 194/11 194/17 194/17 194/24 194/25 194/28 194/30 194/31 194/33 194/36 194/42 194/45 194/49 194/52 194/54 194/54 194/56 ZUP 0000 107#45 108/26 126/55 193/19 193/23 193/29 193/34 193/40 193/54 193/54 193/61 194/12 194/15 194/19 194/21 194/23 194/37 194/47 194/48 194/53 n ZUPSTM 866B 27#44 ›