@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `8  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D8:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D8:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED697 FREE SECTORS COPYING---D8:COPY32.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 164ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u05  15 2 2151^116115ύ011$r2ԭ5 3)5)5ԭx GT}@@L00)+& 2 L0=ɛ -L!1LV1L1 /3 3ȹ441L-4 v3 25 2H 2h͔5U}L3L3 2 k3U hh`DOC`QL3P1Lk0S1H /3h0B k3@ VL0LU!#$53 1181118V}1111Ε5 1Lk0552 1Ȍ1i111i11115Lk0pppB4f5&&&&&&&&^6f^6&&&&&W}&&A1@BJ D2ELVK@BHILV^Щ6 2BD2EJ VBD5EHI0 V0%5X}5 2iХiL[2 25 25`D:*.*` i@`8 ``@i `8@`0 BLV525<4Y}5`HH i ԍΗ552 ԍhh@ Lح1Э1Ѣ 24.4 24Z}4`D4E` 2BJ k3LVRH` 2BD4EhK)I JLV333 BASIC language TUR > TURBO BASIC OBJ| f}COM > MACHINE language DOC > DOCumentation PIC|MIC|FNT|MVM > Graphics AMS|MUS|MBD > Music LST > BASIC g} LISTing -Some MACHINE language programs can only be run by loading the MENU without BASIC! ------- -For s h}ome programs, XL/XE models may require a "TRANSLATOR" program (available from BELLCOM) to be loaded first! -Most i}programs are relatively self-explanatory; however, some may have separate DOCumentation files. Some BASIC programs m j}ay contain instructions in their program listings. LIST to read. -To view DOCumentation files one page at a time, k} press [START], [Return], or the Joystick Trigger to display the highlighted DOC file. Pressing the [Esc] key cau l}ses a return to MENU. -To print out a hard-copy of any DOCumentation file, [Q]uit the MENU, boot DOS, and then from m} DOS, use the (C)Copy command: D:Filename.DOC,P: -To use this great MENU program on your own disks, simply n} copy the file "AUTORUN.SYS". D:Filename.DOC,P: -To use this great MENU program on your own disks, simply ! *************** *************** *************** *************** *****p}********** *************** *************** *************** *************** q}*************** *************** *************** *************** The Cube by Sizr}The Cube is a versatile program fordisplaying pictures as faces on arotating cube. This adds a greatdeal of interest to pis}cture showsand can be used to displayinformation on show stands at clubmeetings, computer fairs, and soon.The file DEMOt}.OBJ displays a nicesample of what the program will do.When you are through watching it,simply press any key and theprogru}am will end. You can thenreboot to access the other programson this disk.To run the CUBE utility on yourcomputer, you nev}ed to have 48K ofRAM or more. Boot the CUBE.OBJprogram. (If there is no menu onthis disk, then from your DOS,binary load w}the file CUBE.OBJ.)You can then insert your disk withAtariArtist and Micropainter filesinto drive 1; this drive is used tx}oread in picture files in theseformats and to read and writeCube-format picture files.Main Menu and General Operation-y}------------------------------When the Cube has loaded, a menuwill be displayed with threeoptions:DISPLAY PIX ON CUBEz}CONVERT ATARIARTIST PIXCONVERT MICROPAINTER PIXTo operate all the menus, thehighlight bar can be moved using ajoystick {}in port 1. When you havethe highlight bar where you wantit, pressing Fire will select thatoption. Alternatively, pressing|}Start will quit the menu you are atand normally take you back to theprevious menu.Converting pictures to Cube format---}}-------------------------------Because the pictures are displayedon a rotating cube, the size of thescreen dictates that ~}only a certainportion of a full-screen picturecan be displayed. There aretherefore two options to converteither AtariArti}st picture files orMicropainter files to Cube format.Selecting either of the Convertoptions brings up a list of picturef}iles on your disk. (If there areno files, you will get an errormessage and pressing Fire returnsyou to the main menu.) For}AtariArtist files, all .PIC filesare displayed. For Micropainterfiles (62-sector files), all fileswith 31, 62, 63 or 64 s}ectors aredisplayed. Of course, just becausea file is displayed it still maynot actually be a picture file sobe careful. }You won't harm theprogram but .PIC files that aren'tAtariArtist files can take a longtime to load!You can select a file }by pressingFire after highlighting the file,or to return to the main menu pressStart. The file is then loaded inand disp}layed. A flashing box ispresented in the middle of thepicture. This box shows which areawill be written out as a Cube file}.You can move the box around usingthe joystick. When you aresatisfied with the picture thatappears within the box, press }Fire.A Cube-format file will be savedwith the same picture name but a.CUB extender. Alternatively, ifyou press Start you }will return tothe list of files without writingany file.On some Micropainter files, thecolour information is not include}dwith the file and so the coloursyou will get will probably not bethe ones you want. Pressing thekeys 0 to 3 will change }thebrightnesses of colours 0-3, andpressing Shift-0 to Shift-3 willchange the colours.Note: 4 sample .CUB pictures arei}ncluded on this disk for you toexperiment with.Displaying the pictures on the Cube-----------------------------------O}nce you have one or more .CUBfiles, you can display them on thecube. After selecting the topoption from the main menu, a l}istof .CUB files will be displayed onthe screen. You can select whichone you want for each face.There is no restriction }on how manytimes you use a particular picture.Also, it is not actually necessaryto load in four files. If you loadin just} one file, it will be as ifall faces of the cube were alike.If you load in two files, it willbe as if opposite faces are a}like.Three is more interesting becausethe picture displayed on aparticular face depends on how manytimes the Cube has bee}n rotated!Once you have loaded as manypictures as you want, pressingStart takes you to the Cube Controlscreen. (If you p}ress Start beforeloading any pictures you willreturn to the main menu. Also,after loading four pictures youwill automatic}ally advance to theCube Control screen.) This screenlets you control the movement ofthe cube. You can have a verysimple "}program" of up to 32movements for the cube. Yourprogram is displayed as two rows ofsymbols. The first row has theactual s}teps, and the second rowhas bars showing the speed thateach step will be executed.You can move the highlight aroundusing} the joystick and change thespeed or step control using thefire button. The steps appear assymbols similar to those on a v}ideorecorder:Up symbol - Rotate the cube up by 90 degrees.Down symbol - Rotate the cube down } by 90 degrees.Pause symbol (two bars) - Pause in multiples of 1 second.Rewind symbol- }Start again at the first step.Once you have the program as youwant it, move the highlight to thelarge Play} symbol at the end of therow and press Fire. Your pictureswill be displayed and the steps youprogrammed will be executed. }Youcan return to the Cube Controlscreen at any time by pressingFire. (You can return from here tothe main menu using Star}t).Note: It is not possible to have**** the Rewind symbol as the first step of a program. Also, if no Rewind }symbol is included in the program, the program repeats after the 32nd step.Endnotes--------The Cube i}s actually a much simplerprogram to operate than it is toexplain briefly.Note: To programmers only---------------------}----The .TXT files on this diskette aretext files containing source codeand notes pertaining to the CUBEprogram. They ma}y be loaded intoyour favourite text editor/wordprocessor for viewing and/orprinting.Programmers may be interested tonot}e that this program was writtenas a demonstration of my DisplayList Squash routine. This routinewill construct a display l}ist whereonly a certain number of lines fromthe image are displayed, so thatthe image appears to be angled. Itis quite co}mpact (The actual Cubedisplay routines take about 2K ofcode: the rest of the space is forall the menus and so on) and fast}:a new display list for the Cube isconstructed every 50th of a second.All the graphics displays in theprogram are constru}cted using thisroutine, which can handle:* Any width of playfield up to 255bytes.* Any number of lines in the imageup t}o 255 lines.* Any number of lines to bedisplayed from zero to the numberof lines in the image.* Any graphics mode.This }routine is in the publicdomain as a PL65-format assemblylanguage file. It is included onthe disk in the SQUASH file witha}ll the rest of the source code forthe Cube.PL65 is a Noahsoft product andparts of the Cube binary file areCopyright (c) }1987 by Noashoft. source code forthe Cube.PL65 is a Noahsoft product andparts of the Cube binary file areCopyright (c) */ʝ))`))`((`))}))}))`8))))))`8))))`))))^)~)})e))e)&`)>)&&8))>)>)ƀ` *))`)=)))=))`)))})))`)])))]))`)I))I)`))))U))M))E))`))2))())׽}))ͽ))))))`))))})})))`)))`)>)})}))}ȱ)`)>)})}))Ƚ)`})}))`)腋`8HH``膇`}H8))))))h}))}))`8))))))))))))Ā фIJ)ee}慠ф$%Ɓ))))``` ,Ji))` ,J ,i))` , ,JJ },JJ8))) ) i L6,8)) ))8))8)ȱ)8)ȱ) ))})})))} )) .`)))ȱ)8))8)ȱ)L6,)}))})8ȱ僰 6,8}))ȱ)))})Ƚ)}))})))})) .`8))8)ȱ) 6,)ȱ))Ƚ)})8倥偐<808}p8~~p88ppvv~>vv~vvv~888~~f~<v|xx|v}pppp~~cw{ssfv~~~v <~~<~~~~~~~~~~~~~~~8ll8>ff>|``|fffff}<``lxlf??`x~~x`>ff> ~~ f3~<~fff<ck>6f< x}f̟<~~<ffffffff~x|nf8x8(}0@P`n|r|v|z| !#%(*,.02468:<>@BDFHIKMOQRTVWYZ\^_abcefh}ijkmnopqrstuvwwxyzz{||}}~~~ppp ^ŗ4Ŗ,*Nȥȥ ee}m|eƒЫe揦`e``Aȩȩ|`||` } *}} *L}0} * *} * .}}}} *} * *0 &* *}} *: * z+ *LG~} * &* } *}}} *} * * *}}} *} &* *}}} * * %+ *L}} *}} *} k,`pppB}A'(샬탅UV` *V *U샬 *U &*( *V * ]* * *` * * *} *惩UV8惍8烍냩 *惠 &* *5656 *( * * ]* * *샌탭56 *( * * ]* * }* `U䃥V僭01ქXY⃌ラ * * * \/Ơ * * * \/01XY ` *V * LH}HH23DE(FG23 *( &* *23 * .2mF23mG38D2E3Lh * *} * * * \/`) .ӅJ i@` NӅj)`V냐 4냈V *V * ` ԅ *M񃑚UUꃰ` ` *4}5 *4 5/45 * K* *45 * 45` } 6` * * * *L샬탍}( * * * \/mm8텆톆LƆ ` * * - * K* * }I ` * * 7+`x * * * * %+`x * * * * %+`x * * * * %+`x * * *} * %+` * * %+` * * * * %+` * * *标 * * * ]* * * * *} * \/ * * * .` *标 * * * ]* * * * .} * *` * * * * %+ *L8`LBBB>?}L[ Z * * * . * * * .U * &* * R+ *LĎ *V * &*  *U *} , *V *栌 , * * 68>?LW` * * + *栌 +  * &*} * * 5* ` *c *bb * * %+ *L *`bdf *( * * \/d * de ` *L*}d * * R+d *栌 +e *栌 + z+d * +e * + 7+ * * *L*dLΏ w *Ld *b * f+d *}栌 +e *栌 + +d * +e * + 7+ * * *LdL5 d * * R+ * *Ld d *b * f+ * }*Lѐdd *e * 7+ *Le * d *  *Ld * +d *栌 + d * + *LOd * *} ,fL{f *c * f+ *L{d * * ,f *LL{ * * R+ * ˇc * * +f * * 7+ * * }*Ld * +d *栌 + d * d *`o>/Щ0ԩ3 * * * \/855866877844}833٩4 *@ &* * * \/3 *@ &* * * \/ * * * \/ * * * \/ `"/Щ }* * * \/`pP(| | }p }`H6ЭЭЭL]ЭЭ}ЭL]ЭЭЭh@Mla`|̓|m| ||m ||`| p|tΏ}|||Z8||8휓흓J| ~|| o} } | }m ~|| | } o} }} }|JJJJJJJJH)8흓h) H)8휓h) `Z8|| |8| |`m| nZ}| `||| n|| |Z m||` *ᔭ$%ab@ԩ \䦆`c * ┩`}| ЩЈЩ ЩЩЩoЩ!/ |||Z| n |01` *i2}` *LL ,N|i|-| L L * `) )B)D)E)H})Ii V0`ʘ)) 1,` * * * ʝ))` * * * ` * * * *} *~J * *~ * ]* * *K * *~ * ]* * *~ * * * * ` *} * * * * R+ *Ll * * * * ` *pq *no *mm * *no }*pq * ` * * * * * * *  * * ]*H &* *Hȱh *`H}...H..mhmXmYimmh`HH r}(hh`} *" [, *  * * ɘϘ * N *C}Ɂ/L * * * L) *  * * ˜r sL * N *r} sLL V,`6 ˒& * *Ġ * .01 ` *UV *ST *RUV * * R+ *L}UV *UV * 5*^)~)R * ST *UV * 6` * *' * * 7 *LTHE CUBE BY sizꠚ * * W} *L5USE JOYSTICK, FIRE=SELECT, START=QUIT *% * W` фpƃۃ ˚ +`( } *W + * *' * * 7 4LERROR * *\ * .Z *W * }\ * -Z *L: PRESS FIREꠛ * *}\ * - *\ *Z[ * W + * * ˚`  *=> *;1}c1g3c1c1c1c1c1?c@1c1? }cb1cw1Ǐcv0>{<@@/}@@@@0}@@@@1}@@=@C c@2}a@?xx`w@1pcs`@9ppca`f"@9<3}ca`f"@9ca`T@9ca`T@9ca`T@94}ca`@g1pca` a@?p~x~@@5}@@@@6}@@7}@? ?>!!?xxx`@ !!!1 !!( @ !!!) #!!@< !!% )!|! H@ !!% 1!! @ !!# !!! @??? !!?>xxx9}@:};}<}=}>}??B?BB?B?B?B??}BBBBBB~~~~~~BBBBBB??B?BB?B?B?B?@}A}B}B?B?B?B?B??B?C}BBBBBBBB~~~~~~~BBBBBBBB?B?B?B?B??D}B?BE}F}??B?BG}BB?B?B?BBBBBB~~~~~~BBBBBB??B?BH}BB?B?B?I}J}B?K}B?B?B?B??B?BBBBBBBB~~~~~~~BBBBBBBL}B?B?B?B?B??B?BM}N}O}???BB?B?B?B?BBBBB~~~~~BBBP}BB???BB?B?B?B?Q}R}S}B?B?B?B?B?B?B?BBBBBBBBB~~~~~~~~BBT}BBBBBBB?B?B?B?B?B?B?BU}V}W}?B?B?B?B?B?B?B?BBBBBBB~~~~~~~X}BBBBBBB?B?B?B?B?B?B?B?Y}Z}XX[}p~0@BXDXZ !#%(*,.02468:<>@BDFHIKMOQRTVWYZ\^_abcefhijkmnopqrstuvwwxyzz{||}}~~~\}Y\] TYPE A KEY TYPE A KEY pVY00VYA$Y ^ŗ4Ŗ,*Oȥȥ e]}em6YeƒЫe揦`e``ȩ-ȩY`*Y+Y`^}"/`HZЭYL+ZYЭYЭZh@MNX)NXi iNX1Z"&YZZԩ/Y2Z2Z_}61Z/Z&YZԬZ/YZ/Y1Zl/Z`PXIZPX JXKXZ JXKX`OX POXT`}OXQXSXZZ8QXZSXZ8ZZJZ*ZPX FXGXZ Y YZ 7Y YZ FXGXZ 7YZmZ a}Y Y YQXJJJJZZJJJJZH)8ZZh) ZYH)8ZZh) ZY`Z8RXQX ZQX8RX QX`b}ZPX ZZQX Z`ZPX ZRXQX ZQXZ mRXQX`$/Z%0Z@ԩ \!\ \䦆`3 \Z!\ "\Z`c}!/ 6Y Z Z0f\1g\$0Y1` m\\\!X\iRXX\ [L\ [L\\i2d}`h\#Y8 Y C\`/Z \0Z!\ "\ Yf\0g\1Ԡh\` \ \ ]`e}P]Q]`h\#Y8 Y C\`/Z \0Z!\ "\ Yf\0g\1Ԡh\` \ \ ]`UUUnUU{UUng}UUUWU^UUUnUWUUW[UUnUUUWq}b%DOS SYSb*)DUP SYSb SAUTORUN SYSb_HELP DOCb;oCUBE DOCboCUBE OBJbMDEMO OBJb!fGARFIELDCUBb!HOBBES CUBb!ODIE CUBb!PANTHER CUBb[CUBE TXTbUNCUBEDATATXT#CUBEHCIFTXT#(DLI TXT#+9OPTIONS TXT#0dPICLOADATXT#4SQUASH TXT#STRING TXT# TERMINALTXTU_WUUUWU_UUUWnU_UUUW[UUWUUUUr}UUW{UUUU׻UUU^UUUUUUU۹UUUUUUUUUs}UWUUU_UUUUUUU_mU]_UUWWy]U{UWUWt}mUW]nUuwUY]W[]WU}UUU]}Uuwu}_UWw_wUWn]{v}]_^WۻUUۻw}_PۻUUU_ۻx}PP_^_@}Pջ}@U@nW[y}P_nP{z}@^@׻_@@{}@@@@|}{@@n@@P[_P@PP@P}}ۻP@PP@@UWۻP@jU@@~}[i@Z^֩PjWکjVZ}jWj@UPjV@UWPs34jUVj}W334Z@ZUjT335Pi}PU֕UViijis3UjjjTZjjUje}_ZVVVjU_ZUU}֪UUjjUU_ZWZ֪UUjUժ_VW}jjiWZUUUUUW֫ZUU_}_ۗ_w_U}UUU_UU_WUU}UUUU_YUWUm_U_UyU_}Um_UUUەUW}U_V۵UWWU^ۻ_UU[_UU}UU_n_UۻUUUU_UUUWUUW_UyU_UW׵^U}UU^וUU_U_UUWUUUUW_}UWU_UW}U}__[}^_[ջ^d??!}???<?0!}<<?ꯪ0_UUUUU<>UUUUU<?UUUUU<?<!}UUUUU<?꪿~UUUUU<_꪿~UUUUU<_UUUUU<UW!}UUUUUUWWUUUUUUUWUUUUUUUUUWUUUUUUUUUUWUUW!}UUUUUUUUUUUUUUUUUUUUUUUU UUUUUUUUUUU@<UUUUUUUUUUUP!}>U]UUUUUUUUUS>?U]UUUUUU~UUUW?U_}U}UUUU~UUUUS?UW_U}UUUUUUU!}U_?UWWU}UUUUUUUU_?UWWUUUUUUUUU\UWWWUUUU_UUUU\@U_W_UUUU_!}UUUU|U]W_UUUU_UUUUuU]UUUUU_UUUUp?U]UUUUU_UUU_}?U]WUUUUW!}UUU]?UUUUWUUUUWUU]?UWUUU_UUUUWUU]UUUUUU_UUUUUUUUUUUUUU_UU!}UUUUUUUUUUUU_UUUUUU?UUUWUUUUUUUUUUUU?UUUTUUUUUUUUUUUUUUUWUUUUUUU!}UUUUUUUUWUUUUUUUUUUUUUUU_0UUUUUUUUUUUUU_UUU]UUUUUWUUUUWUUUUUUU dww_w%}ȉ\u|""""""""=!%"""""#""?_ȉtu%}""""?""""/!%"""""#""?ȉtu""""?""""#!%"""""#""?ȉtu%}""""/""""w!%"""""#""?ȈXWUUtu"""""#""""bja%"""""#""?HYt_%}"""""#"""!"5M^"""""#""?uU"""""#"""!"T"""""#""?%}@P"""""#"""""Z@"""""#""?j@"""""#"""""j@"""""#""?j%}@"""""#"""""j@"""""#""?j@D"""""#"""""j@U"""""#""?%}j@AU"""""#"""""jAQU!V"""#""?jAQU\U"""""#"""""jAQVQb""#""?%}jAQU@X""/"#""?""j@EUP""#""?j@UTX""/"#""?""j@US""?%}jPU[""/"#""?""jUc""?jjU""/"#""?""jZj#""?%}j""/"#""?""jU#""?Zi""/"#""?""j#""%}?j""/"#""?""-j#""?jZZ""/"#""?""/ZZV#%}""?֩VF""/"#""?""/V&#""?U""/"#""?""/U%#%}""?UT""/"#""?""/Ub!j"""#""?UHjX""/"#""?""/Ub"Z%}b"""#""?UH""/"#""?""/Ub"5R""""#""?UHUH""/"#""?""/Ub"%}?"""""#""?UH""/"#""?""/Ub"?"""""#""?UUT""/"#""?""/%}U"""""#""?H_U""/"#"R?""/"""""#""?X""/"#"R?""%}/U_"""""#""?X_׈""/"#"R?""/U"""""#""?T""/"#"V%}?""/"""""#""?TH""/"#"U?""/U_b"#""?UU_H""/"#%}"U?""/UW_b"#""?UUUH""/"#"U""/UQb"#""?UUXWH""/%}"#"U""/URb"#""?UUXH""/"#"U""/UR'b"#""?UUX%}""/"#"U_!"/UR'""#""?U_UX""/"#"U_%"/UR!""#""?UWUX׈%}""/"#"UW"/UR!__""#""?UWUXU""/"#"U"/UR"""#""?UUHUT%}""/"#"%UR/UV"""#""?VTUT""/"#"!Z/UV"""#jT%}""/"#"%/֪"""#OZ""/"#%mZ"""#Vj%}""/"#!V"""#""/"#""""#%}"""""#"V"""#UV"""""#"UU""""""#""/UU%}j"""""#"UUj""""""#""/UUZ"""""#"&UUZ""""""#""/%}UUZ"""""#"&UUZ""""""#""/ZUUj"""""#"!UUj""""""#""/%}UjX"""""#"!fVR""""""#""/ȈVH""""/""ZZ"""""""#""/%}ZjT""""""V"""""""#""/jT"""#""ZUV"""""""#""/%}UWT""U_W"""""#""/UW֪UW%}UWUWW(֪UW$d)}YP)}U@@)}Z@j@j@UjU)}jZUTZjUTjTUA]UU)}@PPT@U@@TPU)}ZTPjPPjPPj)}PPjPUU@jwUZV]T)}VwuPV]ZWwu@j])}UjeZe)}eTjUUZUUjU)}U_]j]Vj)}ZZ]V}euj_U)}jUPUj_PjUWPjAoU@)}j_UPjPjPjT)}jTjTjUj)}@PU)}_ijjZPj)}ji)}iiii)}iZYjj)}Zjj)}Zjj)}Zjj)}Zj@j@Z@)}j@j@Z@@)}Pj@Zo)}P_@֪Pj)}ڪZժVj_PV)}@@Zj@j@jZ@ZPP)}@jfPiVi֪i)}iiFiFi)}@FZ@jFjU@ZF*/Fi(d!-------------------------------------!! CUBE BY SIZ 1990 !!-------------------------------------!! Thi-}s file contains the controller !! for the cube program i.e. all the !! procedures that actually handle the !! cube dis-}play rather than the human/ !! computer interface and conversions. !!-------------------------------------!INCLUDE CUBEDA-}TAINCLUDE DLIINCLUDE SQUASHINCLUDE OPTIONS!-------------------------------------!! The set_up_pms procedure sets up -}!! the sprites: their data, width, and !! enable (but not their positions) !!-------------------------------------!PR-}OC set_up_pms() CONST pmstart =pmarea/256, set_screen=standard_playfield+ enable_all_pms_559+ -} one_line_resolution+ enable_dma BEGIN gractl =all_players_ahead screenctl=set_screen pmen =enable-}_all pmbase =pmstart FILL(.used,?used,0) LDY #7 :loop LDA #$FF STA p1area+56,Y STA p1area+192,Y STA p2area-}+56,Y STA p2area+192,Y STA p3area+56,Y STA p3area+192,Y LDA #$1F STA p0area+56,Y STA p0area+192,Y LDA #$F8 STA-} p4area+56,Y STA p4area+192,Y DEY BPL loop FILL(.p0area+64,128,$10) FILL(.p4area+64,128,$08) FILL(.pcol,?pcol,0) -} FILL(.psize,?psize,quad_size) msize=$FF END!-------------------------------------!! The following procedure disables -} !! player/missiles. !!-------------------------------------!PROC disable_pms() BYTE scnctl=559, -} gractl=53277 CONST set_screen=standard_playfield+ enable_dma BEGIN scnctl=set_screen pmen=disable_all .} FILL(.phoriz,8,0) !Set all x's to 0! END!-------------------------------------!! The set_up_gr15 procedure sets up !!.} the graphics 15 style screen using !! the squash display list routine. !!-------------------------------------!PROC .}set_up_gr15() BEGIN dladdr =.first_dl image =.gr15_screen totallines =std_lines height =std_lines .} bytesperline=std_width make_dl() terminate_dl() dladdr =.first_dl change_dl() END!--------------------------.}-----------!! The dli interrupt is a display list !! interrupt used to change colours. !! The first call changes the col.}ours !! to those in the colour1 array, the !! second to those in the colour2 !! array, and the third to those in .} !! the shadow colour registers. !!-------------------------------------!BYTE colour1[4], colour2[4], hardcol[?.}shadows]=hardware_coloursPOINTER whichintINTERRUPT displaylistint*() BEGIN PHA LDA whichint BEQ int0 CMP #2 BEQ i.}nt2 :int1 LDA colour2+3 STA hardcol+4 LDA colour2+2 STA hardcol+2 LDA colour2+1 STA hardcol+1 LDA colour2+0 STA. } hardcol+0 GOTO xit :int0 LDA colour1+3 STA hardcol+4 LDA colour1+2 STA hardcol+2 LDA colour1+1 STA hardcol+1 . } LDA colour1+0 STA hardcol+0 GOTO xit :int2 LDA shadows+4 STA hardcol+4 LDA shadows+2 STA hardcol+2 LDA shadow. }s+1 STA hardcol+1 LDA shadows+0 STA hardcol+0 :xit INC whichint PLA END!-------------------------------------!! . }The deferred_vb procedure links !! into the deferred vertical blank !! interrupt. It resets the whichint !! and a. }ttract flags, and decrements a !! counter if non-zero. !!-------------------------------------!INT oldvec.}PROC deferred_vb*() BYTE attract=77 BEGIN LDA #0 STA whichint STA attract JMP (oldvec) END!--------------------.}-----------------!! The next_image procedure is a !! very primitive procedure that !! places in bottom_image t.}he number !! of the image that will appear at !! the bottom of the cube when the !! image in which_image is displ.}ayed !! at the top. It also sets the !! hue_top and hue_bot arrays to !! point to the correct hue sets. .} !!-------------------------------------!BYTE bottom_imagePOINTER hue_top, hue_botPROC next_image() BEGIN LDA wh.}ich_image TAY INY CPY faces_in BCC any_image LDY #0 :any_image STY bottom_image LDA which_image ASLA TAY LDA hu.}e_addr,Y STA hue_top LDA hue_addr+1,Y STA hue_top+1 LDA bottom_image ASLA TAY LDA hue_addr,Y STA hue_bot LDA hue_.}addr+1,Y STA hue_bot+1 END!-------------------------------------!! The draw_cube procedure draws a !! cube given the.} number of the top !! face and the angle of rotation. It !! works out the number and angle of !! the bottom face, an.}d the colours !! which are placed in the colour !! arrays for the DLI. !!-------------------------.}------------!PROC draw_cube() CONST just_lum=%00001110, !Just the lum'ce just_col=%11110000 !Just the colour BYTE .}face1, face2, blanks, through, theta2 POINTER dt BEGIN ! Decide which display list area to ! ! construct in..} LDA which_dl BNE screen2 LDA #first_dl AND $FF LDY #first_dl / $100 INC which_dl BNE anyscreen !Unconditional!.} :screen2 LDA #second_dl AND $FF LDY #second_dl / $100 DEC which_dl :anyscreen STA dladdr STA dt STY.} dladdr+1 STY dt+1 ! Work out the heights of the ! ! respective faces. ! LDY theta LDA sin,Y S.}TA face1 LDA #rightangle SEC SBC theta STA theta2 TAY LDA sin,Y STA face2 LDA #std_lines SEC SBC face1 SBC face2 .}LSRA STA blanks ! Construct the cube. Set the image ! to the top screen, then work ! out which is the bottom screen. .} LDA which_image ASLA TAY LDA image_addr,Y STA image LDA image_addr+1,Y STA image+1 LDA blanks STA height blank_lin. }es() dli_line() LDA face1 STA height make_dl() dli_line() LDA bottom_image ASLA TAY LDA image_addr,Y STA image.!} LDA image_addr+1,Y STA image+1 LDA face2 STA height make_dl() dli_line() LDA blanks STA height blank_lines() ."}terminate_dl() dladdr=dt change_dl() ! Change the colours of the faces ! ! according to their angles. ! L.#}DA theta LSRA LSRA LSRA LSRA STA face1 LDA theta2 LSRA LSRA LSRA LSRA STA face2 LDY #cube_hues-1 :loopfindreal .$}LDA (hue_top),Y PHA; AND #just_lum SEC SBC face2 BCS notless LDA #0 :notless STA through PLA AND #just_col ORA throu.%}gh STA colour1,Y LDA (hue_bot),Y PHA; AND #just_lum SEC SBC face1 BCS notless2 LDA #0 :notless2 STA through P.&}LA AND #just_col ORA through STA colour2,Y DEY BPL loopfindreal END!-------------------------------------!! The face.'}_up procedure scrolls the !! cube up from rightangle-step to 0 !! degrees. At 0 degrees, it actually !! moves the bot.(}tom face to the top !! face and draws it at 90 degrees, !! ready for the next move. It exits !! if a trigger is pr.)}essed. !!-------------------------------------!PROC face_up() BEGIN LDA #rightangle SEC SBC rate STA theta.*} :loop draw_cube() LDA theta SEC SBC rate BEQ draw90 STA theta LDA strig !Quit if trigger pressed BN.+}E loop RETURN :draw90 !Advance by one image (wrapping !if nec.) and draw at 90 degrees. LDA bottom_image STA which.,}_image next_image() LDA #rightangle STA theta draw_cube() END!-------------------------------------!! The face_down.-} procedure scrolls the !! cube down from step to rightangle !! degrees. At step degrees, it !! actually moves the..} top face to the !! bottom face and draws the new top !! face in. It exits if a trigger is !! pressed. ./} !!-------------------------------------!PROC face_down() BEGIN !Find out what the top face should be LDY.0} which_image BNE above_last LDY faces_in :above_last DEY STY which_image next_image() LDA rate STA theta :loop.1} draw_cube() LDA theta CMP #rightangle BEQ quit !Quit if at 90 degrees ADC rate STA theta LDA strig !Qui.2}t if trigger pressed BNE loop :quit END!-------------------------------------!! The set_vbi procedure sets the !.3}! vertical blank interrupt to that !! given as the address. The address !! of the existing VBI is saved in !! ol.4}dvec. It enables VBIS and !! disables DLIs. !!-------------------------------------!PROC set.5}_vbi(INT addr) CONST setvbv=$E45C INT vvblkd=$224 BEGIN oldvec=vvblkd nmien =enable_vbis LDA #7 STX XSAVE LD.6}Y addr LDX addr+1 JSR setvbv LDX XSAVE END!-------------------------------------!! The initialise_ints procedure .7} !! initialises the vertical blank and !! display list interrupts. !!-------------------------------------!.8}PROC initialise_ints() BYTE clock=20 BEGIN set_vbi(.deferred_vb) dlivec=.displaylistint !Wait until next VBI! LDA.9} clock :loop3 CMP clock BEQ loop3 nmien=enable_all_nmis END!-------------------------------------!! The initialise_cube.:} procedure sets !! up the Cube screen, the playfield, !! the player/missiles for the !! surround of the cube, an.;}d colours. !!-------------------------------------!PROC initialise_cube() CONST setscreen=narrow_playfield+ .<} enable_dma !Only for pf! BEGIN LDY #?pcol-1 :loop2 LDA surround STA pcol,Y LDA #255 STA pmap,Y LDA #q.=}uad_size STA psize,Y DEY BPL loop2 LDA #$00 STA phoriz+0 LDA #$20 STA phoriz+1 LDA #$C0 STA phoriz+2 LDA #$E0 STA p.>}horiz+3 gractl =all_players_ahead pmen =disable_all screenctl =setscreen totallines =cube_lines byte.?}sperline=cube_width LDA #0 STA which_image STA which_dl LDA #rightangle STA theta next_image() draw_cube() dlistart.@}=.topdlist END!-------------------------------------!! The pause procedure pauses for !! a number of seconds. .A} !!-------------------------------------!PROC pause*(BYTE secs) BYTE clock=20, savex BEGIN STX savex JS.B}R PULL TAX :one_sec_loop LDA clock CLC ADC #50 !jiffies! :loop LDY strig BEQ endloop CMP clock BNE loop DEX BNE .C}one_sec_loop :endloop LDX savex END!-------------------------------------!! The cube_demo procedure controls !! t.D}he actual cube demo, depending on !! the steps given in the cube program !! for up/down movement and speed. !!-------.E}------------------------------!PROC cube_demo() BYTE step_at, pauseval BEGIN WHILE trigger() DO ENDWHILE initiali.F}se_cube() :progloop LDA #0 STA step_at :loop LDY step_at !Get the speed and convert it into !the angular .G}movement per frame. LDA speed,Y STA pauseval CMP #4 BCC as_is ADC #0 :as_is STA rate !Find out whether to mo.H}ve up or !down or return to the beginning !of the program. LDA movement,Y CMP #disp_end BEQ progloop INC.I} step_at CMP #disp_up BNE not_up face_up() GOTO endloop :not_up CMP #disp_down BNE not_down face_down() GOT.J}O endloop :not_down pause(pauseval) :endloop LDA strig BNE loop END!-------------------------------------!! The.K} CUBEHCIF file contains the !! parts of the Cube program that !! handle the Human/Computer interface !! such as .L}the menus and file !! conversion facilities. !!-------------------------------------!LINK CUBEHCIF.M}he menus and file !! conversion facilities. !!-------------------------------------!LINK CUBEHCIF,!-------------------------------------!! CUBEDATA BY SIZ 1990 !!-------------------------------------!! Thi2O}s file contains all the data !! declarations for th Cube program. !!-------------------------------------!!--------2P}-----------------------------!! The following constants refer to !! the sizes of pictures. !!-------------2Q}------------------------!CONST std_width =40, cube_width =32, std_lines =192, cube_lines =128, sect_62_size=std_2R}width*std_lines, cube_size =cube_width*cube_lines, block_size =std_width*cube_lines!----------------------------------2S}---!! The following arrays define the !! screen memory, PM memory, display !! list memory, and character set !2T}! memory. Since some of these are !! only used at exclusive times, the !! areas overlap to allow optimal use !! of 2U}this large area of memory. !!-------------------------------------!@=(@+$1000) AND $F000!-------------------------2V}------------!! The following variables define !! the four Cube picture areas. !!------------------------------2W}-------!BYTE first_image [cube_size], second_image[cube_size], third_image [cube_size], fourth_image[cube_size]!-----2X}--------------------------------!! The following variables define the !! display list areas. Two areas are !! used for 2Y}the Cube so that while !! Antic is displaying using one, the !! program is constructing the next !! frame using th2Z}e other. !!-------------------------------------!BYTE first_dl [$400], second_dl[$400]!------------------2[}-------------------!! The following variables define the !! area used to hold the user-defined !! character set. 2\} !!-------------------------------------!BYTE udg[$400] DATA $00,$00,$00,$00,$00,$00,$00,$00, $55,$55,$552]},$55,$55,$55,$55,$55, $00,$66,$66,$00,$00,$00,$00,$00, $FF,$C3,$C3,$DB,$DB,$C3,$C3,$FF, $FF,$00,$FF,$00,$FF,$00,$FF,$002^}, $00,$66,$6C,$18,$30,$66,$46,$00, $1C,$36,$1C,$38,$6F,$66,$3B,$00, $00,$18,$18,$18,$00,$00,$00,$00, $00,$0E,$1C,$18,2_}$18,$1C,$0E,$00, $00,$70,$38,$18,$18,$38,$70,$00, $00,$18,$18,$7E,$7E,$18,$18,$00, $00,$18,$18,$7E,$18,$18,$00,$00, $2`}00,$00,$00,$00,$00,$18,$18,$30, $00,$00,$00,$7E,$00,$00,$00,$00, $00,$00,$00,$00,$00,$18,$18,$00, $00,$06,$0C,$18,$30,$2a}60,$40,$00, $00,$3C,$7E,$76,$7E,$7E,$3C,$00, $00,$38,$78,$18,$18,$7E,$7E,$00, $00,$3C,$6E,$1C,$38,$7E,$7E,$00, $00,$72b}E,$0C,$18,$6C,$7E,$3C,$00, $00,$1C,$3C,$7C,$6C,$7E,$1C,$00, $00,$7E,$70,$7C,$06,$7E,$3C,$00, $00,$3C,$70,$7C,$76,$7E,$32c}C,$00, $00,$7E,$1E,$3C,$78,$70,$70,$00, $00,$3C,$76,$3C,$76,$7E,$3C,$00, $00,$3C,$76,$3E,$0E,$3C,$38,$00, $00,$00,$182d},$18,$00,$18,$18,$00, $00,$00,$18,$18,$00,$18,$18,$30, $0E,$1C,$38,$70,$38,$1C,$0E,$00, $00,$00,$7E,$00,$00,$7E,$00,$002e}, $70,$38,$1C,$0E,$1C,$38,$70,$00, $00,$3C,$66,$0C,$18,$00,$18,$00, $00,$7C,$06,$06,$0F,$06,$00,$00, $00,$38,$7C,$76,2f}$76,$7E,$76,$00, $00,$7C,$76,$7C,$76,$7E,$7C,$00, $00,$3C,$76,$70,$76,$7E,$3C,$00, $00,$7C,$7E,$76,$7E,$7E,$7C,$00, $2g}00,$7E,$70,$7C,$70,$7E,$7E,$00, $00,$7E,$70,$7C,$70,$70,$70,$00, $00,$3E,$70,$76,$76,$7E,$3E,$00, $00,$76,$76,$7E,$76,$2h}76,$76,$00, $00,$7E,$38,$38,$38,$7E,$7E,$00, $00,$06,$06,$06,$66,$7E,$3C,$00, $00,$76,$7C,$78,$78,$7C,$76,$00, $00,$72i}0,$70,$70,$70,$7E,$7E,$00, $00,$63,$77,$7F,$7B,$73,$73,$00, $00,$66,$76,$7E,$7E,$7E,$76,$00, $00,$3C,$76,$76,$76,$7E,$32j}C,$00, $00,$7C,$76,$76,$7C,$70,$70,$00, $00,$3C,$76,$76,$7E,$7C,$36,$00, $00,$7C,$76,$76,$7C,$7C,$76,$00, $00,$3C,$602k},$3C,$0E,$7E,$7C,$00, $00,$7E,$38,$38,$38,$38,$38,$00, $00,$76,$76,$76,$76,$7E,$7E,$00, $00,$76,$76,$76,$76,$7C,$38,$002l}, $00,$73,$73,$7B,$7F,$77,$63,$00, $00,$76,$76,$3C,$3C,$76,$76,$00, $00,$76,$76,$7C,$38,$38,$38,$00, $00,$7E,$1C,$38,2m}$70,$7E,$7E,$00, $00,$1E,$18,$18,$18,$18,$1E,$00, $00,$40,$60,$30,$18,$0C,$06,$00, $00,$78,$18,$18,$18,$18,$78,$00, $2n}00,$08,$1C,$36,$63,$00,$00,$00, $00,$00,$00,$00,$00,$00,$FF,$00, $FE,$FE,$FE,$FE,$FE,$FE,$FE,$00, $66,$66,$67,$60,$60,$2o}67,$66,$66, $03,$03,$03,$03,$03,$03,$03,$03, $66,$66,$C6,$06,$0E,$FC,$00,$00, $66,$66,$E6,$06,$06,$E6,$66,$66, $00,$02p}0,$FC,$0E,$06,$C6,$66,$66, $03,$07,$0E,$1C,$38,$70,$E0,$C0, $C0,$E0,$70,$38,$1C,$0E,$07,$03, $01,$03,$07,$0F,$1F,$3F,$72q}F,$FF, $00,$00,$00,$00,$0F,$0F,$0F,$0F, $80,$C0,$E0,$F0,$F8,$FC,$FE,$FF, $0F,$0F,$0F,$0F,$00,$00,$00,$00, $F0,$F0,$F02r},$F0,$00,$00,$00,$00, $FF,$FF,$00,$00,$00,$00,$00,$00, $00,$00,$00,$00,$00,$00,$FF,$FF, $00,$00,$00,$00,$F0,$F0,$F0,$F02s}, $18,$0C,$0C,$1E,$3B,$3F,$3F,$1E, $00,$00,$3F,$70,$60,$63,$66,$66, $00,$00,$FF,$00,$00,$FF,$00,$00, $66,$66,$E7,$00,2t}$00,$E7,$66,$66, $00,$66,$66,$66,$66,$66,$66,$00, $00,$00,$00,$00,$FF,$FF,$FF,$FF, $C0,$C0,$C0,$C0,$C0,$C0,$C0,$C0, $2u}00,$00,$FF,$00,$00,$E7,$66,$66, $66,$66,$E7,$00,$00,$FF,$00,$00, $F0,$F0,$F0,$F0,$F0,$F0,$F0,$F0, $66,$66,$63,$60,$70,$2v}3F,$00,$00, $70,$F0,$C7,$EF,$CC,$FC,$7F,$07, $00,$18,$3C,$7E,$FF,$00,$00,$00, $00,$00,$00,$FF,$7E,$3C,$18,$00, $00,$12w}2,$36,$7E,$7E,$36,$12,$00, $00,$68,$6C,$7E,$3E,$0C,$08,$00, $00,$18,$3C,$7E,$7E,$3C,$18,$00, $00,$00,$00,$00,$00,$00,$72x}E,$00, $00,$00,$00,$00,$00,$7E,$7E,$00, $00,$00,$00,$00,$7E,$7E,$7E,$00, $00,$00,$00,$7E,$7E,$7E,$7E,$00, $00,$00,$7E2y},$7E,$7E,$7E,$7E,$00, $10,$38,$6C,$C6,$6C,$38,$10,$00, $00,$00,$3E,$66,$66,$3E,$06,$7C, $00,$60,$60,$7C,$66,$66,$66,$002z}, $FF,$C3,$E7,$66,$66,$E7,$C3,$FF, $00,$06,$00,$06,$06,$06,$06,$3C, $00,$60,$60,$6C,$78,$6C,$66,$00, $00,$08,$18,$3F,2{}$3F,$18,$08,$00, $00,$60,$78,$7E,$7F,$7F,$7F,$7F, $00,$00,$00,$00,$80,$E0,$F8,$FC, $7F,$7F,$7F,$7F,$7E,$78,$60,$00, $2|}FC,$F8,$E0,$80,$00,$00,$00,$00, $00,$00,$3E,$66,$66,$3E,$06,$06, $00,$08,$0C,$7E,$7E,$0C,$08,$00, $FF,$C0,$CF,$66,$33,$2}}F9,$C0,$FF, $00,$18,$7E,$18,$18,$18,$0E,$00, $00,$18,$3C,$7E,$18,$18,$18,$00, $00,$00,$66,$66,$66,$3C,$18,$00, $00,$02~}0,$63,$6B,$7F,$3E,$36,$00, $00,$00,$66,$3C,$18,$3C,$66,$00, $00,$00,$66,$66,$66,$3E,$0C,$78, $FF,$03,$F3,$66,$CC,$9F,$02}3,$FF, $00,$18,$3C,$7E,$7E,$18,$3C,$00, $66,$66,$66,$66,$66,$66,$66,$66, $00,$7E,$78,$7C,$6E,$66,$06,$00, $08,$18,$382},$78,$38,$18,$08,$00, $10,$18,$1C,$1E,$1C,$18,$10,$00;!-------------------------------------!! The following variables d2}efine the !! player/missile area. !!-------------------------------------!BYTE pmarea[$800]=first_image,2} unused[$300]=pmarea, used [$500]=pmarea+$300, p4area[$100]=pmarea+$300, p0area[$100]=pmarea+$400, p1area[$100]=pmarea+2}$500, p2area[$100]=pmarea+$600, p3area[$100]=pmarea+$700, psize [4] =$D008, phoriz[4] =$D000, mhoriz[4] =$D004, p2}map [4] =$D00D, pcol [4] =704, pmbase =$D407, pmen =$D01D, msize =$D00CCONST enable_all =%11,2} disable_all =%00, single_size =0, double_size =2, quad_size =3!-------------------------------------!! The followin2}g variables define the !! standard 40*192 screen used to !! display a 62-sector picture. !!------------------2}-------------------!BYTE gr15_screen[sect_62_size]= third_image+$10!--------------------------------2}-----!! The picture$ variable holds the name!! of the picture. This is used so !! that te output picture has the 2}!! same name as the input, with a !! different extender. !!-------------------------------------!ST2}RING picture$[40]!-------------------------------------!! The following constants refer to !! Boolean values. 2} !!-------------------------------------!CONST true =0-1, false=0!-------------------------------------!! 2}The following constants refer to !! operating channels and modes. !!-------------------------------------!CONST2} input =4, directory=6, output =8, update =input+output, diskchan =1, keychan =7!-----------------------------2}--------!! The constants below indicate OS, !! PL65 and program error codes. !!----------------------------------2}---!CONST success =0, quit_section=255, end_of_file =136, no_files =170!-------------------------------------!2}! The load_type variable holds which !! type of file is being loaded: an !! AtariArtist or 62-sector file. !!---2}----------------------------------!CONST load_aa =1, load_62 =2, load_cube =3BYTE load_type!-------------------2}------------------!! The shadows array holds the five !! shadow vaiables for the colours. !!------------------------2}-------------!BYTE shadows[5]=708!-------------------------------------!! The following constants and !! varia2}bles define the Cube control !! program. This is a very short !! "program" indicating that the cube !! should be 2}moved up or down by a !! face at a particular rate, or that !! a pause should be given. !!----------------2}---------------------!CONST disp_up ='', disp_down ='', disp_pause='', disp_end ='', max_steps =32BYTE movem2}ent[max_steps+1], speed [max_steps]!-------------------------------------!! The hues array holds the colours !! for2} all the images. The first image !! has colours at hues[0] to [4], the !! second at hues[5] to [9], etc. The !! image_ad2}dr array holds the start !! address in memory for each image. !!-------------------------------------!CONST max_ima2}ges=4, cube_hues =4BYTE hues[max_images*cube_hues]INT image_addr[max_images] DATA first_image, second_image, thi2}rd_image, fourth_image;, hue_addr[max_images] DATA hues+cube_hues*0, hues+cube_hues*1, hues+cube_hues*2, hues+cube2}_hues*3;!-------------------------------------!! The which_dl variable indicates !! which display list should be used2} !! for constructing the next frame, if !! 0 then first_dl is used otherwise !! second_dl is used. The which_image !2}! variable is used to hold the number !! of the image to display on the top !! face of the cube. The theta !! var2}iable is used to indicate the !! angle (in degrees) of the top face, !! the bottom face is at a right angle !! to this.2} The speed variable is used !! to hold the speed of the cube i.e. !! the number of degrees difference !! between two f2}rames. The faces_in !! variable holds the number of faces !! on the cube: this may not be 4! !!-------------------2}------------------!BYTE surround, which_dl, which_image, theta, rate, faces_inCONST rightangle=90ENDFILE-------0v!-------------------------------------!! CUBEHCIF BY SIZ 1990 !!-------------------------------------!! Thi6}s program contains the Human/ !! Computer interface section of the !! Cube program. !!---------6}----------------------------!INCLUDE TERMINALINCLUDE WINDOWINCLUDE PICLOADAINCLUDE OPTIONS!---------------------------6}----------!! The options_screen procedure sets !! up the display list and colours to !! point to the options screen. Al6}so, !! if the graphics screen hasn't been !! opened before it opens it. The two !! screens can subsequently be switched6}!! instantaneously. !!-------------------------------------!PROC options_screen() CONST black=$00,6} blue =$88, red =$36, green=$AA, white=$0C BYTE new_cols[?shadows] DATA blue, red, white, black, green; BEGIN6} set_up_gr15() MOVE (.new_cols,?shadows,.shadows) dlistart=.top_dl_area disable_pms() END!-------------------------6}------------!! The centre procedure centres text !! on the line given. !!------------------------------6}-------!PROC centre(BYTE line INT addr,len) BEGIN IF len>winwidth THEN len=winwidth ENDIF gotoxy(SHR(winwidth-len6}),line) writestring(addr,len) END!-------------------------------------!! The write_titles procedure prints !! the t6}itles at the top and bottom of !! the screen. !!-------------------------------------!PROC write_6}titles() BEGIN window(0,0,39,23) centre(0,"THE CUBE BY siz") centre(21,"USE JOYSTICK, FIRE="& "SELECT, STA6}RT=QUIT") END!-------------------------------------!! The init_screen procedure sets up !! the graphics 0 screen and p6}rints !! the title messages. !!-------------------------------------!PROC init_screen() BEGIN textm6}ode_0() LDA #blank_8 STA main_dl_area+0 STA main_dl_area+21 write_titles() options_screen() END!----------------6}---------------------!! The display_error procedure places !! an error message on the bottom line !! of the screen, and w6}aits until the !! Fire button is pressed. !!-------------------------------------!PROC display_error(BYTE nu6}mber) STRING op$[40] BEGIN options_screen() window(0,21,39,21) delline() op$="ERROR " op$+STR$(number) op$+": P6}RESS FIRE" centre(0,op$) REPEAT UNTIL NOT trigger() REPEAT UNTIL trigger() write_titles() END!--------------------6}-----------------!! The fspec$ function returns a file !! specification from a directory !! entry. Eg if the entry i6}s: !! ' FRED TXT 091' then it returns !! 'FRED.TXT'. !!------------------------------6}-------!FUNC fspec$(INT addr,len) STRING full$[12], ch$[1] INT loop BEGIN full$="" ch$="x" FOR loop=2 TO 9 D6}O MOVE(addr+loop,1,.ch) IF ch$<>" " THEN full$+ch$ ENDIF NEXT full$+"." FOR loop=10 TO 12 DO MOVE(addr+loop,1,6}.ch) IF ch$<>" " THEN full$+ch$ ENDIF NEXT END full$!-------------------------------------!! The search_for_files pr6}ocedure !! scans the directory for picture !! files. If the load_type variable is !! load_aa, it searches for 6} !! AtariArtist files. If it is load_62 !! then it searches for files with 62 !! 63 or 64 sectors. For load_cube i6}t !! searches for files with a .CUB !! extension. The number of files that !! match is put in files. The files !6}! are then displayed on the text !! screen. !!-------------------------------------!BYTE6} filesFUNC search_for_files() STRING fname$[40], fsize$[3], fext$[3] INT flen=fname-2 BEGIN files=0 options_6}screen() window(0,1,39,20) clrscr() OPEN(diskchan,directory,0,"D:*.*") REPEAT flen=GREC(diskchan,.fname,?fname) 6} IF load_type<>load_62 THEN IF flen>12 THEN fext$=fname$[10,12] IF (load_type=load_aa AND fext$="PIC") OR 6} (load_type=load_cube AND fext$="CUB") THEN set_option(files,fspec$(fname$)) INC files ENDIF ENDIF6} ELSE IF flen>16 THEN fsize$=fname$[14,16] IF fsize$="062" OR fsize$="063" OR fsize$="031" THEN 6} set_option(files,fspec$(fname$)) INC files ENDIF ENDIF ENDIF UNTIL (fname$[7,9]="E S") OR (files6}=max_options) CLOSE(diskchan) centre(1,"ԠŠ") gotoxy(0,3) IF files=0 THEN writestring("NO FILES."6}) RETURN no_files ELSE display_options(files,13) ENDIF END success!-------------------------------------!! The 6}load_picture procedure gets a !! picture name and loads it. If !! Start is pressed, it exits straight !! away. The6} procedure used to load !! the picture depends on the type of !! picture being loaded, either !! load_aa or loa6}d_62, as set by the !! load_type variable. !!-------------------------------------!FUNC load_picture(BY6}TE image) STRING filename$[40] INT picturelen=picture-2, filelen=filename-2, scrstart=88 BYTE backg=shadows+4, 6} result, pic[?picture]=picture, file[?filename]=filename BEGIN TRAP oops options_screen() window(0,1,39,20) WHIL6}E start() OR trigger() DO ENDWHILE result=choose_options(files,1) IF start() THEN RETURN quit_section ELSE pict6}ure$="D:" picture$+get_option$(result) filename$=picture$ REPEAT DEC picturelen UNTIL pic[picturelen]='.' 6}picture$+".CUB" REPEAT DEC filelen UNTIL file[filelen-1]<>' ' OPEN(diskchan,input,0,filename$) IF load_type=l6}oad_aa THEN dlistart=.topdlist scrstart=.gr15_screen FILL(.gr15_screen,?gr15_screen,0) atari_artist_load(disk6}chan) scrstart=.screen_area IF ERRNUM<>end_of_file THEN RETURN ERRNUM ENDIF ELSE IF load_type=load_626} THEN dlistart=.topdlist FILL(.gr15_screen,?gr15_screen,0) GCHAR(diskchan,.gr15_screen, se6}ct_62_size) NOTRAP GCHAR(diskchan,.backg,1) GCHAR(diskchan,.shadows,3) ELSE GCHAR(diskchan,image_addr6}[image], cube_size) GCHAR(diskchan,hue_addr[image], cube_hues) ENDIF ENDIF CLOSE(d6}iskchan) ENDIF RETURN success :oops END ERRNUM!-------------------------------------!! The change_colours procedure6} !! can be used to change te colours of !! the picture. If 0, 1, 2 or 3 are !! pressed then the background or 6} !! colours 1-3 are cycled forward, if !! te keys are shifted the registers !! are cycled in reverse. If the !6}! onlybg parameter is true, only the !! background colour may be changed. !!-------------------------------------!PROC6} change_colours(BYTE onlybg) BYTE colinc BYTE least, leastsh BEGIN IF onlybg THEN least='5' leastsh='%' ELSE 6}least='1' leastsh='!' ENDIF colinc=GET(keychan) IF colinc='0' THEN colinc='5' ENDIF IF colinc=')' THEN colinc='%' 6}ENDIF IF colinc>=least AND colinc<='5' THEN colinc=colinc-'1' shadows[colinc]=shadows[colinc]+2 ENDIF IF colinc>=6}leastsh AND colinc<='%' THEN colinc=colinc-'!' shadows[colinc]=shadows[colinc]+16 ENDIF END!----------------------6}---------------!! The set_box_x procedure sets the !! coordinates of the player/missiles !! so that the left edge of t6}he box !! shows a pixel x across. !!-------------------------------------!PROC set_box_x*(BYTE x) BEGIN 6} JSR PULL !Load x into A reg CLC ADC #32 STA phoriz+0 ADC #32 STA phoriz+1 ADC #32 STA phoriz+2 ADC #32 STA phoriz+6}3 ADC #32 STA mhoriz+3 ADC #8 STA mhoriz+2 ADC #8 STA mhoriz+1 ADC #12 STA mhoriz+0 END!------------------------6}-------------!! The scroll_picture procedure !! scrolls the picture about the 8K !! screen, depending upon the m6}ovement !! of the joystick. This continues !! until the trigger is pressed. !!----------------------------------6}---!BYTE x, yFUNC scroll_picture() CONST nokeypress=255 BYTE clock=20, keybuf=764 BEGIN x=16 y=31 REPEAT6} clock=0 IF up() AND y>0 THEN DEC y MOVE(.used+1,?used-1,.used) ENDIF IF down() AND y<64 THEN INC y 6} MOVE(.used,?used-1,.used+1) ENDIF IF left() AND x>0 THEN DEC x ENDIF IF right() AND x<32 THEN INC x 6}ENDIF set_box_x(x) REPEAT UNTIL clock>=5 FILL(.pcol,?pcol,pcol[0]+2) IF start() THEN RETURN quit_section E6}NDIF IF keybuf<>nokeypress THEN change_colours(false) ENDIF UNTIL trigger() set_box_x(x AND %11111100) END suc6}cess!-------------------------------------!! The write_file procedure writes !! a Cube-format file for the area of !6}! the screen selected. First it moves !! the pixels so that the left-hand !! coordinate starts on a byte. !!---6}----------------------------------!FUNC write_file() BYTE backg=shadows+4 POINTER line INT top, bottom CONST scrlen6}gth=block_size-40 BEGIN top=.gr15_screen+40*y+(SHR SHR x) bottom=top+scrlength IF (x AND %11) !<>0! THEN FOR line=t6}op TO bottom STEP 40 DO STX XSAVE LDA x; AND #$3 ASLA TAX :loopxl LDY #0 LDA (line),Y ASLA STA (6}line),Y :loopl INY LDA (line),Y ASLA STA (line),Y BCC endl DEY LDA (line),Y 6} ORA #1 STA (line),Y INY :endl CPY #32+1 BNE loopl DEX BNE loopxl LDX XSAVE NEXT EN6}DIF TRAP oops OPEN(diskchan,output,0,picture$) FOR line=top TO bottom STEP 40 DO PCHAR(diskchan,line,32) NEXT P6}CHAR(diskchan,.shadows,3) PCHAR(diskchan,.backg,1) CLOSE(diskchan) RETURN success :oops END ERRNUM!---------------6}----------------------!! The convert_pix procedure handles !! the two picture conversion options !! from the main menu.6} !!-------------------------------------!PROC convert_pix() BYTE load_ok, save_ok, find_ok BEGIN 6} find_ok=search_for_files() IF find_ok=success THEN REPEAT load_ok=load_picture(0) IF load_ok=success THEN 6}set_up_pms() IF scroll_picture()=success THEN save_ok=write_file() IF save_ok<>success THEN display_e6}rror(save_ok) load_ok=save_ok ENDIF ENDIF ELSE IF load_ok<>quit_section THEN display_error(l6}oad_ok) ENDIF ENDIF CLOSE(diskchan) UNTIL load_ok<>success ELSE display_error(find_ok) ENDIF END!--6}-----------------------------------!! The program_cube procedure allows !! the user to select the cube program !! ie the6} sequence of ups, downs and !! pauses that the picture will rotate !! through. !!------------6}-------------------------!PROC program_cube() STRING selected$[20] DATA "(FACES SELECTED: x)"; CONST last_step=6}max_steps-1, move_line=10, speed_line=11, left_marg=2 BYTE files_sel=selected+17, backg=shadows+4, clock=20, x6}, oldx, y, oldy, last_move=movement+max_steps, newval INT loop BEGIN last_move=disp_end window(0,1,39,20) clrsc6}r() centre(1,"Š̠") centre(5,"PRESS 0/SHIFT-0 TO ADJUST") centre(6,"THE BACKGROUND COLOUR") files_sel=6}faces_in+'0' centre(8,selected$) x=0 y=move_line gotoxy(left_marg,move_line) writestring(.movement,max_steps) write6}string(" mn") gotoxy(left_marg,speed_line) FOR loop=0 TO last_step DO writechar('`'+speed[loop]) !a to e! NEXT wri7}testring(" op") gotoxy(left_marg,y) invert(cursor,1) REPEAT options_screen() backg=surround WHILE start() OR t7}rigger() DO ENDWHILE REPEAT clock=0 oldx=x oldy=y IF up() THEN y=move_line ENDIF IF down() THEN y=spe7}ed_line ENDIF IF left() THEN IF x>0 THEN DEC x ELSE x=max_steps ENDIF ENDIF IF right()7} THEN IF xoldx) OR (y<>oldy) THEN I7}F oldx=max_steps THEN gotoxy(oldx+left_marg,move_line) invert(cursor,4) invert(cursor+screen_width,4) 7}ELSE gotoxy(oldx+left_marg,oldy) invert(cursor,1) ENDIF IF x=max_steps THEN gotoxy(x+left_marg,mo7}ve_line) invert(cursor,4) invert(cursor+screen_width,4) ELSE gotoxy(x+left_marg,y) invert(cursor7},1) ENDIF ENDIF IF keypressed() THEN change_colours(true) ENDIF IF trigger() AND x6 UNTIL start() OR (trigger() AND x=max_steps) IF NOT start() THEN surround=backg cube_demo() 7} WHILE trigger() DO ENDWHILE ENDIF UNTIL start() options_screen() END!-------------------------------------!! The7} cube_control menu controls the !! functions of the cube, such as !! which files are to be displayed !! and the 7}little 'display program' !! that controls the up/down movements !! and speeds. !!--------------7}-----------------------!PROC cube_control() STRING text$[20] DATA "ԠŠ"; BYTE find_ok, load_ok, f7}acenum=text+15 BEGIN faces_in=0 find_ok=search_for_files() IF find_ok=success THEN REPEAT facenum=faces_in+''7} centre(1,text$) load_ok=load_picture(faces_in) IF load_ok=success THEN INC faces_in ENDIF UNTIL (load7}_ok<>success) OR (faces_in=max_images) IF (load_ok=success) OR (faces_in>0 AND load_ok=quit_section) THEN 7} program_cube() ENDIF ELSE IF find_ok<>quit_section THEN display_error(find_ok) ENDIF ENDIF END !----7}---------------------------------!! The main_menu function displays the !! main menu and asks the user to !! select t7}he option, which is !! returned as either load_aa, load_62 !! or load_cube. If Start is pressed !! then an error7} (quit_program) is !! generated. !!-------------------------------------!FUNC main_menu() B7}YTE result BEGIN window(0,1,39,20) clrscr() window(7,7,31,15) centre(0,"Πՠ") gotoxy(0,2) set_opti7}on(0,"DISPLAY PIX ON CUBE") set_option(1,"CONVERT ATARIARTIST PIX") set_option(2,"CONVERT MICROPAINTER PIX") WHILE star7}t() OR trigger() DO ENDWHILE display_options(3,25) CASE choose_options(3,1) OF 0 DO result=load_cube ENDOF OF 1 D7}O result=load_aa ENDOF OF 2 DO result=load_62 ENDOF ENDCASE IF start() THEN result=quit_section ENDIF END result7}!-------------------------------------!! The initialise procedure is called !! at the start of the program to !! p7}erform such functions as setting !! up the display and the interrupts. !!-------------------------------------!PROC in7}itialise() BYTE backg=shadows+4, charset=756 CONST user_set=udg/256 BEGIN CLOSE(keychan) CLOSE(diskchan) OPEN(7 }keychan,input,0,"K:") FILL(.movement,max_steps,disp_up) FILL(.speed,max_steps,3) initialise_ints() charset=user_set 7!} init_screen() surround=backg END!-------------------------------------!! The terminate procedure is called !! at th7"}e end of the program to return !! the computer to a safe state by !! disabling interrupts etc. !!-----------7#}--------------------------!PROC terminate() BEGIN CLOSE(keychan) CLOSE(diskchan) OPEN(keychan,update,0,"E:") CLOSE7$}(keychan) set_vbi(oldvec) END!-------------------------------------!! M A I N C O D E !!----------7%}---------------------------!MAIN() BEGIN initialise() REPEAT load_type=main_menu() IF load_type=load_cube THEN 7&} cube_control() ELSE IF load_type<>quit_section THEN convert_pix() ENDIF ENDIF UNTIL load_type=quit_se7'}ction terminate() END IF load_type<>quit_section THEN convert_pix() ENDIF ENDIF UNTIL load_type=quit_se4!-------------------------------------!! DLI LIBRARY BY SIZ 1990 !!-------------------------------------!! Thi;)}s library gives constants and !! variables for accessing the display !! list. !!---------;*}----------------------------!!-------------------------------------!! The following constants refer to !! items in the;+} display list. !!-------------------------------------!CONST blank_1 =$00, blank_8 =$70, os_mode_;,}0 =$02, os_mode_15 =$0E, dli =$80, lms =$40, scroll_horiz =$10, scroll_vert =$20, jump ;-} =$01, jump_and_wait =jump+lms!-------------------------------------!! The following variables are located !! at ;.}appropriate areas in memory for !! the display list access. !!-------------------------------------!BYTE har;/}dware_colours[5]=$D016, wsync =$D40A, hscrol =$D404, vscrol =$D405, screenctl ;0} =559, gractl =623, nmien =$D40EINT dlistart =560, dlivec =512!-----;1}--------------------------------!! The following constants refer to !! values for locations 559, 623 and !! $D40E. ;2} !!-------------------------------------!CONST no_playfield =%00000000, narrow_playfiel;3}d =%00000001, standard_playfield =%00000010, wide_playfield =%00000011, enable_missiles_559 =%00000100, enable_p;4}layers_559 =%00001000, enable_all_pms_559 =%00001100, one_line_resolution =%00010000, enable_dma =%00100000, ;5}all_players_ahead =%00000001, players_01_ahead =%00000010, all_playfields_ahead=%00000100, playfields_01_ahead =%0000;6}1000, fifth_player =%00010000, overlap_enable =%00100000, gtia_9 =%01000000, gtia_10 ;7} =%10000000, gtia_11 =%11000000, enable_dlis =%10000000, enable_vbis =%01000000, enable_all_;8}nmis =%11000000ENDFILE =%11000000, enable_dlis =%10000000, enable_vbis =%01000000, enable_all_8!-------------------------------------!! OPTIONS LIBRARY BY SIZ 1990 !!-------------------------------------!! Thi?:}s library provides an easy way !! of getting options such as files !! from a directory or options from !! a menu. ?;} !!-------------------------------------!INCLUDE WINDOW!-------------------------------------?<}!! The following variables and !! functions allow access to the !! joystick. !!--?=}-----------------------------------!BYTE stick=632, strig=644FUNC up() BEGIN END (stick AND %0001)=0FUNC down() BEG?>}IN END (stick AND %0010)=0FUNC left() BEGIN END (stick AND %0100)=0FUNC right() BEGIN END (stick AND %1000)=0FUNC tri??}gger() BEGIN END (strig=0)FUNC start() BYTE consol=$D01F BEGIN END (consol AND %1)=0!---------------------------------?@}----!! The following constant describes !! the maximum number of options that !! can be chosen. The options can be !?A}! max_width wide but the actual width !! is given at runtime. !!-------------------------------------!CON?B}ST max_options = 40, max_width = 30!-------------------------------------!! The options string holds the text !! fo?C}r the options. The option array !! holds the on/off toggle for each !! option. This can be set before !! calling?D} the choose procedure and !! examined afterwards to determine !! which options were selected. !! (Option numb?E}ers start at 0, 0=not !! selected, nonzero=selected.) !! The optx and opty arrays hold the !! starting coordina?F}tes for each !! option. !!-------------------------------------!STRING options$[max_opt?G}ions*max_width]BYTE option [max_options], optx [max_options], opty [max_options]!----------------------------------?H}---!! The set_option procedure sets an !! option to a given text. It is !! padded with blanks. !?I}!-------------------------------------!PROC set_option(BYTE opt INT addr,len) INT staddr BEGIN staddr=.options+opt*max_?J}width FILL(staddr,max_width,' ') MOVE(addr,len,staddr) END!-------------------------------------!! The get_option pro?K}cedure gets an !! option's text. It will be padded !! on the right with spaces. !!------------------------?L}-------------!FUNC get_option$(BYTE opt) STRING result$[max_width] INT resultlen=result-2 BEGIN MOVE(.options+opt*max_?M}width, max_width,.result) resultlen=max_width END result$!-------------------------------------!! The display_o?N}ptions procedure !! displays the options on the screen. !! This should be called before choose !! if the data on the?O} screen does not !! tally with the options structures !! in memory. The first option is !! displayed at the cursor?P} position, !! with subsequent options following, !! or wrapped onto following lines !! if they cannot fit on the cu?Q}rrent !! line. It is not advisable to cause !! the screen to scroll. !!----------------------------------?R}---!BYTE widthPROC display_options(BYTE opt,w=width) STRING choice$[max_width+1] BYTE choicelen=choice-2 INT chosen?S} BEGIN IF opt=0 THEN RETURN ENDIF DEC opt FOR chosen=0 TO opt DO choice$=" " choice$[1]=get_option$(chosen) ch?T}oicelen=width IF wherex+width>winwidth THEN gotoxy(0,wherey+1) ENDIF optx[chosen]=wherex opty[chosen]=wherey?U} writestring(choice$) NEXT END!-------------------------------------!! The inv procedure inverts width !! charac?V}ters from optx[n],opty[n] !!-------------------------------------!PROC inv(BYTE n) BEGIN gotoxy(optx[n],opty[n]) ?W}invert(cursor+1,width-1) END!-------------------------------------!! The choose_options procedure allows !! options to b?X}e chosen, up to a !! maximum of max. The procedure exits !! when the start key is pressed. A !! special case exis?Y}ts if max is 0 or !! 1: the procedure exits when the !! first fire click is made. The !! result of the procedur?Z}e is the !! option that was last highlighted. !!-------------------------------------!FUNC choose_options(BYTE opt?[},max) BYTE chosen, old, selected, clock=20 BEGIN IF opt=0 THEN RETURN 0 ENDIF DEC opt chosen=0 selected=0 ?\} FILL(.option,?option,0) inv(chosen) REPEAT clock=0 old=chosen IF up() THEN WHILE (chosen>0) AND ((opty?]}[chosen]>=opty[old]) OR (optx[chosen]<>optx[old])) DO DEC chosen ENDWHILE ENDIF IF down() THEN WHILE ?^}(chosenoptx[old])) DO INC chosen ENDWHILE ENDIF?_} IF left() AND (chosen>0) THEN DEC chosen ENDIF IF right() AND (chosenold THEN inv(old) inv(chosen) ENDIF IF trigger() THEN gotoxy(optx[chosen],opty[chosen]) IF option?a}[chosen] THEN option[chosen]=0 DEC selected ELSE IF selected6 UNTIL start() OR (max<=?c}1 AND selected<>0) gotoxy(optx[chosen],opty[chosen]) inv(chosen) END chosenENDFILE6 UNTIL start() OR (max<=<Z!-------------------------------------!! PICLOADA BY SIZ 1990 !!-------------------------------------!! TheCe} atari_artist_load procedure !! loads an AtariArtist formatted !! picture. It places the colour reg's !! into theCf} shadow colour registers. !! It assumes that the Graphics 15 !! screen has been set up and that the !! top address iCg}s pointed to by the !! word at locations 88 and 89. !! From a utility by Paul Lay. !!-------------------Ch}------------------!INCLUDE TERMINAL!-------------------------------------!! The screen_pointer variable points !! to tCi}he address where the next !! byte of screen data should go. The !! load_mode variable is used to !! indicate Cj}which mode is used for !! loading the picture. !!-------------------------------------!POINTER screen_Ck}pointerBYTE load_modeCONST load_vertical = 1, load_horizontal = 2BYTE x_coord, y_coord!-------Cl}------------------------------!! The calc_screen_pointer procedure !! calculates the screen pointer value !! for a givenCm} x and y coordinate. !!-------------------------------------!PROC calc_screen_pointer() INT y_by_40 INT screen_startCn}=88 BEGIN PHA LDA y_coord !Get the value of the STA y_by_40 !y coordinate and mult LDA #0 !-iply by 40 reCo}ady to STA y_by_40+1 !add to the screen. ASL y_by_40 ROL y_by_40+1 !*2 ASL y_by_40 ROL y_by_40+1 !*4 ASL y_by_40 Cp} ROL y_by_40+1 !*8 LDA y_by_40+1 PHA LDA y_by_40 ASL y_by_40 ROL y_by_40+1 !*16 ASL y_by_40 ROL y_by_40+1 !*32 ACq}DC y_by_40 STA y_by_40 PLA ADC y_by_40+1 STA y_by_40+1 LDA screen_start !Get the new ADC x_coord !screen_poiCr}nter STA screen_pointer !address, start- LDA screen_start+1 !ing at the top ADC #0 !of the screen STA scrCs}een_pointer+1 !and adding the LDA screen_pointer !x_coord and ADC y_by_40 !Y_by_40 values. STA screen_pointer Ct}LDA screen_pointer+1 ADC y_by_40+1 STA screen_pointer+1 PLA END!-------------------------------------!! The aa_storCu}e procedure stores the !! byte specified into the address at !! screen_pointer, and points screen_ !! pointer to the nCv}ext position !! depending on the loading mode used. !!-------------------------------------!BYTE aa_putbytePROC Cw}aa_store() BEGIN PHA TYA PHA JSR calc_screen_pointer LDA aa_putbyte LDY #0 STA (screen_pointer),Y LDA load_mCx}ode CMP #load_horizontal BEQ horiz INC y_coord !Next vertical INC y_coord !position. BNE common1 !Unconditional.Cy} :horiz INC x_coord !Next horiz position. :common1 LDA y_coord !If y-coord is at the CMP #192 !bottom of the Cz}screen, BNE notbot1 !make it equal the top. LDA #1 !Remember it goes in STA y_coord !steps of 2, all the :notC{}bot1 !evens, then all the CMP #193 !odds, which it then BCC notbot2 !ends up on 193 so we LDA #0 !start C|}on evens on the STA y_coord !next column. INC x_coord :notbot2 !Check that we are LDA x_coord !not at the righC}}t-hand CMP #40 !edge of the screen, BCC notright!otherwise reset the LDA #0 !x_coordinate and STA x_coorC~}d !increment the y_coord INC y_coord :notright PLA TAY PLA END!-------------------------------------!! The ataC}ri_artist_load procedure !! loads the picture from the channel !! specified. It is assumed that the !! channel is oC}pen and that the screen !! is in graphics 15. It includes a !! trap handler so that if the picture !! cannot be loaded,C} or when the EOF !! is met, the procedure exits. This !! trap will ALWAYS be made because !! the procedure keeps loC}ading until !! an EOF is met. !!-------------------------------------!PROC atari_artist_load(BYTE C}channel) STRING buffer$[129] INT byte_count =buffer-2 BYTE colours[5] =708, one_byte =buffer, C} which_mode =buffer+7, control_byte BEGIN TRAP no_more_data !Get the header information, and !transfer to thC}e colour registers. GCHAR(channel, .buffer, 27) LDA which_mode STA load_mode LDY #?colours-1 :loopcolours LDA buC}ffer+13,Y STA colours,Y DEY BPL loopcolours !Load the picture. First set the !x and y coordinates to zero. LDAC} #0 STA x_coord STA y_coord :mainloop LDA channel !Get the control JSR PUSH !byte and store JSR C}GET !it in the acc. JSR PULL !and control_byte STA control_byte !Check whether it CMP #0 C}!is zero, <=128, or BEQ threebytes !>128, to determine CMP #129 !type of data that BCS many !folloC}ws. :twobytes !<=128, store the STA byte_count !next byte in the LDA #0 !file to the next STAC} byte_count+1!byte_count locs. GOTO fillbyte :threebytes GCHAR(channel,.byte_count,2) LDA byte_count LDY byte_C}count+1 STY byte_count STA byte_count+1 GOTO fillbyte :many AND #127 !>128, Get the next STA byte_cC}ount !set of bytes in. LDA #0 STA byte_count+1 GCHAR (channel, buffer$) LDY #0 !then use the :lC}oopfill !aa_store procedure LDA buffer,Y !to store each byte STA aa_putbyte !in the buffer to aa_storeC}*() !the screen, until INY !all bytes have CPY byte_count !been so done. BNE loopfill JMP maC}inloop :fillbyte !If filling with LDA channel !just one value, JSR PUSH !then get the JSR GC}ET !value from disk JSR PULL !and store that STA aa_putbyte !value to the LDY byte_count !screenC}, the :loopstore !necessary number aa_store*() !of times. DEY BNE loopstore LDA byte_count+1 C} BEQ next_set DEC byte_count+1 JMP loopstore :next_set JMP mainloop :no_more_data ENDENDFILEe_count+1 @q!-------------------------------------!! SQUASH LIBRARY BY SIZ 1989/90 !!-------------------------------------!! ThiG}s library provides mechanisms !! for squahsing display lists and !! changing colours so that special !! effects G}such as 3D rotation can be !! achieved. !!-------------------------------------!INCLUDE DLI!G}-------------------------------------!! The sin array contains values of !! the sine of theta multiplied by 128 !! for G}example, sin[67] = sine of 67 !! degrees, multiplied by 128 = 126, !! where theta is in the range 0..90. !!----------G}---------------------------!BYTE sin[91] DATA 0, 2, 4, 7, 9, 11, 13, 16, 18, 20, 22, 24, 27, 29, 31,G} 33, 35, 37, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 73, 75, 77, 79, G}81, 82, 84, 86, 87, 89, 90, 92, 94, 95, 97, 98, 99, 101, 102, 104, 105, 106, 107, 109, 110, 111, 112, 113, 11G}4, 115, 116, 117, 118, 119, 119, 120, 121, 122, 122, 123, 124, 124, 125, 125, 126, 126, 126, 127, 127, 127, 127, 128, 128,G} 128, 128, 128;!-------------------------------------!! The topdist array holds the top !! bit of the display list soG} that !! the display list always starts at !! one place. !!--------------------------------G}-----!BYTE topdlist[8] DATA blank_8, blank_8, blank_8, jump, $FF,$FF;INT graphdlist=topdlist+4!-------------------G}------------------!! The following variables describe !! the attributes of the screen. The !! total number of lines cG}an be !! changed. The bytesperline variable !! is used to calculate each LMS !! instruction. This could be aG}ltered !! to enable horizontal scrolling or !! to use a different width playfield. !!----------------------------------G}---!POINTER totallines !lines in image: byte!BYTE bytesperline DATA 32;CONST datascan=os_mode_15!-----------------G}--------------------!! The make_dl procedure creates a !! display list starting at the address!! dladdr. The image is G}expected to !! start at the address given in image.!! dladdr is updated so that it points !! to the first free byte in G}the !! display list when the procedure has !! finished. The lines specified is !! the number of lines of the imagG}e to !! be displayed and should not be !! more than totallines. The values in !! image and height are destroyed. G}!!-------------------------------------!POINTER dladdr, !Set this to the dl address.! image, !Set this to the scr. addrG}ess! zpage1BYTE lines=zpage1, !Internal use! height=zpage1+1 !Desired height!PROC make_dl() POINTER linesbyheighG}t, donebytotallines CONST overflow=250 BEGIN STX XSAVE !-----------------------------------! ! Get ready to inserG}t the necessary ! ! lines in the display list. ! !-----------------------------------! LDY #0 LDA totallines SG}TA lines LDA height BEQ nolines STA linesbyheight TYA STA donebytotallines STA donebytotallines+1 STA linesbyheightG}+1 !-----------------------------------! ! For the height of the image, ! ! decide whether each line must be ! G}! displayed or not depending on the ! ! height required of the image. ! !-----------------------------------! :loopG}3 LDA linesbyheight+1 CMP donebytotallines+1 BCC less BNE more LDA linesbyheight CMP donebytotallines BCC lG}ess BEQ less :more LDA #datascan+lms STA (dladdr),Y INY LDA image STA (dladdr),Y INY LDA image+1 STA (dG}laddr),Y INY CPY #overflow BCC notincdladdr TYA LDY #0 CLC ADC dladdr STA dladdr BCC notover1 INC dlaG}ddr+1 CLC :notover1 :notincdladdr LDA donebytotallines ADC totallines STA donebytotallines BCC not4 G}INC donebytotallines+1 :not4 !-----------------------------------! ! Prepare to repeat for the next ! ! line untG}il all lines are done. ! !-----------------------------------! :less CLC LDA image ADC bytesperline STA imagG}e BCC notover2 INC image+1 CLC :notover2 LDA linesbyheight ADC height STA linesbyheight BCC notover3 INC lineG}sbyheight+1 :notover3 DEC lines BNE loop3 :nolines TYA CLC ADC dladdr STA dladdr BCC ok5 INC dladdr+1 :ok5 G}LDX XSAVE END!-------------------------------------!! The blank_lines procedure adds !! blank lines to the dl. The G}number !! of lines to add should be placed !! in the height variable. The address !! to start adding should be in G} !! dladdr. On exit, dladdr points to !! the first free byte of the display !! list. !G}!-------------------------------------!PROC blank_lines() BEGIN LDY height BEQ xit LDA #blank_1 DEY :loop STA (dG}laddr),Y DEY BPL loop LDA dladdr CLC ADC height STA dladdr BCC xit INC dladdr+1 :xit END!------------------------G}-------------!! The dli_line procedure inserts a !! blank line with a display list !! interrupt enabled, at dladdrG}, and !! updates dladdr. This should be done !! if you want to change colours !! between two images. G}, and !! updates dladdr. This should be done !! if you want to change colours !! between two images. G}, and !! updates dladdr. This should be done !! if you want to change colours !! between two images. G} dladdr the code to wait !! for vblank and jump to topdlist. !! Note that dladdr is not updated to !! point to a freG}e byte (what's the !! point since it's the end of the dl) !!-------------------------------------!PROC terminate_dl()G} BEGIN LDY #0 LDA #jump_and_wait STA (dladdr),Y INY LDA #topdlist AND 255; STA (dladdr),Y INY LDA #topdlist/256 G} STA (dladdr),Y END!-------------------------------------!! The change_dl procedure changes the !! graphdlist value duriG}ng the !! vertical blank. It is still !! necessary to set sdlist (560,561) !! to the address of topdlistG} before !! it appears on screen, but this need !! only be done at the top of the !! program. G} !!-------------------------------------!PROC change_dl() BYTE clock=20 BEGIN LDA clock :waitvb CMP clock BG}EQ waitvb LDA dladdr STA graphdlist LDA dladdr+1 STA graphdlist+1 ENDENDFILE LDA clock :waitvb CMP clock BDVEQ waitvb LDA dladdr STA graphdlist LDA dladdr+1 STA graphdlist+1 ENDENDFILE LDA clock :waitvb CMP clock BDVEQ waitvb LDA dladdr STA graphdlist LDA dladdr+1 STA graphdlist+1 ENDENDFILE LDA clock :waitvb CMP clock BDV0";A=16 REPEAT DEC A B=NUM MOD BASE+48 IF B>=58 THEN B=B+7 ENDIF NUM=NUM/BASE strptr=.SBUFF+A strval=B UNTK}IL NUM=0END SBUFF$[A]ENDFILEMOD BASE+48 IF B>=58 THEN B=B+7 ENDIF NUM=NUM/BASE strptr=.SBUFF+A strval=B UNTH IL NUM=0END SBUFF$[A]ENDFILEMOD BASE+48 IF B>=58 THEN B=B+7 ENDIF NUM=NUM/BASE strptr=.SBUFF+A strval=B UNTH IL NUM=0END SBUFF$[A]ENDFILEMOD BASE+48 IF B>=58 THEN B=B+7 ENDIF NUM=NUM/BASE strptr=.SBUFF+A strval=B UNTH TE POKVAL BASED TERMPTINT DOKVAL BASED TERMPTBYTE OCHARPROC CIO*(BYTE IOCB BYTE COM INT ADDR,LEN)BEGIN LDA STACK+6,X O}ASLA ASLA ASLA ASLA TAY LDA STACK+4,X STA ICCOM,Y LDA STACK+2,X STA ICBAL,Y LDA STACK+3,X STA ICBAH,Y LDA STACK,X STAO}ASLA ASLA ASLA ASLA TAY LDA STACK+4,X STA ICCOM,Y LDA STACK+2,X STA ICBAL,Y LDA STACK+3,X STA ICBAH,Y LDA STACK,X STAO}ASLA ASLA ASLA ASLA TAY LDA STACK+4,X STA ICCOM,Y LDA STACK+2,X STA ICBAL,Y LDA STACK+3,X STA ICBAH,Y LDA STACK,X STAO}X STA STACK,X LDA #0 STA STACK+1,XENDPROC CLOSE*(BYTE IOCB)BEGIN CIO*($0C,0,0)ENDPROC OPEN(BYTE IOCB,AUX1,AUX2 O} INT ADDR,COUNT)BEGIN TERMPT=$34A+16*IOCB POKVAL=AUX1 TERMPT=$34B+16*IOCB POKVAL=AUX2 CIO(IOCB,3,ADDR,COUNT)ENDPRO}OC GCHAR(BYTE IOCB INT ADDR,LEN)BEGIN IF LEN>0 THEN CIO(IOCB,7,ADDR,LEN) ENDIFENDPROC PCHAR(BYTE IOCB INT ADDR,LEN)BO}EGIN CIO(IOCB,$0B,ADDR,LEN)ENDFUNC GREC(BYTE IOCB INT ADDR,LEN)BEGIN CIO(IOCB,5,ADDR,LEN) TERMPT=IOCB*16+ICBLLEND DOKO}VALENDFILEB,$0B,ADDR,LEN)ENDFUNC GREC(BYTE IOCB INT ADDR,LEN)BEGIN CIO(IOCB,5,ADDR,LEN) TERMPT=IOCB*16+ICBLLEND DOKL -.)BLOASCREEDBSBTWERDATNRNSCRREA6Ap@B@'} @4 @6-A6#A !-%@3"'}! ==104,162,48,169,7,157,66,3,104,157,69,3,104,157,68,3,104>>157,73,3,104,157,72,3,32,86,228,132,212,169,0,133,213,9'}61 +A1A @%%6-F:@,%F:@,$AV;@,;@,6-@'}6. D:INFO1.DAT!@6-@ 6.=:, 67@<@,.4 @@9'}$6-F:AY,$AY>6-?:<<A `,CAYH@0F:B2y,"@&6-%@0 '}A E F:B2y,@A"%D:MENUE D:INFO.NEU@0F:B2y,"@&6-%@0 $I000% D:AN4000.BAS6-A6#A $-%@3"! $$==104,162,48,169,7,157,66,3,104,157,6}9,3,104,157,68,3,104>>157,73,3,104,157,72,3,32,86,228,132,212,169,0,133,213,96 +'A @'A}%%6-F:@,%F:@,$AV;@,;@,6-@$6-F:AY,$AY}6. D:TEXT1.DAT!@6-@ 6.=:, 67@<@,.4 @@>6-}?:<<A `,CAYH@0F:B2y,"@&6-%@0 A 0 F:B2y,@A"}% D:AN4000.SRT D:AN4000.NEU0F:B2y,"@&6-%@0 A 0 F:B2y,@A"'3#(/.-%2+%. -)4$%-'%(43).$!3!"3/,54%-).) !$6%+}.452% !#(45.' 6/26%2,!33%.$%3!.$2/)$%. -%.5%3-)4% +}8)4-533$)%3%2!."/2$'%"2!#(47%2$%. 3/.34'%(4%26%2,/2%.5.$$5$!2&34$)2%).%..%5%."%34%,,%.+}./#(-%(23%,%#4,!.'43#(/.3+}4!24./#(-%(23%,%#4,!.'43#(/.3(U6/.$57),,34./#(-%(27)33%.!,3/}/ %).0!!2().7%)3%&).$%34$5./#()-02/'2!--5.$$%.2%34$52#(02/")%2%./}5.$-)#(&).$%34$5).$%2+2!."%2'342/})./,$%."52'/$%25.4%2/} %64,&,5%#(%3).$'%.!,!3+!:53%.$%. /} 6)%,30!33"%)-+/(,%3#(%&&%,.mano2%).%2/}(%#(4 $!3'!.:%./#(-!,3%,%#4/}.%",/33.)#(34!24,U6/.5%"%2$)%# 4!34%%22%)#(4-!.$!33}-%.5%$/24%2&!%(24-!.!,,%35%"%2$)%7%)4%2%4!34!452 "%,%'5.'3}-)43%,%#4+!..$%2!.5.$!53'%34%,,47%2$%.7!3$!3)347)234$5$!..3}3#(/.-%2+%. -)4$%-'%(43).$!3!"3/,54%-).) !$6%3}.452% !#(45.' 6/26%2,!33%.$%3!.$2/)$%. -%.5%3-)4% 3}8)4-533$)%3%2!."/2$'%"2!#(47%2$%. 3/.34'%(4%26%2,/2%.5.$$5$!2&34$)2%).%..%5%."%34%,,%.3}./#(-%(23%,%#4,!.'43#(/.33}4!24./#(-%(23%,%#4,!.'43#(/.30U)