ùúùúýkÑ«YN ÿîÿîÿîÿîÿî ;SPEX ;v 13.20 section bits,code_c >extern "dh1:gfx/GF2/slumps.dat",slumps >extern "dh1:gfx/GF2/Dang.snd",daeng+6 >extern "dh1:gfx/GF2/NyaSiffs1.bmap",siffs >extern "dh1:gfx/GF2/Nyasiffs2.bmap",siffs+4800 >extern "dh1:gfx/GF2/FuelAmmo.dat",F_dat >extern "dh1:gfx/GF2/MegaSiffror.bmap",MS_dat >extern "dh1:gfx/GF2/PortNr.bmap",P_dat >extern "dh1:gfx/GF2/pling.snd",pling+6 >extern "dh1:gfx/GF2/tingeling.snd",tingeling+6 >extern "dh1:gfx/GF2/Font8?.bmap",font_fast >extern "dh1:gfx/GF2/font8?.txtwidth",txtwidth >extern "dh1:gfx/GF2/Gravity2.bmap",Sprite_GFX >extern "dh1:gfx/GF2/GExp.Bmap",Explosion >extern "dh1:gfx/GF2/GThrust.bmap",Thrust_GFX >extern "dh1:gfx/GF2/GThrust2.bmap",Thrust_GFX+1092 >extern "dh1:gfx/GF2/Lemmings.snd.Fire",FireSnd+6,861*2 >extern "dh1:gfx/GF2/Bingo.raw",ExpSnd+6 >extern "dh1:gfx/GF2/Lemmings.snd.Ship_Bump",Touchdown+6 >extern "dh1:gfx/GF2/nohopebd",ShotExpSnd+6 >extern "dh1:gfx/GF2/Plask.raw",Plask+6 ;>extern "dh1:gfx/GF2/Replay.raw",Replay+6 >extern "dh1:gfx/GF2/Cannon.snd",Blast+6 >extern "dh1:gfx/GF2/Pil.bmap",pil_gfx >extern "dh1:gfx/GF2/MegaExp.BMAP",MExp >extern "dh1:gfx/GF2/sqr.dat",SQR ;SQR+(x/16) = sqr(x) ;>extern "dh1:gfx/GF2/Patriot.bmap",Miss >extern "dh1:gfx/GF2/NYPanel.bmap",panel >extern "dh1:gfx/GF2/Sinus.dat",snixus OPEN: EQU -30 CLOSE: EQU -36 LOCK: EQU -84 UNLOCK: EQU -90 EXAMINE: EQU -102 READ: EQU -42 WRITE: EQU -48 ALLOC: EQU -198 FREEMEM: EQU -210 LOADSEG: EQU -150 UNLOADSEG: EQU -156 DELAY: EQU -198 DISABLE: EQU -120 ;int off ENABLE: EQU -126 ;int on LOADVIEW: EQU -222 WAITTOF: EQU -270 OWNBLITTER: EQU -456 DISOWNBLITTER: EQU -462 OPENLIB: EQU -408 CLOSELIB: EQU -414 PR_CLI: EQU 172 PR_MSGPORT: EQU 92 FINDTASK: EQU -294 GETMSG: EQU -372 REPLYMSG: EQU -378 WAITPORT: EQU -384 FORBID: EQU -132 MAXSHOTS: equ 125 ;max 125 shots active EXTRASHOTS: equ 99 ;ant xtra-1 om 68020+ (74) M_ENERGY: equ 28 ;max 7*4 energy RELOAD: equ 5 ;time to reload BRELOAD: equ 50 ;back reload AUTO: equ 1 ;auto? 1 LOOK: equ 1 ;look ahead! 1 SBOUNCE: equ 0 ;bouncing shots? 1 SPRID: equ 0 ;spriding factor -9 HEATPSHOT: equ 3 ;heat/shot XOFFSET: equ 6 ;xoffset from left (2,6,10,14) LIV: equ 5 ;# liv BYTES_SETS: equ 81 ;79+1 bytes settings CBL: equ 10 ;10 frames to toggle HEADLINE: equ 130 ;ule-ban-header tryck: equ 99 ;bomb,tryck (0-99) BDELAY: equ 12 ;bomb drop delay Cursor_c: equ 0 ;cursor color MAXAMMO: equ 3750 ;max ammo PENE: equ 1 ;1=penetrating shots W_SUB: equ 25 ;1 bomb=625 weap-ammo MAGN_E: equ $600 ;magnet eff M_RACK: equ 100 ;magn räckv H_RACK: equ 60 ;magn räckv xtra REPEAT: equ 7 ;repeat sp MAX_L: equ 19 L_Pause: equ 25 ;load pause.25=norm ANT_MINES: equ 20 ;antal minor! BOMB_SELFDESTRUCT: equ 50 ;antalet frames tills missilen sprängs snix: move.w #3,one_screen move.w #5,bonus_pods moveq #-1,d0 move.w d0,fast move.w d0,ig_pl2 move.w d0,multis_on bra.s .s ;running_from_assembler move.l 4,a6 sub.l a1,a1 jsr Findtask(a6) move.l d0,a2 tst.l pr_cli(a2) bne.s .s lea pr_msgport(a2),a0 jsr waitport(a6) lea pr_msgport(a2),a0 jsr getmsg(a6) move.l d0,msgadr bra.s .s2 .s: cmp.b #'q',(a0) bne.s .s2 move.w #-1,zb_down .s2: lea font_fast,a0 lea font,a1 moveq #0,d0 move.w #751,d5 .fl: move.b (a0)+,(a1)+ move.b d0,(a1)+ dbf d5,.fl moveq #-1,d0 move.l d0,plee move.w #'()',convert+$5a move.b #0,convert+13 lea t_sinit,a0 lea sinit,a1 .l: move.b (a0)+,(a1)+ bne.s .l moveq #'1',d7 lea names,a0 moveq #30,d5 .k: move.l #'PLY ',(a0) move.b d7,4(a0) add.l d5,a0 addq.b #1,d7 cmp.b #'9',d7 bne.s .k clr.w fast_cpu bsr.s check_cpu add.b d0,proc_type cmp.b #2,d0 bmi.s begin not.w fast_cpu bra.s begin check_cpu: ;d0 returns x (0,1,2,3,4) move.l 4.w,a6 move.w 296(a6),d2 moveq #4,d0 moveq #3,d1 .l: btst d1,d2 bne.s .ut sub.w #1,d0 dbf d1,.l .ut: rts dc.b '$VER: Gravity Power v1.20 950406',10,0 even ulesnd: dc.w $400,500,0 Begin: move.l #pic+130000,Big_Buf move.b $dff007,ny_slump+3 move.b $dff007,slumpv+3 lea ordning,a0 lea ordoffs,a1 moveq #6,d7 .eo: move.l a0,(a1)+ .el: tst.w (a0)+ bne.s .el dbf d7,.eo move.l 4.w,a6 lea gfxname,a1 jsr openlib(a6) move.l d0,gfxbase move.l 4.w,a6 lea dosname,a1 jsr OpenLib(a6) move.l d0,dosbase move.l d0,divadrs+12 lea logfn,a0 move.l #4000,xtra jsr loadfile clr.l xtra tst.l d0 bne.s .o .q: jsr freeallminne move.l dosbase,a6 move.l introptr,d1 beq.s .asd jsr unloadseg(a6) .asd: jsr -60(a6) move.l d0,d1 move.l #no_logg,d2 move.l #no_logge-no_logg,d3 jsr write(a6) jmp ING_L .o: move.l d0,logf_adr move.l d1,lf_len move.l dosbase,a6 move.l #introjox,d1 jsr loadseg(a6) move.l d0,-(sp) move.l gfxbase,a6 move.l 34(a6),wbview move.w $dff002,snixdma bset #15,snixdma sub.l a1,a1 jsr LoadView(a6) ; Flush View to nothing jsr WaitTOF(a6) jsr WaitTOF(a6) ;yeah,twice move.w $dff07c,d0 cmp.b #$f8,d0 bne.s .notaga move.w #0,$dff1fc .notaga: move.l #snixcopper,$dff080 move.l (sp)+,d0 move.l d0,introptr beq.s .nointro asl.l #2,d0 addq.l #4,d0 move.l d0,a0 lea pic,a1 jsr (a0) .nointro: move.l dosbase,a6 move.l #diverse,d1 jsr loadseg(a6) move.l d0,divptr beq.w .q asl.l #2,d0 addq.l #4,d0 move.l d0,divtptr move.l d0,a0 moveq #2,d7 move.l lf_len,d0 lea divadrs,a1 jsr (a0) move.l a0,divtptr move.l (a1),spec_ver move.l d1,logf_adr2 move.l d0,stat_adr move.l dosbase,a6 move.l #d2mname,d1 jsr loadseg(a6) move.l d0,d2mptr beq.w .q asl.l #2,d0 addq.l #4,d0 move.l d0,a0 move.l #tmeny,d0 tst.w zb_down bne.w .i jsr (a0) .i: clr.w zb_down move.l d0,banmenyer move.l dosbase,a6 move.l #menyule,d1 jsr loadseg(a6) move.l d0,muptr beq.w .q asl.l #2,d0 addq.l #4,d0 move.l d0,a0 move.l #tmeny,d0 move.l stat_adr,d1 jsr (a0) move.l (a0),Prefs_Meny move.l 4(a0),posi_adr move.l a1,bildstruct move.l d0,instr_adr move.l d1,rem_j2 move.l d3,rem_j3 move.l d2,adr_ch_txter move.l d4,ask_u_act move.l d5,scr_mode_adr move.l d5,a5 move.b (a5),l_scr_m move.l a0,m_adrs move.l 8(a0),a0 lea menyadrs,a4 jsr (a0) jsr init_w_s lea typpath,a0 lea def_prefs_buf+380,a1 moveq #89,d7 .lfqp: move.b (a0)+,(a1)+ dbf d7,.lfqp move.l #prefs_buf,pref lea prefsn,a0 jsr loadfile tst.l d0 beq.s .def move.l d0,a0 lea prefs_buf,a1 moveq #119,d7 .lllq: move.l (a0)+,(a1)+ dbf d7,.lllq move.l m_adrs,a0 move.l 12(a0),a0 lea menyadrs,a4 jsr (a0) bra.s .cont .def: bsr setdefault .cont: lea typpath,a0 move.l pref,a1 add.l #380,a1 moveq #89,d7 .lfp: move.b (a1)+,(a0)+ dbf d7,.lfp lea initlevladd-12,a0 move.w #-1,init_ladd jsr laddabana clr.w init_ladd jsr de_code lea slogans,a5 clr.l (a5) clr.w flipp_s lea gf_txts,a0 moveq #1,d0 cl: cmp.b #10,(a0) bne.s xl move.b #0,(a0) add.l #1,(a5) xl: cmp.b #'^',(a0) bne.s ql move.b #10,(a0) ql: cmp.b #'@',(a0)+ bne.s cl lea flipp_s-2,a5 dbf d0,cl move.l #empty,d0 move.w d0,spr0o+6 move.w d0,spr2o+6 swap d0 move.w d0,spr0o+2 move.w d0,spr2o+2 lea tab42,a0 moveq #0,d0 move.w #1499,d1 .nl: moveq #42,d2 mulu d0,d2 move.w d2,(a0)+ addq.l #1,d0 dbf d1,.nl get_total_power: move.l #snixcopper,$dff080 jsr sync0 move.l dosbase,a6 move.l introptr,d1 beq.s .noi2 jsr unloadseg(a6) .noi2: move.l gfxbase,a6 ; sub.l a1,a1 ; jsr LoadView(a6) ; Flush View to nothing ; jsr WaitTOF(a6) ; jsr WaitTOF(a6) ;yeah,twice move.w $dff07c,d0 cmp.b #$f8,d0 bne.s .notaga move.l #'Yes'*256+10,aga_t move.w #0,$dff1fc ; reset sprites (fix V39 bug) .notaga: jsr ownblitter(a6) jsr bltwait move.l 4.w,a6 jsr disable(a6) .s: tst.b $dff006 bne.s .s btst #0,$dff005 bne.s .s move.w #$7fff,$dff096 bsr tysta_datorn bsr trtabcbztq move.w #$ff,$dff09e jsr m_initbpl jsr sync0 bsr.w fix_shift move.l #0,pil move.l #0,cursor move.w curs_cl,curs_col move.l #MCopper,$dff080 move.w #$82e0,$dff096 move.w #0,$dff088 jsr rens_mbpl move.w #$8100,$dff096 jsr ch_mus move.l joydir,rem_j moveq #10,d0 moveq #10,d1 move.l #326,d2 move.l #244,d3 moveq #42,d4 lea pic,a0 jsr zoombox jsr ch_mus move.l rem_j,d0 cmp.l joydir,d0 bne.s .ok tst.l joydir beq.s .ok move.l rem_j3,sbmenu move.l #$ffff,pl2_td .ok: lea anders_txt,a2 move.l #$ff,d6 moveq #1,d7 bsr cjamb jsr type ; lea regg_txt2,a2 ; move.l #$ff,d6 ; moveq #1,d7 ; jsr type bsr acjamb jsr clrscr not.w zb_down moveq #10,d0 moveq #10,d1 move.l #326,d2 move.l #244,d3 moveq #42,d4 lea pic,a0 jsr zoombox not.w zb_down jsr clrscr lea regg_txt+20,a0 .asd: tst.b (a0)+ bne.s .asd lea ply1name,a1 moveq #19,d7 .cnl: move.b (a0)+,(a1)+ beq.s .slut dbf d7,.cnl .slut: lea ply2name,a1 moveq #19,d7 .cnl2: move.b (a0)+,(a1)+ beq.s .slut2 dbf d7,.cnl2 .slut2: move.l slumpv,-(sp) clr.l slumpv jsr rita_bild move.l (sp)+,slumpv xwait: tst.w nullm beq.w .nix tst.w master bne.w .nix jsr var_slav move.b #$d0,d0 jsr syncx bsr.w clrscr move.l sbmenu,a0 move.l (a0),a2 move.l 4(a0),d6 add.w #1,d6 swap d6 move.l d6,MenuHigh clr.l MenuList move.w new_ml,menulist clr.w new_ml move.l a0,thismenu movem.l d0-d7/a0-a6,-(sp) move.w #-1,pre_type bsr fixa_light movem.l (sp)+,d0-d7/a0-a6 bsr cjamb cmp.l #ttext,a2 bne.s .nehe tst.w flipp_a beq.s .nf bsr flipptxt bra.s .jf .nf: bsr slumptxt .jf: lea stxt,a1 .c: move.b (a0)+,(a1)+ bne.s .c .nehe: move.l #$ff,d6 moveq #1,d7 jsr type clr.w pre_type move.l #1000,pEta .nix: move.l rem_j3,d0 ;spec rut för dis pl2 cmp.l thismenu,d0 beq.w f_tdmd bid: jsr syncff jsr check_2joys bsr kolla_tang bsr.w menufix jsr curs_blink tst.w ch_exit beq.s .nx jmp exit .nx: tst.w ch_ptm bmi newtour bne ptm tst.w ch_play beq.w xwait jsr sync0 jsr rens_mbpl jsr clrscr moveq #10,d0 moveq #10,d1 move.l #326,d2 move.l #100,d3 moveq #42,d4 lea pic+10752,a0 move.l #0,a1 jsr box lea ply1name,a0 lea ply1name,a1 lea names_t1,a2 move.b #80,d0 move.b #7,d1 jsr megainput moveq #10,d0 move.l #140,d1 move.l #326,d2 move.l #230,d3 moveq #42,d4 lea pic+10752,a0 move.l #0,a1 jsr box lea ply2name,a0 lea ply2name,a1 lea names_t2,a2 move.b #210,d0 move.b #4,d1 jsr megainput move.w #0,tournorm bsr Spela bra.w xwait tysta_datorn: bclr #1,$bfe001 move.l #Empty,d0 moveq #2,d1 lea $dff0a0,a0 move.l d0,(a0) move.w d1,4(a0) move.l d0,$10(a0) move.w d1,$14(a0) move.l d0,$20(a0) move.w d1,$24(a0) move.l d0,$30(a0) move.w d1,$34(a0) move.l #ulesnd,Kanal0 rts f_tdmd: move.l rem_j2,a2 move.b #0,(a2) cmp.l #$ffff,pl2_td bne.s .n move.b #1,(a2) bra.w bid .n: cmp.l #-1,pl2_td bne.w bid move.b #2,(a2) bra.w bid kolla_tang: move.w #0,i_buf jsr readkey cmp.w #27,d1 bne.s .ne rts .ne: tst.b d1 beq.s .np bsr check_pstyr tst.l rem_j4 bmi.s .np lea ch_txt+16,a0 lea 1(a0),a1 moveq #15,d7 .fl: move.b -(a0),-(a1) dbf d7,.fl move.b d1,ch_txt tst.w jump_all bne.s .nix bsr kolla_ch_txt .nix: rts .np: moveq #0,d1 rts clear_col: moveq #31,d7 lea $dff180,a5 .l: move.w #0,(a5)+ dbf d7,.l rts check_pstyr: move.l rem_j4,d0 moveq #0,d2 tst.l d0 bmi.s .nr moveq #-1,d2 cmp.b #32,d1 beq.s .sp cmp.b #10,d1 bne.s .nr .sp: move.l #'LFLF',rem_j4 move.w #15,high_p .nr: cmp.b #28,d1 bne.s .nu move.b d2,keydir+2 clr.l waitc .nu: cmp.b #29,d1 bne.s .nq move.b d2,keydir+1 clr.l waitc .nq: cmp.b #30,d1 bne.s .nw move.b d2,keydir+3 clr.l waitc .nw: cmp.b #31,d1 bne.s .u move.b d2,keydir clr.l waitc .u: rts kolla_ch_txt: move.l adr_ch_txter,a0 .l: cmp.b #-1,(a0) beq.s .ut lea ch_txt,a1 cmp.l #$3020302,(a1) beq.s .fast_o .sl: move.b (a1)+,d0 cmp.b (a0)+,d0 bne.s .n tst.b (a0) bne.s .sl move.l a0,d0 addq.l #2,d0 and.l #-2,d0 move.l d0,a0 move.l thismenu,d1 cmp.l (a0),d1 beq.s .ut move.l (a0),sbmenu bclr #0,sbmenu+3 beq.s .o tst.w in_gsnix bne.s .o move.l thismenu,sbmenu bra.s .ut .o: move.b 4(a0),new_ml+1 bra.s .ut .n: tst.b (a0)+ bne.s .n move.l a0,d0 addq.l #1,d0 and.l #-2,d0 move.l d0,a0 lea 5(a0),a0 bra.s .l .fast_o:move.w #-1,fast .ut: rts tom_bpl: moveq #0,d0 moveq #0,d1 move.l #336,d2 move.l #256,d3 moveq #42,d4 move.l #0,a1 jsr clearbpl rts rita_bild: move.l logo_adr,a0 bsr tom_bpl move.l bildstruct,a0 move.l logo_adr,a1 move.l slumpv,d0 lea mcol_tab+34,a2 move.w #0,(a2) jsr sync0 moveq #8,d7 move.l divtptr,a5 jsr (a5) rts Spela: clr.l keydir move.l #0,Skott1 clr.w no_game tst.l ig_pl2 bne.s .np bsr ignore_pl2 .np: bsr.w GForce move.w d0,no_game move.l #0,pil move.l #0,cursor move.w curs_cl,curs_col jsr sync0 move.w #$7fff,$dff096 move.w #0,$dff180 move.l #0,Kanal1 move.l #0,Kanal2 move.l #0,Kanal3 move.l #0,bomb_struct move.l #0,bomb_struct+18 move.l #-1,Mexp_struct+8 move.l #-1,Mexp_s2+8 move.l #0,out_count move.w #0,ule_ut move.w #$8240,$dff096 jsr rens_mbpl jsr clrscr move.w liv1,lives1 move.w liv2,lives2 tst.l ig_pl2 bne.w .np2 bsr reset_pl2 .np2: lea normsettings,a0 lea xpos1,a1 lea xpos2,a2 moveq #BYTES_SETS,d0 .restsets: move.b (a0)+,(a1)+ move.b (a0)+,(a2)+ dbf d0,.restsets lea skott,a0 move.w #12*(maxshots+extrashots),d0 ; move.l #0,shots_active .skottrens: move.w #0,(a0)+ dbf d0,.skottrens lea exps,a0 move.l nr_exps,d0 mulu #3,d0 subq.w #1,d0 .exprens: move.w #0,(a0)+ dbf d0,.exprens move.l #0,pl_exps move.w #0,pl_exps+4 move.l #0,pl_exps+6 move.w #0,pl_exps+10 jsr sync0 move.l #MCopper,$dff080 tst.w nullm beq.s .qx7 tst.w master beq.s .nog2 .qx7: move.w #$83e0,$dff096 move.w #0,$dff088 .qx: tst.w no_game beq.s .sn .nog2: rts .sn: jsr rita_bild bsr cjamb tst.w first_m beq.s .nw rts .nw: moveq #20,d7 .pause: move.w #0,ULE_count move.w #0,i_buf jsr readkey jsr sync0 .us: tst.b $dff006 beq.s .us dbf d7,.pause moveq #0,d0 move.w skott1,d0 add.w skott2,d0 move.l logf_adr,a6 add.l d0,12(a6) move.l B_Time,d0 add.l d0,8(a6) add.l #1,4(a6) cmp.l #20*50,d0 bmi.s .nlm add.l #1,20(a6) .nlm: tst.l port_adr beq.s .nj add.l #1,24(a6) .nj: move.l divtptr,a0 lea divadrs,a1 moveq #4,d7 jsr (a0) tst.l port_adr beq.w .nr lea tider1,a6 lea ltxts,a1 bsr .c_ts lea tider2,a6 lea ltxts+60,a1 bsr .c_ts move.l divtptr,a0 moveq #0,d7 lea divadrs,a1 move.l #tider1,4(a1) move.l #ply1name,8(a1) move.l banaadr,a2 sub.l #HEADLINE,a2 move.w 92(a2),18(a1) move.l #0,20(a1) move.l #0,24(a1) jsr (a0) move.l divtptr,a0 moveq #0,d7 lea divadrs,a1 move.l #tider2,4(a1) move.l #ply2name,8(a1) jsr (a0) lea race_txt,a2 move.l #$ff,d6 moveq #1,d7 jsr type moveq #3,d7 move.l divtptr,a0 lea divadrs,a1 jsr (a0) move.l a0,rt_e lea cont_rt,a2 move.l #$ff,d6 moveq #1,d7 jsr type tst.w nullm beq.s .qx9 tst.w master beq.s .qx3 .qx9: bsr acjamb .qx3: bsr fnn move.l divtptr,a0 lea divadrs,a1 move.l tbanaadr,a2 move.w 92(a2),18(a1) move.w 92(a2),cur_ID move.l #0,20(a1) move.l #0,24(a1) move.l banname,a3 lea tmeny,a4 moveq #0,d0 moveq #5,d7 jsr (a0) move.l a0,lvlinfo rts .c_ts: tst.l (a6) bne.s .i move.l #$3a98,(a6) .i: tst.l 4(a6) bne.s .e move.l (a6),4(a6) add.l #$3a98,4(a6) .e: tst.l 8(a6) bne.s .r move.l 4(a6),8(a6) add.l #$3a98,8(a6) .r: move.l 4(a6),d0 sub.l d0,8(a6) move.l (a6),d7 sub.l d7,4(a6) add.l 4(a6),d7 add.l 8(a6),d7 move.l d7,16(a6) add.l d7,d7 addq.l #1,d7 divu #3,d7 move.w d7,14(a6) moveq #4,d4 .sl: move.l a1,a2 move.w #$b972,(a1)+ move.b #80,(a1)+ move.l (a6)+,d0 bsr frac move.b #0,(a1) lea 12(a2),a1 dbf d4,.sl move.b #140,2(a2) move.b #140,-10(a2) lea -9(a2),a1 move.l -8(a6),d0 bsr frac_2 move.b #0,(a1) rts .nr: moveq #0,d0 move.w skott1,d0 add.w skott2,d0 lea sf_txt,a1 bsr todec_c2 move.b #0,(a1) move.w winner,d0 asl.w #2,d0 lea winpek,a0 move.l (a0,d0.w),VemVann move.l B_time,d0 add.l #25,d0 divu #50,d0 and.l #$1fff,d0 lea b_t,a1 bsr todec_c2 move.b #0,(a1) lea winnertxt,a2 move.l #$ff,d6 moveq #1,d7 jsr type tst.w nullm beq.s .qx4 tst.w master beq.s .qx2 .qx4: bsr acjamb .qx2: rts frac: asl.l #1,d0 ;d0=frames frac_2: moveq #0,d6 ;d0=1/100delar moveq #0,d5 divu #100,d0 move.w d0,d6 swap d0 move.w d0,d5 move.l d6,d0 bsr todec_c2 move.b #',',(a1)+ move.l d5,d0 lea cd_q,a0 bsr todec_c move.b cd_q+2,(a1)+ move.b cd_q+3,(a1)+ rts ;rttxt: dc.b '¹y',25,0 restart_t: clr.l tourc ; lea rttxt,a2 ; move.l #$ff,d6 ; moveq #1,d7 ; bsr type ; bsr acjamb ptm: move.w #0,ch_ptm move.l tourc,d7 asl.l #1,d7 lea tourtab,a0 moveq #0,d0 moveq #0,d1 move.b (a0,d7),d0 bmi.s restart_t move.b 1(a0,d7),d1 movem.w d0/d1,-(a7) mulu #30,d0 mulu #30,d1 lea names,a0 lea (a0,d0),a1 lea (a0,d1),a2 lea ply1name,a3 lea ply2name,a4 .b: move.b (a1)+,(a3)+ bne.s .b .e: move.b (a2)+,(a4)+ bne.s .e clr.l Thismenu move.l #Stm,sbmenu bsr clrscr .u: jsr syncff jsr check_2joys move.w #-1,jump_all bsr kolla_tang clr.w jump_all bsr.w menufix jsr curs_blink tst.w ch_exit bne.s .p tst.w ch_psw bmi.s .g beq.s .u bra.s .o .p: movem.w (a7)+,d0/d1 move.w #0,ch_exit move.l #tourmeny,sbmenu bra.w .pp .o: move.w #0,ch_psw move.l tourc,d7 asl.l #1,d7 lea tourtab,a0 moveq #0,d0 moveq #0,d1 move.b (a0,d7),d0 move.b 1(a0,d7),d1 exg.l d0,d1 move.b d0,(a0,d7) move.b d1,1(a0,d7) movem.w (a7)+,d0/d1 bra.w ptm .g: move.w #0,ch_psw move.l #TourMeny,sbmenu move.w #1,tournorm ;force dogfight bsr.w Spela moveq #0,d0 moveq #0,d1 movem.w (a7)+,d0/d1 asl.l #3,d0 asl.l #3,d1 lea scores,a0 tst.w winner beq.w xwait cmp.w #4,winner beq xwait cmp.w #1,winner bne.s .n1 move.w lives1,d2 add.w d2,2(a0,d0) add.w #3,(a0,d0) .n1: cmp.w #2,winner bne.s .n2 move.w lives2,d2 add.w d2,2(a0,d1) add.w #3,(a0,d1) .n2: cmp.w #3,winner bne.s .n3 add.w #1,(a0,d0) add.w #1,(a0,d1) .n3: add.l #1,tourc move.w skott1,d2 move.w skott2,d3 add.w d2,4(a0,d0) add.w d3,4(a0,d1) add.w #1,6(a0,d0) add.w #1,6(a0,d1) bsr.s t_result .pp: bsr clrscr bra.w xwait t_result: move.l nrplt,d5 moveq #0,d7 lea temp_s,a0 lea scores,a2 .cl: move.w d7,(a0)+ move.l (a2)+,(a0)+ ;score,lives,shots,played move.l (a2)+,(a0)+ addq.w #1,d7 cmp.b d5,d7 bne.s .cl subq.l #2,d5 .sl: lea temp_s,a0 move.l d5,d6 .l: move.w 12(a0),d0 cmp.w 2(a0),d0 bgt.s .b blt.s .n move.w 14(a0),d0 cmp.w 4(a0),d0 bgt.s .b blt.s .n move.w 16(a0),d0 cmp.w 6(a0),d0 bgt.s .n blt.s .b move.w 18(a0),d0 cmp.w 8(a0),d0 bgt.s .n blt.s .b move.w 10(a0),d0 cmp.w 0(a0),d0 bgt.s .n blt.w .b .b: move.w (a0),d0 move.w 10(a0),(a0) move.w d0,10(a0) move.l 2(a0),d0 move.l 12(a0),2(a0) move.l d0,12(a0) move.l 6(a0),d0 move.l 16(a0),6(a0) move.l d0,16(a0) .n: add.l #10,a0 dbf d6,.l dbf d7,.sl move.l nrplt,d6 subq.l #1,d6 move.l #tour_res,ttres lea tour_r,a1 lea temp_s,a2 lea names,a3 .loop: move.b #'¹',(a1)+ move.b #'x',(a1)+ move.b #8,(a1)+ move.b #'¹',(a1)+ move.b #'g',(a1)+ move.l a1,d0 addq.l #1,d0 and.l #-2,d0 move.l d0,a1 move.w (a2)+,d0 mulu #30,d0 lea (a3,d0.w),a4 move.l a4,(a1)+ move.b #'¹',(a1)+ move.b #'r',(a1)+ move.b #66,(a1)+ moveq #0,d0 move.w (a2)+,d0 bsr.s todec_c2 move.b #'¹',(a1)+ move.b #'r',(a1)+ move.b #84,(a1)+ moveq #0,d0 move.w (a2)+,d0 bsr.s todec_c2 move.b #'¹',(a1)+ move.b #'r',(a1)+ move.b #115,(a1)+ moveq #0,d0 move.w (a2)+,d0 bsr.s todec_c2 move.b #'¹',(a1)+ move.b #'r',(a1)+ move.b #139,(a1)+ moveq #0,d0 move.w (a2)+,d0 bsr.s todec_c2 move.b #10,(a1)+ move.b #'¹',(a1)+ move.b #'f',(a1)+ move.b #'A',(a1)+ dbf d6,.loop move.b #'¹',(a1)+ move.b #'c',(a1)+ move.b #0,(a1) rts todec_c2: tst.l d0 beq.s .z move.l d2,-(sp) cmp.l #99999,d0 bmi.s .q move.l #99999,d0 .q: move.l #10000,d1 moveq #4,d7 moveq #0,d2 .l: divu d1,d0 tst.w d0 bne.s .s tst.w d2 beq.s .p .s: moveq #1,d2 add.b #'0',d0 move.b d0,(a1)+ sub.w d0,d0 .p: swap d0 divu #10,d1 dbf d7,.l move.l (sp)+,d2 rts .z: move.b #'0',(a1)+ rts todec_c: tst.w d0 beq.s .z cmp.w #9999,d0 bmi.s .q move.w #9999,d0 .q: move.l #1000,d1 moveq #3,d7 .l: divu d1,d0 add.b #'0',d0 move.b d0,(a0)+ sub.w d0,d0 swap d0 divu #10,d1 dbf d7,.l rts .z: moveq #3,d7 .z2: move.b #'0',(a0)+ dbf d7,.z2 rts fixfrg: ; mulu #12,d0 lsl.w #2,d0 move.w d0,d1 add.w d0,d1 add.w d0,d1 move.l (a5,d1.w),(a1) move.w 4(a5,d1.w),4(a1) move.l 6(a5,d1.w),(a2) move.w 10(a5,d1.w),4(a2) rts fixa_portar: move.l BanaAdr,a0 sub.l #headline,a0 tst.w 34(a0) bne.s .nr lea 36(a0),a1 ;portar moveq #7,d7 lea p_buf,a2 move.w xlb,d0 moveq #0,d1 .a: move.l (a1)+,(a2) beq.s .z add.w d0,(a2) add.l d1,(a2) eor.l #$100010,d1 .z: addq.l #4,a2 dbf d7,.a rts .nr: move.l #0,p_buf move.l #0,port_adr rts check_cheat: bsr.s fixa_portar lea p_buf,a1 move.l a1,port_adr tst.l (a1) bne.s .q .nr: move.l #0,port_adr .q: tst.w tournorm beq.s o2 move.l #0,port_adr ;force dogfight o2: tst.l port_adr beq.w norm_n moveq #0,d0 cmp.w #$8fff,thr_k2+2 beq.s .q1 cmp.w #$9038,thr_k2+2 beq.s .q1 moveq #-1,d0 .q1: cmp.w #$100,grav+2 beq.s .q2 moveq #-1,d0 .q2: cmp.w #60,fuel_tnk beq.s .q3 moveq #-1,d0 .q3: cmp.w #48,ammo_tnk beq.s .q4 moveq #-1,d0 .q4: cmp.w #607,air_temp beq.s .q5 moveq #-1,d0 .q5: cmp.w #$100,bsfx1 beq.s .q6 cmp.b #-1,bsfx1 beq.s .q6 moveq #-1,d0 .q6: tst.l ig_pl2 beq.s .q7 cmp.w #$100,bsfx2 beq.s .q7 cmp.b #-1,bsfx2 beq.s .q7 moveq #-1,d0 .q7: cmp.l #28,energy_m beq.s .q8 moveq #-1,d0 .q8: tst.w rekyl bne.s .q9 moveq #-1,d0 .q9: tst.w d0 beq.s norm_n cmp.b #'&',ply1name beq.s .o1 lea ply1name+19,a0 moveq #17,d7 .y1: move.b -2(a0),-(a0) dbf d7,.y1 move.b #'&',ply1name .o1: cmp.b #'&',ply2name beq.w wl_w lea ply2name+19,a0 moveq #17,d7 .y2: move.b -2(a0),-(a0) dbf d7,.y2 move.b #'&',ply2name bra.w wl_w norm_n: bsr fnn bra.w n_m fnn: cmp.b #'&',ply1name bne.s .w1 lea ply1name,a0 moveq #17,d7 .ql: move.b 1(a0),(a0)+ dbf d7,.ql move.b #0,(a0) .w1: cmp.b #'&',ply2name bne.w .ut lea ply2name,a0 moveq #17,d7 .ql2: move.b 1(a0),(a0)+ dbf d7,.ql2 move.b #0,(a0) .ut: rts wl_w: clr.l thismenu tst.l unf_m+4 beq.w wl move.l #Unf_M,sbmenu jsr rens_mbpl .u: jsr syncff jsr check_2joys move.w #-1,jump_all bsr kolla_tang clr.w jump_all bsr.w menufix jsr curs_blink tst.w ch_exit bne.s .p tst.w ch_psw bmi.s .nev beq.s .u bra.s .o .p: move.w #0,ch_exit move.l #tmeny,sbmenu jsr clrscr bsr fnn moveq #1,d0 rts .nev: clr.l unf_m+4 move.l ask_u_act,a0 move.b #1,(a0) .o: move.w #0,ch_psw wls2: jsr clrscr wl: move.l #tmeny,sbmenu n_m: moveq #0,d0 rts ignore_pl2: lea copy_lista,a0 lea backup_pl2,a1 moveq #COPYANT-1,d7 .l: move.l (a0)+,a2 move.l (a0)+,a3 move.w (a3),(a1)+ move.w (a2),(a3) dbf d7,.l rts reset_pl2: lea copy_lista,a0 lea backup_pl2,a1 moveq #COPYANT-1,d7 .l: move.l (a0)+,a3 ;skip move.l (a0)+,a3 move.w (a1)+,(a3) dbf d7,.l rts GForce: clr.l invis1 move.l #slumps,slump_count move.l #slumps,slump_c2 move.l #slumps,sl_c3 move.l #skott,seekbeg clr.w bseek clr.w key_move cmp.w #$102,bsfx1 bne.s .k1 move.b #2,bseek .k1: cmp.w #$102,bsfx2 bne.s .k2 move.b #1,bseek+1 .k2: move.w #0,ch_play move.w #0,Winner move.w #0,lika_c lea f_dat+100,a1 moveq #0,d0 move.w fuel_tnk,d0 add.w d0,d0 move.w -100(a1,d0),fuel_sub move.w ammo_tnk,d0 add.w d0,d0 move.w 100(a1,d0),ammo_sub lea mine_struct,a0 move.w #ANT_mines*9-1,d7 .l: clr.w (a0)+ dbf d7,.l move.l tbanaadr,a0 move.l 122(a0),d0 and.l #1,d0 tst.l d0 beq.s .nixtjo move.l banaadr,a0 add.l #1463,a0 lea mine_struct,a1 .ml: moveq #0,d0 moveq #0,d1 move.b (a0)+,d0 asl.l #8,d0 move.b (a0)+,d0 move.b (a0)+,d1 asl.l #8,d1 move.b (a0)+,d1 move.w d0,(a1)+ move.w #-1,(a1)+ move.w d1,(a1)+ move.b #0,(a1)+ move.b #0,(a1)+ ;avail? 7 ror.l #3,d0 mulu.w #42,d1 add.w d0,d1 move.l d1,(a1)+ ;8 move.w #0,d0 rol.l #3,d0 move.b #8,(a1) sub.b d0,(a1)+ ;12 move.b #$ff,(a1)+ ;13 move.w #2,(a1)+ ;14 move.w #30,(a1)+ ;16 tst.w (a0) bne.s .ml .nixtjo: lea p1_xt,a0 moveq #3,d7 .pl: clr.l (a0)+ dbf d7,.pl move.w #$5,d_c1 move.w #$3,d_c2 move.w #0,p_ro lea tider1,a0 moveq #12,d7 .h: move.l #0,(a0)+ dbf d7,.h move.l #-1,tider1+20 move.l #-1,tider2+20 clr.l w1_gas move.w #0,RUCount clr.l out clr.l B_time move.l #-1,qaz tst.w benefactor beq.s .v tst.w fast_cpu beq.s .v tst.w nullm bne.s .v clr.l qaz move.l #-1,qaz20 .v: move.w #0,slowmo move.w #0,paws move.l thr_k2,thr_k add.l #$2800,thr_k move.l #$ffff,d0 moveq #0,d1 move.w air_temp,d1 sub.w d1,d0 move.l d0,air_res move.l #$ffff+607,d0 sub.l d1,d0 cmp.l #$ffff,d0 bls.s .jpp move.l #$10000,d0 .jpp: move.l d0,air_y_res lea norm1col,a1 lea low1col,a2 move.l ply1frg,d0 lea frger,a5 bsr fixfrg lea norm2col,a1 lea low2col,a2 move.l ply2frg,d0 bsr fixfrg lea norm1col,a0 lea ply1col+2,a1 lea ply1c2+2,a2 moveq #5,d7 .lx: move.w (a0),(a1)+ move.w (a0)+,(a2)+ addq.l #2,a1 addq.l #2,a2 dbf d7,.lx tst.w nullm bne.s .qnix moveq #22,d0 move.w #250,shot_lifetime tst.w fast_cpu beq.s .qnix tst.w benefactor bne.s .ja .qnix: moveq #11,d0 move.w #180,shot_lifetime .ja: move.l d0,nr_exps mulu #6,d0 lea exps,a0 move.l #-1,(a0,d0.w) lea w_subs,a0 moveq #0,d0 move.b BSFX1,d0 mulu #5,d0 add.b BSFX1+1,d0 move.b (a0,d0),d0 moveq #0,d1 move.b BSFX2,d1 mulu #5,d1 add.b BSFX2+1,d1 move.b (a0,d1),d1 move.w WeapSub,d2 mulu d2,d0 mulu d2,d1 asr.l #1,d0 asr.l #1,d1 move.w d0,WS1 move.w d1,WS2 lea xpos1,a0 lea xpos2,a2 lea normsettings,a1 moveq #BYTES_SETS,d0 .flsets: move.b (a0)+,(a1)+ move.b (a2)+,(a1)+ dbf d0,.flsets cmp.b #2,BSFX1 bne.w .n1 move.w #-1,BRLoad1 .n1: cmp.b #2,BSFX2 bne.s .n2 move.w #-1,BRload2 .n2: lea colc,a0 move.b #$81,d0 add.l ShiftR,d0 move.b d0,9(a0) move.b d0,33(a0) move.b d0,57(a0) move.l #0,SData tst.b sfx1+1 beq.s .g5 bset #9,Sdata move.b sfx1+1,sdata+1 .g5: tst.b spguid1 beq.s .g19 bset #10,sdata .g19: tst.b spguid2 beq.s .g29 bset #10,sdata+2 .g29: tst.b sfx2+1 beq.s .g6 bset #8,Sdata+2 move.b sfx2+1,sdata+3 .g6: cmp.b #1,SFX1 bne.s .g1 bset #15,SData .g1: cmp.b #2,SFX1 bne.s .g2 bset #14,SData .g2: cmp.b #1,SFX2 bne.s .g3 bset #15,SData+2 .g3: cmp.b #2,SFX2 bne.s .g4 bset #14,SData+2 .g4: move.w #0,$dff180 move.l #$3380,d0 move.l energy_m,d1 cmp.l #2,d1 bgt.s .qok moveq #3,d1 move.l #3,energy_m .qok: move.l d1,energy1 move.l d1,energy2 move.l d1,d2 swap d2 lsr.l #8,d2 divu #3,d2 move.w d2,energy_a subq.l #1,d1 divu d1,d0 add.w #1,d0 move.w d0,energy_K+2 tst.w first_m bne.w .qsnix tst.w nullm beq.s .okq tst.w master beq.s .go .okq: bsr check_cheat tst.w d0 beq.s .go rts .go: tst.w nullm beq.w .nix tst.w master bne.s .q tst.w tournorm ;force dogfight in 0-modem bne.s .snix bsr.w fixa_portar lea p_buf,a1 move.l a1,port_adr tst.l (a1) bne.w .nix .snix: clr.l port_adr bra.w .nix .q: move.w #$0800,$dff09c move.w #$1e1,$dff030 bsr waste_f bsr waste_f bsr waste_f bsr waste_f tst.w tournorm bne.s .dog move.w #$1d0,$dff030 bra.s .qw .dog: move.w #$1d7,$dff030 .qw: bsr waste_f bsr waste_f move.w #$0800,$dff09c .read: jsr waste_f move.w $dff018,d0 cmp.b #$d2,d0 bne.s .read bsr waste_f ; bra.w .ex move.l m_adrs,a0 move.l 8(a0),a0 lea menyadrs,a4 jsr (a0) ;uppdatera prefs-buffern lea prefs_buf,a0 moveq #1,d6 ;skicka över prefs move.w #(128*4)-1,d7 move.w #$0100,d0 .ql: ; move.w #$f00,$dff180 move.b (a0)+,d0 move.w d0,$dff030 move.w #$0800,$dff09c .w: btst #6,$bfe001 beq.s .ex move.w $dff018,d1 btst #14,d1 beq.s .w ; move.w #$f0,$dff180 nop nop nop nop nop dbf d7,.ql lea typpath,a0 moveq #88,d7 dbf d6,.ql .ex: move.w #$0800,$dff09c move.w #$1d4,$dff030 .nix: move.w #$7fff,$dff096 add.l #1,ny_slump tst.w nullm bne.s .nejnejnej move.l slumpv,d0 add.l d0,ny_slump .nejnejnej: move.w bonus_pods,d7 beq.w .nehe move.l banaadr,a0 cmp.l #'GFB!',-130(a0) bne.w .nehe move.w #1322,d6 .kep: cmp.b #251,(a0)+ bhi.w .nehe dbf d6,.kep subq.w #1,d7 move.w d7,d6 asl.w #2,d6 move.l banaadr,a0 lea slumps,a1 move.l ny_slump,d0 and.l #255,d0 move.l d0,d1 mulu #11,d1 move.b d1,ny_slv .sl: moveq #0,d1 moveq #0,d2 ;om det redan finns pods? hmmmm? move.b (a1,d0.l),d1 add.b ny_slv,d0 .fixa: cmp.b #20,d1 bls.w .ok sub.b #21,d1 bra.s .fixa .ok: move.b (a1,d0.l),d2 add.b ny_slv,d0 and.w #63,d2 cmp.w #63,d2 bne.s .nixpix moveq #30,d2 .nixpix: mulu #21,d2 add.l d1,d2 subq.w #1,d6 bmi.s .nehe tst.b (a0,d2.l) bne.s .sl ;.nrow: add.w #21,d2 ;pods som ramlar ner ; tst.b (a0,d2.l) ; bne.s .g ; bra.s .nrow ;.g: sub.w #21,d2 ; cmp.w #1300,d2 ; bpl.s .sl move.b (a1,d0.l),d1 add.b ny_slv,d0 .fixa3: cmp.b #4,d1 bls.s .ok3 sub.b #5,d1 bra.s .fixa3 .ok3: add.b #251,d1 move.b d1,(a0,d2.l) dbf d7,.sl .nehe: jsr init_bpl .qsnix: clr.l pm1 move.l grav,d0 move.l skott_w,d1 mulu d1,d0 move.l d0,skott_grav jsr init_spr bsr.w fix_shift move.l #Copper,d0 move.w d0,cop1ptr_l+6 swap d0 move.w d0,cop1ptr_l+2 move.l #WCopper1,d0 move.w d0,cop1ptr+6 swap d0 move.w d0,cop1ptr+2 move.l #WCopper2,d0 move.w d0,cop1ptr2+6 swap d0 move.w d0,cop1ptr2+2 move.l xstart1,xpos1 move.l xstart2,xpos2 move.l ystart1,ypos1 move.l ystart2,ypos2 jsr water_line ;water lea ply1col,a0 lea wcopper1,a1 lea wcopper2,a2 moveq #16,d7 jsr init_wcop_orig jsr place_scr_spr ;placera ut skärmar + players(sprites) move.w #-1,game_on lea local,a0 lea remote,a1 moveq #53,d7 .adfls: clr.b (a0)+ clr.b (a1)+ dbf d7,.adfls ;sersnix tst.w first_m bne.w .nog tst.w nullm beq.w .xit move.w #$1e3,$dff030 move.w #$0800,$dff09c bsr waste_f bsr waste_f jsr sync_master move.w #$0800,$dff09c bsr waste_f bra.s .xit2 .xit: jsr sync0 .xit2: move.l #Copper,$dff080 move.w #$83ef,$dff096 move.w #0,$dff088 move.w #$7041,$dff098 ;CLXCON move.w $dff00e,d0 ;dummy ; jsr sync0 move.w one_screen,onesbak move.w one_screen,o_scr_bak clr.w byt_count jsr GOGO move.w onesbak,one_screen .nog: clr.w game_on tst.w nullm beq.s .skec bsr waste_f bsr waste_f move.w #$0800,$dff09c move.w #$1e0,$dff030 .skec: move.w #0,$dff0a8 move.w #0,$dff0b8 move.w #0,$dff0c8 move.w #0,$dff0d8 clr.l WaterAdd move.l #recbuf,rec_c move.w #1,da_styr clr.l record1 move.l posi_adr,a1 lea xpos1,a4 bsr fix_poses lea xpos2,a4 bsr fix_poses move.b #0,-1(a1) spexs: move.w bonus_pods,d7 beq.w .nehe move.l banaadr,a0 cmp.l #'GFB!',-130(a0) bne.w .nehe move.w #1322,d7 ;21*63 -1 moveq #0,d0 .remp: move.b (a0)+,d0 cmp.w #248,d0 bmi.s .nr clr.b -1(a0) .nr: dbf d7,.remp .nehe: moveq #0,d0 rts sync_master: ;syncs at $0, master first tst.w master bne.s .m move.w #$0800,$dff09c .we7: move.w $dff018,d0 ; move.w #$f00,$dff180 cmp.b #$e7,d0 bne.s .we7 move.w #$1e8,$dff030 move.w #$0800,$dff09c .ws: move.w $dff018,d0 ; move.w #$f0,$dff180 cmp.b #$f0,d0 ;master synced? bne.s .ws moveq #0,d0 jsr syncxx rts .m: move.w #$1e7,$dff030 move.w #$0800,$dff09c .waitz: btst #6,$bfe001 beq.s .ut ; move.w #$f0f,$dff180 bsr waste_f move.w $dff018,d0 cmp.b #$e8,d0 ;haha! there you are! bne.s .m moveq #0,d0 jsr syncxx move.w #$1f0,$dff030 ;ok,slave: sync! .ut: rts check_master: move.w #$000f,$dff032 ;establish connection (224 kbaud!) move.w #$0800,$dff09c move.w #$1e3,$dff030 ;snix command move.w #$0800,$dff09c bsr waste_f moveq #10,d7 .kul_loop: move.w $dff018,d0 cmp.b #$fb,d0 ;master? are you there? beq.s .jageslav bsr waste_f dbf d7,.kul_loop bra.w .fwac .jageslav: .adf: move.w #$1fc,$dff030 ;ok, i'm your slave move.w #$0800,$dff09c bsr waste_f move.w #$1ea,$dff030 ;ok, i'm your slave bsr waste_f moveq #10,d7 .ws: move.w $dff018,d0 cmp.b #$00,d0 beq.s .conn cmp.b #$ff,d0 beq.s .conn bsr waste_f dbf d7,.ws bra.s .adf bra.s .fwac .conn: move.w #$0100,d1 move.b fast_cpu,d1 and.b d0,d1 move.w d1,$dff030 move.w fast_cpu,old_cpu tst.b d1 bne.s .nehe clr.w fast_cpu .nehe: move.w #0,master move.w #2,one_screen bra.w .xit .fwac: move.l #waitcopper,$dff080 moveq #0,d0 jsr syncxx move.w #$20,$dff096 move.w #0,$dff088 .jagemaster: move.w #-1,master move.w #$1fb,$dff030 ;f***ing slave? where are you? move.w #$0800,$dff09c .waitz: btst #6,$bfe001 beq.w .abort bsr waste_f move.w $dff018,d0 cmp.b #$fc,d0 ;haha! there you are! bne.s .jagemaster .wea: move.w #$0800,$dff09c bsr waste_f move.w $dff018,d0 cmp.b #$ea,d0 bne.s .wea move.w #1,one_screen move.w #$0100,d0 move.b fast_cpu,d0 move.w d0,$dff030 ;obey! bsr waste_f bsr waste_f bsr waste_f move.w $dff018,d0 move.w fast_cpu,old_cpu tst.b d0 bne.s .xit clr.w fast_cpu ;connection established .xit: move.l thismenu,sbmenu move.w #1,first_m move.w #1,tournorm ;force dogfight bsr spela move.w #0,first_m move.l #TMeny,thismenu move.l #mcopper,$dff080 move.w #$83e0,$dff096 move.w #0,$dff088 rts .abort: move.w l_o_scr,one_screen move.l scr_mode_adr,a2 move.b l_scr_m,(a2) move.l #TMeny,sbmenu bra.s .xit waste_f: moveq #5,d0 jsr syncxx moveq #0,d0 jsr syncxx rts fix_poses: moveq #0,d0 move.w (a4),d0 sub.w xlb,d0 bsr todec_c2 move.b #10,(a1)+ moveq #0,d0 move.w 4(a4),d0 bsr todec_c2 move.b #10,(a1)+ rts newtour: move.l #ttgon,ttres clr.l tourc bsr clrscr lea nt_buffer,a0 move.l nrplt,d0 add.b #'0',d0 move.b d0,(a0) move.b #0,1(a0) move.l a0,a1 lea nttxt,a2 move.b #70,d0 move.b #7,d1 jsr megainput jsr clrscr lea nt_buffer,a0 moveq #0,d0 move.b (a0),d0 move.l d0,d7 sub.b #'0',d0 cmp.w #1,d0 bls.s newtour cmp.w #8,d0 bhi.s newtour move.l d0,nrplt moveq #'1',d0 addq.w #1,d7 lea names,a3 .loop: lea nttxt2,a2 move.b d0,ntt2b move.l a3,a0 move.l a3,a1 movem.l a3/d0/d7,-(a7) move.b #70,d0 move.b #7,d1 jsr megainput jsr clrscr movem.l (a7)+,a3/d0/d7 add.l #30,a3 addq.w #1,d0 cmp.w d0,d7 bhi.s .loop bsr.s trtabcbztq bra ptm trtabcbztq: lea Tourtab,a0 move.l nrplt,d7 lea ordoffs,a1 lea slumps,a2 add.l slumpv,a2 subq.l #2,d7 asl.l #2,d7 move.l (a1,d7),a1 .l: move.w (a1)+,d0 cmp.l #slumps+256,a2 bls.s .p sub.l #256,a2 .p: tst.b (a2)+ bmi.s .qq ror.w #8,d0 .qq: sub.w #$101,d0 bmi.s .ok_r move.w d0,(a0)+ bra.s .l .ok_r: move.w #-1,(a0) tst.w tscmds beq.s scorefixa move.l nrplt,d7 move.l d7,d6 subq.l #1,d6 mulu d6,d7 asr.l #1,d7 lea slumps,a0 lea tourtab,a1 move.l slumpv,d0 moveq #127,d6 snixmix: moveq #0,d1 moveq #0,d2 move.b (a0,d0.w),d1 addq.b #1,d0 move.b (a0,d0.w),d2 addq.b #4,d0 mulu d7,d1 mulu d7,d2 lsr.l #8,d1 lsr.l #8,d2 add.w d1,d1 add.w d2,d2 move.w (a1,d1.w),d3 move.w (a1,d2.w),(a1,d1.w) move.w d3,(a1,d2.w) dbf d6,snixmix scorefixa: tst.w single beq.s .o lea tourtab,a0 move.l nrplt,d7 move.l d7,d6 subq.l #1,d7 mulu d7,d6 lea (a0,d6),a1 subq.l #1,d6 .p: move.w (a0)+,d0 ror.w #8,d0 move.w d0,(a1)+ dbf d6,.p move.w #-1,(a1)+ .o: lea Scores,a0 moveq #63,d7 .r: move.b #0,(a0)+ dbf d7,.r rts flipptxt: move.l slumpv,d0 mulu FLIPP_S,d0 lsr.l #8,d0 add.l SLOGANS,d0 bra.s st slumptxt: move.l slumpv,d0 mulu SLOGANS+2,d0 lsr.l #8,d0 st: lea gf_txts,a0 bra.s .end .cl: tst.b (a0)+ bne.s .cl .end: dbf d0,.cl rts place_pil: lea pilcol,a0 move.w #$f00,2(a0) move.w #$f55,6(a0) move.w #$900,10(a0) tst.w high_p beq.s .n sub.w #1,high_p bra.s .w .n: btst #7,$bfe001 beq.s .w tst.w pl2_md bne.s .q btst #6,$bfe001 bne.s .q .w: move.w #$f22,2(a0) move.w #$f77,6(a0) move.w #$b11,10(a0) .q: addq.b #1,slumpv+3 move.l xposp,d1 move.l yposp,d0 add.l #$700000,d1 add.l #$200000,d0 moveq #0,d2 move.w shiftr+2,d2 swap d2 add.l d2,d1 moveq #0,d2 lea pil,a0 movem.l d0/a0,-(sp) jsr place_sprite movem.l (sp)+,d0/a0 swap d0 and.l #$FFFF,d0 cmp.l #240,d0 bmi.s .no1 bset #1,3(a0) .no1: cmp.l #256,d0 bmi.s .no2 bset #2,3(a0) .no2: rts clrscr: move.l #0,pil move.l #0,cursor lea pic+99000,a0 moveq #63,d7 moveq #0,d0 .l: move.l d0,(a0)+ dbf d7,.l move.w curs_cl,curs_col jsr rens2_mbpl clr.l thismenu rts acjamb: movem.l d0-d7/a0-a6,-(sp) .w: jsr syncff jsr sync0 jsr curs_blink bsr kolla_tang tst.b d1 bne.s .q btst #6,$bfe001 beq.s .q btst #7,$bfe001 bne.s .w .q: movem.l (sp)+,d0-d7/a0-a6 cjamb: move.l d0,-(sp) .r: moveq #1,d0 .cl: jsr syncff jsr sync0 jsr curs_blink btst #6,$bfe001 beq.s .r btst #7,$bfe001 beq.s .r dbf d0,.cl move.l (sp)+,d0 rts fix_shift: move.l shiftr,d0 move.l d0,d1 lsl.w #4,d1 or.w d1,d0 move.w d0,ScrollRightreg+2 move.w d0,MScrollRightreg+2 sub.w #$11,d0 move.w d0,Scrollrr2+2 move.l shiftr,d0 swap d0 add.l d0,xstart1 add.l d0,xstart2 swap d0 add.l #$70,d0 swap d0 move.l d0,XLB swap d0 add.l #320,d0 swap d0 move.l d0,XRB rts fixa_light: jsr bltwait move.l thismenu,a0 addq.l #8,a0 move.l thismenu,a1 add.l #32,a1 move.l -4(a0),d7 move.l -4(a0),d6 mulu #20,d6 add.l d6,a1 moveq #0,d6 .cl: tst.w (a0) beq.s .nehe move.w (a0),d0 moveq #-1,d5 cmp.b -1(a1,d0.w),d6 bne.s .ej moveq #0,d5 .ej: lea pic+10752*7,a4 lea pic+10752*3,a3 move.l 4(a0),d0 tst.w pre_type bne.s .komplr mulu #42,d0 lea 4(a4,d0.l),a4 lea 4(a3,d0.l),a3 moveq #8,d1 tst.w d5 bne.s .l1 .o1: moveq #8,d0 .o2: move.l d5,(a3)+ dbf d0,.o2 addq.l #6,a3 dbf d1,.o1 bra.s .nehe .komplr: lea pic+99000,a4 ;256 bytes framåt move.b d5,(a4,d0.w) bra.s .nehe .l1: moveq #8,d0 .l2: move.l (a4)+,(a3)+ dbf d0,.l2 addq.l #6,a3 addq.l #6,a4 dbf d1,.l1 .nehe: add.l #20,a0 add.b #1,d6 dbf d7,.cl rts matare: move.l d1,mat_def bsr cjamb move.l #$40c0Cd00,matsprite mulu #128,d0 swap d0 move.w d0,mat_y bne.s .ok move.w #1,mat_y .ok: bsr place_mat .ml: jsr syncff jsr curs_blink jsr check_2joys bsr kolla_tang move.l joydir,d2 move.l keydir,d3 tst.l d3 beq.w .nehe clr.l waitc .nehe: or.l d2,d3 move.l d3,joydir tst.b joydir+3 beq.s .nu cmp.w #1,mat_y beq.s .nu sub.w #1,mat_y .nu: tst.b joydir+2 beq.s .nd cmp.w #127,mat_y beq.s .nd add.w #1,mat_y .nd: move.w mat_y,d0 bsr place_mat cmp.l #'LFLF',rem_j4 beq.s .ut btst #7,$bfe001 beq.s .ut tst.w pl2_md bne.w .ml btst #6,$bfe001 bne.w .ml .ut: clr.l rem_j4 bsr cjamb move.l #0,matsprite moveq #0,d0 move.w mat_y,d0 lsl.w #8,d0 lsl.w #1,d0 rts place_mat: subq.w #1,d0 lea mat_gfx+4,a0 moveq #126,d7 move.l #$00001008,d2 .l: cmp.b d0,d7 bne.s .n move.w #$1ff8,-2(a0) move.l #$0ff01008,d2 ; bra.s .t .n: move.l d2,(a0) .t: addq.l #4,a0 dbf d7,.l move.l mat_def,d1 not.w d1 mulu #128,d1 swap d1 add.w d1,d1 add.w d1,d1 lea mat_gfx+4,a0 or.w #$6006,-2(a0,d1.w) rts menufix: tst.w fix_HL beq.s .not move.w #0,Fix_HL bsr fixa_light .not: moveq #0,d5 move.w menulist,d6 move.l joydir,d2 move.l keydir,d3 or.l d2,d3 tst.l d3 beq.w ule tst.l waitc bne.w nehe move.l d3,joydir move.l thismenu,a0 lea best,a1 move.l #0,(a1) move.l #-1,4(a1) move.l #-1,8(a1) add.l #8,a0 move.l -4(a0),d7 mulu #20,d6 move.l a0,a5 add.l d6,a5 moveq #0,d3 move.w 2(a5),d3 ;xpos move.l 4(a5),d4 ;ypos leta: cmp.l a0,a5 beq.w nope tst.w joydir beq.s upndwn move.l d3,d0 move.l d4,d1 sub.w 2(a0),d0 beq.w nope sub.l 4(a0),d1 bpl.s .ok neg.l d1 .ok: ext.l d0 tst.l d0 bpl.s .pos tst.b joydir+1 bne.w nope neg.l d0 bra.s .2ok .pos: tst.b joydir bne.w nope .2ok: cmp.l #0,d1 beq.s .spec tst.l 8(a1) beq.w nope cmp.l 4(a1),d0 bhi.w nope bne.s jep cmp.l 8(a1),d1 bhi.s nope bra.s jep .spec: cmp.l 8(a1),d1 bne.s jep cmp.l 4(a1),d0 bhi.s nope bra.s jep upndwn: move.l d3,d1 move.l d4,d0 sub.w 2(a0),d1 bpl.s .ok ext.l d1 neg.l d1 .ok: sub.l 4(a0),d0 beq.s nope bpl.s .pos tst.b joydir+2 bne.s nope neg.l d0 bra.s .2ok .pos: tst.b joydir+3 bne.s nope .2ok: cmp.l #0,d1 beq.s .spec tst.l 4(a1) beq.s nope cmp.l 8(a1),d0 bhi.s nope bne.s jep cmp.l 4(a1),d1 bhi.s nope bra.w jep .spec: cmp.l 4(a1),d1 bne.s jep cmp.l 8(a1),d0 bhi.s nope jep: tst.w joydir bne.s .ok19 exg.l d0,d1 .ok19: move.l a0,(a1) move.l d0,4(a1) move.l d1,8(a1) nope: add.l #20,a0 dbf d7,leta tst.l (a1) beq.w ule move.l (a1),d0 move.l thismenu,d1 add.l #8,d1 sub.l d1,d0 divu #20,d0 move.w d0,menulist move.l #6,waitc nehe: subq.l #1,waitc cmp.w menulist,d6 beq.w ule move.l #1000,peta ule: move.l thismenu,d0 cmp.l sbmenu,d0 beq.w alltfint move.b #$d0,d0 jsr syncx bsr.w clrscr move.l sbmenu,a0 move.l (a0),a2 move.l 4(a0),d6 add.w #1,d6 swap d6 move.l d6,MenuHigh clr.l MenuList move.w new_ml,menulist clr.w new_ml move.l a0,thismenu movem.l d0-d7/a0-a6,-(sp) move.w #-1,pre_type bsr fixa_light movem.l (sp)+,d0-d7/a0-a6 bsr cjamb cmp.l #ttext,a2 bne.s .nehe tst.w flipp_a beq.s .nf bsr flipptxt bra.s .jf .nf: bsr slumptxt .jf: lea stxt,a1 .c: move.b (a0)+,(a1)+ bne.s .c .nehe: move.l #$ff,d6 moveq #1,d7 jsr type clr.w pre_type move.l #1000,pEta alltfint: cmp.l #1000,pEta bne.s k_move move.l thismenu,a0 add.l #8,a0 moveq #0,d0 move.w menulist,d0 mulu #20,d0 add.l d0,a0 moveq #0,d0 move.w 2(a0),d0 addq.l #4,a0 move.l (a0)+,d1 asl.w #1,d0 sub.l #16,d0 sub.l #1,d1 swap d0 swap d1 move.l d0,dxposp move.l d1,dyposp sub.l xposp,d0 sub.l yposp,d1 asr.l #3,d0 asr.l #3,d1 move.l d0,xaddp move.l d1,yaddp move.l #8,pEta k_move: tst.l pEta beq.s no_pmove move.l xaddp,d1 move.l yaddp,d0 add.l d1,xposp add.l d0,yposp sub.l #1,pEta bne.s no_pmove move.l dxposp,xposp move.l dyposp,yposp no_pmove: btst #2,$dff016 bne.s .goon move.l #TMeny,sbmenu .goon: bsr.w place_pil cmp.l #'LFLF',rem_j4 beq.s .sel tst.w pl2_md bne.s .lk btst #6,$bfe001 .lk: seq d6 btst #7,$bfe001 seq d7 or.b d6,d7 tst.b d7 beq.w ut .sel: clr.l pETA move.l dxposp,xposp move.l dyposp,yposp bsr.w place_pil clr.l rem_j4 move.l thismenu,a1 add.l #8,a1 moveq #0,d0 move.w menulist,d0 mulu #20,d0 add.l d0,a1 moveq #4,d7 move.l a1,real_a0 lea selected,a0 .l: move.l (a1)+,(a0)+ dbf d7,.l lea selected,a0 cmp.l #256,8(a0) bmi.s .no_hl sub.l #256,8(a0) moveq #0,d0 move.w (a0),d0 move.l thismenu,a1 move.l 4(a1),d1 mulu #20,d1 add.l #31,d1 add.l d1,a1 add.l d0,a1 move.b menulist+1,(a1) move.w #-1,Fix_HL .no_hl: cmp.l #4,8(a0) bne.s .not4 move.l 12(a0),a5 move.l #0,(a0) move.l #0,4(a0) .ok_igen: move.l (a5)+,8(a0) bmi.s .no_more move.l (a5)+,12(a0) move.l (a5)+,16(a0) movem.l a5/a0,-(sp) bsr check_function movem.l (sp)+,a0/a5 bra.s .ok_igen .not4: bsr check_function .no_more: rts check_function: tst.l 8(a0) bne.s .not0 move.l 12(a0),sbmenu bsr cjamb rts .not0: cmp.l #1,8(a0) bne.s .not1 move.l 12(a0),d1 move.l 16(a0),d0 asl.l #2,d0 lea menyadrs,a0 add.l d0,a0 move.l (a0),a1 move.l d1,(a1) cmp.l #ig_pl2,a1 ;ign pl2 beq.s .grink .gr: rts .grink: tst.l d1 beq.s .gr move.l d1,sbmenu bsr cjamb rts .not1: cmp.l #2,8(a0) bne.s .not2 .two: move.l 12(a0),d1 move.l 16(a0),d0 asl.l #2,d0 lea menyadrs,a0 add.l d0,a0 move.l (a0),a1 move.w d1,(a1) rts .not2: cmp.l #3,8(a0) bne.s .not3 move.l 12(a0),d1 move.l 16(a0),d0 asl.l #2,d0 lea menyadrs,a0 add.l d0,a0 move.l (a0),a1 move.b d1,(a1) rts .not3: cmp.l #10,8(a0) bne.s .not10 jsr laddabana bra.w .prev .not10: cmp.l #5,8(a0) bne.s .not5 move.w 14(a0),d1 movem.l d1-d7/a0-a6,-(sp) moveq #0,d0 moveq #0,d1 move.w 12(a0),d0 move.w 16(a0),d1 bsr matare movem.l (sp)+,d1-d7/a0-a6 move.l real_a0,a1 move.w d0,12(a1) mulu d1,d0 swap d0 moveq #0,d1 move.w 18(a0),d1 asl.l #2,d1 lea menyadrs,a0 move.l (a0,d1),a1 move.w d0,(a1) rts .not5: cmp.l #6,8(a0) bne.s .not6 move.l 12(a0),a2 move.l 16(a0),a1 move.w (a2),(a1) move.w 2(a2),d2 moveq #0,d1 move.w 6(a1),d1 asl.l #2,d1 lea menyadrs,a0 move.l (a0,d1),a1 move.w (a2),d1 mulu d2,d1 swap d1 move.w d1,(a1) rts .not6: cmp.l #192,8(a0) bne.w .norens moveq #0,d0 move.w cur_id,d0 move.l logf_adr,a0 add.l #40,a0 move.l (a0)+,d7 subq.l #1,d7 .q: cmp.w (a0),d0 beq.s .h add.l #50,a0 dbf d7,.q rts .h: addq.l #2,a0 move.w #15000,(a0)+ move.w #15000,(a0)+ move.w #15000,(a0)+ move.l a0,a2 lea ulenamn,a1 .fl: move.b (a1)+,(a0)+ bne.s .fl add.l #20,a2 move.w #15000,(a2)+ lea ulenamn,a1 .fl2: move.b (a1)+,(a2)+ bne.s .fl2 move.l divtptr,a0 lea divadrs,a1 move.l tbanaadr,a2 move.w 92(a2),18(a1) move.w 92(a2),cur_ID move.l #0,20(a1) move.l #0,24(a1) move.l banname,a3 lea tmeny,a4 moveq #0,d0 moveq #5,d7 jsr (a0) .prev: move.l thismenu,a5 move.l 4(a5),d0 addq.w #1,d0 mulu #20,d0 add.l d0,a5 add.l #8,a5 move.l (a5),sbmenu rts .norens: cmp.l #193,8(a0) bne.w .nocls move.l logf_adr,a5 move.l logf_adr2,a4 moveq #6,d7 .l: move.l #0,(a5)+ move.l #0,(a4)+ dbf d7,.l .qaqa: move.l divtptr,a0 lea divadrs,a1 moveq #4,d7 jsr (a0) bra.s .prev .nocls: cmp.l #200,8(a0) bne.s .nosubba move.l logf_adr,a5 move.l logf_adr2,a4 moveq #6,d7 .l9: move.l (a4)+,(a5)+ dbf d7,.l9 move.l logf_adr,a5 sub.l #1,16(a5) bpl.s .qaqa clr.l 16(a5) bra.s .qaqa .nosubba: cmp.l #70,8(a0) bne.s .not70 move.l 12(a0),shiftr bsr.w fix_shift jmp whilecode .not70: cmp.l #201,8(a0) bne.s .n201 bsr cjamb move.l logf_adr,a5 move.l logf_adr2,a4 move.l 12(a0),d0 move.l 16(a0),d1 sub.l d1,(a5,d0) bpl.s .os1 add.l d1,(a5,d0) .os1: sub.l d1,(a4,d0) bpl.w .qaqa add.l d1,(a4,d0) bra.w .qaqa .n201: cmp.l #'D',8(a0) bne.s .notdp bsr.w setdefault move.l m_adrs,a0 move.l 12(a0),a0 lea menyadrs,a4 jsr (a0) clr.l thismenu ;isn't illegal? rts .notdp: cmp.l #'S',8(a0) bne.w .nsave move.w #$8010,$dff096 move.w #$7fff,$dff09c move.l 4.w,a6 jsr enable(a6) move.l gfxbase,a6 jsr disownblitter(a6) move.l m_adrs,a0 move.l 8(a0),a0 lea menyadrs,a4 jsr (a0) lea typpath,a0 move.l pref,a1 add.l #380,a1 moveq #89,d7 .lfp: move.b (a0)+,(a1)+ dbf d7,.lfp move.l divtptr,a0 moveq #9,d7 lea divadrs,a1 lea prefs_buf,a5 jsr (a0) move.l dosbase,a6 moveq #0,d1 move.w l_paus,d1 mulu #13,d1 jsr delay(a6) move.l gfxbase,a6 jsr ownblitter(a6) move.l 4.w,a6 jsr disable(a6) jsr tysta_datorn rts .nsave: cmp.l #212,8(a0) bne.s .nlink tst.w nullm bne.s .al move.w one_screen,l_o_scr move.w l_paus,orgpaus move.w #-1,nullm move.l #0,ny_slump jsr check_master move.w #$0800,$dff09c .al: rts .nlink: cmp.l #213,8(a0) bne.s .n213 move.l scr_mode_adr,a2 move.b (a2),l_scr_m tst.w master beq.w .two clr.w nullm clr.w master move.w #$0800,$dff09c move.w #$1e2,$dff030 ;tala om för slaven att han e fri! bsr waste_f bsr waste_f move.w #$1e3,$dff030 move.w old_cpu,fast_cpu bra.w .two .n213: ut: rts Setdefault: lea def_prefs_buf,a0 lea prefs_buf,a1 moveq #119,d7 .dlfp: move.l (a0)+,(a1)+ dbf d7,.dlfp rts bomb_data: dc.l $40000000,$A0000000,$40000000 bomb_mask: dc.l $E0000000,$E0000000,$E0000000 section snix,code init_w_s: lea w_bplp,a0 move.l #wait_l,d0 move.l #wait_l+3588,d1 move.l #wait_l+3588*2,d2 move.w d0,6(a0) move.w d1,14(a0) move.w d2,22(a0) swap d0 swap d1 swap d2 move.w d2,18(a0) move.w d1,10(a0) move.w d0,2(a0) lea s_bplp,a0 move.l #slave_l,d0 move.l #slave_l+2912,d1 move.w d0,6(a0) move.w d1,14(a0) swap d0 swap d1 move.w d1,10(a0) move.w d0,2(a0) lea prefs_buf_bak,a0 lea prefs_buf,a1 moveq #119,d7 .dlfp: move.l (a1)+,(a0)+ dbf d7,.dlfp rts var_slav: bsr bltwait jsr sync0 move.w #$7fff,$dff096 move.l #slavCopper,$dff080 move.w #0,$dff088 move.w #$83c0,$dff096 .new: move.w #$0800,$dff09c moveq #5,d7 .read: btst #6,$bfe001 beq.s .t2 move.w $dff018,d0 cmp.b #$e1,d0 beq.s .spela cmp.b #$e2,d0 beq.s .t2 jsr waste_f dbf d7,.read bra.s .new .spela: move.l #snixCopper,$dff080 move.w #0,$dff088 move.w #$100,$dff096 bsr get_prefs jsr rens_mbpl jsr clrscr move.w #$8100,$dff096 jsr spela jsr rens_mbpl jsr clrscr bra.w var_slav .t2: move.w #$7fff,$dff096 move.l #mcopper,$dff080 move.w #0,$dff088 move.w #$82e0,$dff096 jsr rens_mbpl jsr clrscr jsr rita_bild move.w #$8100,$dff096 clr.w nullm move.l #Tmeny,sbmenu move.w l_o_scr,one_screen move.l scr_mode_adr,a2 move.b l_scr_m,(a2) move.w #$1e4,$dff030 move.w old_cpu,fast_cpu lea prefs_buf_bak,a0 lea prefs_buf,a1 moveq #119,d7 .dlfp: move.l (a0)+,(a1)+ dbf d7,.dlfp move.l m_adrs,a0 move.l 12(a0),a0 lea menyadrs,a4 jsr (a0) ;återställ prefs bsr syncff rts get_prefs: jsr waste_f lea leveljox,a0 lea typpath,a1 moveq #89,d7 .lop: move.b (a1)+,(a0)+ dbf d7,.lop jsr waste_f move.w #$0800,$dff09c .read: ; move.w #$f0f,$dff180 ; btst #7,$bfe001 ; beq.s .c jsr waste_f move.w $dff018,d0 cmp.b #$d0,d0 beq.s .race cmp.b #$d7,d0 bne.s .read move.w #-1,tournorm clr.l port_adr bra.s .c .race: clr.w tournorm .c: move.w #$0800,$dff09c jsr waste_f move.w #$1d2,$dff030 jsr waste_f jsr waste_f ; bra.w .ex lea prefs_buf,a0 moveq #1,d6 move.w #(128*4)-1,d7 .w: ; move.w #$f00,$dff180 move.w $dff018,d0 btst #6,$bfe001 beq.s .ex btst #14,d0 beq.s .w ; move.w #$f0,$dff180 move.b d0,(a0)+ move.w #$0800,$dff09c nop nop nop nop nop move.w #$1d3,$dff030 dbf d7,.w lea typpath,a0 moveq #88,d7 dbf d6,.w move.l m_adrs,a0 move.l 12(a0),a0 lea menyadrs,a4 jsr (a0) ;aktivera nya prefs move.w orgpaus,l_paus move.l #firsttyp,levname move.l #firstbana,banname lea leveljox,a0 lea typpath,a1 moveq #88,d7 .ch: move.b (a0)+,d0 cmp.b (a1)+,d0 bne.s .nixok dbf d7,.ch .ex: move.w #$0800,$dff09c rts .nixok: jsr levelload bra.s .ex sbmenu: dc.l tmeny TMeny: dc.l ttext,6 dc.l 65,113,2,1,0 dc.l 65,131,0,TourMeny,0 dc.l 65,149,0 banmenyer: dc.l 0,0 dc.l 110,113,0 lvlinfo: dc.l 0,0 dc.l 65,167,0 Prefs_Meny: dc.l 0,0 dc.l 65,185,0 instr_adr: dc.l 0,0 dc.l 65,203,2,1,1 dc.l TMeny,0,0 TourMeny: dc.l tmtext,2 dc.l 65,50,2,1,21 dc.l 65,68,2,-1,21 dc.l 15,225,0,TMeny,0 dc.l 0,0,0 StM: dc.l present,2 dc.l 65,150,2,-1,22 dc.l 65,168,2,1,22 dc.l 65,186,2,1,1 dc.l 0,0,0 unf_m: dc.l unf_t2,2 dc.l 65,150,2,1,22 dc.l 65,168,2,-1,22 dc.l 65,186,2,1,1 dc.l 0,0,0 ulenamn: dc.b 'Nobody',0 tmtext: dc.b '¹y',25,'¹d¹z¹f4TOURNAMENT MENU¹n¹b',65,50 dc.b '¹f2Play Next Match',10,10,'¹f5Start New Tournament¹j' even ttres: dc.l ttgon ttgon: dc.b '¹b',15,225,'¹f7Main Menu',0 ttext: dc.b '¹y',25,'¹d¹z¹f4GRAVITY POWER¹n¹c¹g' even dc.l sinit dc.b '¹c¹y',75,'¹d¹z¹f1< MAIN MENU >¹n¹b',40,95 dc.b '¹fFUse Joysticks to select:¹b',65,113,'¹f2Play' dc.b '¹x',110,'Level Info','¹x',65 dc.b 10,10,'¹f3Tournament' dc.b 10,10,'¹f4Load New Level',10,10,'¹f5Preferences',10,10 dc.b '¹f7Help and Texts',10,10 dc.b '¹f1Exit',0 t_sinit: dc.b '¹y',40,'¹z¹f7',0 odd anders_txt: dc.b '¹b',62,25,'¹d¹z¹f4 GRAVITY POWER ¹n¹c¹y',50 dc.b '¹z¹f5GP v1.20 (C) 1995 Bits Productions¹x',10,10,10 dc.b '¹z¹f4 CPU: 680' proc_type: dc.b '00 / Level Handler v' spec_ver: dc.b 'x.xx / AGA Chipset: ' aga_t: dc.b 'No ',10,'¹c',10,10 dc.b '¹x',10,'¹f2 Gravity POWER has been written for Amiga POWER' dc.b ' magazine by Jens Andersson and Jan Kronqvist. It is NOT ' dc.b 'ShareWare or PD, and CANNOT be freely distributed.',10,10 dc.b '¹f2 If you want a copy of this game, either write to us' dc.b ' (Jens Andersson, Plogvägen 2, 37233 Ronneby, Sweden)' dc.b ', enclosing 5 pounds or get a copy of Amiga Power #50 by' dc.b ' calling ¹f401225 442244¹f2 and ask to speak to Amiga Power' dc.b ' Back Issues.' dc.b '¹y',215,'¹z¹f1(Joybutton)',0 jb_txt: nttxt: dc.b '¹y',25,'¹D¹z¹f4NEW TOURNAMENT¹c¹n¹y',50,'¹z¹f5How Many Players?',0 nttxt2: dc.b '¹y',50,'¹D¹z¹f2Input Your Name Player ' ntt2b: dc.b 'X¹p:¹c¹n',0 even initlevladd: dc.l FirstBana,FirstTyp COPYANT: equ 10 ;antal word som kopieras t p2 copy_lista: ;lista på grejer som ply1 => ply2 (*WORDS*) ;10 st: ändra COPYANT! dc.l sfx1,sfx2 dc.l sprid1,sprid2 dc.l reload1,reload2 dc.l auto1,auto2 dc.l triple1,triple2 dc.l Look1,Look2 dc.l BSFX1,BSFX2 dc.l liv1,liv2 dc.l spguid1,spguid2 dc.l inv_on1,inv_on2 MenyAdrs: dc.l ch_Play dc.l ch_Exit dc.l grav+2 dc.l Penetrate dc.l skott_w+2 dc.l sfx1,sfx2 dc.l sprid1,sprid2 dc.l reload1,reload2 dc.l auto1,auto2 dc.l timeshow dc.l triple1,triple2 dc.l Look1,Look2 dc.l BSFX1,BSFX2 dc.l WeapSub dc.l ch_ptm dc.l ch_psw dc.l liv1,liv2 dc.l air_temp dc.l ply1frg,ply2frg dc.l thr_k2+2 dc.l fuel_tnk,ammo_tnk dc.l energy_m+2 dc.l seghet dc.l pl2_td,fast dc.l l_paus dc.l krock_fx dc.l wcollfix,spguid1,spguid2,sfx1+1,sfx2+1 dc.l glapp1,glapp2 dc.l record1,unf_m+4,tscmds,single dc.l flipp_a pref: dc.l def_prefs_buf dc.l one_screen dc.l j_delay dc.l key_b,rekyl,smart_m,benEfactor,ig_pl2 dc.l multis_on dc.l bonus_pods dc.l inv_on1,inv_on2 TypPath: dc.b 'GPX:GFX/' ;#typpath= even FirstTyp: dc.b "Grass.bmap",0 blk.b 16,0 odd BanPath: dc.b 'GPX:Levels/' ;#Banpath= anti-even Firstbana: dc.b "GRBomber's Delight.GFB",0 blk.b 20,0 even ; players DATA: ;;pl 1-------- xstart1: dc.l 0 ;x start pos ystart1: dc.l 0 ;y start pos XPos1: dc.l 0 ;xpos $HHHHDDDD YPos1: dc.l 0 ;ypos $HHHHDDDD XSpeed1: dc.l 0 ;xspeed $HHHHDDDD ;keep 2gether YSpeed1: dc.l 0 ;yspeed $HHHHDDDD ; ^ Scr1Off: dc.l 0 ;Offset from row 0 Seg1: dc.l 0 ;Old yspeed-flum Look1: dc.w LOOK ;1=look ahead Anim1: dc.l 8 ;anim step Fire1: dc.w 0 ;Joystick up? (yes=-1) FireC1: dc.w 0 ;0 = ok to fire Reload1: dc.w RELOAD ;reload time BRload1: dc.w RELOAD ;back reload time (-1=none) Energy1: dc.l M_ENERGY ;energy left Heat1: dc.l 0 ;CannonHeat Inv1: dc.w 1 ;0=visible Exp1: dc.w 0 ;0=alive PGas1: dc.w 0 ;0=no thrust Auto1: dc.w AUTO ;1=auto,-1 no cannon Sprid1: dc.w SPRID ;sprid factor Landed1: dc.w 1 ;0=not landed Under1: dc.w 0 ;0=over water Liv1: dc.w LIV ;# liv bak1: dc.w 0 ;=spec eff! tid man hållt bak Dead1: dc.w 0 ;1=dead Fuel1: dc.w 7500 ;fuel U_L1: dc.w 1 ;time left to upd lives Ammo1: dc.w MAXAMMO ;ammo Weap1: dc.w MAXAMMO ;weap-ammo PCount1: dc.w 0 ;port dc.l tider1 ;varvtids dc.w -1 ;pl 2-------- xstart2: dc.l 0 ystart2: dc.l 0 XPos2: dc.l 0 YPos2: dc.l 0 XSpeed2: dc.l 0 YSpeed2: dc.l 0 Scr2Off: dc.l 0 Seg2: dc.l 0 Look2: dc.w LOOK Anim2: dc.l 8 Fire2: dc.w 0 FireC2: dc.w 0 Reload2: dc.w RELOAD BRload2: dc.w RELOAD Energy2: dc.l M_ENERGY Heat2: dc.l 0 Inv2: dc.w 1 Exp2: dc.w 0 PGas2: dc.w 0 Auto2: dc.w AUTO Sprid2: dc.w SPRID Landed2: dc.w 1 Under2: dc.w 0 Liv2: dc.w LIV bak2: dc.w 0 Dead2: dc.w 0 Fuel2: dc.w 7500 U_L2: dc.w 1 Ammo2: dc.w MAXAMMO Weap2: dc.w MAXAMMO PCount2: dc.w 0 dc.l tider2 dc.w -1 ;More data... toggls: dc.l 0 ;.b: Daeng,$FF,Bump1,Bump2 Main_da: dc.w 0 da_styr: dc.w $0 out: dc.l 0 ;temp quit-value blink: dc.l 0 Kanal0: dc.l uleSnd ;Psst-sound Kanal1: dc.l 0 ;ply 1 - everything Kanal2: dc.l 0 ;ply 2 Kanal3: dc.l 0 ;the rest LHojd: dc.l 1008 ;Höjd i pixels Lhojd42: dc.l 0 ;Höjd*42 ShiftR: dc.l XOFFSET,0 ;x shift right XLB: dc.l 0 ;x left border (no need 2 set) XRB: dc.l 0 ;x right border (no need 2 set) WaterLine: dc.w 900,0 ;Waterline $7fff=disabled WaterAdd: dc.l 0 ;WaterLine Xp-sub WaterMax: dc.l 0 WaterSpeed: dc.l 0 out_count: dc.w 0 ;keep theze 2 2gether out_c2: dc.w 0 ;^ XposP: dc.w 100,0 ; pil xpos YposP: dc.w 100,0 ; " ypos XAddP: dc.w 0,0 ; " xadd YAddP: dc.w 0,0 ; " yadd cursb: dc.l CBL curs_cl: dc.w $f00 ;cursor_c s_bounce: dc.w Sbounce penetrate: dc.w PENE grav: dc.l $100 skott_w: dc.l 8 ;skott grav= x * grav SData: dc.w $4000,$4000,$4000 ;Skottens fx Energy_M: dc.l m_energy ;max Energy_K: dc.l 0 Energy_A: dc.w $800 ;ule-add air_temp: dc.w 607 Warn1: dc.w 0 Warn2: dc.w 0 WeapSub: dc.w W_SUB spguid1: dc.b 1,0 spguid2: dc.b 1,0 ply1frg: dc.l 0 ply2frg: dc.l 1 l_paus: dc.w l_pause thr_k: dc.l 0 thr_k2: dc.l $9038 w1_gas: dc.w 0 w2_gas: dc.w 0 fuel_tnk: dc.w 60 ;0-99 ammo_tnk: dc.w 48 ;0-99 seghet: dc.w 1 time_add: dc.l 1000 bseek: dc.b 0,0 p_ro: dc.w 0 p1_xt: dc.l 0 ;ply xtra time d_c1: dc.w 5 dc.w 0 p2_xt: dc.l 0 d_c2: dc.w 3 dc.w 0 ;; no_logg: dc.b "Couldn't find 'GPX:Logfile.DAT'! Quitting...",10 no_logge: introjox: dc.b 'GPX:GFX/GPX_ijx.dat',0 logfn: dc.b 'GPX:Logfile.Dat',0 prefsn: dc.b 'GPX:GPX_Prefs.Dat',0 names_t1: dc.b '¹y',35,'¹D¹z¹f5Enter Your Name, Player 1¹c',0 names_t2: dc.b '¹y',165,'¹D¹z¹f6Enter Your Name, Player 2¹c',0 dc.b '¹z¹f1' ply1name: dc.b 'Barf',0 ds.b 16 dc.b '¹z¹f2' ply2name: dc.b 'Mad Lamer',0 ds.b 12 unf_t2: dc.b '¹y',25,'¹d¹z¹f1- Unfair settings -¹n¹b',20,60 dc.b " ¹f6The current settings aren't default." dc.b ' This means that any new records will be marked' dc.b ' as "Unfair".' dc.b ' Consult "Help and Texts: Race" for further information.',10,10 dc.b '¹n¹b',65,150,'¹f2So what?',10,10,'¹f1Stop telling me!',10,10 dc.b '¹f1Oops! Back to Main Menu.',0 present: dc.b '¹y',25,'¹d¹z¹f5- The Contestants -',10,10,10,'¹D¹x',50,'¹f7Player' dc.b ' 1 - ¹g' even dc.l ply1name dc.b 10,10,'¹x',50,'¹f4Player 2 - ¹g' even dc.l ply2name dc.b '¹n¹b',65,150,'¹f2Play',10,10,'¹f1Swap Players',10,10 dc.b '¹f1Tournament Menu',0 tour_res: dc.b '¹y',100,'¹d¹z¹f3- TOURNAMENT STANDINGS -',10 dc.b '¹n¹D¹f3¹x',20,'Player¹x',55,'Score¹x',81,'+¹x',95 dc.b 'Shots fired¹x',130,'Played¹n',10,10,'¹f2¹g' even dc.l tour_r dc.b '¹j' dc.l ttgon odd b_ti: dc.b '¹r',110 b_t: dc.l 0,0 b_sh: dc.b 0,'¹r',110 sf_txt: dc.l 0,0 even winnertxt: dc.b '¹y',25,'¹D¹z¹f1- BATTLE REPORT -',10,10,'¹n¹x',40,'¹fFTotal Shots' dc.b ' Fired:¹g' even dc.l b_sh+1 dc.b 10,'¹x',40,'Battle took:¹g' even dc.l b_ti dc.b ' sec.¹c' dc.b '¹y',110,'¹D¹z¹f6And the WINNER is:¹c¹j' even vemvann:dc.l 0 winpek: dc.l esc,p1w,p2w,nw,ser_bug nw: dc.b '¹y',150,"¹z¹f7Nobody! It's a Draw!",0 esc: dc.b '¹y',150,"¹z¹f7Nobody! Escape was pressed!",0 ser_bug: dc.b'¹y',150,"¹z¹f1Nobody! Serial transmission error.",10 dc.b '¹zSorry for the inconvenience.',0 p1w: dc.b '¹y',150,'¹j' even dc.l ply1name-5 p2w: dc.b '¹y',150,'¹j' even dc.l ply2name-5 race_txt: dc.b '¹y',25,'¹D¹z¹f1- RACE REPORT -¹n' dc.b '¹y',50,'¹z¹f7Player 1¹b',30,55 dc.b 10,'Lap 1¹p:¹g' even dc.l ltxts dc.b '¹x',30,10,'Lap 2¹p:¹g' even dc.l ltxts+12 dc.b '¹x',30,10,'Lap 3¹p:¹g' even dc.l ltxts+24 dc.b '¹b',90,68,'Average¹p:¹g' even dc.l ltxts+36 dc.b '¹x',90,10,'Total¹p:¹g' even dc.l ltxts+48 dc.b '¹y',100,'¹z¹f4Player 2¹b',30,105 dc.b 10,'Lap 1¹p:¹g' even dc.l ltxts+60 dc.b '¹x',30,10,'Lap 2¹p:¹g' even dc.l ltxts+72 dc.b '¹x',30,10,'Lap 3¹p:¹g' even dc.l ltxts+84 dc.b '¹b',90,118,'Average¹p:¹g' even dc.l ltxts+96 dc.b '¹x',90,10,'Total¹p:¹j' even dc.l ltxts+108 cont_rt: dc.b '¹b',20,150,'¹j' even rt_e: dc.l 0 nrplt: dc.l 3 ;pl1,behöver ej återställas SFX1: dc.b 2,0 ;1=Bouncing;2=Exp BSFX1: dc.b 1,0 EnergyP1: dc.w 0 WS1: dc.w 0 Lives1: dc.w 0 ;pl2,behöver ej återställas SFX2: dc.b 2,0 BSFX2: dc.b 1,0 EnergyP2: dc.w 0 WS2: dc.w 0 Lives2: dc.w 0 Skott1: dc.w 0 Skott2: dc.w 0 Skott3: dc.w 0 da_19: dc.l 0 lika_c: dc.w 0 RUCount: dc.w 0 regg_txt2: dc.b '¹y',178,'¹g' even dc.l regg_txt+4 dc.b '¹j' dc.l jb_txt ;; ------MAIN LOOP sync0: addq.b #1,slumpv+3 cmp.b #$00,$dff006 bne.s sync0 btst #0,$dff005 bne.s sync0 ;sync vid $000 rts syncx: cmp.b $dff006,d0 bne.s syncx btst #0,$dff005 bne.s syncx ;sync vid $0xx rts syncff: cmp.b #$00,$dff006 bne.s syncff btst #0,$dff005 beq.s syncff ;sync vid $100 rts syncxx: btst #8,d0 beq.s syncx bsr syncff .q: cmp.b $dff006,d0 bne.s .q rts sync: bsr sync0 move.b local,ply1move move.b remote,ply2move tst.w nullm beq.w GOGO tst.w master beq.s .rec cmp.l #1,b_time beq.s .send bra.s .noslav .rec: move.b local,ply2move move.b remote,ply1move .noslav: move.w $dff018,d0 btst #7,d0 beq.s .n_e2 bclr #7,d0 move.b #-1,out .n_e2: tst.w master beq.s .nm bchg #6,d0 .nm: btst #0,b_time+3 bne.s .ta_ett btst #6,d0 bne.s .ser_bug bra.s .nsb .ta_ett: btst #6,d0 bne.s .nsb .ser_bug: move.w #4,winner ; move.b #-1,key_move+1 move.b #-1,out .nsb: tst.w master beq.s .slav move.b d0,remote bra.s .send .slav: move.b d0,remote+1 .send: move.w #$0800,$dff09c moveq #0,d0 move.b local+1,d0 bset #8,d0 btst #0,b_time+3 beq.s .ntb bset #6,d0 .ntb: tst.b key_move+1 beq.s .n_esc bset #7,d0 move.b #-1,out .n_esc: move.w d0,$dff030 GOGO: ;temprutin tst.w nullm beq.s .nejnej tst.w master beq.s .nejnej move.b local,ply1move move.b remote,ply2move .nejnej: cmp.w #3,o_scr_bak ;smart mode bne.s .spex subq.w #1,byt_count bpl.s .spex move.w #0,byt_count move.w ypos1,d0 sub.w ypos2,d0 bpl.s .ok29 neg.w d0 .ok29: cmp.w #150,d0 bls.s .ok38 tst.w one_screen beq.s .spex move.w #0,one_screen move.w #50,byt_count bra.s .spex .ok38: tst.w one_screen bmi.s .spex move.w #-1,one_screen move.w #50,byt_count .spex: bsr.w place_scr_spr ;placera ut skärmar + players(sprites) bsr.w water_line ;water ; lea ply1col,a0 ; lea wcopper1,a1 ; lea wcopper2,a2 ; moveq #8,d7 ; bsr init_wcop ;update ply under wat-cols lea ply1col,a0 lea ply1c2,a3 lea wcopper1,a1 lea wcopper2,a2 moveq #8,d7 bsr init_wcop ;update ply under wat-cols ; norm place for styr.. bsr.w shooters ;skjut iväg skott... bsr.w move_shots ;flytta skotten ; bsr cland2 bsr.w check_land ;kolla om man kan landa! bsr.w check_collision ;kolla alla möjliga kollisioner bsr.w updbars tst.w landed1 beq.s .n move.w #0,pm1 .n: tst.w landed2 beq.s .n2 move.w #0,pm2 .n2: ; btst #2,$dff016 ;exit om right mouse ; bne.b no_rex ; rts no_rex: bsr.w check_wait bsr.w update_exp ;update explosions! bsr.w update_Mexp ;update explosions! bsr.w upd_pl_exp ;update ply exps! move.w da_styr,d0 move.l d0,a5 ;För att spara undan move.w #1,da_styr move.w #-1,mini_styr bsr.w Styr_Fire move.w #0,mini_styr move.l a5,d0 move.w d0,da_styr tst.w blink_c15 bne.s .nehe add.l #1,blink and.l #$1f,blink move.l blink,d0 asr.l #1,d0 bclr #0,d0 lea blink_tab,a0 move.w (a0,d0),blink_col move.w (a0,d0),blink_col2 .nehe: cmp.w #0,Inv1 beq.s no_Inv1sub sub.w #1,Inv1 cmp.w #1,inv1 bpl.s no_inv1sub lea norm1col,a0 lea ply1col,a1 move.w (a0)+,2(a1) move.w (a0)+,6(a1) move.w (a0)+,10(a1) no_Inv1sub: cmp.w #0,Inv2 beq.s no_Inv2sub sub.w #1,Inv2 cmp.w #1,inv2 bpl.s no_inv2sub lea norm2col,a0 lea ply2col,a1 move.w (a0)+,2(a1) move.w (a0)+,6(a1) move.w (a0)+,10(a1) no_Inv2sub: clr.w XExpC tst.w Exp1 beq.s no_expsub1 move.b #1,XExpC sub.w #1,Exp1 bne.s no_expsub1 move.w #0,byt_count move.l xstart1,xpos1 move.l ystart1,ypos1 clr.l xspeed1 clr.l yspeed1 move.w #1,landed1 no_expsub1: tst.w Exp2 beq.s no_expsub2 move.b #1,XExpC+1 sub.w #1,Exp2 bne.s no_expsub2 move.w #0,byt_count move.l xstart2,xpos2 move.l ystart2,ypos2 clr.l xspeed2 clr.l yspeed2 move.w #1,landed2 no_expsub2: tst.w Liv1 bne.s ply1_alive tst.b ule_ut bne.s ply1_alive add.w #1,out_count move.w #$7fff,Inv1 move.w #$7fff,Exp1 move.w #1,landed1 move.w #1,Dead1 move.b #1,ule_ut cmp.w #50,lika_c bpl.s ply1_alive bset #1,Winner+1 tst.w o_scr_bak beq.s ply1_alive move.w #2,one_screen move.w #2,o_scr_bak ply1_alive: tst.w Liv2 bne.s ply2_alive tst.b ule_ut+1 bne.s ply2_alive add.w #1,out_count move.w #$7fff,Inv2 move.w #$7fff,Exp2 move.w #1,landed2 move.w #1,Dead2 move.b #1,ule_ut+1 cmp.w #50,lika_c bpl.s ply2_alive bset #0,Winner+1 tst.w o_scr_bak beq.s ply2_alive move.w #1,one_screen move.w #1,o_scr_bak ply2_alive: cmp.w #1,out_count bne.s .not1 tst.w landed1 beq.s .not1 tst.w landed2 beq.s .not1 add.l #$600,out_count ;(out_c2) .not1: cmp.w #2,out_count bmi.s not_out add.w #1,out_count cmp.w #58,out_count bne.s not_out rts not_out: tst.w winner beq.s .jaha addq.w #1,lika_c cmp.w #3000,lika_c bls.s .jaha rts .jaha: tst.w RUCount beq.s .zxc sub.w #1,RUCount bne.s .zxc rts .zxc: bsr magneter bsr.w soundfx bsr upd_lives bsr check_keys tst.l port_adr beq.s .n bsr check_port bsr visa_tid tst.w RUCount bne.s .n lea tider1,a0 lea tider2,a1 tst.l 8(a0) beq.s .nej1 tst.l (a1) bne.s .nej1 move.w #150,RUCount .nej1: tst.l 8(a0) beq.s .nej2 tst.l 8(a1) beq.s .nej2 move.w #150,RUCount .nej2: tst.l 8(a1) beq.s .n tst.l (a0) bne.s .n move.w #150,RUCount .n: bsr bomb bsr fix_air bsr mines bsr snix_cannon bsr fix_invis bsr seek_shots addq.l #1,b_time addq.l #5,snix_c cmp.l #snix_c,snix_c bmi.s .a sub.l #256,snix_c .a: tst.w TimeShow beq.s .u19 move.w #$008,$dff180 .u19: btst #0,$dff005 bne.s .gogo cmp.b #$fd,$dff006 bls.s .u19 .gogo: ; bsr.w missile bsr.w check_fire ;kolla om nån skjuter bsr.w move_bomb bsr.w styr ;båda players: styr,thrust,fire,spec .goon: tst.w first_m bne.s .qta tst.b out ;out<>0 om quit beq.b goon .qta: cmp.l #24,b_time bls.s goon clr.w first_m rts goon: moveq #50,d7 lea local,a0 lea 1(a0),a1 lea remote,a2 lea 1(a2),a3 .l: move.b (a1)+,(a0)+ move.b (a3)+,(a2)+ dbf d7,.l addq.l #1,sl_c3 ;SLUMPQ lea slump_v,a1 cmp.l #slumps+255,sl_c3 bmi.s .o move.l #slumps,sl_c3 .o: move.l sl_c3,a0 move.b (a1),1(a1) move.b (a0),(a1) move.l slump_c2,a0 move.b (a0),d0 eor.b d0,1(a1) tst.w timeshow beq.s .u20 move.w #$f00,$dff180 .u20: tst.w slowmo beq.w sync addq.l #2,B_time jsr syncff jsr sync0 jsr syncff bra.w sync ;ok,ny sync ;---------------------------------------------------------------Loop End fix_invis: ; lea ply1col+2,a1 ; lea ply1c2+2,a2 ; lea norm1col,a3 ; moveq #5,d7 ;.l: move.w (a3),(a1) ; addq.l #4,a1 ; move.w (a3)+,(a2) ; addq.l #4,a2 ; dbf d7,.l .p1_split_full: moveq #-1,d0 tst.w inv_on1 beq.w .p2_split_full bpl.s .p1up btst #3,ply1move beq.s .ej clr.w bak1 bra.s .inv1 .p1up: btst #2,ply1move beq.s .ej .inv1: moveq #1,d0 .ej: add.w d0,invis1 cmp.w #18,invis1 ble.w .nehe move.w #18,invis1 .nehe: tst.w invis1 bpl.w .tjo move.w #0,invis1 .tjo: move.l ply1frg,d0 move.w invis1,d1 tst.w nullm beq.s .norm1 tst.w master bne.s .n1m lea ply1col,a1 bsr.w .clrcol bra.s .r .n1m: lea ply1col,a1 bsr.w .cpycol bra.s .r .norm1: lea ply1c2,a1 bsr.w .clrcol lea ply1col,a1 tst.w one_screen bpl.s .low move.l ply1frg,d0 move.w invis1,d1 bsr.w .clrcol bra.s .r .low: move.l ply1frg,d0 move.w invis1,d1 bsr.w .cpycol .r: .p2_split_full: moveq #-1,d0 tst.w inv_on2 beq.w .q bpl.s .p2up btst #3,ply2move beq.s .ej2 clr.w bak2 bra.s .inv2 .p2up: btst #2,ply2move beq.s .ej2 .inv2: moveq #1,d0 .ej2: add.w d0,invis2 cmp.w #18,invis2 ble.w .nehe2 move.w #18,invis2 .nehe2: tst.w invis2 bpl.w .tjo2 move.w #0,invis2 .tjo2: tst.w dead1 bne.s .alt tst.w nullm beq.s .skipc tst.w master beq.s .alt ;jmp om EJ master lea ply1col+12,a1 move.l ply2frg,d0 move.w invis2,d1 bsr.s .clrcol bra.s .q .skipc: lea ply1col+12,a1 move.l ply2frg,d0 move.w invis2,d1 bsr .clrcol lea ply2col,a1 move.l ply2frg,d0 move.w invis2,d1 bsr .cpycol bra.s .q .alt: lea ply1col+12,a1 move.l ply2frg,d0 move.w invis2,d1 bsr .cpycol bra.s .q .cpycol: cmp.w #10,d1 bls.s .clrcol moveq #10,d1 .clrcol: lea frgtoning,a0 asr.w #1,d1 mulu #36,d1 mulu #6,d0 add.w d0,d1 move.w (a0,d1.w),2(a1) move.w 2(a0,d1.w),6(a1) move.w 4(a0,d1.w),10(a1) .q: rts snix_cannon: lea cannon_struct,a0 lea arctan,a5 lea pic+42*5,a1 move.l a1,a2 add.l lhojd42,a2 move.l a2,a3 add.l lhojd42,a3 move.l a3,a4 add.l lhojd42,a4 move.l real_leveltypeadr,a6 moveq #0,d0 move.w CannonAdd,d0 add.l d0,a6 moveq #3,d7 moveq #12,d6 .c_lop: moveq #0,d3 move.w (a0),d3 beq.w .nxt moveq #0,d4 move.w 2(a0),d4 asl.w #4,d3 asl.w #4,d4 move.b 5(a0),d2 cmp.b #1,d2 bne.s .an2 tst.w exp1 bne.w .nxt move.w xpos1,d0 move.l xspeed1,d2 asl.l #5,d2 swap d2 add.w d2,d0 move.w ypos1,d1 move.l yspeed1,d5 asl.l #4,d5 swap d5 add.w d5,d1 move.l #Kanal1,d5 bra.s .gp .an2: tst.w exp2 bne.w .nxt move.w xpos2,d0 move.l xspeed2,d2 asl.l #5,d2 swap d2 add.w d2,d0 move.w ypos2,d1 move.l yspeed2,d5 asl.l #4,d5 swap d5 add.w d5,d1 move.l #Kanal2,d5 .gp: sub.l d4,d1 bpl.w .nxt cmp.w #-200,d1 ble.w .nxt cmp.w #-35,d1 ble.w .no_s sub.w d2,d0 .no_s: sub.w xlb,d0 sub.l d3,d0 movem.l d6/a6/d5,-(sp) bsr smart_atn add.w d0,d0 lea cann_dir,a6 move.w (a6,d0.w),d0 movem.l (sp)+,d6/a6/d5 tst.w d0 bmi.s .nxt cmp.w 8(a0),d0 beq.s .aok bmi.s .sub add.w #128,8(a0) bra.s .pix .sub: sub.w #128,8(a0) .pix: move.w 8(a0),d0 move.w (a0),d2 add.w d2,d2 moveq #0,d1 move.w 10(a0),d1 add.w d2,d1 moveq #4,d2 ;4 moveq #42,d4 .flp: move.w (a6,d0.w),(a1,d1.l) move.w 2(a6,d0.w),(a2,d1.l) move.w 4(a6,d0.w),(a3,d1.l) move.w 6(a6,d0.w),(a4,d1.l) addq.w #8,d0 add.w d4,d1 dbf d2,.flp .aok: tst.w 6(a0) beq.s .shoot sub.w #1,6(a0) bra.s .mnxt .nxt: tst.b 4(a0) beq.s .mnxt eor.b #3,5(a0) .mnxt: add.l d6,a0 dbf d7,.c_lop rts .shoot: movem.l a1/a6/d6,-(sp) move.w #7,6(a0) ;4 speed? move.l seekbeg,a6 moveq #24,d6 .fs: tst.w (a6) beq.w .f bmi.w .qs add.l d6,a6 bra.s .fs .f: move.l d5,a1 move.l #FireSnd,(a1) move.l a6,seekbeg move.w shot_lifetime,16(a6) ;lifetime bset #15,16(a6) ;new shot on the block ; move.l skott_grav,20(a6) clr.l 20(a6) move.w #$4000,18(a6) move.w 8(a0),d6 lsr.l #4,d6 lea spedtab+4*8,a1 move.w (a0),d3 move.w 2(a0),d4 asl.w #4,d3 asl.w #4,d4 add.w #8,d3 add.w #8,d4 move.w d3,(a6) move.w d4,4(a6) move.l (a1,d6.w),d3 move.l 4(a1,d6.w),d4 add.l d3,d3 add.l d4,d4 moveq #0,d0 moveq #0,d1 move.l slump_count,a1 move.b (a1)+,d0 move.b (a1),d1 cmp.l #slumps+255,a1 bmi.s .ok lea slumps,a1 .ok: move.l a1,slump_count ;SLUMPQ sub.l #$78,d0 sub.l #$78,d1 asl.l #8,d0 add.l d0,d3 asl.l #8,d1 add.l d1,d4 move.l d3,8(a6) move.l d4,12(a6) add.l d3,d3 add.l d3,d3 add.l d4,d4 add.l d3,(a6) add.l d4,4(a6) .qs: movem.l (sp)+,a1/a6/d6 bra.w .mnxt cann_dir: dc.w 4*128,4*128,5*128,5*128,5*128,6*128 dc.w 6*128,7*128,7*128,8*128,8*128,8*128,8*128,8*128 dc.w -1,-1,-1,-1,-1,-1,-1,-1 dc.w -1,-1,-1,-1,-1,-1,-1,-1 dc.w -1,-1,-1,-1,-1,-1,-1,-1 dc.w -1,-1,-1,-1,-1,-1,-1,-1 dc.w -1,-1,-1,-1 dc.w 0,0,0,0*128,0*128,0*128,1*128,1*128 dc.w 2*128,2*128,3*128,3*128,4*128,4*128 visa_tid: lea sprite0+68+8,a0 lea pcount1,a2 tst.w exp1 bne.s .tom tst.b xexpc bne.s .tom lea p1_xt,a1 lea d_c1,a3 lea p_ro,a4 bsr show_tid bra.s .c .tom: moveq #22,d7 moveq #0,d0 move.w #-1,pcount1+6 .l: move.l d0,(a0)+ dbf d7,.l .c: lea sprite2+68+8,a0 lea pcount2,a2 tst.w exp2 bne.s .t2 tst.b xexpc+1 bne.s .t2 lea p2_xt,a1 lea d_c2,a3 lea p_ro+1,a4 bsr show_tid rts .t2: moveq #22,d7 moveq #0,d0 move.w #-1,pcount2+6 .l2: move.l d0,(a0)+ dbf d7,.l2 .c2: rts noll: dc.l 0 show_tid: subq.w #1,(a3) bne.w .k move.w #5,(a3) moveq #0,d0 moveq #0,d1 move.l 2(a2),a5 cmp.b #2,(a4) bne.s .nix move.l -4(a5),d2 bra.s .m .nix: move.l (a1),d2 add.l b_time,d2 tst.w 6(a1) beq.s .f move.w #0,6(a1) move.w #70,(a3) subq.l #4,a5 tst.b (a4) beq.s .f move.b #2,(a4) move.w #100,(a3) .f: sub.l -4(a5),d2 .m: cmp.w #4995,d2 bls.s .q move.l #4995,d2 .q: divu #500,d2 move.w d2,d0 swap d2 and.l #$ffff,d2 divu #50,d2 move.w d2,d1 swap d2 and.l #$ffff,d2 divu #5,d2 move.w #$0BE2,d3 lea ms_dat,a5 lea $dff000,a6 bsr bltwait move.w #$F000,d5 move.l #-1,$44(a6) bsr blta move.l d1,d0 bsr blta moveq #11,d0 bsr blta move.l d2,d0 bsr blta .k: add.l #4*7,a0 move.w (a2),d0 cmp.w 6(a2),d0 beq.s .z move.w d0,6(a2) mulu #13*4,d0 lea p_dat,a6 add.l d0,a6 tst.b (a4) bne.s .cs moveq #13,d7 .l: move.l (a6)+,(a0)+ dbf d7,.l .z: rts .cs: moveq #13,d7 moveq #0,d0 .b: move.l d0,(a0)+ dbf d7,.b rts blta: bsr bltwait cmp.w #0,d0 bne.s .n moveq #10,d0 .n: subq.b #1,d0 move.w d3,$40(a6) move.w d5,$72(a6) lsr.w #4,d5 add.w #$4000,d3 move.w #0,$42(a6) mulu #24,d0 lea (a5,d0.w),a1 move.l a0,$48(a6) move.l a1,$50(a6) move.l a0,$54(a6) move.w #0,$60(a6) move.l #0,$64(a6) move.w #$182,$58(a6) rts check_port: lea p_buf,a0 move.w xpos1,d2 move.w ypos1,d3 lea pcount1,a2 lea p1_xt,a5 lea kanal1,a6 lea p_ro,a4 bsr p_ch move.w xpos2,d2 move.w ypos2,d3 lea pcount2,a2 lea p2_xt,a5 lea kanal2,a6 lea p_ro+1,a4 bsr p_ch rts p_ch: tst.b (a4) bne.s .n addq.w #7,d2 addq.w #7,d3 move.w (a2),d0 asl.l #3,d0 move.l (a0,d0.w),d1 cmp.w d3,d1 bpl.s .n swap d1 cmp.w d2,d1 bpl.s .n move.l 4(a0,d0.w),d1 cmp.w d3,d1 bmi.s .n swap d1 cmp.w d2,d1 bmi.s .n move.l #pling,(a6) add.w #1,(a2) tst.l 8(a0,d0.w) bne.s .n move.w #0,(a2) move.l 2(a2),a3 tst.l 16(a3) beq.s .c move.l #tingeling,(a6) .c: move.l B_Time,(a3)+ move.l (a5),d0 move.w #1,4(a5) move.w #1,6(a5) add.l d0,-4(a3) tst.l 8(a3) beq.s .o move.b #1,(a4) .o: move.l a3,2(a2) .n: rts ;a0->$dff00a/$dff00c,d0 ret: bit 0-4= 0:l,r,u,d,fire check_kmove: cmp.b #29,d1 ;vänster bne.s .nz bchg #0,d2 .nz: cmp.b #31,d1 ;höger bne.s .nx bchg #1,d2 .nx: cmp.b #32,d1 ;upp (return,pilupp) beq.s .f cmp.b #28,d1 bne.s .nc .f: bchg #2,d2 bchg #5,d2 .nc: cmp.b #30,d1 ;ner bne.s .nv bchg #3,d2 .nv: cmp.b #10,d1 ;fire (space,shift) beq.s .gas cmp.b #5,d1 bne.s .nb .gas: bchg #4,d2 .nb: rts ;shift=chr$(5) , pil upp,vän,ner,hög=28,29,30,31 , HELP=126 check_keys: lea $bfec01,a1 btst #3,$100(a1) beq.w .ut moveq #0,d0 btst #0,(a1) bne.s .q bset #31,d0 .q: move.b (a1),d0 lsr.b #1,d0 not.b d0 bclr #7,d0 lea convert,a5 moveq #0,d1 move.b (a5,d0.w),d1 ;d1=char code,press=> d0+,release=> d0- moveq #0,d2 bsr check_kmove tst.l d0 bpl.s .pre not.b d2 and.b d2,key_move bra.w .tt .pre: or.b d2,key_move cmp.b #27,d1 bne.s .r move.b #-1,key_move+1 tst.w nullm bne.s .r move.b #-1,out .r: bclr #5,d1 cmp.b #'P',d1 bne.s .z tst.w nullm bne.s .z not.w paws .z: cmp.b #'S',d1 bne.s .i tst.w nullm bne.s .i not.w slowmo .i: tst.w in_gsnix beq.w .tt cmp.b #'R',d1 bne.s .p move.w #-1,record1 move.w #-1,record2 move.l #recbuf,rec_c move.w #1,da_styr .p: cmp.b #'C',d1 bne.s .xx move.w #-1,record1 move.w #-1,record2 .xx: cmp.b #'Q',d1 bne.s .p1 move.w #-1,record1 move.l #recbuf,rec_c move.w #1,da_styr .p1: cmp.b #'Z',d1 bne.s .p2 move.w #-1,record2 move.l #recbuf,rec_c move.w #1,da_styr .p2: cmp.b #'N',d1 bne.s .qq move.w #0,record1 move.w #0,record2 .qq: cmp.b #'A',d1 bne.s .b move.w #1,record1 move.w #1,record2 move.l #recbuf,rec_c move.w #1,da_styr .b: cmp.b #'W',d1 bne.s .b1 move.w #1,record1 move.l #recbuf,rec_c move.w #1,da_styr .b1: cmp.b #'X',d1 bne.s .b2 move.w #1,record2 move.l #recbuf,rec_c move.w #1,da_styr .b2: .tt: or.b #$40,$200(a1) nop nop nop nop and.b #$bf,$200(a1) .ut: tst.w paws beq.s .s move.w #0,$dff0a8 move.w #0,$dff0b8 move.w #0,$dff0c8 move.w #0,$dff0d8 jsr cjamb .wl: jsr sync0 jsr syncff jsr kolla_tang tst.b d1 bne.s .t btst #7,$bfe001 beq.s .t btst #6,$bfe001 bne.s .wl .t: cmp.b #9,d1 bne.s .f not.w in_gsnix move.w #$f0,$dff180 .f: move.w #0,paws .s: rts upd_lives: btst #0,$dff005 bne.w .ut lea $dff000,a6 lea siffs,a5 lea panel+2016,a4 tst.w U_L1 beq.s .n sub.w #1,U_L1 tst.w U_L1 bne.s .n move.w Liv1,d0 bsr .kliv mulu #480,d0 lea (a5,d0.l),a0 bra .blit .n: tst.w U_L2 beq.s .ut sub.w #1,U_L2 tst.w U_L2 bne.s .ut move.w Liv2,d0 bsr .kliv mulu #480,d0 add.l #4800,d0 lea (a5,d0.l),a0 add.l #38,a4 .blit: btst #6,$2(a6) bne.s .blit move.l #$09f00000,$40(a6) move.l #-1,$44(a6) move.l a0,$50(a6) move.l a4,$54(a6) move.l #$26,$64(a6) move.w #$1e02,$58(a6) bsr bltwait .ut: rts .kliv: cmp.w #10,d0 bmi.s .o moveq #9,d0 .o: rts updbars: move.l ShiftR,d7 lsr.l #1,d7 bclr #0,d7 move.l energy1,d0 move.l energy2,d1 move.l energy_k,d2 lea colc,a0 .o: bsr updbar move.l heat1,d0 move.l heat2,d1 move.l #170,d2 lea xcolc+96,a0 bsr updbar move.w Fuel1,d0 bpl.s .ok1 moveq #0,d0 .ok1: cmp.w #2010,d0 bhi.s .ok53 cmp.w #1,d0 bls.s .j add.w #1,Warn1 cmp.w #25,Warn1 bpl.s .h .j: move.w #$d88,Warn move.w #$fee,W2 move.w #$d88,W3 bra.s .u .h: cmp.w #45,Warn1 bls.s .x .ok53: move.w #0,Warn1 .x: move.w #$666,Warn move.w #$ddd,W2 move.w #$666,W3 .u: move.w Fuel2,d1 bpl.s ok2 moveq #0,d1 ok2: cmp.w #2010,d1 bhi.s .ok53 cmp.w #1,d0 bls.s .j add.w #1,Warn2 cmp.w #25,Warn2 bpl.s .h .j: move.w #$d88,Warn+16 move.w #$fee,W2+16 move.w #$d88,W3+16 bra.s .u .h: cmp.w #45,Warn2 bls.s .x .ok53: move.w #0,Warn2 .x: move.w #$666,Warn+16 move.w #$ddd,W2+16 move.w #$666,W3+16 .u: .ok55: move.l #242,d2 lea xcolc,a0 lsr.w #7,d0 lsr.w #7,d1 bsr updbar move.w ammo_sub,d2 move.w Ammo1,d0 cmp.w d2,d0 bpl.s .ok3 moveq #0,d0 .ok3: move.w Ammo2,d1 cmp.w d2,d1 bpl.s .ok4 moveq #0,d1 .ok4: move.l #242,d2 lea xcolc+144,a0 lsr.w #6,d0 lsr.w #6,d1 bsr updbar move.w Weap1,d0 cmp.w ws1,d0 bpl.s .okx3 moveq #0,d0 .okx3: move.w Weap2,d1 cmp.w ws2,d1 bpl.s .okx4 moveq #0,d1 .okx4: move.l #242,d2 lea xcolc+48,a0 lsr.w #6,d0 lsr.w #6,d1 bsr updbar ;fixa olika färg på mätarna rts updbar: move.w #$0f0,d6 move.w d6,d5 cmp.w #4,d0 bpl.s .m moveq #0,d6 .m: cmp.w #4,d1 bpl.s .m2 moveq #0,d5 .m2: mulu d2,d0 mulu d2,d1 lsr.w #8,d0 lsr.w #8,d1 cmp.w #61,d0 bmi.s .2m moveq #61,d0 .2m: cmp.w #61,d1 bmi.s u2 moveq #61,d1 u2: bset #0,d0 bset #0,d1 cmp.l #colc,a0 bne.s .o2 tst.w exp1 bne.s .n1 tst.w d6 beq.s .o1 cmp.w #25,d0 bpl.s .o1 move.w #$ff0,d6 cmp.w #10,d0 bpl.s .o1 move.w #$f00,d6 cmp.w #4,d0 bpl.s .o1 .n1: move.w #0,d6 .o1: tst.w exp2 bne.s .n2 tst.w d5 beq.s .o2 cmp.w #25,d1 bpl.s .o2 move.w #$ff0,d5 cmp.w #10,d1 bpl.s .o2 move.w #$f00,d5 cmp.w #4,d1 bpl.s .o2 .n2: move.w #0,d5 .o2: add.w #$94,d1 add.w d7,d1 move.w #$82,d2 add.w d7,d2 sub.w d0,d2 cmp.l #colc,a0 beq.s .spec tst.w exp1 bne.s .w1 move.b d2,1(a0) move.b d2,17(a0) move.b d2,33(a0) .w1: tst.w exp2 bne.s .w2 move.b d1,9(a0) move.b d1,25(a0) move.b d1,41(a0) .w2: rts .spec: move.b d2,1(a0) move.b d2,25(a0) move.b d2,49(a0) move.w d6,6(a0) move.w d6,30(a0) move.w d6,54(a0) lsr.w #2,d6 and.w #$333,d6 sub.w d6,6(a0) sub.w d6,54(a0) move.b d1,17(a0) move.b d1,41(a0) move.b d1,65(a0) move.w d5,14(a0) move.w d5,38(a0) move.w d5,62(a0) lsr.w #2,d5 and.w #$333,d5 sub.w d5,14(a0) sub.w d5,62(a0) rts magneter: lea magnet,a0 lea xpos1,a1 lea xpos2,a2 move.l XLB-2,d6 move.w #32,a6 move.w #16,a4 moveq #M_RACK,d3 moveq #-2,d2 move.l #MAGN_E,d5 moveq #H_RACK,d4 moveq #9,d7 ;-2 i (a0) avslutar ml: tst.w (a0) beq.s .n bmi.s .vaen move.l a1,a3 bsr c_magn_h move.l a2,a3 bsr c_magn_h bra.s .n .vaen: cmp.w (a0),d2 beq.s .end move.l a1,a3 bsr c_magn_v move.l a2,a3 bsr c_magn_v .n: addq.l #6,a0 dbf d7,ml .end: rts c_magn_h: move.w 2(a0),d0 move.w (a3),d1 sub.w d6,d1 sub.w d0,d1 bmi.s .n cmp.w d3,d1 bpl.s .n move.w 4(a0),d0 sub.w a4,d0 cmp.w 4(a3),d0 bpl.s .n add.w a6,d0 cmp.w 4(a3),d0 bmi.s .n sub.l d5,8(a3) cmp.w d4,d1 bpl.s .n sub.l d5,8(a3) .n: rts c_magn_v: move.w 2(a0),d0 move.w (a3),d1 sub.w d6,d1 sub.w d1,d0 bmi.s .n cmp.w d3,d0 bpl.s .n move.w 4(a0),d0 sub.w a4,d0 cmp.w 4(a3),d0 bpl.s .n add.w a6,d0 cmp.w 4(a3),d0 bmi.s .n add.l d5,8(a3) cmp.w d4,d1 bpl.s .n add.l d5,8(a3) .n: rts shooters: lea shooter,a0 lea pic,a5 lea pic,a6 add.l LHojd42,a6 add.l LHojd42,a6 add.l LHojd42,a6 lea shotsped(pc),a4 moveq #9,d7 moveq #12,d5 .loop: tst.w 2(a0) beq.w .n btst #0,5(a0) bne.s .of moveq #0,d0 move.w 2(a0),d0 lea (a5,d0.l),a1 lea (a6,d0.l),a2 move.b 4(a0),d0 btst d0,(a1) beq.w .dead move.l a2,d0 bclr #0,d0 move.l d0,a2 move.w -42(a2),d1 or.w (a2),d1 or.w 42(a2),d1 and.w #$3c0,d1 tst.w d1 bne.w .dead .of: sub.b #1,(a0) bne.w .n move.b 6(a0),(a0) moveq #0,d0 moveq #0,d1 move.b 7(a0),d0 asl.w #2,d0 lea (a4,d0.w),a1 move.w (a1),d0 move.w 2(a1),d1 swap d0 swap d1 move.l seekbeg,a1 moveq #24,d6 .fsl: tst.w (a1) beq.w .fd bmi.s .n ;alla skott "in use" add.l d6,a1 bra.s .fsl .fd: move.l a1,seekbeg move.l d0,8(a1) ;xsped move.l d1,12(a1) ;yspe move.w 8(a0),(a1) ;xpos move.w 10(a0),4(a1) ;ypos move.w d0,10(a1) ;noll move.w d0,14(a1) move.w d0,18(a1) move.w shot_lifetime,16(a1) ;lifetime bset #15,16(a1) ;new shot on the block ; addq.l #1,shots_active move.l #0,20(a1) bra.s .n .dead: move.w #0,2(a0) .n: add.l d5,a0 dbf d7,.loop rts .no_a: move.l a1,seekbeg bra.s .n shotsped: dc.w 0,-2,2,0,-2,0,0,2 miss_data: dc.l $640000,$640000,0,$400,0 missile: tst.l miss_data bne.s .no_start rts .no_start: lea $dff000,a5 moveq #0,d0 move.w miss_data,d0 move.w miss_data+4,d1 mulu #42,d1 lea pic,a0 ror.l #4,d0 add.l d0,d1 add.l d0,d1 add.l d1,a0 swap d0 or.w #$B0a,d0 lea miss,a1 move.w miss_data+18,d1 mulu #14*4,d1 add.l d1,a1 add.l #14*4*16*3,a1 moveq #3,d7 .rloop: btst #6,$2(a5) bne.s .rloop move.w d0,$40(a5) move.w #0,$42(a5) move.l #-1,$44(a5) move.l a0,$48(a5) move.l a1,$50(a5) move.l a0,$54(a5) move.w #38,$60(a5) move.w #38,$66(a5) move.w #0,$64(a5) move.w #14*64+2,$58(a5) add.l lhojd42,a0 dbf d7,.rloop add.l #1,miss_data+16 and.l #$f,miss_data+16 lea miss,a1 move.w miss_data+18,d1 mulu #14*4,d1 add.l d1,a1 add.l #14*4*16*3,a1 move.l miss_data+8,d0 add.l d0,miss_data move.l miss_data+12,d0 add.l d0,miss_data+4 moveq #0,d0 move.w miss_data,d0 move.w miss_data+4,d1 mulu #42,d1 lea pic,a0 ror.l #4,d0 add.l d0,d1 add.l d0,d1 add.l d1,a0 swap d0 or.w #$EE0,d0 move.l a0,d6 add.l lhojd42,a0 moveq #0,d7 .bw1: btst #6,$2(a5) bne.s .bw1 .cloop: move.w d0,$40(a5) move.w #0,$42(a5) move.l #-1,$44(a5) move.l a0,$48(a5) move.l a1,$50(a5) add.l lhojd42,a0 move.l a0,$4c(a5) move.w #38,$60(a5) move.w #38,$62(a5) move.w #0,$64(a5) move.w #14*64+2,$58(a5) add.l lhojd42,a0 .bw: btst #6,$2(a5) bne.s .bw btst #13,$2(a5) beq.w .coll dbf d7,.cloop move.l d6,a0 move.l a1,a2 ;a2=mask sub.l #14*4*16*3,a1 and.w #$f000,d0 move.w d0,d1 or.w #$0FE2,d0 moveq #3,d7 .dloop: btst #6,$2(a5) bne.s .dloop move.w d0,$40(a5) move.w d1,$42(a5) move.l #-1,$44(a5) move.l a0,$48(a5) move.l a1,$50(a5) move.l a0,$54(a5) move.l a2,$4c(a5) move.w #38,$60(a5) move.w #0,$62(a5) move.w #38,$66(a5) move.w #0,$64(a5) move.w #14*64+2,$58(a5) add.l lhojd42,a0 add.l #14*4*16,a1 dbf d7,.dloop .coll: rts mines: lea mine_struct,a0 lea xpos1,a2 lea xpos2,a3 lea pic,a4 lea pic,a5 add.l lhojd42,a4 add.l lhojd42,a4 add.l lhojd42,a4 move.w xlb,d5 sub.w #8,d5 moveq #18,d6 moveq #ANT_MINES-1,d7 .mloop: tst.w (a0) beq.s .nxt tst.w 14(a0) beq.s .act subq.w #1,14(a0) bra.s .nxt .act: move.w 16(a0),d4 bsr .chk_e tst.w (a0) beq.s .nxt exg a2,a3 bsr .chk_e exg a2,a3 tst.w (a0) beq.s .nxt moveq #0,d0 move.w 8(a0),d0 move.b 12(a0),d1 tst.b 13(a0) bne.s .not_vis bchg d1,(a5,d0.l) .not_vis: subq.w #1,2(a0) bne.s .ok bclr d1,(a5,d0.l) tst.b 6(a0) bne.s .e move.w #0,(a0) bra.s .nxt .ok: btst d1,-42(a5,d0.l) bne.s .e btst d1,(a4,d0.l) beq.s .nxt .e: movem.l d4-d7/a0-a5,-(sp) bsr.w explode movem.l (sp)+,d4-d7/a0-a5 .nxt: add.l d6,a0 dbf d7,.mloop rts .chk_e: move.w (a2),d0 move.w 4(a2),d1 sub.w (a0),d0 sub.w d5,d0 bpl.s .op1 neg.w d0 .op1: sub.w 4(a0),d1 add.w #5,d1 bpl.s .op2 neg.w d1 .op2: add.w d0,d1 cmp.w d4,d1 bhi.w .r moveq #0,d0 movem.l d4-d7/a0-a5,-(sp) bsr.w explode movem.l (sp)+,d4-d7/a0-a5 .r: rts ok_rock: asl.w #2,d0 moveq #0,d1 moveq #0,d2 lea skott_dir,a5 move.w (a5,d0),d1 move.w 2(a5,d0),d2 subq.w #1,d2 asl.w #1,d0 lea spedtab,a5 move.l (a5,d0.l),d5 move.l 4(a5,d0.l),d6 asl.l #3,d5 asl.l #3,d6 move.l d5,8(a0) move.l d6,12(a0) move.w rekyl,d4 bpl.s .ja moveq #0,d5 moveq #0,d6 .ja: beq.s .nix asr.l d4,d5 asr.l d4,d6 .nix: sub.w shiftr+2,d1 add.w d1,(a0) add.w d2,4(a0) sub.w #$71,(a0) rts ok_bomb: cmp.b #$11,d0 bpl.s .not asl.w #2,d0 moveq #0,d5 moveq #0,d6 lea bomb_dir,a1 move.w (a1,d0),d5 move.w 2(a1,d0),d6 sub.w shiftr+2,d5 add.w d5,(a0) add.w d6,4(a0) sub.w #$71,(a0) moveq #0,d0 rts .not: move.l #0,(a0) moveq #-1,d0 rts bomb: clr.w del_move lea $dff000,a6 lea bomb_struct,a0 cmp.b #$ff,bsfx1 beq.w .ule1 tst.w BRLoad1 beq.s .x bpl.s .s tst.w bak1 bne.s .ok .s: subq.w #1,BRLoad1 bne.w .ule1 .x: cmp.w #bdelay,bak1 bls.w .ule1 .ok: tst.l (a0) bne.w .ule1 tst.w Exp1 bne.w .ule1 cmp.b #2,BSFX1 beq.w xtra_weap1 move.w #BRELOAD,BRLoad1 move.w WS1,d0 cmp.w Weap1,d0 bgt.w .ule1 add.w d0,d0 sub.w d0,Weap1 cmp.b #5,BSFX1 beq.w mine_1 cmp.b #4,BSFX1 beq.w brake_1 cmp.b #3,BSFX1 beq.w shot16_1 move.l anim1,d0 move.l xpos1,(a0) move.l ypos1,4(a0) cmp.b #0,BSFX1+1 beq.s .b cmp.b #4,BSFX1+1 beq.s .b cmp.b #3,BSFX1+1 beq.s .b move.l #swosh,kanal1 move.w #BOMB_SELFDESTRUCT,bomb1sd bsr ok_rock sub.l d5,xspeed1 sub.l d6,yspeed1 bra.s .c .b: bsr.w ok_bomb tst.w d0 bmi.s .x1 move.l xspeed1,8(a0) move.l yspeed1,12(a0) add.l #$6000,12(a0) .c: move.b under1+1,16(a0) move.b bseek,17(a0) cmp.b #3,BSFX1+1 bne.s .not move.b #3,17(a0) .not: move.b #-1,del_move bsr.w bf_2 bra.s b_urk .x1: move.w WS1,d0 cmp.w Weap1,d0 bgt.s .ule1 add.w d0,d0 add.w d0,Weap1 .ule1: b_urk: add.l #18,a0 cmp.b #$ff,bsfx2 beq.w .ule2 tst.w BRLoad2 beq.s .x bpl.s .s tst.w bak2 bne.s .ok .s: subq.w #1,BRLoad2 bne.w .ule2 .x: cmp.w #bdelay,bak2 bls.w .ule2 .ok: tst.l (a0) bne.w .ule2 tst.w Exp2 bne.w .ule2 cmp.b #2,BSFX2 beq.w xtra_weap2 move.w #BRELOAD,BRLoad2 move.w WS2,d0 cmp.w Weap2,d0 bgt.w .ule2 add.w d0,d0 sub.w d0,Weap2 cmp.b #5,BSFX2 beq.w mine_2 cmp.b #4,BSFX2 beq.w brake_2 cmp.b #3,BSFX2 beq.w shot16_2 move.l anim2,d0 move.l xpos2,(a0) move.l ypos2,4(a0) cmp.b #0,BSFX2+1 beq.s .b cmp.b #3,BSFX2+1 beq.s .b cmp.b #4,BSFX2+1 beq.s .b move.l #swosh,kanal2 move.w #BOMB_SELFDESTRUCT,bomb2sd bsr ok_rock sub.l d5,xspeed2 sub.l d6,yspeed2 bra.s .c .b: bsr.w ok_bomb tst.w d0 bmi.s .q move.l xspeed2,8(a0) move.l yspeed2,12(a0) add.l #$6000,12(a0) .c: move.b under2+1,16(a0) move.b bseek+1,17(a0) move.b #-1,del_move+1 cmp.b #3,BSFX2+1 bne.s .not move.b #4,17(a0) .not: bra.w bf_2 .q: move.w WS2,d0 cmp.w Weap2,d0 bgt.s .ule2 add.w d0,d0 add.w d0,Weap2 .ule2: rts move_bomb: lea $dff000,a6 lea bomb_struct,a0 move.w xpos2,d0 move.w ypos2,d1 move.w bsfx1,d2 tst.w dead2 beq.s .nd2 moveq #0,d1 tst.b del_move bne.s .md2 .nd2: bsr.w bfall .md2: lea bomb_struct+18,a0 move.w xpos1,d0 move.w ypos1,d1 move.w bsfx2,d2 tst.w dead1 beq.s .nd moveq #0,d1 tst.b del_move+1 bne.s .md .nd: bra.w bfall ;+rts .md: rts mine_1: move.w #2*BRELOAD/3,BRLoad1 movem.l d0-d7/a0-a6,-(sp) lea xpos1,a0 lea kanal1,a2 move.b BSFX1+1,d5 bsr md2 movem.l (sp)+,d0-d7/a0-a6 bra.w b_urk mine_2: move.w #2*BRELOAD/3,BRLoad2 lea xpos2,a0 lea kanal2,a2 move.b BSFX2+1,d5 md2: lea mine_struct,a1 moveq #ANT_mines-1,d7 moveq #18,d6 .fm: tst.w (a1) beq.s .found add.l d6,a1 dbf d7,.fm rts .found: move.b d5,13(a1) move.w (a0),d0 move.w 4(a0),d1 sub.w xlb,d0 addq.w #8,d0 addq.w #5,d1 move.w d0,(a1) move.w #10*50,2(a1) ;10 secs move.w d1,4(a1) mulu #42,d1 ror.l #3,d0 add.w d0,d1 rol.l #3,d0 not.b d0 move.b d0,12(a1) move.w d1,8(a1) move.w #30,16(a1) ;15 move.w #25,14(a1) move.b #-1,6(a1) move.l #plonk,(a2) rts brake_1: movem.l d0-d7/a0-a6,-(sp) lea XSpeed1,a0 lea BSFX1,a1 lea brload1,a4 lea w1_gas,a2 move.l anim1,d0 bsr brake movem.l (sp)+,d0-d7/a0-a6 bra.w b_urk brake_2: lea brload2,a4 lea XSpeed2,a0 lea BSFX2,a1 lea w2_gas,a2 move.l anim2,d0 brake: move.w #0,(a4) cmp.b #3,1(a1) beq.s .n3 cmp.b #2,1(a1) beq.s .n2 cmp.b #1,1(a1) beq.s .n move.l (a0),d0 move.l 4(a0),d1 asr.l #2,d0 asr.l #2,d1 move.l d0,(a0) move.l d1,4(a0) rts .n: neg.l (a0) neg.l 4(a0) move.w #BRELOAD,(a4) rts .n3: add.b #$10,d0 and.b #$1f,d0 bra.s .n4 .n2: move.w #1,(a2) .n4: asl.l #3,d0 lea spedtab,a1 move.l (a1,d0),d1 move.l 4(a1,d0),d2 add.l d1,d1 add.l d2,d2 add.l d1,(a0) add.l d2,4(a0) rts xtra_weap1: movem.l d0-d7/a0-a6,-(sp) lea BSFX1,a0 lea Ammo1,a1 lea Fuel1,a2 lea Weap1,a3 bsr xtra_weap movem.l (sp)+,d0-d7/a0-a6 bra.w b_urk xtra_weap2: lea BSFX2,a0 lea Ammo2,a1 lea Fuel2,a2 lea Weap2,a3 xtra_weap: tst.w (a3) bpl.s .ok rts .ok: cmp.b #0,1(a0) bne.s .n1 .b: cmp.w #MAXAMMO-W_SUB,(a1) bge.s .n1 sub.w #W_SUB,(a3) add.w #3*W_SUB/2,(a1) .n1: cmp.b #1,1(a0) bne.s .n2 cmp.w #7450,(a2) bge.s .n2 sub.w #W_SUB,(a3) add.w #50,(a2) .n2: cmp.b #2,1(a0) bne.s .ut lea etta,a0 bra.s .b .ut: rts shot16_1: movem.l d0-d7/a0-a6,-(sp) move.l xpos1,d0 move.l ypos1,d1 move.l xspeed1,d2 move.l yspeed1,d3 move.l anim1,d4 lea reload1,a4 lea kanal1,a5 moveq #0,d7 lea BSFX1,a0 lea brload1,a1 move.l #Chopp,Kanal1 ;sound! bsr.s skjuting movem.l (sp)+,d0-d7/a0-a6 bra.w b_urk shot16_2: move.l xpos2,d0 move.l ypos2,d1 move.l xspeed2,d2 move.l yspeed2,d3 move.l anim2,d4 lea reload2,a4 lea kanal2,a5 moveq #2,d7 lea BSFX2,a0 lea brload2,a1 move.l #Chopp,Kanal2 bsr.s skjuting rts skjuting: cmp.b #2,1(a0) beq.s .backshot_old cmp.b #3,1(a0) beq.s .backshot moveq #2,d6 subq.w #1,d4 moveq #15,d5 cmp.b #1,1(a0) bne.s .nehe moveq #1,d6 subq.w #7,d4 moveq #16,d5 .nehe: and.w #$1f,d4 bsr shot16 rts .backshot_old: move.w (a4),(a1) ;15 asl.w #1,(a1) sub.w #17,d4 moveq #2,d5 moveq #1,d6 bra.s .nehe .backshot: move.l #firesnd,(a5) move.w (a4),(a1) ;15 asr.w #1,(a1) sub.w #16,d4 moveq #0,d5 moveq #1,d6 bra.s .nehe shot16: move.l #0,sprid_factor .l: movem.l d0-d6,-(sp) lea gurgel,a2 bsr.w skjut ;ok,fire! tst.b d0 bne.w .ut ;no shots avail movem.l (sp)+,d0-d6 add.w d6,d4 and.w #$1f,d4 dbf d5,.l rts .ut: movem.l (sp)+,d0-d6 rts multis: move.l (a0),d0 move.l 4(a0),d1 move.l 8(a0),d2 move.l 12(a0),d3 move.l 26(a0),d4 ;anim step moveq #2,d6 subq.w #1,d4 moveq #15,d5 and.w #$1f,d4 bra shot16 bfall: tst.l (a0) bne.s .goon rts .goon: cmp.w #$104,d2 bne.s .nixe move.w smart_m,d2 asl.w #2,d2 bra.s .nixe2 ; moveq #0,d0 ;spexbomb "proximity mines"??? ; moveq #0,d1 ; move.w (a0),d0 ; lsr.w #3,d0 ; move.w 4(a0),d1 ; add.w #30,d1 ; mulu #42,d1 ; add.l d0,d1 ; lea pic,a1 ; move.l lhojd42,d0 ; lea (a1,d0.l),a2 ; lea (a2,d1.l),a2 ; lea (a1,d1.l),a1 ; move.b (a2),d0 ; or.b (a1),d0 ; beq.s .nixe ; bra.w explode .nixe: move.w smart_m,d2 beq.s n_sm .nixe2: sub.w (a0),d0 sub.w XLB,d0 add.w #8,d0 bpl.s .op1 neg.w d0 .op1: sub.w 4(a0),d1 add.w #5,d1 bpl.s .op2 neg.w d1 .op2: add.w d0,d1 moveq #1,d0 cmp.w d2,d1 bls.w explode n_sm: move.w (a0),d0 move.w 4(a0),d1 mulu #42,d1 and.l #$1ff,d0 ror.l #4,d0 lea Pic,a1 add.l d1,a1 moveq #0,d1 add.w d0,d1 add.l d1,d1 add.l d1,a1 swap d0 or.w #$B0a,d0 bsr.w bltwait move.w d0,$40(a6) move.w #0,$42(a6) move.l #-1,$44(a6) move.l a1,$48(a6) move.l #bomb_data,$50(a6) move.l a1,$54(a6) move.w #38,$60(a6) move.w #0,$64(a6) move.w #38,$66(a6) move.w #3*64+2,$58(a6) bsr.w bltwait bf_2: move.l 8(a0),d0 move.l #$fd2f,d1 bsr.w mule exg d2,d0 move.l d0,8(a0) move.l 12(a0),d1 add.l d0,(a0) add.l d1,4(a0) moveq #0,d0 tst.w (a0) bpl.s .ok1 move.l #1,(a0) bra.w explode .ok1: cmp.w #333,(a0) bmi.s .ok2 move.l #$14c0000,(a0) bra.w explode .ok2: tst.w 4(a0) bpl.s .ok3 move.l #0,4(a0) bra.w explode .ok3: move.l lhojd,d7 cmp.w 4(a0),d7 bpl.s .ok4 sub.l d1,4(a0) bra.w explode .ok4: cmp.l #$50000,12(a0) bpl.s .noadd move.w waterline,d1 move.l grav,d0 cmp.w 4(a0),d1 bmi.s .ladd asl.l #3,d0 add.l d0,12(a0) bra.s .noadd .ladd: add.l d0,12(a0) add.l d0,12(a0) tst.b 16(a0) bne.s .noadd move.l 12(a0),d0 move.b d0,16(a0) ;d0=dummy,not eq asr.l #1,d0 sub.l d0,12(a0) .noadd: tst.b 17(a0) beq.w .nog cmp.b #3,17(a0) bne.s .p87 btst #2,ply1move bne.w explode bra.w .nog .p87: cmp.b #4,17(a0) bne.s .p56 btst #2,ply2move bne.w explode bra.w .nog .p56: cmp.b #1,17(a0) bne.s .p98 sub.w #1,bomb2sd bpl.s .jaha bra.w explode .jaha: move.w xpos1,d0 move.w ypos1,d1 tst.w exp1 bne.w .nog bra.s .p198 .p98: sub.w #1,bomb1sd bpl.s .qjaha bra.w explode .qjaha: move.w xpos2,d0 move.w ypos2,d1 tst.w exp2 bne.s .nog .p198: moveq #4,d7 addq.w #7,d0 addq.w #7,d1 sub.w XLB,d0 sub.w (a0),d0 sub.w 4(a0),d1 ext.l d0 ext.l d1 lea arctan,a5 bsr.w atn add.b #17,d0 and.w #62,d0 lsl.w #2,d0 lea spedtab,a3 move.l (a3,d0.w),d1 move.l 4(a3,d0.w),d0 moveq #2,d5 asl.l d5,d1 asl.l d5,d0 move.l 8(a0),d5 move.l 12(a0),d6 sub.l d5,d1 sub.l d6,d0 asl.l d7,d5 asl.l d7,d6 add.l d5,d1 add.l d6,d0 asr.l d7,d1 asr.l d7,d0 move.l d1,8(a0) move.l d0,12(a0) .nog: move.w (a0),d0 move.w 4(a0),d1 and.l #$fff,d1 mulu #42,d1 and.l #$1ff,d0 ror.l #4,d0 lea Pic,a1 add.l d1,a1 moveq #0,d1 move.w d0,d1 add.l d1,a1 add.l d1,a1 swap d0 move.l lhojd42,d7 or.w #$ee0,d0 move.w d0,$40(a6) move.w #0,$42(a6) move.l #-1,$44(a6) move.l a1,$48(a6) add.l d7,a1 move.l a1,$4c(a6) move.l #bomb_mask,$50(a6) move.l #$260026,$60(a6) move.w #0,$64(a6) move.w #3*64+2,$58(a6) bsr.w bltwait btst #13,$2(a6) beq.w explode move.w d0,$40(a6) move.w #0,$42(a6) move.l #-1,$44(a6) add.l d7,a1 move.l a1,$48(a6) add.l d7,a1 move.l a1,$4c(a6) move.l #bomb_mask,$50(a6) move.l #$260026,$60(a6) move.w #0,$64(a6) move.w #3*64+2,$58(a6) bsr.w bltwait btst #13,$2(a6) beq.s explode sub.l d7,a1 sub.l d7,a1 sub.l d7,a1 and.w #$f000,d0 or.w #$bfa,d0 move.w d0,$40(a6) move.w #0,$42(a6) move.l #-1,$44(a6) move.l a1,$48(a6) move.l #bomb_data,$50(a6) move.l a1,$54(a6) move.w #38,$60(a6) move.w #0,$64(a6) move.w #38,$66(a6) move.w #3*64+2,$58(a6) bsr.w bltwait rts check_wait: lea mexp_w,a0 tst.w (a0)+ beq.s .ut lea mexp_struct,a1 tst.l 8(a1) bmi.s .hitt lea mexp_s2,a1 tst.l 8(a1) bmi.s .hitt .ut: rts .hitt: move.w #0,-2(a0) bra.s expn1 explode: lea mexp_struct,a1 tst.l 8(a1) bmi.s expn1 lea mexp_s2,a1 tst.l 8(a1) bmi.s expn1 cmp.w #1,d0 beq n_sm lea mexp_w,a1 move.w #-1,(a1)+ moveq #2,d7 move.l a0,d0 .q: move.l (a0)+,(a1)+ dbf d7,.q move.l d0,a0 bra.s noexp expn1: bsr.s tryckv moveq #0,d0 moveq #0,d1 move.w (a0),d0 move.w 4(a0),d1 addq.l #1,d0 ;+16-15. fråga ej varför. bpl.s .qwe moveq #0,d0 .qwe: sub.l #12,d1 bpl.s .ok moveq #0,d1 .ok: cmp.l #333,d0 bmi.s .ok1 move.l #333,d0 .ok1: move.l lhojd,d7 sub.l #29,d7 cmp.l d7,d1 bmi.s .pouu move.l d7,d1 .pouu: move.l d0,(a1) move.l d1,4(a1) move.l #0,8(a1) noexp: move.l #0,(a0) ; neg.l 12(a0) rts tryckv: tst.w exp1 bne.s .p1d move.l xpos1,d2 move.l ypos1,d3 lea energy1,a5 move.w pm1,d5 bsr.s .go move.w d5,pm1 sub.l d2,xspeed1 sub.l d3,yspeed1 .p1d: tst.w exp2 bne.s .p2d move.l xpos2,d2 move.l ypos2,d3 lea energy2,a5 move.w pm2,d5 bsr.s .go move.w d5,pm2 sub.l d2,xspeed2 sub.l d3,yspeed2 .p2d: rts .go: moveq #0,d6 moveq #0,d7 move.l (a0),d0 move.l 4(a0),d1 sub.l #$80000,d1 swap d0 add.w #$69,d0 add.w shiftr+2,d0 swap d0 sub.l d2,d0 sub.l d3,d1 tst.l d0 bpl.s .ok1 neg.l d0 moveq #-1,d6 .ok1: tst.l d1 bpl.s .ok2 neg.l d1 moveq #-1,d7 .ok2: move.l d0,d2 move.l d1,d3 swap d0 ;x dist swap d1 ;y dist mulu d0,d0 mulu d1,d1 add.l d0,d1 lsr.l #4,d1 cmp.l #(Tryck*tryck)/16,d1 bpl.s .no lea sqr,a4 moveq #0,d0 move.b (a4,d1.w),d0 cmp.b #Tryck/3,d0 bpl.s .ok19 btst #0,d0 beq.s .q moveq #1,d5 bra.s .ok19 .q: moveq #-1,d5 .ok19: cmp.b #15,d0 bpl.s .ok5 moveq #15,d1 sub.w d0,d1 asl.w #2,d1 sub.l d1,(a5) .ok5: moveq #tryck+2,d1 sub.w d0,d1 ; mulu #8,d1 asl.w #3,d1 add.b #1,d0 divu d0,d2 ;x/dist divu d0,d3 ;y/dist mulu d1,d2 mulu d1,d3 lsr.l #7,d2 lsr.l #7,d3 tst.w d6 beq.s .ok3 neg.l d2 .ok3: tst.w d7 beq.s .ok4 neg.l d3 .ok4: rts .no: moveq #0,d2 moveq #0,d3 rts init_wcop_orig: move.w #$777,d1 move.w #$114,d2 .loop: move.w (a0),(a1)+ move.w (a0)+,(a2)+ move.w (a0)+,d0 lsr.w #1,d0 and.w d1,d0 add.w d2,d0 move.w d0,(a1)+ move.w d0,(a2)+ dbf d7,.loop rts init_wcop: move.w #$777,d1 move.w #$114,d2 .loop: move.w (a0)+,(a1)+ move.w (a3)+,(a2)+ move.w (a0)+,d0 lsr.w #1,d0 and.w d1,d0 add.w d2,d0 move.w d0,(a1)+ move.w (a3)+,d0 lsr.w #1,d0 and.w d1,d0 add.w d2,d0 move.w d0,(a2)+ dbf d7,.loop rts Snix_Water_line: move.w #$180,wcop1-4 ;ply1 moveq #0,d0 moveq #0,d1 move.l scr1off,d0 move.w waterline,d1 cmp.l d0,d1 bmi.s .total1 add.l #219,d0 cmp.l d0,d1 bpl.s .overw1 sub.l #219,d0 sub.l d0,d1 bra.b .putw1 .overw1: moveq #-1,d1 bra.s .wurk1 .total1: moveq #-1,d1 move.w #$88,wcop1-4 .putw1: add.w #$24,d1 cmp.w #$fe,d1 ;? öhö? urk? snix? 7? 3? 12? 42!!! bpl.s .wurk1 move.b d1,wcop1 move.w #$88,wcop1+4 move.w #0,wcop1+6 lea wcopper1,a3 lea ply1col,a0 moveq #16,d7 .loops: move.w (a0)+,(a3)+ addq.l #2,a0 addq.l #2,a3 dbf d7,.loops bra.s .wcsync .wurk1: move.b #$fe,wcop1 move.w #$88,wcop1+4 move.w #0,wcop1+6 ; lea wcopper1,a3 ;disablad av nån anledning ; moveq #16,d7 ;.qops: move.w #$1fe,(a3)+ ; addq.l #2,a3 ; dbf d7,.qops .wcsync: cmp.b #$23,$dff006 beq.s .wcsync move.l #one_scr_cop,d0 move.w d0,wcopper1+68+6 swap d0 move.w d0,wcopper1+68+2 rts Water_line: move.l waterspeed,d1 move.w watermax,d0 tst.l waterspeed bmi.s .subba cmp.w waterline,d0 bhi.s .snix sub.l d1,waterline bra.s .snix .subba: cmp.w waterline,d0 bls.s .snix sub.l d1,waterline .snix: tst.w one_screen beq.s .norm bra.w snix_water_line .norm: move.w #$180,wcop1-4 ;ply1 moveq #0,d0 moveq #0,d1 move.l scr1off,d0 move.w waterline,d1 cmp.l d0,d1 bmi.s total1 add.l #107,d0 cmp.l d0,d1 bpl.s overw1 sub.l #107,d0 sub.l d0,d1 bra.b putw1 overw1: moveq #-1,d1 bra.s wurk1 total1: moveq #-1,d1 move.w #$88,wcop1-4 move.l #wcop1,a1 putw1: add.w #$24,d1 cmp.w #$83,d1 bpl.s wurk1 move.b d1,wcop1 move.w #$88,wcop1+4 move.w #0,wcop1+6 move.l #wcop1+8,a1 bra.s wurkr1 wurk1: move.b #$40,wcop1 move.w #$1fe,wcop1+4 move.w #0,wcop1+6 wurkr1: move.w #11,d7 lea wcop1+8,a0 wloop1: cmp.b (a0),d1 bne.s notwhere move.w #$88,4(a0) move.w #0,6(a0) move.b #$01,1(a0) move.l a0,a1 add.l #8,a1 bra.s wnext1 notwhere: move.b #$21,1(a0) move.w #$1fe,4(a0) move.w #0,6(a0) wnext1: add.l #24,a0 dbf d7,wloop1 move.l a1,d0 wcsync: cmp.b #$23,$dff006 beq.s wcsync move.w d0,wcopper1+68+6 swap d0 move.w d0,wcopper1+68+2 move.w #$180,wcop2-4 ;ply2 moveq #0,d0 moveq #0,d1 move.l scr2off,d0 move.w waterline,d1 cmp.l d0,d1 bmi.b total2 add.l #107,d0 cmp.l d0,d1 bpl.b overw2 sub.l #107,d0 sub.l d0,d1 bra.b putw2 overw2: move.w #0,d1 bra.s wurk2 total2: move.l #0,d1 move.w #$88,wcop2-4 move.l #wcop2,a1 bra.s wurk2 putw2: add.w #$94,d1 cmp.w #$a0,d1 bmi.s wurk2 move.b d1,wcop2_2 move.w #$88,wcop2_2+4 move.w #0,wcop2_2+6 move.l #wcop2_2+8,a1 move.l #0,d1 bra.s wurkr2 wurk2: move.b #$a5,wcop2_2 move.w #$1fe,wcop2_2+4 move.w #0,wcop2_2+6 wurkr2: move.w #11,d7 lea wcop2,a0 wloop2: cmp.b (a0),d1 bne.s notwhere2 move.w #$88,4(a0) move.w #0,6(a0) move.b #$01,1(a0) move.l a0,a1 add.l #8,a1 bra.s wnext2 notwhere2: move.b #$21,1(a0) move.w #$1fe,4(a0) move.w #0,6(a0) wnext2: add.l #24,a0 dbf d7,wloop2 move.l a1,d0 wcsync2: cmp.b #$93,$dff006 beq.s wcsync2 move.w d0,wcopper2+68+6 swap d0 move.w d0,wcopper2+68+2 rts soundfx: lea $dff0a0,a0 moveq #1,d6 lea Kanal0,a1 tst.l (a1) beq.s PsstVol bsr.w PlaySound move.l #0,Kanal0 PsstVol: moveq #0,d0 tst.w PGas1 beq.s p1_nogas tst.w Exp1 bne.s p1_nogas moveq #22,d0 p1_nogas: tst.w PGas2 beq.s p2_nogas tst.w Exp2 bne.s p2_nogas add.w #22,d0 p2_nogas: cmp.w #23,d0 bmi.s set_pstvol moveq #36,d0 set_pstvol: asr.w #1,d0 move.w d0,$dff0a8 lea $dff0b0,a0 moveq #2,d6 lea Kanal1,a1 bsr.s PlaySound move.l #0,Kanal1 lea $dff0c0,a0 moveq #4,d6 lea Kanal2,a1 bsr.s PlaySound move.l #0,Kanal2 lea $dff0d0,a0 moveq #8,d6 lea Kanal3,a1 bsr.s PlaySound move.l #0,Kanal3 move.b $dff006,d0 add.b #4,d0 ps_wait: cmp.b $dff006,d0 bne.s ps_wait bset #15,d6 move.w #$800f,$dff096 rts PlaySound: tst.l (a1) beq.s QuietChan move.w d6,$dff096 move.l (a1),a2 move.w (a2)+,d0 move.w (a2)+,d1 move.w (a2)+,d2 move.l a2,(a0) move.w d0,4(a0) move.w d1,6(a0) cmp.l #Touchdown+4,a2 beq.s specvol move.w d2,8(a0) rts specvol: move.w #10,8(a0) rts QuietChan: move.l #Empty,(a0) move.w #2,4(a0) rts DE_code: ;111(a0)= encoded data, a1=decoded data ; resultat: d0 = 0 => checksum OK lea regg_blaha-111,a0 lea regg_txt-150,a1 lea 150(a1),a1 lea 111(a0),a0 move.w #'!@',d2 move.w (a0),d2 add.w #'!@',d2 swap d2 move.w (a0),d2 move.w d2,(a1) eor.w #'ÄZ',d2 move.w 2(a0),2(a1) lea 4(a0),a2 lea 4(a1),a3 moveq #18,d3 moveq #53,d7 .qw: move.l (a2)+,d0 rol.l d3,d0 eor.l d2,d0 sub.l #'*%å.',d0 move.l d0,(a3)+ dbf d7,.qw moveq #54,d7 moveq #0,d0 lea (a1),a3 sub.l #'G+QS',(a3) .al: add.l (a3)+,d0 dbf d7,.al tst.l d0 beq.s .ok clr.l 4 .ok: rts check_land: tst.w Dead1 bne.w checkposs2 move.l Anim1,d0 moveq #0,d1 move.w ypos1,d1 cmp.b #8,d0 beq.s Landposs1 cmp.b #7,d0 beq.s Landposs1 cmp.b #9,d0 beq.s Landposs1 sub.w #9,d1 bmi.w noland1 cmp.b #23,d0 beq.s Landposs1 cmp.b #24,d0 beq.s Landposs1 cmp.b #25,d0 beq.s Landposs1 bra.w noland1 Landposs1: moveq #0,d0 move.w xpos1,d0 move.l xspeed1,d2 move.l yspeed1,d3 bsr.w kolla_land tst.b d4 beq.w noland1 moveq #24,d0 cmp.w #15,anim1+2 bpl.w .a24 moveq #8,d0 move.l d3,yspeed1 clr.w ypos1+2 bra.s .a8 .a24: neg.l yspeed1 move.w #-1,ypos1+2 .a8: move.l d2,xspeed1 tst.w under1 beq.s .ok2 clr.l yspeed1 .ok2: move.l d0,anim1 tst.w exp1 bne.w notsound1 cmp.b #3,d4 bne.s .nehe3 move.l Energy_M,d0 cmp.l Energy1,d0 ble.s .nix move.w Energy_A,d0 add.w d0,EnergyP1 bvc.s .nix add.l #1,Energy1 .nix: cmp.w #7500,Fuel1 bge.s .nehe add.w #50,Fuel1 .nehe: cmp.w #MAXAMMO,Ammo1 bge.s .nehe2 add.w #50,Ammo1 .nehe2: cmp.w #MAXAMMO,Weap1 bge.s .nehe3 add.w #30,Weap1 .nehe3: tst.w landed1 bne.s notsound1 cmp.b #2,d4 beq.s bumpsound1 move.w #0,EnergyP1 cmp.w #15,anim1+2 bpl.s bp1 move.l #Touchdown,Kanal1 notsound1: move.w #1,landed1 bra.s checkposs2 bp1: move.l #ShotExpSnd,Kanal1 move.w #1,landed1 bra.s checkposs2 bumpsound1: move.l #ShotExpSnd,Kanal1 noland1: move.w #0,landed1 Checkposs2: tst.w Dead2 bne.s .ut move.l Anim2,d0 moveq #0,d1 move.w ypos2,d1 cmp.b #7,d0 beq.s Landposs2 cmp.b #8,d0 beq.s Landposs2 cmp.b #9,d0 beq.s Landposs2 sub.w #9,d1 bmi.w noland2 cmp.b #23,d0 beq.s Landposs2 cmp.b #24,d0 beq.s Landposs2 cmp.b #25,d0 beq.s Landposs2 bra.w noland2 .ut: rts Landposs2: moveq #0,d0 move.w xpos2,d0 move.l xspeed2,d2 move.l yspeed2,d3 bsr.w kolla_land tst.b d4 beq.w noland2 moveq #24,d0 cmp.w #15,anim2+2 bpl.w .a24 moveq #8,d0 move.l d3,yspeed2 clr.w ypos2+2 bra.s .a8 .a24: neg.l yspeed2 move.w #-1,ypos2+2 .a8: move.l d2,xspeed2 tst.w under2 beq.s .ok2 clr.l yspeed2 .ok2: move.l d0,anim2 tst.w exp2 bne.w notsound2 cmp.b #3,d4 bne.s .nehe3 move.l Energy_M,d0 cmp.l Energy2,d0 ble.s .nix move.w Energy_A,d0 add.w d0,EnergyP2 bvc.s .nix add.l #1,Energy2 .nix: cmp.w #7500,Fuel2 bge.s .nehe add.w #50,Fuel2 .nehe: cmp.w #MAXAMMO,Ammo2 bge.s .nehe2 add.w #50,Ammo2 .nehe2: cmp.w #MAXAMMO,Weap2 bge.s .nehe3 add.w #30,Weap2 .nehe3: tst.w landed2 bne.s notsound2 cmp.b #2,d4 beq.s bumpsound2 move.w #0,EnergyP2 cmp.w #15,anim2+2 bpl.s bp2 move.l #Touchdown,Kanal2 notsound2: move.w #1,landed2 rts bp2: move.l #ShotExpSnd,Kanal2 move.w #1,landed2 rts bumpsound2: move.l #ShotExpSnd,Kanal2 noland2: move.w #0,landed2 Outland: rts kolla_land: sub.l xlb-2,d0 add.l #13,d1 ror.l #4,d0 mulu #42,d1 add.w d0,d1 add.w d0,d1 lea pic,a0 add.l d1,a0 move.l (a0),d4 move.l LHojd42,d7 add.l d7,a0 move.l (a0),d5 add.l d7,a0 move.l (a0),d6 add.l d7,a0 move.l (a0),d7 or.l d4,d5 move.l d7,d4 or.l d5,d7 or.l d6,d7 and.l d6,d4 sub.w d0,d0 rol.l #4,d0 moveq #15,d1 sub.w d0,d1 lsr.l d1,d7 not.w d7 and.w #$07e0,d7 beq.s landat moveq #0,d4 rts landat: cmp.l #$00008000,d3 bmi.s zero_speed asr.l #1,d3 neg.l d3 asr.l #1,d2 moveq #2,d4 rts zero_speed: lsr.l d1,d5 and.w #$7e0,d5 bne.s .no_ban lsr.l d1,d4 not.w d4 and.w #$07e0,d4 bne.s .no_ban moveq #3,d4 moveq #0,d2 moveq #0,d3 rts .no_ban: moveq #1,d4 moveq #0,d2 moveq #0,d3 rts update_Mexp: tst.l WaterAdd beq.s .not23 sub.l #$2000,WaterAdd add.l #$2000,WaterLine .not23: lea MExp_Struct,a0 lea Mexp_buf,a5 lea $dff000,a6 bsr.s upd_m lea MExp_S2,a0 lea Mexp_buf2,a5 bra.w upd_m upd_m: tst.l 8(a0) bmi.b .out move.l #0,Kanal3 btst #0,11(a0) beq.w .prepmask move.l (a0),d0 move.l 4(a0),a1 move.l 8(a0),d1 asr.l #1,d1 mulu #162,d1 ;d1=offset move.l lhojd42,d7 lea MExp,a2 add.l d1,a2 ;ptr,bpl 1 move.l a5,a3 bsr.w .blit add.l #3564,a2 add.l d7,a1 bsr.w .blit add.l d7,a1 bsr.b .blit_bpl3 add.l d7,a1 add.l #3564,a2 bsr.b .blit add.l #1,8(a0) cmp.l #44,8(a0) bne.s .out move.l #-1,8(a0) .out: rts .blit_bpl3: move.l d0,-(sp) move.w #$0B0A,d0 .ok_blit: bsr.w bltwait move.w #0,$42(a6) move.w d0,$40(a6) move.l #-1,$44(a6) move.l a1,$48(a6) move.l a3,$50(a6) move.l a1,$54(a6) move.w #36,$60(a6) move.w #0,$64(a6) move.w #36,$66(a6) move.w #27*64+3,$58(a6) move.l (sp)+,d0 rts .blit: movem.l d0,-(sp) bsr.w bltwait move.w #0,$42(a6) or.w #$0FE2,d0 move.w d0,$40(a6) move.l #-1,$44(a6) move.l a1,$48(a6) move.l a3,$4c(a6) move.l a2,$50(a6) move.l a1,$54(a6) move.w #36,$60(a6) move.w #0,$62(a6) move.w #0,$64(a6) move.w #36,$66(a6) move.w #27*64+3,$58(a6) movem.l (sp)+,d0 rts .prepmask: tst.l 8(a0) bne.w .not bsr.w bltwait move.l #$01000000,$40(a6) move.l a5,$54(a6) move.w #0,$66(a6) move.w #27*64+3,$58(a6) lea pic,a1 move.l (a0),d0 ;xpos move.l 4(a0),d1 ;ypos cmp.w WaterLine,d1 bls.s .not2 sub.l #$58000,WaterLine add.l #$58000,WaterAdd .not2: mulu #42,d1 add.l d1,a1 subq.l #2,a1 move.l #-1,12(a0) cmp.w #15,d0 bhi.s .n1 move.w #0,12(a0) .n1: cmp.w #320,d0 bls.s .n2 move.w #0,14(a0) .n2: ror.l #4,d0 moveq #0,d1 move.w d0,d1 add.w d1,d1 add.l d1,a1 swap d0 ;d0=x000 shift right,a1=adr move.l d0,(a0) move.l a1,4(a0) move.l lhojd42,d7 add.l d7,a1 add.l d7,a1 add.l d7,a1 move.l #Blast,Kanal3 .not: bsr.w bltwait move.l 4(a0),a1 move.l lhojd42,d7 add.l d7,a1 add.l d7,a1 add.l d7,a1 lea mexp+10692,a2 move.l 8(a0),d1 asr.l #1,d1 mulu #162,d1 add.l d1,a2 move.l (a0),d0 or.w #$0fd0,d0 move.w d0,$40(a6) move.w #0,$42(a6) move.l #-1,$44(a6) move.l a1,$48(a6) move.l a5,$4c(a6) move.l a2,$50(a6) move.l a5,$54(a6) move.w #36,$60(a6) move.l #0,$62(a6) move.w #0,$66(a6) move.w #27*64+3,$58(a6) add.l #1,8(a0) bsr.w bltwait cmp.l #-1,12(a0) beq.s .ut moveq #26,d7 move.w 12(a0),d0 move.w 14(a0),d1 .ul: and.w d0,(a5)+ addq.l #2,a5 and.w d1,(a5)+ dbf d7,.ul .ut: rts update_exp: lea exps,a0 ;xpos,ypos... lea exps_b4,a2 ;exps bpl4 mem lea exps_mask,a3 ;mask för exp move.w nr_exps+2,d7 ;antal exps subq.w #1,d7 lea $dff000,a6 eloop: tst.w (a0) ;xpos=0 = inactive beq.w n_eloop lea pic,a4 moveq #0,d0 move.w (a0),d0 ;xpos move.w 2(a0),d1 ;ypos mulu #42,d1 ror.l #4,d0 add.w d0,d1 add.w d0,d1 swap d0 add.l d1,a4 move.l a4,a5 move.l Lhojd42,d6 add.l d6,a5 add.l d6,a5 add.l d6,a5 ;a5 pekar på bpl4 tst.w 4(a0) ;första steget? bne.s skip_b4 ;inte det? ;flytta bpl 4 till buffer bsr.w bltwait move.w #$0d0C,$40(a6) ;*utan* skift move.w d0,$42(a6) ;skift på B(mask) move.l #-1,$44(a6) move.l a3,$4c(a6) move.l a5,$50(a6) move.l a2,$54(a6) move.w #38,$64(a6) move.w #0,$66(a6) move.w #0,$62(a6) move.w #4*64+2,$58(a6) ;blt start,4 rader,2 words/rad skip_b4: addq.w #1,4(a0) cmp.w #8,4(a0) beq.s exp_away btst #0,5(a0) ;whops! <<<$dff00a/$dff00c,d0 ret: bit 0-4= 0:l,r,u,d,fire cmp.l #$dff00c,a0 beq.s .p2 btst #6,$bfe001 bne.s .n123 bset #4,d0 .n123: and.b d4,d0 cmp.w #2,key_b bne.s .np2 move.b key_move,d0 .np2: tst.w nullm bne.s .nej move.w j_delay,d2 lea remote,a4 or.b d0,2(a4,d2.w) ;remote+2 .nej: move.b remote,d0 bra.s .floc .p2: btst #7,$bfe001 bne.s .n456 bset #4,d0 .n456: and.b d4,d0 cmp.w #1,key_b bne.s .np1 move.b key_move,d0 .np1: move.w j_delay,d2 lea local,a4 or.b d0,2(a4,d2.w) ;local+2 move.b local,d0 .floc: tst.w mini_styr bne.s .zxc bclr #2,d0 btst #5,d0 beq.s .zxc bset #2,d0 .zxc: .cont: tst.w nullm bne.s .o tst.w pl2_td beq.s .o cmp.l #$dff00a,a0 bne.s .o moveq #0,d0 .o: moveq #0,d2 btst #0,d0 beq.s nright not.b d2 sub.w #1,d1 nright: btst #1,d0 beq.s nleft not.b d2 add.w #1,d1 nleft: tst.b d2 bne.s .move add.w d7,d1 bra.s .m2 .move: move.w #0,d7 .m2: and.w #$1f,d1 btst #2,d0 sne d2 ;upp btst #3,d0 sne d3 ;ner rts exit: tst.w nullm beq.s .npp tst.w master beq.s .npp move.w #$0800,$dff09c move.w #$1e2,$dff030 ;tala om för slaven att han e fri! jsr waste_f jsr waste_f move.w #$1e3,$dff030 ;tala om för slaven att han e fri! .npp: bsr bltwait move.w #$7fff,$dff09c move.w #$7fff,$dff096 move.l gfxbase,a6 move.l $26(a6),$dff080 move.w snixdma,$dff096 move.l 4.w,a6 jsr enable(a6) move.l gfxbase,a6 jsr disownblitter(a6) move.l wbview,a1 jsr LoadView(a6) ; Fix view move.w snixdma,$dff096 move.l d2mptr,d1 move.l dosbase,a6 jsr unloadseg(a6) move.l muptr,d1 jsr unloadseg(a6) move.l divtptr,a0 moveq #1,d7 lea divadrs,a1 jsr (a0) move.l dosbase,a6 moveq #0,d1 move.w l_paus,d1 mulu #10,d1 jsr delay(a6) move.l divptr,d1 jsr unloadseg(a6) bsr.w freeallminne move.l dosbase,a1 move.l 4,a6 jsr closelib(a6) move.l gfxbase,a1 jsr closelib(a6) ING_L: tst.l msgadr beq.s .s move.l 4,a6 jsr forbid(a6) move.l msgadr,a1 jsr replymsg(a6) .s: moveq #0,d0 rts ;EXIT dc.l 0 divadrs2: dc.l pic,0,0,0,magnet,shooter ; pack_k: dc.l 0 ; divadrs: ; logf_adr: dc.l 0 ; dc.l tider1,ply1name,0 ;dosbase ; dc.l 0 ;ban-id ; dc.l 0,0 ;anv av spec ; dc.l frac,frac_2 ; lf_len: dc.l 0 Gfxname: dc.b 'graphics.library',0 even ;autodoc to ClearBpl,Box & ZoomBox ; d0-xpos1 ; d1-ypos1 ; d2-xpos2 ; d3-ypos2 ; d4-bplwidth ; a0-bpl ;ClearBpl only: ; a1-from bpl,not recommended,0=disable zoombox: move.l d0,zb_xp1 move.l d2,zb_xp2 move.l d1,zb_yp1 move.l d3,zb_yp2 move.l d4,zb_w move.l a0,zb_bpl sub.l d0,d2 move.l d2,d0 sub.l d1,d3 move.l d3,d1 asl.l #3,d2 asl.l #3,d3 divu #20,d2 divu #20,d3 move.l d2,d5 move.l d3,d6 asr.l #1,d0 asr.l #1,d1 add.l d0,zb_xp1 add.l d1,zb_yp1 sub.l d0,zb_xp2 sub.l d1,zb_yp2 moveq #0,d7 tst.w zb_down bne.s zoomboxes moveq #18,d7 zoomboxes: move.l d5,d0 move.l d6,d1 move.w #20,d4 sub.w d7,d4 mulu d4,d0 mulu d4,d1 asr.l #4,d0 asr.l #4,d1 move.l d0,d2 move.l d1,d3 neg.l d0 neg.l d1 add.l zb_xp1,d0 add.l zb_xp2,d2 add.l zb_yp1,d1 add.l zb_yp2,d3 move.l zb_w,d4 move.l zb_bpl,a0 zbsync: cmp.b #$c0,$dff006 bne.s zbsync movem.l d0-d7/a0-a6,-(sp) lea pic,a0 jsr tom_bpl movem.l (sp)+,d0-d7/a0-a6 movem.l d5-d7,-(sp) move.l #0,a1 moveq #87,d7 bsr.s box movem.l (sp)+,d5-d7 tst.w zb_down bne.s .spec dbf d7,zoomboxes rts .spec: addq.l #1,d7 cmp.b #19,d7 bne.w zoomboxes rts box: movem.l d0-d4/a0/a1,-(sp) subq.w #4,d0 subq.w #4,d1 addq.w #4,d2 addq.w #4,d3 move.l d0,box_xpos1 move.l d2,box_xpos2 move.l d1,box_ypos1 move.l d3,box_ypos2 move.l d4,box_width move.l a0,box_bpl move.l #0,a1 cmp.b #87,d7 beq.s .nepp bsr.w clearbpl .nepp: movem.l (sp)+,d0-d4/a0/a1 cmp.l #0,a1 beq.s b_nobplin bsr.w clearbpl ;fyll på me bild b_nobplin: lea box_lines,a1 lea box_xpos1,a2 move.w #7,d7 boxlineloop: move.w #3,d6 lea box_result,a0 i_bval: moveq #0,d4 move.b (a1)+,d4 moveq #0,d0 move.b (a1)+,d0 asl.l #2,d4 ext.w d0 ext.l d0 add.l (a2,d4),d0 move.l d0,(a0)+ dbf d6,i_bval cmp.b #$80,(a1) bne.s box_noconnect add.l #5,a1 box_noconnect: sub.l #4,a1 move.l box_result,d0 move.l box_result+4,d1 move.l box_result+8,d2 move.l box_result+12,d3 move.l box_width,d6 move.l box_bpl,a0 movem.l d7/a1/a2,-(sp) bsr.w line movem.l (sp)+,d7/a1/a2 dbf d7,boxlineloop rts box_lines: dc.b 0,1,2,1,1,-1,2,1,1,-1,3,-1,0,1,3,-1,0,1,2,1,$80 dc.b 0,3,2,3,1,-3,2,3,1,-3,3,-3,0,3,3,-3,0,3,2,3 even rens2_mbpl: moveq #3,d7 lea pic,a0 moveq #0,d6 .loop: moveq #11,d0 moveq #11,d1 move.l #326,d2 move.l #244,d3 moveq #42,d4 move.l #0,a1 movem.l d6/d7/a0,-(sp) bsr.w clearbpl movem.l (sp)+,d6/d7/a0 add.l #10752,a0 dbf d7,.loop lea pic+10752*7,a0 moveq #0,d7 not.w d6 bne.s .loop bsr.w bltwait rts rens_mbpl: moveq #4,d7 moveq #0,d6 lea pic,a0 .loop: movem.l d6/d7/a0,-(sp) jsr tom_bpl movem.l (sp)+,d6/d7/a0 add.l #10752,a0 dbf d7,.loop lea pic+10752*7,a0 moveq #0,d7 not.w d6 bne.s .loop bsr.w bltwait rts clearbpl: sub.l d1,d3 mulu d4,d1 divu #16,d0 move.l d1,d5 add.w d0,d1 add.w d0,d1 add.l d1,a0 divu #16,d2 add.w d2,d5 add.w d2,d5 add.w #2,d5 sub.w d1,d5 moveq #0,d6 move.w d5,d6 asr.w #1,d5 and.l #$00ff,d5 asl.l #6,d3 add.l d3,d5 swap d0 and.l #$f,d0 move.l #$FFFF0000,d1 asr.l d0,d1 not.w d1 swap d1 swap d2 and.l #$f,d2 move.l #$FFFF0000,d0 asr.l d2,d0 move.w d0,d1 bsr.w bltwait move.w #$050C,$dff040 cmp.l #0,a1 beq.s cbpl_nofill move.w #$0DFC,$dff040 move.l a1,$dff050 cbpl_nofill: move.w #0,$dff042 move.l d1,$dff044 move.l a0,$dff04c move.l a0,$dff054 move.w #$FFFF,$dff074 move.w #0,$dff064 sub.l d6,d4 move.w d4,$dff062 move.w d4,$dff066 move.w d5,$dff058 rts ; Amazing Line-drawing-routine coded by Barf & Mad Lamer. ; Autodoc: d0,d1,d2,d3 - coords = X1,Y1,X2,Y2 ; d6 - width in bytes ; a0 - bitplane Line: moveq #0,d7 sub.w d0,d2 bpl.s l_xpos bset #2,d7 neg.w d2 l_xpos: sub.w d1,d3 bpl.s l_ypos bset #1,d7 neg.w d3 l_ypos: cmp.w d2,d3 bmi.s l_octantr exg d2,d3 bset #0,d7 l_octantr: mulu d6,d1 add.l d1,a0 ror.l #4,d0 add.w d0,d0 moveq #0,d5 move.w d0,d5 add.l d5,a0 swap d0 or.w #$bfa,d0 ;D = A or C ; $EA = B and (A or C) ; $4A = B and (A xor C) lea l_octdata,a1 add.l d7,a1 move.b (a1),d7 add.w d2,d2 move.w d2,d1 lsl.w #5,d1 add.w #$42,d1 ;Line length + 1 ??? l_wblit: btst #14,$dff002 bne.s l_wblit lsl.l #2,d3 move.w d3,$dff062 ;4Y sub.w d2,d3 ;4Y-2X (ie 2Y-X...) ext.l d3 ; ^ move.l d3,$dff050 ; | bpl.s l_nosign or.w #$40,d7 ; Sign-Ule l_nosign: sub.w d2,d3 move.w d3,$dff064 ;4Y-4X move.l a0,$dff048 ;bltcpt Adr move.l a0,$dff054 ;bltdpt Adr move.w d6,$dff060 ;bltcmod Width move.w d6,$dff066 ;bltdmod Width move.l #$ffffffff,$dff044 ;bltamask move.w #$8000,$dff074 ;bltadat $8000 move.w #$FFFF,$dff072 ;bltbdat Texture move.w d0,$dff040 ;Bltcon 0 & 1 A lot move.w d7,$dff042 move.w d1,$dff058 rts l_octdata: dc.b 17,1,25,5 ;4061 dc.b 21,9,29,13 ;5273 INITL: equ 10 in_t: dc.b '¹y',200,'¹n¹z¹f4',0 in_t_e: even ;autodoc: a0=dest,d0=ypos,a1=default,a2=helptxt,d1=color megainput: move.b d0,in_t+2 add.b #'0',d1 move.b d1,in_t+9 lea inp_buf+INITL,a3 moveq #-1,d6 .cl: addq.l #1,d6 move.b (a1)+,(a3)+ bne.s .cl move.l a0,-(sp) move.l d6,-(sp) move.l #$ff,d6 moveq #1,d7 bsr type move.l (sp)+,d6 bsr spec_i move.l (sp)+,a0 lea inp_buf+INITL,a1 .l2: move.b (a1)+,(a0)+ bne.s .l2 move.w #0,i_buf rts ;autodoc: bsr input.inp_buf innehåller result input: moveq #0,d6 spec_i: move.w #5,ULE_count jsr cjamb move.w curs_cl,curs_col move.w #0,inp_data+2 lea inp_buf,a6 lea in_t,a0 .qwe: move.b (a0)+,(a6)+ tst.b (a0) bne.s .qwe move.l a6,d0 add.l d6,a6 add.l #MAX_L,d0 move.l d0,ib_slut bra.s .tbax .kwl: bsr syncff btst #6,$bfe001 beq.w .fut btst #7,$bfe001 beq.w .fut move.w #1,i_buf bsr readkey tst.b d0 beq.s .kwl bmi.w .ut .tbax: moveq #0,d0 move.b in_t+2,d0 add.l #$30,d0 bsr syncxx moveq #3,d7 lea pic,a0 clr.l curs_data clr.l curs_data+4 .loop: moveq #20,d0 moveq #0,d1 move.b in_t+2,d1 sub.l #9,d1 move.l #316,d2 move.l d1,d3 add.l #18,d3 moveq #42,d4 move.l #0,a1 movem.l d7/a0,-(sp) bsr.w clearbpl movem.l (sp)+,d7/a0 add.l #10752,a0 dbf d7,.loop move.b #0,(a6) lea inp_buf,a2 moveq #0,d6 move.b in_t+2,d6 add.l #$58,d6 bclr #0,d6 moveq #1,d6 moveq #125,d7 move.l a6,-(a7) moveq #0,d0 moveq #0,d1 moveq #42,d2 moveq #8,d3 lea pic,a0 lea font,a1 lea txtwidth,a3 move.l #whilecode,a6 move.l #0,cursb move.w #1,in_type move.w #1,tt_nrchart bsr uletype move.l #$fc00fc00,curs_data move.l #$fc00fc00,curs_data+4 clr.w tt_nrchart move.l (a7)+,a6 move.b #0,(a6) bra.w .kwl .ut: tst.w ULE_count bne.w .tbax move.w #0,i_buf rts .fut: cmp.b #'¹',-3(a6) beq.w .kwl bra.s .ut readkey: moveq #0,d1 tst.w ULE_count beq.s .ns subq.w #1,ULE_count .ns: lea $bfec01,a1 btst #3,$100(a1) beq.w nopress moveq #0,d0 btst #0,(a1) bne.s tang_tryck bset #31,d0 tang_tryck: move.b (a1),d0 lsr.b #1,d0 not.b d0 bclr #7,d0 lea convert,a5 moveq #0,d1 move.b (a5,d0.w),d1 ;d1=char code,press=> d0.l+,release=> d0.l- move.l d0,rem_j4 tst.l d0 bmi.w sp_r bsr.w sp_p tst.w d0 bne.w in_key cmp.b #10,d1 beq.w ready cmp.b #27,d1 beq.w ready tst.w ULE_count beq.s .not_bs subq.w #1,ULE_count .not_bs: tst.b inp_data beq.s .n20 cmp.b #'0',d1 bmi.s .n19 cmp.b #'9'+1,d1 bpl.s .n19 sub.b #'0',d1 lea spec_s,a2 move.b (a2,d1),d1 .n19: lea w_spec,a3 lea spec_s2,a2 moveq #3,d7 .cl: cmp.b (a3,d7),d1 bne.s .n move.b (a2,d7),d1 .n: dbf d7,.cl .n20: tst.w inp_data beq.s .no_s cmp.b #'a',d1 bmi.s .no_s cmp.b #'}'+1,d1 bpl.s .no_s bclr #5,d1 .no_s: cmp.b #9,d1 ble.s in_key tst.w i_buf beq.s in_key cmp.b #126,d1 beq.s in_key cmp.b #127,d1 beq.s in_key move.b d1,d0 lsr.b #2,d0 cmp.b #7,d0 beq.s in_key move.b d1,(a6)+ move.l ib_slut,d1 cmp.l d1,a6 bne.s in_key subq.l #1,a6 bra.s in_nothin in_key: moveq #1,d0 bra.s not_up in_nothin:moveq #0,d0 not_up: or.b #$40,$200(a1) nop nop nop nop and.b #$bf,$200(a1) rts nopress: tst.w i_buf beq.s .q tst.b inp_data+2 beq.s .q sub.b #1,inp_data+3 bne.s .q move.b #REPEAT,inp_data+3 move.b #0,(a6) subq.l #1,a6 moveq #1,d0 cmp.b #'¹',-2(a6) bne.s .ut addq.l #1,a6 .q: moveq #0,d0 .ut: rts ready: cmp.b #'¹',-3(a6) beq.s in_nothin moveq #-1,d0 bra.s not_up sp_r: moveq #0,d2 bsr.s check_sp bra.s in_key sp_p: moveq #REPEAT,d2 check_sp: moveq #0,d0 cmp.b #5,d1 bne.s .ns move.b d2,inp_data moveq #1,d0 .ns: cmp.b #7,d1 bne.s .nc move.b d2,inp_data+1 moveq #1,d0 .nc: cmp.b #8,d1 bne.s .ut move.b d2,inp_data+3 move.b d2,inp_data+2 cmp.b #0,d2 bne.s .nehe tst.w i_buf beq.s .ut move.b #0,(a6) subq.l #1,a6 cmp.b #'¹',-2(a6) bne.s .nehe addq.l #1,a6 rts .nehe: moveq #1,d0 .ut: rts convert: incbin "dh1:x/HardKeyTable.Data" dc.b 5,5,7,0,2,2,3,3 spec_s: dc.b '=!"#$%@/()' w_spec: dc.b '<,.-' spec_s2: dc.b '>;:?' ;shift=chr$(5) , pil upp,vän,ner,hög=28,29,30,31 , HELP=126 ;caps lock = 7 , Alt=2,Amiga=3 ;autodoc to typetxt: ; d0-xpos ; d1-ypos ; d2-bplwidth ; d3-font height,8 ; d6-slowmo,sync at d6.w ($01=disable) ; d7-d7.w chars/frame in slowmo ; a0-bpl ; a1-font (font) ; a2-txt! ; a3-txtwidth (txtwidth) ; a6-bsr to this routine after ; each sync.if d6=$01 this is not ; needed. a6 = 0 = DISABLED! ; the routine MUST move regs->SP and back. unf_t: dc.l unf_txt unf_txt: dc.b 'Unfair¹p:¹p¹p¹p',0 tt_in_p: dc.l tt_in pre_type: dc.w 0 type: moveq #0,d0 moveq #0,d1 moveq #42,d2 moveq #8,d3 lea pic,a0 lea font,a1 lea txtwidth,a3 move.l #whilecode,a6 typetxt: move.l #0,cursb move.w #0,curs_col move.w #0,curs_cl uletype: move.l #0,tt_return move.l #1,tt_tc move.l d0,tt_xpos move.l d0,tt_1stx move.l d1,tt_ypos move.l d2,tt_width move.w d3,tt_height move.l a0,tt_dadr move.b #0,tt_in sub.w #1,d7 move.w d7,tt_cpf cmp.b #1,d6 ;1 char/frame? bne.w tt_sync ;yep. tt_nextchar: mulu d2,d1 divu #16,d0 add.w d0,d1 add.w d0,d1 add.l d1,a0 moveq #0,d1 move.b (a2)+,d1 ;char beq.w tt_exit cmp.b #10,d1 ;LF? beq.w tt_newrow cmp.b #' ',d1 bne.s .ns cmp.b #' ',(a2) beq.s .ns movem.l a0-a6/d1-d7,-(sp) move.b #' ',tt_ab bsr tt_hl move.l tt_xpos,d0 add.w d7,d0 cmp.w #317,d0 bmi.s .o moveq #0,d0 .o: movem.l (sp)+,a0-a6/d1-d7 tst.l d0 bne.s .ns bra.w tt_newrow .ns: cmp.b #'&',d1 bne.s .nu move.l a2,d0 lea unf_t,a2 bra tt_g1 .nu: lea charconv,a4 move.w #5,d5 .conloop: cmp.b (a4)+,d1 bne.s .ncon move.b (a4),d1 .ncon: addq.l #1,a4 dbf d5,.conloop cmp.b #185,d1 beq.w tt_specchar sub.b #32,d1 bmi.w tt_exit moveq #0,d4 move.b (a3,d1),d4 ;char width cmp.b #44,d1 ;är det ett L? bne.s tt_Lchar cmp.b #'T',(a2) bne.s tt_lchar sub.b #2,d4 tt_lchar: add.b #1,d4 move.l #$80000000,d5 asr.l d4,d5 ;char mask sub.w d5,d5 mulu d3,d1 ;char fontoffset->d1 asl.l #1,d1 lsr.l #4,d0 and.l #$f000,d0 or.w #$0DFC,d0 ;minterm,use abd tt_blit: tst.w tt_double beq.s .not movem.l d0,-(sp) moveq #0,d0 move.w tt_height,d0 subq.b #1,d0 mulu d2,d0 sub.l d0,a0 movem.l (sp)+,d0 .not: move.l d7,-(sp) move.l tt_tc,d7 btst #0,d7 beq.s .ej1 movem.l d0-d7/a0-a6,-(sp) bsr blit_it movem.l (sp)+,d0-d7/a0-a6 .ej1: add.l #10752,a0 btst #1,d7 beq.s .ej2 movem.l d0-d7/a0-a6,-(sp) bsr blit_it movem.l (sp)+,d0-d7/a0-a6 .ej2: add.l #10752,a0 btst #2,d7 beq.s .ej3 movem.l d0-d7/a0-a6,-(sp) bsr blit_it movem.l (sp)+,d0-d7/a0-a6 .ej3: add.l #10752,a0 movem.l d0-d7/a0-a6,-(sp) btst #3,d7 bne.s .lowl lea pic+99000,a4 move.l tt_ypos,d7 tst.b (a4,d7) beq.s .ej4 .lowl: bsr blit_it .ej4: movem.l (sp)+,d0-d7/a0-a6 tst.w pre_type bne.s .pt_fv .urk: move.l (sp)+,d7 bra.s tt_myb .pt_fv: add.l #10752*4,a0 bsr blit_it bra.s .urk blit_it: bsr.w bltwait move.w d0,$dff040 move.w #0,$dff042 move.l d5,$dff044 move.l a0,$dff04c add.l d1,a1 move.l a1,$dff050 sub.l d1,a1 move.l a0,$dff054 sub.w #4,d2 tst.w tt_double bne.w tt_xtray move.w d2,$dff062 move.w d2,$dff066 move.w #-2,$dff064 asl.w #6,d3 add.w #2,d3 move.w d3,$dff058 rts tt_myb: add.l d4,tt_xpos tt_restore: move.l tt_xpos,d0 move.l tt_ypos,d1 move.l tt_width,d2 move.w tt_height,d3 move.l tt_dadr,a0 cmp.b #1,d6 beq.w tt_nextchar dbf d7,tt_nextchar move.w tt_cpf,d7 cmp.l #0,a6 beq.b tt_sync jsr (a6) tt_sync: move.w d0,-(a7) move.w d6,d0 bsr syncxx move.w (a7)+,d0 bra.w tt_nextchar tt_newrow: add.l d3,tt_ypos add.l #1,tt_ypos tst.w tt_double beq.s .not add.l d3,tt_ypos add.l #1,tt_ypos .not: move.l tt_1stx,tt_xpos tst.b tt_in beq.s .ok move.l a2,d0 lea tt_in_p,a2 bra tt_g1 .ok: bra.w tt_restore tt_specchar: ;autodoc,spec chars: moveq #0,d0 ; dc.b '¹x',50 -> Xpos=50*2=100 move.b (a2)+,d0 ; dc.b '¹y',50 -> Ypos=50 cmp.b #'x',d0 ; dc.b '¹b',50,50 -> Xpos=50*2,ypos=50 beq.w tt_cx ; dc.b '¹c' -> curs off 20 min cmp.b #'y',d0 ; dc.b '¹C' -> curs on beq.w tt_cy ; dc.b '¹d' -> 1 row modulo cmp.b #'b',d0 ; dc.b '¹D' -> double height beq.w tt_cxy ; dc.b '¹n' -> normal height cmp.b #'c',d0 ; dc.b '¹f' -> color beq.w tt_coff ; dc.b '¹z' > center text cmp.b #'C',d0 ; dc.b '¹j'even,adr > cont at adr beq.w tt_con ; dc.b '¹g'even,adr > gosub adr cmp.b #'d',d0 ; '¹r',x/2,'txt' > txt end at x beq.w tt_mod1 ; '¹p' flytt curs en pix cmp.b #'D',d0 ; '¹i |' indrag ett space beq.w tt_dy cmp.b #'n',d0 beq.w tt_norm cmp.b #'f',d0 beq.w tt_tcol cmp.b #'z',d0 beq.w tt_cent cmp.b #'j',d0 beq.w tt_jmp cmp.b #'g',d0 beq.w tt_gosub cmp.b #'r',d0 beq tt_r cmp.b #'p',d0 beq tt_pix cmp.b #'i',d0 beq tt_ind bra.w tt_restore tt_ind: lea tt_in,a0 .n: cmp.b #'|',(a2)+ beq.s .s move.b -1(a2),(a0)+ bra.s .n .s: move.b #0,(a0) bra.w tt_restore tt_cx: move.b (a2)+,d0 asl.w #1,d0 move.l d0,tt_xpos move.l d0,tt_1stx bra.w tt_restore tt_cy: move.b (a2)+,d0 move.l d0,tt_ypos bra.w tt_restore tt_cxy: move.b (a2)+,d0 asl.w #1,d0 move.l d0,tt_xpos move.l d0,tt_1stx moveq #0,d0 move.b (a2)+,d0 move.l d0,tt_ypos bra.w tt_Restore tt_coff: move.l #0,cursb move.w #0,curs_col bra.w tt_mc tt_con: tst.w in_type bne.s .q tst.w fast bne.s .q .o: move.l #$fc00fc00,curs_data move.l #$fc00fc00,curs_data+4 .q: move.l #10,cursb move.w curs_cl,curs_col tt_mc: tst.w in_type ;från "input"? bne tt_restore ;ja cmp.l #0,a6 beq .gronk jsr (a6) bra tt_restore .gronk: jsr whilecode bra tt_restore tt_norm: move.w #0,tt_double bra.w tt_restore tt_dy: move.w #$101,tt_double bra.w tt_restore tt_mod1: move.w #1,tt_double bra.w tt_restore tt_pix: add.l #1,tt_xpos bra.w tt_con tt_tcol: moveq #0,d0 move.b (a2)+,d0 sub.b #'0',d0 cmp.b #9,d0 bls.s .na subq.b #7,d0 .na: move.b d0,tt_tc+3 asl.l #1,d0 lea mcols,a4 move.w (a4,d0),curs_cl move.w (a4,d0),curs_col bra.w tt_con tt_r: moveq #0,d0 move.b (a2)+,d0 asl.w #1,d0 movem.l a2/d7/d0,-(sp) bsr tt_hl move.l d7,d6 movem.l (sp)+,a2/d7/d0 sub.l d6,d0 bra.s tt_sx tt_cent: movem.l a2/d7,-(sp) bsr tt_hl move.l d7,d6 movem.l (sp)+,a2/d7 move.l #336,d0 sub.l d6,d0 lsr.l #1,d0 tt_sx: move.l d0,tt_xpos move.l d0,tt_1stx bra tt_restore tt_hl: moveq #0,d7 cmp.b #'¹',(a2) bne.s .cl cmp.b #'f',1(a2) bne.s .cl addq.l #3,a2 .cl: move.b (a2)+,d1 ;char beq.w .e cmp.b #10,d1 ;LF? beq.w .e lea charconv,a4 move.w #5,d5 .conl: cmp.b (a4)+,d1 bne.s .ncon move.b (a4),d1 .ncon: addq.l #1,a4 dbf d5,.conl cmp.b #'&',d1 bne.s .nu moveq #37,d4 bra.s .q .nu: cmp.b #185,d1 beq.w .e cmp.b tt_ab,d1 beq.s .e sub.b #32,d1 bmi.w .e moveq #0,d4 move.b (a3,d1),d4 cmp.b #44,d1 bne.s .q cmp.b #'T',(a2) bne.s .q sub.b #2,d4 .q: add.l d4,d7 addq.l #1,d7 bra.s .cl .e: move.b #0,tt_ab rts tt_jmp: addq.l #1,a2 move.l a2,d0 and.l #-2,d0 move.l d0,a2 move.l (a2),a2 bra tt_restore tt_gosub: addq.l #1,a2 move.l a2,d0 and.l #-2,d0 move.l d0,a2 addq.l #4,d0 tt_g1: lea tt_return,a0 .l: tst.l (a0)+ bne.s .l move.l d0,-4(a0) move.l (a2),a2 bra tt_restore tt_exit: tst.l tt_return beq.s .q lea tt_return+12,a2 .l: tst.l -(a2) beq.s .l move.l (a2),d0 move.l #0,(a2) move.l d0,a2 moveq #0,d0 bra tt_restore .q: cmp.l #0,a6 beq.s tt_e2 jsr (a6) tt_e2: move.w #0,in_type rts tt_xtray: add.l tt_width,d2 move.w d2,$dff062 move.w d2,$dff066 move.w #-2,$dff064 asl.w #6,d3 add.w #2,d3 move.w d3,$dff058 tst.b tt_double bne.w .no_h rts .no_h: add.l tt_width,a0 bsr.w bltwait move.w d0,$dff040 move.w #0,$dff042 move.l d5,$dff044 move.l a0,$dff04c add.l d1,a1 move.l a1,$dff050 sub.l d1,a1 move.l a0,$dff054 move.w d2,$dff062 move.w d2,$dff066 move.w #-2,$dff064 move.w d3,$dff058 rts tt_tc: dc.l 1 charconv: dc.b 'å{ä|ö}Å[Ä\Ö]' whilecode: tst.w fast beq.s .n move.w #199,tt_cpf .n: btst #6,$bfe001 bne.s wc_e move.w #199,tt_cpf wc_e: btst #7,$bfe001 bne.s wc_e2 move.w #199,tt_cpf wc_e2: movem.l d0-d7/a0-a6,-(sp) tst.w tt_nrchart bne.s .qwe jsr kolla_tang tst.b d1 beq.s .qwe move.w #199,tt_cpf .qwe: move.l tt_xpos,d1 move.l tt_ypos,d0 add.w #$22,d0 add.w xlb,d1 swap d1 swap d0 lea cur_dbl,a0 moveq #0,d2 movem.l d0/a0,-(sp) bsr.w place_sprite movem.l (sp)+,d0/a0 swap d0 and.l #$FFFF,d0 cmp.l #240,d0 bmi.s .no1 bset #1,3(a0) .no1: cmp.l #256,d0 bmi.s .no2 bset #2,3(a0) .no2: lea cursor,a1 move.l (a0),(a1) lea curs_data,a0 moveq #0,d0 tst.w curs_col beq.s .tom cmp.w #199,tt_cpf beq.s .tom .g: move.l #$fc00fc00,d0 .tom: move.l d0,(a0)+ move.l d0,(a0) .ut: movem.l (sp)+,d0-d7/a0-a6 rts curs_blink: addq.b #1,slumpv+3 sub.l #1,cursb bne.s cb_ut move.l #CBL,cursb eor.l #$fc00fc00,curs_data eor.l #$fc00fc00,curs_data+4 cb_ut: rts ; MULE - Multiply Extended longwords! ;AutoDoc: d0 - Mul1 -16 bit heltal,16 bit decimaler $HHHHDDDD ; d1 - Mul2 - samma sak förstås... ; bsr MULE ; d2 innehåller resultat,samma format ; >Varning!< ICKE-NON-ANTI-SNÄLL rutin! Dvs,använder register! Mule: moveq #0,d6 moveq #1,d7 tst.l d0 bpl.s MUL1_pos neg.l d0 neg.b d7 ;d7=-1 - neg. resultat MUL1_pos: tst.l d1 bpl.s MUL2_pos neg.l d1 neg.b d7 MUL2_pos: moveq #0,d2 moveq #0,d3 move.w d0,d2 move.w d1,d3 swap d0 swap d1 ;Nu: d0,d1 - 16 bit H,d2,d3 - 16 bit D move.l d0,d5 ;d5 = mellanreg mulu d1,d0 move.w d0,d6 ;d6-resultatreg H1 * H2 move.l d5,d0 swap d6 mulu d3,d0 add.l d0,d6 ; H1 * D2 move.l d2,d5 mulu d1,d2 ; D1 * H2 add.l d2,d6 move.l d5,d2 mulu d3,d2 sub.w d2,d2 swap d2 ; D1 * D2 add.l d6,d2 tst.b d7 bpl.s ex_mule neg.l d2 ex_mule: rts ;- - - - - - - place_sprite2_p1: cmp.w #3,o_scr_bak beq.s not_vis_p1 moveq #0,d0 move.w ypos1,d0 move.l scr2off,d1 sub.l d1,d0 cmp.w #-15,d0 blt.s not_vis_p1 cmp.w #107,d0 bge.s not_vis_p1 add.w #$94,d0 and.l #$FF,d0 rol.w #8,d0 move.w xpos1,d1 ror.w #1,d1 move.b d1,d0 move.l d0,d3 move.l d1,d4 move.l #Sprite1,a0 bsr.w ps_in move.l d3,d0 move.l d4,d1 move.l #Sprite4+64+4,a0 bsr.w ps_in move.l Anim1,d0 lea sprite1,a0 bsr.w show_sprite move.l Anim1,d0 lea sprite4+4+64,a0 bsr.w show_sprite rts not_vis_p1: clr.l Sprite1 clr.l Sprite4+4+64 rts place_sprite2_p2: moveq #0,d0 move.w ypos2,d0 move.l scr1off,d1 sub.l d1,d0 move.l #Sprite3,a0 tst.w one_screen beq.s .qwe move.l #Sprite2,a0 clr.l sprite4+4+64 clr.l sprite5+4+64 clr.l sprite2 clr.l sprite5 cmp.w #-15,d0 blt.w not_vis_p2 cmp.w #219,d0 bge.s not_vis_p2 bra.s .snix .qwe: cmp.w #-15,d0 blt.w not_vis_p2 cmp.w #107,d0 bge.s not_vis_p2 .snix: add.w #$24,d0 and.l #$FF,d0 rol.w #8,d0 move.w xpos2,d1 ror.w #1,d1 move.b d1,d0 move.l d0,d3 move.l d1,d4 bsr.w ps_in move.l d3,d0 move.l d4,d1 move.l #Sprite5,a0 bsr.w ps_in move.l Anim2,d0 lea sprite3,a0 tst.w one_screen beq.s .nepp lea sprite2,a0 .nepp: bsr.w show_sprite move.l Anim2,d0 lea sprite5,a0 bsr.w show_sprite rts not_vis_p2: clr.l Sprite3 move.l #$2c703c01,sprite5 lea sprite5,a0 bsr.w tom_sprite rts m_initbpl: move.l #pic,d0 lea mbplptr,a0 moveq #5,d7 .loop: move.w d0,6(a0) swap d0 move.w d0,2(a0) swap d0 add.l #10752,d0 addq.l #8,a0 dbf d7,.loop sub.l #10752,d0 move.l d0,logo_adr lea mcol_tab,a0 lea mcols,a1 moveq #15,d7 move.w #$180,d0 .l2: move.w d0,(a0)+ move.w (a1)+,(a0)+ add.w #2,d0 dbf d7,.l2 move.l #Empty,d0 move.l d0,d1 swap d1 lea mSpr0ptr,a0 move.w #7,d7 SprInit:move.w d1,2(a0) move.w d0,6(a0) add.l #8,a0 dbf d7,SprInit move.l #Pil,d0 move.w d0,mSpr0ptr+6 swap d0 move.w d0,mSpr0ptr+2 move.l #Empty,d0 move.w d0,mSpr0ptr+14 swap d0 move.w d0,mSpr0ptr+10 move.l #Cursor,d0 move.w d0,mSpr2ptr+6 swap d0 move.w d0,mSpr2ptr+2 move.l #MatSprite,d0 move.w d0,mSpr4ptr+6 swap d0 move.w d0,mSpr4ptr+2 rts init_bpl: move.l #Panel,d0 moveq #3,d7 lea pbplps+2,a0 .lop: swap d0 move.w d0,(a0) swap d0 move.w d0,4(a0) add.l #8,a0 add.l #42,d0 dbf d7,.lop lea panel+8402,a0 lea pcols,a1 moveq #14,d7 move.w #$182,d0 .llop: move.w d0,(a1)+ move.w (a0)+,(a1)+ add.w #2,d0 dbf d7,.llop move.l BanaAdr,a0 sub.l #headline,a0 move.l 126(a0),d0 addq.l #3,d0 move.l d0,lhojd mulu #42,d0 move.l d0,lhojd42 move.l 110(a0),waterline move.l 114(a0),watermax move.l 118(a0),waterspeed move.w 94(a0),XStart1 move.l 98(a0),YStart1 move.l 102(a0),XStart2 move.l 106(a0),YStart2 move.w 96(a0),d0 sub.w #1,d0 bpl.s .okspy moveq #0,d0 .okspy: mulu #16*2*4,d0 add.w #54+5*2*4,d0 move.w d0,CannonAdd lea Cannon_struct,a1 moveq #8*3-1,d7 .ll: move.l #0,(a1)+ dbf d7,.ll move.w 96(a0),d0 beq.s .tjo move.w d0,d1 move.w d0,d6 add.b #9,d1 subq.b #1,d0 moveq #0,d2 moveq #0,d3 move.l BanaAdr,a0 lea Cannon_Struct,a1 .ch: moveq #0,d4 move.b (a0),d4 cmp.w d0,d4 ;.b bls.s .nxt cmp.w d1,d4 ;.b bhi.s .nxt move.w d2,(a1)+ move.w d3,(a1)+ sub.w d6,d4 divu #3,d4 add.w #1,d4 cmp.w #3,d4 bne.s .ib move.w #$101,(a1)+ bra.s .nib .ib: move.w d4,(a1)+ .nib: swap d4 moveq #6,d5 sub.w d4,d5 move.w d5,(a1)+ move.w #4*128,(a1)+ move.w d3,d4 mulu #16*42,d4 move.w d4,(a1)+ .nxt: addq.l #1,a0 addq.w #1,d2 cmp.w #20,d2 bls.s .ch addq.w #1,d3 moveq #0,d2 cmp.w #62,d3 bls.s .ch .tjo: ;Utskrivningsrutin av banan: lea podstruct,a5 move.l a5,a4 moveq #-1,d0 moveq #49,d7 .rpl: move.w d0,(a4)+ dbf d7,.rpl move.l divtptr,a0 lea divadrs2,a1 move.l lhojd42,12(a1) moveq #6,d7 jsr (a0) lea Col_Tab+2,a0 ;norm col-tab lea Col_Tab2+2,a2 lea divadrs2-4,a5 tst.l (a5) beq.s .ut move.l (a5),a1 addq.l #8,a1 ;'CMAP',size moveq #15,d7 .cfl: moveq #0,d0 move.b (a1)+,d0 lsl.w #4,d0 move.b (a1)+,d0 move.b (a1)+,d1 lsr.w #4,d1 and.b #$f,d1 and.b #$f0,d0 or.b d1,d0 move.w d0,(a0) move.w d0,(a2) add.l #4,a0 add.l #4,a2 dbf d7,.cfl move.l (a5),a1 moveq #0,d0 move.w 4(a1),d0 jmp fixa_f .ut: move.l LevelTypeAdr,a1 move.l L_Types,d0 add.l #1,d0 mulu #128,d0 add.l d0,a1 moveq #15,d0 InitCol: move.w (a1),(a0) move.w (a1)+,(a2) add.l #4,a0 add.l #4,a2 dbf d0,InitCol rts init_spr: move.l #Sprite0,d0 move.w d0,Spr0ptr+6 swap d0 move.w d0,Spr0ptr+2 move.l #Sprite1,d0 move.w d0,Spr1ptr+6 swap d0 move.w d0,Spr1ptr+2 move.l #Sprite2,d0 move.w d0,Spr2ptr+6 swap d0 move.w d0,Spr2ptr+2 move.l #Sprite3,d0 move.w d0,Spr3ptr+6 swap d0 move.w d0,Spr3ptr+2 move.l #Sprite4,d0 move.w d0,Spr4ptr+6 swap d0 move.w d0,Spr4ptr+2 move.l #Sprite5,d0 move.w d0,Spr5ptr+6 swap d0 move.w d0,Spr5ptr+2 move.l #Empty,d0 tst.w one_screen beq.s .gurg ; move.w d0,Spr2ptr+6 move.w d0,Spr1ptr+6 move.w d0,Spr3ptr+6 ; move.w d0,Spr5ptr+6 .gurg: move.w d0,Spr6ptr+6 move.w d0,Spr7ptr+6 swap d0 move.w d0,Spr6ptr+2 move.w d0,Spr7ptr+2 tst.w one_screen beq.s .gurg2 ; move.w d0,Spr2ptr+2 move.w d0,Spr1ptr+2 move.w d0,Spr3ptr+2 ; move.w d0,Spr5ptr+2 .gurg2: lea Sprite_GFX,a0 lea Sprite_Mask,a1 move.w #543,d7 mloop: move.w (a0)+,d0 move.w (a0)+,d1 or.w d0,d1 move.w d1,(a1)+ move.w #0,(a1)+ dbf d7,mloop rts ;autodoc: d0 - YPOS , a0 - bplptrs place_screen: sub.w d0,d0 swap d0 ; and.l #$FFFF,d0 sub.w #47,d0 bpl.s up_ok move.w #0,d0 up_ok: move.l LHojd,d6 sub.l #109,d6 tst.w one_screen beq.s .asd sub.l #114,d6 .asd: cmp.w d6,d0 bmi.s down_ok move.w d6,d0 down_ok: move.l d0,d1 mulu #42,d1 add.l #pic,d1 move.w d1,06(a0) swap d1 move.w d1,02(a0) swap d1 move.l Lhojd42,d6 add.l d6,d1 move.w d1,14(a0) swap d1 move.w d1,10(a0) swap d1 add.l d6,d1 move.w d1,22(a0) swap d1 move.w d1,18(a0) swap d1 add.l d6,d1 move.w d1,30(a0) swap d1 move.w d1,26(a0) swap d1 rts place_sprite: swap d0 and.l #$FFF,d0 sub.w d2,d0 swap d1 and.l #$FFFF,d1 rol.w #8,d0 ror.w #1,d1 move.b d1,d0 ; d0=SPRxPOS $YYXX ps_in: move.w d0,d2 and.w #$FF00,d2 ;d2 = SPRxCTL $YY-- tst.l port_adr beq.s .n cmp.l #sprite0,a0 beq.s .o cmp.l #sprite2,a0 bne.s .n .o: cmp.w #$d900,d2 bls.s .nixus bset #1,d2 .nixus: add.w #$1900,d2 .n: add.w #$1000,d2 btst #15,d1 beq.s ulebitnoll bset #0,d2 ;finetune xpos,sprites ulebitnoll: swap d0 move.w d2,d0 move.l d0,(a0)+ rts show_sprite: lea sprite_GFX,a1 cmp.l #sprite2,a0 beq.w ss_2 cmp.l #sprite0,a0 beq.s ss_1 cmp.l #sprite4,a0 beq.s ss_14 cmp.l #sprite4+4+64,a0 beq.s ss_14 cmp.l #sprite5,a0 beq.s ss_25 cmp.l #sprite5+4+64,a0 beq.s ss_25 cmp.l #sprite3,a0 beq.s s_s_2 tst.w Inv1 beq.s shows bra.w tom_sprite s_s_2: tst.w Inv2 beq.s shows bra.s tom_sprite ; detta var en gång rad 9999 :) ss_14: tst.w PGas1 beq.s tom_sprite move.l #Thrust_GFX,a1 ss_1: tst.w Exp1 bne.s tom_sprite bra.s shows ss_25: tst.w PGas2 beq.s tom_sprite move.l #Thrust_GFX,a1 ss_2: tst.w Exp2 bne.s tom_sprite shows: addq.l #4,a0 mulu #68,d0 add.l d0,a1 move.w #14,d7 floop: move.l (a1)+,(a0)+ dbf d7,floop rts tom_sprite: addq.l #4,a0 move.w #14,d7 moveq #0,d0 .floop: move.l d0,(a0)+ dbf d7,.floop rts bltwait: btst #6,$dff002 bne.s bltwait rts ch_mus: moveq #0,d0 move.w $dff00a,d0 and.w #$303,d0 move.l d0,joydir rts check_2joys: lea joydir,a0 move.w $dff00a,d0 move.w $dff00c,d1 tst.w pl2_md beq.s .w move.w d1,d0 .w: or.w d0,d1 btst #1,d1 sne d7 btst #9,d1 sne d6 cmp.b d6,d7 bne.s .ok move.b #0,d6 move.b #0,d7 .ok: move.b d7,(a0)+ ;r move.b d6,(a0)+ ;l move.w $dff00a,d0 move.w $dff00c,d1 tst.w pl2_md beq.s .e move.w d1,d0 .e: btst #9,d0 beq.s .1 bchg #8,d0 .1: btst #9,d1 beq.s .2 bchg #8,d1 .2: btst #1,d0 beq.s .3 bchg #0,d0 .3: btst #1,d1 beq.s .4 bchg #0,d1 .4: btst #0,d0 sne d7 btst #0,d1 sne d6 or.b d6,d7 btst #8,d0 sne d6 btst #8,d1 sne d5 or.b d5,d6 cmp.b d6,d7 bne.s .5 move.w #0,d6 move.w #0,d7 .5: move.b d6,(a0)+ ;u move.b d7,(a0) ;d rts check_coll: moveq #0,d6 swap d0 and.l #$FFF,d0 ;d0=xpos sub.w xlb,d0 bpl.s .g moveq #0,d0 .g: ror.l #4,d0 move.w d0,d6 add.w d0,d6 swap d1 and.l #$FFF,d1 ;d1=ypos mulu #42,d1 add.l d1,d6 lea pic,a0 add.l d6,a0 ;d6 = bploffset swap d0 mulu #68,d2 ;find mask for animstep lea Sprite_Mask,a1 add.l d2,a1 bsr.w bltwait move.l Lhojd42,d2 lea $dff000,a6 move.w #0,$42(a6) ;BltCon 1 or.w #$0EE0,d0 ;BltCon0 (minterm,$e0 = A and (B or C) ) move.w d0,$40(a6) move.l #-1,$44(a6) move.l a0,$4c(a6) ;B move.l a1,$50(a6) ;mask add.l d2,a0 ;nästa bpl move.l a0,$48(a6) ;C move.w #38,$62(a6) ;B mod move.w #0,$64(a6) ;A mod move.w #38,$60(a6) ;C mod move.w #15*64+2,$58(a6) bsr.w bltwait moveq #0,d1 btst #13,$02(a6) bne.s no_coll moveq #1,d1 no_coll: add.l d2,a0 ;nästa bpl move.l a0,$4c(a6) ;B move.l a1,$50(a6) ;A add.l d2,a0 ;sista bpl move.l a0,$48(a6) ;C move.w #38,$62(a6) ;B move.w #0,$64(a6) ;A move.w #38,$60(a6) ;C move.w #15*64+2,$58(a6) bsr.w bltwait btst #13,$02(a6) bne.s no_collplf2 moveq #1,d1 no_collplf2: and.w #$fcc0,d0 move.w d0,$40(a6) move.l a0,$4c(a6) ;B move.l a1,$50(a6) ;A move.w #38,$62(a6) ;B move.w #0,$64(a6) ;A move.w #15*64+2,$58(a6) bsr.w bltwait btst #13,$02(a6) bne.s .nostop move.l (a5),d7 asr.l #1,d7 move.l d7,(a5) move.l 4(a5),d7 asr.l #1,d7 move.l d7,4(a5) .nostop: tst.b d1 beq.b OUT_NO_COLL ;PLÖJ-Rutin! lea pic,a0 add.l d6,a0 ;d6 = bploffset move.l a0,a2 add.l d2,a2 add.l d2,a2 add.l d2,a2 moveq #2,d7 and.w #$f000,d0 or.w #$0f8C,d0 pl_bpl: bsr.w bltwait move.w #0,$42(a6) ;BltCon 1 move.w d0,$40(a6) move.l #-1,$44(a6) move.l a0,$4c(a6) ;B move.l a1,$50(a6) ;A move.l a2,$48(a6) ;C move.l a0,$54(a6) ;D move.w #38,$62(a6) ;B move.w #0,$64(a6) ;A move.w #38,$60(a6) ;c move.w #38,$66(a6) ;D move.w #15*64+2,$58(a6) add.l d2,a0 ;nästa bpl dbf d7,pl_bpl OUT_NO_COLL: rts laddabana: move.l 12(a0),banname move.l 16(a0),levname levelload: tst.w init_ladd bne.s .il1 move.l banaadr,d0 sub.l #headline,d0 bsr.w freeminne move.l real_leveltypeadr,d0 bsr.w freeminne move.l 4,a6 move.w #$8010,$dff096 move.w #$7fff,$dff09c jsr enable(a6) move.l gfxbase,a6 jsr disownblitter(a6) .il1: move.l levname,a0 cmp.b #'Z',(a0) beq.s .nixpix lea typpath+8,a1 .l2: move.b (a0)+,(a1)+ bne.s .l2 lea typpath,a0 bsr loadfile tst.l d0 beq.w .error2 move.l d0,real_leveltypeadr add.l #54,d0 move.l d0,leveltypeadr sub.l #54,d1 sub.l #42,d1 asr.l #7,d1 move.l d1,l_types bra.s .np2 .nixpix: clr.l real_leveltypeadr clr.l l_types .np2: move.l banname,a0 lea banpath+11,a1 .l: move.b (a0)+,(a1)+ bne.s .l lea banpath,a0 bsr.w loadfile tst.l d0 beq.w .error move.l d0,tbanaadr add.l #headline,d0 move.l d0,banaadr lea divadrs2,a1 move.l banaadr,4(a1) move.l leveltypeadr,8(a1) move.l divtptr,a0 lea divadrs,a1 move.l tbanaadr,a2 move.w 92(a2),18(a1) move.w 92(a2),cur_ID move.l #0,20(a1) move.l #0,24(a1) move.l banname,a3 lea tmeny,a4 move.w 34(a2),d0 moveq #5,d7 jsr (a0) move.l a0,lvlinfo move.l dosbase,a6 moveq #0,d1 move.w l_paus,d1 tst.w init_ladd beq.s .nil moveq #25,d1 .nil: mulu #9,d1 jsr delay(a6) .ut: tst.w init_ladd bne.s .il2 move.l gfxbase,a6 jsr ownblitter(a6) move.l 4,a6 jsr disable(a6) move.w #$83e0,$dff096 jsr tysta_datorn move.w #$ff,$dff09e .il2: rts .error: move.w #$f00,$dff180 bra.s .error .error2: bra.s .ut move.w #$ff0,$dff180 bra.s .error2 sready: dc.w 0 arctan: incbin "dh1:gfx/GF2/arctan.dat" even smart_atn: tst.w d0 bne.s atn moveq #0,d0 tst.w d1 bmi.s .16 moveq #32,d0 .16: rts atn: ;autodoc: d0.l=a,d1.l=b result: d0=atan(a/b) moveq #0,d3 tst.w d0 bpl.s .apos neg.l d0 not.b d3 .apos: tst.w d1 bpl.s .bpos neg.l d1 not.b d3 beq.s .48 bra.s .00 .bpos: tst.b d3 beq.s .16 .32: moveq #32,d6 bra.s .cont .48: moveq #48,d6 bra.s .cont .16: moveq #16,d6 bra.s .cont .00: moveq #0,d6 .cont: cmp.w d0,d1 beq.s .atn8 bpl.s .norm exg d0,d1 not.b d3 .norm: swap d0 tst.w d1 beq.s .noll divu d1,d0 moveq #10,d1 lsr.w d1,d0 ; lea arctan,a5 move.b (a5,d0.w),d5 .ok: tst.b d3 bne.s .ready moveq #15,d3 sub.b d5,d3 add.w d3,d6 move.l d6,d0 rts .ready: add.b d5,d6 move.l d6,d0 rts .atn8: move.l d6,d0 addq.l #8,d0 rts .noll: moveq #0,d5 bra.s .ok seek_pek: dc.l skott ; dc.l $XXXXDDDD,$YYYYDDDD,$AAAADDDD,$AAAADDDD,$TTTT.w,DATA.w,grav.l ut_ss: move.l a0,seek_pek rts seek_shots: move.l seek_pek,a0 moveq #-1,d4 lea ul2,a4 tst.w nullm beq.s .alla rts ; moveq #20,d4 ; lea ul,a4 .alla: move.w xlb,d2 moveq #0,d7 move.l d7,a6 lea arctan,a5 lea spedtab,a3 ul: sub.w #1,d4 bne.s ul3 bra.s ut_ss ul2: btst #0,$dff005 bne.s ut_ss ul3: cmp.l a0,a6 beq.s ut_ss move.w (a0),d3 beq.w next bmi.w res_l move.w 18(a0),d5 btst #8,d5 beq.s .n1 move.w xpos1,d0 move.w ypos1,d1 tst.w exp1 bne.s next bra.s .tjo .n1: btst #9,d5 beq.s next move.w xpos2,d0 move.w ypos2,d1 tst.w exp2 bne.s next .tjo: move.b d5,d7 addq.w #7,d0 addq.w #7,d1 sub.w d2,d0 sub.w d3,d0 sub.w 4(a0),d1 ext.l d0 ext.l d1 bsr.w atn add.b #17,d0 and.w #62,d0 lsl.w #2,d0 move.l (a3,d0.w),d1 move.l 4(a3,d0.w),d0 moveq #1,d5 btst #10,18(a0) beq.s .p19 moveq #2,d5 .p19: asl.l d5,d1 asl.l d5,d0 move.l 8(a0),d5 move.l 12(a0),d6 sub.l d5,d1 sub.l d6,d0 asl.l d7,d5 asl.l d7,d6 add.l d5,d1 add.l d6,d0 asr.l d7,d1 asr.l d7,d0 move.l d1,8(a0) move.l d0,12(a0) next: add.l #24,a0 jmp (a4) res_l: lea skott,a0 move.l seek_pek,a6 jmp (a4) move_shots: moveq #24,d4 lea tab42,a3 lea skott+24,a0 lea pic,a4 move.l LHojd42,d6 move.l lhojd,d7 moveq #0,d5 move.w #0,sready move.l #skott,seekbeg bra.s sloop rens_it2: btst d5,(a5) beq.w no_e_avail bclr d5,(a5) bra.w no_e_avail nqout: btst #15,16(a0) ;new shot on the block? beq.s rens_it2 bclr #15,16(a0) bra.w no_e_avail sloop: ;tst.w (a0) move.w (a0),d5 beq.W not_a ;not active bmi.W s_out ;out of shots moveq #0,d1 move.w 4(a0),d1 add.w d1,d1 move.w (a3,d1.w),d1 ; mulu #42,d1 ror.l #3,d5 add.w d5,d1 sub.w d5,d5 rol.l #3,d5 not.b d5 ;d5=bit # ; move.l a4,a5 lea (a4,d1.l),a5 ; add.l d1,a5 move.l 8(a0),d0 move.l 20(a0),d1 add.l d1,12(a0) ;skott_grav move.l 12(a0),d1 add.l d0,(a0) add.l d1,4(a0) moveq #0,d2 moveq #0,d1 moveq #1,d0 move.w (a0),d2 move.w 4(a0),d1 cmp.w d0,d2 bmi.b nqout cmp.w d0,d1 bmi.b nqout cmp.w #336,d2 bpl.b nqout cmp.w d7,d1 bpl.b nqout add.w d1,d1 move.w (a3,d1.l),d1 ; mulu #42,d1 ror.l #3,d2 add.w d2,d1 sub.w d2,d2 rol.l #3,d2 not.b d2 ; move.l a4,a1 lea (a4,d1.l),a1 ; add.l d1,a1 move.l a1,d1 add.l d6,a1 btst #15,16(a0) ;new shot on the block? beq.b rens_it bclr #15,16(a0) bra.s rensad rens_it: btst d5,(a5) bne.s vaeck tst.w penetrate bne.s rensad bra.s no_e_avail vaeck: bclr d5,(a5) ;förra positionen rensad! rensad: btst d2,(a1) bne.b sloop_b add.l d6,a1 btst d2,(a1) bne.s sloop_b add.l d6,a1 btst d2,(a1) bne.s sloop_b move.l d1,a1 bchg d2,(a1) ;ny position bclr #11,18(a0) sub.w #1,16(a0) bne.b no_time bchg d2,(a1) ;your time is up! move.w #0,(a0) ;goodbye ; subq.l #1,shots_active ;one less... bra.b no_time sloop_b: ;boom! collision! btst #15,18(a0) bne.s bounce btst #14,18(a0) beq.s no_e_avail lea exps-6,a5 fael: addq.l #6,a5 tst.w (a5) bmi.s no_e_avail bne.s fael ; beq.s foundae foundae: move.w (a0),(a5) subq.w #1,(a5) cmp.w #333,(a5) bls.s .ok move.w #333,(a5) .ok: move.w 4(a0),2(a5) subq.w #1,2(a5) move.w #0,4(a5) move.l #ShotExpSnd,Kanal3 no_e_avail: move.w #0,(a0) ; subq.l #1,shots_active ;one less... no_time:add.l d4,a0 bra.W sloop s_out: tst.w sready beq.s .kris rts .kris: sub.l d4,a0 move.l a0,seekbeg rts not_a: tst.w sready bne.s no_time move.l a0,seekbeg move.b d7,sready ;icke-0 bra.s no_time bounce: bchg #11,18(a0) bne.s no_e_avail moveq #0,d2 move.l (a0),d0 move.l 4(a0),d1 sub.l 8(a0),d0 bsr.s checkpix lsl.b #1,d2 move.l (a0),d0 move.l 4(a0),d1 sub.l 12(a0),d1 bsr.s checkpix tst.w d2 bne.s .ok moveq #3,d2 .ok: btst #0,d2 beq.s .u neg.l 8(a0) .u: btst #1,d2 beq.s .u2 neg.l 12(a0) .u2: bclr #15,16(a0) sub.w #1,16(a0) bne.b .ok2 move.w #0,(a0) ;goodbye ; subq.l #1,shots_active ;one less... bra.w no_time .ok2: bset #15,16(a0) bra.w no_time checkpix: sub.w d1,d1 swap d1 add.w d1,d1 move.w (a3,d1.w),d1 ; mulu #42,d1 sub.w d0,d0 swap d0 ror.l #3,d0 add.w d0,d1 sub.w d0,d0 rol.l #3,d0 not.b d0 lea (a4,d1.l),a5 add.l d6,a5 btst d0,(a5) bne.s .hit add.l d6,a5 btst d0,(a5) bne.s .hit add.l d6,a5 btst d0,(a5) bne.s .hit rts .hit: bset #0,d2 rts ;------ skjut: sub.l XLB,d0 asl.l #2,d4 ;animstep lea skott_dir,a1 moveq #0,d5 moveq #0,d6 move.w 0(a1,d4.w),d5 ;x & move.w 2(a1,d4.w),d6 ;y offset för skott-start swap d5 swap d6 add.l d5,d0 add.l d6,d1 asl.l #1,d4 lea spedtab,a1 move.l (a1,d4.w),d5 move.l 4(a1,d4.w),d6 add.l d5,d5 add.l d6,d6 add.l d5,d2 add.l d6,d3 ;skottspeed = direction*4 + playerspeed move.w rekyl,d4 bmi.s .no_r beq.s .nix asr.l d4,d5 asr.l d4,d6 .nix: sub.l d5,(a2) sub.l d6,4(a2) .no_r: move.l seekbeg,a0 moveq #24,d6 fsloop: tst.w (a0) beq.w found bmi.w not_found ;alla skott "in use" add.l d6,a0 bra.s fsloop found: move.l a0,seekbeg ; addq.l #1,shots_active move.l d0,(a0) ;xpos move.l d1,4(a0) ;ypos moveq #0,d4 moveq #0,d0 moveq #0,d1 move.w Sprid_factor+2,d4 beq.s no_sprid_2day bmi.s .snix move.l slump_count,a1 move.b (a1)+,d0 move.b (a1),d1 cmp.l #slumps+255,a1 bmi.s .ok lea slumps,a1 .ok: move.l a1,slump_count ;SLUMPQ sub.l #$78,d0 sub.l #$78,d1 ;$78 borde vara $80, men slumptalen är för låga bra.s .xrf .snix: move.l snix_c,a1 move.b (a1),d0 move.b (a1),d1 neg.w d4 sub.l #$80,d0 sub.l #$80,d1 ;nothing to do with XLB! .xrf: asl.l d4,d0 add.l d0,d2 asl.l d4,d1 add.l d1,d3 no_sprid_2day: move.l d2,8(a0) ;xspeed move.l d3,12(a0) ;yspeed move.w shot_lifetime,16(a0) ;lifetime bset #15,16(a0) ;new shot on the block move.l skott_grav,20(a0) lea SData,a2 move.w (a2,d7),18(a0) moveq #0,d0 lea Skott1,a0 add.w #1,(a0,d7) rts not_found: moveq #1,d0 rts Sprid_factor: dc.l 0 first_m: dc.w 0 smart_m: dc.w 7 shot_lifetime: dc.w 180 benefactor: dc.w -1 skott_dir: dc.w 2,7,2,6,2,4,2,3,3,3,4,2,6,2,7,2,8,2,10,2,11,2,12,2,13,3 dc.w 14,4,14,4,14,6,14,7,14,8,14,10,14,10,13,12,12,13,11,13 dc.w 9,13,8,13,7,13,5,13,5,13,3,12,3,11,2,10,2,8 bomb_dir: dc.w 14,7,14,8,13,9,12,10,11,12,10,13,10,13 dc.w 9,13,8,13,7,13,7,13,7,13,5,12,4,11,3,10,2,10,2,10 blink_tab: dc.w $ff0,$ff0,$cc0,$880,$440,0,0,0 even MExp_Struct: dc.l 100,100,-1,-1 MExp_S2: dc.l 100,100,-1,-1 section ljudosv,data_c ms_dat: blk.b 264,0 p_dat: blk.b 212,0 ;; SnixCopper: dc.w $180,0,$100,0 dc.w -1,-2 Copper: dc.w $1fc,0 dc.w $008e,$2061 ;ystrt $20, xstrt $61 dc.w $0090,$60e1 ;ystop $120,xstop $1e1 dc.w $0092,$0030 ;diwstrt dc.w $0094,$00d0 ;diwstop dc.w $0100,$0000 ;bpls scrollrightreg: dc.w $0102,$0000 ;scroll dc.w $0104,$0000 ;sprite pri dc.w $106,0 dc.w $0108,$0000 ;modulo,jämna dc.w $010a,$0000 ;modulo,ojämna dc.w $0180,0,$96,$8020 spr0ptr:dc.w $120,0 dc.w $122,0 spr1ptr:dc.w $124,0 dc.w $126,0 spr2ptr:dc.w $128,0 dc.w $12a,0 spr3ptr:dc.w $12c,0 dc.w $12e,0 spr4ptr:dc.w $130,0 dc.w $132,0 spr5ptr:dc.w $134,0 dc.w $136,0 spr6ptr:dc.w $138,0 dc.w $13a,0 spr7ptr:dc.w $13c,0 dc.w $13e,0 dc.w $2001,$fffe ply1col: dc.w $01a2,$eee ;Sprite 0 & 1 ,färger! dc.w $01a4,$999 dc.w $01a6,$444 dc.w $01aa,$0ce ;Sprite 2 & 3 ,färger! dc.w $01ac,$079 dc.w $01ae,$034 dc.w $01b2,$f00 ;Sprite 4 & 5 ,färger! dc.w $01b4,$ff0 dc.w $01b6,$ff0 Col_Tab: Q: set $180 rept 16 dc.w Q,0 Q: set Q+2 endr blink_col: equ *-2 bpl1p1: dc.w $e0,0,$e2,0 ;bplptr,player 1 bpl2p1: dc.w $e4,0,$e6,0 bpl3p1: dc.w $e8,0,$ea,0 bpl4p1: dc.w $ec,0,$ee,0 dc.w $2301,$fffe,$180,$f cop1ptr: dc.w $80,0,$82,0 dc.w $2401,$fffe,$100,$4200,$180,0 wcop1: dc.w $2501,$fffe,$1fe,$0 Q: set $8321 rept 12 dc.w Q,-2,$1fe,0,$14c,0,$14e,0,$164,0,$166,0 ;dölja sprite1&4 Q: set Q+$100 endr dc.w $8f01,-2,$180,$000,$0100,0 bpl1p2: dc.w $e0,0,$e2,0 ;bplptr,player 2 bpl2p2: dc.w $e4,0,$e6,0 bpl3p2: dc.w $e8,0,$ea,0 bpl4p2: dc.w $ec,0,$ee,0 dc.w $9001,-2,$180,$666 spr0o: dc.w $120,0,$122,0,$9059,-2,$180 Warn: dc.w $666,$9061,-2,$180,$666,$90b3,-2,$180,$666,$90bb,-2,$180,$666 dc.w $9101,-2,$180,$ddd,$9159,-2,$180 W2: dc.w $ddd,$9161,-2,$180,$ddd,$91b3,-2,$180,$ddd,$91bb,-2,$180,$ddd dc.w $9201,-2,$180,$666,$9259,-2,$180 W3: dc.w $666,$9261,-2,$180,$666,$92b3,-2,$180,$666,$92bb,-2,$180,$666 cop1ptr2: dc.w $80,0,$82,0 ply1c2: dc.w $01a2,$eee,$01a4,$999,$01a6,$444 ply2col: dc.w $01aa,$0ce,$01ac,$079,$01ae,$034 dc.w $01b2,$f00 ;Sprite 4 & 5 ,färger! dc.w $01b4,$ff0 dc.w $01b6,$ff0 Col_Tab2: Q: set $180 rept 16 dc.w Q,0 Q: set Q+2 endr blink_col2: equ *-2 dc.w $9401,-2,$100,$4200,$180,$0 wcop2: Q: set $9421 rept 12 dc.w Q,-2,$1fe,0,$15c,0,$15e,0,$16c,0,$16e,0 Q: set Q+$100 endr wcop2_2: dc.w $a101,-2,$1fe,0 one_scr_cop: cop1ptr_l: dc.w $80,0,$82,0 dc.w $ff01,$fffe,$0100,$0000,$180,$f spr2o: dc.w $128,0,$12a,0,$142,0,$152,0 pbplps: dc.w $e0,0,$e2,0,$e4,0,$e6,0,$e8,0,$ea,0,$ec,0,$ee,0 pcols: blk.l 15,0 scrollrr2: dc.w $102,$0 dc.w $01a2,0 dc.w $01a4,0 dc.w $01a6,0 dc.w $01aa,0 dc.w $01ac,0 dc.w $01ae,0 dc.w $01b2,0 dc.w $01b4,0 dc.w $01b6,0 dc.w $14a,0,$162,0 dc.w $108,126,$10a,126,$18e,0,$ffdf,-2 dc.w $0001,-2,$180,$0,$100,$4200,$96,$20 colc: dc.w $054f,-2,$18e,$f00,$87,$80fe,$18e,$888,$99,$80fe,$18e,0 dc.w $064f,-2,$18e,$f00,$87,$80fe,$18e,$888,$99,$80fe,$18e,0 dc.w $074f,-2,$18e,$f00,$87,$80fe,$18e,$888,$99,$80fe,$18e,0 xcolc: dc.w $0e73,-2,$18e,$44f,$cb,$80fe,$18e,0 dc.w $0f73,-2,$18e,$44f,$cb,$80fe,$18e,0 dc.w $1073,-2,$18e,$44f,$cb,$80fe,$18e,0 dc.w $1783,-2,$18e,$c0c,$a9,$80fe,$18e,0 dc.w $1883,-2,$18e,$f2f,$a9,$80fe,$18e,0 dc.w $1983,-2,$18e,$c0c,$a9,$80fe,$18e,0 dc.w $206f,-2,$18e,$cc0,$b9,$80fe,$18e,0 dc.w $216f,-2,$18e,$ff2,$b9,$80fe,$18e,0 dc.w $226f,-2,$18e,$cc0,$b9,$80fe,$18e,0 dc.w $295f,-2,$18e,$aa,$a1,$80fe,$18e,0 dc.w $2a5f,-2,$18e,$ff,$a1,$80fe,$18e,0 dc.w $2b5f,-2,$18e,$aa,$a1,$80fe,$18e,0 dc.w $3201,-2,$0100,0 dc.w $ffff,-2 ;Slut på Copperlista WCopper1: blk.w 34,0 dc.w $80,0,$82,0 dc.w $88,0 WCopper2: blk.w 34,0 dc.w $80,0,$82,0 dc.w $88,0 SlavCopper: dc.w $1fc,0 dc.w $008e,$2061 ;ystrt $20, xstrt $61 dc.w $0090,$20e1 ;ystop $120,xstop $1e1 dc.w $0092,$0050 ;diwstrt dc.w $0094,$00b8 ;diwstop dc.w $0100,0 ;bpls dc.w $0102,$ff ;scroll dc.w $0104,$0000 ;sprite pri dc.w $106,$0 dc.w $0108,0 ;modulo,jämna dc.w $010a,0 ;modulo,ojämna dc.w $0180,$0 dc.w $0182,$888 dc.w $0184,$aaa dc.w $0186,$ddd s_bplp: dc.w $e0,0,$e2,0,$e4,0,$e6,0 dc.w $6501,-2,$100,$a200 dc.w $9901,-2,$108,-2912,$10a,-2912 dc.w $9a01,-2,$108,0,$10a,0 dc.w $ab01,-2,$100,0 dc.w $ffff,-2 WaitCopper: dc.w $1fc,0 dc.w $008e,$2061 dc.w $0090,$20e1 dc.w $0092,$0058 ;diwstrt dc.w $0094,$00b8 ;diwstop dc.w $0100,0 dc.w $0102,$0 ;scroll dc.w $0104,0 dc.w $106,$0 dc.w $0108,0 ;mod dc.w $010a,0 dc.w $0180,$0 dc.w $0182,$aaa dc.w $0184,$888 dc.w $0186,$ccc dc.w $0188,$d dc.w $018a,$5 dc.w $018c,$a22 dc.w $018e,$9 w_bplp: dc.w $e0,0,$e2,0,$e4,0,$e6,0,$e8,0,$ea,0 dc.w $6501,-2,$100,$B200 dc.w $aa01,-2,$100,0 dc.w $ffff,-2 MCopper: dc.w $1fc,0 dc.w $008e,$2061 ;ystrt $20, xstrt $61 dc.w $0090,$20e1 ;ystop $120,xstop $1e1 dc.w $0092,$0030 ;diwstrt dc.w $0094,$00d0 ;diwstop dc.w $0100,$0000 ;bpls Mscrollrightreg: dc.w $0102,$0000 ;scroll dc.w $0104,$003f ;sprite pri dc.w $106,$0 dc.w $0108,$0000 ;modulo,jämna dc.w $010a,$0000 ;modulo,ojämna dc.w $0180,$0 mspr0ptr: dc.w $120,0 dc.w $122,0 dc.w $124,0 dc.w $126,0 mspr2ptr: dc.w $128,0 dc.w $12a,0 dc.w $12c,0 dc.w $12e,0 mspr4ptr: dc.w $130,0 dc.w $132,0 dc.w $134,0 dc.w $136,0 dc.w $138,0 dc.w $13a,0 dc.w $13c,0 dc.w $13e,0 pilcol: dc.w $01a2,$f00 dc.w $01a4,$f55 dc.w $01a6,$900 dc.w $01aa,$00f dc.w $01ac,$00f dc.w $01ae curs_col: dc.w cursor_c dc.w $01b2,$44f dc.w $01b4,$fff dc.w $01b6,$0f0 mbplptr: dc.w $e0,0,$e2,0 dc.w $e4,0,$e6,0 dc.w $e8,0,$ea,0 dc.w $f4,0,$f6,0 ;bpl6 dc.w $f0,0,$f2,0 ;bpl5 dc.w $ec,0,$ee,0 ;bpl4 mcol_tab: blk.w 32,0 dc.w $2301,-2,$0100,$6200 dc.w $4501,-2,$01b2,$f22 dc.w $c701,-2,$01b2,$44f dc.w $ffff,-2 mcols: dc.w $000,$f00,$0f0,$44f,$0ff,$f1f,$ff0,$fff dc.w $000,$f00,$0f0,$44f,$0ff,$f1f,$ff0,$fff Sprite_GFX: blk.b 2184,0 ;Nåra spritar Sprite_Mask: blk.w 1092,0 ;Mask för spritsen Explosion: blk.b 1936,0 ;Explosions-gfx Thrust_GFX: blk.b 2180,0 ;Nåra spritar FireSnd: dc.w 861,400,30 blk.w 861,0 ;Skjuta-ljud (2161) ExpSnd: dc.w 4800,456,50 blk.w 4800,0 ;Explosions-ljud ShotExpSnd: dc.w 1663,400,64 blk.w 1663,0 ;liten exp-ljud Plask: dc.w 1960,496,30 blk.w 1960,0 ;RePlay: dc.w 3771,385,64 ; blk.w 3771,0 Blast: dc.w 6425,385,64 blk.w 6425,0 Chopp: dc.w 733,385,60 incbin "dh1:gfx/gf2/chopp.raw" Swosh: dc.w 719,385,50 incbin "dh1:gfx/gf2/schwosch.raw" Plonk: dc.w 856,385,30 incbin "dh1:gfx/gf2/plonk.raw" Touchdown: dc.w 2993,500,15 blk.w 2993,0 daeng: dc.w 3311,500,30 blk.w 3311,0 pling: dc.w 2069,180,64 blk.w 2069,0 tingeling: dc.w 3943,500,64 blk.w 3943,0 ;Bpl for shotexplosion. exps_data: dc.l 0,0,0,0 dc.w $4000,0,$e000,0,$e000,0,$4000,0 dc.l 0,0,0,0 dc.w $4000,0,$e000,0,$e000,0,$4000,0 dc.w $4000,0,$e000,0,$e000,0,$4000,0 dc.l 0,0,0,0 dc.l 0,0,0,0 dc.w $4000,0,$e000,0,$e000,0,$4000,0 blk.w 24,0 dc.w $4000,0,$e000,0,$e000,0,$4000,0 blk.w 32,0 ;mask for the shotexplosions exps_mask: dc.w $4000,0,$e000,0,$e000,0,$4000,0 Pil: dc.w $3070 dc.w $4001 Pil_gfx: blk.l 17,0 Cursor: dc.l 0 blk.l 7,0 curs_data: blk.l 2,$FC00FC00 blk.l 9,0 MatSprite: dc.l 0 dc.w %1000100110010010,0 dc.w %1101101001010010,0 dc.w %1010101111001100,0 dc.w %1000101001010010,0 dc.w %1000101001010010,0 dc.l 0 Mat_gfx: dc.w 0,$1ff8 blk.l 127,$00001008 dc.w 0,$1ff8 dc.l 0 dc.w %100010111010010,0 dc.w %110110010011010,0 dc.w %101010010010110,0 dc.w %100010010010010,0 dc.w %100010111010010,0 dc.l 0 MExp: blk.b 14256,0 Miss: ; blk.b 3584,0 panel: blk.b 8432,0 ;panelen siffs: blk.b 9600,0 slave_l: incbin "dh1:GFX/GF2/Slave.bmap" wait_l: incbin "dh1:gfx/GF2/connecting.bmap" section flum,data font_fast: blk.b 752,0 rec_c: dc.l recbuf diverse: dc.b 'GPX:GPX_SPEC.DAT',0 d2mname: dc.b 'GPX:GPX_D2M.DAT',0 menyule: dc.b 'GPX:GPX_M.DAT',0 even rekyl: dc.w -1 etta: dc.w 1 W_Subs: dc.b 00,00,00,00,00 dc.b 20,30,35,20,20 ;bomb dc.b 01,01,02,00,00 ;extra ammo,fuel,both dc.b 10,15,02,01,00 ;shot16 dc.b 01,10,02,02,00 ;brake,repulsion,warp,reverse dc.b 20,20,00,00,00 even f_dat: blk.b 400 ;ammo/fuel data slump_count: dc.l slumps slump_c2: dc.l slumps sl_c3: dc.l slumps+100 txtwidth: blk.b 94,0 sqr: blk.b 626,0 ;sqr(4)-sqr(10000) gf_txts: incbin "dh1:gfx/GF2/gf-txts" flipp_t: incbin "dh1:gfx/GF2/flipp-txt" even regg_blaha: incbin "t:reggfile" slumps: blk.b 256,1 snixus: blk.b 256,2 snix_c: dc.l snixus frger: dc.w $eee,$999,$444,$555,$333,$111 ;vit dc.w $0ce,$079,$034,$66,$44,$22 ;blå dc.w $2e2,$190,$040,$060,$040,$020 ;grön dc.w $e22,$910,$400,$600,$400,$200 ;röd dc.w $c0e,$709,$304,$606,$404,$202 ;mag dc.w $dd0,$880,$440,$660,$440,$220 ;gul frgtoning: incbin "dh1:gfx/gf2/rgb_precalc" ;shots_active: dc.l 0 ;# of active shots seekbeg: dc.l skott ordning:dc.b 1,2,0,0 dc.b 1,2,3,1,2,3,0,0 dc.b 1,2,3,4,1,3,2,4,1,4,2,3,0,0 dc.b 1,2,3,4,1,5,2,3,4,5,1,3,2,4,2,5,1,4,3,5,0,0 dc.b 1,2,3,4,5,6,1,3,2,4,6,1,3,5,1,4,2,5,3,6,1,5,2,6,4,5,2,3 dc.b 4,6,0,0 dc.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,3,2,4,5,7,6,1,2,5,3,6,4,7 dc.b 2,6,1,4,3,5,7,2,1,5,3,7,4,6,0,0 dc.b 1,2,3,4,5,6,7,8,1,3,2,4,5,7,6,8,1,4,2,3,5,8,6,7,1,5,2,6 dc.b 3,7,4,8,1,6,2,5,3,8,4,7,2,8,1,7,3,5,4,6,1,8,2,7,3,6,4,5,0,0 section bplet,bss_c gurgel: ds.w 42 Pic: ds.b 170000 ;själva bplet section annat,bss_c Sprite0: ds.l 18 ;ply1 ds.l 28 Sprite1: ds.l 18 ;ply1(2) Sprite2: ds.l 18 ;ply2 ds.l 28 Sprite3: ds.l 18 ;ply2(1) Sprite4: ds.l 38 ;låga1,1(2) Sprite5: ds.l 38 ;låga2,2(1) MExp_Buf: ds.w 81 MExp_Buf2: ds.w 81 Empty: ds.l 47 ;dummy sprite ;this is bpl 4 BEFORE the exp starts exps_b4: ds.b 16*11*2 ;320 bytes,22 mini-exps pl_exps_b4: ds.b 160 font: ds.b 1504 section sdgf,bss snixdma: ds.w 1 introptr: ds.l 1 divptr: ds.l 1 divtptr: ds.l 1 d2mptr: ds.l 1 tt_in: ds.w 10 allocs: ds.l 42 ;max 40/2 allocs tab42: ds.w 1501 ;0-1500 *42 finfo: ds.b 270 ds.l 1 tider1: ds.l 5+1 ds.l 1 tider2: ds.l 5+1 normsettings: ds.b 2*BYTES_SETS+50 bomb_struct: ds.l 9 mine_struct: ds.w 9*ANT_MINES shooter: ds.w 60 ;plats för 10 st 12-bytes shooters magnet: ds.w 31 ;dc.w rikt,x,y *10 st inp_buf: ds.l 15 ib_slut: ds.l 1 tourtab: ds.w 57*2 scores: ds.w 8*4 ;poäng i tournamenten temp_s: ds.w 8*5 tour_r: ds.b 60*8 ;resultat tabell nt_buffer: ds.b 40 p_buf: ds.l 4*2+2 mexp_w: ds.l 4 cur_id: ds.w 1 ch_txt: ds.l 5 adr_ch_txter: ds.l 1 krock_fx: ds.w 1 ;effekt av krock ply-ply fast: ds.w 1 pl2_td: ds.w 1 ;-1=pl2 total disable ;keep 2gether pl2_md: ds.w 1 ;-1=pl2 disable i meny ;^^^ rem_j: ds.l 1 rem_j2: ds.l 1 rem_j3: ds.l 1 rem_j4: ds.l 1 init_ladd: ;jepp=no_game no_game: ds.w 1 blink_c15: ds.w 1 new_ml: ds.w 1 big_buf: ds.l 1 ;pekar på pic+130.000 ;skott-struct: ; dc.l $XXXXDDDD,$YYYYDDDD,$AAAADDDD,$AAAADDDD,$TTTT.w,DATA.w,grav.l Skott: ds.w 12*MAXSHOTS qaz: ds.l 1 ;no more shots ds.w 10 ds.w 12*EXTRASHOTS qaz20: ds.l 1 RecBuf: ds.w 25 ;100bytes/sec rcend: ds.w 1 ltxts: equ pic+168000 wcollfix: ds.w 1 ;dö-vid-otillåten-kollision toggle stat_adr: ds.l 1 cd_q: ds.l 2 mat_y: ds.w 1 mat_def: ds.l 1 sinit: ds.b 8 stxt: ds.b 80 DxposP: ds.l 1 DyposP: ds.l 1 PETA: ds.l 1 jupp: ds.w 1 jner: ds.w 1 ch_ptm: ds.w 1 ch_exit: ds.w 1 ch_play: ds.w 1 ch_psw: ds.w 1 Triple1: ds.w 1 Triple2: ds.w 1 fuel_sub: ds.w 1 ammo_sub: ds.w 1 slogans: ds.l 1 flipp_s: ds.w 1 port_adr: ds.l 1 tournorm: ds.w 1 Winner: ds.w 1 paws: ds.w 1 ule_ut: ds.w 1 slowmo: ds.w 1 air_res: ds.l 1 air_y_res: ds.l 1 glapp1: ds.w 1 glapp2: ds.w 1 record1: ds.w 1 record2: ds.w 1 skott_grav: ds.l 1 pm1: ds.w 1 ;+1,0 or -1 0=no effect,±1 = bomb rot pm2: ds.w 1 TimeShow: ds.w 1 B_time: ds.l 1 wcoll: ds.w 1 ;0=collision ply-ply possible best: ds.l 3 waitc: ds.l 1 dosbase: ds.l 1 gfxbase: ds.l 1 wbview: ds.l 1 real_a0: ds.l 1 Fix_HL: ds.w 1 Selected: ds.l 5 MuPtr: ds.l 1 MenuList: ds.l 1 MenuHigh: ds.l 1 thismenu: ds.l 1 in_type: ds.w 1 tt_nrchart: ds.l 1 tt_xpos: ds.l 1 tt_1stx: ds.l 1 tt_ypos: ds.l 1 tt_width: ds.l 1 tt_height: ds.w 1 tt_dadr: ds.l 1 tt_cpf: ds.w 1 tt_double: ds.w 1 tt_return: ds.l 6 tt_ab: ds.b 2 zb_down: ds.w 1 zb_xp1: ds.l 1 zb_xp2: ds.l 1 zb_yp1: ds.l 1 zb_yp2: ds.l 1 zb_w: ds.l 1 zb_bpl: ds.l 1 box_xpos1: ds.l 1 box_xpos2: ds.l 1 box_ypos1: ds.l 1 box_ypos2: ds.l 1 box_width: ds.l 1 box_bpl: ds.l 1 box_result: ds.l 4 tourc: ds.l 1 names: ds.b 30*8 ULE_count: ds.w 1 i_buf: ds.w 1 xexpc: ds.w 1 fast_cpu: ds.w 1 old_cpu: ds.w 1 L_Types: ds.l 1 cur_dbl: ds.l 1 ;dbl-buf cur-pos inp_data: ds.l 1 ;dc.b shift,caps,bs last?,count logf_adr2: ds.l 1 real_size: ds.l 1 fname: ds.l 1 flock: ds.l 1 fsize: ds.l 1 fhandle: ds.l 1 fmem: ds.l 1 xtra: ds.l 1 in_gsnix: ds.w 1 msgadr: ds.l 1 norm1col: ds.w 3 norm2col: ds.w 3 low1col: ds.w 3 low2col: ds.w 3 slump_v: ds.w 1 ;påverkar ej 0-modem BanName: ds.l 1 LevName: ds.l 1 BanaAdr: ds.l 1 TBanaAdr: ds.l 1 real_LevelTypeAdr: ds.l 1 LevelTypeAdr: ds.l 1 SlumpV: ds.l 1 ;påverkar ej 0-modem Playa: ds.w 1 Knapp1: ds.w 1 Knapp2: ds.w 1 mini_styr: ds.w 1 high_p: ds.w 1 ask_u_act: ds.l 1 bildstruct: ds.l 1 logo_adr: ds.l 1 flipp_a: ds.w 1 one_screen: ds.w 1 l_o_scr: ds.w 1 master: ds.w 1 nullm: ds.w 1 game_on: ds.w 1 jump_all: ds.w 1 j_delay: ds.w 1 scr_mode_adr: ds.l 1 l_scr_m: ds.w 1 key_move: ds.w 1 key_b: ds.w 1 joydir: ds.l 1 keydir: ds.l 1 orgpaus: ds.w 1 onesbak: ds.w 1 nr_exps: ds.l 1 del_move: ds.w 1 multis_on: ds.w 1 cannonadd: ds.w 1 cannon_struct: ;dc.w xpos16,ypos16,antiply,reload,anim,ypos16*16*42 ds.l 8*3 local: ds.b 54 remote: ds.b 54 regg_txt: ds.b 250 ;exp-struct: dc.w $XXXX,$YYYY,Step exps: ds.w 3*11*2 ;22 exps ShotExplosions! wsx: ds.l 1 ;no more exps= -1 ordoffs: ds.l 7 tscmds: ds.w 1 single: ds.w 1 posi_adr: ds.l 1 pl_exps: ds.w 6 plee: ds.l 1 def_prefs_buf: ds.b 480 prefs_buf: ds.b 480 prefs_buf_bak: ds.b 480 leveljox: ds.b 90 m_adrs: ds.l 1 snixule: ds.l 1 podstruct: ds.w 50 backup_pl2: ds.w COPYANT+1 ig_pl2: ds.l 1 ply1move: ds.b 1 ply2move: ds.b 1 bomb1sd: ds.w 1 bomb2sd: ds.w 1 bonus_pods: ds.w 1 ny_slump: ds.l 1 ;tillåtet att använda i 0-modemmode o_scr_bak: ds.w 1 byt_count: ds.w 1 ny_slv: ds.w 1 invis1: ds.w 1 invis2: ds.w 1 inv_on1: ds.w 1 inv_on2: ds.w 1 ;Prog END...