`8 pT 9g?</<yBy"@a$Q><yBy@aQNu<<NqNqQNu These bytes are VIRUS FREE ! All Circuits Operational.... ------------------------------ Distributed under Licence ***** 1990 BUDGIE UK *****  l`  @`! #@+-//3@5`79;=?AC@E`GIKMOQS@U`[]_a ckq s@wy{} @` @ ` @ `  @ ` @ ` ǀ / O ` ٠ /@O`!Aa   Aa!!#A%')+-/13o79;=?/CAEaGIKMOQ!SAUaWY[]_/cAeagikoq!sAowy{!Aa!Aa!a!Aa!Aoǁɡ!Aa!Aa!Aa " B b  "!B!b!!!!"!""#%b"'")"+"-"/#1"#3B#5b#7#9#;#=#?$A"$CEb$G$I$K$$O%Q"%SB%Ub%W%Y%[%]%&/&cB&eb&g&i&k&m&o'q"'s'y'{'}'("(B((((()")B)b)/)))B*b*****"+B+b+++++,",B,b,ǂ,ɢ,,,-"-B-b--٢---.".B..../"/B/b/////`  @`! #@+-//3@5`79;=?AC@E`GIKMOQS@U`[]_a ckq s@wy{} @` @ ` @ `  @ ` @ ` ǀ / O ` ٠ /@O`!Aa   Aa!!#A%')+-/13o79;=?/CAEaGIKMOQ!SAUaWY[]_/cAeagikoq!sAowy{!Aa!Aa!a!Aa!Aoǁɡ!Aa!Aa!Aa " B b  "!B!b!!!!"!""#%b"'")"+"-"/#1"#3B#5b#7#9#;#=#?$A"$CEb$G$I$K$$O%Q"%SB%Ub%W%Y%[%]%&/&cB&eb&g&i&k&m&o'q"'s'y'{'}'("(B((((()")B)b)/)))B*b*****"+B+b+++++,",B,b,ǂ,ɢ,,,-"-B-b--٢---.".B..../"/B/b/////ACC_SEL Rt AUTO ct %BOOTER ht (CHAINER t iDELTA t nFONTS t FORMAT  t GUARDIAN t HAPPY_2 -t 4INCLUDES 9t @MUSIC dt RASTERS t SCROLL ME t tBYTE PI1t "(BYTES PRG(t DESKTOP INFt HAPPY2 ACXt *HOSTILE PI1t B}LINEUP4 ACXt {8MOVING_1DOCt STARTGEMINFt . S t.. S tACC_SEL DOCTt HAPPY2 ACCVt *LINEUP4 ACCZt {8ACC_SEL PRG]t (ACC_SEL.PRG ---------------- Another fine utility written by Robin Edwards Please note this program should reside in an AUTO folder. Accessories in the ROOT directory are either on or off. Their status is indicated by their extension. To change their status, the program needs to write to disk. The write- protect should then be OFF Robin Edwards is the author of HAPPY FACE, a virus detector SPACE BLOB, a fifteen-level platform game. CRYSTAL CAVERNS, a fantastic cave odyssey with 120 locations. HAPPY PUZZLER, enjoyable jig saw. copyright Robin Edwards and Budgie UK. BUDGIE UK licenceware February 199O -------------------------------- `^.|taaBa|49 ff` y fa` y(fa`34l3n3p3r3t3# 0<"<TNB34l3n3p3r3t3# 0<"<TNB09 |g |gbNp34l3n3p3r3t3#] 0<"<TNB09 |gNpNA(<`gN34l3n3p3r3t3#X 0<"<TNBNA(:<3fZ(A<ZfN34l3n3p3r3t3# 0<"<TNBN34l3n3p3r3t3# 0<"<TNBNNA|`|8:C0<QNN|fN34l3n3p3r3t3# 0<"<TNBNu3 l3n3p3r3t"<T0<NB3 3Ml3n3p#r0<"<TNB3 PaNN^NuNVHy'bp?N\ON^NuNVN3XHy(?9XN`\ON"HyY,HyY*HyY(HyY&p?BgNjp235|p235~p}35pk35HyXpHyXnHyXlHyXj?95?95?95~?95|p?BgN29XnH09Y*HA3Xj29XpH09Y,HA3XlHy5Hy5Hy5~Hy5|?9Xp?9Xn?9Xl?9Xjp?p?N#9*&p?NNTO=@0. @b H0@$V PN`p`p`p3&By8N^NuNVp=@HnHnHnHnHnHnBgBgHnBgBgBgBgBgBgBgBgBgBgp?p?p??.N< @g @f0.@ @bH0@$b PN` y&g BgBgBgBgp ??9&N `ZHy6Hy6Hy6Hy6Nj3XHy8HyXHy&N ?9Xp?9Xn?9Xl?9Xjp?N 3&BgBgHy(p??9&N BgBgHy(&p??9&N ?9Xp?9Xn?9Xl?9Xjp?p?p?p?N?9Xp?9Xn?9Xl?9Xj?9&N NHy5|N XO`< y&g0?9XNTOp3&`0.y&f?9&NTO?9Xp?9Xn?9Xl?9Xjp?p?p?p?N ?9&NNTO`0.y&fN"29Y*yY&YA0.nAo09Y*yY&Y@n=@29Y,yY(YA0.nAo09Y,yY(Y@n=@?.?.?.?.p??9&N Hy5Hy5Hy5~Hy5|p??9&NjHyXpHyXnHyXlHyXjp??9&NjN"`0.y&fHy6?<N\Op?N0. m nn n n0./0. Hї AXHn fpN^NuNV0. y5|@ =@2. 095y5~Q@A=@?.?.?.NT\ON^NuNV=n BnBnN"Hy320.fHy'0.H/0.H/N#0.f 0.n g?<p?Bgp?NN\OH@?p?NN\OHRn0.n0.n mv?<p?p?NN\OH?<Bgp?NN\OH?<pK?p?NN\OH?<p?Bgp?NN\OH@?p?NN\OH0. Hn=@0.HD@=@p%?NNTOHy32N#XOHy320.gHy&`?<p?Bgp?NN\OH@?p?NN\OHN"N^NuNVp*38Bn nlJ0.HAXrBPBn nl&0./0.Hї AXp.Rn`Rn`p3&N^NuNV3X0.@ H$-@p=@ nl$0.HCX nRB@2Rn`/94TNXXO09XN^NuNV#X4<#84@#X4D#X4H#Y4L#Y 4P#4<4Tp ?N&TO3XY09YN^NuNVp?N&TOpN^NuNV3X3 X3 X3X3X3X3X3X3X3X3X3X3 X3"X#$Y3(X3*Xp?N&TO n,0X n00X n40X n80X n<0X n@0X09XN^NuNV3X# Yp4?N&TON^NuNV3X3 X3 X3X3X3X3X3XpI?N&TON^NuNVpM?N&TO n0X n 0X n0X n0X09XN^NuNVpO?N&TO n0X n 0X n0X n0XN^NuNV3X# YpN?N&TON^NuNV3X3 X3 X3X3X3X3X3XpJ?N&TON^NuNV3X# Yp#?N&TON^NuNV3X3 X3 X3X3X3Xpl?N&TO n0X n0X n0X n 0X09XN^NuNV3Xpf?N&TON^NuNV3X3 X3 X3X3Xpd?N&TON^NuNV3Xpg?N&TON^NuNV3X3 Xph?N&TO n 0X n0X n0X n0X09XN^NuNV3X3 X3 X3X3Xpe?N&TON^NuNV3X3 X3 X3X3X3Xpi?N&TON^NuNV3Xpk?N&TON^Nu"/0<NBNuNV# 4`p 3Yp3YByYp3Y3YN#64`N^NuNVpe3YByYByY3YNN^Nu#Y4X"<4X <sNBNuNV#4\#4d .Z#4hpd3YByYp 3Y n 3YN n 0Y#4|4\#54d#74h#64`N^NuNV# 4`p3Y3 YByY3YN#64`N^NuNV3 4|/.N:.NDXO# 4`pm3Yp3Yp3Y3YN#64`N^NuNV# 4`3 4|3Yp3Yp3Y3YN#64`N^NuNV3 4|p3YByYp3Y3YN095N^NuNV3 4|p3YByYp3Y3YN095N^NuNV3 4|ph3YByYp3Y3YN095N^NuNV3 4|p 3YByYp3Y3YN095N^Nu#YNu#Y NuNVp0.#(N^NuNV/<f /9(N#PO6b#( 9(N^NuNVHn?</.N!l Hn HnNPOHnBg nN\ON^NuNVH0-n n(PXH> @%g0gP/.? n hN\O`p =@p=@p=@H> G-fp=@H>`Bn G0f p0=@H> G*f& nT=Plp=@0.D@=@H>`*Bn G0m G9n0. G@0=@H>` G.fJH> G*f nT=PH>`*Bn G0m G9n0. G@0=@H>` Glf&H> Gdg Gog Gug Gxf0@> `-@*@p=@0 |&"2<`XHXW PN`4 nT=P0.l0.D@=@p-p ??./ N XPO*@`p ? nT?`p`p` n-PX .l .D-@p-p ?/./ N `p ? n// N *@X`p`p`/ ?./.?N!4 *@P`fBn n-Pf-|(X .-@*@g0.m noS`(Bn nT0` n//.NPO`n ./0.Hї =@lBn0.fL0.g0 n0f( n -f/. nRH? n hN\O0.Sn0g /.?.` nd /. nRH? n hN\O`0.g0.Sn0g/.?. n hN\O`L0N^NuNVH >. *NB%0<g"0H@H@B@H@ @&|>`?Bg _&|g nR` .L N^NuNVH0*n>.IB$p0//. N#ZPO-@g$p0//. N#POA&|-n ` n &|g` L0N^NuNVpL?Hy(p?N"\POp?N"&TON^NuNVN!4N^NuNV/ *n .*+@+|"B-0. D@;@ m l;| +|!`+|! *_N^NuNV/ *n Sm lBm p` UR0.*_N^NuNV/ *n UR0.*_N^NuNV/ *nRm oBm p` URB@*_N^NuNVN"@?.N"HTON^NuNVN^NuNV?.pL?NAXON^NuNV/A#)(/9)(N$8XO0gB)(p 3),p`,/. 0.H/?.p@?NA .B)(/N"XO.N^NuNV .l .D3),p` .N^Nuʠ fEH4lNu Nu Nu/$o ,_NuJ4lg /L ,_Nu"o`C"/jD$jDA`|J/jDJk`JjDNu$/` o$"/A`NNu"o`C$jD"/jDA`, gJ/jDNu$/` o$"/A` NupJfpN∲cd⒒d҂dFN o"`"/ jD$/jDD$@A`" jDNu o"`"/ _$0"@0HAHBЁH@B@ЉN O$X"XHB@Nu o0/L.Nu NND(X DOUXcfd\e f g orxs(uxD0123456789ABCDEF0!?J?UVSS?UW?J!<0 ?@?@?@?@ <[0][ *** LINEUP-4 *** | By Charlie Dancey | (0373) 827093 CIX: cdancey | 'C' source code available | On offer to ST AMIGA FORMAT ][ OK ] Lineup-4Lineup-4Click to start[0][ Unknown Message ][ OK ]Click to reset I go first! You go first!** You Win! **** Draw! ** My move..** You lose! **** Draw!! ** Your move..%r{NULL} You must compile with the -f option to include printf() floating point!  0V$6 0v seed_(intin_|4c_<4Work_|5intout_5wind_calc_vmul$_fputeos_!ctrl_cn_$rand_bmain_errno_,)wind_close_graf_mouse___USTACK__.)_dtefg_4!_stropen_l!_xprintf_lineaa_"maxtotal_ write_\"form_alert_graf_handle_jcheck_win_drop_sprite_Tdummy_6lineac_#v_pline_nlinead_#_fputexs_!ptsin_6credits_$clear_board_get_scores_. crys_if_&ptsout_7v_clsvwk_snapshot_vs_clip_ global_8xy_8init_>goes_first_8play_longjmp_F$goes_left_8graf_mkstate_work_in_&menu_register_`linea0_"exit_&"work_out_8buffer_*9v_opnvwk_null_(bmfdb_&vsf_perimeter_lldiv$#llremt#Whole_jXnext_rXappl_init_control_Xint_in_Xwait_mouse_up_lrdiv*#int_out_Xcrystal_Xlinea9_"lim_lrremz#gsx1_vdi_wind_open_digits_|&gsx2_aes_handle_Xwind_delete_Nbest_move_H wind_create_redraw_ vldiv`#appl_exit_sprintf_cwl_llmul#vlrem#msg_(_dtoa_^!ad_c_T4evnt_multi_graf_growbox_fns_board_Xv_bar_dvrdivZ#ctrl_cnts_$smfdb_&vrrem#lrmul#iioff_\4vsf_color_R_start_vdi_handle_Xscores_Xi_ptr2_Dgl_apid_Yvlmul$_seterrno_"addr_in_Ywind_get_jaddr_out_ Ycontrl_Ysetjmp_8$iooff_d4Full_&Ypioff_`4wind_update_<draw_board_ vro_cpyfm_printi_X Temp_.Yset_blit_"vswr_mode_vrmul$graf_shrinkbox_ srand_Nmywind_&alert_ __ESTACK__.1_exit_H"printl_ vdiv#pooff_h4game_state_&vsf_interior_cw_play_piece_wait_for_event_wind_set__fgetstr_"i_ptr_:la_init_l4_etv_term_jbp_()_finish_@"      X,            $                          *       (*     && $0:,  $""N><>n".0(:l$.*                       &FP( LD" $ | 2 & Hd`(*,O .#0O0NfNVbA8 /NtA^ /NtA /NtA /NtA /Nt?<NA=@n0.nrAAArrHA /Ar /N!?<Ar /?<NNA=@p?</NArЁ-@b/.bA@pA /N"Z0.lrA=@l?<ONA=@p0.p @o,/.bA@0.lA /N"Z0.lRnl0.p @o`pp=@p0.p2.lAlB`0.pRnp`A@0.pA /?.pA /Nt `A /NtA( /NtAN /NtN=@h0.h @yfpY=@h0.h @nfpN=@hp=@p0.p2.lAl`0.pRnp`A@0.pA /N#=@j0.jSnjA@0.pA /A0.pA /N"Z0.h @YfpCA2.p4.jH҂0.h @NfpXA2.p4.jH҂A0.pA /A@0.pA /?<?<VNA =@f`N^Nu************************************ * Accessory Selector by R.Edwards * * Version 0.2 Public Domain * ************************************ Desk accs present on disk::\*.AC? %d %s Y if you want all desk accs enabled N if you want no desk accs enabled SPACE to leave them as they are. >>NVA //.A0 /N 9R /A0 /NN^NuN^NuNV n @`R . @@`. %g@.".R A. f .rHN^NuR . @@`R . @@p=@`R . @@`. -f0.rA=@`Z. +f0.rA=@`>. f0.rA=@`". #f0.rA=@```v. *f& .T @0=@R . @@`B. 0f0.rA=@?< A //. N#P =@ n @p=@. .fjR . @@. *f& .T @0=@R . @@`*?< A //. N#P =@ n @. lf0.r A=@R . @@.HH`?.?.A /0.r@A??< /.N-@`?.?.A /?.?</.N-@`?.?.A /?.?< /.N-@`0.2<A=@?.?.A /?.?</.N-@`d?.?.A /?.?<f/.N &-@`60.2<A=@?.?.A /?.?<E/.N &-@`0.2<A=@?.?.A /?.?<G/.N &-@` .T @0".R A`0. @l 0<=@ .-@ .X @ -@ .-@p=@ n0.H0 g$0.2.Al`Rn0.``0.2.A=@0.rA @f$0.Sn @op ".R A`0.SnJ@g .R @".R A`0.Sn @op ".R A``.".R A`` %g sg cg Ggv gg^ Eg& eg fg Xg xg ugN og dg`d`N^NuNV n  @ -@ n rЁ pAAAA0. @l p=@`0. @ op =@ . fJA /A /N"Z0. @oA /A /N"Z` .rHrHJg"A /A /N"Z`Z0.rAJ@g"A /A /N"Z`,0.rAJ@gA /A /N"Z .rHrHr@H=@ ."<-@0. @Eg0. @ l0. @np=@0. @o .r //N'-@ .r //N&-@ .Jg2 ."< f .rH-@0.Sn` .".Ё-@0.Rn`r0. @lx .r //N&-@p-@ ."<Jg. .".t‚-@ .rH-@0.Rn` .".Ё-@0.Sn`0.2<AJ@gpe`pEArH0. @lp-ArH0.D@=@`p+ArH0.r Hr0AArH0.r HH@r0AArHpArH0. @or0. @o .2.tBH-@` .r4.BH-@A //.N .2.H"<-@p=@`0.rAJ@gp+".R A`0.rAJ@gp ".R A .-@ .Jg .2. //N'=@0. @ l0.r0A`$0.r A2.4<BJAgra`rAA".R A .2. //N&-@`n .A"=@ .A"=@0.2.ܐA=@0.rAJ@g0.2.ܐA=@0. @lp=@0.rAJ@g0. @f 0.2.Am0.rA=@`X0. @fLp0".R A0.2<AJ@gpx`pX".R A0.rA=@0.rA=@0.2.4.Bo 2.`2.A=@0. @lp=@0.rA @f(0.SnJ@gp ".R A`p=@?.A //.N" .2.HЁ-@0.Sn2.ذAop0".R A`0.SnJ@gS . @".R A`0.SnJ@gp ".R A` .N^NuN^NuNV . fA /N*pN^Nu .-@ np 0 nr"0Ё nr"0Ё2<HЁ-@/./.?<?<JNA Jg?f .rHЁ-@`.091 @2l .A1 291 Ry1 !`pA1 291 !N .Jg:A //. 9R/N f/.N .Jg n >g>A //. 9R /N f/.N`@A /R ./ 9R /N f/.N 91/A1 /091 ?N =@ .Jg 9R/N\ .Jg 9R /N\?.NN^Nunull tpa ycrwaNVp=@0. @lZ`0.Rn`pA12.ApA12.A1@A12.A1@`A1pA #Rp"9R A@A1pA #R p"9R A@A1pA #Rp"9R A@p"9R Ap"9R A"9R AN^NuNVA /N*/.N*A /N*?<NN^Nucan't redirect NV?.?<LNAN^NuNV nJg .R @H??<NA`N^NuNV . gR nrHA @f/.N! n( o n(H??<>NAp nN^NuNVA //. N! @fp=@p=@`RA //. N! @fp=@p=@`"A //. N! @fp=@p=@` n wf"?</. ?<  zn..<.<<L$tx\, fz r "  L     @""^pprz". c t%.. c tSTARTGEMPRGdt &AUTO DOCft '`A aBgHz?<=NAPJ@jHz&?< NA\?<NAT`K:Hz/<@??<?NA JkrAB(??<>NAXB?< NA\Ot#,*|:<JgXQHy?< NA\`(E**E$/?< NA\OABg/?<1NABgNAp,gNAp PB y,CZ"C:#, h h$h C>"A "gNu#FNu o Pf# , zCfHy?<NA\?<'Hz?<NNAPJ@fjKB@|ߐ<A??<NAXRI:<?JgQ:<? $\gQRBHy?<;NA\ o PPgTgf zlN4XOF8NA  g "gHz` 3.3NuSTARTGEM.INFOops! No vertical blank interrupt vectors left! Error! - Can't work with this TOS-version. Error! - Can't find STARTGEM.INF in root directory of boot disk. Press any key to exit. EOPA(b\In this AUTO folder, you will find: STARTGEM.PRG a well known PD utility which enables ANY program to auto-boot It needs an ascii file 'STARTGEM.INF' on the root directory, specifying the file to auto-boot. If 'STARTGEM.INF' is missing, or file specified cannot be found, the program will merely abort. If you want to try Robin Edwards' Accessory Selector, you should put it in this folder, with the accessories on the ROOT directory. Budgie UK Feb 1990 . i t(.. i tBOOT_PICS jt )+EXECUTE S mt . BOOT_PICPRGpt 1BEXECUTE PRGtt B>BOOTS DOCyt RBOOTDEM1PRG|t W`BOOTDEM2PRGt XBOOTDEM3PRGt YBOOTER PRGt Z'JIM DOCt dJIMBOOT3HRDt eJIMBOOT3I t fJIMBOOT3RSCt g** December 30, 1989 * devpac 2 REQUIRED to assemble this program * code will be slotted on boot sector AND made executable *-------------------------------------------------------** bra.s start include "a:\includes\macros.s even start startup jsr superin go supervisor jsr phys_base get physbase move.l d0,physbase used by exit routine dc.w $a000 move.l a0,a_line_start move.l (a1)+,d0 6*6 font move.l (a1)+,fontaddress_8 move.l (a1),fontaddress_16 hide_mouse btst #7,$fffa01 mfp monochrome detect beq hide mode 0 hide cursor 0 bclr #0,$484 no keyclick bclr #1,$484 no repeat key move.l #dtaddress,-(sp) address of 44-byte DTA buffer move.w #$1a,-(sp) set DTA address trap #1 addq.l #6,sp load a1_font,a1_ptr font 16 pixels load a2_font,a2_ptr font 8 pixels cls font 16 ink 15 move.w #$070,$ff825c move.w #$070,$ff825e printat 15,0,0,#mess1 getkey cls font 8 move.w #$372,$ff825c move.w #$047,$ff825e ink 15 printat 15,0,0,#mess2 getkey cls font 8 move.w #$070,$ff825c move.w #$007,$ff825e ink 15 printat 15,0,0,#mess5 getkey swap d0 cmp.b #$01,d0 beq quit jsr read_sector read boot sector lea new_buffer,a1 bsr copy_code jsr boot_sector prepare executionable sector jsr write_sector and write it to disk bra quit mess1 dc.b " THE BUDGIE UK",10,10,13 dc.b " BOOT LOADER",10,13,0 mess2 dc.b " This program contains the ",10,13 dc.b " necessary code to display a",10,13 dc.b " message, then load a pi1 picture",10,13 dc.b " from root directory, if found.",10,10,13,0 mess3 dc.b 0 mess4 mess5 dc.b "Insert Disk",10,13 dc.b "to be 'automated'",10,13 dc.b "Use with care: boot sector",10,13 dc.b "will be written to!",10,10,13 dc.b "In doubt, insert blank",10,13 dc.b "formatted disk.",10,10,13 dc.b "Press ESC to abort.",10,13,0 even *~~~~~~~~~~~~~~~~NOW THE SUBROUTINES~~~~~~~~~~~~~~~~~~~~~~~* copy_code lea read_buffer,a0 this buffer is 512 bytes long add.l #$3a,a0 put code here lea new_buffer,a1 move.w #420,d7 loop .lll move.b (a1)+,(a0)+ transfer to official buffer dbra d7,.lll rts ************************************************************** new_buffer CLR.W -(A7) 0=low res MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 move.w #$632,$ff8240 pea text(pc) move.w #9,-(sp) trap #1 addq.l #6,sp * load a degas picture at a specific address MOVE.W #0,-(A7) pea name(pc) MOVE.W #$3D,-(A7) TRAP #1 add.l #8,sp tst.l d0 bmi eit MOVE.W D0,d7 handle move.l $44e,d0 load direct to current screen sub.l #34,d0 MOVE.L d0,-(sp) MOVE.L #34,-(A7) read it MOVE.W d7,-(A7) handle MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP move.l $44e,d0 load direct to current screen MOVE.L d0,-(sp) MOVE.L #32000,-(A7) read it MOVE.W d7,-(A7) handle MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 MOVE.W d7,-(SP) close MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP eit rts dc.b 250 name dc.b "a:*.pi1",0 even text dc.b 27,69 clear screen (mouse disappears) dc.b 27,98,2 ink color 1 dc.b 10,10,10,10,10,10,10,10,10,10,10,10,10 line feeds dc.b " Budgie Boot Sector",10,10,13 dc.b " A U T O L O A D E R",10,13,0 *~~~~~~~~~~~~~~~~~~~~~~~INCLUDES~~~~~~~~~~~~~~~~~~~~~~~~~~~* EVEN INCLUDE "a:\includes\include1.s" EVEN INCLUDE "a:\includes\include2.s" EVEN INCLUDE "a:\includes\include3.s" EVEN INCLUDE "a:\includes\include4.s" even INCLUDE "a:\includes\sounds.s" EVEN *~~~~~~~~~~~~~~~~~VARIABLES AND CONSTANTS~~~~~~~~~~~~~~~~~* a1_font DC.B "a:\fonts\a1_play*.fon",0 a2_font DC.B "a:\fonts\a2_squ*.fon",0 even a1_ptr DC.L 1 16*8 font a2_ptr DC.L 1 8*8 font screen_0 dc.l 0 screen_1 dc.l 0 screen_2 dc.l 0 screen_3 dc.l 0 lady_screen DC.L 0 utility_screen DC.L 0 current_screen dc.l 0 dtaddress ds.w 52 needed for disk routines palet DS.W 16 start up palette sbuff DS.L 1 this address is the last one on the prog high_scores dc.l 0 storel dc.l 0 store dc.w 0 prompt dc.w 0 EVEN *~~~~~~~~~~~~~~~~~~~THE STACK~~~~~~~~~~~~~~~~~~~~~~~~~~* DS.L 256 about 64 used on average stack DC.L 0 *~~~~~~~THE END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ** December 30, 1989 * makes boot sector executable *------------------------------------------** bra.s start include "a:\includes\macros.s even start startup jsr superin go supervisor jsr phys_base get physbase move.l d0,physbase used by exit routine *------------------------------------------------------- dc.w $a000 move.l a0,a_line_start move.l (a1)+,d0 6*6 font move.l (a1)+,fontaddress_8 move.l (a1),fontaddress_16 hide_mouse btst #7,$fffa01 mfp monochrome detect beq hide mode 0 hide cursor 0 bclr #0,$484 no keyclick bclr #1,$484 no repeat key move.l #dtaddress,-(sp) address of 44-byte DTA buffer move.w #$1a,-(sp) set DTA address trap #1 addq.l #6,sp start_prog load a1_font,a1_ptr font 16 pixels load a2_font,a2_ptr font 8 pixels cls font 16 ink 15 move.w #$070,$ff825c move.w #$070,$ff825e printat 15,0,0,#mess1 getkey jsr read_sector read boot sector jsr boot_sector prepare executionable sector jsr write_sector and write it to disk bra quit restore the palette and official quit *-----------------------------------------------------------* mess1 dc.b " THE BUDGIE UK",10,10,13 dc.b " BOOT EXECUTIONER",10,10,10,10,10,13 dc.b " Insert Disk",10,13 dc.b "to be made executable",10,13,0 even *~~~~~~~~~~~~~~~~~~~~~~~INCLUDES~~~~~~~~~~~~~~~~~~~~~~~~~~~* EVEN INCLUDE "a:\includes\include1.s" EVEN INCLUDE "a:\includes\include2.s" EVEN INCLUDE "a:\includes\include3.s" EVEN INCLUDE "a:\includes\include4.s" even INCLUDE "a:\includes\sounds.s" EVEN *~~~~~~~~~~~~~~~~~VARIABLES AND CONSTANTS~~~~~~~~~~~~~~~~~* ;k_repeat dc.w 0 normally 2 ;k_delay dc.w 0 normally 15 a1_font DC.B "a:\fonts\a1_fat.fon",0 a2_font DC.B "a:\fonts\a2_elegant.fon",0 even a1_ptr DC.L 1 16*8 font a2_ptr DC.L 1 8*8 font ;physbase dc.l 0 screen_0 dc.l 0 screen_1 dc.l 0 screen_2 dc.l 0 screen_3 dc.l 0 lady_screen DC.L 0 utility_screen DC.L 0 current_screen dc.l 0 dtaddress ds.w 52 needed for disk routines palet DS.W 16 start up palette sbuff DS.L 1 this address is the last one on the prog high_scores dc.l 0 storel dc.l 0 store dc.w 0 prompt dc.w 0 EVEN *~~~~~~~~~~~~~~~~~~~THE STACK~~~~~~~~~~~~~~~~~~~~~~~~~~* DS.L 256 about 64 used on average stack DC.L 0 *~~~~~~~THE END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `A>`HbY b*O.|A:*m - ЭЭ// Bg# 8?<JNAO N TN# #6 #6#6 hBP 9g< <gJg`N`N4 9ffg?<?<NNX/<<QNuBg/9N/9N?<NNO 32@Hz?< NA\?<Hz?<=NAJkx> 9N"//<"??<?NA yN /?<NN\ 9N//<}??<?NA ??<>NAX yN /?<NN\Nua:*.pi1Eb Budgie Boot Sector A U T O L O A D E R (HaJ@kba#9fa LaJ@kaa8NuHy?< NA\` E R R O R 3"@Nu |N Hy?< NA\`getsize/press key 3@H`?<NAT@LNu |N Hy$?< NA\` open E 3p@NuHyH?< NA\`read error |N 3@H`?<NAT@LNuHy?< NA\`close error |N 3w@H`?<NAT@LNu |N Hy?< NA\`gemdos error H`?<NAT@LNuBg/?<NNAPNu?</NAT @&( <Nu/?<HNA\JggR&@,NuHyb?< NA\`malloc error H`?<NAT@LNu?</?<=NAP43Nu/ /?9?<?NA Jk~Nu?9?<>NAXJ@kNufile not found ahJ@ka?a0J@k0NuHy ?< NA\`ERROR. creating file.. NuHy F?< NA\`write error Nu?</?<NAXNu/?<INA\JkNu/?<INA\JkNuH?<%NNTLNu | 0<Q | /?< NA\ | 0NuH/?< NA\LNuY ?<?<NNXNuHBg?<NNLNu"h$hBi3| Nu Nu?<NAT@Nu?<?<NAXNuB9JgNuH/<?< NA\B?< NA\# |L??NuH/9 |?< NA\L??Nu?<NNTNua aaD# ^ | ap9gad3D3Fa?<?<?<#NN\?<?<LNABg/9 8?91NAwwU33ss77wH< J@j<-D@2<H H@0H@QLNugg"< A,>< QH@@0 @9o^@B@H@fNu/0<J@WJEW NuHp?<NNTLNu?<?<?<NM\?<"NNT @CZ"C NuHCLhLNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu?<?<?<NM\?<"NNT @C"C NuHCB@(HiJijBi i.k3|.B@(HiJijBi ik3|LNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu<K"yN$yN20$QƕQ$yN0"QQNuHA@0P= Ppk0"<QQLNuHA@/0"<Q0w"<QQ LNuH/?<NN\LNuL@H= L H@A aa y< N N Nugive it a name (***.pic) ><GFy@H<<*9ffgQL`Fy@H<<*9ffgQL`QB=6=9/H~ 9=6"< a> < g g | ` | ` | L~<  <  H/ |N _N H`?<NAT@L _H@<afLNu??<NNXNu??<NNXNu/.G8. DL 2H@AF@4$$QQ A"K>.G<. Frtvxz2468:QYQYQYQYQ"T$T&T(T*TQ2<0XXX @YYYY""QNu y6` y6(y60(R9@2,9Ar2,SA9Ar2,4SA9A9hP9h$9h&g )I`)hL)hHNu?//?<NN Nu/?<HNA\NuHp0r JBgSBfAQLNu y "y8 098aNuH>#8?<L|H|L|H|4LHhA(SWfTLHLH,LHXL|Nu y"y8 098aNuH>?<qL|H|L|H|4L|H|hL|H|ASWfTLHLH,LHXLHL|Nu $<*,* ""4" & "b8Rh0\*Lb>`~ v  X ) v  X )R " V    o 4  d VV 2     2    P  d <(@8   @x   VV   2              ȁ  F de      2 P   d 0   2 0  ( dP F ( dP F (      ,       @e[QG=3) ? a:\fonts\a1_play*.fona:\fonts\a2_squ*.fon"6 2,  @ @ $ J 2&(B$$$~F L,4 ,0F* RJ^        zb* X""   | *   ,  6        ",<48,>>JH>|  X`=L`HbY b*O.|=H*m - ЭЭ// Bg#F?<JNAO NbN##2 #2#2̠ hBP 9g< <gJg`N(`NB 9ffg?<?<NNX/<8?<NA\ |8`,|8N\ |8t,|8N\H yN0<r QL<<#2 #2#2̼|g"y8N2P`"y8N2FNqAN |N3p\3p^<  <  |/ |N _NH`?<NAT@LN-`N/N/` THE BUDGIE UK BOOT EXECUTIONER Insert Disk to be made executable (HaJ@kba#&9fa LaJ@kaa8NuHy?< NA\` E R R O R 3"@Nu |NHy?< NA\`getsize/press key 3@H`?<NAT@LNu |NHy2?< NA\` open E 3p@NuHyV?< NA\`read error |N3@H`?<NAT@LNuHy?< NA\`close error |N3w@H`?<NAT@LNu |NHy?< NA\`gemdos error H`?<NAT@LNuBg/?<NNAPNu?</NAT @&( <Nu/?<HNA\JggR&@,NuHyp?< NA\`malloc error H`?<NAT@LNu?</?<=NAP43Nu/ /?9?<?NA Jk~Nu?9?<>NAXJ@kNufile not found ahJ@ka?a0J@k0NuHy(?< NA\`ERROR. creating file.. NuHyT?< NA\`write error Nu?</?<NAXNu/?<INA\JkNu/?<INA\JkNuH?<%NNTLNu |0<Q |/?< NA\ |0NuH/?< NA\LNuY ?<?<NNXNuHBg?<NNLNu"h$hBi3| Nu Nu?<NAT@Nu?<?<NAXNuB9JgNuH/<?< NA\B?< NA\#L??NuH/9?< NA\L??Nu?<NNTNua aaD#^ |&ap9gad3D3Fa?<?<?<#NN\?<?<LNABg/9F?91NAwwU33ss77wH< J@j<-D@2<H H@0H@QLNugg"< A,>< QH@@0 @9o^@B@H@fNu/0<J@WJEW NuHp?<NNTLNu?<?<?<NM\?<"NNT @CZ"C NuHCLhLNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu?<?<?<NM\?<"NNT @C"C NuHCB@(HiJijBi i.k3|.B@(HiJijBi ik3|LNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu<K"yN$yN20$QƕQ$yN0"QQNuHA@0P= Ppk0"<QQLNuHA@/0"<Q0w"<QQ LNuH/?<NN\LNuL@H9L H@A aa y8 NNNugive it a name (***.pic) ><GFy@H<<*9ffgQL`Fy@H<<*9ffgQL`QB9D9G/H~ 99D"< a> < g g |` |` |L~<  <  H/ |N _NH`?<NAT@L _H@<afLNu??<NNXNu??<NNXNu/.G8. DL 2H@AF@4$$QQ A"K>.G<. Frtvxz2468:QYQYQYQYQ"T$T&T(T*TQ2<0XXX @YYYY""QNu y2` y2(y2ę0(R9@2,9Ar2,SA9Ar2,4SA9A9hP9h$9h&g )I`)hL)hHNu?//?<NN Nu/?<HNA\NuHp0r JBgSBfAQLNu y "y4094aNuH>#4?<L|H|L|H|4LHhA(SWfTLHLH,LHXL|Nu y"y4094aNuH>?<qL|H|L|H|4L|H|hL|H|ASWfTLHLH,LHXLHL|Nu $<*,* ""4" & "b8Rh0\*Lb>`~ v  X ) v  X )R " V    o 4  d VV 2     2    P  d <(@8   @x   VV   2              ȁ  F de      2 P   d 0   2 0  ( dP F ( dP F (      ,       @e[QG=3) ? a:\fonts\a1_fat.fona:\fonts\a2_elegant.fon"6 2,  n&(B$$$~F L,4 ,0F* RJ^        zb* X""   | *   ,  6        ",<48,>>JH>|  XThis folder contains utilities and programs dealing with the boot sector. The boot sector can be used to load a picture, set colours, check for viruses, or even launch a program. Boot code must be written in PC relative mode. The first two bytes on the boot sector will normally be $60 $38, meaning branch 56 bytes ahead. At that point, your first instruction will begin. You will automatically be placed in supervisor mode, which means that all the chips registers ($FF8240 etc...) may be accessed and systems variables (such as $44e) may be called. While programs can be easily launched from the boot sector, and indeed a lot of commercial games start this way, it must be remembered that certain limitations are present. First, any program that calls gem vdi/aes routines will not work as at that point in the sequence, gem hasn't been installed yet. Second, when the time comes to terminate the launched program, it is unlikely that a clean exit to the desktop will be achieved. Bombs are more likely to appear. With games, this is usually no problem, as games are usually terminated by switching off the computer. Third, code placed on the boot sector is very prone to detection by virus killers, who will probably destroy it indiscriminately. With these provisos, the boot sector will happily launch any program. STOS programs are particularly easy to launch from the boot sector as STOS makes no use of GEM. Ascii files can be easily displayed from a boot code. So can pictures. There is an example in this folder, called BOOT_PIC.PRG that will create an executable boot-sector whose task will be to load a PI1 picture from disk. First, run BOOT_PIC.PRG. Insert destination disk in A. Boot sector will be created. Next time, this disk is loaded, it will automatically display any PI1 picture. The assembler source code is included. One such application was in the launch sequence of FOOTBALL CRAZY: the boot sector was used to display the 'welcome message'. Control then passed to 'startgem.prg' inside the auto folder, which called a program called 'chainer.prg'. Chainer.prg first launched Gary Wheaton's title tune, then launched the main program 'Football.prg'. If any help is needed, or for the further code, please contact Budgie UK. Another program is this folder is EXECUTE.PRG Again assembler source code is included. This little one will work out the magic check-sum required to make your boot sector executable. Of course, you'll have to have some code on it in the first place. EXECUTE.PRG is mainly used to make executable boot code that was once executable, but got modified with a disk editor. (when changing a greeting message for instance). Any byte in the boot sector that is changed, automatically inhibits the execute ability. Use EXECUTE.PRG to restore it. Another boot program, GUARDIAN.PRG will be found in a separate folder. The principle is the same: A PC relative piece of code is slotted on the boot sector. (In this case a flashing welcome message) The sector is then made executable. All further resets and cold starts will activate the guardian. GUARDIAN.PRG is used to detect whether an uninvited guest has taken up residence on your boot sector. Another program, BOOTER.PRG by Jim Holmwood will slot any executable program (PRG) into the boot sector, and make that sector executable. The program to be slotted must be written in PC relative code, less than 450 bytes long and must end with an 'RTS' rather than the usual TRAP #1 exit. Three examples of mini boot progs are included: bootdem 1,2 and 3 ---------------------------------------------------------------- The boot sector can be used to launch a program by using the $4b exec trap call. Write to Budgie for details. However, please remember that any program that needs gem should be auto booted in a different manner: * place 'startgem.prg' in an auto folder * place an ascii file called 'startgem.inf' on root directory this file contains the path and name of the program needed. * place program to auto boot ALSO on root directory. * There is an example of a 'startgem.inf' file on this disk The only real purpose of boot-sector auto-load is to stop users interfering with loaders placed in directory. Also, it occupies no valuable disk space or directory entry But of course, it is extremely vulnerable to viruses and virus killers. -------------------------------------------------------------- `2A/?< NA\?<NATNu hello helloTEXT`fA/?< NA\?<NATNu This small friendly piece of text will be written on your boot sector. Should the greeting fail to appear, an uninvited virus is present! DO NOT use this program on a commercial disk that uses its boot sector. If a commercial disk auto-boots without having an AUTO folder, then it uses the boot sector: leave it alone TEXT`<*C"/ ?< NA\,<.<QQNu %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % IF THIS MESSAGE FAILS TO APPEAR % % ON THE SCREEN AT BOOT UP THEN % % IT IS LIKELY THAT A VIRUS HAS % % WRITTEN ITSELF INSTEAD OF THIS % % NICE AND FRIENDLY ALIEN MESSAGE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%LP1LP2BOOT_MES$`N &o.|' + ЫЫ// Bg?<JNAO `p aD34#N( pna.f3'#f( p4a`^ |(0p 0Q0af3'pNa3'3'phaL'3'3'3'3'3'3'pla3',3(.3(03(2L'3'3'3'3'3'pdaF3v#^'3v'3'piaL,@ BC 3v'3'3'3'3'pea3v'3'phaL'H, |(00@0@0@0@000@0@0@0@0@BXBXBXBXBX3(aL3(0aa3(0aL,@SBASC3*03*23*43*6a^3(0ahNuBOOT PROGRAM BY JAMES HOLMWOOD# ( 3'papoa3v'pfa3v'pgaa6paBg?<LNAH#( p6aL'3'3'3'3'3'3'3'3'3'p3aN0@D2AE3'3'3'3'3'3'3'3'3'p3a#( 3'3 '3'3'3'3'p*a#( 3'p2a633333LNuH89:9<9>90@D2AE3'3'3'3'3'3'3'3'3'p3a*3'3'3'3'3'3'3'3'3'p3a0A (f LNuv3'3'#p'#'3'"<0<NB09'&y(0A4(Cg0ADfh 4(`Nu0A h 4(SB PgSBfBNu0A h PfNu0A4(Cg 0A Df 4(`Nu0A4(Cg0A( f4(`6Nuajx aa`QBy`l#^( pa |^0|f a"`|f P`|f a`|f a`|fa`zH3'3'#p'#'3'"<0<NB09'&y(v8<avava"va3vaL69|f aRa>`| f P`޶| f#( #x(pZa l3'3'#p'#'3'"<0<NB09'&y(89:9<9>9#( 3'3 '3'3'3'3'p*a ax ax a`| fax ax aJ9gH3'3'#p'#'3'"<0<NB09'&y(aLNu3'3'#p'#'3'"<0<NB09'&y(vH#( p6a L'3'3'3'3'3'3'3'3'3'p3a 0@D2AE#( 3'3'3'3'3'3'p*a r#( 3'p2a `60@D2AE3'3'3'3'3'3'3'3'3'p3a 0A (f LNu |"H<Af0<`><Bf0<`0<Cf0<`"<Df0<`<Ef0<`0<??<NAXCA<*f/<?<;NA\/<?<NA\Mx?</?<NNAP|ga|gJNuA6?</?<=NAP3fAx//92?9f?<?NA ?9f?<>NAXNuaFBBBAx0HX2HX4HҀԁ#baCh:.<QAh|`|8AxCh:.9bfa|a`|3(By(p`h3(By(pB*4By*:`J3(3(p`63(3(p`"3(By(p`p3(By(3("p `p`prC(4g2Rj3(3(p `By(3(p `By(3(p`nBy(3(p`ZBy(3(pq`F3(By(By*2p`,By(3(p`By(3(pl`By(3(p`3(By(By*0p`By(3(p`3(By(By*0p `By(3(pk`By(3(p `By(3(p`lBy(3(p`XBy(3(pj`DBy(3(p'`0By(3(p`By(3(p`By(3(p`By(3(ph`By(pp`3(3(pm`3(3(py`By(By(pn`3(By(pi`By(By(pv`pBy(3(pz`\By(By(p{`JBy(By(p|`8By(By(p}`&By(By(p~`By(By(p`By(By(0<`By(3(pf`By(3(p`By(By(p#`By(By(p$`By(By(p%`By(By(p&`~By(3(pu`jBy(3(0<`TBy(By(0<`@By(3(p!`,3(By(p`3(3(p`3(($3("<0<sNBNua:\booter\jimboot3.rsc[3][Resource file error][Quit]''''( ( ((0*0)0+0SS TT X0YFBAL2 ,AL3 AL4 DO2 FND FNOA NOB NOC NOD NOE CANT FDATE0DTABFULLGOTT GREYMAINNOTA SIZE2TIME.AP_IDINTIN PATHApPATHBtPTSINREDDY SPAREDV_ARCV_BARCONTRL DEVICE:FULLIT GLOBAL HANDLEfHELPME$INTOUTINT_IN MOVEIT ^PASSON *PTSOUTRADIO1READIT RESULT8SIZEIT V_PALL\V_RBOXVXSTARTXWIDTHYSTARTYWIDTHADDR_IN CHECKEDCONTRL1 CONTRL2 CONTRL3 CONTRL4 CONTRL5 CONTRL6 CONTRL7 CONTRL8 CONTRL9 CONTROL GDP_ALLfGDP_BOXXINT_OUT LOW_VDI:MYSTACK PROCEED SCREENHSCREENWSCREENX SCREENY VS_CLIPBV_CLRWKV_CLSWKV_GTEXTnV_OPALLV_OPNWKV_PLINEZV_RFBOXrV_UPDWKV_ZEROZWRITEOK ADDR_OUT CALL_AESxCALL_VDI0CONTRL10 CONTRL11 FINISHEDMENU_PTRPATHNAMEPROGNAMExSET_DRVE START_ITUPDATEIT *VEX_BUTVVEX_CURVVEX_MOTV VEX_TIMVVQT_NAMEVQ_COLORXVQ_EXTNDDVQ_KEY_S0VQ_MOUSEVR_RECFLVR_TRNFMVSL_ENDSVSL_TYPEVSM_TYPE.VST_FONTVS_COLORV_CIRCLEV_CLSVWKV_ELLARCV_ELLPIE0V_HIDE_CV_OPNVWKV_SHOW_CW_HANDLEvFILE_NAM6FULL_SIZ PATHSHORSETUPMODTERMINATVFONT_ALVQT_WIDTVRO_CPYF^VRT_CPYFtVSF_COLO*VSF_STYLVSF_UPDARVSIN_MODVSL_COLOVSL_UDSTVSL_WIDTVSM_COLO\VST_COLOVST_POINVSWR_MODV_ELLIPSDV_PMARKEfAES_PARADDRAWWINDGDP_ARCPGET_BUTTINITIALI0MESSAGEB^NEW_BUFFxRLOADED_jSET_BUTTbTOT_LENGbVDI_PARAVQT_EXTEVRQ_STRIVSM_HEIGBVST_HEIGpV_FILLARjV_PIESLIWINDOWNA^BOOT_SEC FORCEUPD &GET_TEDILNORMAL_S OPEN_DIAREAD_BUFhREAD_SEC LSET_TEDI(VRQ_LOCAVST_EFFEV_GET_PIV_JUSTIFvBADRSC_ACLOSE_DIDEINITIA~RECALCWIRSC_FILEVQT_FONTVSF_INTEVST_ROTAWRITE_SE zCHANGEDW ^GEM_CTRL\VSF_PERI>VST_ALIGV_CONTOUCURRENT_ VQF_ATTRVQL_ATTRlVQM_ATTR~VQT_ATTRVST_LOADVST_UNLO>2   >   , "  .    @  "  6      *^*  N&2         2                                            PbBOOTER.PRG was written by Jim Holmwood. 1. Run BOOTER.PRG 2. Choose a small program to be slotted on the boot sector. Program must be written in PC relative code, terminate with 'RTS' and be less than 450 bytes long. There are three such examples in this folder, (bootdem1,2,3) Choose any one of them. They are harmless. Remember, BOOTER.PRG will write on your boot sector. So don't use a valuable disk to experiment. Budgie UK Feb 1990 lFORM1RAD1ABHELP PRO WRITE QUIT FORM2 ALERT2 ALERT3 ALERT4 FORM1 EQU 0 RAD1 EQU 1 A EQU 2 B EQU 3 HELP EQU 8 PRO EQU 9 WRITE EQU 10 QUIT EQU 11 FORM2 EQU 1 ALERT2 EQU 0 ALERT3 EQU 1 ALERT4 EQU 2 0T00H$H0ABSELECT DRIVE:AUTOBOOT FROM BOOT SECTORJ. HOLMWOOD (c) 1989HELPSELECT BOOT PROGRAMWRITEQUITTHIS PROGRAM WILL WRITE A MESSAGE ON YOUR DISC BOOT SECTORTHAT WILL INDICATE THAT THE DISC ISVIRUS FREE AND ALLOW YOU TO SPECIFYTEXTTHE MESSAGE PROGRAMS MUST BE MADEBEFOREHAND AND AN EXAMPLE IS GIVENWHEN DESIGNING YOUR MESSAGE IT ISIMPORTANT THAT PC RELATIVE ADDRESSESARE USED e.g. LEA mess(PC),A1AND YOUR CODE MUST FINISH WITH ARTS INSTUCTION.ANY OTHER INFORMATION AT BOOT UP USING THE DEVPAC ASSEMBLERTHANKYOU[2][CANNOT FIND YOUR BOOT PROGRAM| |HAVE YOU SAVED ONE TO DISC?][RETRY|QUIT][3][ALL DONE|RESET YOUR COMPUTER|AND SEE IF IT WORKS!][ OK ][3][YOUR DISC IS WRITE PROTECTED!| |PLEASE REMOVE TO ENABLE A|WRITE OPERATION][RETRY]W(678RSTjk!$$!"#EF"Gjk#l"%!   /0"1LM # $&T p @ l  @ q  %& ## 4!P" l !  $      !'N 0P.  ti..  tCHAIN S t jCHAIN PRGt lCHAIN DOCt m=** Aug 3 1989 **** Budgie UK *------------------------------------------** * reallocate unused memory to Gemdos m_shrink MOVEA.L A7,A5 save stack pointer move.l #stack,A7 set up local stack MOVEA.L 4(A5),A5 basepage address i.i. program start MOVE.L 12(A5),D0 get length of text (the code) ADD.L 20(A5),D0 add length of defined data (DC.W...) ADD.L 28(A5),D0 add length of BSS reserved space (DS.W...) ADDI.L #256,D0 add basepage length MOVE.L D0,-(A7) total memory required MOVE.L A5,-(A7) program start address CLR.W -(A7) junk word MOVE.W #$4A,-(A7) SETBLOCK command TRAP #1 LEA $0C(A7),A7 move.w #4,-(sp) get resolution trap #14 addq.l #2,sp move.w d0,oldrez and save it * call and execute next program move.l #environment,-(sp) call program one move.l #environment,-(sp) pea name1 move.w #0,-(sp) chain this routine move.w #$4b,-(sp) execute it trap #1 adda.l #$10,sp getkey move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 swap d0 cmp.b #$01,d0 esc bne cont bra quit * if we ever come back here, call next one! cont move.l #environment,-(sp) call program two move.l #environment,-(sp) pea name2 move.w #0,-(sp) chain this routine move.w #$4b,-(sp) execute it trap #1 adda.l #$10,sp * if we ever come back here, resume with this loader quit move.w oldrez,-(sp) old resolution back move.l #-1,-(sp) move.l #-1,-(sp) move.w #5,-(sp) trap #14 add.l #12,sp * in this example, just exit... move.w #0,-(sp) back to desktop move.w #$4c,-(sp) trap #1 even lo0 ds.w 64 environment dc.b 0,0,0,0,0,0 name1 dc.b "a:\music\lisa_14.prg",0 even name2 dc.b "a:\rasters\raster_5.prg",0 even oldrez dc.w 0 ds.w 256 stack dc.l 0`|*O.|x*m - ЭЭ// Bg?<JNAO ?<NNT3v/<B/<BHyH?<?<KNA?<NAT@H@<f`$/<B/<BHy^?<?<KNA?9v/P0_P0_x_ox_ox_T0@ U``_P0_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_OxU``_P0_ox_ox_ox_oxU``_`_ox_ox_ox_oxU``_@_ox_ox_ox_oxU``_@_ox_ox_ox_oxU``_`_ox_ox_Ox_ox1>P0_P0_ox_ox_?x?_oxQa~`_`_x_x_?x?_xT0 _T0 _x_x_T0 _x_x_x_x_x_`_x_x_x_xT0 _P0T0 _x_x_T0 Wg{`_`Wg{`_x_x_`3<P0@3<P0T0 T0 P0T``P` T``P``P``_``+ 0@0? + 0@0?P00?P0??@P` P``P``_`  /0  /0@/0@BUDGIE UK THE DAMONOID FOOTBALL 88 OTHELLO BLITZ III PRO DARTS DR BORIS /PUZZLER BALL ZONE SPECULATOR TYCOON MONEYSPINNER MAELSTROM ACE INVADERS ZENITH GOLDRUSH ZERPHOD PERILS OF PENFOLD LINE OF FOUR WORD PUZZLER GENERATOR MAKE A BREAK PARABELLUM TRI - HELI COSMOS OPERATION ANGELICA IMPULSE BANDIT SCARY SPACE BLOB SLIPPERY SID CARRIER ATTACK PSICOTIC SUB HUNT SEA FISHERMAN DEATH CAMP GALAXIA INFERNO RUNAWAY TABLIT CRYSTAL CAVERNS HAPPY PUZZLER HOSTILE RECEPTION SAFE AS HOUSES MORE GOODIES TO COME ! .......| `*O*m - ЭЭ"ҍ.A// Bg?<JNA B?< NA\#?<NNT# aD a0`Hy?<NN\?</9/9?<NN /9?< NA\BgNA333l##,v#|3?<NNT @f <u`//<?<HNA\Jf <>`/#R@H######## <@ yBQ yCe < Q?<//<S/??<?NA ??<>NAXa^ aHyPZ?<NN\?</9R/9R?<NN /9R?< NA\?</P0_P0_x_ox_ox_T0@ U``_P0_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_?x?U``_`_x_ox_ox_OxU``_P0_ox_ox_ox_oxU``_`_ox_ox_ox_oxU``_@_ox_ox_ox_oxU``_@_ox_ox_ox_oxU``_`_ox_ox_Ox_ox1>P0_P0_ox_ox_?x?_oxQa~`_`_x_x_?x?_xT0 _T0 _x_x_T0 _x_x_x_x_x_`_x_x_x_xT0 _P0T0 _x_x_T0 Wg{`_`Wg{`_x_x_`3<P0@3<P0T0 T0 P0T``P` T``P``P``_``+ 0@0? + 0@0?P00?P0??@P` P``P``_`  /0  /0@/0@p"wUT#pD3"3UT#pnot enough memorycolor onlywDUfUD3DU2eDU2eDU2eDU2eDU2eDU2eU2e'7GWgwwwwwwwwwwwwvutsrqp`P@0 lynne_15.prga:\delta\text.ascw?@??????????????????@????????????????????????????????????????????????????????????????????????????????????????????????????????888pl0x8xxx88pxx||x l`xx|||88p88088 x 888|80 x`0xpp8pp8||pxxx|p80 p`x00x0p88p88088 0 888|880x` 0xx0`p8pl088xx0xx8p||xxl|xx0|00| |* sept 21, 1988 feb 1990 * displays a large horizontal scroll (text or redefined graphics) * uses v/b $70 , mfp $118 (k/board) and mfp $120 (B timer) * uses SR 2500 * uses chain command * accesses video chip at $ffff8201/3 direct * revectors $118 handler * uses CONSTAT during mfp handler * use of INCBIN directive * binary version visible trough Monst2 in Devpac (delta.prg) * with free ram acc and bicalc acc, this will load at $250b6 to 2831c (rte) * 28d1e is character set 2d4d2 is closing palette * 2d551 is musik.dat 2d55d is text 2d86c is colors 2d940 is cycling m_shrink MOVEA.L A7,A5 MOVEA.L 4(A5),A5 MOVE.L 12(A5),D0 ADD.L 20(A5),D0 ADD.L 28(A5),D0 ADDI.L #$800,D0 move.l d0,d1 these 5 lines specific to delta add.l a5,d1 without them, musick.tos andi.l #$fffffffe,d1 loads but doesn't execute movea.l d1,a7 and hangs up MOVE.L D0,-(SP) MOVE.L A5,-(A7) CLR.W -(A7) MOVE.W #$4A,-(A7) TRAP #1 LEA $0C(A7),A7 clr.l -(sp) move.w #$20,-(sp) trap #1 addq.l #6,sp move.l d0,oldstack move.w #3,-(sp) trap #$0e addq.l #2,sp move.l d0,logbase dc.w $a00a move.b #%11111110,$ff820a go 50 hz move.l #dta,-(sp) set up dta section to find size move.w #$1a,-(sp) trap #1 addq.l #6,sp move.w #0,-(sp) normal file move.l #name,-(sp) look up attribute move.w #$4e,-(sp) trap #1 addq.l #8,sp tst d0 file found? bne exit exit lea dta,a0 move.l 26(a0),d5 size move.l d5,txt_size * load a file MOVE.W #0,-(A7) open a file pea name(pc) MOVE.W #$3D,-(A7) TRAP #1 add.l #8,sp MOVE.W D0,d7 handle MOVE.L #budgie,-(sp) load at this address MOVE.L d5,-(A7) size MOVE.W d7,-(A7) handle MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 MOVE.W d7,-(SP) close MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP bsr _start dc.w $a009 exit bsr fred restore mfp if necessary pea palette retrieve palette move.w #6,-(sp) trap #14 addq.l #6,sp move.w #0,-(sp) set screen paras move.l logbase,-(sp) move.l logbase,-(sp) move.w #5,-(sp) trap #14 adda.l #12,sp move.l oldstack,-(sp) back user mode move.w #$20,-(sp) trap #1 addq.l #6,sp setmedrez move.w #1,-(A7) 0=low res MOVE.L #-1,-(A7) -1=ignore physbase MOVE.L #-1,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 quit clr.w -(sp) trap #1 * end *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _start move.w #0,l_2d9c8 move.w #$ffff,l_2d9ca move.w #1,l_2da22 move.l logbase,l_2d9d4 move.l #l_2d8e2,l_2da2c $2D82 is full of $0777's move.l #l_2d940,l_2da32 $2D940 is 00 00 00 01 00 etc move.w #5,l_2da36 move.w #4,-(sp) trap #14 addq.l #2,sp get rez cmpi.w #2,d0 bne st1 move.l #rez_message,d0 bra print st1 move.l #$40100,-(sp) move.w #$48,-(sp) trap #1 reserve addq.l #6,sp tst.l d0 bne st2 move.l #mem_message,d0 not enough memory bra print st2 move.l d0,l_2d9a0 pointer to start of block lsr.l #8,d0 addq.w #1,d0 ext.l d0 lsl.l #8,d0 move.l d0,l_2d9a4 same (/8*8) addi.l #$8000,d0 now $8000 further on move.l d0,l_2d9a8 addi.l #$8000,d0 move.l d0,l_2d9ac addi.l #$8000,d0 move.l d0,l_2d9b0 addi.l #$8000,d0 move.l d0,l_2d9b4 addi.l #$8000,d0 move.l d0,l_2d9b8 addi.l #$8000,d0 move.l d0,l_2d9bc addi.l #$8000,d0 move.l d0,l_2d9c0 move.l #$1f40,d0 counter movea.l l_2d9a4,a0 st3 clr.l (a0)+ clear the first section of that block dbf d0,st3 movea.l l_2d9a4,a0 start of block again lea budata+34,a1 probably the old degas picture (redo) move.l #1500,d0 counter (6079 bytes) st4 move.l (a1)+,(a0)+ copy data to block dbf d0,st4 move.w #0,-(sp) move.l #-1,-(sp) move.l #-1,-(sp) move.w #5,-(sp) trap #14 adda.l #$c,sp set screen move.l #$1f40,d0 counter movea.l l_2d9a4,a0 movea.l l_2d9a8,a1 movea.l l_2d9ac,a2 movea.l l_2d9b0,a3 movea.l l_2d9b4,a4 movea.l l_2d9b8,a5 movea.l l_2d9bc,a6 st5 move.l (a0),(a1)+ move.l (a0),(a2)+ move.l (a0),(a3)+ move.l (a0),(a5)+ move.l (a0),(a6)+ move.l (a0)+,(a4)+ copy the first section into the dbf d0,st5 other six move.l #$1f40,d0 that counter again movea.l l_2d9a4,a0 and again with the very... movea.l l_2d9c0,a1 ...last section st6 move.l (a0)+,(a1)+ dbf d0,st6 lea datastart,a0 ($2831e) not needed? All $000's... movea.l l_2d9a4,a1 start of reserved block again move.l #7,d5 loop 1 st6a move.l #$96,d7 loop 2 adda.l #$1ea0,a1 st7 move.l #$27,d6 loop 3 st8 clr.l (a1)+ dbf d6,st8 suba.l #$a0,a0 dbf d7,st7 adda.l #$a0,a0 adda.l #$300,a1 dbf d5,st6a bsr sub_a (253c2) bsr save_mfp move.l #l_2d87a,l_2da2c contains $0006 0006 etc.. move.w #4,l_2d9da move.l #budgie,l_2d9dc st8a move.w l_2d9c8,d0 ext.l d0 lsl.w #2,d0 lea l_2d9a4,a0 a pointer move.l 0(a0,d0.l),l_2d9cc lsr.l #2,d0 addq.w #1,d0 cmpi.w #8,d0 bne st9 move.l #0,d0 st9 move.w d0,l_2d9d8 lsl.w #2,d0 move.l 0(a0,d0.l),l_2d9d0 bsr sub_b move.w l_2d9d8,l_2d9c8 lea l_2d9a4,a0 move.w l_2d9c8,d0 lsl.w #2,d0 ext.l d0 move.l 0(a0,d0.l),l_2d9d4 move.l $466,d0 wait_vb cmp.l $466,d0 beq wait_vb move.w #$b,-(sp) CONSTAT if 0 in D0, trap #1 no characters in buffer addq.l #2,sp tst.w d0 beq st8a move.w #1,-(sp) CONIN (getkey) wait for trap #1 1 single charater addq.l #2,sp bsr fred restore mfp if necessary rts sub_a pea l_2d55c string environment (0,0) pea l_2d55c pea l_2d551 filename move.w #0,-(sp) CHAIN move.w #$4b,-(sp) trap #1 adda.l #$10,sp rts clear_vb movea.l $456,a0 clr.l 4(a0) clear first interrupt in queue rts sub_b subq.w #4,l_2d9da tst.w l_2d9da bne george move.w #$20,l_2d9da movea.l l_2d9dc,a0 cmp.b #"|",(a0) end marker? bne st10 lea budgie,a0 the text st10 move.b (a0),d0 cmp.b #13,d0 beq space cmp.b #10,d0 beq space cmp.b #32,d0 bmi space cmp.b #90,d0 bgt space cmp.b #0,d0 beq exit bra okk space move.b #32,d0 okk addq.l #1,a0 move.l a0,l_2d9dc move.w d0,d2 move.l #c_set+34,d1 start of degas pic (c/set) PI3 subi.b #$20,d0 cmpi.b #$33,d2 blt st11 addi.l #$960,d1 subi.b #$13,d0 cmpi.b #$46,d2 blt st11 addi.l #$960,d1 subi.b #$13,d0 cmpi.b #$59,d2 blt st11 addi.l #$960,d1 subi.l #$13,d0 st11 ext.w d0 ext.l d0 lsl.l #2,d0 add.l d0,d1 move.l d1,l_2d9e0 george movea.l l_2d9e0,a0 movea.l l_2d9cc,a1 adda.l #$6900,a1 movea.l l_2d9d0,a2 adda.l #$6900,a2 *---------------------- next section 29 times * this governs the height of each letter (normally 28 or 29) * if say 14 is put here only 1/2 a character will be printed * this section probably copies from c/set memory a character * on the top section of the screen, taking 29 scans to draw one * I am now using a loop instead of a 29 repeat move.l #28,d7 aloop move.l #$98,d6 152 move.l (a0),d0 move.w l_2d9da,d1 subi.w #1,d1 lsr.l d1,d0 andi.w #15,d0 move sr,d5 sr1 move.w d5,sr clr.l d4 move.w 0(a1,d6.l),d4 lsl.l #4,d4 or.w d0,d4 move.w d4,0(a2,d6.l) swap d4 move.w d4,d0 andi.w #15,d0 move sr,d5 subq.l #8,d6 bpl sr1 adda.l #$50,a0 80 adda.l #$a0,a1 160 adda.l #$a0,a2 dbra d7,aloop bra .skip *---------------------- *---------------------- .skip movea.l l_2d9d0,a0 physbase probably adda.l #27040,a0 now point line already on (bottom one) movea.l l_2d9d0,a1 next three a1/2/3 are still blank.. adda.l #20800,a1 ..but will all receive a copy.. movea.l l_2d9d0,a2 .. of this line if required adda.l #14560,a2 .. see next section movea.l l_2d9d0,a3 adda.l #8320,a3 6240 gap between each *------------------------ the next lot is repeated 1116 times!! * without this section, only one line of text will be shown (bottom) * each move.l d0,(ax)+ adds one extra line, moving upwards move.l #1116,d1 giant move.l (a0)+,d0 move.l d0,(a1)+ 2nd line move.l d0,(a2)+ 3rd line * move.l d0,(a3)+ no time for this one (flicker) dbra d1,giant rts *----------------------- screen_sub movem.l d1/a0,-(sp) move.l l_2d9d4,d1 lsr.l #8,d1 move.b d1,$ffff8203 screen low actually $ffff8203 lsr.w #8,d1 move.b d1,$ffff8201 screen hi subq.w #1,l_2da36 bne st13 move.w #2,l_2da36 addq.l #2,l_2da32 st13 movea.l l_2da32,a0 cmpi.w #$ffff,(a0) bne st14 move.l #l_2d940,l_2da32 movea.l #l_2d940,a0 st14 move.w (a0),$ff825e palette color 15 ($00ff825e) movem.l (sp)+,d1/a0 move.w #$ffff,$4ee alt/help flag (why?) rts *----------- print move.l d0,-(sp) move.w #9,-(sp) trap #1 print routine addq.l #6,sp move.w #1,-(sp) trap #1 conin addq.l #2,sp bra exit getkey move.w #1,-(sp) trap #1 conin addq.l #2,sp rts *--------------------- save_mfp move.b $fffa09,l_2d9ee interr enable B move.b $fffa07,l_2d9ef interr enable A move.b $fffa13,l_2d9f0 interr mask A move.l $118,l_2d9f2 move.l $120,l_2d9f6 move.l $70,l_2d9fa move.l $118,nick+2 move.l #tony,$118 ($23e28) (#$2500,sr) andi.b #$df,$fffa09 interr enable B andi.b #$fe,$fffa07 interr enable A move.l #jack,$120 mfp routine (colours) ori.b #1,$fffa07 interr enable A ori.b #1,$fffa13 interr mask A move.l $70,lou+2 move.l #mfp,$070 move.w #0,l_2da22 rts *---------- fred tst.w l_2da22 beq restore_mfp rts restore_mfp move.b l_2d9ee,$fffa09 move.b l_2d9ef,$fffa07 move.b l_2d9f0,$fffa13 move.l l_2d9f2,$118 move.l l_2d9f6,$120 move.l l_2d9fa,$70 bsr clear_vb move.l l_2d9a0,-(sp) pointer to a block of $40100 bytes... move.w #$49,-(sp) previously allocated trap #1 now MFREE addq.l #6,sp rts *---------- mfp move.b #0,$fffa1b timer B control (this routine is .. st15 move.b #49,$fffa21 timer B data ..slotted in $70) cmpi.b #49,$fffa21 ($31) bne.s st15 move.l #jack,$120 each v/b, $120 routine is reinstalled move.w #$000,$ff8240 reset all colors move.w #$432,$ff8242 move.w #$765,$ff8244 move.w #$543,$ff8246 move.w #$654,$ff8248 move.w #$444,$ff824a move.w #$333,$ff824c move.w #$432,$ff8242 move.w #$202,$ff824e move.w #$222,$ff8250 move.w #$333,$ff8252 move.w #$444,$ff8254 move.w #$555,$ff8256 move.w #$666,$ff8258 move.w #$546,$ff825a move.w #$453,$ff825c move.w #$777,$ff825e bsr screen_sub move.l l_2da2c,l_2da24 #$006006 move.b #8,$fffa1b timer B control lou jmp $00000000 receives $70 address tony move.w #$2500,sr enable level 6 interrupt nick jmp $00000000 receives $118 address jack movem.l d0/a0,-(sp) move.w #$070,$ff8244 green move.w #$050,$ff8250 move.w #$040,$ff8258 move.l #sid,$120 after Jack, now Sid bra st16 sid movem.l d0/a0,-(sp) movea.l l_2da24,a0 move.w (a0),d0 move.w d0,$ff8242 move.w d0,$ff8246 move.w d0,$ff8252 move.w d0,$ff825a addq.l #2,l_2da24 st16 move.b #0,$fffa1b timer B control st17 move.b #3,$fffa21 timer B data cmpi.b #3,$fffa21 bne.s st17 bclr #0,$fffa0f interr in service A move.b #8,$fffa1b timer B control movem.l (sp)+,d0/a0 rte *---------- flash move.w #$000,$ff8240 move.w #10000,d5 ag dbra d5,ag move.w #$070,$ff8240 rts *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ datastart l_2831e dc.w $00,$00,$10,$10,$44,$44,$6c,$6c etc... whatever dc.w $00,$00,$10,$10,$44,$44,$6c,$6c * ds.l 3000 even c_set incbin "a:\delta\delta.set" (28d1e) even budata incbin "a:\delta\budgie.tit" even * l_2b5be ds.l $1888 probably the old picture... palette dc.w $007,$070,$222,$777,$555,$654,$323,$070 on exit dc.w $444,$333,$222,$333,$555,$654,$323,$070 mem_message dc.b "not enough memory",0 rez_message dc.b "color only",0 even l_2d55c dc.b 0,0 environment even colors l_2d86c dc.w $707,$606,$505,$404,$303,$202,$101,$006 dc.w $777,$444,$555,$666,$555,$444,$333,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 dc.w $707,$444,$555,$232,$765,$707,$407,$007 l_2d87a dc.w $006,$006,$555,$232,$765,$707,$407,$007 l_2d940 dc.w $000,$001,$002,$003,$004,$005,$006,$007 cycling dc.w $017,$027,$037,$047,$057,$067,$077,$177 dc.w $277,$377,$477,$577,$677,$777,$777,$777 dc.w $777,$777,$776,$775,$774,$773,$772,$771 dc.w $770,$760,$750,$740,$730,$720,$710,$700 dc.w $600,$500,$400,$300,$200,$100,$000,$ffff even ds.l 20 l_2d551 dc.b "lynne_15.prg",0 any chainable file.. ds.l 20 even l_29412 dc.l 0 l l_2d8e2 dc.l 0 l l_2d9a0 dc.l 0 pointer to block of $40000, later m_freed l_2d9a4 dc.l 0 same but /8*8 l_2d9a8 dc.l 0 same + $8000 l_2d9ac dc.l 0 same + $8000 l_2d9b0 dc.l 0 same + $8000 l_2d9b4 dc.l 0 same + $8000 l_2d9b8 dc.l 0 same + $8000 l_2d9bc dc.l 0 same + $8000 l_2d9c0 dc.l 0 same + $8000 l_2d9ca dc.w 0 w l_2d9c8 dc.w 0 w l_2d9cc dc.l 0 l l_2d9d0 dc.l 0 l top of screen? l_2d9d4 dc.l 0 l l_2d9d8 dc.w 0 w l_2d9da dc.w 0 w repeated 29 times l_2d9dc dc.l 0 pointer to budgie start l_2d9e0 dc.l 0 l l_2d9ee dc.b 0 mfp l_2d9ef dc.b 0 l_2d9f0 dc.b 0 b mfp l_2d9f2 dc.l 0 l ($118) l_2d9f6 dc.l 0 l ($120) `R*O*m - ЭЭ" Ҁ.A// ??<JNA B?< NA\#Z hBP L@H`?<NNT3^Bg/9N/9N?<NNO BF# /9Z?< NA\?</<(?<1NA`HJg< 9ag$y69*!SCjb## 4# # # # # $DfE6*"*!Bg "R jag "j j axtg "j jadg "j jaR#3LNuA|#LNuFA|LNuLNu (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. TITLE ****SONG FOR LYNNE**** COMOPOSED BY G.WHEATON. JAN. 1990   ~  ~          B                         0") HHAEHA|fBQ"S)f#A#Ai3AXQ)<fR)Nu`~p|**2JT^fn .PtpppppppppppM@@ vNR)  B@) 1Nu 9 g@ )m8)f.i2)i2)imDAin2)i3ANuDi`Z) in3iNuY) )Nu|` i#n3i`4|`4iPNu|Nu|Nu iHn 9ig 3|H`3|`Qi|`|` )fNu3i`R99AA3{Nu`H0R99AA3{NulQ@R99AA3{NuyQ<(R99AA3{Nuy[8|?p????????|||???>??x?|||>~?~<<~?~~>>>~~?<~?||||????~<~~~<~x<~>~~||x<~~~||~~~~~|~~~~~<?||?||?||~~>~x<x<~??~x<x<~??8@<`22`|||||||| (|````f >``22``220zzf[f`|880 |x8::x 8f>fl8~~f|8~||88>|||~~`~p8>|||~0< <06|~8~~~n<8>>|`l|00x<88<@@@(8f~fl8~~f8x||~|~`~88|~|0~fffff~fff8f<LL LL~Ufv|~~8~n<>~n6~n>~~8~>~n6<~~l ~pD|xH<$,4fp@p8`l88~~<888~|~`~8|0f||<~||<0ff<<##f<<<ʂQfv  ff > 6ff>f6ff2fbfb`~|f0||~8>l|H0f$g< @@ |@.8` 88p<8 88<~x88|p0l 88|0bf<<<<<<<<888~`v<~&&<  f ff 6 6f6f6fvf`~08fB~8|88H0$<@8 ::~x98f|p8p~ ~88x~<88|p0l88|88`~>>>|~~~888f`~~ffff0~f>8~f~ff,,>~n~fffʢff<  f fff 6v>f6v><f`lfB<~p~@H`H8<|||||||88f>p8p~8<888f6fnffffʢff<  f fff 6v6f6vf8|` f0~f~~8~Hx0g>>`fff~|{fffff`f>fff~~f002ll>fvn~~fzffn 6 f fff 66f6f8f`( f0BlB~8>$,4򒌁<y~86p<808~<~xp88|8p 88|888f`~~~~`~~~~`ffffff0~f~fff~ff0~~nf6~fv~~~f ffn 6 f ff0n 6~6f60n|~~~6>lf`(0f0ff~`@Lb|`(`l |~~||~< <|p<a:::~8~~88`888p~~|8|8~~~|8|80~~~~~~~~~<<l~<~~ff><~` 2~~~~ff~ ||0ll`8]|||8|88~~>|||8|880<|>>>>>>>><<>||`p><<>ff<`?><~ff< 08`>~~~p <pp ~@`~~<|0@|T88|8xD||||||||D||||||||``f[|880 x8::xD@``0:: f |z||_<8>`l|00x<8<@@>@D$"<x`<>|~ffcf~x@`6``000 U6~~l pD|xH<$,4ށfp@pD$$ `<<<><><<pfl|H0f$gܙ< @@@D~<$``$f80`ff8ffff`f```fh`fffff`fff```<|<><0<|b|<|>><|ffff~0b0&&ʺ`~08fB~8|88H0$<@8::x~b` f0` ff8ffff`f```fh`fffff`fff `060f`ff|ffdffff0b0ffbf88::0,,ʢ<`lfB<~p~@H`H<|||||||$` `<f&<|ffp~nf|`f||`~p`ff|f|<fff`06f`ff0ffhffff0`0ff4f|||||||06ʢf8` f0~f~~8~Hx0gz8 n~f`f``nfp`ff`fffff0`c >f`f~0ffpffff080fff::::~02llzf8`( f0BlB~8>$,4r<$```f`ff~8`ff`f``ffh`ff`fffff``cff`f`0ffpffff00fff8880~~nf6 ffdffff0F0f4&f`00`6 Lb`(`l |~~||~< <p<:::$fpb|<><0ffbf<|>0<<f>~0:::~` 2 ||l`8]~~>B|?B@B<|<|<|BBBD|<<@@@p 02>f f0f0f0f >f00fffD8 42<<bb22=>022fz<<"``f< ><88x~<$8B$$$~l>6~f>x|>~66f<<6@B~ 2$<DDf$o$|VV$~@0 ~LP(@@DD~FBB@B@@@BH@RBBBB BB$D D<|<>< >|pD|<|>x>|BBBB|@B<<<<<<<<<888B<~|H<<<BBBB< D<8B(*$$<|H<<<U"v   6f > 66ff l ff6<(vff08l~|HBJFNBBBQ""<  f 6f f 66v<6 l fvfD|blllf~fT~B~~D0ÃؑBT| ~~& $ d|DD~DBB@B@@BBH@FB@RHBB$ >B@B~ BBpBBBB@< BBB(@B~>>>>@~~~~~|~HBBBBBBBB@ B>BBBJ>< **$$>BRJH~~BzQ""n  f 6ff 666 l f ff`l0llfffT@B2PD|x$fop~8B $xJ @D DDD DD BBBB@@BBDD@BB@JDDB$B@ bB@B@ >BHBBbF@"B$$> DBB@BBBB@@@@BB@HBBBBB>BB< 8RBBBBF$ D_HBBbRHBBB f~6 f 6~>n<~~~4 ~ <ff`lfll|<>> B|DD|B<\:@|>|B| 0|<>>>>>><>>>>>>BB~~N<<<>><<~L>><>BB~~ ><|<~>BB< BB0  v|`l8B|<<`<<0`qZ8<8@||@ <<p`H<`Elegant<<~||||||||x|ll8808|8|~||`8~~|>||~<<|8pf f0f0f`f ?f00ffff 4444044f z~~f``f< ><0 8888x<$8<` (|l~l08f888 0<<|| |@||~|0~~l>6~f>x|>~66f<<6pf~2l|ll f$o< 66ff l ff6<8vff08l~f>|66<`~~~ff|ffffffff`0f888`x88 ~0`||x| ~8~~<<~>|~bff<0f0~fffn><`0 6l~ffffff f~6 f 6~>n<~~~4 ~ ~~|x|v||0|~~~~8~<~|~|~8lp~><>>>><<<<<><>~|`><<>fff0 ><<<~~~f 0  v|`l8f~~~p0<~`qT88pp|x|8|`<<<@@ff< ~~p`H<`Squat font8@<`22`|||||||| (|````ff >``ff22``220zzf[f`|880 |x8::x ff>fl`f<<~ ~~<<<8<<>~><<>~`xp 80|~8~~~n<8>>|`l|00x<88@@@(ff~fl 0f~~~ ~<~~~~|~~~~>~~~~`x88 80~fffffff~ffff8f<LL LL~Ufv|~~8~n<>~n6~n>~~8~>~n6<~~l ~pD|xH<<$,4p@pf`l88<~8~~~|~f~~pf~~~~>~~~~`x880f<<~ 6ff>f6ff2fbfb`~|f0||~8>l|H0ff$g< @@ |@.f` 8< f8f ``f~f8~8ffffnff`fl`vfffffff~ff0l <|<><>|8~~0bff<<<<<<<<<888~~`v<<~&&<  f ff 6 6f6f6fvf`~08fB~8|88H0$<@8 ::~x9ff|p~~ f8 <|` <~p ffff```f|`vffffpff<~0l>~~~~<~~8>>>|~~~888ff`~~~ffffff0~f>8~f~ff,,>~n~fffʢff<  f fff 6v>f6v><f`lfB<~p~@H`H8<|||||||8ff>p~~n <~| <> ~|`f||o~x`~ffff8ff<~~~~<~~8<~~~~~<`ff`fffff|ffffffff`0<|~fffv>f6fnffffʢff<  f fff 6v6f6vf8|` f0~f~~8~Hx0gffffff xfffffpff>>>`fff~~|{ffffffff`f>fff~~f002ll>fvn~~fzffn 6 f fff 66f6f8f`( f0BlB~8>$$,4<y~6<0f ~ff8~8ffff``ffflf~f|f|f~<p ~f`f~ff |ffff`<f~f88f`f~~~~~`~~~~~`fffffffff0~f~fff~ff0~~nf6~fv~~~f ffn 6 f ff0n 6~6f60n|~~~6>lf`(0f0ff~`@~~~~~~~<~<<~x~~<~< ~~~~~<~~0ff`ffff````ff`fffff~ff<0|fffff~~f`6fffffff fb~6 ff~<0n||~~~6>Lb|`(`l |~~||~< <<|pa:::~ 0`~<~~ ~~8~<~~~~~~|~<~<~x~~<>~0~~~~~~~~~~~<<~~l~<~~ff><~` 2~~~~ff~ ||0ll`8]~<<<|~>>>>>>>>><<><<`p><<>ff<`?><~ff< 08`>~~~p<< <00~|~ ~@`~~<|0@|T |8|88|8xPlaybill8@f<ff`22`|||||||| (|p||||||||||>||\|<|~p````ff >``ff22``220zzf[f`|880 |x8::x ff>fl f::<8\:Z|b~` p`` `80< <06|~8~~~n<8>>|`l|00x<88<@@@(ff~flf~|`bb<`88`` `0~ffffff4~ffff~n6~n>~~8~>~n6<~~l ~pD|xH<$,4fp@pf`l8<~pf`bb`8```0ffb<~fvb<0ff<<##f<<<ʂQfv  ff > 6ff>f6ff2fbfb`~|f0||~8>l|H0f$g< @@ |@.f` 8< 8~8f`bƂ4 0l ```0bf<<<<<<<<888b~`v<~&&<  f ff 6 6f6f6fvf`~08fB~8|88H0$<@8 ::~x9ff|p~~ ::p ں\֊Z4 0lxl<6<~l8 b4\<|>\<~bbjbb~88`b~>x>>|~~~888bf`~<~fffbbf0~f>8~f~ff,,>~n~fffʢff<  f fff 6v>f6v><f`lfB<~p~@H`H8<|||||||8ff>p@~~||||||| ||@D>d^|p@L<|||@vfnf6v d~vfffvfbbjbbL<`bf`fffbf|ffffffbb`0<|~fffv>f6fnffffʢff<  f fff 6v6f6vf8|` f0~f~~8~Hx0g>>`fffb~|{fbffffbb`f>fff~~f002ll>fvn~~fzffn 6 f fff 66f6f8f`( f0BlB~8>$,4򒌁<y~6<08~8``40 tb`Ffbb pjbbbF`0bbjb88f`b~~t~~`~~~~~`fbffffbbf0~f~fff~ff0~~nf6~fv~~~f ffn 6 f ff0n 6~6f60n|~~~6>lf`(0f0ff~`@Lb|`(`l |~~||~< <|p<a:::~ `:::~ƺ\Ƽƺ`z8b< vfnfb djbfff`ff~b:20~f~~~~~~~~<<vbl~<~~ff><~` 2~~~~ff~ ||0ll`8]||| ||8\b~pvl<6<`< :4b~0<:>>v>>>>>><<><<`p><<>ff<`?><~ff< 08`>~~~p <00fL`b ~@`~~<|0@|T <8`<88|8x<>w~ |>>>c>>>>>xffbp488$~<~48`8l,hnn,fb`cc4l4l<0 8x<$8c<`cc``cc` (f>f28ff8bbd` fb 0B< ffl``fff`wsffffbfccvf @x0 ffl``fff`wsffffbfccvf 00<fff0xfff f6XL<<6l3f|~XX`>6~fx|~n<<~l>6~f|x|>~6f63<<pf~26>6l f$oI~I< cc``cc 66ff l ff6<;f38f~`f~ 0L68c|<l >>>>>>>`(4(~~f dtt 4.0 nfl`fll`nh`ccflfl4fcc$06fl`fll`nh`ccflfl4fcc$l`f<<<<`f~|6633<  f|j66r< f6f f 66vn|16 lff~fnTk~f~~60 ÃIyI~o c`cc~~f0o<0v dffnrf`f``nfl`cof`flf6w,0crf`f``nfl`cof`flf6w,000ff~>`~~~ff|ffffffff0|f0fffvff0` +nl633n  <ff0<`` 6l{{f~6 fff~~h f6~<n<~~~h ~ gw 8x y>>>>>>><<9f|Fp@,~<<,0480`>l,hn`,f4bncc,`&f<$cf~xl,hn`,f4bncc,`&f<$cf~><>>>><<8<<><> ~|0><<>fff` ~~f ~``  Af;|068>f~~~p0<~0qT808| @``<<<ff< ~~p`|$<`<<~||||||||x`pf f0f0f`f ?f00ffff 4444044f z~~f``f< ><0 8888x<$8<` (ff>f6pf~8~~`~|~~~ 0~~~~~|~~~f~f`cf~~~~|~ffcff~@x```8`<fff0xff:f60XX<<6lXX<XX[ff|~|~n<>~l>6~f>x|>~66f<<6pf~2l|ll f$o<`|~~``g~~~~~~~ffcff~f<<<~~f 66ff l ff6<8vff08l~f~8nfffff`ffc~f 0 4`f<<<<`f>|66<`~~~ff|ffffffff`0ff<0f0~fffn><`0 6l~ffffff f~6 f 6~>n<~~~4 ~ <>>>><<<<<><>~|`><<>fff0 ><<<~~~f 0  v|`l8f~~~p0<~`qT800~>`~8|`<<<@@ff< ~~p`H<`SquarefontFONTS ----- These GEM fonts are used by several of the programs on this disk. A1 fonts are 8*16, large size fonts. A2 fonts are 8*8, standard size. To take full advantage of these fonts, you should use the INCREDIBLE 'fontsel.acc' by Jeremy Hughes. This accessory is public domain and is available from ST CLUB and most good PD libraries. It is essential. It works with First Word+, GenST, Data Manager, Tempus, VIP and a host of other programs. The full FONTKIT+ program is available for a reasonable price from ST CLUB, Nottingham. Budgie UK --------- .  t..  tMULTI2 HRD t bMULTI2 I t MULTI2 RSCt MULTIFMTPRGt #_MULTI DOCt  ]FORM1 F1 FO FORM2 RAD3 E N RAD6  TR81  TR82  TR80  INF ST RAD1 YES NO RAD2 A B HELP  QU !VOL "F "FORM3 TH ALERT1 ALERT3 ALERT4 ALERT5 ALERT6 ALERT7 ALERT9 FORM1 EQU 0 F1 EQU 0 FO EQU 14 FORM2 EQU 1 RAD3 EQU 1 E EQU 4 N EQU 5 RAD6 EQU 8 TR81 EQU 9 TR82 EQU 10 TR80 EQU 11 INF EQU 13 ST EQU 20 RAD1 EQU 21 YES EQU 22 NO EQU 23 RAD2 EQU 24 A EQU 25 B EQU 26 HELP EQU 31 QU EQU 32 VOL EQU 33 F EQU 34 FORM3 EQU 2 TH EQU 4 ALERT1 EQU 0 ALERT3 EQU 1 ALERT4 EQU 2 ALERT5 EQU 3 ALERT6 EQU 4 ALERT7 EQU 5 ALERT9 EQU 6    $ ;FAST FORMAT:THIS FUNCTION WILL REFORMAT YOUR EXISTING DISCSIN SUCH A WAY AS TO SIGNIFICANTLY REDUCE THE LOADINGTIME. IT MUST ONLY BE USED ON DISCS THAT HAVE BEENALREADY FORMATTED NORMALLY (9 SECTORS PER TRACK)YOU CAN USE THE DISC INFO OPTION TO CHECK THIS!EXTENDED FORMAT:THIS WILL FORMAT YOUR DISC WITH 10 SECTORS PER TRACKNORMAL FORMAT:THIS WILL FORMAT DISC WITH THE STANDARD9 SECTORS PER TRACKEXITMULTI FORMATTER BY JAMES HOLMWOOD (c) 1989EXTENDED FORMAT: FAST LOAD FORMAT:Extd.NormalSELECT REQQIRED FUNCTION:NORMAL FORMAT:818280SELECT NUMBER OF TRACKS TO FORMATDISC INFO.MULTI-FORMATTER 1989 (c)NOTE.. IT IS A GOOD IDEA TO BACK-UPYOUR DISC BEFORE USING THE FAST FORMATTERSingle Sided:Select Drive:FormatYESNOABNow Formatting...Track: on side: HelpQuitabcdefghxyz Disc Title: ________.___fFastFormat Details....THANKYOUINFO[1][AN ERROR HAS OCCURRED WHILST|READING..SORRY BUT YOU WILL |HAVE TO ABORT][ABORT...][1][AN ERROR HAS OCCURRED WHILST|FORMATTING.....| |THIS MAY BE DUE TO THE|DISC BEING WRITE PROTECTED][RESTART|ABORT][1][AN ERROR HAS OCCURRED WHILST |WRITING DATA...SORRY BUT YOU|WILL HAVE TO ABORT][ OK ][2][ALL DONE...I HOPE!!| |YOUR ATARI SURPASSES ITSELF | YET AGAIN][EXIT][1][YOU HAVE SELECTED |EXTENDED FORMAT| |PROCEED IF YOU DON'T MIND|LOSING THE DATA][PROCEED|CANCEL][2][YOU HAVE SELECTED|FAST FORMAT...| |ARE YOU HAPPY TO|PROCEED WITH THIS OPTION][YES| NO ][1][YOU HAVE SELECTED|NORMAL FORMAT.....| |PROCEED IF YOU DON'T MIND|LOSING THE DATA][PROCEED|CANCEL]??U-$12 3cd0e5314506GHIjk!l(+,-;UVWfgq"$  * +,?QRS[\]gh s 0DE J D$'0&L$h$         B  ,-!G"  H d.4 "    h  k n @ !$    (! D! C- 9 489 ;=! G `  | .  @ i@ n? !$1 7&   %B       `Pf' &o.|Z2 + ЫЫ// Bg?<JNAO `p aO3RP#PfZpnaOf3ZX#PZp4aO`<3ZXpNaOQR83ZX3ZZphaOAZzCRH2222B9 3R<3R>3R@3 RB3O3O3O3O3PNu#Z\ByZ`3ZX3ZZpiaO3ZX3ZZ3Z\3Z^3Z`3RHZb3RJZd3RLZf3RNZhp3aNNuJ9R8g azQR8#RDZ3ZXpaNpoaNpaN/<LNAH#Zp6aNjLZz3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aN0@D2AE3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aM#Z3ZX3 ZZ3Z\3Z^3Z`3Zbp*aM3P3P3P3P#Z3ZXp2aMp63PLNuH89P:9P<9P>9P0@D2AE3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aL3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aL3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx&yZ69P0A (f LNu0A h 4(SB PgSBfBNu0A h PfNu0A4(Cg 0A Df 4(`Nu0A4(Cg0A( f4(`6NuQR9ByR:3R<3R>3R@3 RB3O3O3O3O3PH3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx&yZv!I av89Rav89R@av89RBavaXI v!ava3Rva3R@va3RBL69P| fa`,|fa:`| faPR9` a aJ9R9gNuaHa`3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx&yZHvH#Zp6aILZz3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aI0@D2AE#Z3ZX3 ZZ3Z\3Z^3Z`3Zbp*aIR#Z3ZXp2aI@60@D2AE3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aH0A (f LLNu3P09R>|f 3R`|f23R.<ACG|f09R??<NAX*</<?<NA\?</?<NNAP?<BgBg?<?9RBA $/?<NN09RR@?/< ?<6NAP3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx&yZHH#Zp6aGLZz3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aGV0@D2AE#Z3ZX3 ZZ3Z\3Z^3Z`3Zbp*aG3P"3P$3P&3P(/<?< NA\0<Ah/?< NA\/<?< NA\A $ <#a <  '<7 ( |P/ |"N _N/<?< NA\A $ <#a <  '<7 ( |P/ |"N _N/<9?< NA\A $ <SH,<F#3a <  '<7 ( |P/ |"N _N/<U?< NA\ <(<*<,<99890a "<  '<7 ( |P/ |"N _N/<q?< NA\2<A09R|g2<B??<NAX/<?< NA\ 9 "9 "9 #a/<?< NA\3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx&yZv#Z3ZXp2aDN689P":9P$<9P&>9P(0@D2AE3ZX3ZZ3Z\3Z^3Z`3Zb3Zd3Zf3Zhp3aC0A (f LLNuo.(|Rl# N 9 N ?< ?<NAX?< ?<NAXNu'N N dN N N Nu/0??<NAX H@Nu*.*UN_TITLED.DISCY(ADisc Title: Y*ANo. of sectors/track: Y+ANo. of sides: Y,ANo. of sectors: Y-ANo. of tracks: Y1DThe disc in Drive: Y3=has Y3Hbytes of useable space09R>|f 3R`|f 3R09R<|f<<3P`09R<|f <<3P09R@|"g(|f`3 `j3 3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx3ZX#ZZp4a>|fdNu3ZX3ZZ#pZ4#Z83Z<"<P0<NB09Zx3ZX#ZZp4a>:|fNu3ZXpNa>"ByBy09a< '<* ( |P/ |"N _N3Oa09O yOg yOg09RB| f3P`&| f3Q`| f3R09349SB3Ry09a< '<* ( |P/ |"N _N3Oa,09O yOg4 yOgB<9yf~aa8aaHaNuBgB09PT@?/<HyZ?<NNNu29P|g`09|Pg(|QgF`t09|Pg|Qg`69| g`v< <aa`b69| g<<a`D<*<aa`069| g<<a`<4<aaNu69| g<<a`v<@<a|a`b69| g<<aZ`D<T<aJaX`069| g<<a(`<h<aa&NuAZNuAZRHNuAZ Nu?<BgBg?<?9RBHyZ?< NNNu/<?< NA\?9/p0`< g&p0`< gpp09R??<NAX?</<,?<PR_COL"PR_LOC%PUSHONRADIO1RADIO2RADIO3RADIO6 RECORDORESULTTSETTRKSTPOS1STPOS2STPOS3STPOS49STPOS5USTPOS6qSTPOS7STPOS8TEN80DTEN81DTEN82DVIRGINVOLPUTWRBOOT0ADDR_INNBINLOOPJCHECKEDCONTROLERRMARKOFORMBUFZFORMERR(GETDRVEINT_OUT@MYSTACKPUTBACKREADERRRESTARTSAVDATASCREENHSCREENWSCREENXSCREENYSETDESKSPARESPSPSPACE$ADDR_OUTVCALL_AESP*DECIMAL2 DESKFLAGFINDTYPEFINISHEDMENU_PTR SETDRIVEDTEMPBUFF $WRITEERRPRINTLINSPAREROOgaA C DE 09""|f By""9 y8f&#(3(6B38y" y6f 3(6 9Bg9Cf9BCB7609$"|f By$"9 Dy:f#,D3:y$ 9Dg9Ef9DE D-,9-09&"|f By&"9 yNuKaH瀀A<|<kL` N=A=|`|8:C><@QAN. |N.Hy?< NA\`OK READY TO WRITE Hy?< NA\` PRESS KEY N@ H`?<NAT@LN?AN. |N.Hy^?< NA\`remove disk ..... Hy?< NA\`SPACE for another disk H`?<NAT@LH@<9fN`AT/?< NA\><yBy"@a$Q><yBy@aQNu<<NqNqQNu BUDGIE UK VIRUS FREE ! All Circuits Operational.... ------------------------------ ATARI ST The software Guardian (HaJ@kba#~9Pfa LaJ@kaa8NuNHy?< NA\` E R R O R 3"@Nu |N.HyNAXJ@kNufile not found ahJ@ka?a0J@k0NuHy?< NA\`ERROR. creating file.. NuHy?< NA\`write error Nu?</?<NAXNu/?<INA\JkNu/?<INA\JkNuH?<%NNTLNu |0<Q |/?< NA\ |0NuH/?< NA\LNuY ?<?<NNXNuHBg?<NNLNu"h$hBi3| Nu Nu?<NAT@Nu?<?<NAXNuB9JgNuH/<?< NA\B?< NA\#L??NuH/9?< NA\L??Nu?<NNTNua aaD#p^ |~ap9gad3D3Fa?<?<?<#NN\?<?<LNABg/9?91NAwwU33ss77wH< J@j<-D@2<H H@0H@QLNugg"< A,>< QH@@0 @9o^@B@H@fNu/0<J@WJEW NuHp?<NNTLNu?<?<?<NM\?<"NNT @CZ"C NuHCLhLNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu?<?<?<NM\?<"NNT @C"C NuHCB@(HiJijBi i.k3|.B@(HiJijBi ik3|LNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu<K"yN$yN20$QƕQ$yN0"QQNuHA@0P= Ppk0"<QQLNuHA@/0"<Q0w"<QQ LNuH/?<NN\LNuL@HIL H@A aa <"N> yN <}N>Nn/A@"|@<<2Q,H`?<NAT@LNuFy@Nu?<NNTNuBg/9p/9p?<NNO Nu?</9p/9p?<NNO NuH/?< NN\LNu6<(H"H2$H4aQNuAnNuB242442 NuH yVJg ` L?NuH yVg ` L?Nu?< NATJ@g?<NAT`Nu?< NATNua"|04<6<"yNaNuH8<CKC"yt$yx02"$QQLNuy!`fvTy!`6:rJy!^gbz`3!bg CfBy!^xAIC@02A4B@AB@B@ApBAB2QNu/@@F#h!#h@@F Nu/@@F#!h@@F Nua #p!#!paNuJyf!3NHL"SA@C"T0<2Q |"ta |"t&|"R&<"a |"t&y|&<}aaL??NuAPIC.PI10<:NF8<FG:L 2H@AF@B2HA2ÑÑQQNu |# N.a 9ffgAN <> yI NVNnNugive it a name (***.pic) ><GFy@H<<*9ffgQL`Fy@H<<*9ffgQL`QBII/H~ 9I"< a> < g g |0` |0` |0L~<  <  H/ |N. _N.H`?<NAT@L _H@<afLNu??<NNXNu??<NNXNu/ <"N> |'N.H`?<NAT@LH@<pg< g <!g'` ' yN <}N>Nn/A@"|@<<2Q,.<} yI "yIB9'gJy'g`Ig,J9'gB9'IBy'`3'9'' 9}'f9'''F|I`X |# N.a" 9ffgAN |> <"NV |' <NV 9I yI NVNnNureference_byte BIBB yI9'gJgI`B(JgEQI`Nu&IE(V/>.G8. DL 2H@AF@4$$QQ A(V"K>.G<. Frtvxz2468:QYQYQYQYQ"T$T&T(T*TQ2<0XXX @YYYY""QNu yC ` yC$(yC0(R9@2,9Ar2,SA9Ar2,4SA9A9hP9h$9h&g )I`)hL)hHNu?//?<NN Nu/?<HNA\NuHp0r JBgSBfAQLNu yt "yDr09DjaNuH>#Dv?<L|H|L|H|4LHhA(SWfTLHLH,LHXL|Nu yt"yDr09DjaNuH>?<qL|H|L|H|4L|H|hL|H|ASWfTLHLH,LHXLHL|Nu $<*,* ""4" & "b8Rh0\*Lb>`~ v  X ) v  X )R " V    o 4  d VV 2     2    P  d <(@8   @x   VV   2              ȁ  F de      2 P   d 0   2 0  ( dP F ( dP F (      ,       @e[QG=3) ? a:\fonts\a1_fat.fona:\fonts\a2_elegant.fonbxbxbxbxb "8 2,0  @ <@ $&@       44$$H&(B$$$~F L,4 ,0F* RJ^        zb* X""   | *   ,  6        ",<48,>>JH>|  X** August 1989 **** Guardian *------------------------------------------** bra.s start include "a:\includes\macros.s even start startup jsr superin go supervisor jsr phys_base get physbase move.l d0,physbase used by exit routine sub.l #512,d0 and.w #%1111101100000000,d0 move.l d0,$45e initial screen IMPORTANT sub.l #33280,d0 boundary is ok move.l d0,lady_screen top_screen minus 32K *------------------------------------------------------- DC.W $A000 initialize A-line move.l a0,a_line_start move.l (a1)+,d0 6*6 font move.l (a1)+,fontaddress_8 move.l (a1),fontaddress_16 dc.w $a000 hide_mouse btst #7,$fffa01 mfp monochrome detect beq hide mode 0 hide cursor 0 bclr #0,$484 no keyclick bclr #1,$484 no repeat key move.l #dtaddress,-(sp) address of 44-byte DTA buffer move.w #$1a,-(sp) set DTA address trap #1 addq.l #6,sp * TRAP CALL TO OBTAIN CURRENT KEY SETTINGS: move.w #-1,-(sp) read current k/b status move.w #-1,-(sp) move.w #35,-(sp) trap #14 addq.l #6,sp move.w d0,d1 and store it away: move.w d0,d2 we'll modify it when key scrolling... lsr #8,d1 ...is needed and.w #%0000000011111111,d1 and.w #%0000000011111111,d2 move.w d1,k_delay normally 15 move.w d2,k_repeat normally 2 start_prog load a1_font,a1_ptr font 16 pixels load a2_font,a2_ptr font 8 pixels * now install the various v/blank routines if any lea music,a5 bsr enable_vbi * THIS ROUTINE IS FOR VIRUS CHECK cls font 16 ink 15 move.w #$070,$ff825c move.w #$070,$ff825e printat 15,0,0,#mess1 getkey cls font 8 move.w #$070,$ff825c move.w #$007,$ff825e ink 15 printat 15,0,0,#mess2 getkey cls printat 15,0,0,#mess3 getkey cls font 16 home string string < 15 characters max> jsr getlin move.l #budg+15,a1 move.w #14,d0 .lop move.b #32,(a1)+ blank dbra d0,.lop move.l #keybuff+2,a0 move.l #budg+15,a1 move.w #14,d0 .loop move.b (a0)+,d1 copy input cmp.b #32,d1 bmi .out move.b d1,(a1)+ dbra d0,.loop .out boot cls font 16 ink 15 printat 15,6,0,#mess5 getkey cls bra create_boot_uk *-----------------------------------------------------------* mess1 dc.b " THE BUDGIE UK",10,10,13 dc.b " VIRUS GUARDIAN",10,13,0 mess2 dc.b "This is a small program used on all",10,13 dc.b "the latest BUDGIE UK games",10,13 dc.b "which acts as an anti- virus",10,13 dc.b "Early Warning System.",10,10,13 dc.b " A small friendly piece of code",10,13 dc.b "will be written on your boot sector.",10,13 dc.b "It will produce a greeting flash",10,13 dc.b "each time you boot your disk.",10,13 dc.b "Should the greeting fail to appear,",10,13 dc.b "an uninvited virus is present!",10,13 dc.b " Simply re-run this program",10,13 dc.b "and the virus will be erased.",10,13,0 mess3 dc.b "It uses the leap-frog theory:",10,13 dc.b "the last code to write itself on",10,13 dc.b "is always the active one.",10,13 dc.b " Keeping the write protect on is",10,13 dc.b "of course very useful. But some",10,13 dc.b "games (including Budgie's) save",10,13 dc.b "high scores to disks.",10,10,13 dc.b " Finally, do NOT use this program on",10,13 dc.b "a commercial disk that uses its boot",10,13 dc.b "sector. If a commercial disk auto-boots",10,13 dc.b "without having an AUTO folder, then",10,13 dc.b "it uses the boot sector: leave it alone",10,13,0 mess4 mess5 dc.b "Insert Disk",10,13 dc.b "to be protected",10,13,0 *~~~~~~~~~~~~~~~~NOW THE SUBROUTINES~~~~~~~~~~~~~~~~~~~~~~~* * vbi music system Gary Wheaton Q EQU 1 *OCTAVES Z EQU 4 U EQU 2 SL EQU $FF8800 SD EQU $FF8802 *-------FLAG FOR MUSIC ON OR OFF move.b #1,musicon *-------TO SILENCE CHANNELS : sound silence (macro) music movem.l d0-d7/a0-a6,-(sp) tst.b musicon bne bypass MOVE.B #$7,SL MOVE.B #%11111000,SD CMP.B #1,FL BEQ.S PPP BSR SSET PPP ************** LEA _NOTE0,A0 LEA _NOTE1,A1 LEA _NOTE2,A2 CHAN0 ************** MOVE PNT0,D0 ADD D0,A0 MOVE.L (A0),D1 *GET NOTE 0 & DURATION CMP #$FFFF,D1 BNE.S CON2 CLR PNT0 *RESET TO START MOVE.L _NOTE0,D1 CON2 SUB #1,NP0 BNE.S STILLON MOVE.L D1,TMP0 *D1.W IS DURATION MOVE TMP0,TMP00 MOVE.B #15,VOL0 MOVE D1,NP0 *SET NEW DURATION ADD #4,PNT0 *& INC POINTER STILLON ***VOLUME CMP #0,TMP00 BNE.S RFF MOVE TMP0,TMP00 RFF *LSR #1,TMP00 *LSR #1,TMP00 CMP.B #0,VOL0 BEQ.S NV0 SUB.B #1,VOL0+1 BNE.S NV0 SUB.B #1,VOL0 MOVE.B #5,VOL0+1 NV0 MOVE.B #8,SL MOVE.B VOL0,SD MOVE.B #0,SL MOVE.B TMP00+1,SD MOVE.B #1,SL MOVE.B TMP00,SD CHAN1 *********************** MOVE PNT1,D0 ADD D0,A1 MOVE.L (A1),D1 *GET NOTE 1 & DURATION CMP #$FFFF,D1 BNE.S BON3 CLR PNT1 *RESET TO START MOVE.L _NOTE1,D1 BON3 SUB #1,NP1 BNE.S STILL MOVE.L D1,TMP1 *D1.W IS DURATION MOVE.B #14,VOL1 MOVE D1,NP1 *SET NEW DURATION ADD #4,PNT1 *& INC POINTER STILL ***VOLUME CMP.B #0,VOL1 BEQ.S NV1 SUB.B #1,VOL1+1 BNE.S NV1 SUB.B #1,VOL1 MOVE.B #3,VOL1+1 NV1 MOVE.B #9,SL MOVE.B VOL1,SD MOVE.B #2,SL MOVE.B TMP1+1,SD MOVE.B #3,SL MOVE.B TMP1,SD MOVE.B #6,SL MOVE.B TMP1+1,D0 LSR.B #1,D0 MOVE.B D0,SD CHAN2 *********************** MOVE PNT2,D0 ADD D0,A2 MOVE.L (A2),D1 *GET NOTE 1 & DURATION CMP #$FFFF,D1 BNE.S CON3 CLR PNT2 *RESET TO START MOVE.L _NOTE2,D1 CON3 SUB #1,NP2 BNE.S STI MOVE.L D1,TMP2 *D1.W IS DURATION MOVE.B #15,VOL2 MOVE D1,NP2 *SET NEW DURATION ADD #4,PNT2 *& INC POINTER STI ***VOLUME CMP.B #0,VOL2 BEQ.S NNN SUB.B #1,VOL2+1 BNE.S NNN SUB.B #1,VOL2 MOVE.B #11,VOL2+1 NNN MOVE VIB2+2,D0 ADD D0,VIB2 CMP #2,VIB2 BNE.S DD NEG VIB2+2 DD CMP #-2,VIB2 BNE.S NV NEG VIB2+2 NV MOVE TMP2,TMP22 MOVE VIB2,D0 ADD D0,TMP22 MOVE.B #10,SL MOVE.B VOL2,SD MOVE.B #4,SL MOVE.B TMP22+1,SD MOVE.B #5,SL MOVE.B TMP22,SD CD BYPASS movem.l (sp)+,d0-d7/a0-a6 rts killer jmp 0 SSV DC.L 0 **************DATAS*************** ***NOTE 1ST WORD. DURATION 2ND WORD *START DATA WITH--0,1 *END DATA WITH-$FFFF,$FFFF,0 _NOTE0 *lead tune DC.W 0,1,108*Z,12,108*Z,6,108*Z,6,108*Z,12,108*Z,6,108*Z,6,108*Z,12 DC.W 162*Z,12,128*Z,12,108*Z,12 DC.W 121*Z,12,121*Z,6,121*Z,6,121*Z,12,121*Z,6,121*Z,6,121*Z,12 DC.W 182*Z,12,144*Z,12,121*Z,12 DC.W 108*Z,12,108*Z,6,108*Z,6,108*Z,12,108*Z,6,108*Z,6,108*Z,12 DC.W 96*Z,12,91*Z,12,81*Z,12,91*Z,12,108*Z,12,121*Z,12,144*Z,12,162*Z,24,162*Z,24 ******** DC.W 108*Z,24,108*Z,18,108*Z,6,108*Z,12 DC.W 162*Z,12,128*Z,12,108*Z,12 DC.W 121*Z,24,121*Z,18,121*Z,6,121*Z,12 DC.W 182*Z,12,144*Z,12,121*Z,12 DC.W 108*Z,24,108*Z,18,108*Z,6,108*Z,12 DC.W 96*Z,12,91*Z,12,81*Z,12,91*Z,12,108*Z,12,121*Z,12,144*Z,12,162*Z,24,162*Z,24 DC.W $FFFF,$FFFF,0 *FLAG END _NOTE2 DC.W 0,1,108*8,12,108*16,12,162*8,24 DC.W 108*8,24,162*8,24 DC.W 121*8,12,121*16,12,182*8,24 DC.W 121*8,24,182*8,24 DC.W 108*8,12,108*16,12,162*8,24 DC.W 108*8,12,108*8,12,162*8,24 DC.W 121*8,12,121*8,12,182*8,24,162*8,24,162*8,24 *********** DC.W 108*8,12,108*16,12,162*8,24 DC.W 108*8,24,162*8,24 DC.W 121*8,12,121*16,12,182*8,24 DC.W 121*8,24,182*8,24 DC.W 108*8,12,108*16,12,162*8,24 DC.W 108*8,24,162*8,24 DC.W 121*8,12,81*8,12,182*8,12,121*8,12,162*8,24,162*8,24 DC.W $FFFF,$FFFF,0 _NOTE1 DC.W 0,1 DC.W 108*Q,12,96*Q,12,108*Q,12,114*Q,12,108*Q,48 DC.W 121*Q,12,108*Q,12,121*Q,12,128*Q,12,121*Q,48 DC.W 108*Q,12,96*Q,12,108*Q,12,114*Q,12,108*Q,48 DC.W 121*Q,12,144*Q,12,162*Q,12,182*Q,12,162*Q,24,162*Q,24 ************ DC.W 108*U,12,96*U,12,108*U,12,114*U,12,108*U,48 DC.W 121*U,12,108*U,12,121*U,12,128*U,12,121*U,48 DC.W 108*U,12,96*U,12,108*U,12,114*U,12,108*U,48 DC.W 121*U,12,144*U,12,162*U,12,182*U,12,162*U,12,217*U,12,162*U,24 DC.W $FFFF,$FFFF,0 *------------....here SSET MOVE _NOTE0+2,NP0 MOVE _NOTE1+2,NP1 MOVE _NOTE2+2,NP2 MOVE.B #1,FL RTS ***POINTERS TO NOTES MUST INC BY 4 PNT0 DC.W 0 PNT1 DC.W 0 PNT2 DC.W 0 ***TEMP REG TMP0 DC.L 0 TMP1 DC.L 0 TMP2 DC.L 0 TMP22 DC.W 0 TMP00 DC.W 0 ***NOTE IN PROGRESS NP0 DC.W 0 NP1 DC.W 0 NP2 DC.W 0 FL DC.B 0 *SE DC.B 0 *GL DC.B 2,0 VOL0 DC.B 15,3 VOL1 DC.B 15,4 VOL2 DC.B 15,2 MUSICON DC.B 0,0 VIB2 DC.W 0,1 *--------------------------------------------- kwit kwi1 lea music,a5 bsr disable_vbi disable the above v/blk routine silence bra quit restore the palette and official quit *--------------------------------- create_boot_uk jsr read_sector read boot sector lea read_buffer,a0 this buffer is 512 bytes long move.b #$60,0(a0) "bra $3a bytes.. move.b #$38,1(a0) ..further away" add.w #$3a,a0 put code here lea new_buffer,a1 move.w #320,d7 loop .lll move.b (a1)+,(a0)+ transfer to official buffer dbra d7,.lll ink 15 STRING STRING jsr boot_sector prepare executionable sector getkey jsr write_sector and write it to disk ink 5 string string getkey swap d0 cmp.b #$39,d0 bne .exit jmp boot .exit bra kwit *---------------------- new_buffer lea budg(pc),a0 move.l a0,-(sp) move.w #9,-(sp) trap #1 addq.l #6,sp move.w #200,d7 .lpp addi.w #$111,$ff8242 subi.w #$222,$ff8240 bsr .slow dbra d7,.lpp move.w #230,d7 .lpl subi.w #$111,$ff8242 addi.w #$111,$ff8240 bsr .slow dbra d7,.lpl rts .slow move.w #1000,d6 .lps nop nop dbra d6,.lps rts budg dc.b 7,10,10,10 dc.b " ",10,13 dc.b " BUDGIE UK VIRUS FREE !",10,10,13 dc.b " All Circuits Operational....",10,10,13 dc.b " ------------------------------",10,10,10,10,10,10,13 dc.b " ATARI ST The software Guardian",10,10,13,7,0 ds.b 500 *~~~~~~~~~~~~~~~~~~~~~~~INCLUDES~~~~~~~~~~~~~~~~~~~~~~~~~~~* EVEN INCLUDE "a:\includes\include1.s" EVEN INCLUDE "a:\includes\include2.s" EVEN INCLUDE "a:\includes\include3.s" EVEN INCLUDE "a:\includes\include4.s" even INCLUDE "a:\includes\sounds.s" EVEN *~~~~~~~~~~~~~~~~~VARIABLES AND CONSTANTS~~~~~~~~~~~~~~~~~* k_repeat dc.w 0 normally 2 k_delay dc.w 0 normally 15 a1_font DC.B "a:\fonts\a1_fat.fon",0 a2_font DC.B "a:\fonts\a2_elegant.fon",0 prompt dc.b "bxbxbxbxb",10,13,0 even a1_ptr DC.L 1 16*8 font a2_ptr DC.L 1 8*8 font ;physbase dc.l 0 screen_0 dc.l 0 screen_1 dc.l 0 screen_2 dc.l 0 screen_3 dc.l 0 lady_screen DC.L 0 storel dc.l 0 store dc.w 0 utility_screen DC.L 0 current_screen dc.l 0 ;save_screen dc.l 0 old screen to protect ; EVEN dtaddress ds.w 52 needed for disk routines palet DS.W 16 start up palette sbuff DS.L 1 this address is the last one on the prog high_scores dc.l 0 EVEN *~~~~~~~~~~~~~~~~~~~THE STACK~~~~~~~~~~~~~~~~~~~~~~~~~~* DS.L 256 about 64 used on average stack DC.L 0 *~~~~~~~THE END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GUARDIAN.PRG ----------- This is a small program used on all the latest BUDGIE UK games which acts as an anti - virus Early Warning System. A small friendly piece of code will be written on your boot sector. It will produce a greeting flash each time you boot your disk. Should the greeting FAIL to appear, an uninvited virus is present! Simply re-run this program and the virus will be erased. It uses the leap-frog theory: the last code to write itself on disk is always the active one. Keeping the write protect on is of course very useful. But some games (including Budgie's) save high scores to disks. In fact, at Budgie, the principle is: WRITE-PROTECT disks you seldom use, but DON'T write-protect the regular ones! If a virus is lurking around, we'll soon catch it when the Guardian fails to greet... GUARDIAN II (February 1990) -------------------------- This version will display the greetings in MEDIUM RES and leave your computer in MEDIUM RES. It protects your disk and SOLVES the STE bug at the same time. No AUTO folder needed! Finally, do NOT use this program on a commercial disk that uses its boot sector. If a commercial disk auto-boots without having an AUTO folder, then it uses the boot sector: leave it alone Music by the Shapeshifters. Code by Camy Maertens Budgie UK licenceware February 1990 ------------------------------------- . . t4.. . tHAPPY2 ACC/t 52HAPPY2 TOS3t <]HAPPY DOC6t >`f.|raaBa|49 ff` y fa` y(fa`34j3l3n3p3r3# 0<"<RNB34j3l3n3p3r3# 0<"<RNB09 |g |gbNp34j3l3n3p3r3#X 0<"<RNB09 |gNpNA(<`gN34j3l3n3p3r3#S 0<"<RNBNA(:<3fZ(A<ZfN34j3l3n3p3r3# 0<"<RNBN34j3l3n3p3r3# 0<"<RNBNNA|`|8:C0<QNN|fN34j3l3n3p3r3# 0<"<RNBNu3 j3l3n3p3r"<R0<NB3 3Mj3l3n#p0<"<RNB3 Na 0<"<RNB<9 |gT3PNu&< *|:Q3Nu3l3n3 p3-r3NvNuBNA[1][ |The HappyFace Virus Protector|Version 2.1 by R.Edwards|The multicolour version.][ OK ][1][Disk Error-|Can't write bootsector to|disk. Is the disk write|protected?][Try Again|Don't bother][3][ |Insert the disk to be|protected into drive A][ OK |Cancel|Check][1][ |Bootsector written to|disk okay.|Thanks for using HappyFace][Bye Bye][1][ |This disk is does not|have an executable|program on it's|bootsector][ OK ][1][ |This disk has HappyFace|on it's bootsector.][ Good ][1][ |This disk has an executable|program on it's bootsector|which is not happyface][ Oh? ] HappyFace 2.1j~ j ?<?<?<?<?<B/<?<NNNu?<?<?<?<?<B/<?< NNNu?<?> see MACROS << * IN filename in A0(L) * file_ptr in A6(L) * and possibly a direct load address in A3(L) * in which case set 'load_address' to 1 * OUT handle is D0 (L) * save any important register before calling. * virtuall ALL disk operations use macros! See macro list. * 'load' macro uses bload * 'read' macro on the other hand, uses routines further on * see degas_load routine further on as an example.. * Full example in Budgie shell.s * * * * * * * * EXAMPLES * * * * * * * * * * * * * * * * * * bset #0,load_address flag: precise load address * move.l #jenny,a0 file name on disk * move.l lady_screen,a3 where to load it in memory * sub.l #34,a3 deduct palette and res * bsr bload * bclr #0,load_address all done: clear bit zero * >>>>> ANOTHER better EXAMPLE using macros <<<<<<<<<<<<<<< * reserve 32034 * move.l d0,lady_screen save start address given by gem * open jenny file name * read my_palette,34 read 34 bytes in palette loc * read lady_screen,32000 read 32000 at this address * close * lady_screen dc.l 0 * jenny dc.b "jenny.pi1",0 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * whatever follows is now purely irrelevant. * Anyone trying to work out what it does would struggle * So would we. bload move.l a0,a4 save that name bsr get_size tst.w d0 bmi getsize_error can't find this file:exit bsr dta size returned in d3 move.l d3,file_size added 10/89 btst #0,load_address if set: load at specified address bne bl_1 and no need to reserve memory bsr mmalloc reserve memory bl_1 move.l a4,a0 get that name again bsr f_open_read open file tst.w d0 bmi open_error if negative:error. Exit bsr f_read read that block. If error, Close bsr f_close close file in any case bl_exit rts er_exit bset #0,loaderror string < E R R O R > move.w #$222,$ff8240 rts getsize_error home string move.w #$700,$ff8240 getkey rts exit bload open_error home string move.w #$070,$ff8240 rts exit bload read_error string home move.w #$007,$ff8240 getkey rts close_error string home move.w #$077,$ff8240 getkey rts gemdos_error home string getkey rts * GET SIZE of a file * in A0 address of filename (L) * out D3 size of file (L) * D0 error channel (W) get_size CLR.W -(SP) check for file and get size MOVE.L A0,-(SP) filename MOVE.W #$4E,-(SP) TRAP #1 ADDQ.L #8,SP rts file_size dc.l 0 dta MOVE.W #$2F,-(SP) TRAP #1 get Data Transfer Address ADDQ.L #2,SP MOVE.L D0,A0 put addr of DTA into A0 MOVE.L 26(A0),D3 put file size into D3 MOVE.L #1,D0 26th byte of data RTS mmalloc MOVE.L d3,-(A7) # of bytes to allocate MOVE.W #$48,-(A7) TRAP #1 ADDQ.L #6,A7 TST.L D0 BEQ malloc_error BTST #0,D0 even address? BEQ storemmalloc ADDQ.L #1,D0 make pointer addr even storemmalloc MOVE.L D0,A3 store start address move.l d0,(a6) also in pointer RTS malloc_error string getkey rts *---------- * OPEN A FILE TO READ * A0 points to file name * out: handle/error returned in D0 then put in D2 f_open_read MOVE.W #0,-(SP) open file (#2 if read/write) MOVE.L A0,-(SP) filename MOVE.W #$3D,-(SP) TRAP #1 addq.l #8,SP MOVE.W D0,D2 MOVE.W D0,handle RTS * READ BLOCK sequentially from disk to memory buffer * D2 file handle A3 address of buffer to read to * D3 number of bytes to read f_read MOVE.L A3,-(SP) read a buffer full at A3 MOVE.L D3,-(SP) read D3 bytes MOVE.W handle,-(SP) handle MOVE.W #$3F,-(SP) TRAP #1 ADD.L #12,SP tst.l d0 test length (L) bmi read_error rts * CLOSE FILE with D2 handle f_close MOVE.W handle,-(SP) MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP tst.w d0 bmi close_error rts notfound DC.B "file not found",10,13,0 even handle DS.W 1 loaderror DC.W 0 load_address DC.W 0 * BSAVE (open, write, then close) * IN : A0 address of filename (L) A3 save from this address (L) * IN : D3 length (number of bytes) bsave BSR f_create TST.W D0 BMI erw_exit BSR f_write write it MOVE.W D0,-(SP) preserve file status BSR f_close MOVE.W (SP)+,D0 tst.w d0 bmi erw_er RTS erw_exit string rts erw_er string rts *------------ * CREATE a file to write * A0 points to file name * out: handle/error returned in D0 then put in D2 f_create MOVE.W #0,-(SP) MOVE.L A0,-(SP) filename MOVE.W #$3c,-(SP) 3c is actually create a file TRAP #1 ADD.L #8,SP MOVE.W D0,D2 move.w d0,handle bsr dta size returned in d3 added 10/89 move.l d3,file_size RTS *---------- * WRITE BLOCK to disk * D2 file handle A3 address of buffer * D3 number of bytes to write f_write MOVE.L A3,-(SP) buffer to write from MOVE.L D3,-(SP) number of bytes MOVE.W handle,-(SP) handle MOVE.W #$40,-(SP) TRAP #1 ADD.L #12,SP RTS * OPEN existing FILE to READ/WRITE * IN A0 address of filename * OUT D0 handle openfile open_file move.w #0,-(sp) 0=read 2=read/ write move.l a0,-(sp) file name move.w #$3d,-(sp) trap #1 addq.l #8,sp tst.w d0 added 11/89 bmi open_exit bsr dta size returned in d3 added 10/89 move.l d3,file_size open_exit rts * calling routine should check for a negative D0 (error) * (tst.w d0 bmi error) *---------- * ALLOCATE MEMORY * Expect file_ptr in A6 m_malloc MOVE.L F_SIZE(PC),-(A7) # of bytes to allocate MOVE.W #$48,-(A7) TRAP #1 ADDQ.L #6,A7 TST.L D0 BEQ GEMDOS_ERROR BTST #0,D0 even address? BEQ STOREM_MALLOC ADDQ.L #1,D0 make pointer addr even storem_malloc MOVE.L D0,(A6) store pointer address RTS f_size dc.l 0 *----------------------------------------------- readfile move.l a0,-(sp) ;used by read macro move.l d0,-(sp) move.w handle,-(sp) move.w #$3f,-(sp) trap #1 add.l #12,sp rts writefile move.l a0,-(sp) ;used by write macro move.l d0,-(sp) move.w handle,-(sp) move.w #$40,-(sp) trap #1 add.l #12,sp rts closefile move.w handle,-(sp) ;used by close macro move.w #$3e,-(sp) trap #1 addq.l #4,sp rts *------------ * final version * >>>>> ex:move.l welcome_ptr,a6: bsr mfree <<<<< * >>>>> use MACRO instead : mfree welcome_ptr <<<<< mfree MOVE.L a6,-(A7) MOVE.W #$49,-(A7) TRAP #1 ADDQ.L #6,A7 TST.L D0 BMI GEMDOS_ERROR RTS *----------- * EXPECTS FILE POINTER ADDRESS IN A6 * >>>>> ex:move.l #welcome_ptr,a6: bsr m_free <<<<< * still occasionally used 7/89 m_free MOVE.L (A6),-(A7) MOVE.W #$49,-(A7) TRAP #1 ADDQ.L #6,A7 TST.L D0 BMI GEMDOS_ERROR RTS *------------- * vertical sync * >>>>> use 'vsync' macro instead <<<<< vtsync MOVEM.L D0-D2/A0-A2,-(SP) MOVE.W #37,-(SP) TRAP #14 ADDQ.L #2,SP MOVEM.L (SP)+,D0-D2/A0-A2 RTS *---------- * INPUT returns result in a buffer pointed at by A0 * and length of input in D0 * prompt has to be printed separately * calling getlin gives a clean empty buffer for the string * calling getline lives the previous entry in (ideal for repeats) * >>> see examples in Final Lap and Speculator (enter name) <<<< getlin clearkeybuff move.l #keybuff+2,a0 move.w #15,d0 clkb move.b #0,(a0)+ dbra d0,clkb getline move.l #keybuff,A0 MOVE.L A0,-(SP) MOVE.B #20,(A0)+ 20max in 1st byte MOVE.B #0,(A0)+ blank 2nd byte MOVE.W #$A,-(SP) call gemdos TRAP #1 ADDQ.L #6,SP move.l #keybuff,A0 MOVE.B (A0),D0 ADD.W D0,A0 MOVE.W #0,(A0) RTS no problems so far * >>>>> to recall name: MOVE.L #keybuff+2,A0 BSR printline <<<<< keybuff DS.B 32 inbuff DS.B 32 *-------------------- * print a line of text * now superseded by macros: print, printat, string (all calling this routine) * in A0: address of string ending with a zero byte printline movem.l d0-d3/a0-a3,-(sp) move.l a0,-(sp) move.w #9,-(sp) trap #1 addq.l #6,sp movem.l (sp)+,d0-d3/a0-a3 rts cursor DC.B 27,"Y",32,32,0 EVEN * * * * * * * * EXAMPLE * * * * * * * * * * * * * * * * * * lea message,a0 * bsr printline * message dc.b "hello",13,10,0 * or using a macro : print message * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *----------------- cursoron MOVE.W #1,-(SP) MOVE.W #21,-(SP) TRAP #14 ADDQ.L #4,SP RTS *------------ cursoroff MOVEM.L D0-D3/A0-A3,-(SP) CLR.W -(SP) MOVE.W #21,-(SP) TRAP #14 MOVEM.L (SP)+,A0-A3/D0-D3 RTS *------------ mouseon DC.W $A000 initialize A line MOVE.L 4(A0),A1 get address of control array MOVE.L 8(A0),A2 get address of intin array CLR.W 2(A1) MOVE.W #1,6(A1) DC.W $A009 line A showmouse routine RTS *------------ mouseoff DC.W $A000 initialize A line DC.W $A00A RTS *------------ getkey move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 force upper case rts answer in D0. Swap D0 to get scan code * use 'getkey' macro instead *------------ * this one looks up the keyboard buffer but doesn't wait * same as INKEYS in Basic * Again, there is a macro to do this. rawconio move.w #$ff,-(sp) move.w #6,-(sp) trap #1 addq.l #4,sp rts *---------------------------------------------- * other possible way is to read the acia direct. * as soon as the acia has signalled the 68901 mfp that a key * has been detected, the resulting mfp interrupt should be acknowledged * tested 31/10/89 works with all interrupts off (move.w #$2700,sr) * see macro calle 'acia' get_acia .a clr.b d0 move.b $fffc02,d0 fffc02 k/board acia data.... tst.b d0 beq .a bclr #6,$fffa11 acknowledge key press interrupt rts * then cmpi.b #$01, d0 ... or whatever key is tested *---------- * As soon as all unnecessary memory has been given back * to Gem, we go supervisor. Ex: jsr superin superin movem.l d0-d5/a0-a5,-(sp) move.l #$1,-(sp) move.w #32,-(sp) trap #1 addq.l #6,sp clr.l -(sp) enter supervisor mode move.w #32,-(sp) trap #1 addq.l #6,sp move.l d0,savestk save old stack pointer movem.l (sp)+,d0-d5/a0-a5 rts savestk DS.L 1 *---------- * Next routine is activately automatically on exit from shell. * jsr kwit is the proper way to exit the shell superout movem.l d0-d5/a0-a5,-(sp) move.l savestk,-(sp) exit supervisor move.w #32,-(sp) trap #1 addq.l #6,sp movem.l (sp)+,d0-d5/a0-a5 rts *---------- ** get screen rez into D0 getrez move.w #4,-(sp) trap #14 addq.l #2,sp rts *---------- * this routine is for Budgie games only * the shell does a 'jsr kwit' which then comes here quith bsr rst_horizontal_blank if there was one quit bsr resmouse bsr clearbuf quits move.l physbase,$45e call this exit label if no.. move.l #atari_palette,A0 ..interrupts were used BSR setpal btst #7,$fffa01 monochrome ? beq qu2 bsr setmedrez qu2 move.w #$007,$ff8244 blue background move.w #$005,$ff8246 blue ink bset #1,$484 key repeat still supervisor bsr superout move.w #2,-(sp) default values move.w #15,-(sp) key repeat rate move.w #35,-(sp) trap #14 addq.l #6,sp move.w #0,-(sp) move.w #$4c,-(sp) trap #1 * to quit and stay resident : quit_stay clr.w -(sp) move.l proglength,-(sp) move.w $31,-(sp) trap #1 even atari_palette DC.W $777,$700,$007,$005,$007,$707,$77,$555,$333 DC.W $733,$373,$773,$337,$737,$377,$0 proglength dc.l 0 prog_start dc.l 0 *----------- * BINDEC binary to decimal ascii * enter with D0 as binary number * and A0 as address of 6-byte buffer for string * >>>>> examples in Speculator and Final Lap <<<<<<<<< * also in shell.s under k_star (reveal all registers) * there is now a macro called 'bindec' which will return * a given binary number (L) in A0 bindec movem.l d0-d1/a0,-(sp) MOVE.B #' ',D1 TST.W D0 BPL.S notneg MOVE.B #"-",D1 NEG.W D0 notneg MOVE.B D1,(A0)+ ADDA.L #4,A0 this figure previously 5 but some MOVE.W #4,D1 failure on display caused a change to 4... binloop EXT.L D0 DIVS #10,D0 SWAP D0 MOVE.B D0,-(A0) ADD.B #"0",(A0) SWAP D0 DBRA D1,binloop movem.l (sp)+,d0-d1/a0 RTS *---------- * PRINTN [ Janice Murray March 1989 ] * will print any L number in D0 (max 652000 approx) * in base specified in D1 (2-10-16) Default 10 (decimal) * the result is stored in a 20 byte-long string, starting from the end! * leading nulls will force gemdos $09 to home position * and only real digits towards the end of the string will be printed. * I have therefore substituted nulls with spaces * to recall: printat 11,12,0,num_buff+14 which will print on screen * at location 12-0 in ink 11 a number 6 digit long (20-14=6) * printat 11,12,0,num_buff+16 will only print the last 4 digits, and so on * ex: >>> move.l physbase,d0 move.l #16,d1 bsr printn <<<<< * ex >>>>> in shell.s (under k_star) <<<<< printn and.l #$ff,d1 cmp.l #16,d1 hex? beq .go cmp.l #2,d1 binary? beq .go move.l #10,d1 ok decimal .go lea num_buff(pc),a0 we'll put result her move.w #19,d7 clean up 20 byte- buffer .cl move.b #" ",(a0)+ spaces (originally clr.b) dbra d7,.cl .lp1 divu d1,d0 number is continuously divided by base right down to 1 swap d0 d0 low is remainder addi.w #"0",d0 make into digit cmpi.w #"9",d0 digit or letter? ble .ok addq.w #7,d0 letter! .ok move.b d0,-(a0) store character (staring from end) clr.w d0 swap d0 d0 low: quotient bne .lp1 another one? rts num_buff ds.b 20 20 digit buffer dc.b 0 end marker ds.l 6 safety even *----------- * time delay expects a figure in D5 ** * note: D5 is NOT saved. Save if necessary prior to calling delay move.l d0,-(sp) outer move.w #5000,D0 inner loops inner tst.w D0 dbeq D0,inner tst.w D5 dbeq D5,outer move.l (sp)+,d0 rts *------------ * gemdos random random movem.l d1-d3/a0-a3,-(sp) move.w #17,-(sp) answer in D0 (L) trap #14 addq.l #2,sp movem.l (sp)+,d1-d3/a0-a3 rts *---------- * Joysticks * [ ST World ] * call initjoy once to initialize * see full example in Budgie shell.s * there is now a macro (getjoy) that waits for a button press * and another one (joystick) that merely peeks the state of joystick initjoy MOVE.W #$14,-(SP) IKBDcommand to send joystick MOVE.W #4,-(SP) packages to IKBD MOVE.W #3,-(SP) TRAP #13 ADDQ.L #6,SP MOVE.W #34,-(SP) get address of IKBD vector table TRAP #14 ADDQ.L #2,SP MOVEA.L D0,A0 ADDA.L #24,A0 move to joy vector address in table LEA oldpack(PC),A1 MOVE.L (A0),(A1) save original packet handler address LEA joypacket(PC),A1 address of new packet handler MOVE.L A1,(A0) modify joystick vector to point RTS to our routine *---------- * Joystick packet handler (called by o/s) * joypacket MOVEM.L A0/A1,-(SP) A0 points to addr of joy data LEA joyport0(PC),A1 load addr of our new register MOVE.B 1(A0),(A1) move joystick data to our loc MOVE.B 2(A0),1(A1) and the same for port 1 MOVEM.L (SP)+,A0/A1 RTS * return to normal mouse control * resmouse MOVE.W #34,-(SP) address of IKBD vector table TRAP #14 ADDQ.L #2,SP MOVEA.L D0,A0 ADDA.L #24,A0 move to joy vector address in table (24) MOVE.L oldpack(PC),(A0) restore original pack hndler MOVE.W #128,-(SP) reset keyboard processor to MOVE.W #4,-(SP) power up state MOVE.W #3,-(SP) TRAP #13 ADDQ.L #6,SP MOVE.W #1,-(SP) MOVE.W #4,-(SP) and again MOVE.W #3,-(SP) TRAP #13 ADDQ.L #6,SP RTS oldpack DC.L 0 storage for old packet handler address joyport0 DC.B 0 joyport1 DC.B 0 *------------ * call initmous once ONLY to initialize * example in >>>>> MONEYSPINNER <<<<< initmous MOVE.W #$08,-(SP) IKBD command to send relative mouse MOVE.W #4,-(SP) packages from now on MOVE.W #3,-(SP) TRAP #13 ADDQ.L #6,SP MOVE.W #34,-(SP) get address of IKBD vector table TRAP #14 ADDQ.L #2,SP MOVEA.L D0,A0 ADDA.L #16,A0 mouse vector address in table LEA oldpak(PC),A1 MOVE.L (A0),(A1) save original packet handler address LEA mouspacket(PC),A1 address of new packet handler MOVE.L A1,(A0) modify vector to point RTS to our routine *---------- * Mouse packet handler (called by o/s) * * see MONEYSPINNER for details mouspacket movem.l a0/a1,-(sp) A0 points to addr of packet received lea mse_packet(pc),a1 A1 is where we store it clr d0 move.b (a0),(a1) header (buttons) move.b 1(a0),d0 x movement ext d0 make it a word (added nov 88) add.w d0,2(a1) new x position (lateral 0-320) tst.w 2(a1) below 0 ? bpl .m1 ok clr.w 2(a1) keep it at 0 .m1 cmp.w #302,2(a1) too large? off screen bmi .m2 no ok move.w #302,2(a1) hold it there .m2 clr d0 move.b 2(a0),d0 y movement ext d0 add.w d0,4(a1) new y position (vertical 0-200) tst.w 4(a1) below 0 ? bpl .m3 ok clr.w 4(a1) keep it at 0 .m3 cmp.w #186,4(a1) too large? off bottom? bmi .m4 no ok move.w #186,4(a1) hold it there .m4 movem.l (sp)+,a0/a1 rts * return to normal mouse control * resmous MOVE.W #34,-(SP) address of IKBD vector table TRAP #14 ADDQ.L #2,SP MOVEA.L D0,A0 ADDA.L #16,a0 mouse vector MOVE.L oldpak(PC),(A0) restore original pack hndler MOVE.W #128,-(SP) reset keyboard processor to MOVE.W #4,-(SP) power up state MOVE.W #3,-(SP) TRAP #13 ADDQ.L #6,SP and again MOVE.W #1,-(SP) data to write 128 and 1 = reset MOVE.W #4,-(SP) 4 is ikbd MOVE.W #3,-(SP) 3 is chr out TRAP #13 ADDQ.L #6,SP RTS oldpak DC.L 0 storage for old packet handler address mse_packet DC.B 0 button dc.b 0 empty byte (not used) dc.w 160 x 0 to 320 max dc.w 20 y 0 to 200 max dc.b 0,0,0,0,0,0 even *----------- * VERTICAL SCROLL [ Simon Rush ] May 20, 1987 * there is a macro to call it (called 'scroll') * see full example in shell.s under 'opening sequence' * this routine merely scrolls a block on itself. * for scenery scrolling, see the example inside shell.s * by pressing V * expects times in D2, width in D3, * left corner + margin in D4 and height in D5 * macro example in all budgie shells under 'opening sequence' * modified aug 89 (B is now L) ~~ much faster scrol move.w d3,d6 width lsr #2,d3 divide by 4 .scrol MOVE.L $44e,A1 origin ADD.W D4,A1 bottom left corner MOVE.L $44e,A2 destination add.l #160,A2 ADD.W D4,A2 bottom left MOVE.W D5,D1 height .a MOVE.W D3,D0 .lp MOVE.l (A1)+,(A2)+ DBRA D0,.lp loop SUB.L #164,A1 SUB.W D6,A1 SUB.L #164,A2 SUB.W D6,A2 DBRA D1,.a MOVE.L $44e,A2 adda.w #160,A2 ADD.W D4,A2 MOVE.W D3,D0 ADD.L #160,A1 .s MOVE.l (A2)+,(A1)+ DBRA D0,.s DBRA D2,.scrol RTS *------------ * increment palette color register 0 (border) [ Rik Haynes ] Jul 87 * expects a number in D3 (10000 = 2 seconds approx) * Again, we now have a macro, called 'flash' flashes movem.l d0-d3/a0,-(sp) lea $ff8240,a0 register address move.w #0,(a0) start with black fla1 ADD #61,(A0) increment contents CMP.W #$770,(A0) BMI fla2 MOVE.W #0,(A0) reset color fla2 MOVE.L #256,D1 fla3 DBRA D1,fla3 DBRA D3,fla1 movem.l (sp)+,d0-d3/a0 rts *------------ flashes_b movem.l d0-d3/a0,-(sp) lea $ff8240,a0 register address move.l (a0),-(sp) save original color fla00 move.w #0,(a0) start with black move.l #200,d1 fla11 dbra d1,fla11 delay move.w #$777,(a0) move.l #200,d1 fla22 dbra d1,fla22 delay dbra d3,fla00 number of iterations required move.l (sp)+,(a0) restore original color movem.l (sp)+,d0-d3/a0 rts *------------ * new palette expects address in A0 * see macro called 'palette' setpal movem.l d0-d2/a0-a2,-(sp) move.l a0,-(sp) move.w #6,-(sp) trap #14 addq.l #6,sp movem.l (sp)+,d0-d2/a0-a2 rts *---------- * here is how to save a palette movem.l $ff8240,d0-d7 movem.l d0-d7,palet *--------------------------- * here is how to quickly turn screen black movem.l blanks(pc),d0-d7 ; all nulls movem.l d0-d7,$ff8240 ; all colors are now black blanks ds.w 16 *---------------- * REVEAL [ Camy Maertens ] July 1 1987 * will reveal the contents of D0 * >>> see 'reveall' macro <<< reveal LEA errbuf(PC),A0 BSR bindec BSR printline RTS errbuf DS.B 6 DC.B 10,13,0 EVEN *----------- * reveal_regs: EXAMPLE >>>> in shell.s under k_star <<<<<< reveal_regs move.l d0,-(sp) move.l d7,-(sp) save originals move.l d6,-(sp) move.l d5,-(sp) move.l d4,-(sp) move.l d3,-(sp) move.l d2,-(sp) move.l d1,-(sp) move.l d0,-(sp) lea errbuf,A0 clr.l (A0) move.l (sp)+,d0 bsr bindec print errbuf string < > or print c_r move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 lea errbuf,A0 bsr bindec print errbuf string < > move.l (sp)+,d0 rts *------------ * address of cursor NEEDED in A0 reveal_quick MOVEM.L D1-D7/A0-A6,-(SP) MOVE.L D0,-(SP) BSR printline MOVE.L (SP)+,D0 LEA errbuf(PC),A0 BSR bindec BSR printline MOVEM.L (SP)+,D1-D7/A0-A6 RTS *------------- c_r DC.B 13,0 l_f DC.B 10,0 space DC.B " ",0 EVEN *------------- * from to routine [ Camy Maertens ] July 1 1987 * expects 'from' in D0 'to' in D1 Height in D2 Width in D3 * also expected origin screen in A0 (ex: spr_screen or lady_screen..) * destination screen in A1 (ex: $44e or physbase...) * this routine now obsolete on its own. Replaced by several MACROS: * grab, take, block... all moving blocks around. * modified Aug 89 (see ~) fromto MOVEM.L A0-A1/D0-D4,-(SP) MOVE.W #160,D4 SUB.W D3,D4 this will be the offset for each line lsr.w #2,d3 divide by 4 sub.w #1,d3 loop ADDA.w D0,A0 A0 is always the Origin ADDA.w D1,A1 A1 is always the Destination MOVE.W D2,D0 height .f1 MOVE.W D3,D1 width .f2 MOVE.L (A0)+,(A1)+ DBRA D1,.f2 ADD.W D4,A0 ADD.W D4,A1 DBRA D0,.f1 MOVEM.L (SP)+,A0-A1/D0-D4 RTS *---------- * this one needed by 'grabr' macro (Aug 89) fromtoo MOVEM.L A0-A1/D0-D4,-(SP) MOVE.W #160,D4 SUB.W D3,D4 this will be the offset for each line lsr.w #2,d3 divide by 4 sub.w #1,d3 loop ADDA.l D0,A0 A0 is always the Origin ADDA.l D1,A1 A1 is always the Destination MOVE.W D2,D0 height .fto1 MOVE.W D3,D1 width .fto2 MOVE.L (A0)+,(A1)+ DBRA D1,.fto2 ADD.W D4,A0 ADD.W D4,A1 DBRA D0,.fto1 MOVEM.L (SP)+,A0-A1/D0-D4 RTS *------------- * Blank out a block on screen (Camy Maertens July 15, 1988) * Block height 1 to 200 width 1 to 320 * Again, no need to call this routine. * use 'blank' macro instead * Synthax for calling: BLANK long,word,word,word * Ex: BLANK 12,16000,47,64 (color-location-height-width) * BLANK d0,d1,d2,d3 (L-W-W-W) * Limits are d0:0-15 d1:0-32000 d2:1-200 d3:16-320 (in 16's) * 'BLANK' is a macro * note: writing 1 L to screen (say $ffffffff) plots 8 to 16 pixels * writing the next L will give these 16 pixels their final color * if the command was move.l #$ffffffff,(a1)+ then * the marker has to be moved by 156 to get back to the * beginning of the next line (add.l #156,a1) * so with 2 commands to write a true 16 pixels, the sequence is * move.l d0,(a1)+ move.l d0,(a1)+ add.l #152,(a0) * or move.l (a0)+,(a1)+ move.l (a0)+.(a1)+ add.l #152,(a0) * height is expected in d2 blanken movem.l A0-A1/D0-D6,-(SP) add.w d1,a1 the final, precise, position move.w d3,d5 save width lsr.w #4,d5 divide width by 16 sub.w #1,d5 adjust for dbra loop lsr.w #1,d3 16 becomes 8 for line complement move.w #160,d4 sub.w d3,d4 say 160-8=152 move.l #color_table,a2 lsl.l #3,d0 multiply by 8 move.l 0(a2,d0),d6 the first long word move.l 4(a2,d0),d7 the second longword .hei move.w d5,d1 width .wi move.l d6,(a1)+ plot first L word move.l d7,(a1)+ plot second dbra d1,.wi add.w d4,a1 the line complement dbra d2,.hei the height movem.l (sp)+,a0-a1/d0-d6 rts color_table dc.l $00000000,$00000000 color #0 (border) dc.l $ffff0000,$00000000 color #1 dc.l $0000ffff,$00000000 color #2 dc.l $ffffffff,$00000000 color #3 dc.l $00000000,$ffff0000 color #4 dc.l $ffff0000,$ffff0000 color #5 dc.l $0000ffff,$ffff0000 color #6 dc.l $ffffffff,$ffff0000 color #7 dc.l $00000000,$0000ffff color #8 dc.l $ffff0000,$0000ffff color #9 dc.l $0000ffff,$0000ffff color #10 dc.l $ffffffff,$0000ffff color #11 dc.l $00000000,$ffffffff color #12 dc.l $ffff0000,$ffffffff color #13 dc.l $0000ffff,$ffffffff color #14 dc.l $ffffffff,$ffffffff color #15 *---------- * this one asks for a Degas filename and loads it if found * version two (July 88 Camy Maertens) using macros * specific to Budgie environment only * destination expected in a6 degas_load bsr getline input filename move.l a6,$45e target screen : these two vsync ..lines must stay open keybuff+2 recall that name tst.w d0 if error, we don't come bmi degas8 back here (rts during open) read #palette_x,34 Must be a # read $44e,32000 actual data close palette palette_x+2 getkey rts degas8 not $ff8240 error warning rts palette_x ds.w 20 *---------- phys_base move.w #2,-(sp) trap #14 addq.l #2,sp rts physbase dc.l 0 logical_screen dc.l 0 physical_screen dc.l 0 save_screen dc.l 0 *---------- * next routine now replaced with a macro: * to set low res, just type 'mode 0' (macro) <<<<< setlowrez CLR.W -(A7) 0=low res MOVE.L physbase,-(A7) -1=ignore physbase MOVE.L physbase,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 rts setmedrez move.w #1,-(A7) 0=low res MOVE.L physbase,-(A7) -1=ignore physbase MOVE.L physbase,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 rts *------------ * expects start address of sound data in A0 * use 'sound' MACRO instead! <<<<< dosound movem.l a0-a6/d0-d6,-(sp) MOVE.L A0,-(SP) MOVE.W #$20,-(SP) TRAP #14 ADDQ.L #6,SP movem.l (sp)+,a0-a6/d0-d6 RTS EVEN * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXAMPLE * lea snd14,a0 * jsr dosound * or using a macro: sound snd14 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * BUBBLE sort high score table [ Camy Maertens ] Sept 1 1987 *The array is as follows: DC.W 8 records * DC.W 8 pointers DC.B 10*16 characters DC.B 8 blank bytes * Not a universal routine. But the principle is there. * array expected in a0 ex: lea high_scores,a0 jsr sort sort MOVE.w #6,d3 # of checks required (7 for an 8 array)[w] MOVE.L A0,A4 \preserve it sor1 MOVE.L A0,A1 \and again MOVE.W (A1),D1 \first cell in the array ADDA.W #2,A0 MOVE.L A0,A2 \and this is the next one MOVE.W (A2),D2 BSR sort_compare \go and see which is greatest DBRA D3,sor1 RTS sort_compare CMP.W D1,D2 BGT sor2 \if first is greater,no action RTS sor2 EXG D1,D2 swap them round MOVE.W D1,(A1) replace them in... MOVE.W D2,(A2) ... appropriate locations ADDA.W #16,A1 now get the positioners ADDA.W #16,A2 MOVE.W (A1),D1 and swap them as well MOVE.W (A2),D2 MOVE.W D1,(A2) MOVE.W D2,(A1) no need to use EXG really bset #0,sor8 indicate a swap took place RTS EVEN sor8 DC.W 1 internal flag *----------------- * SET a Sequence of VBI routines [ C.Maertens ] 20/9/87 * Each routine has to be enabled or disabled separately * Address of routine expected in A5 * ex: move.l #music,a5 jsr enable_vbi * first available slot is usually the second one, first being gem * move.l #myroutine,$4d2 also does the same job (not recommended) * see example of TWO vbi's at once in Operation Angelica enable_vbi movem.l a0-a5,-(sp) move.l $456,a0 enab1 tst.l (a0) is is nought? (free) beq enab2 adda.l #4,a0 bra enab1 enab2 move.l a5,(a0) slot in this routine movem.l (sp)+,a0-a5 rts *------------ disable_vbi movem.l d0/a0-a5,-(sp) a5 holds address of routine move.l $456,a0 disab1 cmp.l (a0),a5 contents of $456 same as routine? beq disab2 disab3 adda.w #4,a0 try next one bra disab1 disab2 move.l #0,(a0) switch it off movem.l (sp)+,d0/a0-a5 rts *------------ clearbuf MOVE.W #$B,-(A7) constat call $00=nothing $ffff=yes TRAP #1 character in buffer? ADDQ.L #2,A7 TST.W D0 if zero, nothing there BEQ clearnd MOVE.W #7,-(A7) gemdos conin no echo TRAP #1 gets character.. ADDQ.L #2,A7 ..from buffer BRA clearbuf clearnd RTS *------------ anybuff MOVE.W #$B,-(A7) TRAP #1 character in buffer? ADDQ.L #2,A7 answer in D0 RTS *------------ * random rebuilds a specified screen * origin expected in A0 (ex: lady_screen) * destination is current screen * example in the 'opening_sequence' of most Budgie games specify1 bsr random move.l d0,d1 and.l #%111110011111000,d1 restrict to 32000 & div by 8 move.w d1,d0 origin & destination same move.w #8,d2 height move.w #8,d3 width move.l $44e,a1 bsr fromto or from_to for single screen rts *------------ * this version also expects origin screen in A0 (ex: spr_screen) * destination will be both logical and physical * used for control panels etc.. see Operation Angelica * also expected D0,D1,D2,D3 * of course a 'grab' macro, used twice, will do the same from_two MOVEM.L A0-A2/D0-D4,-(SP) MOVE.W #160,D4 SUB.W D3,D4 this will be the offset for each line lsr.w #2,d3 divide by 4 sub.w #1,d3 adjust for loop move.l logical_screen,a1 move.l physical_screen,a2 ADDA.W D0,A0 ADDA.W D1,A1 ADDA.W D1,A2 MOVE.W D2,D0 height .f1 MOVE.W D3,D1 width .f2 MOVE.l (A0),(A1)+ move.l (A0)+,(A2)+ DBRA D1,.f2 ADD.W D4,A0 ADD.W D4,A1 add.w d4,a2 DBRA D0,.f1 MOVEM.L (SP)+,A0-A2/D0-D4 RTS even * ----------- end of include ------------ * * INCLUDE 2 Oct 16, 1989 *------------------------------------------------------ * FADEIN Damon. not tested yet * SET_HORIZONTAL_BLANK Kenn Garroch's h/blank * RST_HORIZONTAL_BLANK * INSTALL_VBI Frank's quick vbi re-vector * PICDUMP Frank's screen dump to disk * OR_BLOCK block drawing with oring * COMPACT compact a Degas file * DECOMPACT decompact * VIEW_ARRAY view bytes in dec, hex or binary * + various mfp trap calls *---------------------------------------------------- * fadein Oct 89 not tested yet fadein subi.w #1,flag2 bne fadeend addq.w #2,flag2 move.w store2(pc),d3 tst.w inout beq fadeend add.w inout(pc),d3 move.w d3,store2 beq skip4 cmpi.w #$0010,d3 bne skip8 skip4 clr.w inout skip8 moveq.w #$f,d4 lea palet,a0 ; address of 16 words lea $ff8240,a1 fadeloop move.w (a0)+,d0 move.w d0,d1 asr.w #4,d1 move.w d1,d2 asr.w #4,d2 andi.w #$0007,d0 andi.w #$0007,d1 andi.w #$0007,d2 mulu d3,d0 mulu d3,d1 mulu d3,d2 asr.w #4,d0 asl.w #4,d2 andi.w #$0007,d0 andi.w #$0070,d1 andi.w #$0700,d2 or.w d1,d0 or.w d2,d0 move.w d0,(a1)+ dbf d4,fadeloop fadeend rts inout dc.w 0 (1 or $ffff) flag2 dc.w 2 store2 dc.w 0 *------------------------------------------ * Horizontal blank [Ken Garroch] Sept 5 1987 * Expects address of my routine in A0 set_horizontal_blank move.l d0,-(sp) MOVE SR,D0 get status register OR #$7,D0 set no interrupts MOVE D0,SR MOVE.L $68,hbl_vector save old vector MOVE.L A0,$68 point to our routine MOVE SR,D0 AND #$F8FF,D0 set interrupt level to zero MOVE D0,SR put back move.l (sp)+,d0 RTS * there is an example in the shell.s used to count how long * a particular routine takes (by peeking the h/b line, before * and after the routine. H/blank routines are very processor intensive. *---------- * all h/b routines must be disabled prior to returning to desktop rst_horizontal_blank move.l d0,-(sp) MOVE SR,D0 get status register OR #$7,D0 set no interrupts MOVE D0,SR MOVE.L hbl_vector,$68 reset old vector MOVE SR,D0 AND #$F8FF,D0 set interrupt level to zero MOVE D0,SR move.l (sp)+,d0 RTS hbl_vector DS.L 1 *---------------- * PICDUMP * Press Alt-Help to dump screen to disk rather than printer * To use, call install_vbi * then read vbi_request1 (flag) * from main program, and if set * clear it. * Exit to be finalized install_vbi eol EQU 0 ;setup constant bsr superin move.l $70,exitvbi+2 ;get system vbi vector/save it move.l #vbi_routine1,$70 ;set my vbi as first bsr superout RTS ;This is the easy way to install a vertical blank interupt ;enabling it to be the first to execute, the reason for the need to be ;first is to reset the hard copy dump flag after our disk dump ;otherwise we would also get a print out. vbi_routine1 tst.w $4ee ;alt/help key pressed bne exitvbi ;no bset #0,vbi_request1 YES move.w #$ffff,$4ee ;reset alt/help flag exitvbi jmp $ffff ;exit to old system vbi vbi_request1 DC.W 0 * note the use of JMP to unknown * this vbi_request flag will now be tested by the main prog *---------------------------------------------------------- * Now the PICDUMP routine * I've excluded the rez checks and assume LOW RES * screen expected in 'save_screen' (L) * see example in shell.s when you press D picdump movem.l d0-d5/a0-a5,-(sp) save_palette move.b $44c,paleta+1 ;move res header lea $ff8240,a0 ;now copy palette lea paleta+2,a1 ;to header \note precise pointer move.w #15,d0 ;copy 16 words ccolor MOVE.W (A0)+,(A1)+ to our buffer DBRA D0,ccolor move.l #fname,a0 BSR f_create MOVE.L #fname,A0 MOVE.L #paleta,A3 move.l #34,D3 BSR f_write MOVE.L #fname,A0 MOVE.L save_screen,a3 screen address MOVE.L #32000,D3 BSR f_write BSR f_close movem.l (sp)+,d0-d5/a0-a5 RTS paleta dc.b 0,0 flag for res ds.w 16 palette fname dc.b 'APIC.PI1',0 EOL even *------------- * puts a block on screen, eored with background * must start on a 16 boundary * expected: a0 origin (L), a1 destination (L), * d6 number of chunks (W) (1 chunk=16 pixels) d7 height (W) * max chunks:20 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXAMPLE * move.l spr_screen,a0 move.l $44e,a1 move.w #8,d6 * move.w #70,d7 jsr or_block * there is a MACRO for it, called 'block' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * or_block move.w #160,d0 move.w d6,d5 save chunk number for now lsl #3,d6 chunks times 8 sub.w d6,d0 say 160-32 (line offset) move.w d0,d4 save it as a line offset move.w d5,d6 retrieve chunk number sub.w #1,d6 adjust for loop sub.w #1,d7 loop, height .lp move.w d6,d5 loop, chunks .loop movem.l (a0)+,d2/d3 get all 4 planes in one go move.l d2,d0 combine... or.l d3,d0 ...the lot of them. move.w d0,d1 convert result.. swap d0 into.. or.w d1,d0 ..a mask not.w d0 now invert it clr.l d1 move.w d0,d1 put mask in lower word of D1 swap d1 now it's in the high word move.w d0,d1 now it's in both and.l d1,(a1) merge.. or.l d2,(a1)+ ..all this lot... and.l d1,(a1) ...with... or.l d3,(a1)+ ...the background on actual screen. dbra d5,.loop add.w d4,a0 line offset add.w d4,a1 dbra d7,.lp rts *------------------------- * how to save 1/2 a degas_screen from utility_screen to disk * no palette is saved at this point half_degas print prompt2 "enter file name..say bill.pic." bsr getline input filename vsync create keybuff+2 recall that name move.l #16000,d0 length writee utility_screen,d0 write to disk close rts prompt2 dc.b "give it a name (***.pic)",10,13,0 even *------------------------- * how to view a number of BYTES in an array, anywhere, * a0 to point to array. * currently, successive numbers do not scroll (fixed position) * ex: lea my_array,a0 jsr view_array * hit key to progress through array. Hit UNDO to exit. view_array flash 6,2 lllpp clr.l store move.b (a0)+,store+3 get that byte move.l a0,-(sp) preserve a0 bindec store,10 10=dec 16=hex 2=bin printat 7,20,22,a0 show it (always same position) getkey move.l (sp)+,a0 swap d0 cmp.b #$61,d0 undo to quit bne lllpp rts *-------------------------- * mfp end-of-interrupt timer bits: timer A bit 5 of $fffa0f * B bit 0 od $fffa0f C bit 5 of $fffa11 D bit 4 of $fffa11 * these must be bclr prior to rte * delay modes: 0 stop timer 1 divide by 4 2 divide by 10 * 3 divide by 16 4 divide by 50 5 divide by 64 * 6 divide by 100 7 divide by 200 * timers are normally used in delay modes, (rather than pulse mode) * the mfp operates at 2457600 hz: to get an interrupt every 3.9 milliseconds: * put 4 in control and 256 in data. Another example: * 2457600/50=49152 then 49152/192=256 256 hz= 5.1 seconds * disable MFP expects interrupt # in D0 (w) di_mfp move d0,-(sp) move.w #26,-(sp) trap #14 addq.l #4,sp rts *------------ * enable MFP expects interrupt # in D0 (W) en_mfp move.w d0,-(sp) move.w #27,-(sp) trap #14 addq.l #4,sp rts *------------ * set line interrupt timer B expects D0 and D1 (W) * also called xbtimer See Anatony. stimb move.l #-1,-(sp) timer B (line counter) move.w d0,-(sp) data move.w d1,-(sp) control move.w #1,-(sp) timer 0=A user move.w #31,-(sp) timer 1=B h/blank count trap #14 timer 2=C system timer add.l #12,sp rts *------------ * initialize an MFP timer * see Kenn Garroch's articles in folder xbtimer move.l a0,-(sp) address of our routine move.w d0,-(sp) data like 2 (2 lines per count move.w d1,-(sp) control like 8 for h/blank move.w #0,-(sp) timer 0=A 1=B 2=C 3=D move.w #31,-(sp) trap #14 add.l #12,sp rts *------------ * same as above see k. Garroch's ST Update Sept 87 and PCW April 89 inimfp move.l d0,-(sp) address of routine move.w d1,-(sp) say 8 for vector 8 (h/b) move.w #13,-(sp) trap #14 addq.l #8,sp rts *------------ * works best if pictures has lots of $0's (blank background) or $ff's * a prompt will ask for a reference byte (0 or f) * Camy Maertens October 9, 1989 compact show lady_screen cls font 16 home print prompt bsr getline input filename vsync ..lines must stay open keybuff+2 recall that name tst.w d0 if error, we don't come bmi comp9 back here (rts during open) read #palette_x,34 Must be a # print prompt_3 getkey 0 or f swap d0 cmp.b #$70,d0 keypad 0 beq .zer cmp.b #$0b,d0 top 0 beq .zer cmp.b #$21,d0 f beq .f .zer move.b #0,reference_byte bra .ov .f move.b #$ff,reference_byte .ov read $44e,32000 actual data close palette palette_x+2 move.l #32000,d7 32000 bytes to check move.l lady_screen,a0 origin move.l utility_screen,a1 destination clr.l d6 move.b reference_byte,d6 usually $00 or $ff .next sub.l #1,d7 loop beq .end move.b (a0)+,d0 one byte at a time tst.w b_flag if set : repeat beq .notset bra .set .notset move.b d0,(a1)+ not set: we store it add.l #1,storel length counter ; now let's examine this byte to see if it is same as reference byte .set cmp.b d6,d0 same as reference byte? beq .zero same tst.b z_ct zero last time around? beq .eq no clr.b z_ct yes. ok no more add.w #1,a1 next destination move.b d0,(a1)+ store this latest non-zero value add.l #2,storel .eq clr.w b_flag not zero: flag clear bra .next goto next byte .zero move.w #1,b_flag zero: set flag add.b #1,z_ct number of successive zeroes move.b z_ct,(a1) cmp.b #125,z_ct byte cmp not accurate above 127 bne .next sub.b #1,z_ct adjust move.b z_ct,(a1) move.b #1,z_ct restart at one move.b d6,1(a1) another zero move.b #1,2(a1) store that one add.w #2,a1 new pointer add.l #2,storel length bra .next goto next byte .end * ok now we save this compacted file to disk * no palette is saved at this point print prompt2 "enter file name..." bsr getline input filename vsync create keybuff+2 recall that name write #palette_x,34 write #reference_byte,1 move.l storel,d0 recall length writee utility_screen,d0 write to disk close comp9 rts z_ct dc.b 0,0 successive zeroes b_flag dc.w 0 zero on/off flag reference_byte dc.b 0,0 prompt_3 dc.b "reference_byte",13,10,0 even * storel can now be printed to reveal the number of bytes * beware not to print onto the compacted screen as it will * be corrupted!!! : bindec storel,10 printat 7,23,0,a0 *------------------------- * decompact: see compact first * a compacted picture previously loaded in utility_screen * will be re-built in spr_screen (or wherever) * the format is : 2 bytes res, 32 bytes palette, 1 byte reference, data... * number of bytes expected in d7, destination in a1 decompact clr.l storel used as a byte counter only clr.l d5 clr.l d6 move.l utility_screen,a0 origin (dest in a1) move.b reference_byte,d6 .next sub.l #1,d7 decrement loop beq .out out move.b (a0),d0 analyse one byte... move.b d0,(a1) ..and rebuild it cmp.b d6,d0 same as reference? beq .zero add.w #1,a0 add.l #1,storel for internal use only add.w #1,a1 bra .next .zero clr.l d5 move.b 1(a0),d5 special loop... tst.b d5 (avoid negative number beq .out at all cost) .ok sub.w #1,d5 ...for zeroes only .zloop move.b d6,(a1)+ dbra d5,.zloop add.w #2,a0 add.l #2,storel bra .next .out rts *------------------ * check for multiples of 8 using AND mask ex: ; move.w soso,d0 ; and #7,d0 ... says K Garroch * include 3 January 4, 1990 *------------------------------ * ASPRITE sprites, using chunks * DISAP Simon's venetian blind * PIPLOT pixel plot * PIREAD * READ_SECTOR\WRITE_SECTOR * BOOT_SECTOR how to create an executionable boot sector * SAVE_PAL \BLACK_PAL \INVERT * TRANSPARENT merge two pictures *--------------------------------------------------------- * SPRITES may be drawn in a variety of ways. Macros are available. * At the other extreme, data may be moved from spr_screen to destination * using pre-shifted pictures, and not a single loop (see Final Lap) * a chunk is 16 pixel wide * sprite screen expected in A0 * and several other parameters asprite move.l a1,a3 save destination screen add.l d4,a0 precise origin was a4 add.l d5,a1 precise loc (16 boundary) lea sprite_store,a2 destination:sprite data with mask move.l d1,-(sp) save start pixel move.w 8(a6),d7 height sub.w #1,d7 .row_loop move.w 10(a6),d4 chunks sub.w #1,d4 -1 for loop .chunk_loop movem.l (a0)+,d2/d3 create a mask of that sprite move.l d2,d0 combine... or.l d3,d0 ...the lot of them. move.w d0,d1 convert result.. swap d0 into.. or.w d1,d0 ..a mask not.w d0 now invert it move.w d0,(a2)+ store mask move.l d2,(a2)+ store planes move.l d3,(a2)+ .. .. * move.l (a1)+,(a3)+ if saving.. * move.l (a1)+,(a3)+ ..a buffer is needed dbra d4,.chunk_loop add.l a4,a0 offset add.l a5,a1 offset dbra d7,.row_loop printsprite move.l (sp)+,d0 retrieve start pixel lea sprite_store,a0 created a moment ago move.l a3,a1 retrieve destination screen.. add.l d5,a1 precise loc (16 boundary) move.w 8(a6),d7 height sub.w #1,d7 .loop1 move.w 10(a6),d6 sub.w #1,d6 moveq #-1,d1 moveq #0,d2 moveq #0,d3 moveq #0,d4 moveq #0,d5 .loop2 move.w (a0)+,d1 mask move.w (a0)+,d2 plane 1 move.w (a0)+,d3 plane 2 etc move.w (a0)+,d4 move.w (a0),d5 lsr.l d0,d1 shift mask into place lsr.l d0,d2 shift planes into place lsr.l d0,d3 lsr.l d0,d4 lsr.l d0,d5 and.w d1,(a1) or.w d2,(a1)+ now write plane 1 and.w d1,(a1) or.w d3,(a1)+ and so on and.w d1,(a1) or.w d4,(a1)+ and d1,(a1) or d5,(a1)+ subq.l #8,a0 move.l (a0),d1 addq.l #2,a0 move.l (a0),d2 addq.l #2,a0 move.l (a0),d3 addq.l #2,a0 move.l (a0),d4 addq.l #2,a0 move.l (a0),d5 addq.l #2,a0 dbra d6,.loop2 move.w #-1,d1 clr.w d2 clr.w d3 clr.w d4 clr.w d5 lsr.l d0,d1 lsr.l d0,d2 lsr.l d0,d3 lsr.l d0,d4 lsr.l d0,d5 and.w d1,(a1) or.w d2,(a1)+ and.w d1,(a1) or.w d3,(a1)+ and.w d1,(a1) or.w d4,(a1)+ and.w d1,(a1) or.w d5,(a1)+ add.l a5,a1 (2*chunks)-8 dbra d7,.loop1 rts sprite_store ds.w 1300 enough for a sprite 3 chunks * 20 ds.w 1300 but bigger sprites need more room! *------------ * disappear (Venitian blind) [ Simon Rush 23.9.88 ] * just call by jsr disap disap move.l $44e,a0 add.l #1600,a0 move.l a0,a3 move.l a0,a2 move.l a0,a1 sub.l #160,a0 add.l #160,a2 move.l #9,d2 lp2 move.l #9,d1 lp1 move.l #359,d0 lp move.l -(a0),-(a1) move.l (a2)+,(A3)+ dbra d0,lp move.l #39,d0 lp4 move.l #0,-(a1) move.l #0,(a3)+ dbra d0,lp4 add.l #4640,a0 add.l #4800,a1 add.l #1600,a3 add.l #1760,a2 dbra d1,lp1 sub.l #32000,a0 sub.l #32000,a1 sub.l #32000,a2 sub.l #32000,a3 wait 2 dbra d2,lp2 rts *----------- * pixel plot based on J Lawson's system * use MACRO instead <<<< * enter with A0 screen address * d0,d1 lateral,vertical coord x-y (W) d2 color(W) piplot mulu #160,d1 (160 bytes per row) move.w d0,d3 save lateral (horizontal) lsr.w #1,d3 and.w #$fff8,d3 horizontal offset add.w d3,d1 combine vert & horiz offsets adda d1,a0 correct word on screen and.w #$f,d0 correct pixel neg d0 add.w #15,d0 correct bit * now actually write pixel in color held in d2 moveq #4-1,d3 4 planes loop .loop move.w (a0),d1 read screen lsr.w #1,d2 is it a set bit? bcs.s .set_bit yes bclr d0,d1 bra.s .write_back .set_bit bset d0,d1 .write_back move.w d1,(a0)+ dbra d3,.loop rts *--------- * pixel read * use MACRO instead ! * answer in D2 (W) piread clr.w d2 will return color 0 to 15 mulu #160,d1 move.w d0,d3 lsr.w #1,d3 and.w #$fff8,d3 horizontal offset add.w d3,d1 combine vert & horiz offsets adda d1,a0 correct word on screen and.w #$f,d0 correct pixel neg d0 reverse add.w #15,d0 correct bit moveq #0,d4 bits to create 0 to 15 (0-1-2-3) moveq #4-1,d3 4 planes loop .loop move.w (a0)+,d1 read screen, one word at a time btst d0,d1 bne .set bclr d4,d2 bra .clear .set bset d4,d2 .clear add.w #1,d4 dbra d3,.loop rts *---------- * FLOPRD read disk sector (currently set on boot sector) read_sector move.w #1,-(sp) number of sectors to read (1-9) move.w #0,-(sp) side number selected (0-1) move.w #0,-(sp) track number (0-79) move.w #1,-(sp) sector number (0-9) move.w #0,-(sp) device: 0 for A etc.. clr.l -(sp) filler (unused) move.l #read_buffer,-(sp) 512 bytes times sectors read move.w #8,-(sp) trap #14 add.l #20,sp tst.w d0 beq read_ok local label not recommended bra disk_error read_ok rts read_buffer ds.b 512 can be used for other purposes even *------------------------------- * WRITE SECTOR currently set to write boot sector write_sector move.w #1,-(sp) 1 sector to write move.w #0,-(sp) on side 0 move.w #0,-(sp) track zero move.w #1,-(sp) sector 1 (not zero) move.w #0,-(sp) drive A clr.l -(sp) move.l #read_buffer,-(sp) move.w #9,-(sp) trap #14 add.l #20,sp tst.w d0 error? beq wr_sc_ok bra disk_error wr_sc_ok rts *-------------------------------- * the next XBIOS call produces an executable boot sector * ie it reads a buffer and checksums it * the buffer must be ready in advance: the first two bytes being $60 $38 * meaning BRA $38 bytes. The code starts at byte 58 * so first prepare a 512 byte buffer by loading an existing valid * boot sector in it, using read_sector routine * Put a $60 and $38 in bytes 0-1 Copy code from somewhere else * to bytes 58 onwards. Then call boot_sector to checksum it. * Then call write_sector to save it. It should now be executable * boot_sector move.w #1,-(sp) executable move.w #-1,-(sp) disk type no change move.l #-1,-(sp) same serial number move.l #read_buffer,-(sp) move.w #18,-(sp) trap #14 add.l #14,sp rts *---------------------------------------------------- disk_error cmp.w #-17,d0 beq insertdisk cmp.w #-13,d0 beq writeon cmp.w #-2,d0 beq drivenot tst.w d0 bmi diskerror rts insertdisk pen $070 home string getkey rts writeon pen $070 home string getkey rts drivenot pen $070 home string getkey rts diskerror pen $070 home string getkey rts *---------- * one way of saving the entire palette in one go save_pal movem.l $ff8240,d0-d7 movem.l d0-d7,palet rts * one way of blanking the screen by making all colors black black_pal movem.l coal(pc),d0-d7 movem.l d0-d7,$ff8240 rts coal ds.w 16 * how to invert the screen invert move.l $44e,a0 move.l #8000-1,d0 loop .lp not.l (a0)+ invert dbra d0,.lp rts *---------- * screen one expected in a0 * screen two (destination) in a1 (currently physical) * color 0 will be transparent transparent move.l $44e,a1 move.l a0,a2 duplicate origin move.l a1,a3 and destination move.w #4000-1,d7 loop .lp move.w (a0)+,d0 get first plane word or.w (a0)+,d0 or it with next one or.w (a0)+,d0 and next or.w (a0)+,d0 eori.w #-1,d0 invert to obtain mask and.w d0,(a1)+ mask with destination and.w d0,(a1)+ and.w d0,(a1)+ and.w d0,(a1)+ move.l (a2)+,d1 source L or.l d1,(a3)+ or with the new destination move.l (a2)+,d1 or.l d1,(a3)+ dbra d7,.lp rts *---------- * INCLUDE 4 November 23, 1989 *---------------------------------------------------------------* * FNT_8 (16) Camy's font routine * SET_SCREEN trap 14 call * LEAD_ZERO Kane's erase leading zeroes * VERT Gareth's vertical screen scroll (selected planes) * JEFF_SCROLL adapted from Jeff Lawson's super fast vertical scroll *---------------------------------------------------------------* * access to font routines [ C. Maertens March 88 ] * after a DC.W $A000 call, A0 returns a pointer to A-line variables * which I stored in a_line_start * while A1 returns address of 3 system fonts * this routine expects the address of customized font data in A1 * otherwise a zero (L) must be passed in A1 to use system font. * in this routine here, A0 points to font header (not A-line) * A4 will point to A-line * the fonts used are a1 or a2 fonts as defined by Jeremy Hughes * in his Fontkit PD program: 2096 bytes in mono, 4116 in color * there is a routine in ST World Dec 88 that will copy system font * to a soft location and change a single character and * commute between rom and soft font * we now have a macro that will handle this routine! * Full example in Shell.s and all Budgie games fnt_8 move.l fontaddress_8,a0 $fc96ca/fd2ca6 tos8/9 bra fnta fnt_16 move.l fontaddress_16,a0 $fc9cce/fd3702 tos8/9 fnta move.l a_line_start,a4 $293a /2994? suba.l #6,a4 deduct 6 bytes (why?) move.w $52(a0),d0 height of character (82 dec in the header) move.w d0,-$28(a4) merken? move.w $8(a4),d1 bytes per screen line mulu d0,d1 times height of character move.w d1,-$22(a4) yields bytes per line moveq #0,d1 move.w $2(a4),d1 raster lines on screen divu d0,d1 divide by font height subq.w #1,d1 minus move.w d1,-$24(a4) yields max cursor line moveq #0,d1 move.w -6(a4),d1 screen width in bits divu $34(a0),d1 divide by max char width subq.w #1,d1 minus 1 move.w d1,-$26(a4) yields max cursor column move.w $50(a0),-8(a4) width of form move.w $24(a0),-$a(a4) smallest ascii code in font move.w $26(a0),-$c(a4) largest cmp.l #0,a1 if zero, use standard data beq fnt1a move.l a1,-$10(a4) else use mine bra fnt2a fnt1a move.l $4c(a0),-$10(a4) standard data fnt2a move.l $48(a0),-$4(a4) pointer to offset table rts a_line_start dc.l 0 fontaddress_8 dc.l 0 fontaddress_16 dc.l 0 * there is a macro called font 8 (font 16) that will activate * any font previously loaded. See shell.s for full details *--------------------------------------------------------- * a font is 4096 bytes in hi-res (256 characters * 16 lines) * 512 bytes * 8 sectors = 4096 * the first 256 bytes cover the top line of the 256 characters, * the next 256 bytes cover the next scan line etc.. * IMG files are 32*32 *-------------------- set_screen move.w d0,-(sp) ;do a set_screen operation move.l a0,-(sp) ;rez in d0 move.l a0,-(sp) ;base addr in a0 move.w #5,-(sp) ;sets logbase and physbase trap #14 add.l #12,sp rts *------------ res_mem move.l d0,-(sp) ;reserve memory move.w #$48,-(sp) ;amount in d0 trap #1 addq.l #6,sp rts *------------ * edit a string of ASCII decimal characters by replacing * leading zeroes with blanks [ G.Kane 1986 ] * string to be edited expected in A0 (L) (or pointer?) * length of string expected in D2 * examples in Speculator and Final Lap lead_zeroes char_0 equ '0' blank_sp equ ' ' movem.l d0-d2/a0,-(sp) moveq #char_0,d0 initialize with ascii 0 moveq #blank_sp,d1 same tst.w d2 beq.s lead9 if length =0 then done subq.w #1,d2 adjust ctr for dbra lead1 cmp.b (a0)+,d0 is current char zero? bne.s lead9 move.b d1,-1(a0) replace zero with blank dbra d2,lead1 lead9 movem.l (sp)+,d0-d2/a0 rts * see examples in shell.s in speculator, final lap and moneyspinner * used for scores, time and other numeric variables * usually called prior to printing an ascii value on screen *------------ * adapted from JL's vertical scroll routine [ January 1989 ] * Full working example in 'Operation Angelica' and 'Sea King' * address of variables block expected in A6 * image_start in -12 (L) logical_screen in -8 physical_screen in -4 * scroll_index in 0 scroll_direction in +2 image_size-200 in +6 (w) * scroll_stepper in scroll_stepper (w) * weird effects when origin and destination are same or nearby * see end of this section jeff_scroll main_loop movea.l logical_screen,a0 logical screen to write to add.l #20*160,a0 sea king line ONLY movea.l image_start,a1 origin screen (image start) move scroll_index,d0 the pointer along the origin (1 line a time) bsr scroll_120 120 bytes wide (3/4 screen wide) * at this point we bsr toggle_screens rts (bra main_loop ) *------------------------------- scroll_120 movem.l d1-d7/a2-a6,-(a7) save registers mulu #160,d0 adda.l d0,a1 final start address move.l a1,image_position store for subsequent use move #163-1,-(a7) number of lines on screen (normally 199) scroll_frame_lp2 movem.l (a1)+,d0-d7/a2-a6 52 bytes movem.l d0-d7/a2-a6,(a0) movem.l (a1)+,d0-d7/a2-a6 52+52=104 bytes movem.l d0-d7/a2-a6,52(a0) movem.l (a1)+,d0-d3 movem.l d0-d3,104(a0) 104+28=120 lea 160(a0),a0 to start of line 2 destination add.l #40,a1 to start of line 2 origin (160-120=40) subq #1,(a7) deduct 1 from loop counter bne.s scroll_frame_lp2 addq.l #2,a7 reset the stack pointer movem.l (a1)+,d0-d7/a2-a4 now the last line movem.l d0-d7/a2-a4,(a0) 44 bytes movem.l (a1)+,d0-d7/a2-a4 movem.l d0-d7/a2-a4,44(a0) +44 again movem.l (a1)+,d0-d7 movem.l d0-d7,88(a0) +32=120 movem.l (a7)+,d1-d7/a2-a6 restore registers rts *--------------- scroll160 movea.l logical_screen,a0 movea.l image_start,a1 move scroll_index,d0 bsr scroll_160 160 bytes wide * at this point we bsr toggle_screens rts (bra main_loop ) scroll_160 * this one scrolls the whole width (160 bytes) movem.l d1-d7/a2-a6,-(a7) mulu #160,d0 adda.l d0,a1 move #113,-(a7) number of loops required 153 scroll_lp2 movem.l (a1)+,d0-d7/a2-a6 52 bytes movem.l d0-d7/a2-a6,(a0) movem.l (a1)+,d0-d7/a2-a6 52+52=104 bytes movem.l d0-d7/a2-a6,52(a0) movem.l (a1)+,d0-d7/a2-a6 now 156 movem.l d0-d7/a2-a6,104(a0) movem.l (a1)+,d0-d7/a2-a6 now 208 movem.l d0-d7/a2-a6,156(a0) lea 208(a0),a0 to start of line 2 destination subq #1,(a7) deduct 1 from loop counter bne.s scroll_lp2 addq.l #2,a7 reset the stack pointer movem.l (a1)+,d0-d7/a2-a4 now the last line movem.l d0-d7/a2-a4,(a0) 44 bytes movem.l (a1)+,d0-d7/a2-a4 movem.l d0-d7/a2-a4,44(a0) +44 again movem.l (a1)+,d0-d7/a2-a4 movem.l d0-d7/a2-a4,88(a0) movem.l (a1)+,d0-d7/a2-a4 movem.l d0-d7/a2-a4,132(a0) movem.l (a7)+,d1-d7/a2-a6 restore registers rts * total 147046 cycles *--------------- * scroll_variables scroll_index dc.w 0 vert scroll index offset 0 scroll_direction dc.w 1 scroll direction +2 scroll_stepper dc.w 0 scroll incr image_size dc.w 400 size of scenery minus 200 image_start dc.l 0 image_position dc.l 0 image_start + scroll_index * 160 *-------------------------------------------- * B U D G I E U K December 13, 1989 *-----------MACROS--- (79) ------------------------------------------- * load font mode show vsync * getkey waitkey print printat printatt * home ink pen border rawconio * inkey replay bindec * mfree take take_two sprite restore * sprit restor draw save back * on off flash grabr * grab grab_two blank block blockk * pixelread pixelreadd pixelplot pixelplott startup * cursor clear cls wait sound * scroll palette copyscreen copybytes copywords * copylongs reserve readd writee * open create read write close * bios xbios gemdos string pushi * show_mouse hide_mouse before after getjoy * joystick jiffy delay reveall reveal * acia key silence * The vast majority of these macros need the Budgie UK * include.s files to work. Some also need the Budgie shell.s itself * Values are normally immediate (ex: pixelplot $44e,20,20,8) * Sometimes registers are expected. Such macros usually have * their LAST letter repeated : (ex:pixelplott $44e,d5,d6,d4) * anybody sending new routines or macros, or reporting bugs * will receive the latest version + our thanks load macro \1,\2 move.l #\1,a0 say move.l #file,a0 move.l #\2,a6 say move.l #file_ptr,a6 jsr bload say bsr bload endm * ex : load file,file_ptr (# not necessary in this case), where.. * file dc.b "apic.pi1",0 * file_ptr dc.l 0 * file_ptr will contain the start address given by gem * no need to reserve memory. the routine will do it *-------------------------- * fonts must be loaded in advance. * ex: load font_1,a1_ptr load font_2,a2_ptr * a1_ptr holds 8*16 fonts (4114 bytes) a2_ptr holds 8*8 (2066 bytes) * font format is the one used by Jeremy Hughes in his fontsel.acc * now font macro may be used. Ex: font 16 (will call large font) font macro \1 move.w #\1,d6 dc.w $a000 initialize A-line move.l a0,a_line_start move.l (a1)+,d0 6*6 font move.l (a1)+,fontaddress_8 move.l (a1),fontaddress_16 cmp.w #8,d6 beq fnt\@ move.l a1_ptr,a1 jsr fnt_16 bra done\@ fnt\@ move.l a2_ptr,a1 jsr fnt_8 done\@ nop endm * will switch to user font, either 8*8 or 8*16 * ex: font 8 (will switch to 8*8 font held in a2_ptr) * font 16 (will switch to 8*16 font held in a1_ptr) * see full example in ALL Budgie games, shell, guardian etc... *--------------------- mode macro \1 move.l #\1,d0 cmp.l #1,d0 beq med\@ tst.l d0 beq low\@ bra v\@ if not 0 or 1, ignore low\@ jsr setlowrez bra v\@ med\@ jsr setmedrez v\@ vsync endm * ex: mode 0 (set low res) *------------------------- show macro \1 move.l \1,$45e jsr vtsync endm * will show a particular screen, or anything else in memory * at the next vertical blank * ex show physbase, show screen_0, show $44e+512 * show work_screen, etc... *--------------------- vsync macro move.l $466,d0 waitv\@ cmp.l $466,d0 beq waitv\@ endm * will wait for vertical blank * ex vsync * note: D0 will obviously be corrupted. (save if necessary) * can be used as a time delay * ex: vsync vsync vsync will delay things 3/50th of sec *--------------------------- getkey macro movem.l d1-d2/a0-a2,-(sp) move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 force upper case movem.l (sp)+,d1-d2/a0-a2 endm * waits for a key to be hit (unlike rawconio/inkey which doesn't wait) * the answer is a byte returned in D0 (ascii) * to get the scan value: swap d0 * see examples in shell.s etc... *---------------------- waitkey macro movem.l d1-d2/a0-a2,-(sp) move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 movem.l (sp)+,d1-d2/a0-a2 endm * same as getkey *------------- print macro \1 move.l #\1,a0 jsr printline endm * ex: print message * message dc.b "hello",10,13,0 * prints a string at CURRENT cursor position * if unsure as to where cursor is, use: home print message * alternatively, use the more precise 'printat' *----------------------------- home macro \1 move.l #pr_home,a0 jsr printline endm * cursor back to home position * ex: home pr_home dc.b 27,"H",0 even *------------------------ printat macro \1,\2,\3,\4 move.b #\1,pr_col+2 the ink move.b #\2,d1 add.b #32,d1 move.b d1,pr_loc+2 the row move.b #\3,d2 add.b #32,d2 move.b d2,pr_loc+3 the column move.l \4,a0 move.l a0,-(sp) move.l #pr_col,a0 jsr printline print ink and pos move.l (sp)+,a0 retrieve the address of message jsr printline print it endm pr_col dc.b 27,"b",15 no zero here! ,0 pr_loc dc.b 27,"Y",32,32,0,0 dynamic variables, liable to change! null dc.b 0 even * ex: printat 12,2,8,#message+4 where * 12 is the ink (0-15), 2 is row (0-23), 8 is column (0-39) * and last parameter, with a hash, is an address * (the message itself which is terminated with a null) * note registers will be corrupted by printline *---------------------------------------------- printatt macro \1,\2,\3 move.b \1,pr_col+2 the ink move.b \2,d1 add.b #32,d1 move.b d1,pr_loc+2 the row move.b \3,d2 add.b #32,d2 move.b d2,pr_loc+3 the column move.l a0,-(sp) save from corruption move.l #pr_col,a0 jsr printline print ink and pos move.l (sp)+,a0 retrieve the address of message jsr printline print it endm * similar to previous macro except that registers are used: * \1 \2 \3 are data regs (byte size) address is assumed to be a0 * ex: bindec d0 (go change value in d0 into a string) * move.b #1,d0 (ink) * move.b #3,d1 (4th row) * move.b #0,d2 (first column) * printatt d0,d1,d2 (being understood as string at a0) *------------------------ ink macro \1 move.b #\1,pr_ink+2 the ink lea pr_ink,a0 jsr printline print it home necessary to activate it endm * ex: ink 4 (0-15) will take the color in palette #4 * and print with it from now on pr_ink dc.b 27,"b",15,0 even *------------ pen macro \1 move.w #\1,$ff825e ink 15 endm border macro \1 move.w #\1,$ff8240 endm * ex: pen $777 (white) * ex: border $700 (red) * ex: show screen_0 pen $700 home string * will print hello in red on screen zero * note palette #15 ($ff825e) will become red * ink uses one of the 16 colors, pen uses ANY shade in color 15 *---------------------------- rawconio macro move.w #$ff,-(sp) move.w #6,-(sp) trap #1 addq.l #4,sp endm * checks whether a key has been hit (answer in D0) * if D0 is zero, no key: continue with program * ex: rawconio tst.b d0 ... to get scan code: swap d0 inkey macro move.w #$ff,-(sp) move.w #6,-(sp) trap #1 addq.l #4,sp endm * same as above * ex: inkey swap d0 cmp.b #1,d0 beq escape *------------------------------ * make sure include5.s is included before calling this macro replay macro \1,\2,\3 move.l \1,a5 move.l #\2,d5 move.l #\3,d4 jsr r_eplay endm * replays a sample at a certain location, at a certain speed * ex replay drum_ptr,7448,2 * (sample address held in drum_ptr,7448 bytes,speed 2 *----------------------------- * next macro displays any Long Word in 2, 10 or 16 bindec macro \1,\2 movem.l d0-d7/a1-a6,-(sp) move.l \1,d0 the number to convert (L) move.l #\2,d1 the base: 2, 10, or 16 bsr printn move.l #\2,d0 base again cmp.l #2,d0 binary beq base2\@ cmp.l #10,d0 decimal beq base10\@ move.l #num_buff+4,a0 hex bra done\@ base2\@ move.l #num_buff+4,a0 binary bra done\@ base10\@ move.l #num_buff+4,a0 decimal done\@ movem.l (sp)+,d0-d7/a1-a6 endm * ex: bindec d0,16 reveals in hex what is in d0 * then to actually see the number, use printat c,x,y,a0 * where c is color, x-y is cursor position, a0 is the result * note. the printed result will take 16 characters no less, like this: * 4509 * f8000 * 1111000011110000 * to ignore leading spaces: add.l #x,a0 * ex: expected answer is 4509 (0000000000004509) * to get it left justified: bindec d0,10 add.l #12,a0 printat 1,0,0,a0 * in this case, the first 12 blank spaces will be ignored *---------------------------------------------------------------- * next one not tested yet mfree macro \1 move.l \1,-(sp) address in handle onto stack move.w #$49,-(sp) trap #1 addq.l #6,sp tst.l d0 bmi error\@ bra ok\@ error\@ string < MFREE ERROR > ok\@ nop endm * frees an area of memory (tune, picture..) no longer needed * ex: mfree welcome_ptr * same as: move.l #welcome_ptr,a6: bsr m_free * ex: reserve 160 mfree d0 * the above line reserved 160 bytes then immediately gave it back *------------ take macro \1,\2,\3,\4,\5,\6 move.l \1,a0 origin screen move.l \2,a1 dest screen move.w #\3,d0 origin 0 to 32000 move.w #\4,d1 to screen 0 to 32000 move.w #\5,d2 height 1 to 200 move.w #\6,d3 width 1 to 160 jsr fromto endm * this is a VERY important macro for graphic movement * origin and destination screens are first specified, them * origin & destination locations (0-32000) in multiples of 8, * and finally the height (1-200) and width of the block (8-160) * ex: take spr_screen,buffer_screen,504,504,60,48 o-d-o-d-h-w * use take_two if screen swapping is used * or use this command TWICE, once for each screen * NOTE both Final Lap and Moneyspinner use take * Speculator uses an old macro (graber) *------------------------------------ take_two macro \1,\2,\3,\4,\5 screen+34 expected in A0 move.l \1,a0 origin screen move.w #\2,d0 origin on Degas 0 to 32000 move.w #\3,d1 to screen 0 to 32000 move.w #\4,d2 height 1 to 200 move.w #\5,d3 width 1 to 160 bsr from_two draw on both screens at once endm * used to draw a sprite on two screens at once i.e. TWICE * origin screen needed in a0, destination both logical_screen * AND physical_screen * ex: take_two spr_screen,0,16000,50,48 * use take if only one screen is active *-------------------------------------- * now grab (same as take, BUT registers are used) grab macro \1,\2,\3,\4,\5,\6 move.l \1,a0 origin screen move.l \2,a1 dest screen move.w d6,d0 origin 0 to 32000 move.w d7,d1 to screen 0 to 32000 move.w #\5,d2 height 1 to 200 move.w #\6,d3 width 1 to 160 jsr fromto endm * uses two registers d6 and d7 to indicate the locations * ex: grab spr_screen,current_screen,d6,d7,60,48 * move from sprite screen to current screen, an object at d6, * to destination d7, size 60*48 (d6 & d7 are 0-32000) *----------------------------------------------------- * now grab_two (registers are still used but we print on TWO screens) grab_two macro \1,\2,\3,\4,\5 move.l \1,a0 origin screen move.w d6,d0 origin 0 to 32000 move.w d7,d1 to screen 0 to 32000 move.w #\4,d2 height 1 to 200 move.w #\5,d3 width 1 to 160 jsr from_two endm * uses two registers d6 and d7 to indicate the locations * ex: grab_two spr_screen,d6,d7,60,48 * move from sprite screen to both screens, an object at d6, * to destination d7, size 60*48 (d6 & d7 are 0-32000) *------------------------------------------ sprite macro \1 move.l #\1,d0 move.l spr_screen,a0 default origin move.l logical_screen,a1 default destination jsr draw_sprite endm * ex: sprite 0 (go and draw sprite 0) * sprite 5 (go and draw sprite 5) * a sprite parameter-block must have been defined first * it is held in an array called 'sprites' * a typical sprite system would be: * jsr initialize_sprite_0, then, every v/blank: * jsr coord_sprite_0 restore 0 sprite 0 * read 'sprites' in shell.s to see what a parameter block is restore macro \1 move.l #\1,d0 move.l back_screen,a0 default origin move.l logical_screen,a1 default destination jsr rest_sprite endm * see above. restore always comes before actual draw. * see example in shell.s on macro \1 move.l #\1,d0 lsl.l #5,d0 mult by 32 lea sprites,a6 add.l d0,a6 right sprite slot move.b #1,29(a6) turn it on endm off macro \1 move.l #\1,d0 lsl.l #5,d0 mult by 32 lea sprites,a6 add.l d0,a6 right sprite slot clr.b 29(a6) turn it off endm * ex: on 3 (turn fourth sprite on) * ex: off 0 (turn first sprite off) (joystick sprite off) *----------------------- flash macro \2 move.w #\1,d7 loop: number of flashes sub.w #1,d7 fl\@ not $ff8240 wait \2 delay inside flash not $ff8240 wait \2 dbra d7,fl\@ endm * ex: flash 2,5 2 flashes each lasting 5 vb's * or flash 1,10 1 longer flash * flash 0,0 will result in a bomb (nonsense) *-------------------------------------------------- * with the next macros, origin AND destination to be specified in a0-a1 sprit macro \3 move.l #\1,d0 move.l \2,a0 origin move.l \3,a1 destination jsr draw_sprite endm spritt macro \3 move.l \2,a0 sprite # expected in d0 (L) move.l \3,a1 destination jsr draw_sprite endm restor macro \3 move.l #\1,d0 move.l \2,a0 origin move.l \3,a1 destination jsr rest_sprite endm * * ex: sprit 2,screen_2,image_pointer * means sprite 2 will be pulled from screen_2, and drawn * not on logical_screen as usual, but on image_pointer * or anywhere in memory. * sprite parameters are still found in the usual place (in sprites array) * ex: restor 2,buffer_screen,image_pointer * this is still under development *----------------------------------------- * Another set still under development is back,save,draw * these are fairly slow, but easy and logical ways of displaying sprites: * first way for vsync, then back, then save, then draw * sprites are once again defined in the usual array * in this case, because background is SAVED as found, rather than * replaced as assumed, a buffer is required for storing it. * see example in shell.s draw macro \3 move.l #\1,d0 move.l \2,a0 origin move.l \3,a1 destination jsr draw_sprite endm save macro \3 move.l #\1,d0 move.l \2,a0 origin move.l #\3,a1 destination a definite buffer jsr save_sprite endm back macro \2 move.l #\1,d0 move.l #\2,a0 origin (a buffer) jsr back_sprite endm *------------------------ blank macro \1,\2,\3,\4\,5 blank part of current screen move.l \1,a1 destination screen move.l #\2,d0 color 0 to 15 move.w #\3,d1 screen 0 to 32000 move.w #\4,d2 height 1 to 200 move.w #\5,d3 width 16 to 320 (in 16's) jsr blanken endm * ex blank $44e,12,16000,50,320 * a block 50*320 will be drawn at location 16000, in color 12 * color 0-15/location 0-32000 (mult of 8)/height 1-200/width 16-320 (16's) *----------------- * next one very similar to take except that the block being drawn * is fully ored with the background. * It is therefore slower, but blends better * another difference is the use of chunks to indicate the width * (1 chunk = 16 pixels) this is to be compatible with Lawson's ideas block macro \1,\2,\3,\4,\5,\6 move.l \1,a0 origin screen move.l \2,a1 dest screen add.l #\3,a0 precise location (16 boundary) add.lw #\4,a1 precise location (16 boundary) move.w #\5,d6 chunks (1 to 20) move.w #\6,d7 height (1 to 200 usually) jsr or_block fully ored with destination endm * ex: block screen_1,$44e,16080,960,3,11 * from screen_1 to current, a block 3 chunks wide, 11 lines deep * arguments 3 and 4 must be multiples of 8 (16 boundary) *---------------------------------- blockk macro \1,\2,\3,\4,\5,\6 move.l \1,a0 origin screen move.l \2,a1 dest screen add.l \3,a0 precise location (16 boundary) add.l \4,a1 precise location (16 boundary) move.w \5,d6 chunks (1 to 20) move.w \6,d7 height (1 to 200 usually) jsr or_block fully ored with destination endm * same as previous, except that registers are expected * ex: blockk screen_1,$44e,d0,d1,d2,d3 * again arguments 3 and 4 must be multiples of 8 *------------------- * next one will plot a pixel anywhere, in any color * takes 1 h/b to execute. Use sparringly. pixelplot macro \1,\2,\3,\4 move.l \1,a0 the screen required move.w #\2,d0 x position (horizontal) 0-320 move.w #\3,d1 y position (vertical) 0-200 move.w #\4,d2 color (0-15) jsr piplot endm * ex pixelplot $44e,7,100,1 current screen,x pos 7,y line 100,color 1 *----------------------- pixelplott macro \1,\2,\3,\4 move.l \1,a0 the screen required move.w \2,d0 x position (horizontal) 0-320 move.w \3,d1 y position (vertical) 0-200 move.w \4,d2 color (0-15) jsr piplot endm * last letter 't' is repeated. Therefore this macro reads * registers rather than immediate values. * the registers are not fool-checked. Therefore, attention must * be paid not to put 350 for instance in argument 2 or a negative value... * ex pixelplott $44e,d5,d6,d2 current screen,x pos,y pos,color *------------------------------------------------------------ * next one is ideal with collision detections * takes about 1 h/b to execute, ie fast enough, but not to be abused pixelread macro \1,\2,\3 move.l \1,a0 the screen required move.w #\2,d0 x position (horizontal) 0-320 move.w #\3,d1 y position (vertical) 0-200 jsr piread endm * ex pixelread $44e,7,100 current screen, horiz 7, vert 100 * answer will be returned in d2 (w: 0-15) *---------------------- pixelreadd macro \1,\2,\3 move.l \1,a0 the screen required move.w \2,d0 x position (horizontal) 0-320 move.w \3,d1 y position (vertical) 0-200 jsr piread endm * ex pixelreadd $44e,d5,d6 current screen, x,y * answer will be returned in d2 (w: 0-15) *------------------------- startup macro movea.l a7,a5 save stack pointer move.l #stack,a7 set up local stack movea.l 4(a5),a5 standard start up procedure move.l 12(a5),d0 add.l 20(a5),d0 add.l 28(a5),d0 addi.l #256,d0 move.l d0,-(a7) move.l a5,-(a7) clr.w -(a7) move.l d0,proglength move.w #$4a,-(a7) trap #1 lea 12(a7),a7 endm * used at the very begining of a program * (give back to gem all unwanted memory) *--------------------------------------- cursor macro \1 move.w #\1,-(a7) 0=off 1=on 2=flash 3=steady move.w #21,-(a7) trap #14 addq.l #4,a7 endm * ex: cursor 0 cursor off *----------------------------------- * this one clears a particular screen (very quickly!) * all registers smashed! Save if necessary. clear macro \1 move.l \1,a0 add.l #$7d00,a0 ; end of screen moveq.l #0,d0 move.l d0,d1 move.l d1,d2 move.l d2,d3 move.l d3,d4 move.l d4,d5 move.l d5,d6 move.l d6,a1 move.l a1,a2 move.l a2,a3 move.l a3,a4 move.l a4,a5 move.l a5,a6 moveq.w #15-1,d7 loop clr\@ movem.l d0-d6/a1-a6,-(a0) each line clears 52 bytes movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) movem.l d0-d6/a1-a6,-(a0) dbf d7,clr\@ 41*52*15=31980 movem.l d0-d4,-(a0) add 20=32000 endm * ex: clear screen_0 or clear $44E *----------------------------------- * this one clears current screen only * (but not as quickly) * to clear current screen QUICKLY, type clear $44e cls macro movem.l d0-d1/a0,-(sp) move.l $44e,a0 move.w #8000/4-1,d0 moveq #0,d1 erase\@ move.l d1,(a0)+ move.l d1,(a0)+ move.l d1,(a0)+ move.l d1,(a0)+ dbra d0,erase\@ movem.l (sp)+,d0-d1/a0 endm * ex: cls (ie clear current screen) *------------ delay macro \1 move.w #\1,d5 jsr delay endm * ex: delay 8 (waits about 1/2 sec) previously known as 'wait' *-------------------------- wait macro \1 movem.l d5-d6,-(sp) move.w #\1,d6 loop\@ move.l $466,d5 same\@ cmp.l $466,d5 beq same\@ dbra d6,loop\@ movem.l (sp)+,d5-d6 endm * ex: wait 50 (wait 1 second, if in 50hz) *------------------------ jiffy macro \1 move.l d5,-(sp) move.w #\1,d5 waitj\@ nop waste 4 cycles nop nop nop nop dbra d5,waitj\@ another 10 cycles move.l (sp)+,d5 endm * ex: jiffy 1000 (waits 1000*30 cycles) (1/5th of vb) * ex jiffy 10000 (waits 2 v/b) (1/25th sec) * alternatively, vsync vsync would do the same * to wait 1/50th sec, just use 'vsync' or 'wait 1' *---------------------------- sound macro \1 lea \1,a0 jsr dosound endm * ex sound snd8 * snd8 dc.b 0,1,0,4,0,8,etc.. *-------------------------- * will scroll a block on itself, x amount of times scroll macro \1,\2,\3,\4 move.w #\1,d2 # of times move.w #\2,d3 width move.w #\3,d4 bottom left pos + margin move.w #\4,d5 the height jsr scrol endm * ex: scroll 64,64,10303,64 * see example in shell.s where the Budgie logo is scrolled *------------------ palette macro 1 move.l d6,-(sp) lea \1,a0 move.l #$ff8240,a1 move.w #15,d6 d6 will be corrupted palt\@ move.w (a0)+,(a1)+ dbra d6,palt\@ move.l (sp)+,d6 endm * will display a palette * ex: palette palet * or palette screen-32 * to save current palette: jsr save_pal * palette will be stored in a buffer called 'palet' *------------------ * next macro copies a 32k screen from one place to another * for ultimate speed, use movem.l technique as described * in 'clear' macro or in shell's vertical scroll. copyscreen macro 1,2 ;very useful one move.l \1,a0 move.l \2,a1 move.l #8000/4-1,d0 csc\@ move.l (a0)+,(a1)+ move.l (a0)+,(a1)+ move.l (a0)+,(a1)+ move.l (a0)+,(a1)+ dbra d0,csc\@ endm * will copy one screen to another * ex copyscreen screen_0,screen_1 * or copyscreen $44e,screen_1 * or copyscreen $44e,a1 (use a0 as origin, a1 as dest) * *---------------------------- copybytes macro 1,2,3 move.l \1,a0 move.l \2,a1 move.l #\3,d0 this # precludes the use of registers copyb\@ move.b (a0)+,(a1)+ when calling ( must be an actual dbra d0,copyb\@ number like 32000..) endm * ex: copybytes spr_screen,$44e,16000 copies half a screen * or copybytes #palette,a4,34 from palette to wherever * note use of # if actual address, but not if pointer (indirect) *---------------------------- copywords macro 1,2,3 move.l \1,a0 move.l \2,a1 move.l #\3,d0 copyw\@ move.w (a0)+,(a1)+ dbra d0,copyw\@ endm *---------------------------- copylongs macro 1,2,3 move.l \1,a0 move.l \2,a1 move.l #\3,d0 copyl\@ move.l (a0)+,(a1)+ dbra d0,copyl\@ endm *--------------------- reserve macro 1 ex: reserve 32100 move.l #\1,d0 jsr res_mem endm * ex: reserve 32000 move.l d0,buffer_start open file * read buffer_start,29000 close * buffer_start dc.l 0 * file dc.b "jenny.pi1",0 *---------------- * with open, an error check should be made tst.w d0 bmi exit open macro 1 lea.l \1,a0 jsr openfile endm *----------- create macro 1 lea.l \1,a0 jsr f_create endm *----------- read macro 1,2 move.l \1,a0 move.l #\2,d0 jsr readfile endm * ex: open jenny tst.w d0 bmi exit * read #palete,34 read $44e,32000 close * jenny dc.b "jenny.pi1",0 * palete ds.w 17 * again note the use of # when appropriate * next, same with bytes in a register readd macro 1,2 move.l \1,a0 move.l \2,d0 jsr readfile endm *------------------ write macro 1,2 move.l \1,a0 move.l #\2,d0 jsr writefile endm * ex: create fred write #palete,34 write physbase,24000 close * fred dc.b "dump.pic",0 * palete ds.w 17 * physbase dc.l 0 * more details & examples on Include #7, and Final Lap * see how high scores are read and written in Final Lap * nexT, same with bytes in a register writee macro 1,2 move.l \1,a0 move.l \2,d0 jsr writefile endm *------------ close macro jsr closefile endm *------------ bios macro \1,\2 move.w #\1,-(sp) trap #13 addq.l #\2,sp endm xbios macro \1,\2 move.w #\1,-(sp) trap #14 add.l #\2,sp endm gemdos macro Call number, stack reset pushi.w \1 trap #1 ifgt \2-8 lea \2(sp),sp elseif addq.l #\2,sp endc endm *----------- * the next macros are all related [Booker 1988] String macro String to print. Cconwsi string\@ BRA.S dstring\@ string\@ DC.B '\1',13,10,0 dstring\@ EVEN ENDM pushi MACRO Immediate data. IFEQ \1 CLR.\0 -(SP) ELSEIF MOVE.\0 #\1,-(SP) ENDC ENDM Cconwsi MACRO string addr PEA \1 gemdos 9,6 C_CONWS,6 ENDM *ex : string will print hello at current cursor position *-------------- show_mouse macro dc.a $a000 initialize movea.l 4(A0),A1 Crlin. CLR.W 2(A1) MOVE.W #1,6(A1) movea.l 8(A0),A0 Ptsin. CLR.W (A0) DC.W $A009 ENDM hide_mouse macro dc.w $a000 movea.l 8(A0),A0 CLR.W (A0) DC.W $A00A ENDM make_mouse macro dc.w $a000 movea.l 8(A0),A0 Intin. LEA 6(A0),A0 move.l #1,(A0)+ Pen colour=1,mask colour=0. MOVEQ #8-1,D0 LEA \1,A1 a\@ move.l (A1)+,(A0)+ move.l (A1)+,(A0)+ DBRA D0,a\@ DC.W $A00B ENDM *------------ grabr macro \1,\2,\3,\4,\5,\6 move.l \1,a0 origin screen move.l \2,a1 dest screen move.l d6,d0 origin 0 to 32000 move.l d7,d1 to screen 0 to 32000 sub.w #1,d2 adjust height for loop ( 1 to 200) 11/89 jsr fromtoo endm * virtually same as grab, except that height & width are registers * uses registers throughout * ex: grab spr_screen,current_screen,d6,d7,d2,d3 * move from sprite screen to current screen, an object at d6, * to destination d7, size 60*48 (d6 & d7 are 0-32000) *-------------- * for time speed only * first install the hbl routine, see shell.s * now calling before and after, before and after a sprite is drawn, * will reveal how many h/blanks have elapsed during that time * (there are about 312 blanks at 50hz) * if a screen is not completely redrawn within 312 h/b, * a frame will missed. Missing two frames will cause jerky sprites before macro \1 move.w #\1,d0 say 1 lsl.w #1,d0 double for word boundary lea before,a0 array of several 'befores' add.w d0,a0 add offset move.w hbl_ct,(a0) store h/b counter there endm after macro \1 move.w #\1,d0 lsl.w #1,d0 lea after,a0 array of several 'afters' add.w d0,a0 move.w hbl_ct,(a0) endm * ex: before 1 bsr do_something after 1 * now these 2 'stopwatches' must be revealed in some way: * put them in the k_star routine! * now pressing '*' will reveal the time elapsed in horizontal scanlines *----------------- reveall macro \1\2\3\4 move.l \2,-(sp) move.l \3,-(sp) move.l \4,-(sp) move.l \1,d0 move.l #10,d1 decimal (hex is 16, binary is 2) jsr printn move.l (sp)+,\4 move.l (sp)+,\3 move.l (sp)+,\2 printatt \2,\3,\4,#num_buff+14 endm * ex: reveall my_score,2,0,12 * will print on screen, in decimal, a L word held in my_score * in color 2, row 0, line 12 * reveall stands for reveal long *----------------- reveal macro \1 movem.l d0-d7/a0-a6,-(sp) clr.l d0 clean entry move.w \1,d0 WORD on this occasion move.l #10,d1 decimal jsr printn printat 15,0,0,#num_buff+14 movem.l (sp)+,d0-d7/a0-a6 endm * ex: reveal d3 or reveal score or reveal $44e * will print on screen, in decimal, a word * at position 0,0 in ink 15 *-------------------------- getjoy macro clr.b joyport1 joy\@ move.b joyport1,d7 tst.b d7 beq joy\@ endm * waits for joystick to be moved & reports result in D7 * does for joystick what 'getkey' does for keyboard * ex: joystick btst #7,d7 beq fire * if bit 7 in d7 is set: fire has been pressed * other bits: 0 up 1 down 2 left 3 right * save D7 before calling if necessary * joystick routine to be set up once with jsr initjoy *---------------------------------------------------- joystick macro move.b joyport1,d7 clr.b joyport1 avoid repetition endm * merely peeks joystick at a given time * similar to 'rawconio' on the keyboard * reads information in D7, then moves on * note: auto repeat on fire button is off with this macro * to keep it on, don't use this macro, use: btst #7,joyport1 bne fire *--------------------- * acia reads the keyboard acia. Useful when k/b interrupt disabled * acia returns k/b mouse and joystick bytes * this routine is therefore a bit erratic. * Best not touch the mouse acia macro \1 move.b \1,d7 bh\@ cmp.b $fffc02,d7 read acia direct bne bh\@ endm * ex: acia 57 (wait for space to be hit) *------------------------------------------- key macro move.l d7,-(sp) move.b $fffc02,d7 k\@ cmp.b $fffc02,d7 beq k\@ move.l (sp)+,d7 endm * ex: key * this macro is used for debugging * interrupts program anywhere without affecting a single register * program will resume if keyboard or joy/ mouse touched *------------ silence macro movem.l d0/a0,-(sp) lea $ff8800,a0 move.b #0,d0 lp\@ move.b d0,(a0) move.b #255,2(a0) add.b #1,d0 cmp.b #16,d0 bmi lp\@ movem.l (sp)+,d0/a0 endm * ex: silence (after some sound effect that must not linger on) *------------ even soundlist dc.b 00,26,30,26,22,32,30,36,60,42,44,42,22,22 dc.b 32,34,28,26,34,22,52,34,32,32,38,32,34 dc.b 30,30,30,98 (98 end) even soundoffset dc.w 0,26,56,82,104,136,166,202,262,304,348,390,412,434 dc.w 466,500,528,554,588,610,662,696,728,760,798,830,864 dc.w 894,924,954 snd0 DC.B 2,216 \laser medium pitch, med/long repeat DC.B 3,4,4,219,5,5,7,254,8,16,11,223,12,118 DC.B 13,0,128,0,129,0,22,0,255,0 EVEN snd1 DC.B 0,140 \laser, low pitch long DC.B 1,1,2,216,3,4,4,219,5,5,7,254,8,16 DC.B 11,207,12,88,13,0,128,0,129,0,41,0,255,0 EVEN snd2 DC.B 2,216 \same but slower/wavy DC.B 3,4,4,219,5,5,7,254,8,16,11,223,12,118 DC.B 13,0,128,0,129,0,22,0,255,0 EVEN snd3 DC.B 0,0 \electronic high pitch same as 0 DC.B 1,0,7,254,8,16,11,207,12,88,13,0,128,0 DC.B 129,0,41,0,255,0 EVEN snd4 DC.B 0,82 \winding sound DC.B 1,2,2,251,3,13,4,34,5,0,7,248,8,16 DC.B 11,0,12,86,13,0,128,0,129,0,11,0,130,0,255,0 EVEN snd5 DC.B 0,210 \C note low octave long Damonoid DC.B 1,3,2,232,3,3,4,209,5,7,7,248,8,16 DC.B 9,16,10,16,11,111,12,163,13,0,128,0,255,0 EVEN snd6 DC.B 0,$34 channel A DC.B 1,0 2150 hz \bell DC.B 2,0 channel DC.B 3,0 B DC.B 4,0 channel DC.B 5,0 C DC.B 6,0 NOISE DC.B 7,$FE enable A only ($fe = 254) DC.B 8,$10 enable A envelope DC.B 9,0 B off DC.B 10,0 C off DC.B 11,0 single attack... DC.B 12,$10 ...envelope DC.B 13,9 ...shape 1001 DC.B 130,100 delay DC.B 7,255,8,0,255,0 switch off? Not sure. EVEN snd7 DC.B 0,$FE \ambulance long DC.B 1,0,2,0,3,0,4,0,5,0,6,0 DC.B 7,$FE,8,11,9,0,10,0,11,0,12,0 DC.B 13,0,130,20 DC.B 0,$56,1,1,130,20 DC.B 0,$FE,1,0,130,20 DC.B 0,$56,1,1,130,20 DC.B 8,0,9,0,130,50 DC.B 7,255,8,0,255,0 EVEN snd8 DC.B 0,0 \gun fire DC.B 1,0,2,0,3,0,4,0,5,0,6,15 DC.B 7,199,8,16,9,16,10,16,11,0,12,16 DC.B 13,0,130,25 DC.B 8,0,9,0,130,50 DC.B 7,255,8,0,255,0 EVEN snd9 DC.B 0,2 \muffled gun fire (longer duration) DC.B 1,15,2,2,3,15,4,0,5,0,6,10 DC.B 7,199,8,16,9,16,10,16,11,0,12,80 DC.B 13,0,130,20 DC.B 8,0,9,0,10,0,13,100 DC.B 7,255,8,0,255,0 EVEN snd10 DC.B 0,0 \high pitch fire DC.B 1,0,2,0,3,0,4,0,5,0,6,0 DC.B 7,254,8,15,9,0,10,0,11,0,12,0 DC.B 13,0,128,60,129,0,-2,40,130,2 DC.B 7,255,8,0,255,0 snd11 DC.B 0,$40,1,1,2,$38,3,1,8,16,9,16,12,20,13,0,11,20 DC.B 7,%11111100,$FF,0 ;PEARL CAUGHT 22 snd12 DC.B 0,$40,1,0,2,$78,3,0,8,16,9,16,12,20,13,0,11,20 DC.B 7,%11111100,$FF,0 ;ICON SELECTED 22 snd13 DC.B 0,$56,1,0,2,$56,3,0,8,16,9,15,12,1 DC.B 13,10,11,50,7,%11111100,$80,16,$81,9,-1,0 DC.B $FF,0,8,0,$FF,0 ;brikhit 32 snd14 DC.B 0,2,1,15,2,2,3,15,8,16,9,16,12,20,13,10 DC.B 11,20,7,%11111100 DC.B $80,240,$81,1,-16,0,$FF,10,8,0,9,0,$FF,0 ;BOUNCE snd15 DC.B 0,2,1,0,2,2,3,16,8,13,9,13,7,%11110100 DC.B $80,15,$81,6,-1,0,$FF,5,8,5,9,5,$FF,0 ;ZAP snd16 DC.B 0,0,1,15,8,15,12,0,13,4,11,20,7,%11111110 DC.B $80,0,$81,1,1,15,$FF,1,8,0,$FF,0 ;FIRE snd17 DC.B 0,8,1,2,2,12,3,4,8,16,9,16,12,20,13,9 DC.B 11,20,7,%11111100 DC.B $80,200,$81,0,-20,0,$FF,1,8,0,9,0,$FF,0 ;BOUNCE snd18 DC.B 0,0,1,0,8,16,12,70,13,0,11,20,7,%11111110 DC.B $80,0,$81,1,1,255,$FF,0 ;DEAD snd19 DC.B 0,100,1,4,2,101,3,4,8,15,9,15 DC.B 11,0,12,30,7,%11111100 DC.B $FF,5,1,3,3,3,$FF,5,1,2,3,2,$FF,5,1,1,3,1 DC.B $FF,5,1,0,3,0 DC.B $FF,5,13,0,8,16,9,16,$FF,0 ;XTRA snd20 DC.B 0,8,1,2,8,16,12,25,13,9,11,20,7,%11111110 DC.B $80,0,$81,1,1,15,$80,0,$81,1,1,15,$FF,50 DC.B 8,0,9,0,$FF,0 ;BADHIT snd21 DC.B 0,32,1,0,2,80,3,0,8,15,9,16,12,1 DC.B 13,10,11,100,7,%11111100,$80,16,$81,8,-1,0 DC.B $FF,12,9,0,$FF,0 snd22 DC.B 0,20,1,0,2,48,3,0,8,15,9,16,12,1 DC.B 13,10,11,50,7,%11111100,$80,16,$81,8,-1,0 DC.B $FF,10,9,0,$FF,0 ; FACEHIT 32 snd23 DC.B 0,27,1,0,2,48,3,0,8,16,9,16,12,10 DC.B 13,10,11,0,6,30,7,%11111100,$FF,40 DC.B $80,15,$81,8,-1,0,7,%11110100 DC.B $FF,10,9,0,$FF,0 ; FADER 38 snd24 DC.B 0,100,1,5,2,80,3,1,8,15,11,0,12,70,7,%11110110 DC.B $80,0,$81,6,1,31,$FF,3,12,40,13,0,8,16,$FF,0 (32) snd25 DC.B 0,100,1,5,2,80,3,1,8,15,11,0,12,70,7,%11110110 DC.B $80,31,$81,6,-1,0,$FF,3,12,40,13,0,8,16,$FF,0 (34) snd26 dc.b 0,0,1,13,2,0,3,12,4,0,5,15,6,0 rock dc.b 7,$C0,8,16,9,16,10,16,11,0,12,44 dc.b 13,2,130,160 (30) snd27 dc.b 0,0,1,13,2,0,3,12,4,0,5,15,6,0 ship dc.b 7,$F8,8,16,9,16,10,16,11,200,12,200 dc.b 13,2,130,250 (30) snd28 dc.b 3,3,3,%100000,16 dc.b 5,0,64,0 dc.b 4,101 dc.b 4,91 dc.b 4,81 dc.b 4,71 dc.b 4,61 dc.b 4,51 dc.b 4,41 dc.b 4,31 dc.b 4,21 dc.b 4,11 dc.b 255 (s0) silence DC.B 7,%00111111,0,255,0 neutral DC.B 0,254,1,0,2,0,3,0,4,0,5,0,6,0,7,254,8,14 DC.B 9,0,10,0,11,0,12,0,13,0,130,20,8,0,130,0,255,0 EVEN INCLUDE1.S 2.S 3.S 4.S ---------------------------- These assembly language files are required in order to assemble some of the source files on this disks. Together with MACRO.S and SOUNDS.S, they form part of Budgie's 68000 routines library. The full collection of routines, together with the SHELL.S game maker is available separately on Budgie's PRODUCTIVITY disk #2. Ask your licensed distributor. SHELL.S is required to form a ready-made arcade game structure, with full graphics and sound support. Current version is v.41 January 1990 So, what does SHELL.S do anyway? The shell is an ENVIRONMENT from which to control a game and call any macros and subroutines that may be required. Let's be more specific: 1. It 'includes' a few handy macros 2. It then goes into supervisor mode 3. It gives back to gem (m_shrink) any memory it doesn't need to start with. 4. It finds out where ram top is 5. It asks gem to reserve some space (malloc) for work areas which will be needed later on (spare screens, buffers,..) I also asks gem to reserve space for files to be loaded soon (sprites for instance) 6. It initializes the A-line so that we may change the fonts later on. 7. It hides the mouse, the cursor, etc.. 8. It goes into low res, unless monochrome is detected 9. It loads the new fonts from disk, and some tunes. 10. It installs the horizontal blank interrupt routine, if any 11. It resets the bombs vectors 12. It installs the vertical blank interrupt routine, if any 13. It does the same with the mfp interrupts 14. It checks whether ascii files have been interfered with... 15. It checks whether the boot sector is still clean (virus) 16. It executes the opening sequence (title page, etc..) 17. It initializes the sprites 18. It installs the joystick handler routine 19. It installs the mouse handler routine (optional) 20. It declares some of the main initial variables 21. It declares logical_screen and physical_screen 22. It builds up the required scenery 23. It goes on the the MAIN LOOP, called 'main' Fine, the prolog is over. Now for the MAIN LOOP. This is the conductor of the orchestra. The program counter comes back to this LOOP 50 times a second, even if there is nothing to do (if PAUSED for instance). Our program is therefore said to be running at 50 frames. 50 frames means smooth graphics. What does this MAIN LOOP do? 1. It reads the JOYSTICK (or mouse). If there is a request, a BRAnch is made to this appropriate routine 2. It reads the KEYBOARD. If a key has been hit, again a suitable BRAnch is made. Approx 33 keys can be detected. With the exception of ESC, P, and Functions, most of them are for de-bugging purposes. A BRAnch to one of these routines is terminated with a BRAnch back to main (and not with RTS) 3. It then swaps the 2 video pointers so that at the next vertical blank, graphic operations will be directed to the screen NOT being displayed 4. It now waits for the vertical blank. At this point, the video chip redraws the screen (which is the one we were working on during the LAST cycle) 5. The coordinates for all 'automatic' sprites are now being updated 6. Software vertical scroll is executed if asked for 6. The clock is updated. So is the score, etc.. 7. It checks whether the level or the game is finished 8. All sprites are RESTORED. The background is temporarily spriteless 9. Individual PIXELS are read and drawn (if required) 10. All targeted backgrounds are SAVED unless unnecessary 11. Finally, all sprites are DRAWN in their new positions. All this restoring/saving/drawing takes place on the screen which is NOT BEING SHOWN (logbase) 12. it now checks whether such minor things as Pause or Slow Motion are required. 13. at this point, a 1/50th of a second has almost elapsed and it's time to go back to MAIN ! Camy Maertens Budgie UK February 1990 Machine Code in Plain English ----------------------------- Programming in machine code has always carried mysterious connotations. Probably because the instructions, being executed, one for one, by the main processor, have always been typically non-English like. Programmers who think nothing of handling Basic commands like goto or a=a+1, simply go numb when confronted with austere and stern codes such as jmp or add.w #1,a. Yet, they are one and the same. They do precisely the same thing. Being cryptic is not the only machine code shortcoming. Machine instructions are also notoriously simple. They only do one thing. No elaborate routines, just one simple operation at a time. They add, jump, compare or shift things. To execute a command like PRINT "HELLO", dozens, possibly hundreds of machine operations are required: the address of the string "hello" has to be found, the shape of the letter H has to be ascertained, the location of the screen has to be looked up, the position, height and width of the cursor has to be calculated, and the colour of the ink established. Then pixels have to be lit up for the top row of the letter H, and then the next row, and so on. All in all, a daunting task! Fortunately, such a complex programming feat need only be undertaken once. And more often then not, it's been done by somebody else already. So all you have to do, is to call a proven, established routine to do the job for you. Printing the letter H to the screen, for instance, has already been programmed by the Atari and GEM systems programmers. The routine is already in the Operating system, somewhere in ROM. Our task is now simpler. This is how a machine code programmer would print the string "hello" on the screen: move.l #string,-(sp) get address of string and push it on stack move.w #9,-(sp) call 9th gemdos routine trap #1 tell the 68000 processor to go to it addq.l #6,sp restore the stack as we found it ....... string dc.b "hello",0 our string! It can be seen from the above example that a vast number of instructions has been reduced to just four. The actual machine work of course hasn't changed. All we are doing is to tell someone who knows how to write a string to the screen to do it for us. The number of machine cycles remains the same: literally thousands of operations, but the number of instructions needed to activate them was down to four. We can even reduce the number of instructions further, right down to one in fact, and remedy the first problem associated with low level languages at the same time. First, we'll give our print routine a name, say print_hello. Each time, we want the word "hello" to appear on screen, all we have to type is BSR print_hello This means Branch Sub Routine print_hello The subroutine is usually terminated with a RTS instruction, ie RETURN Suitably labelled subroutines are a giant step towards the clarity offered by a high level language, such as Basic. Macros are another way or making your code plainer: macros are a name given to a set of pre-defined instructions. Many programmers, including the ones at Budgie UK, no longer use system calls (TRAP) like the one above, or even subroutines (like BSR print_hello). Instead we merely say PRINT hello. How close to plain English Basic can you get... Except of course, that our 'plain' instruction will be executed at eight million cycles a second, in glorious machine code! I hope to bring you more examples of to-days human face of machine code in another article. Camy Maertens July 1989 . e t.. e tLYNNE_15S ft ELYNNE_15PRGkt LISA_14 PRGot 5LISA_14 S st SEMUSIC DOCct |SCARY_2 S |t R;SCARY_2 PRGt zBUDGIE3 PI1t B}LA_8 PRGt e LA_8 S t 2; this is Gary Wheaton music driver ; the tune will play during the vertical blank. ; the slot chosen in the v/b queue is fairly high up ; which means that it is immune from interference ; this code is copyright Gary Wheaton Nov 1989 ; Gary Wheaton and the Shapeshifters are members ; of the Budgie UK group. ; Budgie UK Licenceware: the fairer face of PD ; lynne January 1990 MOVE.L A7,A5 MOVE.L 4(A5),A5 MOVE.L $C(A5),D0 ADD.L $14(A5),D0 ADD.L $1C(A5),D0 ADD.L #$1100,D0 MOVE.L A5,D1 ADD.L D0,D1 AND.L #-2,D1 MOVE.L D1,A7 MOVE.L D0,-(SP) MOVE.L A5,-(SP) MOVE.W D0,-(SP) MOVE.W #$4A,-(SP) ; Setblock. TRAP #1 ADD.L #12,SP CLR.L -(SP) ; Enter supervisor mode. MOVE.W #$20,-(SP) ; Super. TRAP #1 ADDQ.L #6,SP MOVE.L D0,SUPER ; Save old status clr.l $200 not.l $200 on/off switch bclr #0,$484 no keyclick bclr #1,$484 no repeat key move.l #vbi,$4de start vbi interrupt MOVE.L SUPER,-(SP) user mode MOVE.W #$20,-(SP) TRAP #1 ADDQ.L #6,SP MOVE.W #0,-(SP) quit and stay MOVE.L #1024*10,-(SP) MOVE.W #$31,-(SP) TRAP #1 SL EQU $FF8800 SD EQU $FF8802 move.b #7,sl move.b #%11111000,sd MOVE.B #$08,SL MOVE.B #15,SD MOVE.B #$0,SL MOVE.B #96,SD MOVE.B #$01,SL MOVE.B #$00,SD vbi movem.l d0-d7/a0-a6,-(sp) tst.l $200 beq quiet move.b #7,sl added 1/90 move.b #%11111000,sd added 1/90 CMP.B #97,$FFFC02 Beq end_it MOVE.L UPTO,A2 MOVE CUNT,D3 MOVE.B 33(A2),D4 SSU SUBQ.W #1,D3 BPL.S PART1 COP MOVE.L #1,PNT0 MOVE.L #1,PNT1 MOVE.L #1,PNT2 MOVE.L #1,PNT3 MOVE.L #1,PNT4 MOVE.L #1,PNT5 MOVE.L #$9000000,SL ADD.L #36,a2 CMP.L #CHAN0,A2 BNE.S LLA LEA DOTH,A2 LLA MOVE 34(A2),D3 MOVE.B 33(A2),D4 PART1 CLR.B D2 BTST #1,D4 BEQ.S W1 MOVE.L (A2),A1 MOVE.L 4(A2),A0 BSR CHAN0 W1 BTST #2,D4 BEQ.S W2 MOVE.L 8(A2),A1 MOVE.L 12(A2),A0 BSR CHAN0 W2 MOVEQ.B #1,D2 BTST #3,D4 BEQ.S W3 MOVE.L 16(A2),A1 MOVE.L 20(A2),A0 BSR CHAN0 W3 BTST #4,D4 BEQ.S W4 MOVE.L 24(A2),A1 MOVE.L 28(A2),A0 BSR CHAN0 W4 MOVE.L A2,UPTO MOVE D3,CUNT movem.l (sp)+,d0-d7/a0-a6 RTS end_it bclr #6,$fffa11 acknowledge key press interrupt lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) move.l #0,$4de end interrupt movem.l (sp)+,d0-d7/a0-a6 rts on_off bclr #6,$fffa11 not.l $200 toggle on/off lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) movem.l (sp)+,d0-d7/a0-a6 rts quiet movem.l (sp)+,d0-d7/a0-a6 return rts even quiet_flag dc.b 0 even super dc.l 0 res dc.w 0 palette ds.w 16 SV DC.L 0 DC.B " (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. " DC.B " TITLE ****SONG FOR LYNNE**** " DC.B " COMOPOSED BY G.WHEATON. JAN. 1990" EVEN UPTO DC.L EE-36 CUNT DC.W 0 EVEN ;\\RUNNING ORDER SEQUENCE doth ee DC.L PNT5,fol DC.L PNT0,fol DC.L PNT2,pat DC.L PNT3,drm DC.B 2,%00011110 DC.W 64*16 DC.L PNT4,LED DC.L PNT0,FOL DC.L PNT2,pat DC.L PNT3,drm DC.B 1,%00011110 DC.W 64*16 DC.L PNT4,Flex DC.L PNT0,led DC.L PNT2,pat DC.L PNT3,drm DC.B 1,%00011110 DC.W 64*16 DC.L PNT4,Flex DC.L PNT0,flex2 DC.L PNT2,pat DC.L PNT3,drm DC.B 1,%00011110 DC.W 64*16 DC.L PNT5,pat DC.L PNT0,pat1 DC.L PNT2,fol DC.L PNT3,drm DC.B 0,%00011110 DC.W 64*16 DC.L PNT5,flex DC.L PNT0,pat1 DC.L PNT2,fol DC.L PNT3,drm DC.B 0,%00011110 DC.W 64*16 DC.L PNT4,lex DC.L PNT0,tex DC.L PNT2,pat DC.L PNT3,drm DC.B 0,%00011110 DC.W 64*16 DC.L PNT4,lead1 DC.L PNT0,pat DC.L PNT2,fol DC.L PNT3,drm DC.B 2,%00011110 DC.W 64*16 DC.L PNT5,flex DC.L PNT0,tex DC.L PNT2,pat DC.L PNT3,drm DC.B 2,%00011110 DC.W 64*16 DC.L PNT4,lead1 DC.L PNT0,flex DC.L PNT2,pat DC.L PNT3,drm DC.B 1,%00011110 DC.W 64*16 DC.L PNT4,flex DC.L PNT0,flex2 DC.L PNT2,pat DC.L PNT3,drm DC.B 2,%00011110 DC.W 64*16 DC.L PNT5,pat1 DC.L PNT0,pat DC.L PNT2,fol DC.L PNT3,drmm DC.B 0,%00011110 DC.W 64*16 DC.L PNT5,pat1 DC.L PNT0,pat DC.L PNT2,tex DC.L PNT3,drmm DC.B 0,%00011110 DC.W 64*16 DC.L PNT5,pat1 DC.L PNT0,flex DC.L PNT2,fol DC.L PNT3,drmm DC.B 2,%00011110 DC.W 64*16 DC.L PNT5,pat1 DC.L PNT0,pat DC.L PNT2,fol DC.L PNT3,drmm DC.B 1,%00011110 DC.W 64*16 DC.L PNT5,pat DC.L PNT0,flex DC.L PNT2,tex fol DC.L PNT3,drmm DC.B 3,%00011110 DC.W 64*16 CHAN0 ;\\\\\\\\\\\\\\\\\\\\\\ MOVE (A1),D0 ADD D0,A0 MOVE.L (A0),D1 ;GET NOTE 0 & DURATION MOVE.B 13(A1),D5 EXT.W D5 SWAP D1 ADD D5,D1 SWAP D1 CMP #$FFFF,D1 BNE CON2 CLR (A1) ;RESET TO START SUB D0,A0 MOVE.L (A0),D1 CON2 SUBQ.B #1,3(A1) ;NP0 BNE STILLON MOVE.L D1,6(A1) ;TMP0 \D1.W IS DURATION MOVE.L D1,20(A1);TEMP HOLD NOTE MOVE.B 26(A1),4(A1) ;VOL0 MOVE D1,2(A1) ;NP0 \SET NEW DURATION ADDQ.W #4,(A1) ; & INC POINTER STILLON ;\\VOLUME RFF ;\\\\\\\\\EFFECTS\\\\\\\\\\ NV0 MOVE.B 2(A1),D0 CMP.B #4,D0 BNE DOIT ADDQ.B #1,4(A1) RTS DOIT DZZ MOVE.B #7,SL MOVE.B #%11111000,SD BRA FCC EFCT DC.L FINK,VIB,WARB,DRUM,slip,WB1,WRP,SLW DC.L SLR,HOLD,TWERP,SLR1,inup,HOLDLOW,Half dc.l holl,coll,foll,aoll,eoll REPT 11 DC.L FINK ENDR FCC LEA EFCT,A6 AND #31,D0 ASL #2,D0 MOVE.L (A6,D0),A0 JSR (A0) MAZ ADDQ.B #1,4(A1) ;VOL0 MOVE.B 11(A1),SL MOVE.B 21(A1),SD ;TMP0+1 MOVE.B 12(A1),SL MOVE.B 20(A1),SD ;TMP0 CLR D0 MOVE.B 4(A1),D0 MOVE.B 10(A1),SL MOVE.B 28(A1,D0),D2 ;VOL0 MOVE.B D2,SD fink rts ;-------EFFECTS ROUTINES-------- ;1-256---DELAYED--VIBRATO------- VV EOR.B #1,MC BEQ.S SDC VIB CMP.B #8,4(A1) BLT SDC WWQ SUB.B #1,24(A1) BNE SDC MOVE.B 25(A1),24(A1) MOVE 16(A1),D1 ADD D1,18(A1) MOVE 14(A1),D1 CMP 18(A1),D1 BLT.S RIST KJ NEG D1 CMP 18(A1),D1 BGT.S RIST SAZ MOVE 6(A1),D1 ADD 18(A1),D1 MOVE D1,20(A1) SDC RTS RIST NEG 16(A1) BRA.S SAZ ;2-512------WARB DW----------- XX DC.B 0,0 WARB addq.b #5,4(A1) SAX Lsr 20(A1) ;Lsr 20(A1) CMP #30,20(A1) BGT.S PLOP MOVE 6(A1),20(A1) PLOP RTS ;3--768--------DRUM----------- DRUM ;eor.b #1,lil ;bne.s junk SUBQ.B #4,19(A1) MOVE.B #7,SL MOVE.B #%11011000,SD MOVE.B #6,SL MOVE.B 19(A1),SD MOVE.B #5,SL MOVE.B 32(A2),SD MOVE.B #4,SL MOVE.B 19(A1),D0 ASL.B #5,D0 MOVE.B D0,SD JUNK RTS lil dc.b 0,0 ;------4 1024 slip ;5--1280--WARB CONSTANT VOLUME WB1 MOVE.B #5,4(A1) BRA.s SAX ;6--1536-----WARB UP--------- WRP ;addq.B #2,4(A1) SDX LSR 20(A1) CMP #35,20(A1) BGT PLAP MOVE 6(A1),20(A1) PLAP bra vib wwq RTS ;7--1792---SLIDE-UP--WARBLE SLW MOVE.B #7,4(a1) BRA wwq ;--2048---SLIDE UP CONST VOL SLR ADD.W #80,20(A1) RTS YIN DC.B 0,0 ;9--2304-------HOLD------------- HOLD MOVE.B #20,4(A1) RTS ;------10 2560 TWERP MOVE.B #8,4(a1) rts ;11-------2816 SLIDE UP WITH ADSR SLR1 CMP #72,6(A1) BGT WAQ BTST #1,$469 BEQ.S F1 MOVE #72,6(A1) BRA WWQ F1 MOVE #36/2,6(A1) BRA WWQ WAQ SUBQ.W #8,6(A1) MOVE.B #16,4(A1) BRA SDX tp dc.b 0,0 ;12-------3072 inup move.b #8,4(a1) bra WWQ ;13-------3328--HOLD VOL LOW HOLDLOW CMP.B #1,4(A1) BNE.S DOPL ASL 20(A1) RTS DOPL MOVE 6(A1),20(A1) BRA VIB WWQ ; ;14--------dw A half ADDQ.B #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move dw(pc,d1),20(a1) rts dw dc.w 144,96,72,96/2 ;15--------DW G holl ADDQ.B #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move dq(pc,d1),20(a1) rts dq dc.w 162,108,81,64 ;16--------DW C Coll ADDQ.B #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move Eq(pc,d1),20(a1) rts Eq dc.w 121,81,60,40 ;17--------DW F Foll ADDQ.B #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move Rq(pc,d1),20(a1) rts Rq dc.w 182,121,91,60 ;18--------DW Am aoll addq.b #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move aq(pc,d1),20(a1) rts aq dc.w 144,96,72,57,32 ;19--------DW E eoll addq.b #1,RONK move.b RONK,d1 and #3,d1 asl #1,d1 move eeq(pc,d1),20(a1) rts eeq dc.w 193,128,96,64 RONK DC.B 0,0 ;\\\\\\\\\\\\\\DATAS\\\\\\\\\\\\\\\ ;\\NOTE 1ST WORD. DURATION 2ND WORD ;\\\LEAD PNT0 DC.W 0 NP0 DC.W 1 DC.W 0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD TO NOTE DC.W 11 ;VIB LIMIT DC.W 7 ;16(A1) ADD DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24(A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,13 DC.B 14,13,12,11,11,11,11,11,10,10,10,10 DC.B 9,9,9,9 DC.B 10,9,8,6,8,7,7,7,7 dcb.b 50,6 dcb.b 50,5 EVEN ;\\\MIDDLE PNT1 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD 13(A1) DC.W 6 ;VIB LIMIT DC.W 2 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,14,12,10,9,8,8,8,9,9,8 DC.B 8,8,7,7,6,6,7,6,6,5,4,4 DCB.B 10,5 DCB.B 10,6 DCB.B 10,7 DCB.B 10,8 DCB.B 10,9 DCB.B 10,10 DCB.B 10,12 DCB.B 10,10 DCB.B 10,9 DCB.B 10,7 DCB.B 10,4 EVEN ;\\\BASS PNT2 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,4,5 ;10(A1) VOL REG DC.B 0 ;ADD TO NOTE 13(A1) DC.W 5 ;VIB LIMIT DC.W 2 ;VIBRATO ADD 16(A1) DC.W 2 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) ADSR DC.B 15,15,13,13,13,13,13,12,12,11,10,9 dcb.b 155,9 EVEN PNT3 DC.W 0 NP3 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,6,11 ;10(A1) VOL REG DC.B -1 ;ADD 13(A1) DC.W 4 ;VIB LIMIT DC.W 1 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,13,12,11,10 DC.B 9,8,7,6,5,4,3,2,1 EVEN PNT4 DC.W 0 NP4 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 DC.B 8,0,1 ;10(A1) VOL REG DC.B 0 ;ADD 13(A1) DC.W 3 ;VIB LIMIT DC.W 2 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,15,14,14,14,13,13,12,12 REPT 22 DC.B 11 ENDR REPT 22 DC.B 9 ENDR REPT 22 DC.B 8 ENDR REPT 22 DC.B 7 ENDR REPT 22 DC.B 5 ENDR REPT 24 DC.B 3 ENDR REPT 24 DC.B 2 ENDR REPT 64 DC.B 1 ENDR PNT5 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 8,0,1 DC.B 2 ;ADD 13(A1) DC.W 7 ;VIB LIMIT DC.W 4 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,14,13,12,12,11,11,10,10,10 DC.B 8 DCb.B 10,8 DCb.B 20,7 DCb.B 30,6 DCb.B 140,5 EVEN TE2 DC.W 2,3 MAX DC.B 71,32,87,72,69,65,84,79,78 DRI DC.B 251,0 MIN DC.B 0,0 MC DC.B 0,0 EVEN ;-----------MUSIC DATA NULL DC.W 2,128+2304 DC.W $FFFF,$FFFF s=2304 u=8 f=256 pat dc.w 121*u,16 dc.w 121*u,16 dc.w 0,8+s dc.w 121*u,16 dc.w 0,8+s dc.w 121*u,16 dc.w 0,24+s dc.w 108*u,8 dc.w 108*u,8 dc.w 96*u,8 dc.w 121*u,16 dc.w 121*u,16 dc.w 0,8+s dc.w 121*u,12 dc.w 0,4+s dc.w 121*u,8 dc.w 121*u,16 dc.w 0,24+s dc.w 121*u,8 dc.w 121*u,8 dc.w 128*u,8 dc.w 144*u,16 dc.w 144*u,16 dc.w 0,8+s dc.w 144*u,16 dc.w 0,8+s dc.w 144*u,16 dc.w 0,16+s dc.w 162*u,32+a dc.w 144*u,16 dc.w 144*u,16 dc.w 0,8+s dc.w 144*u,16 dc.w 0,8+s dc.w 144*u,16 dc.w 0,24+s dc.w 144*u,8 dc.w 144*u,8 dc.w 162*u,8 dc.w 182*u,16 dc.w 182*u,16 dc.w 0,8+s dc.w 182*u,16 dc.w 0,8+s dc.w 182*u,16 dc.w 0,48+s dc.w 182*u,16 dc.w 182*u,16 dc.w 0,8+s dc.w 182*u,16 dc.w 0,8+s dc.w 182*u,16 dc.w 0,16+s dc.w 172*4,2 dc.w 172*u,30+a dc.w 162*u,16 dc.w 162*u,16 dc.w 0,8+s dc.w 162*u,16 dc.w 0,8+s dc.w 162*u,16 dc.w 0,24+s dc.w 144*u,8 dc.w 144*u,8 dc.w 128*u,8 dc.w 162*u,16 dc.w 162*u,16 dc.w 0,8+s dc.w 162*u,12 dc.w 0,4+s dc.w 162*u,8 dc.w 162*u,16 dc.w 0,16+s dc.w 108*u,16 dc.w 96*u,16 DC.W $FFFF,$FFFF drm dc.w 0,32+1024 dc.w 6,4+768 dc.w 0,28+1024 DC.W $FFFF,$FFFF DRMm DC.W 2,16+1024,0,1+768,18,7+768,2,8+1024 DC.W 2,16+1024,16,4+768,2,12+1024 DC.W 2,16+1024,4,8+768,2,8+1024 DC.W 2,16+1024,16,4+768,2,12+1024 DC.W 2,16+1024,4,8+768,2,8+1024 DC.W 2,16+1024,16,4+768,2,12+1024 sholl DC.W 2,16+1024,4,8+768,2,8+1024 DC.W 2,16+1024 DC.W 8,8+768,8,8+768 DC.W $FFFF,$FFFF t=2 Y=3328 led dc.w 96*t,24+Y dc.w 91*t,24 dc.w 81*t,16+Y dc.w 81*t,24 dc.w 91*t,24+Y dc.w 96*t,16+Y dc.w 96*t,24+Y dc.w 91*t,24+Y dc.w 81*t,16+Y dc.w 81*t,24+Y dc.w 91*t,24+Y dc.w 96*t,16+Y dc.w 121*t,24+Y dc.w 108*t,24+Y dc.w 96*t,16+Y dc.w 96*t,24+Y dc.w 108*t,24+Y dc.w 121*t,16+Y dc.w 121*t,24+Y dc.w 108*t,24 dc.w 96*t,16+Y dc.w 108*t,24 dc.w 121*t,24+Y dc.w 108*t,16 dc.w 182*t,24+Y dc.w 162*t,24 dc.w 144*t,16+Y dc.w 144*t,24+Y dc.w 162*t,24+Y dc.w 182*t,16 dc.w 182*t,24+Y dc.w 162*t,24 dc.w 144*t,16+Y dc.w 144*t,24+Y dc.w 162*t,24+Y dc.w 182*t,16 dc.w 162*t,24+Y dc.w 144*t,24+Y dc.w 128*t,16+Y dc.w 128*t,24+Y dc.w 144*t,24+Y dc.w 162*t,16+Y dc.w 162*t,24+Y dc.w 144*t,24+Y dc.w 128*t,16+Y dc.w 128*t,24+Y dc.w 121*t,24+Y dc.w 108*t,16+Y DC.W $FFFF,$FFFF lex dc.w 96,128+16*256 dc.w 96,64+16*256 dc.w 96,32+16*256 dc.w 108,32+16*256 dc.w 121,128+18*256 dc.w 121,64+18*256 dc.w 121,64+18*256 dc.w 91,128+17*256 dc.w 91,64+17*256 dc.w 81,32+15*256 256 dc.w 72,32+14*256 256 dc.w 81,128+15*256 256 dc.w 81,32+15*256 256 dc.w 81,32+15*256 256 dc.w 81,24+14*256 256 dc.w 0,8+S dc.w 81,32+15*256 256 DC.W $FFFF,$FFFF Flex dc.w 96,128+16*256 dc.w 96,128+16*256 dc.w 121,128+18*256 dc.w 121,128+18*256 dc.w 91,128+17*256 dc.w 91,64+17*256 dc.w 81,32+15*256 256 dc.w 72,32+14*256 256 dc.w 81,128+15*256 256 dc.w 81,128+15*256 256 DC.W $FFFF,$FFFF flex2 dc.w 0,3+s Tex dc.w 96,128+256 dc.w 96,128+256 dc.w 121,128+256 dc.w 121,128+256 dc.w 91,128+256 dc.w 91,64+256 dc.w 81,32+256 dc.w 72,32+256 dc.w 81,128+256 dc.w 81,128+256 DC.W $FFFF,$FFFF TT=16 A=3072 FOL DC.W 60*TT,2+A DC.W 121*TT,126+A DC.W 60*TT,8+A DC.W 121*TT,104+A DC.W 114*TT,2+A DC.W 108*TT,2+A DC.W 102*TT,2+A DC.W 96*TT,2+A DC.W 91*TT,2+A DC.W 85*TT,2+A DC.W 81*TT,2+A DC.W 76*TT,2+A DC.W 72*TT,8+A DC.W 144*TT,120+A DC.W 72*TT,8+A DC.W 144*TT,120+A DC.W 91*TT,8+A DC.W 182*TT,120+A DC.W 91*TT,8+A DC.W 182*TT,112+A DC.W 180*TT,1+A DC.W 178*TT,1+A DC.W 176*TT,1+A DC.W 174*TT,1+A DC.W 172*TT,1+A DC.W 170*TT,1+A DC.W 168*TT,1+A DC.W 166*TT,1+A DC.W 81*TT,16+A DC.W 162*TT,112+A DC.W 81*TT,8+A DC.W 162*TT,104+A DC.W 167*TT,1+A DC.W 172*TT,1+A DC.W 177*TT,1+A DC.W 182*TT,1+A DC.W 187*TT,1+A DC.W 192*TT,1+A DC.W 202*TT,1+A DC.W 207*TT,1+A DC.W 212*TT,1+A DC.W 217*TT,1+A DC.W 222*TT,1+A DC.W 227*TT,1+A DC.W 237*TT,1+A DC.W 243*TT,3+A DC.W $FFFF,$FFFF tr=1 yy=256 lead1 dc.w 0,1 lead dc.w 96*tr,24+yy dc.w 91*tr,24 dc.w 81*tr,16+yy dc.w 81*tr,24 dc.w 91*tr,24+yy dc.w 96*tr,16+yy dc.w 96*tr,24+yy dc.w 91*tr,24+yy dc.w 81*tr,16+yy dc.w 81*tr,24+yy dc.w 91*tr,24+yy dc.w 96*tr,16+yy dc.w 121*tr,24+yy dc.w 108*tr,24+yy dc.w 96*tr,16+yy dc.w 96*tr,8+yy dc.w 96*tr,8+yy dc.w 96*tr,8+yy dc.w 108*tr,24+yy dc.w 121*tr,16+yy dc.w 121*tr,24+yy dc.w 108*tr,24 dc.w 96*tr,16+yy dc.w 108*tr,8 dc.w 121*tr,8 dc.w 108*tr,8 dc.w 121*tr,24+yy dc.w 128*tr,16 dc.w 182*tr,24+yy dc.w 162*tr,24 dc.w 158*tr,4+yy 2560 dc.w 154*tr,4+yy 2560 dc.w 150*tr,4+yy 2560 dc.w 146*tr,4+yy 2560 dc.w 144*tr,24+yy dc.w 162*tr,24+yy dc.w 182*tr,16 dc.w 182*tr,24+yy dc.w 162*tr,24 dc.w 144*tr,16+yy dc.w 144*tr,24+yy dc.w 162*tr,24+yy dc.w 182*tr,8 dc.w 0,8+s dc.w 162*tr,24+yy dc.w 144*tr,8+yy dc.w 0,16+s dc.w 162*tr,8 dc.w 0,8+s dc.w 144*tr,24+yy dc.w 128*tr,8+yy dc.w 0,16+s dc.w 144*tr,8 dc.w 0,8+s dc.w 128*tr,24+yy dc.w 121*tr,16+yy dc.w 108*tr,24 +yy dc.w 108*tr,24+yy dc.w 121*tr,24+yy dc.w 108*tr,32+yy DC.W $FFFF,$FFFF i=2 j=1536 pat1 dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 81*i,64+j dc.w 81*i,8+j dc.w 96*i,8+j ;dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 81*i,64+j dc.w 121*i,16+j dc.w 144*i,16+j dc.w 144*i,16+j dc.w 144*i,16+j dc.w 96*i,64+j dc.w 144*4,8 dc.w 193*4,8 dc.w 144*i,16+j dc.w 144*i,16+j dc.w 144*i,16+j dc.w 96*i,64+j dc.w 144*4,8 dc.w 193*4,8 dc.w 182*i,16+j dc.w 182*i,16+j dc.w 182*i,16+j dc.w 121*i,64+j dc.w 193*4,8 dc.w 193,8+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 144*i,64+j dc.w 162*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 144*i,48+j dc.w 162*i,32+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 121*i,16+j dc.w 144*i,32+j dc.w 162*i,32+j dc.w 144*i,32+j DC.W $FFFF,$FFFF `*O*m - ЭЭ" Ҁ.A// ??<JNA B?< NA\#BF#/9?< NA\?</<(?<1NA`HJg< 9ag$y69*!SCjb#X## # Z# # # $fE6*"*!Bg "R jag "j j axtg "j jadg "j jaR#3LNuA|#LNuFA|LNuLNu (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. TITLE ****SONG FOR LYNNE**** COMOPOSED BY G.WHEATON. JAN. 1990 X Z  >X Z  JX> Z  JXv Z  XZ  Z  JXZ  Z  Xz Z  bX  Z  JXz Z  bXJ Z  JXv Z  ZX  Z  ZX z Z  ZXJ  Z  ZX  Z  XJ z Z 0") HHAEHA|fBQ"S)f#A#Ai3AXQ)<fR)Nu`~0< &.fp400000000000Mf@@ vNR)  B@) 1Nu 9 g@ )m8)f.i2)i2)imDAin2)i3ANuDi`Z) in3iNuY) )Nu|` i#n3i`4|`4iPNu|Nu|Nu iHn 9ig 3|H`3|`Qi|`|` )fNu3i`R9V9VAA3{Nu`H0R9V9VAA3{NulQ@R9V9VAA3{NuyQ<(R9V9VAA3{Nuy[ 9N"//<"??<?NA yN /?<NN\ 9N//<}??<?NA ??<>NAX yN /?<NN\?<NAT@?9b/9N/9N?<NNO LdH@/9^?< NA\?</<(?<1NA`HC )ag )bgAJg0$y69*!SCjb### # f# # # $LfE6*"*!Bg "R jag "j j atg "j jag "j ja#3LNuA|#LNuFA|LNuLNu G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. TITLE **** LISA'S SONG *** COMOPOSED BY G.WHEATON. JAN. 1990. H f @   fp P f @  f @  f @ H  f @h f @  P f   P fp0") HHAEHA|fBQ"S)f#A#Ai3AXQ)<fR)Nu`@6B(0Bz@ {NR)  B@) 1Nu 9 =g@ )m8)f.i2)i2)imDAin2)i3ANuDi`Z) in3iNuY) )Nu|`|  i#n3iNu|`0iPNu|Nu 9|` iHn 9ig 3|H`3|`Qi|`| i5`|Nu9iAA3{Nu`H0R)9iAA3{NulQ@                            G WHEATON  @@@@@@@@````h```0@lf`/`/`/`/`/`/5l  D @8  D@  p(024<DXD  D pHp8` @  D x4H\p  4yyyyyyxwvutsrqponml.l:vX 6TvzB* j =        llly l yllly l l @ @@@ x  x  d h @ h  a:\*.pi1B: X6hT; this is Gary Wheaton music driver ; the tune will play during the vertical blank. ; the slot chosen in the v/b queue is fairly high up ; which means that it is immune from interference ; this code is copyright Gary Wheaton Nov 1989 ; Gary Wheaton and the Shapeshifters are members ; of the Budgie UK group. ; Budgie UK Licenceware: the fairer face of PD ; lisa January 1990 MOVE.L A7,A5 MOVE.L 4(A5),A5 MOVE.L $C(A5),D0 ADD.L $14(A5),D0 ADD.L $1C(A5),D0 ADD.L #$1100,D0 MOVE.L A5,D1 ADD.L D0,D1 AND.L #-2,D1 MOVE.L D1,A7 MOVE.L D0,-(SP) MOVE.L A5,-(SP) MOVE.W D0,-(SP) MOVE.W #$4A,-(SP) ; Setblock. TRAP #1 ADD.L #12,SP CLR.L -(SP) ; Enter supervisor mode. MOVE.W #$20,-(SP) ; Super. TRAP #1 ADDQ.L #6,SP MOVE.L D0,SUPER ; Save old status ******* dc.w $a000 MOVEA.L 8(A0),A0 CLR.W (A0) DC.W $A00A hidemouse movem.l $ff8240,d0-d7 movem.l d0-d7,palette getrez move.w #4,-(sp) trap #14 addq.l #2,sp move.w d0,res setlowrez CLR.W -(A7) 0=low res MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 clr.l $200 not.l $200 on/off switch bclr #0,$484 no keyclick bclr #1,$484 no repeat key move.l #vbi,$4de start vbi interrupt * load a degas picture at a specific address MOVE.W #0,-(A7) pea name(pc) MOVE.W #$3D,-(A7) TRAP #1 add.l #8,sp MOVE.W D0,d7 handle move.l $44e,d0 load direct to current screen sub.l #34,d0 MOVE.L d0,-(sp) MOVE.L #34,-(A7) read it MOVE.W d7,-(A7) handle MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP move.l $44e,d0 load direct to current screen MOVE.L d0,-(sp) MOVE.L #32000,-(A7) read it MOVE.W d7,-(A7) handle MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 MOVE.W d7,-(SP) close MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP getkey MOVE.W #$07,-(SP) TRAP #1 ADDQ.L #2,SP ANDI.W #$DF,D0 force upper case * restore res move.w res,-(A7) MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 movem.l palette,d0-d7 movem.l d0-d7,$ff8240 MOVE.L SUPER,-(SP) user mode MOVE.W #$20,-(SP) TRAP #1 ADDQ.L #6,SP MOVE.W #0,-(SP) quit and stay MOVE.L #1024*10,-(SP) MOVE.W #$31,-(SP) TRAP #1 SL EQU $FF8800 SD EQU $FF8802 move.b #7,sl move.b #%11111000,sd MOVE.B #$08,SL MOVE.B #15,SD MOVE.B #$0,SL MOVE.B #96,SD MOVE.B #$01,SL MOVE.B #$00,SD vbi movem.l d0-d7/a0-a6,-(sp) lea $fffc00,a1 acia cmp.b #$61,2(a1) undo beq end_it cmp.b #$62,2(a1) help beq on_off lea $200,a0 tst.l (a0) beq quiet move.b #7,sl move.b #%11111000,sd mixer MOVE.L UPTO,A2 MOVE CUNT,D3 MOVE.B 33(A2),D4 SSU SUBQ.W #1,D3 BPL.S PART1 COP MOVE.L #1,PNT0 MOVE.L #1,PNT1 MOVE.L #1,PNT2 MOVE.L #1,PNT3 MOVE.L #1,PNT4 MOVE.L #1,PNT5 MOVE.L #$9000000,SL ADD.L #36,a2 CMP.L #CHAN0,A2 BNE.S LLA LEA DOTH,A2 LLA MOVE 34(A2),D3 MOVE.B 33(A2),D4 PART1 CLR.B D2 BTST #1,D4 BEQ.S W1 MOVE.L (A2),A1 MOVE.L 4(A2),A0 BSR CHAN0 W1 BTST #2,D4 BEQ.S W2 MOVE.L 8(A2),A1 MOVE.L 12(A2),A0 BSR CHAN0 W2 MOVEQ.B #1,D2 BTST #3,D4 BEQ.S W3 MOVE.L 16(A2),A1 MOVE.L 20(A2),A0 BSR CHAN0 W3 BTST #4,D4 BEQ.S W4 MOVE.L 24(A2),A1 MOVE.L 28(A2),A0 BSR CHAN0 W4 MOVE.L A2,UPTO MOVE D3,CUNT movem.l (sp)+,d0-d7/a0-a6 RTS end_it bclr #6,$fffa11 acknowledge key press interrupt lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) move.l #0,$4de end interrupt movem.l (sp)+,d0-d7/a0-a6 rts on_off bclr #6,$fffa11 not.l $200 toggle on/off lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) movem.l (sp)+,d0-d7/a0-a6 rts quiet movem.l (sp)+,d0-d7/a0-a6 return rts even quiet_flag dc.b 0 even DC.B " G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. " ;EVEN super dc.l 0 res dc.w 0 palette ds.w 16 *------------------------ ; TITLE **** LISA'S SONG *** ; COMOPOSED BY G.WHEATON. JAN. 1990. SV DC.L 0 DC.B " (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. " DC.B " TITLE **** LISA'S SONG *** " DC.B " COMOPOSED BY G.WHEATON. JAN. 1990." UPTO DC.L EE-36 CUNT DC.W 0 EVEN ;\\RUNNING ORDER SEQUENCE ee doth DC.L PNT4,bass DC.L PNT0,tron DRIFT BASS DC.L PNT2,NULL DC.L PNT3,DRSM DC.B 2,%00011110 DC.W 64*8 DC.L PNT4,bass DC.L PNT0,JIV git DC.L PNT2,gt1 DC.L PNT3,DRM DC.B 2,%00011110 DC.W 64*8 DC.L PNT4,bass DC.L PNT1,pian bass DC.L PNT2,bass DC.L PNT3,DRSM DC.B 1,%00011110 DC.W 64*8 DC.L PNT1,dit DC.L PNT4,bass DC.L PNT2,blond DC.L PNT3,DRSM DC.B 1,%00011110 DC.W 64*8 DC.L PNT1,octb DC.L PNT4,bass DC.L PNT2,JIV blond DC.L PNT3,DRSM DC.B 2,%00011110 DC.W 64*8 DC.L PNT1,octb DC.L PNT4,tron JIV bass DC.L PNT2,jiv tron blondI DC.L PNT3,DRSM DC.B 2,%00011110 DC.W 64*8 DC.L PNT1,gd null octb DC.L PNT4,bass DC.L PNT2,null DC.L PNT3,DRSM DC.B 2,%00011110 DC.W 64*8 DC.L PNT1,octb DC.L PNT4,blond DC.L PNT2,git DC.L PNT3,DRTM DC.B 2,%00011110 DC.W 64*8 DC.L PNT1,octb DC.L PNT4,blondi DC.L PNT2,GIT DC.L PNT3,DRM DC.B 2,%00011110 DC.W 64*8 CHAN0 ;\\\\\\\\\\\\\\\\\\\\\\ MOVE (A1),D0 ADD D0,A0 MOVE.L (A0),D1 ;GET NOTE 0 & DURATION MOVE.B 13(A1),D5 EXT.W D5 SWAP D1 ADD D5,D1 SWAP D1 CMP #$FFFF,D1 BNE CON2 CLR (A1) ;RESET TO START SUB D0,A0 MOVE.L (A0),D1 CON2 SUBQ.B #1,3(A1) ;NP0 BNE STILLON MOVE.L D1,6(A1) ;TMP0 \D1.W IS DURATION MOVE.L D1,20(A1);TEMP HOLD NOTE MOVE.B 26(A1),4(A1) ;VOL0 MOVE D1,2(A1) ;NP0 \SET NEW DURATION ADDQ.W #4,(A1) ; & INC POINTER STILLON ;\\VOLUME RFF ;\\\\\\\\\EFFECTS\\\\\\\\\\ NV0 MOVE.B 2(A1),D0 CMP.B #4,D0 BNE DOIT ADDQ.B #1,4(A1) RTS DOIT DZZ MOVE.B #7,SL MOVE.B #%11111000,SD BRA.S FCC EFCT DC.L FINK,VIB,WARB,DRUM,slip,WB1,WRP,SLW DC.L SLR,HOLD,TWERP,SLR1,inup,HOLDLOW,Half,holl FCC AND.L #15,D0 ASL #2,D0 MOVE.L EFCT(PC,D0),A0 JSR (A0) MAZ ADDQ.B #1,4(A1) ;VOL0 MOVE.B 11(A1),SL MOVE.B 21(A1),SD ;TMP0+1 MOVE.B 12(A1),SL MOVE.B 20(A1),SD ;TMP0 CLR D0 MOVE.B 4(A1),D0 MOVE.B 10(A1),SL MOVE.B 28(A1,D0),D2 ;VOL0 MOVE.B D2,SD fink rts ;-------EFFECTS ROUTINES-------- ;1-256---DELAYED--VIBRATO------- VV EOR.B #1,MC BEQ.S SDC VIB CMP.B #8,4(A1) BLT SDC WWQ SUB.B #1,24(A1) BNE SDC MOVE.B 25(A1),24(A1) MOVE 16(A1),D1 ADD D1,18(A1) MOVE 14(A1),D1 CMP 18(A1),D1 BLT.S RIST KJ NEG D1 CMP 18(A1),D1 BGT.S RIST SAZ MOVE 6(A1),D1 ADD 18(A1),D1 MOVE D1,20(A1) SDC RTS RIST NEG 16(A1) BRA.S SAZ ;2-512------WARB DW----------- XX DC.B 0,0 WARB addq.b #5,4(A1) SAX Lsr 20(A1) ;Lsr 20(A1) CMP #30,20(A1) BGT.S PLOP MOVE 6(A1),20(A1) PLOP RTS ;3--768--------DRUM----------- DRUM ;eor.b #1,lil ;bne.s junk SUBQ.B #4,19(A1) MOVE.B #7,SL MOVE.B #%11011000,SD MOVE.B #6,SL MOVE.B 19(A1),SD MOVE.B #5,SL MOVE.B 32(A2),SD MOVE.B #4,SL MOVE.B 19(A1),D0 ASL.B #5,D0 MOVE.B D0,SD JUNK RTS lil dc.b 0,0 ;------4 1024 slip ;5--1280--WARB CONSTANT VOLUME WB1 MOVE.B #5,4(A1) BRA.s SAX ;6--1536-----WARB UP--------- WRP MOVE.B #12,4(A1) SDX LSR 20(A1) CMP #35,20(A1) BGT PLAP MOVE 6(A1),20(A1) PLAP RTS ;7--1792---SLIDE-UP--WARBLE SLW MOVE.B #7,4(a1) BRA wwq ;--2048---SLIDE UP CONST VOL SLR ADD.W #80,20(A1) RTS YIN DC.B 0,0 ;9--2304-------HOLD------------- HOLD MOVE.B #20,4(A1) RTS ;------10 1024 TWERP MOVE.B #128,DRI MOVE.B #28,4(a1) BRA SDX ;11-------2816 SLIDE UP WITH ADSR SLR1 CMP #72,6(A1) BGT WAQ BTST #1,$469 BEQ.S F1 MOVE #72,6(A1) BRA WWQ F1 MOVE #36/2,6(A1) BRA WWQ WAQ SUBQ.W #8,6(A1) MOVE.B #16,4(A1) BRA SDX tp dc.b 0,0 ;12-------3072 inc up inup move.b #10,4(a1) add #53,6(a1) bra vib ;13-------3328--HOLD VOL LOW HOLDLOW move.b #27,4(a1) rts ; ;14--------3584 half adsr half ;addq.b #1,4(a1) move.b $469,d1 and #3,d1 asl #1,d1 move dw(pc,d1),20(a1) rts dw dc.w 144,96,72,96/2 ;15--------3584 half adsr holl addq.b #1,4(a1) move.b $469,d1 and #3,d1 asl #1,d1 move dq(pc,d1),20(a1) rts dq dc.w 162,108,81,64 ;\\\\\\\\\\\\\\DATAS\\\\\\\\\\\\\\\ ;\\NOTE 1ST WORD. DURATION 2ND WORD ;\\\LEAD PNT0 DC.W 0 NP0 DC.W 1 DC.W 0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD TO NOTE DC.W 7 ;VIB LIMIT DC.W 4 ;16(A1) ADD DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24(A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 5,7,9,12,13,14,15,15 dcb.b 60,9 dcb.b 60,7 dcb.b 60,5 dcb.b 60,3 EVEN ;\\\MIDDLE PNT1 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD 13(A1) DC.W 6 ;VIB LIMIT DC.W 2 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,14,12,10,9,8,8,8,9,9,8 DC.B 8,8,7,7,6,6,7,6,6,5,4,4 DCB.B 10,5 DCB.B 10,6 DCB.B 10,7 DCB.B 10,8 DCB.B 10,9 DCB.B 10,10 DCB.B 10,12 DCB.B 10,10 DCB.B 10,9 DCB.B 10,7 DCB.B 10,4 EVEN ;\\\BASS PNT2 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,4,5 ;10(A1) VOL REG DC.B 0 ;ADD TO NOTE 13(A1) DC.W 7 ;VIB LIMIT DC.W 5 ;VIBRATO ADD 16(A1) DC.W 2 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) ADSR DC.B 15,12,13,12,15,14,14,13,11,8 DC.B 7,6,5,4,3,3,2,2 REPT 180 DC.B 2 ENDR EVEN PNT3 DC.W 0 NP3 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,6,11 ;10(A1) VOL REG DC.B -1 ;ADD 13(A1) DC.W 4 ;VIB LIMIT DC.W 1 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,13,10,12,11 DC.B 11,10,10,9,8,7 dc.b 10,9,8,10,9,8,10,9,8,10,9,8 dc.b 10,9,8,10,9,8,10,9,8,10,9,8 dc.b 10,9,8,10,9,8,10,9,8,10,9,8 dcb.b 50,7 EVEN PNT4 DC.W 0 NP4 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 DC.B 8,0,1 ;10(A1) VOL REG DC.B 0 ;ADD 13(A1) DC.W 15 ;VIB LIMIT DC.W 13 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,15,14,14,14,13,13,12,12 REPT 22 DC.B 11 ENDR REPT 22 DC.B 9 ENDR REPT 22 DC.B 8 ENDR REPT 22 DC.B 7 ENDR REPT 22 DC.B 5 ENDR REPT 24 DC.B 3 ENDR REPT 24 DC.B 2 ENDR REPT 64 DC.B 1 ENDR PNT5 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 8,0,1 DC.B 0 ;ADD 13(A1) DC.W 6 ;VIB LIMIT DC.W 4 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,14,14,13,13,12,11,10,9,8,7 DC.B 6,6,7,7,8,8,7,7,7,6,6,7,7,6,6,7,6,6 REPT 10 DC.B 14 ENDR EVEN TE2 DC.W 2,3 MAX DC.B 71,32,87,72,69,65,84,79,78 DRI DC.B 251,0 MIN DC.B 0,0 MC DC.B 0,0 EVEN ;-----------MUSIC DATA DRSM dc.w 28,4+768 DC.W 0,28+1024 dc.w 8,4+768 DC.W 0,28+1024 dc.w 3,2+768 DC.W 0,30+1024 dc.w 4,4+768 DC.W 0,28+1024 dc.w 30,3+768 DC.W 0,29+1024 dc.w 4,4+768 DC.W 0,28+1024 dc.w 24,2+768 DC.W 0,30+1024 dc.w 1,32+768 DC.W $FFFF,$FFFF DRTM dc.w 28,4+768 DC.W 0,28+1024 dc.w 8,4+768 DC.W 0,28+1024 dc.w 3,2+768 DC.W 0,30+1024 dc.w 4,4+768 DC.W 0,28+1024 dc.w 30,3+768 DC.W 0,29+1024 dc.w 4,4+768 DC.W 0,28+1024 dc.w 24,2+768 DC.W 0,30+1024 dc.w 8,4+768 dc.w 7,4+768 dc.w 6,4+768 dc.w 5,4+768 dc.w 4,8+768 ;dc.w 3,4+768 dc.w 5,8+768 ;dc.w 7,4+768 DC.W $FFFF,$FFFF NULL DC.W 2,128+2304 DC.W $FFFF,$FFFF u=8 octb dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 144*u,8,72*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 162*u,8,81*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,109*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,108*u,8 dc.w 217*u,8,108*u,8 dc.w $ffff,$ffff j=8 bass dc.w 144*j,8 dc.w 144*j,8 dc.w 0,24 dc.w 193*j,8 dc.w 162*j,8 dc.w 193*j,8 dc.w 144*j,8 dc.w 0,8 dc.w 128*j,8 dc.w 0,8 dc.w 144*j,8 dc.w 162*j,16 dc.w 144*j,8 dc.w 162*j,8 dc.w 162*j,8 dc.w 0,24 dc.w 217*j,8 dc.w 193*j,8 dc.w 217*j,8 dc.w 162*j,8 dc.w 0,8 dc.w 144*j,8 dc.w 0,8 dc.w 162*j,8 dc.w 193*j,16 dc.w 162*j,8 dc.w 217*j,8 dc.w 217*j,8 dc.w 0,24 dc.w 217*j,8 dc.w 193*j,8 dc.w 217*j,8 dc.w 162*j,8 dc.w 0,8 dc.w 144*j,8 dc.w 0,8 dc.w 162*j,8 dc.w 144*j,16 dc.w 162*j,8 dc.w 144*j,8 dc.w 144*j,8 dc.w 0,48 dc.w 0,64 dc.w $ffff,$ffff i=1 pian dc.w 0,64+64*2 dc.w 108*i,4 dc.w 102*i,4 dc.w 96*i,6 dc.w 47*i,2 dc.w 96*i,6 dc.w 47*i,2 dc.w 96*i,6 dc.w 47*i,2 dc.w 96*i,6 dc.w 47*i,2 dc.w 96*i,6 dc.w 47*i,2 dc.w 96*i,6 dc.w 47*i,2 dc.w 53*i,3 dc.w 108*i,5 dc.w 0,255+2304 dc.w $ffff,$ffff blond dc.w 144*2,128+1536 dc.w 162,1 dc.w 162*2,127+1536 dc.w 217,1 dc.w 217*2,127+1536 dc.w 144,1 dc.w 144*2,127+1536 dc.w $ffff,$ffff p=4 pp=2 g=1536 dit dc.w 144*P,128+G DC.W 162*P,56+G dc.w 144*pp,4 dc.w 136*pp,4 dc.w 128*pp,8 dc.w 144*pp,8 dc.w 162*pp,8 dc.w 193*pp,8 dc.w 217*pp,8 dc.w 243*pp,8 dc.w 288*pp,8 dc.w 2*162*pp,8 ; dc.w 108*p,64+g DC.W 144*8,255+2816 dc.w 288*p,255+g dc.w $ffff,$f fff blondi dc.w 144*2,112+1536 dc.w 148*2,4+1536 dc.w 152*2,2+1536 dc.w 153*2,8+1536 dc.w 154*2,2+1536 dc.w 158*2,4+1536 dc.w 162*2,128+1536 dc.w 217*2,120-32+1536 dc.w 162,1+1536 dc.w 162*2,11+1536 dc.w 144*2,16+1536 dc.w 162*2,8+1536 dc.w 144*2,128-16+1536 dc.w 164*2,2+1536 dc.w 184*2,2+1536 dc.w 204*2,2+1536 dc.w 224*2,2+1536 dc.w 244*2,2+1536 dc.w 264*2,2+1536 dc.w 284*2,2+1536 dc.w 304*2,2+1536 dc.w $ffff,$ffff X=2 O=1792 GIT DC.W 0,255 dc.w 0,64+2304 dc.w 193*X,4+O dc.w 144*X,4+O dc.w 108*X,4+O dc.w 121*X,8+O dc.w 144*X,8+O dc.w 162*X,16+O dc.w 193*X,16+O dc.w 144*X,120+O dc.w 154*X,1+O dc.w 164*X,1+O dc.w 174*X,1+O dc.w 184*X,1+O dc.w 194*X,1+O dc.w 212*X,1+O dc.w 222*X,1+O dc.w 232*X,1+O dc.w 242*X,1+O dc.w 262*X,1+O dc.w 272*X,1+O dc.w 282*X,1+O dc.w $ffff,$ffff gt1 DC.W 0,255 dc.w 121,1 dc.w 121,1 dc.w 121,1 dc.w 121,1 dc.w 121,1 dc.w 121,1 dc.w 120,1 dc.w 119,1 dc.w 118,1 dc.w 117,1 dc.w 116,1 dc.w 115,1 dc.w 114,1 dc.w 113,1 dc.w 112,1 dc.w 111,1 dc.w 110,1 dc.w 109,1 dc.w 108,64-18+1792 dc.w 108,58+1792 dc.w 118,2+1792 dc.w 128,2+1792 dc.w 138,2+1792 dc.w 144,128-40+1792 dc.w 154,1+1792 dc.w 174,1+1792 dc.w 194,1+1792 dc.w 224,1+1792 dc.w 254,1+1792 dc.w 274,1+1792 dc.w 288,1+1792 dc.w 310,1 dc.w 340,1 dc.w 374,1 dc.w 404,1 dc.w 434,1 dc.w 464,1 dc.w 534,1 dc.w 634,1 dc.w 734,1 dc.w 834,1 dc.w 934,1 dc.w 1434,1 dc.w 1834,1 dc.w 2034,1 dc.w 3434,1+2816 dc.w 4000,61 dc.w 0,255 DRM DC.W 0,32+1024 dc.w 2,1+768,8,3+768 DC.W 0,28+1024 dc.w $ffff,$ffff K=512 N=1 JIV DC.W 144*N,8+K DC.W 144*N,8+K DC.W 144*N,8+K DC.W 162*N,8+K DC.W 0,8+2304 DC.W 144*N,8+K DC.W 0,8+2304 DC.W 162*N,8+K DC.W 144*N,8+K DC.W 144*N,8+K DC.W 144*N,8+K DC.W 162*N,24+K DC.W 0,16+2304 ;DC.W 144*N,8+K ;DC.W 0,8+2304 ;DC.W 144*N,8+K DC.W 162*N,8+K DC.W 162*N,8+K DC.W 162*N,8+K DC.W 182*N,8+K DC.W 0,8+2304 DC.W 162*N,8+K DC.W 0,8+2304 DC.W 182*N,8+K DC.W 162*N,8+K DC.W 162*N,8+K DC.W 162*N,8+K DC.W 182*N,8+K DC.W 0,8+2304 DC.W 162*N,8+K DC.W 0,8+2304 DC.W 162*N,8+K DC.W 108*N,8+K DC.W 108*N,8+K DC.W 108*N,8+K DC.W 121*N,8+K DC.W 0,8+2304 DC.W 108*N,8+K DC.W 0,8+2304 DC.W 121*N,8+K DC.W 108*N,8+K DC.W 108*N,8+K DC.W 108*N,8+K DC.W 121*N,8+K DC.W 0,8+2304 DC.W 108*N,8+K DC.W 0,8+2304 DC.W 108*N,8+K DC.W $FFFF,$FFFF DRIFT DC.W 0,255+2304 DC.W 0,128+2304 DC.W 144*4,255+2816 r=512 b=4 tron dc.w 144*8,128+3584 dc.w 162*8,64+15*256 dc.w 217*8,64+r dc.w 108*2,64+r dc.w 96*2,32+r dc.w 60*2,32+r dc.w 144*2,120+r dc.w $ffff,$ffff gd dc.w 0,128+32+32+2304 dc.w 162*4,8+g dc.w 0,8+2304 dc.w 217*4,8+g dc.w 0,96+8+2304 dc.w 108*2,12+g dc.w 0,4+2304 dc.w 144*4,12+g dc.w 0,128-24+2304 dc.w 144*2,8+g dc.w 0,8+2304 dc.w 196*2,8+g dc.w $ffff,$ffff name dc.b "a:\*.pi1",0Gary Wheaton and The Shapeshifters ---------------------------------- The Shapeshifters' music is now well known to Budgie followers. Gary has written more than twenty tunes for the ST, all hand-coded, all accessing the sound chip direct. In this folder, you'll find lisa_14.prg ,lynne_15.prg, la_8.prg and scary_2.prg. Also included (a real bonus for 68000 programmers), is the original source code. Full credit will be expected if these tunes are used in your games. If you want any of the other tunes, write to Gary Wheaton (address within source code), or to Budgie UK, preferrably enclosing an order for one of the Shapeshifters games. (2.95 ea) The music code is slotted in one of the vertical blank slots. It is therefore running at either 50hz or 60hz depending on the monitor you use. The actual slot is $4de (one of the highest, and therefore safest, slots in the v/b queue). Within your programs, the v/b routine is toggled on/off by poking zero (long) in $200, and disabled completely by poking zero (long) in $4de. From the keyboard, toggle is 'HELP', disable is 'UNDO'. Budgie Feb 1990 ; this is Gary Wheaton music driver ; the tune will play during the vertical blank. ; the slot chosen in the v/b queue is fairly high up ; which means that it is immune from interference ; this code is copyright Gary Wheaton Aug 1989 ; Gary Wheaton and the Shapeshifters are members ; of the Budgie UK group. ; Budgie UK Licenceware: the fairer face of PD * scary Oct 89 MOVE.L A7,A5 MOVE.L 4(A5),A5 MOVE.L $C(A5),D0 ADD.L $14(A5),D0 ADD.L $1C(A5),D0 ADD.L #$1100,D0 MOVE.L A5,D1 ADD.L D0,D1 AND.L #-2,D1 MOVE.L D1,A7 MOVE.L D0,-(SP) MOVE.L A5,-(SP) MOVE.W D0,-(SP) MOVE.W #$4A,-(SP) ; Setblock. TRAP #1 ADD.L #12,SP ; CLR.L -(SP) ; Enter supervisor mode. MOVE.W #$20,-(SP) ; Super. TRAP #1 ADDQ.L #6,SP MOVE.L D0,SUPER ; Save old status. movem.l $ff8240,d0-d7 save palette movem.l d0-d7,palette clr.l $200 not.l $200 on/off switch bclr #0,$484 no keyclick bclr #1,$484 no repeat key dc.w $a000 MOVEA.L 8(A0),A0 CLR.W (A0) DC.W $A00A hidemouse MOVE.L #VBI,$4de further down the queue to avoid gem etc. getrez move.w #4,-(sp) trap #14 addq.l #2,sp move.w d0,res setlowrez CLR.W -(A7) 0=low res MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 * load a degas picture at a specific address MOVE.W #0,-(A7) MOVE.L #name,-(A7) budgie3.pi1 MOVE.W #$3D,-(A7) TRAP #1 MOVE.W D0,handle move.l $44e,d0 load direct to current screen sub.l #34,d0 MOVE.L d0,-(sp) MOVE.L #32066,-(A7) read it MOVE.W HANDLE,-(A7) MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 MOVE.W handle,-(SP) close MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP getkey move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 move.w res,-(A7) MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 movem.l palette,d0-d7 movem.l d0-d7,$ff8240 superout MOVE.L SUPER,-(SP) MOVE.W #$20,-(SP) TRAP #1 ADDQ.L #6,SP quit MOVE.W #0,-(SP) MOVE.L #1024*6,-(SP) MOVE.W #$31,-(SP) TRAP #1 res dc.w 0 palette ds.w 16 ; mor *------------------------- ;1 VIBRATO 256 ;2 WARBUP 512 ;3 DRUM 768 ;4 HOLD 1024 ;5 WARBHOLD 1280 ;6 WARBDWN 1536 ;7 SLIDE UP WITH WARB 1792 ;8 SLIDE UP 2048 ;9 VIB UP 2304 ;10 VIB DOWN 2560 E EQU 512 F EQU 2 P EQU 1792 R equ 2 J EQU 16 I EQU 4 H EQU 16 W EQU 1 X EQU 16 T EQU 8 Q EQU 2 Z EQU 8 U EQU 2 O EQU 2 SL EQU $FF8800 SD EQU $FF8802 move.b #7,sl move.b #%11111000,sd *------------------------ vbi movem.l d0-d7/a0-a6,-(sp) lea $fffc00,a1 acia cmp.b #$61,2(a1) undo beq end_it cmp.b #$62,2(a1) help beq on_off lea $200,a0 tst.l (a0) beq quiet move.b #7,sl move.b #%11111000,sd mixer MOVE.L UPTO,A2 MOVE CUNT,D3 MOVE.B 33(A2),D4 SSU SUBQ.W #1,D3 BPL.S PART1 MOVE.L #1,PNT0 MOVE.L #1,PNT1 MOVE.L #1,PNT2 MOVE.L #1,PNT3 MOVE.L #1,PNT4 MOVE.L #$08000000,SL MOVE.L #$09000000,SL MOVE.L #$0A000000,SL ADD.L #38,a2 CMP.L #CHAN0,A2 BNE.S LLA LEA DOTH,A2 LLA MOVE 34(A2),D3 MOVE.B 33(A2),D4 PART1 CLR.B D2 BTST #1,D4 BEQ.S W1 MOVE.L (A2),A1 MOVE.L 4(A2),A0 BSR CHAN0 W1 BTST #2,D4 BEQ.S W2 MOVE.L 8(A2),A1 MOVE.L 12(A2),A0 BSR CHAN0 W2 MOVE.B #1,D2 BTST #3,D4 BEQ.S W3 MOVE.L 16(A2),A1 MOVE.L 20(A2),A0 BSR CHAN0 W3 BTST #4,D4 BEQ.S W4 MOVE.L 24(A2),A1 MOVE.L 28(A2),A0 BSR CHAN0 W4 MOVE.L A2,UPTO MOVE D3,CUNT TTH movem.l (sp)+,d0-d7/a0-a6 rts end_it bclr #6,$fffa11 acknowledge key press interrupt lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) move.l #0,$4de end interrupt movem.l (sp)+,d0-d7/a0-a6 rts on_off bclr #6,$fffa11 not.l $200 toggle on/off lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) movem.l (sp)+,d0-d7/a0-a6 rts quiet movem.l (sp)+,d0-d7/a0-a6 rts even UPTO DC.L EE-38 CUNT DC.W 0 EVEN ;\\RUNNING ORDER SEQUENCE EE DC.L PNT4,NULL DC.L PNT1,_NOTE2 DC.L PNT2,NULL DC.L PNT3,DROM DC.B 1,%0011000 DC.W 64 DC.W 0 DC.L PNT4,_NOTE2 DC.L PNT1,_NOTE2 DC.L PNT2,_Note2 DC.L PNT3,DRMM DC.B 1,%0001110 DC.W 128*2 DC.W 0 DOTH DC.L PNT4,NT DC.L PNT1,_NOTE2 DC.L PNT2,NULL DC.L PNT3,DRMM DC.B 1,%0011110 DC.W 128 DC.W 4 DC.L PNT4,NT1 DC.L PNT1,_NOTE2 DC.L PNT2,_NOTE2 DC.L PNT3,DRMM DC.B 1,%0011110 DC.W 128 DC.W 0 DC.L PNT4,NT2 DC.L PNT1,_NOTE2 DC.L PNT2,_NOTE2 DC.L PNT3,DRMM DC.B 1,%0011110 DC.W 128 DC.W 0 ; DC.L PNT4,TUN DC.L PNT1,BAS1 _NOTE2 DC.L PNT2,TUN DC.L PNT3,DRM DC.B 1,%0011110 DC.W 128 DC.W 0 DC.L PNT4,TUN DC.L PNT1,BAS1 _NOTE2 DC.L PNT2,TIN DC.L PNT3,DRM DC.B 1,%0011110 DC.W 128 DC.W 0 DC.L PNT4,TUN1 DC.L PNT1,BAS1 DC.L PNT2,TUNA DC.L PNT3,DRM DC.B 1,%0011110 DC.W 128*2 DC.W 0 ;MID DC.L PNT4,SLID DC.L PNT1,_NOTE2 DC.L PNT2,SLID DC.L PNT3,DRMM DC.B 1,%0011110 DC.W 128*2 DC.W 1 DC.L PNT4,SLID DC.L PNT1,_NOTE2 DC.L PNT2,SWIP _NOTE2 DC.L PNT3,ROLL DC.B 1,%0011110 DC.W 128*2 DC.W 0 DC.L PNT1,WIZ DC.L PNT0,WIZ DC.L PNT2,WIZ DC.L PNT3,DROM DC.B 0,%0011010 DC.W 128 DC.W 0 ;--- DC.L PNT4,TUN DC.L PNT1,BAS1 _NOTE2 DC.L PNT2,TIN DC.L PNT3,DRMM DC.B 1,%0011110 DC.W 128 DC.B 2,0 DC.L PNT4,TIN DC.L PNT1,BAS1 _NOTE2 DC.L PNT2,TUN DC.L PNT3,DRMM DC.B 10,%0011110 DC.W 128 DC.B 1,0 DC.L PNT4,TUN1 DC.L PNT1,BAS1 DC.L PNT2,TUNA DC.L PNT3,DRMM DC.B 7,%0011110 DC.W 128*2 DC.B 0,0 ;------SKID DC.L PNT4,_NOTE0 DC.L PNT1,_NOTE2 DC.L PNT2,NULL DC.L PNT3,ROLL DC.B 1,%0011000 DC.W 128+16 DC.W 0 DC.L PNT4,SKID DC.L PNT1,SKID1 DC.L PNT2,SKID2 DC.L PNT3,DRMM DC.B 1,%0000010 DC.W 64 DC.W 0 DC.L PNT4,HIY DC.L PNT2,HIY DC.L PNT1,NULL DC.L PNT3,DRMM DC.B 1,%0001010 DC.W 256 DC.B 2,0 DC.L PNT4,HIY DC.L PNT2,HIY DC.L PNT1,NULL DC.L PNT3,ROLL DC.B 1,%0010010 DC.W 256 DC.B 2,0 DC.L PNT4,NULL TUN DC.L PNT1,BAS1 _NOTE2 DC.L PNT2,NULL DC.L PNT3,DRMM DC.B 1,%00110110 DC.W 256 DC.B 0,0 ;----------------------- DC.L PNT1,_NOTE2 DC.L PNT4,SLID DC.L PNT2,NULL DC.L PNT3,ROLL DC.B 1,%0011110 DC.W 128*4 DC.B 0,0 DC.L PNT1,WIZ DC.L PNT0,WIZ DC.L PNT2,WIZ DC.L PNT3,DRAM DC.B 1,%0011110 DC.W 160-32 DC.W 0 CHAN0 ;\\\\\\\\\\\\\\\\\\\\\\ SUBQ.B #1,3(A1) ;NOTE STILL ON BNE STILLON MOVE (A1),D0 ADD D0,A0 MOVE.L (A0),D1 ;GET NOTE 0 & DURATION MOVE.B 13(A1),D5 EXT.W D5 SWAP D1 ADD D5,D1 SWAP D1 CMP #$FFFF,D1 BNE CON2 CLR (A1) ;RESET TO START SUB D0,A0 MOVE.L (A0),D1 CON2 MOVE.L D1,6(A1) ;TMP0 \D1.W IS DURATION MOVE.L D1,20(A1) ;NEW NOTE MOVE.B 26(A1),4(A1) ;VOL0 MOVE D1,2(A1) ;NP0 \SET NEW DURATION ADDQ.W #4,(A1) ;& INC POINTER MOVE 36(A2),D0 STILLON ;\\VOLUME RFF ;\\\\\\\\\EFFECTS\\\\\\\\\\ NV0 CMP.B #8,10(A1) BNE.S SIT MOVE.B 36(A2),D0 ;STANDING EFFECT BNE.S FFW SIT MOVE.B 2(A1),D0 FFW CMP.B #4,D0 BNE DOIT ADDQ.B #1,4(A1) RTS DOIT TST.B D2 BEQ.S FCC MOVE.B #7,SL MOVE.B #%11111000,SD BRA.S FCC EFCT DC.L FINK,VIB,WARB,DRUM,HOLD,WB1,WRP,SLW DC.L SLR,VIB,SLIP,VIB FCC AND.L #15,D0 ASL #2,D0 MOVE.L EFCT(PC,D0),A0 JSR (A0) MAZ CMP #2,20(A1) BNE.S DIP MOVE.B #35,4(A1) ;---------PLAY NOTES DIP ADDQ.B #1,4(A1) ;VOL0 MOVE.B 11(A1),SL MOVE.B 21(A1),SD ;TMP0+1 MOVE.B 12(A1),SL MOVE.B 20(A1),SD ;TMP0 CLR D0 MOVE.B 4(A1),D0 MOVE.B 10(A1),SL MOVE.B 28(A1,D0),SD ;VOL0 FINK RTS DC.B " (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. " ;-------EFFECTS ROUTINES-------- ;1-256---DELAYED--VIBRATO------- VV EOR.B #1,MC BEQ.S SDC VIB CMP.B #8,4(A1) BLT SDC SUB.B #1,24(A1) BNE SDC MOVE.B 25(A1),24(A1) MOVE 16(A1),D1 ADD D1,18(A1) MOVE 14(A1),D1 CMP 18(A1),D1 BLT.S RIST KJ NEG D1 CMP 18(A1),D1 BGT.S RIST SAZ MOVE 6(A1),D1 ADD 18(A1),D1 MOVE D1,20(A1) SDC RTS RIST NEG 16(A1) BRA.S SAZ ;2-512------WARB DW----------- WARB EOR.B #1,MIN BEQ SAX SUBQ.B #1,4(A1) SAX ASL 20(A1) CMP #660,20(A1) BLT.S PLOP MOVE 6(A1),20(A1) PLOP ;BRA VV RTS ;3--768--------DRUM----------- DRUM SUBQ.B #4,19(A1) MOVE.B #7,SL MOVE.B #%11011000,SD MOVE.B #6,SL MOVE.B 19(A1),SD MOVE.B #5,SL MOVE.B 32(A2),SD MOVE.B #4,SL MOVE.B #255,SD RTS ;4 DRUM ;5--1280--WARB CONSTANT VOLUME WB1 MOVE.B #5,4(A1) BRA.S SAX ;6--1536-----WARB UP--------- WRP EOR.B #1,MIN+1 BEQ SDX SUBQ.B #1,4(A1) SDX LSR 20(A1) CMP #35,20(A1) BGT PLAP MOVE 6(A1),20(A1) PLAP BRA VV ;RTS ;7--1792---SLIDE-UP--WARBLE SLW CMP.B #17,4(A1) BLT.S WRP SUBQ.W #3,6(A1) BRA.S WRP ;8--2048---SLIDE UP VIB SLR ;EOR.B #1,FIG ;BEQ.S PES CMP.B #3,4(A1) BLT.S PES SUBQ.W #1,20(A1) PES RTS FIG DC.B 0,0 ;9--2304-------HOLD---------- HOLD SUBQ.B #1,4(A1) RTS ;10--2048---SLIDE DOWN VIB SLIP ;CMP.B #1,4(A1) ;BLT.S PUS ADD.W #90,20(A1) PUS BRA VIB ;\\\\\\\\\\\\\\DATAS\\\\\\\\\\\\\\\ ;\\NOTE 1ST WORD. DURATION 2ND WORD ;\\\LEAD PNT0 DC.W 0 DC.W 1 DC.W 0 DC.L 0 DC.B 8,0,1 DC.B 0 ;ADD TO NOTE DC.W 6 ;VIB LIMIT DC.W 3 ;16(A1) ADD DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24(A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,14,13,12,11,9,8,9 DC.B 10,12,10,8,10,12,10,8,10,10 DC.B 11,10,10,9,8,7,5,5,6,7,7 DC.B 6,5,4,3,2,1 REPT 70 DS.B 1 ENDR EVEN ;\\\MIDDLE PNT1 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD 13(A1) DC.W 6 ;VIB LIMIT DC.W 2 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,15,14,14,13,13,13,12,12 DC.B 11,11,11,11,10,10,10,10,10,10 DC.B 12,12,11,11,10,9,8,7,9,7,10,7,11,10,10,9,10 DC.B 9,8,7,6,5,4,3,2,1 REPT 90 DC.B 1 ENDR EVEN ;\\\BASS PNT2 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,4,5 ;10(A1) VOL REG DC.B 2 ;ADD TO NOTE 13(A1) DC.W 6 ;VIB LIMIT DC.W 2 ;VIBRATO ADD 16(A1) DC.W 2 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 2,2 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,14,14,14,13,13,13,13,13 DC.B 13,13,12,12,11,11,10,10,10,9 DC.B 8,7,6,5,4,3,4,2,1 REPT 80 DC.B 1 ENDR EVEN PNT3 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,6,11 ;10(A1) VOL REG DC.B -1 ;ADD 13(A1) DC.W 10 ;VIB LIMIT DC.W 4 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,15,14,13,12 DC.B 11,10,9,8,7,5,3,1,1,1 DC.B 1,1,1,1,1,1,1,1,1,1 REPT 80 DC.B 1 ENDR EVEN PNT4 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 DC.B 8,0,1 ;10(A1) VOL REG DC.B 0 ;ADD 13(A1) DC.W 5 ;VIB LIMIT DC.W 3 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 14,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 DC.B 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 DC.B 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 DC.B 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 DC.B 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 DC.B 8,8,8,9,9,9,10,10,10,10,10 DC.B 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 DC.B 12,13,14,15,14,13,12,11,10 DC.B 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 DS.B 20 EVEN MC DC.B 1,1 MIN DC.B 1,0 DED EVEN ;-----------MUSIC DATA _NOTE0 DC.W 108*Q,32+e,102*Q,32+e,108*Q,64+e NT DC.W 144*Q,32+E,108*Q,32+E,81*Q,48+e,76*Q,16+e NT1 DC.W 108*Q,32+e,102*Q,32+e,108*Q,64+e NT2 DC.W 144*Q,32+e,108*Q,30+e DC.W 81*Q,46+e,68*Q,15+e,102*Q,6+e DC.W $FFFF,$FFFF _NOTE2 DC.W 108*T,8,91*T,8,96*T,8,102*T,8 DC.W 108*T,8,217*T,8,204*T,8,102*T,8 DC.W 193*T,8,96*T,8,204*T,8,102*T,8 DC.W 108*T,8,217*T,8,193*T,8,96*T,8 DC.W $FFFF,$FFFF DRMM DC.W 31,8+768,0,8+1024 DC.W 8,8+768,0,24+1024 DC.W 8,8+768,0,8+1024 DC.W 31,8+768,0,8+1024 DC.W 8+768,8,31,8+768,0,8+1024 DC.W 31,8+768,8,8+768,0,8+1024 DC.W $FFFF,$FFFF NULL DC.W 2,68 DC.W $FFFF,$FFFF DROM DC.W 9,2+768,0,2+1024 DC.W 7,2+768,0,2+1024 DC.W 5,2+768,0,2+1024 DC.W $FFFF,$FFFF DRIM DC.W 8,8+768,0,24+1024 DC.W 8,8+768,0,24+1024 DC.W $FFFF,$FFFF DRAM DC.W 12,8+768,0,24+1024 DC.W $FFFF,$FFFF DRM DC.W 8,8+768,0,8+1024 DC.W 14,8+768,0,8+1024 DC.W $FFFF,$FFFF WIZ1 DC.W 2,4 wiz DC.W 217*X,8,108*X,8 DC.W 193*X,8,96*X,8 DC.W 182*X,8,91*X,8 DC.W 162*X,8,81*X,8 DC.W 153*X,8,76*X,8 DC.W 144*X,8,72*X,8 DC.W 128*X,8,64*X,8 DC.W 121*X,8,60*X,8 ;DC.W 114*X,8,57*X,8 ;DC.W 108*X,8,53*X,8 TIN DC.W 0,4 TUN DC.W 2,8,121*O,8,108*O,8,144*O,8 DC.W 121*O,8,108*O,8,2,8 DC.W 108*O,8 DC.W 81*O,8,85*O,8 DC.W 108*O,8,121*O,8 DC.W 85*O,8,2,8,121*O,8 DC.W 2,16 DC.W $FFFF,$FFFF TUNA DC.W 1,22 TUN1 DC.W 72*U,16,85*U,16,121*U,16 DC.W 144*U,16,108*U,64+256 DC.W 2,16,85*U,16,121*U,16 DC.W 144*U,16,108*U,24+256 ;128-48 DC.W 85*U,8,108*U,48 DC.W $FFFF,$FFFF WOO DC.W 108,128+2560 WIN DC.W 108*Q,128 SKID1 DC.W 1,1 SKID2 DC.W 1,1 SKID DC.W 108*Q,96+256 DC.W $FFFF,$FFFF ROLL DC.W 31,16+768,4,8+768 DC.W 0,24+1024 DC.W 31,16+768,20,16+768 DC.W 31,8+768,20,16+768 DC.W 8,8+768,8,8+768,8,8+768 ; DC.W 31,8+768,20,16+768 DC.W $FFFF,$FFFF HIY DC.W 108*W,8,108*W,8,108*W,16 DC.W 72*W,8,72*W,8,72*W,16 DC.W 96*W,8,91*W,8,91*W,16+32 DC.W 182*T,8,91*T,8,182*T,8,91*T,8 DC.W 162*T,8,81*T,8,162*T,8,81*T,8 DC.W 217*T,8,108*T,8,217*T,8,108*T,8 DC.W 217*T,8,108*T,8 DC.W 217*T,8,108*T,12 DC.W $FFFF,$FFFF BAS1 DC.W 217*T,8,108*T,8 DC.W $FFFF,$FFFF SLID DC.W 2,128 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 108*W,16+2048 DC.W 2,15 DC.W $FFFF,$FFFF SWIP DC.W 2,128 DC.W 2,16 DC.W 108*W,32+2048 DC.W 108*W,32+2048 DC.W 108*W,20+2048 DC.W 2,12 DC.W $FFFF,$FFFF *----------------- quiet_flag dc.b 0 even DC.B " G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. " super dc.l 0 handle dc.w 0 name dc.b "a:\hostile.pi1",0 even `*O*m - ЭЭ" Ҁ.A// ??<JNA B?< NA\#vL@HdBF hBP #?<NNT3bBg/9N/9N?<NNO ?</<|?<=NA3z 9N"//<}B?9z?<?NA ?9z?<>NAX yN /?<NN\?<NAT@?9b/9N/9N?<NNO LdH@/9v?< NA\?</<?<1NAHC )ag )bg$AJg<$y69*!SCjl#p## # $# ## # &"fEP6*"*!Bg "R jag "j j a<g "j jag "j ja#3LNuA|#LNuFA|LNuLNu * * $ 2@  $  v * $   $   $   $ n  $ n   $ n  $   & $ ^ p $ 2  $   $    $  j * $ ^ V N R $ @  * $    * $ ^ * * $ 6 * $ ^ p $ bS)f:0") HHAEHA|fBQ"#A#Ai3AXQ0*$ ) f*$f)<fR)NuJgB`0``BP`f`@ {N if|#R)  B@) Nu (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. 9 fg@ )m8)f.i2)i2)imDAin2)i3ANuDi` 9 hgS) im3iNuY) Nu|` 9 igS) i#n3i` )mWi` )mSiNuS)NuiZ`                   @   0  @  .`0``0`0`D     `     @ 0l `lllHHH`[[0```` `llllllll l l G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. a:\hostile.pi1B," 0 *Z\                    Rrw"ATCBGeGwTE @ @???@@IIERER  ddTTc%% @@? aO@ A A A@@? ohoag@80 @@@@@?@{@{{agBBB  @@??0?@|O[[;;ag  (  Hj H@@? aO~~((11!@@p@(0(0(0@@` ``??@  0"0 @@ߘDߘ@ PpP@@?08D<@<@ $$@@@@@X`߀Dߟ@ @?` &&"(@@@A߁\>߿0@SsA@@? A߁>߿#c#!a@@?(C2<?"Ģ @@@?0<pp@@@?0a T?1hh<PPP@@_P? ?AA<??7`\AA@@@ `D8x@ww\  b @@? _A_? ?AwX`@0vvAAQ@@@? ?? |߀0)=^^]@@7CB7|p~~HH@@@fx 00@@|*0@@  8C% P@@? E nc~~@@@@@@A= =@|XXXhhh@@xHbダP#@lC@@pG @s࿟b @@pD  `8-߀~P@@@@@pA!}A? !߁@Aww@@x ?` xww9@@xHPp??  @v￀ P @@`@}Bp~2 @@xK?B  8 Й@@?^F^@Om@@@@?_O_? z@p@@@? ||}_g!? `pp@@? {A{^W`pp0`? 3cs @@{A{`?`p`_3OC'a q @@??yy}??'{{x wvDL{@@p pcc !` j588 4aww`x#ܬ```@@??~{ ???`x ߣ``@@??3 y< < @???00ϝ@@r?}zz3t3t CO=`߀`@B? @@~ `CVV0@@~B|4?s;BB44(@@  !   @o@@OOg p{}}}@ c@@yxy0x?{ ?? @@/``p/00@C|?ƀ0@@@@@ϿϿ4IɁ?((޿-01>π<?&cooo@@!?m` ` ps3# ///@@@# 4|@@< 6VVAC P߯߯߯!(@@||..n : `c|_99& __ hߗߗߗ0@@<~(0(Hx&c hߗߗߗT@@??>=<>=P_>~@?@@|zz q (P@@??O3Jϵ<@@NAuK`$-4E@@;/<_ 3 g 3Ap?J"Fsss999```@@@Lj9?ƩV  ~݀$ܯW") B3νν JDJDJDHHH@@? _":,m=a11/  KKK%%%```@@ 2_ _2!߀ KKK@@~>~o@NN~|~/ 8BzB?``@JJJHHH@@|Wo o0n0~ϑ@B@IF++9ge rGrGrG9^9^9^```@@^~qEp }r ߀CC|@@@@?}@X {qGG@@@ >.eei@h yyq~~~~~~0@@x H ނނ?ppр   ߀KK| Hyy?@??? @@`` <<`| 8HxHtyJoO@@@@?/B37;T/}`@@@ tt>/@n!=!߀wMM  D@@?'@Ё~~ooq@@?`-AI޶ # 0(@@|T00#6<<@u:sn}}?  ~@@?(?t~|\@@`:ߟA{_'@|">#O@@P~||e$4##3D0#"߀߀@@ xx@@@h??#!1T:}~~"@@@@ @ ppDF?A Aw B@@@@@Gx_r  !~~~@www@@>*HH8{y??@@|T @@ #x  ~< ' {;8???R@@5  pXgg~~ X X X` 000((""@@~DD`@H!H o''g? %!!<<@@  ?OP|\?0lllAA((PP00?? 98?wvvvOpp_?8?8?D~~@?115??;|7w @@PP00 ?l 77' @www@@@@B!!""_8|  +D0@/+ ##߀  HwH;@}.zeU H@߀x, 8>1)a |||@8<<<???@<oo ? 62Bd @}? B```???< } }}B??`  ~~~8@!ށ ~~~"@   0??$0@ s@}}}`X _A8888??HO@P??```???`@`@`@???F!w?f ???@@<,t(1~(t F#0iPz&Gٸh@p" ```@ +6Թ+FOv''SSz~AJJ40);???s qT no6/6w?`xxx  P@P@0a`c<<=||__``?s ?8ttt@@?s 0?????ۻ///@@s 0????zzz 0???@0>(?|~~~v?|}}|00`6B?~??|gg`{{{```PP@ >?|O_@x?00>0@``` >?|``?00>0ppp` ``pp>pppp??~?`g`<>xxx?Cx?~?888?A8?0?~???==x=???0?~?@@x?08?~?x?~?|~~0~?|a`}|}0?|  0???|30?|??00?@0??x<<?p?x??|x``?????|9??y|z`` 3  cˀ4..]Z]ZЀ+:{:ՕՕ ..U[U[<q?s?|?? 00}0@Ͽ<8`ǟ88   y< @@yA <??yyya =??yy??a{ ?||yy??s{@xxyy<<sy??y|9? yyyyxxxx0??@yyyyxxxx{|yy||{|xxxxyyy|||>>>n?8:?>>>>>>???|?x?????!|?p3 pE<`?@ T ~8?` ! g Nu`s c    bT*` *O*m - ЭЭ" Ҁ.A// ??<JNA B?< NA\#zL@HdBF hBP #?<NNT3bBg/9N/9N?<NNO ?</<d?<=NA3b 9N"//<}B?9b?<?NA ?9b?<>NAX yN /?<NN\?<NAT@?9b/9N/9N?<NNO LdH@/9z?< NA\?</<?<1NAHC )ag )bg0AJgH9~d$y69*!SCjl#8##b## r## # &fE6*"*!Bg "R ja\g "j j aJ<g "j ja4g "j ja"#3LNuA|#LNuFA|LNuLNu G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. H/?< NN\LNu a:\music\budgie3.pi1` r 2 2b 2  r 2 bb 2  r R Rb 2  r 2 bb 2  r v bb 2  r  bb   r 2 2b  2? r  b  U)f:0") HHAEHA|fBQ"#A#Ai3AXQ0*$ ) f*%f)<fR)NuJgJ`8DX@ {N if|#R)  B@) Nu (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. 9 .g@ )m8)f.i2)i2)imDAin2)i3ANuDi` i m3iNu )Nu| i<n 3iNu|-Ui` )m )nZiNu ) mRi`S)Nu|`F| imi Nu3|NuBA)<m |Ti`                   @lD  D  Dl@l H H H l H H H l H H H l l [QH5DHQ HQ[l HQ[l HQ[l`lyl @B," 0|  *Z       ; this is Gary Wheaton music driver ; the tune will play during the vertical blank. ; the slot chosen in the v/b queue is fairly high up ; which means that it is immune from interference ; this code is copyright Gary Wheaton Aug 1989 ; Gary Wheaton and the Shapeshifters are members ; of the Budgie UK group. ; Budgie UK Licenceware: the fairer face of PD * LA.S Oct 89 MOVE.L A7,A5 MOVE.L 4(A5),A5 MOVE.L $C(A5),D0 ADD.L $14(A5),D0 ADD.L $1C(A5),D0 ADD.L #$1100,D0 MOVE.L A5,D1 ADD.L D0,D1 AND.L #-2,D1 MOVE.L D1,A7 MOVE.L D0,-(SP) MOVE.L A5,-(SP) MOVE.W D0,-(SP) MOVE.W #$4A,-(SP) ; Setblock. TRAP #1 ADD.L #12,SP ; CLR.L -(SP) ; Enter supervisor mode. MOVE.W #$20,-(SP) ; Super. TRAP #1 ADDQ.L #6,SP MOVE.L D0,SUPER ; Save old status. movem.l $ff8240,d0-d7 save palette movem.l d0-d7,palette clr.l $200 not.l $200 on/off switch bclr #0,$484 no keyclick bclr #1,$484 no repeat key dc.w $a000 MOVEA.L 8(A0),A0 CLR.W (A0) DC.W $A00A hidemouse MOVE.L #VBI,$4de further down the queue to avoid gem etc. getrez move.w #4,-(sp) trap #14 addq.l #2,sp move.w d0,res setlowrez CLR.W -(A7) 0=low res MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 * load a degas picture at a specific address MOVE.W #0,-(A7) MOVE.L #name,-(A7) budgie3.pi1 MOVE.W #$3D,-(A7) TRAP #1 MOVE.W D0,handle move.l $44e,d0 load direct to current screen sub.l #34,d0 MOVE.L d0,-(sp) MOVE.L #32066,-(A7) read it MOVE.W HANDLE,-(A7) MOVE.W #$3F,-(A7) TRAP #1 ADDA.L #$C,A7 MOVE.W handle,-(SP) close MOVE.W #$3E,-(SP) TRAP #1 ADDQ.L #4,SP move.l $44e,a0 sub.l #32,a0 palette MOVE.L A0,-(SP) MOVE.W #6,-(SP) TRAP #14 ADDQ.L #6,SP getkey move.w #$07,-(sp) trap #1 addq.l #2,sp andi.w #$df,d0 move.w res,-(A7) MOVE.L $44e,-(A7) -1=ignore physbase MOVE.L $44e,-(A7) -1=ignore logbase MOVE.W #5,-(A7) TRAP #14 LEA $0C(A7),A7 movem.l palette,d0-d7 movem.l d0-d7,$ff8240 superout MOVE.L SUPER,-(SP) MOVE.W #$20,-(SP) TRAP #1 ADDQ.L #6,SP quit MOVE.W #0,-(SP) MOVE.L #1024*6,-(SP) MOVE.W #$31,-(SP) TRAP #1 res dc.w 0 palette ds.w 16 ;1 VIBRATO 256 ;2 WARBUP 512 ;3 DRUM 768 ;4 HOLD 1024 ;5 WARBHOLD 1280 ;6 WARBDWN 1536 ;7 SLIDE UP WITH WARB 1792 ;8 SLIDE UP 2048 ;9 VIB UP 2304 ;10 VIB DOWN 2560 E EQU 1 F EQU 2 P EQU 1792 R equ 512 J EQU 8 I EQU 4 H EQU 16 W EQU 1 X EQU 8 T EQU 4 Q EQU 8 Z EQU 4 U EQU 2 O EQU 2 SL EQU $FF8800 SD EQU $FF8802 vbi movem.l d0-d7/a0-a6,-(sp) lea $fffc00,a1 acia cmp.b #$61,2(a1) undo beq end_it cmp.b #$62,2(a1) help beq on_off lea $200,a0 tst.l (a0) beq quiet move.b #7,sl move.b #%11111000,sd mixer ADD.B #135,HIT slow down BCC tth *** MOVE.L UPTO,A2 MOVE CUNT,D3 MOVE.B 33(A2),D4 SSU SUBQ.W #1,D3 BPL.S PART1 MOVE.L #2,PNT0 MOVE.L #2,PNT1 MOVE.L #2,PNT2 MOVE.L #2,PNT3 MOVE.L #2,PNT4 MOVE.L #$08000000,SL MOVE.L #$09000000,SL MOVE.L #$0A000000,SL ADD.L #38,a2 CMP.L #CHAN0,A2 BNE.S LLA LEA DOTH,A2 LLA MOVE 34(A2),D3 MOVE.B 33(A2),D4 PART1 CLR.B D2 BTST #1,D4 BEQ.S W1 MOVE.L (A2),A1 MOVE.L 4(A2),A0 BSR CHAN0 W1 BTST #2,D4 BEQ.S W2 MOVE.L 8(A2),A1 MOVE.L 12(A2),A0 BSR CHAN0 W2 MOVE.B #1,D2 BTST #3,D4 BEQ.S W3 MOVE.L 16(A2),A1 MOVE.L 20(A2),A0 BSR CHAN0 W3 BTST #4,D4 BEQ.S W4 MOVE.L 24(A2),A1 MOVE.L 28(A2),A0 BSR CHAN0 W4 MOVE.L A2,UPTO MOVE D3,CUNT ;--END OF VBI **** tth movem.l (sp)+,d0-d7/a0-a6 rts end_it bclr #6,$fffa11 acknowledge key press interrupt lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) move.l #0,$4de end interrupt movem.l (sp)+,d0-d7/a0-a6 rts on_off bclr #6,$fffa11 not.l $200 toggle on/off lea $ff8800,a0 move.b #7,(a0) move.b #%11111111,2(a0) movem.l (sp)+,d0-d7/a0-a6 rts quiet movem.l (sp)+,d0-d7/a0-a6 rts even DC.B " G.WHEATON. 45 GOLDRILL AVE, BOLTON, LANCS, U.K. " ;EVEN dosound movem.l a0-a6/d0-d6,-(sp) MOVE.L A0,-(SP) MOVE.W #$20,-(SP) TRAP #14 ADDQ.L #6,SP movem.l (sp)+,a0-a6/d0-d6 RTS EVEN silence DC.B 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0 DC.B 9,0,10,0,11,0,12,0,13,0,14,0,15,0,255,0 *----------------- handle dc.w 0 name dc.b "a:\music\budgie3.pi1",0 even *--------- SUPER DC.L 0 HIT DC.B 0,0 UPTO DC.L EE-38 CUNT DC.W 0 EVEN ;\\RUNNING ORDER SEQUENCE EE DOTH DC.L PNT4,_NOTE0 DC.L PNT1,_NOTE0 DC.L PNT2,_NOTE0 DC.L PNT3,DRMM DC.B 1,%00001110 DC.W 127 DC.W 8 DC.L PNT4,_NOTE0 DC.L PNT1,DI1 _NOTE0 DC.L PNT2,_NOTE0 DC.L PNT3,DRMM DC.B 4,%00011110 DC.W 127 DC.W 8 DC.L PNT4,_NOTE2 DC.L PNT1,_NOTE2 DC.L PNT2,_NOTE0 DC.L PNT3,DRMM DC.B 3,%00011110 DC.W 255 DC.W 1 DC.L PNT4,_NOTE0 DC.L PNT1,di1 _NOTE0 DC.L PNT2,_NOTE0 DC.L PNT3,DRMM DC.B 1,%00001110 DC.W 255 DC.W 8 DC.L PNT4,TUNE DC.L PNT1,DI1 DC.L PNT2,_NOTE0 DC.L PNT3,DRMM DC.B 2,%00011110 DC.W 511 DC.W 0 DC.L PNT4,BASSW DC.L PNT1,di1 DC.L PNT2,BASSW DC.L PNT3,DRMM DC.B 1,%00001110 DC.W 127 DC.W 8 DC.L PNT4,_NOTE0 DC.L PNT1,_NOTE0 DC.L PNT2,DI DC.L PNT3,_NOTE0 DC.B 1,%00001110 DC.W 63 DC.W 8 DC.L PNT4,BASSW DC.L PNT1,BASSW DC.L PNT2,DI DC.L PNT3,DRMM DC.B 1,%00001110 DC.W 255 DC.W 8 CHAN0 ;\\\\\\\\\\\\\\\\\\\\\\ SUBQ.B #2,3(A1) ;NOTE STILL ON BNE STILLON MOVE (A1),D0 ADD D0,A0 MOVE.L (A0),D1 ;GET NOTE 0 & DURATION MOVE.B 13(A1),D5 EXT.W D5 SWAP D1 ADD D5,D1 SWAP D1 CMP #$FFFF,D1 BNE CON2 CLR (A1) ;RESET TO START SUB D0,A0 MOVE.L (A0),D1 CON2 MOVE.L D1,6(A1) ;TMP0 \D1.W IS DURATION MOVE.L D1,20(A1) ;NEW NOTE MOVE.B 26(A1),4(A1) ;VOL0 MOVE D1,2(A1) ;NP0 \SET NEW DURATION ADDQ.W #4,(A1) ;& INC POINTER MOVE 36(A2),D0 STILLON ;\\VOLUME RFF ;\\\\\\\\\EFFECTS\\\\\\\\\\ NV0 CMP.B #8,10(A1) BNE.S SIT MOVE.B 37(A2),D0 ;STANDING EFFECT BNE.S FFW SIT MOVE.B 2(A1),D0 FFW CMP.B #4,D0 BNE DOIT ADDQ.B #1,4(A1) RTS DOIT TST.B D2 BEQ.S FCC MOVE.B #7,SL MOVE.B #%11111000,SD BRA.S FCC EFCT DC.L FINK,VIB,WARB,DRUM,HOLD,WB1,WRP,SLW DC.L SLR,LIL,LIL,RSE,SLY,SLY FCC AND.L #15,D0 ASL #2,D0 MOVE.L EFCT(PC,D0),A0 JSR (A0) MAZ CMP #2,20(A1) BNE.S DIP MOVE.B #35,4(A1) ;---------PLAY NOTES DIP ADDQ.B #1,4(A1) ;VOL0 MOVE.B 11(A1),SL MOVE.B 21(A1),SD ;TMP0+1 MOVE.B 12(A1),SL MOVE.B 20(A1),SD ;TMP0 CLR D0 MOVE.B 4(A1),D0 MOVE.B 10(A1),SL MOVE.B 28(A1,D0),SD ;VOL0 FINK RTS DC.B " (C) G.WHEATON. 45 GOLDRILL AVE BOLTON. LANCS, U.K. " ;-------EFFECTS ROUTINES-------- ;1-256---DELAYED--VIBRATO------- VV EOR.B #1,MC BEQ.S SDC VIB CMP.B #8,4(A1) BLT SDC SUB.B #1,24(A1) BNE SDC MOVE.B 25(A1),24(A1) MOVE 16(A1),D1 ADD D1,18(A1) MOVE 14(A1),D1 CMP 18(A1),D1 BLT.S RIST KJ NEG D1 CMP 18(A1),D1 BGT.S RIST SAZ MOVE 6(A1),D1 ADD 18(A1),D1 MOVE D1,20(A1) SDC RTS RIST NEG 16(A1) BRA.S SAZ ;2-512------WARB DW----------- WARB ASL 20(A1) CMP #800,20(A1) BLT.S PLOP MOVE 6(A1),20(A1) PLOP RTS ;3--768--------DRUM----------- DRUM ;SUBQ.B #8,19(A1) MOVE.B #7,SL MOVE.B #%11011000,SD MOVE.B #6,SL MOVE.B 19(A1),SD MOVE.B #5,SL MOVE.B 32(A2),SD MOVE.B #4,SL MOVE.B 19(A1),D0 ASL.B #5,D0 MOVE.B D0,SD JUNK RTS ;4 DRUM ;5--1280--WARB CONSTANT VOLUME WB1 MOVE.B #5,4(A1) ;6--1536-----WARB UP--------- WRP LSR 20(A1) CMP #60,20(A1) BGT PLAP MOVE 6(A1),20(A1) LSR 20(A1) PLAP RTS ;7--1792---SLIDE-UP--WARBLE SLW MOVE.B #45,4(A1) SUBQ.W #2,6(A1) BRA.S WRP ;8--2048---SLIDE UP VIB SLR CMP.B #16,4(A1) BLT.S PES cmp.b #25,4(a1) bgt.s pes addq.W #5,20(A1) PES RTS BRA VIB WARB ;9--2048---SLIDE DOWN VIB SLIP CMP.B #11,4(A1) BLT.S PUS ADDQ.W #1,6(A1) PUS BRA VIB ;10--2304-------HOLD---------- HOLD SUBQ.B #1,4(A1) RTS ;11 2560 LIL MOVE.B #20,4(A1) BRA WARB ;12--2816 RAIS RSE MOVE.B #17,4(A1) CMP #217*2,20(A1) BLT.S TXAS SUB.W #12,20(A1) RTS TXAS MOVE #217*2,20(A1) RTS ;13--3072---SLIDE UP VIB SLY CLR D1 MOVE.B 4(A1),D1 CMP.B #30,D1 BLT.S PWS MOVE.B #30,4(A1) ADDQ.W #2,6(A1) PWS BRA WARB ;\\\\\\\\\\\\\\DATAS\\\\\\\\\\\\\\\ ;\\NOTE 1ST WORD. DURATION 2ND WORD ;\\\LEAD PNT0 DC.W 0 NP0 DC.W 1 DC.W 0 DC.L 0 DC.B 8,0,1 DC.B 0 ;ADD TO NOTE DC.W 6 ;VIB LIMIT DC.W 3 ;16(A1) ADD DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24(A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,14,13,12,11,9,8,9 DC.B 10,12,10,8,10,12,10,8,10,10 DC.B 11,10,10,9,8,7,5,5,6,7,7 DC.B 6,5,4,3,2,1 REPT 70 DS.B 1 ENDR EVEN ;\\\MIDDLE PNT1 DC.W 0 DC.W 1 ;EFFECT & DURATION 2(A1) DC.B 0,0 DC.L 0 DC.B 9,2,3 DC.B 1 ;ADD 13(A1) DC.W 6 ;VIB LIMIT DC.W 2 ;VIB ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TEMP NOTE 20(A1) DC.B 1,1 ;VIB RATE 24)A1) DC.B 0,0 ;INITIAL VOL ;ADSR 28(A1) DC.B 15,15,15,14,14,13,13,13,12,12 DC.B 11,11,11,11,10,10,10,10,10,10 DC.B 12,12,11,11,10,9,8,7,9,7,10,7,11,10,10,9,10 DC.B 9,8,7,6,5,4,3,2,1 REPT 90 DC.B 1 ENDR EVEN ;\\\BASS PNT2 DC.W 0 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,4,5 ;10(A1) VOL REG DC.B 2 ;ADD TO NOTE 13(A1) DC.W 12 ;VIB LIMIT DC.W 3 ;VIBRATO ADD 16(A1) CC DC.W 2 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 2,2 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) ADSR DC.B 15,15,14,14,13,13,14,14,12,12 DC.B 13,13,12,12,11,11,10,10,10,9 DC.B 8,7,6,5,4,3,4,2,1 REPT 80 DC.B 1 ENDR EVEN PNT3 DC.W 0 NP3 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 ;6 DC.B 10,6,11 ;10(A1) VOL REG DC.B -1 ;ADD 13(A1) DC.W 5 ;VIB LIMIT DC.W 2 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 0,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,14,12,10,9 DC.B 7,5,4,3,2,1,1,1,1,1 DC.B 1,1,1,1,1,1,1,1,1,1 REPT 80 DC.B 1 ENDR EVEN PNT4 DC.W 0 NP4 DC.W 1 ;2(A1) DURATION DC.B 0,0 ;4(A1) DC.L 0 DC.B 8,0,1 ;10(A1) VOL REG DC.B 0 ;ADD 13(A1) DC.W 5 ;VIB LIMIT DC.W 3 ;VIBRATO ADD 16(A1) DC.W 0 ;VIB 18(A1) DC.L 0 ;TMP NOTE 20(A1) DC.B 1,1 ;VIB RATE DC.B 14,0 ;INITIAL VOL 26(A1) ;\ADSR 28(A1) DC.B 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 DC.B 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 DC.B 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 DC.B 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 DC.B 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 DC.B 8,8,8,9,9,9,10,10,10,10,10 DC.B 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 DC.B 12,13,14,15,14,13,12,11,10 DC.B 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 DS.B 20 EVEN MC DC.B 1,1 MIN DC.B 1,0 DED EVEN ;MUSIC DATA ;-----------MUSIC DATA _NOTE0 DC.W 217*Q,16,144*Q,8 DC.W 162*Q,8,162*Q,8,144*Q,24 DC.W $FFFF,$FFFF _NOTE1 DC.W 2,2 DC.W $FFFF,$FFFF _NOTE2 DC.W 144*T,16,91*T,8,81*T,8,72*T,16 DC.W 53*T,16,68*T,8,72*T,8,81*T,32 DC.W 72*T,8,81*T,8,91*T,16,108*T,16 DC.W 96*T,8,108*T,8,121*T,16,108*T,48+16 DC.W $FFFF,$FFFF DRMM DC.W 0,16+1024 DC.W 8,4+768 DC.W 0,4+1024 DC.W 4,2+768 DC.W 0,6+1024 DC.W 0,16+1024 DC.W 31,8+768 DC.W 0,8+1024 DC.W $FFFF,$FFFF BASSW DC.W 217*Q,16,144*Q,8 DC.W 162*Q,8,162*Q,8,144*Q,16 DC.W 162*Q,8,162*Q,8,144*Q,8 DC.W 162*Q,8,144*Q,8 DC.W 162*Q,8,144*Q,16 DC.W 144*Q,8 DC.W $FFFF,$FFFF DI DC.W 108,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 108,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 108,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 72,8+2560,2,8 DC.W 108,8+2560,2,8 DC.W 2,255 DC.W $FFFF,$FFFF DI1 DC.W 108,8+2560,2,8 DC.W $FFFF,$FFFF NULL DC.W 2,255 DC.W $FFFF,$FFFF TUNE DC.W 144*E,16+R,91*E,8+R,81*E,8+R,72*E,16+R DC.W 53*E,16+R,68*E,8+R,72*E,8+R,81*E,32+R DC.W 72*E,8+R,81*E,8+R,91*E,16+R,108*E,32+R DC.W 72*E,8+R,81*E,8+R,91*E,16+R,108*E,32+R DC.W 72*E,8+R,81*E,8+R,91*E,16+R,108*E,16+R DC.W 96*E,8+R,108*E,8+R,121*E,16+R DC.W 108*E,64+3072 DC.W 2,255 DC.W $FFFF,$FFFF .  t..  tRASTER_6PRGt QUEEN5 PI1t $B}RASTER_5S t D!RASTER_6S t MDFRASTER_5PRGt _RASTERS DOCt aEI``*a:\rasters\queen5.pi1a:\fonts\fontishB?< NA#> yN #Z.H/<gBg?<NNP ?<NNT38#N:#ZBL@HF?</:/:?<NN `z?</<?<=NAP3b 9B"//<"?9b?<?NA 9B//<}?9b?<?NA ?9b?<>NAX yB,C <2Q/<?<=NA3b/< /<?9b?<?NA ?9b?<>NAX*9B^# 3 # p*| aafaa<gaF`?<?<NAXH@Nu*| aaLFH@?98/9:/9:?<NN /<fBg?<NNP /9>?< NA\BgNA# 8#p4#pj< =>?@9 9#n #Bp99Nu@F'F? 81*#8 #4pFNuB8$!3'@#n N4VxB8H2|!# t |&9f Cg3BQLgH@LNsB8H2|!L#: 2<$9f Bg3@QLgH@LNsB8H2|!@# 2< |g3@QLgH@LNsB8H2|!gB8 pNqQ LNs&7GWVUTb`SP@000@P`S`bTH yVJg ` L?NuH yVg ` L?Nu><?<"NN0< @=3,`(|`?<%NNTB0y,B@BDBF;;<0,[a0,< nb<g*kTj 8@,[A[`T T@mBT<g*jlZj9|Z`lZ lZmBlZ,[0anlQBNuA|@mNu6H4C@BBBA yN"H;0(((<f Nu E | PNЁ)))Nu))Nu))Nu)))Nu))Nu))NuNu~zvx?"P"2_,(06>NSdis{Wnnxz|~[\^adegPdUhlm~#1AY&&# ,*Nu 9B.@F#B& #B # p?</9B/9B?<NN /< ?< NA\`* PLEASE PRESS THE RESET BUTTON AGAIN  BUDGIE UK   THE FAIRER FACE   OF PD !  ALL AUTHORS RECEIVE ROYALTIES SEE YOU AGAIN ..... SOON  Jy lf y ncRBy n y pp g\ gb# p< ob C E $$$$$$$$09 .9B~@# $GC rxph`XPH@80( QRy nQ y "y p23h3h3h3h 3h((3h003h883h@@3hHH3hPP3hXX3h``3hhh3hpp3hxx3h3h3h3hQ~NuA < `A < `<g&<g*<g.<g2<g6`v3 `B3 `63 `*3 `32 l3 n`y l` BUDGIE UK   LICENCEWARE   35 TITLES !  ESC TO QUIT   HELP: MUSIC  ON / OFF ...RESET QUIT ..6 &    6 F  J 8 $222"tV"     b <   fD34$2TD3""7ꏐ 8ߚ;O6xʍ ʜ9}.25Dnxׯ~/da=Gn|:{Ηv..6q~o~Ϸ{翿?[_}0>=1{ZwJ0p׏8{@F{N;ݗTǻ-x<}0`?y0;?U2z>p045:?}yw88 6睾byJ~j5!϶R><}1S}ڀv(~6&v~9A@c$i|ob8~zuj.x;9! ?_G)n?ҀCvo?@g@& jg{T Ft?;?_/axPwpP`,Y/bp?-zp WG~38h?p`p?0 W,~)8%wθp0@7p0?0?Wn ר8_wpJs!vdm>|P~_z}d8ׂh.8ܮ080?ÿ?}$!@!(a?G]>1pjn@&b)b?8.?p ڑe(b?k3 "W_SC!__S U^+ -/@?X^&O6&?ق8?h#g#_يwr8|Js7>oտ/ <32_i _-_@!`azSݫ ?QW9wQQ_?GoKWTz6Tawwo7K]xo}߭@M?T^ ] ` ` ? ? ? ~ N \p1F}t<p0@>$0?Cg`2r_8h l>|yp7`oda_~A_Nÿ@@>| OT o,@缱y3B2}Ϝ64p`> WĿ?^_=^071)>8kX?: ~:]h!>pA.8W@+ zVl>GWj& 2m><==2y1z>? : * P]Kd g[[WQRï<C>?pjkS!1; boWW|wwz{>?8*?~/*_C$?**~RՀ;>|gO~vR\/GGGnVzՀ;>|UWoDFF[[[?I-?>3@TWOKz=oͯPS_?>###P*W$/%j%!X}?GiHUTA"oUKK HwA?K*W60ߵ?J?|?? BjUSo@->1QULBPhdsUUK(4"UpSc2#?7wJ#ύOg??JU__+W_%+P_˿~DUu~/W\~" _O~.NPT+B|&N-*_|o~Zjo|<'l//pt @_8pxz]Op61hܯ>?+f@PP@Z|EIo6__F|?u }@dDpV8?vze`[[S^0 o}TT`@_@Mm$Ss>wh(s8@@V+0W8ЀI_8`7rH *Ug'_x0ohpn? UW?Dp ; 8ppG߿_Wzp/?$PP@70UX|_?B?oHUX?@~}7@_ y\~?C.?_@_A*|@}_/ D @= PU߀ E>9~ ʃjjՀCPY yŹ4?UWU? UUOO o> 2p:?WWaPP |t`OTf? +8 7sU' 8x>>?T?Wue+/0? >p=>?ԯ???Ttrpp`??? IY^"_P\?<(?pWsp7?|<|.>G+ݟ=MM%x=}GOn?| M@-_x<|8w|x0GG@G/00yy?{zxbb|?0:Oxxii=~  AO?8(:?aa3U@qŗUP??xaxa3Yow.w a aYgLL?UES_|aa300o/#{z|(xx7~dd}w3T|UT990? =91n`/@@_22__3wv?p?+g?@pQT0;?>//>>H8UUQqQ< (( """"JJ  }.)* ? //<< >>>>KK8||>&|&?UU@ **"" """"JJ  ?? >> ""JJ  K2ŽB?UG  T*; rasters, scrolls, and other things... ; mfp section from ST NEWS 4.3 by Stefan Posthuma ; A Digital Insanity creation ; adapted by Camy Maertens (Budgie UK) ; ; ; default path is d:\damon\ ; before compiling change path if necessary bra start pic_name dc.b "a:\rasters\queen5.pi1",0 font_name dc.b "a:\fonts\fontish",0 even start clr.l -(sp) supervisor mode on move.w #$20,-(sp) trap #1 move.l d0,savereg move.l $44e,a0 current physbase sub.l #$2000,a0 go back a bit because our 50-60 hz... move.l a0,physbase ..trick would push us into rom lea stack,a7 stack needed move.l #moff,-(sp) mouse off clr.w -(sp) move.w #25,-(sp) trap #14 addq.l #8,sp dc.w $a00a move.w #4,-(sp) get resolution trap #14 addq.l #2,sp move.w d0,oldrez and save it move.l $44e,oldscr move.l physbase,screen movem.l $ffff8240.w,d0-d7 save colors... movem.l d0-d7,oldpal ..quickly move.w #0,-(sp) set low res move.l screen(pc),-(sp) phys move.l screen(pc),-(sp) log move.w #5,-(sp) trap #14 add.l #12,sp * bra hi avoid loading degas pic * load a degas picture at a specific address move.w #0,-(sp) move.l #pic_name,-(sp) open file move.w #$3D,-(sp) trap #1 addq.l #8,sp move.w d0,handle move.l screen,d0 load direct to current screen sub.l #34,d0 sub.l #1*160,d0 hide the palette data move.l d0,-(sp) move.l #34,-(A7) read it move.w handle,-(A7) move.w #$3F,-(A7) trap #1 adda.l #12,A7 move.l screen,d0 load direct to current screen add.l #40*160,d0 push the picture 40 lines DOWN ; inside the bottom border! move.l d0,-(sp) move.l #32000,-(A7) read picture move.w handle,-(A7) move.w #$3F,-(A7) trap #1 adda.l #12,A7 move.w handle,-(SP) move.w #$3E,-(SP) trap #1 close file addq.l #4,SP move.l screen,a0 sub.l #192,a0 locate palette's origin lea palette,a1 destination move.l #16-1,d0 paloop move.w (a0)+,(a1)+ save it dbra d0,paloop hi *----------------------------------------------- bsr hblon enable my interrupts# *------------------------------------------------ again move.w #7,-(sp) wait for a key no echo trap #1 addq.l #2,sp swap d0 cmp.b #$01,d0 ESC ? if so quit bne again *------------------------------------------------ bsr hbloff disable interrupts movem.l oldpal,d0-d7 old colors back movem.l d0-d7,$ffff8240.w move.w oldrez,-(sp) old resolution back move.l oldscr,-(sp) move.l oldscr,-(sp) move.w #5,-(sp) trap #14 add.l #12,sp move.l #mon,-(sp) mouse on clr.w -(sp) move.w #25,-(sp) trap #14 addq.l #8,sp dc.w $a009 move.l savereg,-(sp) leave supervisor move.w #$20,-(sp) trap #1 addq.l #6,sp clr.w -(sp) sayonara! trap #1 oldrez: dc.w 0 oldscr: dc.l 0 savereg: dc.l 0 screen: dc.l 0 oldpal: ds.w 16 mon: dc.b $08 moff: dc.b $12 even *------------------------------------------------------- ; see the article for comments about these addresses hblon move.l $120,oldtb save old timer B vector move.l $70,old4 save old vb vector move.l $70,new4b+2 now, new vb routine will jump to ; old one afterwards move.b $fffffa07,old07 timer B enable move.b $fffffa09,old09 timer C enable move.b $fffffa0f,old0f timer B in-service move.b $fffffa11,old11 timer C in-service move.b $fffffa1b,old1b timer B control and.b #$df,$fffa09 disable timer C and.b #$fe,$fffa07 disable timer B move.l #newtb1,$120 new timer B vector move.l #new4,$70 new vb vector or.b #1,$fffffa07 enable timer B or.b #1,$fffffa13 set timer B mask rts hbloff move.w sr,-(sp) move.w #$2700,sr cut out all interrupts move.b old07(pc),$fffffa07 restore all old vectors move.b old09(pc),$fffffa09 move.b old0f(pc),$fffffa0f move.b old11(pc),$fffffa11 move.b old1b(pc),$fffffa1b move.l oldtb,$120 move.l old4,$70 move.w (sp)+,sr rts old4: dc.l 0 oldtb: dc.l 0 old07: dc.b 0 old09: dc.b 0 old0f: dc.b 0 old11: dc.b 0 old1b: dc.b 0 even ; This is the new VBL handler new4 clr.b $fffffa1b.w disable timer B move.b #36,$fffffa21 first raster 36 lines away move.b #8,$fffffa1b enable timer B move.w #$644,$ff8240 initial border (beige) move.l #newtb1,$120 timer B vector new4b jmp $12345678 pass ontrol to OLD vb vector newtb1 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) save from corruption move.w #$fa21,a1 timer B data register (ie scanline!) move.b #22,(a1) next interrupt at 22+36= line 58 move.l #newtb2,$120 set new timer B vector move.b #8,$fffffa1b.w allow timer B again moveq.w #22-1,d2 number of colors in table ; change above figure to 48 and we'll get 48 lines with different ; colors BUT, next interrupt further down will be unstable.. move.l #pal1,a0 pal1: color table ; I am now randomly modifying A0 to point ANYWHERE in memory move.l $466,d3 random value lsl.l #1,d3 make it even move.l d3,a0 point to it add.l #44,a0 add 22 words ; we can now clearly see these 22 lines grouped at the top of picture ; from line 36 onwards (22 different random colors) loop move.b (a1),d0 get value of timer B wait cmp.b (a1),d0 wait one scanline ! beq wait move.w -(a0),$ff8240 use those randoms colors (backwards) ; move.w (a0)+,d1 ; move.w d1,$ff8240 set colors ; move.w d1,$ff8242 ; move.w d1,$ff8244 ; move.w d1,$ff8246 ; move.w d1,$ff8248 ; move.w d1,$ff824a ; move.w d1,$ff824c ; move.w d1,$ff824e dbra d2,loop movem.l palette,d1-d7/a0 loopx move.b (a1),d0 more waiting for... waitx cmp.b (a1),d0 ... next scanline beq waitx movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte newtb2 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) move.w #$fa21,a1 move.b #76,(a1) next interrupt at 22+36+76= line 134 move.l #newtb3,$120 move.b #8,$fffffa1b.w ; now follows the second lot of lines from location 58 to 80 move.w #22-1,d1 raster is 22 scanlines deep move.l $466,d2 get a random number lsl.l #1,d2 make sure it's even move.l d2,a0 that's where we'll get our colors from! loop2 move.b (a1),d0 wait2 cmp.b (a1),d0 see if scanline has moved on beq wait2 move.w (a0)+,$ff8240 now use those totally random colors dbra d1,loop2 movem.l palette,d1-d7/a0 restore original palette move.b (a1),d0 waity cmp.b (a1),d0 beq waity movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte newtb3 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) move.w #$fa21,a1 move.b #64,(a1) next interrupt 134+64=198 (kill border) ; the above figure is critical. It must add up to line 198 ; less and bottom border doesn't open. More and we go over the top move.l #killborder,$120 move.b #8,$fffffa1b.w ; now we have the third group of colors, again random move.w #21-1,d1 number of scanlines wanted move.l #pal1,a0 where colors are stored loop3 move.b (a1),d0 wait3 cmp.b (a1),d0 beq wait3 move.w (a0)+,$ff8242 the Budgie logo this time dbra d1,loop3 movem.l palette,d1-d7/a0 again restore original palette move.b (a1),d0 waitz cmp.b (a1),d0 beq waitz movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte killborder clr.b $fffffa1b.w timer stop * bra bill jumping to bill will skip the 50-60 hz bit movem.l d0-d1/a0-a1,-(sp) move.w #$fa21,a1 move.b #0,(a1) changing this number had little effect move.b #8,$fffffa1b.w this line is essential move.b (a1),d0 wait4 cmp.b (a1),d0 wait last scanline beq wait4 clr.b $ffff820a.w 60 Hz moveq #4,d0 nopi2 nop wait a while dbf d0,nopi2 move.b #2,$ffff820a.w 50 Hz movem.l (sp)+,d0-d1/a0-a1 bill bclr #0,$fffffa0f.w end of interrupt rte final exit *------------------------------------------ pal1 dc.w $026,$237,$247,$257,$256,$255,$254,$162 dc.w $560,$653,$750,$740,$730,$600,$530,$600 dc.w $730,$740,$750,$760,$653,$560,$162,$254 palette ds.w 32 ds.w 310 stack dc.l 0 physbase dc.l 0 screen_0 dc.l 0 handle dc.w 0 even ; rasters, scrolls, starfields and other things... ; mfp section from ST NEWS 4.3 by Stefan Posthuma ; adapted by Camy Maertens (Budgie UK) ; starfield by Gary Wheaton & The Shapeshifters ; text scroll by Damon Barwin, Omensoft and co ; font by unknown (fontish) ; ; before compiling change path if necessary bra start pic_name dc.b "a:\rasters\queen5.pi1",0 font_name dc.b "a:\fonts\fontish",0 even start clr.l -(sp) supervisor mode on move.w #$20,-(sp) trap #1 move.l d0,savereg move.l $44e,a0 current physbase sub.l #$2000,a0 go back a bit because our 50-60 hz... move.l a0,physbase ..trick would push us into rom move.l a0,a7 temporary stack move.l #moff,-(sp) mouse off clr.w -(sp) move.w #25,-(sp) trap #14 addq.l #8,sp dc.w $a00a move.w #4,-(sp) get resolution trap #14 addq.l #2,sp move.w d0,oldrez and save it move.l $44e,oldscr move.l physbase,screen movem.l $ffff8240.w,d0-d7 save colors... movem.l d0-d7,oldpal ..quickly move.w #0,-(sp) set low res move.l screen(pc),-(sp) phys move.l screen(pc),-(sp) log move.w #5,-(sp) trap #14 add.l #12,sp bra nopic in this example, we don't want any degas pic * load a degas picture at a specific address move.w #0,-(sp) move.l #pic_name,-(sp) open file move.w #$3D,-(sp) trap #1 addq.l #8,sp move.w d0,handle move.l screen,d0 load direct to current screen sub.l #34,d0 sub.l #1*160,d0 hide the palette data move.l d0,-(sp) move.l #34,-(A7) read it move.w handle,-(A7) move.w #$3F,-(A7) trap #1 adda.l #12,A7 move.l screen,d0 load direct to current screen add.l #40*160,d0 push the picture 40 lines DOWN ; inside the bottom border! move.l d0,-(sp) move.l #32000,-(A7) read picture move.w handle,-(A7) move.w #$3F,-(A7) trap #1 adda.l #12,A7 move.w handle,-(SP) move.w #$3E,-(SP) trap #1 close file addq.l #4,SP nopic move.l screen,a0 sub.l #44,a0 get a random palette as no pic is loaded lea palette,a1 destination move.l #16-1,d0 paloop move.w (a0)+,(a1)+ save it dbra d0,paloop move.l #font_name,-(A7) open fontish c/set move.w #$3D,-(A7) trap #1 move.w d0,handle move.l #font,-(A7) load it here (end of this prog) move.l #1953,-(A7) 1953 bytes move.w handle,-(A7) move.w #$3f,-(a7) read file trap #1 adda.l #$c,A7 move.w handle,-(a7) move.w #$3e,-(a7) trap #1 close file addq.l #4,a7 move.l screen,d5 add.l #38*160+158,d5 line of scroll number 1 move.l d5,line_one move.w #1,speed move.l #text_1,text_address budgie message in scroll variable move.l #scroll,a5 enable scroll interrupt bsr enable_vbi bsr reset enable reset routine hi bsr hblon enable my MFP interrupts# *------------------------------------------------ get bsr getkey cmp.b #$01,d0 esc beq quit bsr stary star field at 50 hz bra get *------------------------------------------------- getkey move.w #$ff,-(sp) move.w #6,-(sp) trap #1 addq.l #4,sp swap d0 rts *------------------------------------------------ quit move.l #scroll,a5 cut out message scroll bsr disable_vbi bsr hbloff disable MFP interrupts movem.l oldpal,d0-d7 old colors back movem.l d0-d7,$ffff8240.w move.w oldrez,-(sp) old resolution back move.l oldscr,-(sp) move.l oldscr,-(sp) move.w #5,-(sp) trap #14 add.l #12,sp move.l #mon,-(sp) mouse on clr.w -(sp) move.w #25,-(sp) trap #14 addq.l #8,sp dc.w $a009 move.l savereg,-(sp) leave supervisor move.w #$20,-(sp) trap #1 addq.l #6,sp clr.w -(sp) quit trap #1 oldrez dc.w 0 oldscr dc.l 0 savereg dc.l 0 screen dc.l 0 oldpal ds.w 16 mon dc.b 8 moff dc.b 18 even *------------------------------------------------------- ; see the article for comments about these addresses hblon move.l $120,oldtb save old timer B vector move.l $70,old4 save old vb vector move.l $70,new4b+2 now, new vb routine will jump to ; old one afterwards move.b $fffffa07,old07 timer B enable move.b $fffffa09,old09 timer C enable move.b $fffffa0f,old0f timer B in-service move.b $fffffa11,old11 timer C in-service move.b $fffffa1b,old1b timer B control and.b #$df,$fffa09 disable timer C and.b #$fe,$fffa07 disable timer B move.l #newtb1,$120 new timer B vector move.l #new4,$70 new vb vector or.b #1,$fffffa07 enable timer B or.b #1,$fffffa13 set timer B mask rts hbloff move.w sr,-(sp) move.w #$2700,sr cut out all interrupts move.b old07(pc),$fffffa07 restore all old vectors move.b old09(pc),$fffffa09 move.b old0f(pc),$fffffa0f move.b old11(pc),$fffffa11 move.b old1b(pc),$fffffa1b move.l oldtb,$120 move.l old4,$70 move.w (sp)+,sr rts old4 dc.l 0 oldtb dc.l 0 old07 dc.b 0 old09 dc.b 0 old0f dc.b 0 old11 dc.b 0 old1b dc.b 0 even *------------ ; This is the new VBL handler new4 clr.b $fffffa1b.w disable timer B move.b #36,$fffffa21 first raster 36 lines away move.b #8,$fffffa1b enable timer B move.w #$327,$ff8240 initial border (beige) move.l #newtb1,$120 timer B vector new4b jmp $12345678 pass ontrol to OLD vb vector newtb1 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) save from corruption move.w #$fa21,a1 timer B data register (ie scanline!) move.b #22,(a1) put 22 in it : second interrupt at line 58 move.l #newtb2,$120 set new timer B vector move.b #8,$fffffa1b.w allow timer B again moveq.w #22-1,d2 number of colors in table ; change above figure to 48 and we'll get 48 lines with different ; colors BUT, next interrupt further down will be unstable.. move.l #pal1,a0 pal1: color table ; I am now randomly modifying A0 to point ANYWHERE in memory move.l $466,d3 random value lsl.l #1,d3 make it even move.l d3,a0 point to it ; add.l #44,a0 add 22 words ; we can now clearly see these 22 lines grouped at the top of picture ; from line 36 onwards (22 different random colors) loop move.b (a1),d0 get value of timer B wait cmp.b (a1),d0 wait one scanline ! beq wait move.w -(a0),$ff8242 use those randoms colors (backwards) ; move.w (a0)+,d1 ; move.w d1,$ff8240 set colors ; move.w d1,$ff8242 ; move.w d1,$ff8244 ; move.w d1,$ff8246 ; move.w d1,$ff8248 ; move.w d1,$ff824a ; move.w d1,$ff824c ; move.w d1,$ff824e dbra d2,loop movem.l palette,d1-d7/a0 loopx move.b (a1),d0 more waiting for... waitx cmp.b (a1),d0 ... next scanline beq waitx movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte newtb2 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) move.w #$fa21,a1 move.b #76,(a1) third one will be at line 58+40=98 move.l #newtb3,$120 move.b #8,$fffffa1b.w ; now follows the second lot of lines from location 58 to 80 move.w #22-1,d1 raster is 22 scanlines deep move.l $466,d2 get a random number lsl.l #1,d2 make sure it's even move.l d2,a0 that's where we'll get our colors from! loop2 move.b (a1),d0 wait2 cmp.b (a1),d0 see if scanline has moved on beq wait2 move.w (a0)+,$ff8240 now use those totally random colors dbra d1,loop2 movem.l palette,d1-d7/a0 restore original palette move.b (a1),d0 waity cmp.b (a1),d0 beq waity movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte newtb3 clr.b $fffffa1b.w timer stop movem.l d0-d7/a0-a1,-(sp) move.w #$fa21,a1 move.b #64,(a1) kill border at line 199 (101+98) move.l #killborder,$120 move.b #8,$fffffa1b.w ; now we have the third group of colors, again random move.w #21-1,d1 number of scanlines wanted move.l #pal1,a0 where colors are stored loop3 move.b (a1),d0 wait3 cmp.b (a1),d0 beq wait3 move.w (a0)+,$ff8240 dbra d1,loop3 movem.l palette,d1-d7/a0 again restore original palette move.b (a1),d0 waitz cmp.b (a1),d0 beq waitz movem.l d1-d7/a0,$ff8240 movem.l (sp)+,d0-d7/a0-a1 bclr #0,$fffffa0f.w end of interrupt rte killborder clr.b $fffffa1b.w timer stop * bra bill jumping to bill will skip the 50-60 hz bit movem.l d0-d1/a0-a1,-(sp) move.w #$fa21,a1 move.b #140,(a1) changing this number had little effect move.b #8,$fffffa1b.w this line is essential move.b (a1),d0 wait4 cmp.b (a1),d0 wait last scanline beq wait4 clr.b $ffff820a.w 60 Hz moveq #4,d0 nopi2 nop wait a while dbf d0,nopi2 move.b #2,$ffff820a.w 50 Hz movem.l (sp)+,d0-d1/a0-a1 bill bclr #0,$fffffa0f.w end of interrupt rte final exit *------------------------------------------ pal1 dc.w $026,$237,$247,$257,$256,$255,$254,$162 dc.w $560,$653,$750,$740,$730,$600,$530,$600 dc.w $730,$740,$750,$760,$653,$560,$162,$254 palette ds.w 32 ds.w 10 physbase dc.l 0 screen_0 dc.l 0 handle dc.w 0 ds.w 48 even *---------------- * SET a Sequence of VBI routines [ C.Maertens ] 20/9/87 * Each routine has to be enabled or disabled separately * Address of routine expected in A5 * first available slot is usually the second one, first being gem * move.l #myroutine,$4d2 also does the same job * see example of TWO vbi's at once in Operation Angelica enable_vbi movem.l a0-a5,-(sp) move.l $456,a0 enab1 tst.l (a0) is is nought? (free) beq enab2 adda.l #4,a0 bra enab1 enab2 move.l a5,(a0) slot in this routine movem.l (sp)+,a0-a5 rts *------------ disable_vbi movem.l d0/a0-a5,-(sp) a5 holds address of routine move.l $456,a0 disab1 cmp.l (a0),a5 contents of $456 same as routine? beq disab2 disab3 adda.w #4,a0 try next one bra disab1 disab2 move.l #0,(a0) switch it off movem.l (sp)+,d0/a0-a5 rts *--------------------------- * star field (Gary Wheaton / Shapeshifters) stary MOVE #0,d7 loop (looks essentials...) MOVE #34,-(SP) TRAP #14 ADD.L #2,SP move #3563,d0 ADD #61,D0 MOVE D0,JOY BRA STAR JOY DC.W 0 HJTB DC.B 0,0,0,0,1,1,1,0,-1,-1,-1 VJTB DC.B 0,-1,1,0,0,-1,1,0,0,-1,1 STAR MOVE.L #HTAB,A4 WAITVB MOVE #37,-(SP) TRAP #14 ADDQ.L #2,SP CLR.L D0 MOVE JOY,A0 CLR D0 MOVE.B (A0),D0 CLR D4 CLR D6 MOVE.B HJTB(PC,D0),D4 \HZ MOVE.B VJTB(PC,D0),D6 \VT LP0 MOVE.B #0,D5 MOVE (A4),D0 MOVE.B 91(A4),D1 BSR CPLOTT MOVE 180(A4),D0 CMP.B #10,D4 BGT OK CMP.B #0,D4 BEQ OK1 BMI RIGHT SUB D0,(A4) BPL OK1 MOVE #320,(A4) MOVE.B 91(A4),D1 \ ROL.B #1,D1 \RANDOMIZE VERT A BIT MOVE.B D1,91(A4) \ BRA OK1 RIGHT ADD D0,(A4) CMP #320,(A4) BLT OK1 CLR (A4) *\SHOULD RAND HERE ALSO OK1 CMP.B #0,D6 BEQ OK BPL UP SUB D0,90(A4) BPL OK2 MOVE #199,90(A4) BRA OK2 UP ADD D0,90(A4) CMP #200,90(A4) BLT OK2 CLR 90(A4) OK2 OK MOVE.B 91(A4),D1 \V MOVE (A4),D0 MOVE.B D1,D5 BSR CPLOTT SUB.L #2,A4 CMP.L #TR,A4 BGT LP0 dbra d7,STAR SM RTS *----------- CPLOTT AND.L #15,D5 AND #255,D1 CMP #320,D0 BLT PLO RTS PLO MOVE D0,D3 LSR.W #3,D0 MOVE D0,D2 AND #7,D3 AND #1,D0 AND #65534,D2 ASL #2,D2 ADD D2,D0 MULU #160,D1 ADD.W D1,D0 MOVE.L $44E,A0 ADD.L D0,A0 MOVE.L A0,A1 MOVE.B tbl(PC,D3),D0 \GET MASK PLOK AND.B D0,(A0) \C.0:PL.X,Y AND.B D0,2(A0) \ AND.B D0,4(A0) AND.B D0,6(A0) CMP.B #0,D5 \COLOR TO PLOT BNE COLO \IF>0 THEN PLOT RTS \ELSE RTS *--------- * \COLOR 0 MASKS tbl DC.B 127,255-64,223,239 DC.B 247,251,253,254 COLO EOR.B #255,D0 \REVERSE BIT PATTN ASL #2,D5 \COL*4 MOVE.L #XGOTO,A0 ADD.W D5,A0 MOVE.L (A0),A0 JMP (A0) \GOTO COLOR C15 OR.B D0,6(A1) \COLOR 15 C14 OR.B D0,2(A1) C10 OR.B D0,(A1) C2 OR.B D0,4(A1) RTS *---------- C3 OR.B D0,4(A1) C1 OR.B D0,6(A1) \COLOR 1 ENTRY RTS C5 OR.B D0,2(A1) OR.B D0,6(A1) RTS C7 OR.B D0,6(A1) C6 OR.B D0,4(A1) C4 OR.B D0,2(A1) RTS C11 OR.B D0,4(A1) C9 OR.B D0,6(A1) C8 OR.B D0,(A1) RTS C13 OR.B D0,6(A1) C12 OR.B D0,(A1) OR.B D0,2(A1) RTS C16 RTS * \ JSR TABLE interesting way XGOTO DC.L C1,C1,C2,C3,C4,C5,C6,C7,C8 DC.L C9,C10,C11,C12,C13,C14,C15,C16 * \\\\\23 * across * TR DC.W 0,20,30,120,319,200,230,290 DC.W 80,140,134,180,240,290,199 DC.W 50,95,130,180,234,256,300 DC.W 8,16,23,30,40,48,54,62,78,83 DC.W 100,105,115,123,134,140,150 DC.W 156,160,170,178,1,1 * down * Y pos of stars HTAB DC.W 1 DC.W 160,170,180,166,172,174,87 DC.W 110,110,120,122,124,126,128 dc.w 130,132,134,136,91,92,94,97,100,101,103 dc.w 80,100,85,104,108,109 DC.W 126,127,158,169,140,131,132 DC.W 143,134,165,136,157,168 * speed * DC.W 1,2,3,2,4,6,1,2,3,1,3,1,2,5,4 DC.W 1,2,3,6,4,2,5,2 DC.W 2,1,6,4,2,1,4,6,3,3,2,5,4,1,5 DC.W 6,2,3,1,2,3,3,3 *-------------------------- * THIS JUMPS TO RESETA WHEN THE RESET BUTTON IS PRESSED * * (Damon Barwin) reset move.l #$31415926,$426 validate reset move.l #reseta,$42a point to reset routine rts * this is the reset routine reseta move.l screen,d0 sub.l #$18000,d0 move.l d0,a7 some free stack needed move.w #$2300,sr disable some interrupts clr.l $426 disable reset effect bset #1,$fff820a 50 hz move.l screen,line_one default screen preferably default screen else crash move.l #text_9,text_address quit message to scroll move.w #$0,-(A7) move.l screen,-(A7) reset screen to default move.l screen,-(A7) move.w #5,-(A7) trap #14 add.l #12,A7 move.l #press,-(a7) press rest etc... move.w #$9,-(a7) print text trap #1 addq.l #6,a7 bra get press dc.b 10,10,10,10,10,10,10,10 dc.b " PLEASE PRESS THE RESET BUTTON AGAIN",10,13,13,13,13,0 even text_9 dc.b 4," BUDGIE UK ",5 dc.b 4," " DC.B 3," THE FAIRER FACE ",5 dc.b 4," " dc.b 3," OF PD ! ",5 DC.B 4," ALL AUTHORS " dc.b 4,"RECEIVE ROYALTIES",5 dc.b 4," " dc.b 3,"SEE YOU AGAIN ...",5 dc.b 4,".. SOON ",5 dc.b 3," ",5 dc.b $fe end of reset message even *------------------------------ * message scroller scroll tst.w vvar1 bne tscr18 cmpi.w #16,vvar2 bls.s tscr6 clr.w vvar2 tscr3 movea.l text_address,a0 scroll variable (holds address of text) moveq #0,d0 move.b (a0)+,d0 cmpi.b #$ff,d0 end of main message? beq tscr11 cmpi.b #$fe,d0 end of reset message? beq tscr11a tscr4 move.l a0,text_address cmp.b #$20,d0 ble tscr12 tscr5 subi.b #$20,d0 lea font,a1 where font is loaded lsl.l #5,d0 adda.l d0,a1 lea workspace,a2 move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ move.l (a1)+,(a2)+ tscr6 move.w speed,d0 tscr7 move.l screen,d7 add.l #202*160,d7 line of scroll number 2 move.l d7,old_screen_pos move.l d7,a2 lea workspace,a1 moveq #15,d1 tscr8 lsl (a1)+ roxl $98(a2) roxl $90(a2) roxl $88(a2) roxl $80(a2) roxl $78(a2) roxl $70(a2) roxl $68(a2) roxl $60(a2) roxl $58(a2) roxl $50(a2) roxl $48(a2) roxl $40(a2) roxl $38(a2) roxl $30(a2) roxl $28(a2) roxl $20(a2) roxl $18(a2) roxl $10(a2) roxl 8(a2) roxl (a2) adda.l #$a0,a2 dbf d1,tscr8 addq.w #1,vvar2 dbf d0,tscr7 tscr9 move.l old_screen_pos,a0 movea.l line_one,a1 the message at the top adda.l #2,a1 moveq #$f,d0 tscr10 move.w (a0),(a1) move.w 8(a0),8(a1) move.w $10(a0),$10(a1) move.w $18(a0),$18(a1) move.w $20(a0),$20(a1) move.w $28(a0),$28(a1) move.w $30(a0),$30(a1) move.w $38(a0),$38(a1) move.w $40(a0),$40(a1) move.w $48(a0),$48(a1) move.w $50(a0),$50(a1) move.w $58(a0),$58(a1) move.w $60(a0),$60(a1) move.w $68(a0),$68(a1) move.w $70(a0),$70(a1) move.w $78(a0),$78(a1) move.w $80(a0),$80(a1) move.w $88(a0),$88(a1) move.w $90(a0),$90(a1) move.w $98(a0),$98(a1) adda.l #$a0,a0 adda.l #$a0,a1 dbf d0,tscr10 rts tscr11 lea text_1,a0 at end of main message, we come.. move.b #32,d0 ..here again bra tscr4 tscr11a lea text_9,a0 at end of reset message, we come.. move.b #32,d0 ..here bra tscr4 tscr12 cmp.b #1,d0 speeds 1 slow 4 fast 5 stop beq tscr13 cmp.b #2,d0 beq tscr14 cmp.b #3,d0 beq tscr15 cmp.b #4,d0 beq tscr16 cmp.b #5,d0 beq tscr17 bra tscr5 tscr13 move.w #0,speed bra tscr3 tscr14 move.w #1,speed bra tscr3 tscr15 move.w #2,speed bra tscr3 tscr16 move.w #5,speed bra tscr3 tscr17 move.w #50,vvar1 move.w #16,vvar2 bra tscr18 tscr18 subi.w #1,vvar1 bra tscr9 * TEXT FOR MESSAGE * * speed: 1 to 4 (slow-fast) 5 is stop 255 is end text_1 dc.b 4," BUDGIE UK ",5 dc.b 4," " DC.B 3," LICENCEWARE ",5 dc.b 4," " dc.b 3," 35 TITLES ! ",5 DC.B 4," ESC TO QUIT ",5 dc.b 4," ",5 DC.B 4," HELP: MUSIC ",5 dc.b 4," ON / OFF ",5 dc.b 1,"...RESET QUIT ..",5 dc.b 255 end even vvar1 ds.w 1 vvar2 ds.w 1 text_address ds.l 6 workspace ds.l 8 temp storage for character speed ds.w 1 line_one ds.l 1 old_screen_pos dc.l 0 ds.w 8 font ds.b 2192 c/set is physically loaded HERE ds.w 24 spare `:`*a:\rasters\queen5.pi1a:\fonts\fontishB?< NA# yN #0O,/<Bg?<NNP ?<NNT3#N#0L@H?</:/:?<NN ?</<?<=NAP38 9"//<"?98?<?NA 9//<}?98?<?NA ?98?<>NAX yC <2Qa?<NATH@<faLH@?9/9/9?<NN /<Bg?<NNP /9?< NA\BgNA# #p#p 9 9# #p99Nu@F'F? 81*# #pFNuB8$!3D@# N4VxB8H2|!#P t |P&9f C,g3@QLgH@LNsB8H2|!L# 2<$9f Bg3@QLgH@LNsB8H2|!@# 2< |Pg3BQLgH@LNsB8H2|!gB8 pNqQ LNs&7GWVUTb`SP@000@P`S`bT6 " . F  J 8 *222INTERRUPTS, RASTERS, BORDERS AND OTHER STUFF by Stefan Posthuma With my hands still shaking a little from a heavy Andes Attack session (I reached level 14 with 350000 or so points!), I feel ready to tell you something about the things that make life on the ST so colorful. In fact, they are the essential element of every super-duper demo that is being created nowadays. They are called: rasters. First of all, let me tell you what rasters are and before that, I will inform you about the basis of a raster: the interrupt. Let's say you write a program and you want to do something which has to be done with specific time-intervals, like blinking a cursor or playing some music. You can go through a lot of trouble and call your routines very often and time them or something so they will be executed regularly, or you can program them on interrupt. When you move your mouse, the keyboard processor will notice it, process the movement and then send the information to the 68000. It sounds simple, but how does one processor 'send' something to the other? Well, it simply 'interrupts' the processor it wants to tell something. In case of the mouse movement, the keyboard processor will generate an interrupt which will put the 68000 in interrupt mode. Now the 68000 has 7 interrupt levels. This means that there are 7 different interrupts possible. Also this means that an interrupt can interrupt an interrupt when it has a higher level! The different levels are used for the keyboard-processor, the vertical blank interrupt etc. More on this later. Immediately after it has received the signal, the 68000 will first complete its current instruction. After that, the status register and the program counter will be put on stack, the processor will enter supervisor mode and will jump to a certain memory location. These locations are set on fixed addresses somewhere in the first 500 bytes of memory or so. The keyboard processor will create a level 6 interrupt. The 68000 will fetch the value of memory location $118 and jump to the address formed by that value. Then it will execute the instructions normally from that address. When it reaches an RTE instruction, the status register and program counter will be fetched from stack and the processor goes back to user mode and program execution will continue just like nothing happened. As long as the interrupt routine does not corrupt the stack or changes any registers used by the normal program, the normal program will not 'know' that there has been an interrupt. Still with me? If you're not, don't worry too much about it, it is not totally essential for the understanding of the rest of this article. Now TOS has a nice feature if you want to use an interrupt- driven routine. The level 4 interrupt is the VBL. As you might know, the screen is painted by an electron beam. On a color monitor in 50Hz mode, the screen is drawn 50 times per second by this electron beam. It starts at the top left-hand corner of the screen and draws from left to right. When it has reached the right edge of the screen, it will jump back to the left and draw the next line. When it has reached the bottom of the screen, it will jump back to the top of the screen and start all over again. At this point, the level 4 interrupt will be generated. The time needed for the electron beam to go back to the top of the screen is long enough for the 68000 to do some work. When you are in 50Hz mode, the level 4 interrupt will be created 50 times a second! At location $4CE (a legal one), is a list of 8 addresses. The first few ones are used by TOS, but there are always a couple of them free to use. (They will be zero). When you have a routine, just put its address in one of the free locations and it will be called 50 times a second! Make sure your routine is short because it will slow down other operations. Back to the story about the electron beam. Let's say you can track it and you can do something at specific places on the screen. If you can somehow see when the beam is in the middle of the screen and you switch color palette just then, the rest of the screen will be painted using the new palette and you will have 32 colors on the screen! (This is the basic principle, make sure you understand it!!) So how can we track the electron beam then? Well, it all comes down to timer B. Timer B is a nice feature from the MFP 68901 processor and it counts screen lines! Each time a new screen line is drawn, the timer B data register will be increased so it will contain the number of the scanline drawn, starting at the first one after the upper border. Even better about timer B is that when you put a value in it, let's say 10, 10 scanlines later an interrupt will be generated! Well, this means that we have found the way. This is the way it works! Ok, practical now. Let's create a raster. First of all, we need a safe way to trigger timer B. Why not use the level 4 interrupt which occurs each time the electron beam reaches the bottom of the screen. Here we set the value for timer B and in that scanline, the interrupt will occur! So if we want a raster on scanline 100, we activate timer B with a value of 100 in the level 4 interrupt and wait for the timer B interrupt. Uh oh....strange things are happening.... MFP 68901: Hi guys! Interrupt time! 68000 : No way, I'm tired...leave me alone! MFP 68901: Ah, come one, just one little interrupt... 68000 : Forget it, go away! MFP 68901: Ok, have it your way. 68000 : Fine. MFP 68901: OVERRIDE!!!!!! 68000 : OUCH!!! MMU : Hey? What's going on? Who is overriding there without filing the proper request at my address bus? MFP 68901: I am and you can't stop me. 68000 : Groan... MMU : Stop it right now or I'll have to get involved here. 68000 : Yeah, stop this idiot! MFP 68901: Fools! MMU : SYNCHRONISE!! Shifter : AAAAAAHHHHH! My borders!!! MMU : Ooops, wrong interrupt level. MFP 68901: Wow! no borders, let's throw some rasters in there! Shifter : NO!!! AAAAAAAAAAAAAGGGRRLLL!! 68000 : Hey guys, what about me? MMU, MFP 68901: We're having fun. In fact, we haven't had this much fun since the Union Demo. Shifter : WHAT???!! UNION DEMO??!!!? AAAAAAAHAHAAAAAHAAHAAA!!! 68000 : Nurse!! MMU : Yeah, border here, synchro there.....I'm having a blast. MFP 68901: Ok, what does this address do? Shifter : AHAHAAAAAAAAAGGRRRLGGALAAAHAAHAHHH!!!! 68000 : Hey, look out!! Gemdos critial error handler: PANIC! Exception vector: ZAP! 68000, MMU, MFP 68901: Uh oh..... Shifter : UNION DEMO!!! RAAAAAAHHH! LOST BOYS!! GROOOOOWWWLL!! CAREBEARS!!! AAAAAAAAAAHHAHAHAHAHHAHAHGGGGGLLLlllpp.. ST : CRASH!! Stefan : F.CK!! Good thing I press CONTROL-V regularly. I was about to tell you exactly how to program a Timer B raster interrupt. First thing we do is to install the new vectors so the 68000 will jump to our routines when interrupted. The VBL vector is $70 and the Timer B vector is $120. Now before we start messing around with the vectors, we have to put them in a safe place so we can restore them to their normal values at the end of the program. Also, we must make sure that any other VBL routines (e.g. music) are still called so we must jump to the old value of the level 4 vector after our level 4 interrupt. The following source fragments are originally by TEX. All I know about rasters I learned from them. Thanks guys! Note: supervisor mode must be on before you can mess with any of these registers. hblon: move.l $120,oldtb ; save old timer B vector move.l $70,old4 ; save old VBL vector move.l $70,new4b+2 ; now, the new VBL routine will jump to the old VBL after it is done. move.b $fffffa07,old07 ; Timer B enable move.b $fffffa09,old09 ; Timer C enable move.b $fffffa0f,old0f ; Timer B in-service move.b $fffffa11,old11 ; Timer C in-service move.b $fffffa1b,old1b ; Timer B control and.b #$df,$fffa09 ; disable Timer C and.b #$fe,$fffa07 ; disable Timer B move.l #newtb,$120 ; new Timer B vector move.l #new4,$70 ; new VBL vector or.b #1,$fffffa07 ; enable Timer B or.b #1,$fffffa13 ; set Timber B mask rts You can see that timer C will be switched off. This to prevent it from messing things up. Now we have installed two vectors for the VBL and the Timer B and we have set some registers of the MFP 68901 to allow Timer B interrupts and to disable Timer C. The thing we need now are the two routines to handle the VBL and the Timer B we installed. new4: clr.b $fffffa1b ; disable Timer B move.b 100,$fffffa21 ; set Timber B offset move.b #8,$fffffa1b ; enable Timer B move.w #$0,$ff8240 ; background = black new4b: jmp $12345678 ; the old VBL vector will have replaced the $12345678 so control will be passed on to the old VBL routine. The important value here is the '100'. This will mean that in the 100th scanline of the screen, a Timer B interrupt occurs and the vector at $120 will be called. newtb: clr.b $fffffa1b.w ; timer stop movem.l a0/d0,-(sp) ; save A0 and D0 move.w #$fa21,a0 ; timer B data move.b (a0),d0 ; get value of Timer B wait: cmp.b (a0),d0 ; wait one scanline beq.s wait move.w #$700,$ff8240 ; background red movem.l (sp)+,a0/d0 ; get registers back bclr #0,$fffffa0f.w ; end of interrupt rte First of all, you have to stop the timer to prevent any other interrupts from it. After that, you HAVE to push any registers you use on the stack. This is of vital importance, else somewhere in the middle of the normal program, registers will be changed and things go utterly wrong. Then we load the Timer B data register into A0. Reading this register will give you the current value of Timber B, i.e. the current scanline. After that we read the value of it in D0 and wait until it changes. In other words, we wait for the beginning of the next scanline. Why? Well, when an interrupt occurs, the 68000 has to complete its current instruction. After that, registers (PC and ST) have to be pushed on stack etc. All this takes a little while and when the actual interrupt routine is called, the electron beam is already in the left border, drawing visible screen area. If you change colors now, this will be visible. Also, the interrupt will not always occur at exactly the same place, so you will see some nervous flickering which is of course not tolerable if you want to write a demo. So we wait until the beginning of the next scanline and immediately after, change screen color. The electron beam is then still drawing the non-visible parts of the left border and your raster will be nice and stable. To restore the vectors, use the following code: hbloff: move.w sr,-(sp) ; save status register move.w #$2700,sr ; disable all interrupts move.b old07(pc),$fffffa07 ; restore all registers move.b old09(pc),$fffffa09 move.b old0f(pc),$fffffa0f move.b old11(pc),$fffffa11 move.b old1b(pc),$fffffa1b move.l oldtb,$120 ; old Timer B back move.l old4,$70 ; old VBL back move.w (sp)+,sr ; restore status register rts OK, these are the raw basics for raster programming. Now you know how to create a raster, let your imagination run free and create demos! I will give you one more example, let's say we want another raster at screen line 150. This means we will have two Timer B interrupts, one at line 100 and another one at line 150. In the VBL, you set the one for line 100 and in the Timer B interrupt at line 100, you set the one for line 150. Easy! So in the new4 routine, you add 1 line of code that sets the vector for the first Timer B. move.l newtb1,$120 In the newtb1 routine, you have to do three extra things: - set the new value for Timer B - set the new Timer B vector - enable Timer B again. The new value is set in scanlines from the current one. So if you want a raster at scanline 150, you have to set the Timer B value to 150-100 = 50. move.l #$fa21,a0 move.b #50,(a0) ; this sets the new Timer B value move.l #newtb2,$120 ; set the new Timer B vector move.b #8,$fffffa1b ; allow Timer B again Now you have to create a routine called newtb2 that handles the next raster. It is identical to the newtb1 routine (without the new changes). Of course, you can do more things with rasters than just change background color. By changing more colors, and changing not only one scanline, but some more, you can create the typical 'round' rasters that are to be found in so many demos. Just take a look at the color demos in this folder. Also, if you use a table of values for timer B instead of a fixed number, you can create moving rasters. The last purpose of raster interrupts is to get rid of borders. Now it has been explained already in the wizard series, but I will tell you once again. This is how border-obliteration works: The MMU (Memory Management Unit or GLUE chip) tells the Shifter (the video chip responsible for drawing the screen) exactly when to display screen memory and when to display border. There is one thing that the MMU does not really like and that is the changing of screen frequency (register $ff820a). When you do this, it will 'forget' the Shifter for a tiny while. Now if you change the frequency at a certain point in the last scanline of the screen, the MMU will forget to tell the Shifter that the lower border has started and the Shifter will happily continue displaying screen memory instead of border. The only thing special about the new screen memory is that it is shifted one plane to the left. There is 16 bytes missing at the lower-right corner of the screen. But that is not annoying at all. So you simply generate a Timer B interrupt at scanline 199, wait a while, change screen frequency (50-60Hz), wait for the next scanline, wait some more and change the frequency back (60-50Hz) and the border will be gone! Timer B will also happily continue counting scanlines, so rasters in the lower border are no trouble whatsoever! (Check out the color demo!). For source material about this, check ST NEWS 4.2 Removing the upper border is achieved in the same way. But there is a serious problem here. There are two versions of the MMU around and they both require a different position where you have to change frequency. It wouldn't be that much of a problem (just change frequency at both points and you are home free) if the screen address wouldn't start at different points on the screen then. This would mean that your graphics would be all misplaced on one ST while it works perfectly well on another. There must be a way to check this. I think it can be done by generating a Timer B interrupt at a certain position and examining the video address counter ($ff8205-$ff8209) but I haven't tried this yet. Removing the right and the left border is a little (a LOT more) harder. It still has to do with changing frequency, but other problems arise here. Now getting rid of the right border is not too difficult (I already managed it). You have to create a raster, wait a while until the electron beam it at a precise point and change frequency. Do it at exactly the right spot and the right border will be gone. The problem lies in the exactly. Remember the story about the flicker? Well, even if you wait for the next scanline, you never can be sure of the exact position. So you need a way to synchronise the raster so it happens at the exact spot every time. There is a way but it is a little hard to explain. With this technique, you can also create 'scrolling' rasters. I did this in the 4.4 demo (really nice one...I'm still working on it) and there is an ST NEWS logo in the lower, left and right border which scrolls and bounces and is made up entirely out of rasters. It is REALLY nice. Also, you have open the border over and over again for every scanline. This means you spend a lot of time waiting for the right border and if you open the entire right border, you won't have any time left. The left border is still a mystery to me. After a lot of trying, I finally gave up. The screen did the most crazy things but the left border just remained. One final remark about the full-screen demo by Level 16 (UNION DEMO!!!). Andreas told me how he did it and it is really brilliantly solved. I mean you spend all time waiting for the border so there is no time left for the things he does (like music, a sprite, color animation and rasters). But he did it. It has to do with filling in the code for the music etc. in the 'gaps' (normally a lot of NOP's) where he waits for the next border. It must have been one hell of a job to get it all synchronised. Also, it is just one big list of instructions, no loops or whatever (one jump I guess to the beginning). So this is why it is so big and this is why the assembler source is 2Mb large. Now this is just guessing (but I think I am right) so Andreas might laugh a lot after reading this. Check out the source in the RASTERS folder. 'RASTERS.S' it is called. .  tt..  tCOLORS DLIt uLFILENAMEASCt v GOLDFONTCHRt w:SCROL_MEPRGt RSCROL_MES tt uTEXT ASCt SCROL_MEDOCt   00@@PP``ppaaRRCC44%%%%44CCRRaappqqrrssttuuvvwwggWWGG77''''77GGWWggwwffUUDD33""  00@@PP``ppaaRRCC44%%a:read_me.prg86 |N1@D{??!CG???? #!s?C 0 x` p 0r|8;3G+0`̼<-S`@xyM3A'O0? ?a??_??`?aȟ߼?r oOSa$\pc0(78>y@ <|q<=c蟐X????߀??<_ _`  2mw?e_Ͽp?_Y?|8`  fr+0&-S`n6M3A'O?+0`̼<-S`@xyM3A'O |?_??xA>#?_?`߀? C<`x  fr+0&-S`n6M3A'O???9$??/__߿??/?? ߇?oOSa$ \cp8(7<pa@  @|` d =@ H>@?? `3?go߰?cx?y?__?_?~  `  _  Y?  p ``0,Hp !18'?7?????/????/??/??/??/?????78x,08 ?` F N   @ @|`z=@ Пm߀?e?oOSa$\c0(78` @ 8 @|`r=@d @??!?`So3?;o߰?x??__`p??_w?~ c`'9  _  Y? ``Q  +@[` ;` `?_ _ ` `_ _Cxwv986D #?0 lb#@N@30 #]B HpC?AX|?gܿ?__?_ǿ?/_7''?4pax0 .1 F#_` NY'A _I)?????_Ͽm_x(%?#?C?X/?a`@  y@ +0`q-S`@c蟐M3AX'̿O???? _? ?` ? me߿?oOSa$\c?(78 r|0;3Gn6O@?<??o_G??Ϟ`q??PA?<8S A0r|;3G  ?`__ _ C,3acoOSa$\c0(7``8Q  $8+@[`  ;`9&K;G_!_?b߀??__~//___?@_ @OOs !^ V!E|pd=EmH>W??__߿??_'?o?'G???oSa?4\c3(7 |@ 8 @|`r=@d @??!?̟s3O_;gOa 87p`3!S/C?Ow?#?_?`߀?    C<`x @ 8 @|`r=@d @??C_ggO??(7p?g`/΀_7OG'????78x,08 ?`r|;3G!`??h01 Y'ALpGw@#@``{0`# OxoOpsC<Gooooo>`hw0;O?oT( )Px?MB S 7Op [ g}@M40 }`[l ?OO?ox > o_??OO?p ;sC<0coo?OoT(!xt?)Pq?? (S a vy0&2=!M40 fA[l ['Cg?x o> o_??OO?;cOO?o3C|!Cxt?9q'? ( a:F"@ '@s`0 ` OxoOoanGX? 0+<` 0  69`&:=!g0fAnh['Cg??OoOoOow7O#_'G?OosOO?o3C| Ch?9p'x0  69`&:=!g0fAnh['Cg??OoOoOoo3C|C9p' { ` @c@GV@ Ov >?@??>? y ^@ 8 $;D`L @[<@ & | ?#?#3???7??73?/#'# @ @ @?F`@b k `@ @ `> ?`p?~~ ||@ @    F N  x   $` 9 G}#@`s `vOoOoanplFX8?840<1 F N   0 ,Hp !18'??????779+3'?'?` ?` ?@r|;3G/<B/??<?NA ??<>NAX9i9iga,|B*|9i9ig"yt><$I<<0`2)4)23A3B:<BBB0)2) 4) 3@H@Q3A HAi3B HBiBBB0)2)4)3@H@i3AHAi 3BHBi BBB0)2)4)3@H@i3AHAi3BHBiBBB0) 2)"4)$3@ H@i3A"HAi3B$HBiBBB0)(2)*4),3@(H@i 3A*HAi"3B,HBi$BBB0)02)24)43@0H@i(3A2HAi*3B4HBi,0Q"JQ<<$yt29BD6B(|B.4@B,BAB@9;&A5@5@5@ 9Ng `**D Q 9Ng<9 9f(B9y09"9B@nBy 9afa3@?<NAT@?9/9N/9N?<NNO /9J?< NA\BgNA |aNu ## #p#.#(9 9#2 99#p$#p3NuJygNu ## #pNu1! 91!f#2 #S9j$T f #ByfNsNF%N/#@ `$/Ry y(m y3NT! 9!f _Ns  00@@PP``ppaaRRCC44%%%%44CCRRaappqqrrssttuuvvwwggWWGG77''''77GGWWggwwffUUDD33""  00@@PP``ppaaRRCC44%%&wfUD3"wwwwwwwwwa:\scroll.me\text.asc--86 |N1@D{??!CG???? #!s?C 0 x` p 0r|8;3G+0`̼<-S`@xyM3A'O0? ?a??_??`?aȟ߼?r oOSa$\pc0(78>y@ <|q<=c蟐X????߀??<_ _`  2mw?e_Ͽp?_Y?|8`  fr+0&-S`n6M3A'O?+0`̼<-S`@xyM3A'O |?_??xA>#?_?`߀? C<`x  fr+0&-S`n6M3A'O???9$??/__߿??/?? ߇?oOSa$ \cp8(7<pa@  @|` d =@ H>@?? `3?go߰?cx?y?__?_?~  `  _  Y?  p ``0,Hp !18'?7?????/????/??/??/??/?????78x,08 ?` F N   @ @|`z=@ Пm߀?e?oOSa$\c0(78` @ 8 @|`r=@d @??!?`So3?;o߰?x??__`p??_w?~ c`'9  _  Y? ``Q  +@[` ;` `?_ _ ` `_ _Cxwv986D #?0 lb#@N@30 #]B HpC?AX|?gܿ?__?_ǿ?/_7''?4pax0 .1 F#_` NY'A _I)?????_Ͽm_x(%?#?C?X/?a`@  y@ +0`q-S`@c蟐M3AX'̿O???? _? ?` ? me߿?oOSa$\c?(78 r|0;3Gn6O@?<??o_G??Ϟ`q??PA?<8S A0r|;3G  ?`__ _ C,3acoOSa$\c0(7``8Q  $8+@[`  ;`9&K;G_!_?b߀??__~//___?@_ @OOs !^ V!E|pd=EmH>W??__߿??_'?o?'G???oSa?4\c3(7 |@ 8 @|`r=@d @??!?̟s3O_;gOa 87p`3!S/C?Ow?#?_?`߀?    C<`x @ 8 @|`r=@d @??C_ggO??(7p?g`/΀_7OG'????78x,08 ?`r|;3G!`??h01 Y'ALpGw@#@``{0`# OxoOpsC<Gooooo>`hw0;O?oT( )Px?MB S 7Op [ g}@M40 }`[l ?OO?ox > o_??OO?p ;sC<0coo?OoT(!xt?)Pq?? (S a vy0&2=!M40 fA[l ['Cg?x o> o_??OO?;cOO?o3C|!Cxt?9q'? ( a:F"@ '@s`0 ` OxoOoanGX? 0+<` 0  69`&:=!g0fAnh['Cg??OoOoOow7O#_'G?OosOO?o3C| Ch?9p'x0  69`&:=!g0fAnh['Cg??OoOoOoo3C|C9p' { ` @c@GV@ Ov >?@??>? y ^@ 8 $;D`L @[<@ & | ?#?#3???7??73?/#'# @ @ @?F`@b k `@ @ `> ?`p?~~ ||@ @    F N  x   $` 9 G}#@`s `vOoOoanplFX8?840<1 F N   0 ,Hp !18'??????779+3'?'?` ?` ?@r|;3G>??~~??P ???r ??? ???>y <???a ???g 0???y <?????~ ???+t ???h$??? ???#t????????????????????????~~1??~~h,`??1?#t???9 F~9???| 1?x???? `3  `????1?  ???? 8???? 0<????  ????`B?< NA\# L@HBg/9N/9N?<NNO ?<Hzh?<=NA> <//<"??<?NA |/?<NN\ 9N//<(??<?NA ??<>NAX3SDHz?< NA\HzBg?<NNP?<?<NNXK&MB3wB/9pA#p/9hA#h| 99f|#h#p?<?<NNXHzqBg?<NNPLH@?</9N/9N?<NNO /9?< NA\?</<?<1NANu2<QRC|d UfK83@Ns VfM&3@NsvKMT mftNs 0A b * ACCESSORY SELECTOR * AUTO BOOT TECHNIQUES * BOOT SECTOR HANDLERS with examples and source * CHAINER with example and source code * DELTA MESSAGE SCROLLER with music and MFP interrupts. Source included * EXTENDED FORMATTER * GUARDIAN & HAPPY FACE virus detectors * SHAPESHIFTERS 50hz MUSIC with source * MFP RASTER with EXTRA BORDER, with examples and source code * SCROLL ME ascii text scroller All in all, 700K of files from BUDGIE UKa:byte.pi1$ 4( 4(#a000000 #b000000 #c7770007000600070055200505552220770557075055507703111103 #d #E 9B 02 #W 00 00 0A 01 1D 17 08 A:\*.*@ #W 00 0A 22 01 15 15 00 @ #W 00 00 0E 09 15 0B 00 @ #W 00 00 0F 0A 15 0B 00 @ #M 00 00 00 FF A MOVING BYTES@ @ #M 00 01 00 FF B BUDGIE@ @ #T 00 03 02 FF BUGS@ @ #F FF 04 @ *.*@ #D FF 01 @ *.*@ #G 03 FF *.APP@ @ #G 03 FF *.PRG@ @ #F 03 04 *.TOS@ @ #P 03 04 *.TTP@ @ `^.|taaBa|49 ff` y fa` y(fa`34l3n3p3r3t3# 0<"<TNB34l3n3p3r3t3# 0<"<TNB09 |g |gbNp34l3n3p3r3t3#] 0<"<TNB09 |gNpNA(<`gN34l3n3p3r3t3#X 0<"<TNBNA(:<3fZ(A<ZfN34l3n3p3r3t3# 0<"<TNBN34l3n3p3r3t3# 0<"<TNBNNA|`|8:C0<QNN|fN34l3n3p3r3t3# 0<"<TNBNu3 l3n3p3r3t"<T0<NB3 3Ml3n3p#r0<"<TNB3 Pa>`E:`}+ `瞹@8 Rޠ{Ǜg?w78`~?Bao8>~&c6 @@a8|3\;``C87L~hE"8U}w!{?ြC3w`|ϹF!$@?|@Ό|?|?~8'8phpcV}>~3?3 <y`{?@ކgpxpl=?d`7`?[o Ȼ xw8~ǃ|x  1y~ 5p8 |ϰ =} |2 |!;Ϝ0L~{_@ѵ`~0Js0yp~~ #<4P7g=t 5!ߍI6 g= }C>`$AcC/08<4!18(tX y1?op-d;2> _`o8~8p`|<n$  >1??``0ږ?%;τ0 ,n {?|gc[f>>l "kp >? d ?3xҔ7 a? 2 7g 8 "~Affx~fnr8ߏ(0 0. Ѐ`?ߖ05I6s3C d| ־f7$|08??|hoA?x-d݄`)88`H?wv|<<@0X8@>(+t;>@0?%l ~`j4?,=(Y`>pfK)^@w` 639c  x7 囀 p8|X0#J0AH@$.c3 ?7Ԏ@w |c pX?2 > 0 <0|@F 8~ C߀@0~ >0r{  &>(F@m 8g? xp97g<<&>D7 w~`̀>@b q 14><Fa@??s ~c~!1ppg10" 5 8 B!pM2>2 > x08`g`{A !M>̿>@qxq ?{`00 0&@fw>wX s0  (%>< 0??@@h0@@A> `@?>~"9@?y0??4 al?`?>>37??< &pc<@?>>?p8? 0 ?>>;'8?`@ ? ?>>;?9??T#?>>9?@@@ 1(?>>p9?? ?>>9?'?>>9???>>p9?` ?>>p9?o ?>>9?o?<<?<<p9? o~y??@@?<<p9?oC@{5 ?>>9?"oy~{y?<<p9?Doxww|@`???9?ovv̌<ĄxE>D`9?o`yxgexۀ$ `9?n1w0?x?]A@P 9?/n?`xҜ-!@9?Nm0Aχ?x 60@@p9?^mx? x?p9?k ??<x s8@(!|9?k 88xs qsG 8`>T^(!p9?k HxxxJ{ysX P& Z$B> > > 9?cqqp{:;9PP APY &J4D> > > 9?c{   3(P @Ȧ0AH@9?v |y {  `3@(P @A(AI0`p9?rv |x>`3@(P @s@ac?>>9?sv |x>`3@11(@@N `^c?>>p9?v x>`3@11D@D_ !?<<9?v ?0>`@11Z@$ @?? ?>>p9?pv ?x>`@11Up" `?????9?xv ox'؀~`@11RP!  **???p9?v zz@@11 X  @UUUXPP???9?v {z`@11 ? O 0@9?v >yz`@11 ?@ ? @@9?v y`@!! 5?@ ?  UU9?p ? ?@0?߀? UUUU?>>9?p ?@$ ? @?>>p9?p`cpG?@(3#?@$?>>p9?p` sc8$?@x(3#O0U*UP?>>p9?p@`cpGgs~(3/_*UUP?<<9?p ` ?s/3_?>>p9?pf8Is3p????9?p?IϷ7_c~/3p9?p'{|^}SUP9?ps?>9?p@? 0{8w0@@?>>9?p@`r388?>>9?9 qNyzyp9?>>9??}z| ps?>>9? ᾶy?@@P?>>9?qsΟ;{;aπ?>>9?`?8's 8`?>>09?@'G? ?>>9?83@@?>>9?7pp 3@@?>>p9? <  38@@@?>>p9?@,p,s ?#?q?>>9?` @#1߀s8#>p9?<<?@@`x?>>9?==p ??0?>>9?ayy3 `0?>>9?c{93 @???>>9?ww ?>>9?9ww ?>>9?`x@p3p?>>9?`@3/9?~@s so9?~߁ ss @@000y``9?`x0?? 000p9?000 9? p8?8??>> ???>>p??>>>p??>>>>>>???`p??>>p` yyy ???EEE???EEE??? EEE?????? }}}ՀՀ????pp <##?@@ ? ?? }}}`?  EEEYYYp?@@}}}p?? \WPDPDPDSSSp!LDLDLDQQQp||| U|UUa |?? |?? ?p??PUUTTp*@?UPp?? ?@@@p??@?? UU@TUUUUAUP*Հ@?* U@UUU@UUUUUAUW*5@? UU<##??????| |UT|UV|||>>>UjUT???j?@UUP333? 333 333  UU@???UUUU>>>|666|333**|333XPP|111??|111|GO?>f} ǀ1 @@|||) X<@A 330@mm` oo/``}`~``3<88|@<|@<@@ `>8 A`B@ A`1?AO0  `X0  `X0 3 >,3MA^߀ 1 #8h1 #8hopJA|gx'@ x g'@x̖x uq~|w\> `ffp  ` fpf P `,|pR; ig00> DA080@Ϙ`p~ V?i0n "@@660w> Hpp < L~nlL~`  `<<77g`$@ $0@;{<  |$0@;{  0b(~>0?f!A"!<=ВH/xF0=H>g~||8  "p |9P @hLCw y P  @ 00?~pCccY>gp  8b i;X$;ci|"; @`g0qO0ck w??p`€3q @ 3 /B3 @q C#c 40=y_?`~>yc|4_`g,{#wLl_0 c?; _= 3&>h`? G8d|?~? @}ipXc ab|&0/o? yo3vHwƿ@ q8Y>f`8Ipy`15@㿜co~! ?`zo fÁg&_Qj;p@ُp0A?0x8 X` 8GA  ~#B}uBh@}0r?n|'`?  _ AK0f8#x# wf8x`#\w7_ip!;?vӏ(00 3|O [ #{w0πuߎ ?l?0wu 0q߿n&]/{M<`|~8~ҋ b aߵ&!?w)ap)y3 wa &! "xs=ls|C?w cnpk$cSs|wc 3<?6osv`}x<I6|4a|xǛC7?wg 4C??wgEx=#<͈ O08 ?=;C<< > Ax ;w?cw  ;pC G87g><>4 ~ g8?8{ȇx7w?{xp[?7l>f|@?ǼW8'?N|8 x@p0p{>g{<@@$;Rg/@=~=&?L_0px@@8|o `$V0 .|1.NBgNANVN>NN^NuNVHy'bp?N\ON^NuNVN3XHy(?9XN`\ON"HyY,HyY*HyY(HyY&p?BgNjp235|p235~p}35pk35HyXpHyXnHyXlHyXj?95?95?95~?95|p?BgN29XnH09Y*HA3Xj29XpH09Y,HA3XlHy5Hy5Hy5~Hy5|?9Xp?9Xn?9Xl?9Xjp?p?N#9*&p?NNTO=@0. @b H0@$V PN`p`p`p3&By8N^NuNVp=@HnHnHnHnHnHnBgBgHnBgBgBgBgBgBgBgBgBgBgp?p?p??.N< @g @f0.@ @bH0@$b PN` y&g BgBgBgBgp ??9&N `ZHy6Hy6Hy6Hy6Nj3XHy8HyXHy&N ?9Xp?9Xn?9Xl?9Xjp?N 3&BgBgHy(p??9&N BgBgHy(&p??9&N ?9Xp?9Xn?9Xl?9Xjp?p?p?p?N?9Xp?9Xn?9Xl?9Xj?9&N NHy5|N XO`< y&g0?9XNTOp3&`0.y&f?9&NTO?9Xp?9Xn?9Xl?9Xjp?p?p?p?N ?9&NNTO`0.y&fN"29Y*yY&YA0.nAo09Y*yY&Y@n=@29Y,yY(YA0.nAo09Y,yY(Y@n=@?.?.?.?.p??9&N Hy5Hy5Hy5~Hy5|p??9&NjHyXpHyXnHyXlHyXjp??9&NjN"`0.y&fHy6?<N\Op?N0. m nn n n0./0. Hї AXHn fpN^NuNV0. y5|@ =@2. 095y5~Q@A=@?.?.?.NT\ON^NuNV=n BnBnN"Hy320.fHy'0.H/0.H/N#0.f 0.n g?<p?Bgp?NN\OH@?p?NN\OHRn0.n0.n mv?<p?p?NN\OH?<Bgp?NN\OH?<pK?p?NN\OH?<p?Bgp?NN\OH@?p?NN\OH0. Hn=@0.HD@=@p%?NNTOHy32N#XOHy320.gHy&`?<p?Bgp?NN\OH@?p?NN\OHN"N^NuNVp*38Bn nlJ0.HAXrBPBn nl&0./0.Hї AXp.Rn`Rn`p3&N^NuNV3X0.@ H$-@p=@ nl$0.HCX nRB@2Rn`/94TNXXO09XN^NuNV#X4<#84@#X4D#X4H#Y4L#Y 4P#4<4Tp ?N&TO3XY09YN^NuNVp?N&TOpN^NuNV3X3 X3 X3X3X3X3X3X3X3X3X3X3 X3"X#$Y3(X3*Xp?N&TO n,0X n00X n40X n80X n<0X n@0X09XN^NuNV3X# Yp4?N&TON^NuNV3X3 X3 X3X3X3X3X3XpI?N&TON^NuNVpM?N&TO n0X n 0X n0X n0X09XN^NuNVpO?N&TO n0X n 0X n0X n0XN^NuNV3X# YpN?N&TON^NuNV3X3 X3 X3X3X3X3X3XpJ?N&TON^NuNV3X# Yp#?N&TON^NuNV3X3 X3 X3X3X3Xpl?N&TO n0X n0X n0X n 0X09XN^NuNV3Xpf?N&TON^NuNV3X3 X3 X3X3Xpd?N&TON^NuNV3Xpg?N&TON^NuNV3X3 Xph?N&TO n 0X n0X n0X n0X09XN^NuNV3X3 X3 X3X3Xpe?N&TON^NuNV3X3 X3 X3X3X3Xpi?N&TON^NuNV3Xpk?N&TON^Nu"/0<NBNuNV# 4`p 3Yp3YByYp3Y3YN#64`N^NuNVpe3YByYByY3YNN^Nu#Y4X"<4X <sNBNuNV#4\#4d .Z#4hpd3YByYp 3Y n 3YN n 0Y#4|4\#54d#74h#64`N^NuNV# 4`p3Y3 YByY3YN#64`N^NuNV3 4|/.N:.NDXO# 4`pm3Yp3Yp3Y3YN#64`N^NuNV# 4`3 4|3Yp3Yp3Y3YN#64`N^NuNV3 4|p3YByYp3Y3YN095N^NuNV3 4|p3YByYp3Y3YN095N^NuNV3 4|ph3YByYp3Y3YN095N^NuNV3 4|p 3YByYp3Y3YN095N^Nu#YNu#Y NuNVp0.#(N^NuNV/<f /9(N#PO6b#( 9(N^NuNVHn?</.N!l Hn HnNPOHnBg nN\ON^NuNVH0-n n(PXH> @%g0gP/.? n hN\O`p =@p=@p=@H> G-fp=@H>`Bn G0f p0=@H> G*f& nT=Plp=@0.D@=@H>`*Bn G0m G9n0. G@0=@H>` G.fJH> G*f nT=PH>`*Bn G0m G9n0. G@0=@H>` Glf&H> Gdg Gog Gug Gxf0@> `-@*@p=@0 |&"2<`XHXW PN`4 nT=P0.l0.D@=@p-p ??./ N XPO*@`p ? nT?`p`p` n-PX .l .D-@p-p ?/./ N `p ? n// N *@X`p`p`/ ?./.?N!4 *@P`fBn n-Pf-|(X .-@*@g0.m noS`(Bn nT0` n//.NPO`n ./0.Hї =@lBn0.fL0.g0 n0f( n -f/. nRH? n hN\O0.Sn0g /.?.` nd /. nRH? n hN\O`0.g0.Sn0g/.?. n hN\O`L0N^NuNVH >. *NB%0<g"0H@H@B@H@ @&|>`?Bg _&|g nR` .L N^NuNVH0*n>.IB$p0//. N#ZPO-@g$p0//. N#POA&|-n ` n &|g` L0N^NuNVpL?Hy(p?N"\POp?N"&TON^NuNVN!4N^NuNV/ *n .*+@+|"B-0. D@;@ m l;| +|!`+|! *_N^NuNV/ *n Sm lBm p` UR0.*_N^NuNV/ *n UR0.*_N^NuNV/ *nRm oBm p` URB@*_N^NuNVN"@?.N"HTON^NuNVN^NuNV?.pL?NAXON^NuNV/A#)(/9)(N$8XO0gB)(p 3),p`,/. 0.H/?.p@?NA .B)(/N"XO.N^NuNV .l .D3),p` .N^Nuʠ fEH4lNu Nu Nu/$o ,_NuJ4lg /L ,_Nu"o`C"/jD$jDA`|J/jDJk`JjDNu$/` o$"/A`NNu"o`C$jD"/jDA`, gJ/jDNu$/` o$"/A` NupJfpN∲cd⒒d҂dFN o"`"/ jD$/jDD$@A`" jDNu o"`"/ _$0"@0HAHBЁH@B@ЉN O$X"XHB@Nu o0/L.Nu NND(X DOUXcfd\e f g orxs(uxD0123456789ABCDEF0!?J?UVSS?UW?J!<0 ?@?@?@?@ <[0][ *** LINEUP-4 *** | By Charlie Dancey | (0373) 827093 CIX: cdancey | 'C' source code available | On offer to ST AMIGA FORMAT ][ OK ] Lineup-4Lineup-4Click to start[0][ Unknown Message ][ OK ]Click to reset I go first! You go first!** You Win! **** Draw! ** My move..** You lose! **** Draw!! ** Your move..%r{NULL} You must compile with the -f option to include printf() floating point!  0V$6 0v seed_(intin_|4c_<4Work_|5intout_5wind_calc_vmul$_fputeos_!ctrl_cn_$rand_bmain_errno_,)wind_close_graf_mouse___USTACK__.)_dtefg_4!_stropen_l!_xprintf_lineaa_"maxtotal_ write_\"form_alert_graf_handle_jcheck_win_drop_sprite_Tdummy_6lineac_#v_pline_nlinead_#_fputexs_!ptsin_6credits_$clear_board_get_scores_. crys_if_&ptsout_7v_clsvwk_snapshot_vs_clip_ global_8xy_8init_>goes_first_8play_longjmp_F$goes_left_8graf_mkstate_work_in_&menu_register_`linea0_"exit_&"work_out_8buffer_*9v_opnvwk_null_(bmfdb_&vsf_perimeter_lldiv$#llremt#Whole_jXnext_rXappl_init_control_Xint_in_Xwait_mouse_up_lrdiv*#int_out_Xcrystal_Xlinea9_"lim_lrremz#gsx1_vdi_wind_open_digits_|&gsx2_aes_handle_Xwind_delete_Nbest_move_H wind_create_redraw_ vldiv`#appl_exit_sprintf_cwl_llmul#vlrem#msg_(_dtoa_^!ad_c_T4evnt_multi_graf_growbox_fns_board_Xv_bar_dvrdivZ#ctrl_cnts_$smfdb_&vrrem#lrmul#iioff_\4vsf_color_R_start_vdi_handle_Xscores_Xi_ptr2_Dgl_apid_Yvlmul$_seterrno_"addr_in_Ywind_get_jaddr_out_ Ycontrl_Ysetjmp_8$iooff_d4Full_&Ypioff_`4wind_update_<draw_board_ vro_cpyfm_printi_X Temp_.Yset_blit_"vswr_mode_vrmul$graf_shrinkbox_ srand_Nmywind_&alert_ __ESTACK__.1_exit_H"printl_ vdiv#pooff_h4game_state_&vsf_interior_cw_play_piece_wait_for_event_wind_set__fgetstr_"i_ptr_:la_init_l4_etv_term_jbp_()_finish_@"      X,            $                          *       (*     && $0:,  $""N><>n".0(:l$.*                       &FP( LD" $ | 2 & HdMOVING BYTES 1 -------------- This disk contains a collection of routines, utilities, and programming aids developed by the Budgie crew. The emphasis is on multi-colour text scrolls, 50hz music, and auto-chain programs. Although most routines execute in low res, you should run the programs in MEDIUM RES, as this will allow you easy access to the readme docs. Needless to say, 68000 programmers wanting to inspect the source files will need DEVPAC2 on disk. This is one of the reasons why we've kept this 800K disk to 700K used. You'll need 55K for DEVPAC and the rest for assembling to disk. Non-programmers should place a good text editor on disk (Tempus, Devpac2, First Word) to view the various readme docs. Some source files are commented. Others are not. Our objective is to update them at intervals, and hopefully, make them all fully documented in due course. Contact Budgie if interested. Camy Maertens Budgie UK 5 Minster Close Rayleigh Essex SS6 8SF February 10, 1990 * This disk is LICENCEWARE * It may be freely copied or given away. But ONLY licensed distributors are authorised to market it. All authors receive royalties. (how about that!) A:\bytes.prg `N`HbY b*O.|N *m - ЭЭ// Bg#?<JNAO NN#@#^#Ij#Cz #C~#C hBP 9g< <gJg`N`N 9ffg?<?<NNX/<I|?<NA\?A>J|`|8:C><@QAN |NHy?< NA\`OK READY TO WRITE Hy(?< NA\` PRESS KEY N@~H`?<NAT@LN@JAN |NHy?< NA\`remove disk ..... Hy?< NA\`SPACE for another disk H`?<NAT@LH@<9fN`?</</<?<NNO AT/?< NA\><yBy"@a$Q><yBy@aQNu<<NqNqQNu BUDGIE UK VIRUS FREE ! All Circuits Operational.... ------------------------------ Distributed under Licence ***** 1990 BUDGIE UK ***** (HaJ@kba#9fa LaJ@kaa8NuHyf?< NA\` E R R O R 3"@Nu |NHy?< NA\`getsize/press key 3@H`?<NAT@LNu |NHy?< NA\` open E 3p@NuHy ?< NA\`read error |N3@H`?<NAT@LNuHyT?< NA\`close error |N3w@H`?<NAT@LNu |NHy?< NA\`gemdos error H`?<NAT@LNuBg/?<NNAPNu?</NAT @&( <Nu/?<HNA\JggR&@,NuHy&?< NA\`malloc error H`?<NAT@LNu?</?<=NAP43Nu/ /?9?<?NA Jk~Nu?9?<>NAXJ@kNufile not found ahJ@ka?a0J@k0NuHy?< NA\`ERROR. creating file.. NuHy ?< NA\`write error Nu?</?<NAXNu/?<INA\JkNu/?<INA\JkNuH?<%NNTLNu |N0<Q |L/?< NA\ |L0NuH/?< NA\LNuY ?<?<NNXNuHBg?<NNLNu"h$hBi3| Nu Nu?<NAT@Nu?<?<NAXNuB9JgNuH/<?< NA\B?< NA\#@L??NuH/9@?< NA\L??Nu?<NNTNua aaD#^ |ap9gad3D3Fa?<?<?<#NN\?<?<LNABg/9?91NAwwU33ss77wH< J@j<-D@2<H H@0H@QLNugg"< A,>< QH@@0 @9o^@B@H@fNu/0<J@WJEW NuHp?<NNTLNu?<?<?<NM\?<"NNT @CZ"C NuHCLhLNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu?<?<?<NM\?<"NNT @C"C NuHCB@(HiJijBi i.k3|.B@(HiJijBi ik3|LNu?<"NNT @ $?<?<?<NM\?<?<?<NM\Nu<K"yN$yN20$QƕQ$yN0"QQNuHA@0P= Ppk0"<QQLNuHA@/0"<Q0w"<QQ LNuH/?<NN\LNuL@HIL H@A aa yIt NNNugive it a name (***.pic) ><GFy@H<<*9ffgQL`Fy@H<<*9ffgQL`QBIrIu/H~ 9Ir"< a> < g g |` |` |L~<  <  H/ |N _NH`?<NAT@L _H@<afLNu??<NNXNu??<NNXNu/.G8. DL 2H@AF@4$$QQ A("K>.G<. Frtvxz2468:QYQYQYQYQ"T$T&T(T*TQ2J?<NNJ@g`ZNu?<?<?<?<?<B/<>J?< NNJ@g`&Nu?<?J?<NNNu|g|gz|gJ@kRNu3p^AN |N |NHyA?< NA\`insert disk H`?<NAT@LNu3p^AN |N |NHyAl?< NA\`error:write-protect on H`?<NAT@LNu3p^AN |N |NHyA?< NA\`error:drive not ready H`?<NAT@LNu3p^AN |N |NHyBR?< NA\`disk error H`?<NAT@LNuL@HINuL H@Nu yN <?FQNu"yN$H&I><0XXX @YYYY""QNu yC~` yC(yCz0(R9@2,9Ar2,SA9Ar2,4SA9A9hP9h$9h&g )I`)hL)hHNu?//?<NN Nu/?<HNA\NuHp0r JBgSBfAQLNu y "yD09DaNuH>#D?<L|H|L|H|4LHhA(SWfTLHLH,LHXL|Nu y"yD09DaNuH>?<qL|H|L|H|4L|H|hL|H|ASWfTLHLH,LHXLHL|Nu $<*,* ""4" & "b8Rh0\*Lb>`~ v  X ) v  X )R " V    o 4  d VV 2     2    P  d <(@8   @x   VV   2              ȁ  F de      2 P   d 0   2 0  ( dP F ( dP F (      ,       @e[QG=3) ? a:\fonts\a1_fat.fona:\fonts\a2_elegant.fonbxbxbxbxb "8 2,0  @ <@ $&@       4 $$HH&(B$$$~F L,4 ,0F* RJ^        zb* X""   | *   ,  6        ",<48,>>JH>|  X   2 >   *   & $ l_2d9fa dc.l 0 l ($70) l_2da24 dc.l 0 l l_2da22 dc.w 0 w l_2da2c dc.l 0 l l_2da32 dc.l 0 l l_2da36 dc.w 0 w oldstack dc.l 0 logbase dc.l 0 ($295d0) name dc.b "a:\delta\text.asc",0 even handle dc.w 0 txt_size dc.l 0 dta ds.b 66 budgie ds.w 1000 where text will be slotted dc.w 0,0@ *.  4 F   2$ :J L " >   *: