ML}  X c0C)HCCH Mhhݩh `eCDiCD`  RWH   * 1H0芢@) Y0.Ș`i#(PMRR\ \b Pgi 0 @ $ ࠮UY   0DDԝLH}iN@ )?HI   Y0`HIJH)* J j *  hJJJ)HJ   h i   }  YS S0 i`ϣ߳ϣ߳H J3x}j2h)1 |9 ӭ45(420 *(0241өX.`  J *^)Lkl  }v*PE 5 LN(G = gh ` ghgL ( = LG(0d( L ^E0O +)$IC} H K8 f e h |  _ 8cd CDLI CFa M  LG J^)La`2' }")*F$F$F$F$F$ 5 )ШF/Șa]`efС,LI/A! L^)Za`@ ܬ/^)( }")")`$F$F$F 5$/L /aF@__(LN`ae$$%8(`()` J 0 =LG J^)^>_f t Fg }Ch) |kl5\   Zc[d ?akl LI@^Le>_ >L vJjjj^^ e } fE]_agh`LI:$ȱ$@+[_#{ 0  Խji! ai 0 = I   } U C H h  ˰ 0  F  | Le =  ,  S `LI ,/ 0 v/ | Ơ?} ѩ/  S /L_0?MdLc >_MfLe N`aLGLIcLdMaNLG }J"(+ըHH`Q R !   $ . FȑF! /GF \H"+0+* }! F sLIcm: J~cTF1F  *c+)5! c (, c)1JJJc(c*d} I ,0  Xi Y dF4 5 ,8,0 ʩ0H =h     i} D UDbbFLIvij`*&!ߍ*@h ] 0 ^0`ߍ c 0l$$%}()()%*&J%H,@hH hH@,h $% 8i8$(%)0hhH ]h`() c 0H c 0 h}`hhh&JJ ](ll  LI0 |/qcdHH 99 H H  I9 9 } NY =H  I8 d c  |FcdL HII/ Ih8`h`Lcdc`cd`u F }E KE]LG/auF a0BF/aɜɛ׽]E F  |W  KFL FREE SECTORS C}H) *Fh ):FȽ F FCIH' H0 1h0d  i:Fȩ/F.a`CD/}08HDICIHȰ/F`ȱ$>.+.i ȱ$:刄H !A T Hȱ$*?ȝ 2. ? [_}{ ,0-:) 0$:>WI  IТ,LIH  0hLd v i j`C ?(  0(C.` }E 5! .ii  c0N EE < PC)0')AY)ע ? 0E088FG \}dc  (HhLcL3 ^J ^ L}fe 0=ghecfdefa``_Z_0  _ >LXH}FhȑFȽaF^0 ] FFL>ekfl\cZd[L> ef7  ?0^ 0 FJJ]1FfȱFeȱF``B}!08`]EE < 8. 5D}iji( LʩLXW!)   XȌVȌY W`VVW}H8 hYaHXY8 XH hHH \h hX` 5Hh I8ih( l ( l(!`}L\CJfCJfCJfCDfC` |V  HII  INYh `h`c)8jHciPdijIjFIjFIjh` | }V I38 8H0 I  ' H LI8jY8j NYY &I &I &IHeH.!}eIif  `!.莼 2Jjj }.b Ȉ!b FG` ɩLI z "} e H^04 \ Ȍ  8 i h !`I0 `C Y0.`DOS #}SYS I  ` vݩ.C/`WV.b۩bѤC9`CLU R  ,F0(Bߝ$}DEI V0 : , BLVDE`D1:*AR08hhJ ȱHȱIȱBȱDȱEeeHHL%}V)  1*  ,,p-  0  &  '0   L)l, 0 &} &LD1:MEM.SAVE:D1:DUP.SYS &LD1:MEM.SAVE:D1:DUP.SYS}T)CD2:DOS.SYS n  * \*`آ R'S )ɀ@  _))% CError lo(}ading MEM.SAV or memory!  0* l*m*n*o* R Hn*JSDn*J-=o* 0m*ʈд =}MYDOS 4)}.53/3- Copyright 1988,˛Disks 1S- 2S- 4R D: = D1:ˢ = =1-8.Dir of D1:-D8: *. Dir of D:A. *}Disk Directory K. Save MemoryB. Run Cartridge L. Load MemoryC. Copy File(s) M. Run at AddressD. Delete File(s) N. L+}oad MEM.SAVE. Rename File(s) O. Change Config.F. Lock File(s) P. Set DensityG. Unlock File(s) Q. Make DirectoryH. Wr,}ite DOS Files R. Pick DirectoryI. Initialize Disk S. Set RAMdisk #J. Duplicate Disk V. Set Verify Flag  @-}( 0  =Select Item ( for menu):@  =ɛL)1L,*L,:W@ ,,L=No such item!.}L4,-0{ ПFull directory name?Z"L.Directo3}ry to be used as 'D:'? @ A(5)L.(I: ȱޝL4, CInvalid directory!L@( 4})0Lp-File source, destination? '( @C۩ڭ8邅ܭC BC'0 @(ߍeލd)DЍ) ? C' 5}B Bȱޙ':>Ȍ)C0J* .B D'ȱ/.* #,ɛȝD' ߰ B ?,(0L4, 'u6}t)D'3?&' .'ȽD'?&'  .ٓ'Q?''(#) = =-->' =Q7} =YR_o (J)  0?Cݖ''BU)`''utz0( "?(L0L4,L@nDisk to FORMAT: 8}A B)UTލ1 =(Press for Enhanced Dns)Type to Format Drive 2: =AIYZNj[R VL@L49},D2:DUP.SYSDrive to write DOS files to? AH1:*U)2T) Z B hpT) J<2UT:}C٩ة۩.کL;Source, Destination (Sectors)? A)((C'( A)((((( @(0% =Insert b;}oth disks, type = B( A((/( OB(( CDrives not compatible!J)j)C'Hs''<}h(ɛy CInvalid options! Y@-&& Y@)׍&&(&&&۩ک&&&&8* C4&&&& C48=}*8)ܭ)ݥɂC, CNot enough memory! ک&&`(Mh  & >L@&i &&>}&&mm   >  &((&թԥԍ(Ս(((( ( ((C((?}ԍ((,(0"( (( >m)m) & &("L4,  ( BL4,(, =Insert DESTIN@}ATION disk, press =N T) b( 0U) @((ԭ(խ( ( (((L4Drive, new density: A}AC'ɛ CDrive unchanged.(ު90٨Ȍ(SD  |BL)xԌҭHӭ@@ ʎӆ@B}ӭ@@ :  $ӹ@hөԥX` Aˠ =RAM disk present? =NL;8 =xlon C}or E type RAMdisk? =Aό  L   M   A1| H6: ' =No extra memory available!L;8L7D} & & & =Use default config for 0)ȩ = =K? =NL8 =Size(K)? ? Y@FjFjFjFjE}: =Page sequence? ? [@o* =RAM disk drive no? = 09) `9 -9**H***) 9 Ȋ)h9 F}@@ H'h(#''/'(ɛ ? [@(@: 3 ʽ' L8 =Duplicated sequence number!LG}7 =Wrong number of entries!L7K큅쀄 =Verify WRITEsH}? &; =Number of File Buffers? ? Y@  6 L),R( ?;L4,Drive number or : =ɛL[99L60Ȍ(I} =Remove drive? =Y =Is drive configurable? =YЂ =High capacity drive? =Yy =Is drive double sided? =YJ} 5; =Tracks/side? ? Y@#0M P( 5; =Step rate? =4/ 5; ?;L4, =Drive size (in sectors)? ? Y@K}H(h B;L4,RAM disk drive no? +8L4,Verify WRITEs? &;L4, =WNPp`(`(  L|BSAVE:filename,stL}art,end(,init(,run)) @TUH [@Cp` J< [@؆8օڊ CInvalid START-END range!۩ [@ M} [@ hԄՠAȌZ B04*  0$ڍXۍY֍T׍U,0LCLC SCL@ֆ׌`Load MEN}M.SAV from what file? 0#L4,L@Load from what file?) @TU&̩Z B &0&-&а&INO}IZ'RV0II CNO CARTRIDGE!Ԇխ  )LIRun from what address? ?ɛP} [@ CAddress must be 1-4 hex digits! BHILV =`hh =HH` =0{a HɛQ} = =h` =L4, > = pHH >hh`K: p `(()( i ɀ((L@(`(BD(0>HHR}''>I>U>I>ɛ(ɛ (>(`͓>DH(`(HI`(v5 = =( @B( 3>@S}A (J B0}((HHIIDDEE B @(CɈP(#B = =( @BL2?(B>>((ڤ ܝHT}ݝI VL>L@(" B !B T)  B(L& R XY( @&:0H&()&U} ) .) & ) .)ʩ)`ލD&ߍEBIʎH( V0`ԩ ؠL@ȱM@ȱ)N@ V} CError -- 000&`$8f nAԄձG/ $<68i/(Ԧ`H&եԦ&&eԅheԅԊe(iLe@&&W}&&ԅLe@B ? nA?*(ɛ:./2SX(0ȱ/.ɛ(ލC'ި0X}#:Ȱ :ފ :ȱ: : ~AD ~Aޥ`(eޅީe߅`(` @LA @TUȪ: CFile name noY}t allowed!: )  s( >0+L TUD CNot a disk file!(0` =Insert SOURCE disk, press Z} =,(pӮ(A(O lB |BlB`1(L$ b)de BJKO [}L@O` B()*)))`ȱޙ)):>Ȍ)`D:`OS.SYS,DOS.SYShh =L4,  VLT :C :C\},pLsLF#Խ٩Յ׆  L"C`David R. Eichel rel.ver.1/1/90OS.SYShh =L4,  VLT :C :CS!d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA^} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX_}2K CIOVV'X; *********************************X; Other equates needed'X; *********************************"`}COLOR0, COLCRSU6 ROWCRST@ATACHRJ STORE1T STOCOL^h'X; *********************************ra}X; The SETCOLOR routine|'X; *********************************"X; Before calling this routine,!X; the registers should beb} set#X; just like the BASIC SETCOLOR:"X; SETCOLOR color,hue,luminanceX; stored respectively in!X; X reg.,accumuc}lator,Y reg. SETCOLT?;; Need to multiplyT?;; hue by 16, andT?;; add it to luminance.T?;; Now hue is * 16PSd}TORE1;; temporarilyC;; So we can add,;; Before addingOSTORE1;; Now have sumPCOLOR09;; Actual SETCOLOR&:;; Alle} done0'X; *********************************:X; The COLOR commandD'X; *********************************N!X; For these rouf}tines, we willX$X; simply store the current COLORbX; in STCOL, so the COLORl"X; command simply requires thatv$X; the accg}umulator hold the value X; "n" in the command COLOR n COLORPSTOCOL;; That's it!:;; All done'X; ****************h}*****************X; The GRAPHICS command'X; *********************************X; The "n" parameter of a X; GRAPHICS i}n command will be#X; passed to this routine in theX; accumulator GRAFIC5;; Store on stack$>`;; IOCB6 for screej}n Q> ;; CLOSE commandPICCOM9;; in command byte  CIOV;; Do the CLOSE*$>`;; The screen again4Q>;; OPEN commandk}>PICCOM9;; in command byteHQ>NAME;; Name is "S:"RPICBAL9;; Low byte\Q>NAME;; High bytef PICBAH9p7;; Gel}t GRAPHICS nzPICAX29;; Graphics modeM>;; Get high 4 bitsN>;; Flip high bitL> ;; Read or writePICAX19;; nm}+16, n+32 etc. CIOV;; Setup GRAPHICS n:;; All done'X; *********************************X; The POSITION command'n}X; *********************************X; Identical to the BASICX; POSITION X,Y command.!X; Since X may be greater thano}#X; 255 in GRAPHICS 8, we need to!X; use the accumulator for theX; high byte of X. POSITN$&COLCRS;; Low byte of Xp}.PCOLCRS;; High byte of X8'ROWCRS;; Y positionB:;; All doneL'X; *********************************VX; The PLOT cq}ommand`'X; *********************************j$X; We'll use the X, Y, and A justt#X; like in the POSITION command.~PLOTr} POSITN;; To store info$>`;; For the screenQ> ;; Put recordPICCOM9;; Command byteQ>;; Special case ofPs}ICBLL9;; I/O using thePICBLH9;; accumulatorQSTOCOL;; Get COLOR to use CIOV;; Plot the point:;; All done'X;t} *********************************X; The DRAWTO command'X; ********************************* $X; We'll use the X, Y, anu}d A just#X; like in the POSITION command. DRAWTO( POSITN;; To store info2QSTOCOL;; Get COLOR<PATACHR;; Keep CIOv} happyF$>`;; The screen againPQ>;; For DRAWTOZPICCOM9;; Command bytedQ> ;; As in XIOnPICAX19;; Auxiliary 1xw}Q>;; ClearPICAX29;; Auxiliary 2 CIOV;; Draw the line:;; All done'X; *********************************X; Thex} FILL command'X; *********************************$X; We'll use the X, Y, and A just#X; like in the POSITION command.y}X; This is similar to DRAWTOFILL POSITN;; To store infoQSTOCOL;; Get COLORPATACHR;; Keep CIO happy$>`;; z}The screen againQ>;; For FILLPICCOM9;; Command byte"Q> ;; As in XIO,PICAX19;; Auxiliary 16Q>;; Clear@PI{}CAX29;; Auxiliary 2J CIOV;; FILL the areaT:;; All done^'X; *********************************hX; The LOCATE commandr'|}X; *********************************|$X; We'll use the X, Y, and A just"X; like in the POSITION commandX; and the accum}}ulator willX; contain the LOCATEd color LOCATE POSITN;; To store info$>`;; The screen againQ>;; Get record~}PICCOM9;; Command byteQ>;; Special case ofPICBLL9;; data transferPICBLH9;; in accumulator CIOV;; Do the }LOCATE:;; All done'X; *********************************X; The screen's name'X; *********************************&}NAME AS:A=ll done'X; *********************************X; The screen's name'X; *********************************&0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03 }470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 ; ******************** }*************0270 ; Other equates needed0280 ; *********************************0290 COLOR0 = $02C40300 COLCRS = $550310 } ROWCRS = $540320 ATACHR = $02FB0330 STORE1 = $CC0340 STOCOL = $CD0350 *= $06000360 ; ***************************** }****0370 ; The SETCOLOR routine0380 ; *********************************0390 ; Before calling this routine,0400 ; the regi }sters should be set0410 ; just like the BASIC SETCOLOR:0420 ; SETCOLOR color,hue,luminance0430 ; stored respectively in }0440 ; X reg.,accumulator,Y reg.0450 SETCOL0460 ASL A ; Need to multiply0470 ASL A ; hue by 16, and }0480 ASL A ; add it to luminance.0490 ASL A ; Now hue is * 160500 STA STORE1 ; temporarily0510 } TYA ; So we can add0520 CLC ; Before adding0530 ADC STORE1 ; Now have sum0540 STA COLOR0,X } ; Actual SETCOLOR0550 RTS ; All done0560 ; *********************************0570 ; The COLOR command0580 ; * }********************************0590 ; For these routines, we will0600 ; simply store the current COLOR0610 ; in STCOL, so } the COLOR0620 ; command simply requires that0630 ; the accumulator hold the value0640 ; "n" in the command COLOR n0650 C }OLOR0660 STA STOCOL ; That's it!0670 RTS ; All done0680 ; *********************************0690 ; The GR }APHICS command0700 ; *********************************0710 ; The "n" parameter of a0720 ; GRAPHICS n command will be0730 }; passed to this routine in the0740 ; accumulator0750 GRAFIC0760 PHA ; Store on stack0770 LDX #$60 ; I }OCB6 for screen0780 LDA #$0C ; CLOSE command0790 STA ICCOM,X ; in command byte0800 JSR CIOV ; Do the CLO }SE0810 LDX #$60 ; The screen again0820 LDA #3 ; OPEN command0830 STA ICCOM,X ; in command byte0840 } LDA #NAME&255 ; Name is "S:"0850 STA ICBAL,X ; Low byte0860 LDA #NAME/256 ; High byte0870 STA ICBAH,X0880 } PLA ; Get GRAPHICS n0890 STA ICAX2,X ; Graphics mode0900 AND #$F0 ; Get high 4 bits0910 EOR #$10 } ; Flip high bit0920 ORA #$0C ; Read or write0930 STA ICAX1,X ; n+16, n+32 etc.0940 JSR CIOV ; Setup }GRAPHICS n0950 RTS ; All done0960 ; *********************************0970 ; The POSITION command0980 ; ****** }***************************0990 ; Identical to the BASIC1000 ; POSITION X,Y command.1010 ; Since X may be greater than102 }0 ; 255 in GRAPHICS 8, we need to1030 ; use the accumulator for the1040 ; high byte of X.1050 POSITN1060 STX COLCRS }; Low byte of X1070 STA COLCRS+1 ; High byte of X1080 STY ROWCRS ; Y position1090 RTS ; All done1100 } ; *********************************1110 ; The PLOT command1120 ; *********************************1130 ; We'll use the X, } Y, and A just1140 ; like in the POSITION command.1150 PLOT1160 JSR POSITN ; To store info1170 LDX #$60 ; For } the screen1180 LDA #$0B ; Put record1190 STA ICCOM,X ; Command byte1200 LDA #0 ; Special case of1210 } STA ICBLL,X ; I/O using the1220 STA ICBLH,X ; accumulator1230 LDA STOCOL ; Get COLOR to use1240 JSR CIO }V ; Plot the point1250 RTS ; All done1260 ; *********************************1270 ; The DRAWTO command1280 } ; *********************************1290 ; We'll use the X, Y, and A just1300 ; like in the POSITION command.1310 DRAWTO1 }320 JSR POSITN ; To store info1330 LDA STOCOL ; Get COLOR1340 STA ATACHR ; Keep CIO happy1350 LDX #$60 } ; The screen again1360 LDA #$11 ; For DRAWTO1370 STA ICCOM,X ; Command byte1380 LDA #$0C ; As in XIO }1390 STA ICAX1,X ; Auxiliary 11400 LDA #0 ; Clear1410 STA ICAX2,X ; Auxiliary 21420 JSR CIOV ; Dra }w the line1430 RTS ; All done1440 ; *********************************1450 ; The FILL command1460 ; ********** }***********************1470 ; We'll use the X, Y, and A just1480 ; like in the POSITION command.1490 ; This is similar to }DRAWTO1500 FILL1510 JSR POSITN ; To store info1520 LDA STOCOL ; Get COLOR1530 STA ATACHR ; Keep CIO happy }1540 LDX #$60 ; The screen again1550 LDA #$12 ; For FILL1560 STA ICCOM,X ; Command byte1570 LDA #$0C } ; As in XIO1580 STA ICAX1,X ; Auxiliary 11590 LDA #0 ; Clear1600 STA ICAX2,X ; Auxiliary 21610 J }SR CIOV ; FILL the area1620 RTS ; All done1630 ; *********************************1640 ; The LOCATE command }1650 ; *********************************1660 ; We'll use the X, Y, and A just1670 ; like in the POSITION command1680 ; an }d the accumulator will1690 ; contain the LOCATEd color1700 LOCATE1710 JSR POSITN ; To store info1720 LDX #$60 } ; The screen again1730 LDA #7 ; Get record1740 STA ICCOM,X ; Command byte1750 LDA #0 ; Special case } of1760 STA ICBLL,X ; data transfer1770 STA ICBLH,X ; in accumulator1780 JSR CIOV ; Do the LOCATE1790 }RTS ; All done1800 ; *********************************1810 ; The screen's name1820 ; ***************************** }****1830 NAME .BYTE "S:",$9B*********************************1810 ; The screen's name1820 ; *****************************  ̘e̝``H` B V`BDEhK)I J V`UVT` >` BHI V` >͍`B JK }V` >͍`B JK V` >`BHI V`S:I J V`UVT` >` BHI V` >͍`B JK 9@d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX}2K CIOVV'X; *********************************X; Other equates needed'X; *********************************"$}YLOC;; Indirect address for Y,$XLOC;; To remember X position6INITX;; Initial X value@INITY;; Initial Y va}lueJ+STOTOP;; Temporary storage (ADRESS)T2STICK;; PORTA - Hardware STICK(0) location^-HPOSP0;; Horizontal p}osition Player 0hr'X; *********************************|X; First, lower top of RAM'X; ****************************}*****Qj;; Get top of RAMPSTOTOP;; Temporary storage;;; Setup for subtractS>;; Save 8 pages for PMG Pj;; Te}ll Atari - new RAMTOPP;; PMBASEPXLOC;; To erase PM RAMQ>;; put indirectPXLOC;; address here.'X; *****}****************************X; Next, reset GRAPHICS 0'X; *********************************Q>;; GRAPHICS 05;; Sto}re on stack$>`;; IOCB6 for screen&Q> ;; CLOSE command0PICCOM9;; in command byte: CIOV;; Do the CLOSED$>`;; Th}e screen againNQ>;; OPEN commandXPICCOM9;; in command bytebQ>NAME;; Name is "S:"lPICBAL9;; Low bytevQ>NAM}E;; High byte PICBAH97;; Get GRAPHICS 0PICAX29;; Graphics modeM>;; Get high 4 bitsN>;; Flip high bit}L> ;; Read or writePICAX19;; n+16, n+32 etc. CIOV;; Set up GRAPHICS 0(X; **********************************(X}; Now set up Player/Missile Graphics(X; **********************************Q>x;; Initial X valuePINITX;; Put in plac}eQ>2;; Initial Y value PINITY;; Put in placeQ>.;; Double line P/;; resolution - SDMCTL*'X; ******************}***************4"X; Now clear out PM area of RAM>'X; *********************************H%>;; Use as counterR CLEAR\Q}>;; Byte to be storedfP@XLOC7;; Clear 1st bytep1;; Is page finished?zHCLEAR;; Page not done yet#XLOC;; Page }is doneQXLOC;; On to next pageRSTOTOP;; Are we done?FCLEAR;; One more pageDCLEAR;; Keep going'X; *******}**************************&X; Now we'll insert the player into"X; the appropriate place in theX; PMG RAM area.'X; **}*******************************Qj;; First, calculate,;; correct Y position.O>;; PMBASE+512 (2 pages) PYLOC;}; High byte of YLOC$QINITY;; Add Y screen coordinatePYLOC;; For low byte$%>;; As a counter. INSERT8!QPLAYER8;;} Get byte of playerBP@YLOC7;; Put it in placeL3;; For next byteV)>;; Are we done?`HINSERT;; NojQINITX;; Get in}itial XtPHPOSP0;; Tell Atari~PXLOC;; Also hereQ>D;; Make player redP;; as in BASIC - PCOLR0Q>;; To enabl}e Player$P;; Missile Graphics - GRACTL'X; ********************************* X; The main loop - very short'X; ****}*****************************MAIN% RDSTK;; Read stick - move player$>;; To control the%>;; player, we DEL}AY1;; have to add HDELAY;; a delay - this0;; routine slowsHDELAY;; things down.(!MAIN;; And do it again2'X; }*********************************<X; Now read joystick #1F'X; *********************************P RDSTKZQSTICK;; Get j}oystick valuedM>;; Is bit 0 = 1?n#FUP;; No - 11, 12, or 1 o'clockxQSTICK;; Get it againM>;; Is bit 1 = 1?"FD}OWN;; No - 5, 6 or 7 o'clockSIDEQSTICK;; Get it againM>;; Is bit 3 = 1?#FLEFT;; No - 8, 9 or 10 o'clockQSTIC}K;; Get it againM>;; Is bit 4 = 1?#FRIGHT;; No - 2, 3 or 4 o'clock:;; Joystick straight up'X; ******************}***************$X; Now move player appropriately,$X; starting with upward movement.'X; ********************************}*$UP%>;; Setup for moving byte 1 "YLOC;; Now 1 less than YLOCUP1Q@YLOC7;; Get 1st byte"!1;; To move it up one p}osition,P@YLOC7;; Move it63;; Now original value@3;; Now set for next byteJ)> ;; Are we done?T DUP1;; No^ESIDE};; Forced branch!!!h'X; *********************************rX; Now move player down|'X; *********************************}"DOWN%>;; Move top byte first DOWN1Q@YLOC7;; Get top byte3;; to move it down screenP@YLOC7;; Move it!1;; Now }back to starting value1;; Set for next lower byte!IDOWN1;; If Y >= 0 keep going3;; Set to zeroQ>;; to clear top} byteP@YLOC7;; Clear it#YLOC;; Now is 1 higher,;; Setup for forced branchDSIDE;; Forced branch again'X; ****}*****************************#X; Now side-to-side - left first'X; *********************************& LEFT"XLOC;; To mo}ve it left0QXLOC;; Get it:PHPOSP0;; Move itD :;; Back to MAIN - we're doneN'X; *********************************XX;} Now right movementb'X; *********************************l"RIGHT#XLOC;; To move it rightvQXLOC;; Get itPHPOSP0;; M}ove it :;; Back to MAIN - we're done'X; *********************************X; DATA statements'X; *********************}************NAME AS:A="PLAYER =======**************X; DATA statements'X; *********************?0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 ; ********************}*************0270 ; Other equates needed0280 ; *********************************0290 YLOC = $CC ; Indirect address fo}r Y0300 XLOC = $CE ; To remember X position0310 INITX = $D0 ; Initial X value0320 INITY = $D1 ; Initial Y val}ue0330 STOTOP = $0100 ; Temporary storage (ADRESS)0340 STICK = $D300 ; PORTA - Hardware STICK(0) location0350 HPOSP0 = }$D000 ; Horizontal position Player 00360 *= $06000370 ; *********************************0380 ; First, lower top of }RAM0390 ; *********************************0400 LDA 106 ; Get top of RAM0410 STA STOTOP ; Temporary storage0}420 SEC ; Setup for subtract0430 SBC #8 ; Save 8 pages for PMG0440 STA 106 ; Tell Atari - new }RAMTOP0450 STA 54279 ; PMBASE0460 STA XLOC+1 ; To erase PM RAM0470 LDA #0 ; put indirect0480 STA }XLOC ; address here.0490 ; *********************************0500 ; Next, reset GRAPHICS 00510 ; ***********************}**********0520 LDA #0 ; GRAPHICS 00530 PHA ; Store on stack0540 LDX #$60 ; IOCB6 for screen05}50 LDA #$0C ; CLOSE command0560 STA ICCOM,X ; in command byte0570 JSR CIOV ; Do the CLOSE0580 LDX #$}60 ; The screen again0590 LDA #3 ; OPEN command0600 STA ICCOM,X ; in command byte0610 LDA #NAME&255 ; }Name is "S:"0620 STA ICBAL,X ; Low byte0630 LDA #NAME/256 ; High byte0640 STA ICBAH,X0650 PLA ;} Get GRAPHICS 00660 STA ICAX2,X ; Graphics mode0670 AND #$F0 ; Get high 4 bits0680 EOR #$10 ; Flip high }bit0690 ORA #$0C ; Read or write0700 STA ICAX1,X ; n+16, n+32 etc.0710 JSR CIOV ; Set up GRAPHICS 00720} ; **********************************0730 ; Now set up Player/Missile Graphics0740 ; **********************************075}0 LDA #120 ; Initial X value0760 STA INITX ; Put in place0770 LDA #50 ; Initial Y value0780 STA I}NITY ; Put in place0790 LDA #46 ; Double line0800 STA 559 ; resolution - SDMCTL0810 ; ******************}***************0820 ; Now clear out PM area of RAM0830 ; *********************************0840 LDY #0 ; Use as co}unter0850 CLEAR0860 LDA #0 ; Byte to be stored0870 STA (XLOC),Y ; Clear 1st byte0880 DEY ; Is pa}ge finished?0890 BNE CLEAR ; Page not done yet0900 INC XLOC+1 ; Page is done0910 LDA XLOC+1 ; On to next p}age0920 CMP STOTOP ; Are we done?0930 BEQ CLEAR ; One more page0940 BCC CLEAR ; Keep going0950 ; *******}**************************0960 ; Now we'll insert the player into0970 ; the appropriate place in the0980 ; PMG RAM area.0}990 ; *********************************1000 LDA 106 ; First, calculate1010 CLC ; correct Y position.10}20 ADC #2 ; PMBASE+512 (2 pages)1030 STA YLOC+1 ; High byte of YLOC1040 LDA INITY ; Add Y screen coordi}nate1050 STA YLOC ; For low byte1060 LDY #0 ; As a counter1070 INSERT1080 LDA PLAYER,Y ; Get byte of }player1090 STA (YLOC),Y ; Put it in place1100 INY ; For next byte1110 CPY #8 ; Are we done?1120 } BNE INSERT ; No1130 LDA INITX ; Get initial X1140 STA HPOSP0 ; Tell Atari1150 STA XLOC ; Also here}1160 LDA #68 ; Make player red1170 STA 704 ; as in BASIC - PCOLR01180 LDA #3 ; To enable Player11}90 STA 53277 ; Missile Graphics - GRACTL1200 ; *********************************1210 ; The main loop - very short12}20 ; *********************************1230 MAIN1240 JSR RDSTK ; Read stick - move player1250 LDX #5 ; To co}ntrol the1260 LDY #0 ; player, we1270 DELAY1280 DEY ; have to add1290 BNE DELAY ; a delay - th}is1300 DEX ; routine slows1310 BNE DELAY ; things down.1320 JMP MAIN ; And do it again1330 ; ***}******************************1340 ; Now read joystick #11350 ; *********************************1360 RDSTK1370 LDA S}TICK ; Get joystick value1380 AND #1 ; Is bit 0 = 1?1390 BEQ UP ; No - 11, 12, or 1 o'clock1400 LD}A STICK ; Get it again1410 AND #2 ; Is bit 1 = 1?1420 BEQ DOWN ; No - 5, 6 or 7 o'clock1430 SIDE LDA STI}CK ; Get it again1440 AND #4 ; Is bit 3 = 1?1450 BEQ LEFT ; No - 8, 9 or 10 o'clock1460 LDA STICK ;} Get it again1470 AND #8 ; Is bit 4 = 1?1480 BEQ RIGHT ; No - 2, 3 or 4 o'clock1490 RTS ; Joyst}ick straight up1500 ; *********************************1510 ; Now move player appropriately,1520 ; starting with upward mo}vement.1530 ; *********************************1540 UP LDY #1 ; Setup for moving byte 11550 DEC YLOC ; Now 1 }less than YLOC1560 UP1 LDA (YLOC),Y ; Get 1st byte1570 DEY ; To move it up one position1580 STA (YLOC),Y ;} Move it1590 INY ; Now original value1600 INY ; Now set for next byte1610 CPY #10 ; Are we} done?1620 BCC UP1 ; No1630 BCS SIDE ; Forced branch!!!1640 ; *********************************1650 ; Now }move player down1660 ; *********************************1670 DOWN LDY #7 ; Move top byte first1680 DOWN1 LDA (YLOC),Y  }; Get top byte1690 INY ; to move it down screen1700 STA (YLOC),Y ; Move it1710 DEY ; Now back  }to starting value1720 DEY ; Set for next lower byte1730 BPL DOWN1 ; If Y >= 0 keep going1740 INY  } ; Set to zero1750 LDA #0 ; to clear top byte1760 STA (YLOC),Y ; Clear it1770 INC YLOC ; Now is 1  }higher1780 CLC ; Setup for forced branch1790 BCC SIDE ; Forced branch again1800 ; ********************* }************1810 ; Now side-to-side - left first1820 ; *********************************1830 LEFT DEC XLOC ; To move it }left1840 LDA XLOC ; Get it1850 STA HPOSP0 ; Move it1860 RTS ; Back to MAIN - we're done1870 ; ***}******************************1880 ; Now right movement1890 ; *********************************1900 RIGHT INC XLOC ; To m}ove it right1910 LDA XLOC ; Get it1920 STA HPOSP0 ; Move it1930 RTS ; Back to MAIN - we're done19}40 ; *********************************1950 ; DATA statements1960 ; *********************************1970 NAME .BYTE "S:",$}9B1980 PLAYER .BYTE 255,129,129,129,129,129,129,255atements1960 ; *********************************1970 NAME .BYTE "S:",$5j8jԅϩΩH` B V`BDEhK)I J VxЩ2ѩ./Έϥjiͥх̠}ЍЅΩD L)) ).)/`̱̈ ȑ̈ȩΥ΍`Υ΍`S:}ЅΩD L)) ).)/`̱̈ ȑ̈ȩΥ΍`Υ΍`S:bd'X; *********************************nX; SOUND equatesx'X; *********************************!AUDF1;; Audio 1 !}frequencyAUDC1;; Audio 1 controlAUDCTL;; Audio control#SKCTL;; Serial port control STORE2;; Tem!}porary store'X; *********************************X; The SOUND command'X; *********************************$X;!} Prior to calling this routine,'X; the X register should contain the$X; voice desired, the accumulator$X; should contai!}n the distortion,#X; the Y register should contain$X; the volume desired, and STORE2 X; should contain the desired"X;!} frequency., SOUND65;; Store distortion@A;; Double voice valueJT?;; for offset toT>;; voice control^QSTORE2;; Fr!}equency intohPAUDF19;; right channelr'STORE2;; For use later|Q>;; To initialize thePAUDCTL;; POKEY chipQ>;!}; set these asPSKCTL;; indicated7;; Retrieve distortionT?;; Now multiply byT?;; 16 to get theT?;; distortion !}intoT?;; the high nybble,;; Setup for addOSTORE2;; Add the volume"PAUDC19;; into the right voice:;; That's al!,}0100 ; *********************************0110 ; SOUND equates0120 ; *********************************0130 AUDF1 = $D200 ;% } Audio 1 frequency0140 AUDC1 = $D201 ; Audio 1 control0150 AUDCTL = $D208 ; Audio control0160 SKCTL = $D20F ; Serial %!}port control0170 STORE2 = $0101 ; Temporary store0180 *= $06000190 ; *********************************0200 ; The SO%"}UND command0210 ; *********************************0220 ; Prior to calling this routine,0230 ; the X register should conta%#}in the0240 ; voice desired, the accumulator0250 ; should contain the distortion,0260 ; the Y register should contain0270 %$}; the volume desired, and STORE20280 ; should contain the desired0290 ; frequency.0300 SOUND0310 PHA ; Store %%}distortion0320 TXA ; Double voice value0330 ASL A ; for offset to0340 TAX ; voice contro%&}l0350 LDA STORE2 ; Frequency into0360 STA AUDF1,X ; right channel0370 STY STORE2 ; For use later0380 LD%'}A #0 ; To initialize the0390 STA AUDCTL ; POKEY chip0400 LDA #3 ; set these as0410 STA SKCTL ; in%(}dicated0420 PLA ; Retrieve distortion0430 ASL A ; Now multiply by0440 ASL A ; 16 to get th%)}e0450 ASL A ; distortion into0460 ASL A ; the high nybble0470 CLC ; Setup for add0480 %*} ADC STORE2 ; Add the volume0490 STA AUDC1,X ; into the right voice0500 RTS ; That's all for add0480 $l#H Ҍҩh m` AUDC1,X ; into the right voice0500 RTS ; That's all for add0480 (*lntoT?;; the high nybble,;; Setup for addOSTORE2;; Add the volume"PAUDC19;; into the right voice:;; That's al B#DOS SYSB6'DUP SYSB$]CH10_1 M65B.CH10_1 ASMBCH10_1 OBJB*CH10_2 M65B8CH10_2 ASMBCH10_2 OBJB CH10_3 M65B CH10_3 ASMB+CH10_3 OBJ