home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-01-01 | 33.2 KB | 1,955 lines |
-
-
- ;BARCELONA MANAGEMENT FX
-
-
- ; DAVE LOWE.....0723 870648
-
-
- ; **************************
-
-
- section issA,code_c ;must be in low memory for dma access
- ;DEVPAC PSEUDO OP ...
- a00 equ 508*2
- bb00 equ 480*2
- b00 equ 453*2
-
- c01 equ 428*2
- db01 equ 404*2
- d01 equ 381*2
- eb01 equ 360*2
- e01 equ 339*2
- f01 equ 320*2
- gb01 equ 302*2
- g01 equ 285*2
- ab01 equ 269*2
- a01 equ 508
- bb01 equ 480
- b01 equ 453
-
- c02 equ 428
- db02 equ 404
- d02 equ 381
- eb02 equ 360
- e02 equ 339
- f02 equ 320
- gb02 equ 302
- g02 equ 285
- ab02 equ 269
- a02 equ 254
- bb02 equ 240
- b02 equ 226
-
- c03 equ 214
- db03 equ 202
- d03 equ 190
- eb03 equ 180
- e03 equ 170
- f03 equ 160
- gb03 equ 151
- g03 equ 143
- ab03 equ 135
- a03 equ 127
-
- bb03 equ 480*2
- b03 equ 453*2
-
- c04 equ 428*2
- db04 equ 404*2
- d04 equ 381*2
- eb04 equ 360*2
- e04 equ 339*2
- f04 equ 320*2
- gb04 equ 302*2
- g04 equ 285*2
- ab04 equ 269*2
- a04 equ 508
- bb04 equ 480
- b04 equ 453
-
- c05 equ 428
- db05 equ 404
- d05 equ 381
- eb05 equ 360
- e05 equ 339
- f05 equ 320
- gb05 equ 302
- g05 equ 285
- ab05 equ 269
- a05 equ 254
- bb05 equ 240
- b05 equ 226
-
- c06 equ 214
- db06 equ 202
- d06 equ 190
- eb06 equ 180
- e06 equ 170
- f06 equ 160
- gb06 equ 151
- g06 equ 143
- ab06 equ 135
- a06 equ 127
- bb06 equ 480*2
- b06 equ 453*2
-
- c07 equ 428*2
- db07 equ 404*2
- d07 equ 381*2
- eb07 equ 360*2
- e07 equ 339*2
- f07 equ 320*2
- gb07 equ 302*2
- g07 equ 285*2
- ab07 equ 269*2
- a07 equ 508
- bb07 equ 480
- b07 equ 453
-
- c08 equ 428
- db08 equ 404
- d08 equ 381
- eb08 equ 360
- e08 equ 339
- f08 equ 320
- gb08 equ 302
- g08 equ 285
- ab08 equ 269
- a08 equ 254
- bb08 equ 240
- b08 equ 226
-
-
- v equ 0
- a00x equ 508*2+v
- bb00x equ 480*2+v
- b00x equ 453*2+v
-
-
- c01x equ 428*2+v
- db01x equ 404*2+v
- d01x equ 381*2+v
- eb01x equ 360*2+v
- e01x equ 339*2+v
- f01x equ 320*2+v
- gb01x equ 302*2+v
- g01x equ 285*2+v
- ab01x equ 269*2+v
- a01x equ 508+v
-
- bb01x equ 480+v
- b01x equ 453+v
-
- c02x equ 428+v
- db02x equ 404+v
- d02x equ 381+v
- eb02x equ 360+v
- e02x equ 339+v
- f02x equ 320+v
- gb02x equ 302+v
- g02x equ 285+v
- ab02x equ 269+v
- a02x equ 254+v
- bb02x equ 240+v
- b02x equ 226+v
-
- c03x equ 214+v
- db03x equ 202+v
- d03x equ 190+v
- eb03x equ 180+v
- e03x equ 170+v
- f03x equ 160+v
- gb03x equ 151+v
- g03x equ 143+v
- ab03x equ 135
- a03x equ 127+v
- bb03x equ 480*2+v
- b03x equ 453*2+v
-
- c04x equ 428*2+v
- db04x equ 404*2+v
- d04x equ 381*2+v
- eb04x equ 360*2+v
- e04x equ 339*2+v
- f04x equ 320*2+v
- gb04x equ 302*2+v
- g04x equ 285*2+v
- ab04x equ 269*2+v
- a04x equ 508+v
- bb04x equ 480+v
- b04x equ 453+v
-
- c05x equ 428+v
- db05x equ 404+v
- d05x equ 381+v
- eb05x equ 360+v
- e05x equ 339+v
- f05x equ 320+v
- gb05x equ 302+v
- g05x equ 285+v
- ab05x equ 269+v
- a05x equ 254+v
- bb05x equ 240+v
- b05x equ 226+v
-
- c06x equ 214+v
- db06x equ 202+v
- d06x equ 190+v
- eb06x equ 180+v
- e06x equ 170+v
- f06x equ 160+v
- gb06x equ 151+v
- g06x equ 143+v
- ab06x equ 135
- a06x equ 127+v
- bb06x equ 480*2+v
- b06x equ 453*2+v
-
- c07x equ 428*2+v
- db07x equ 404*2+v
- d07x equ 381*2+v
- eb07x equ 360*2+v
- e07x equ 339*2+v
- f07x equ 320*2+v
- gb07x equ 302*2+v
- g07x equ 285*2+v
- ab07x equ 269*2+v
- a07x equ 508+v
- bb07x equ 480+v
- b07x equ 453+v
-
- c08x equ 428+v
- db08x equ 404+v
- d08x equ 381+v
- eb08x equ 360+v
- e08x equ 339+v
- f08x equ 320+v
- gb08x equ 302+v
- g08x equ 285+v
- ab08x equ 269+v
- a08x equ 254+v
- bb08x equ 240+v
- b08x equ 226+v
-
- no_loop equ 0
- loop equ 0
- chann1reg equ $dff0a0
- chann2reg equ $dff0b0
- chann3reg equ $dff0c0
- chann4reg equ $dff0d0
- dmacon equ $dff096
- int_bf_int equ $dff01e
- int_bf_w equ $dff09a
- vhposr equ $dff006
- in_line equ 0
- new_snd equ 4
- end_song equ 1
- end_patt equ 8
- new_env equ 12
- pbend equ 16
-
-
-
- cr equ 16
- q equ cr/2
- sq equ q/2
- dsq equ sq/2
- m equ cr*2
- sb equ cr*4
- dcr equ cr+q
- dq equ q+sq
- r14 equ 264
- dm equ m+cr
- tcr1 equ 11 ;;;;13
- tcr2 equ 10 ;;;;14
- tq1 equ 5 ;;;;7
- tq2 equ 6 ;;;;6
- tsq1 equ 3 ;;;;3
- tsq2 equ 2 ;;;;4
- dsb equ sb+m
-
-
-
- hi: equ 223
- lo: equ 446
-
- r22 equ 134
- r20 equ 143
- r19 equ 150
- r18 equ 178
- r17 equ 200
- r16: equ 222
- r15: equ 249
- r13: equ 305
- r12: equ 333
- r11: equ 361
- r10: equ 389
- r9: equ 419
- r8: equ 446
- r7: equ 446+112
- r6: equ 446+223
- r5: equ 446+223+112
- r4: equ 446*2
- r3: equ 446*3
- r2: equ 446*4
- r1: equ 446*8
-
-
- filter: equ $bfe001
- filter_on equ 44
- filter_off equ 48
-
- modon equ 20
- pboff equ 24
- modoff equ 28
- rest equ 32
- end_fxp equ 36
- end_fx3 equ 36
- end_fx4 equ 40
- acc equ 52
- repeat equ 56
- down equ 1
- up equ 2
-
-
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-
- ; THIS IS THE CONTROL SECTION FOR TESTING ANED CAN BE DELETED
- ; WHEN NOT REQUIRED
-
-
- jsr select_new_song
-
- testloop:
- jsr delay ;wait for scan line at 50hz on pal
-
- jsr driver
-
- bra testloop
-
-
- delay:
- tst.w fxtimer
- bne no_test
- clr.l d0
- move.b $bfe001,d0
- btst #6,d0
- bne no_test1
- move.w #10,fxtimer
- bra testfx4
- no_test
- subq #1,fxtimer
- no_test1
- clr.l d0
- move.w vhposr,d0
- andi.w #%1111111100000000,d0
- cmpi.w #%1111111100000000,d0
-
- bne no_test1
- rts
-
- testfx4:
-
- clr.l d0
- move.b $bfe001,d0
- btst #6,d0
- beq testfx4
-
-
- ;move.l song_buffer,d0
- ;add.l #1,d0
- ;cmp.l #4,d0
- ;bne no_s
- ;move.l #1,d0
- no_s ;move.l d0,song_buffer
- ;jsr select_new_song
-
-
-
-
-
- move.l fx_last,d0
- cmp.l #max_fx,d0
- ;beq no_k
- ;bcs no_k
- move.l d0,fx_kill
-
- jsr kill_loopfx
- move.w #1,music_disable
- jsr kill_chip
-
-
- no_k
- move.l fx_no,fx_number
- move.l fx_no,fx_last
- addq.l #1,fx_no
- move.l max_fx,d0
- cmp.l fx_no,d0
- bne noreset
- move.l #1,fx_no
- noreset:
- jsr set_up_fx
- bra no_test
-
- fxtc: dc.w 10
- fx_no: dc.l 1
- fx_last dc.l 0
-
-
- ; END OF CONTROL (DELETABLE) SECTION
-
- ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- ; MAIN VARIABLES TO BE ACCESSED BY PROGRAMMER DURING RUNTIME
-
-
- fx_number: dc.l 0 ; number of fx required here...see list
- fx_kill dc.l 0 ; number of fx to kill/only needed for looped fx
-
- song_buffer dc.l 1 ; number of piece of music required here ie.1 to 3
-
-
- music_disable: dc.w 1 ; 1 = disable music
- fx_disable: dc.w 0 ; 1 = disable fx
-
- ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- ; THESE VARIABLES ARE USED INTERNALLY BY THE DRIVER
- fxr1 dc.l 0
- fxr2 dc.l 0
- fxr3 dc.l 0
- fxr4 dc.l 0
- fxc1 dc.l 0
- fxc2 dc.l 0
- fxc3 dc.l 0
- fxc4 dc.l 0
- fx1_flag dc.w 0
- fx2_flag dc.w 0
- fx3_flag dc.w 0
- fx4_flag dc.w 0
- fxtimer dc.w 0
- gen dc.w 0
- int_disable dc.w 0
- altpf dc.w 0
- ; *******************************************************
-
- ; CALL THIS SUBROUTINE TO SET UP THE REQIURED FX
- ; on entry it requires the fx number to be in "fx_number"(see above)
- ;
-
- set_up_fx
- movem.l d5/a2,-(a7) ;save used registers
- tst.l fxc4
- bne check3
- use4:
- move.w #%0000000000001000,d5
- lea chann4reg,a2
- jsr end_fx4p
- move.l fx_number,fxr4
- move.l fx_number,fxc4
- move.l #0,fx_number
- bra no_fx
- check3: tst.l fxc3
- bne check2
- use3:
- move.w #%0000000000000100,d5
- lea chann3reg,a2
- jsr end_fx3p
- move.l fx_number,fxr3
- move.l fx_number,fxc3
- move.l #0,fx_number
- bra no_fx
- check2: tst.l fxc2
- bne check1
- use2:
- move.w #%0000000000000010,d5
- lea chann2reg,a2
- jsr end_fx2p
- move.l fx_number,fxr2
- move.l fx_number,fxc2
- move.l #0,fx_number
- bra no_fx
- check1: tst.l fxc1
- bne use4
- use1:
- move.w #%0000000000000001,d5
- lea chann1reg,a2
- jsr end_fx1p
- move.l fx_number,fxr1
- move.l fx_number,fxc1
- move.l #0,fx_number
- no_fx
- movem.l (a7)+,d5/a2 ;restore registers
- rts
-
- ;*************************************************
- ; CALL HERE TO KILL ANY LOOPED FX...
- ; after putting the number of the fx you want to kill
- ; into fx_kill
-
- kill_loopfx
-
- movem.l d5/a2,-(a7) ;save used registers
- move.l fx_kill,d5
- cmp.l fxc1,d5
- bne k2
- move.w #%0000000000000001,d5
- lea chann1reg,a2
- jsr end_fx1p
- bra error
- k2 cmp.l fxc2,d5
- bne k3
- move.w #%0000000000000010,d5
- lea chann2reg,a2
- jsr end_fx2p
- bra error
- k3 cmp.l fxc3,d5
- bne k4
- move.w #%0000000000000100,d5
- lea chann3reg,a2
- jsr end_fx3p
- bra error
- k4 cmp.l fxc4,d5
- bne error
- move.w #%0000000000001000,d5
- lea chann2reg,a2
- jsr end_fx4p
- error
- clr.l fx_kill
- movem.l (a7)+,d5/a2 ;restore registers
- rts
- ;*************************************************
-
- ; CALL HERE TO KILL ANY SOUND for whatever reason
-
- kill_chip:
-
- move.w #%0000000000001111,dmacon
- move.l rest_data,chann1reg
- move.l rest_data,chann2reg
- move.l rest_data,chann3reg
- move.l rest_data,chann4reg
- move.w #16,chann1reg+4
- move.w #16,chann2reg+4
- move.w #16,chann3reg+4
- move.w #16,chann4reg+4
- move.w #0,chann1reg+8
- move.w #0,chann2reg+8
- move.w #0,chann3reg+8
- move.w #0,chann4reg+8
- move.w #1,chann1reg+6
- move.w #1,chann2reg+6
- move.w #1,chann3reg+6
- move.w #1,chann4reg+6
- move.l #0,fxr1
- move.l #0,fxr2
- move.l #0,fxr3
- move.l #0,fxr4
- move.w #0,fx1_flag
- move.w #0,fx2_flag
- move.w #0,fx3_flag
- move.w #0,fx4_flag
- move.l #0,fxc1
- move.l #0,fxc2
- move.l #0,fxc3
- move.l #0,fxc4
- rts
- ;****************************************
-
- ; CALL HERE TO SELECT WHICH PIECE OF MUSIC TO PLAY
- ; AFTER PLACING NUMBER (1 to 3) IN "SONG_BUFFER"..see above
- ; a call to this routine will initiliase the driver/kill any sound etc.
- ; make sure this routine has been called before running the interrupt
- ; driven section....see below
-
- select_new_song:
-
- move.w #1,int_disable
- movem.l d0/d1/a0/a1,-(a7) ;save used registers
- move.w music_disable,gen
- move.w #1,music_disable
- jsr kill_chip
- clr.l d0
- move.w #204,d0
- lea gvars,a0
- clloop: clr.w (a0)+
- dbra d0,clloop
- tst.l song_buffer
- beq no_song
- move.l song_buffer,d1
- add.l d1,d1
- add.l d1,d1
- add.l d1,d1
- add.l d1,d1
- LEA SONG_TABLE-16,A1
- add.l d1,a1
- MOVE.L (A1)+,WSONG1
- move.l (a1)+,wsong2
- move.l (a1)+,wsong3
- move.l (a1),wsong4
- MOVE.L #pstart,PATTR1
- MOVE.L #pstart,PATTR2
- MOVE.L #pstart,PATTR3
- move.l #pstart,pattr4
- move.l #sstart,songr1
- MOVE.L #sstart,SONGR2
- MOVE.L #sstart,SONGR3
- move.l #sstart,songr4
- no_song
- move.w #1,ch1vars
- move.w #2,ch2vars
- move.w #3,ch3vars
- move.w #4,ch4vars
- move.w #6,ch4fxvars
- move.w #5,ch3fxvars
- move.w #7,ch2fxvars
- move.w #8,ch1fxvars
- move.w gen,music_disable
- clr.w int_disable
- movem.l (a7)+,d0/d1/a0/a1 ;restore registers
- rts
-
- ;**************************************************
-
- ; CALL HERE ON A 50hz INTERRUPT DURING RUNTIME
- ; TO PLAY FX AND TUNES
-
- driver:
- tst.w int_disable
- beq process_data
- rts
- process_data
- movem.l d0-d6/a0-a6,-(a7) ;save used registers
-
-
- ch1:
- tst.w fx_disable
- bne test_music1
- tst.l fxr1
- bne ch1j1
- tst.l fxc1
- beq test_music1
- bra ch1j3
- ch1j2 jsr run_dummy1
- jsr run_fx1
- bra ch2
- ch1j1
- jsr set_up1
- ch1j3 tst.w music_disable
- beq ch1j2
- jsr run_fx1
- bra ch2
- test_music1
- tst.w music_disable
- bne ch2
- jsr run_music1
- bra ch2
- ;***********************
-
- ; channel 1 subroutines
-
- run_dummy1
- lea ch1vars,a0
- lea dummy_reg,a2
- move.w #0,d5
- jsr sect1
- rts
-
- set_up1
- move.l fxr1,d0
- add d0,d0
- add d0,d0
- lea fxjump_table-4,A1
- add.l d0,a1
- move.l (a1),currfx1
- clr.l fxr1
- clr.w fxintc1
- rts
-
-
- run_fx1
- lea ch1fxvars,a0
- lea chann1reg,a2
- move.w #%0000000000000001,d5
- move.w #%1000001000000001,d1
- jsr sect1
- rts
-
- run_music1
- lea ch1vars,a0
- lea chann1reg,a2
- move.w #%0000000000000001,d5
- move.w #%1000001000000001,d1
- jsr sect1
- rts
-
- ; **************************
-
- ch2
- tst.w fx_disable
- bne test_music2
- tst.l fxr2
- bne ch2j1
- tst.l fxc2
- beq test_music2
- bra ch2j3
- ch2j2 jsr run_dummy2
- jsr run_fx2
- bra ch3
- ch2j1
- jsr set_up2
- ch2j3 tst.w music_disable
- beq ch2j2
- jsr run_fx2
- bra ch3
-
- test_music2
- tst.w music_disable
- bne ch3
- jsr run_music2
- bra ch3
-
- ;***********************
-
- ; channel 2 subroutines
-
- run_dummy2
- lea ch2vars,a0
- lea dummy_reg,a2
- move.w #0,d5
- jsr sect1
- rts
-
- set_up2
- move.l fxr2,d0
- add d0,d0
- add d0,d0
- lea fxjump_table-4,A1
- add.l d0,a1
- move.l (a1),currfx2
- clr.l fxr2
- clr.w fxintc2
- rts
-
-
- run_fx2
- lea ch2fxvars,a0
- lea chann2reg,a2
- move.w #%0000000000000010,d5
- move.w #%1000001000000010,d1
- jsr sect1
- rts
-
- run_music2
- lea ch2vars,a0
- lea chann2reg,a2
- move.w #%0000000000000010,d5
- move.w #%1000001000000010,d1
- jsr sect1
- rts
-
- ; **************************
-
- ch3:
- tst.w fx_disable
- bne test_music3
- tst.l fxr3
- bne ch3j1
- tst.l fxc3
- beq test_music3
- bra ch3j3
- ch3j2 jsr run_dummy3
- jsr run_fx3
- bra ch4
- ch3j1
- jsr set_up3
- ch3j3 tst.w music_disable
- beq ch3j2
- jsr run_fx3
- bra ch4
-
- test_music3
- tst.w music_disable
- bne ch4
- jsr run_music3
- bra ch4
-
- ;***********************
-
- ; channel 3 subroutines
-
- run_dummy3
- lea ch3vars,a0
- lea dummy_reg,a2
- move.w #0,d5
- jsr sect1
- rts
-
- set_up3
- move.l fxr3,d0
- add d0,d0
- add d0,d0
- lea fxjump_table-4,A1
- add.l d0,a1
- move.l (a1),currfx3
- clr.l fxr3
- clr.w fxintc3
- rts
-
-
- run_fx3
- lea ch3fxvars,a0
- lea chann3reg,a2
- move.w #%0000000000000100,d5
- move.w #%1000001000000100,d1
- jsr sect1
- rts
-
- run_music3
- lea ch3vars,a0
- lea chann3reg,a2
- move.w #%0000000000000100,d5
- move.w #%1000001000000100,d1
- jsr sect1
- rts
-
- ; **************************
-
-
-
- ch4:
- tst.w fx_disable
- bne test_music4
- tst.l fxr4
- bne ch4j1
- tst.l fxc4
- beq test_music4
- bra ch4j3
- ch4j2 jsr run_dummy4
- jsr run_fx4
- bra no4
- ch4j1
- jsr set_up4
- ch4j3 tst.w music_disable
- beq ch4j2
- jsr run_fx4
- bra no4
-
- test_music4
- tst.w music_disable
- bne no4
- jsr run_music4
- no4
- movem.l (a7)+,d0-d6/a0-a6 ;restore registers
- rts
-
- ;***********************
-
- ; channel 4 subroutines
-
- run_dummy4
- lea ch4vars,a0
- lea dummy_reg,a2
- move.w #0,d5
- jsr sect1
- rts
-
- set_up4
- move.l fxr4,d0
- add d0,d0
- add d0,d0
- lea fxjump_table-4,A1
- add.l d0,a1
- move.l (a1),currfx4
- clr.l fxr4
- clr.w fxintc4
- rts
-
-
- run_fx4
- lea ch4fxvars,a0
- lea chann4reg,a2
- move.w #%0000000000001000,d5
- move.w #%1000001000001000,d1
- jsr sect1
- rts
-
- run_music4
- lea ch4vars,a0
- lea chann4reg,a2
- move.w #%0000000000001000,d5
- move.w #%1000001000001000,d1
- jsr sect1
- rts
- ; **************************
-
- sect1: tst.w 0(a0)
- bne s1j1
- rts
-
- s1j1: tst.w 2(a0)
- beq sect3
- cmpi.w #1,2(a0)
- beq sect4
-
- cmpi.w #3,4(a0)
- beq part2
-
- mode_switch: subq.w #1,2(a0)
-
- check_effects: clr.w altpf
- move.w 6(a0),d2
- tst.w 8(a0)
- beq check_mod
- tst.w 14(a0)
- beq cont_bend
- subq.w #1,14(a0)
- bra check_mod
- cont_bend: addq.w #1,altpf
- move.w 10(a0),d3
- move.w 12(a0),d4
- cmpi.w #1,8(a0)
- beq pbup
-
- sub.w d3,d2
- cmp.w d2,d4
- bcs check_mod
- bra fbend
-
- pbup: add.w d3,d2
- cmp.w d2,d4
- bcc check_mod
- fbend: move.w d4,d2
- clr.w 8(a0)
- check_mod: tst.w 16(a0)
- beq send_alt_pitch
-
-
- tst.w 58(a0)
- beq st_ok
- subq.w #1,58(a0)
- bra send_alt_pitch
- st_ok:
- tst.w 50(a0)
- beq cont_mod
- subq #1,50(a0)
- bra send_alt_pitch
- cont_mod: move.w 52(a0),50(a0)
- addq #1,altpf
- cmpi #3,16(a0)
- bcc addmod
-
- move.w 56(a0),d3
- sub.w d3,d2
- addq.w #1,16(a0)
- bra send_alt_pitch
- addmod:
-
- move.w 54(a0),d3
- add.w d3,d2
- addq.w #1,16(a0)
- cmpi.w #5,16(a0)
- bne send_alt_pitch
- move.w #1,16(a0)
-
- send_alt_pitch: tst.w altpf
- beq send_env
- move.w d2,6(a0)
- move.w d2,6(a2)
-
- send_env:
-
- cmpi #6,(a0)
- beq norm_env
- cmpi #5,(a0)
- bne do_env_check
-
- tst.w fx4_flag
- beq norm_env
- bra low_vol
-
- do_env_check:
- move.w fx3_flag,d0
- or.w fx4_flag,d0
- cmpi.w #0,d0
- beq norm_env
- low_vol:
- move.l 18(a0),a1
- cmpi.w #255,(a1)
- beq evj1
- move.w (a1)+,d0
- evj2: sub.w 62(a0),d0
- bcc no_over
- move.w 0,d0
- no_over:
- move.w d0,8(a2)
- bra fint
-
- evj1: subq.l #2,a1
- move.w (a1)+,d0
- bra evj2
-
- norm_env:
- move.l 18(a0),a1
- cmpi.w #255,(a1)
- beq env_finished
- cmpi.w #1,66(a0)
- bne no_acc
-
- clr.l d0
- move.w (a1)+,d0
- add.w 64(a0),d0
- move.w d0,8(a2)
- move.l a1,18(a0)
- rts
-
- no_acc:
- resu: move.w (a1)+,8(a2)
- fint: move.l a1,18(a0)
- rts
-
- env_finished:
- subq.l #2,a1
- bra resu
-
-
- one_shot_note: move.w #3,4(a0)
- move.l 38(a0),(a2)
- move.w 42(a0),4(a2)
- move.w d1,dmacon
- bra send_env
-
-
- part2:
- move.l 44(a0),(a2)
- move.w 48(a0),4(a2)
- subq.w #1,2(a0)
- move.w #1,4(a0)
- bra check_effects
-
- sect3:
- move.w 0,66(a0)
-
- move.l 22(a0),a1
- control_ret: move.w (a1)+,d0
- cmpi.w #100,d0
- bls sect5
-
- acc_note:
- move.w d0,6(a0)
- move.w d0,6(a2)
- move.w (a1)+,2(a0)
- subq.w #1,2(a0)
- move.l a1,22(a0)
- move.l 34(a0),18(a0)
- move.w 60(a0),58(a0)
-
-
- tst.w 16(a0)
- beq no_mod_res
- move.w #1,16(a0)
- no_mod_res:
- cmpi.w #0,4(a0)
- beq do_loop
- bra one_shot_note
-
-
- do_loop: move.w d1,dmacon
- bra send_env
-
- do_rest:
- move.w (a1)+,2(a0)
- subq.w #1,2(a0)
- move.l a1,22(a0)
- move.l #rest_env,18(a0)
-
- move.w #0,8(a2)
- bra send_env
-
- sect4:
- cmpi.w #0,4(a0)
- beq noof
- move.w d5,dmacon
- noof: subq.w #1,2(a0)
- bra check_effects
-
- sect5: move.l #jump_table,a3
- move.l (a3,d0),a4
- jmp (a4)
-
- jump_table:
- dc.l in_line_data
- dc.l nsound
- dc.l patt_end
- dc.l get_env
- dc.l check_pbend
- dc.l do_mod
- dc.l bend_off
- dc.l mod_off
- dc.l do_rest
- dc.l end_fx
- dc.l end_fx
- dc.l s_f_on
- dc.l s_f_off
- dc.l set_acc
- dc.l rept
-
- in_line_data:
-
- nop
- rts
-
- rept:
- move.l (a1),a1
- bra control_ret
-
- s_f_on:
- bclr #1,filter
- bra control_ret
- s_f_off:
- bset #1,filter
- bra control_ret
-
- nsound: move.l (a1)+,a3
- cmpi.w #0,(a3)
- bne one_shot_sound
- move.w (a3)+,4(a0)
- move.l (a3)+,(a2)
- move.w (a3),4(a2)
- jmp control_ret
-
- one_shot_sound:
- move.w (a3)+,4(a0)
- move.l (a3)+,38(a0)
- move.l (a3)+,42(a0)
- move.l (a3),46(a0)
- jmp control_ret
-
- patt_end:
-
- move.l 26(a0),a1
- cmpi.l #0,(a1)
- beq song_control
- addq.l #4,26(a0)
- move.l (a1),a1
- jmp control_ret
- get_env:
- move.l (a1)+,a4
- move.l (a4)+,62(a0)
-
- move.l a4,34(a0)
-
- bra control_ret
-
- check_pbend:
- move.l (a1)+,8(a0)
- move.l (a1)+,12(a0)
- bra control_ret
-
- do_mod: move.w #1,16(a0)
- move.l (a1)+,50(a0)
- move.l (a1)+,54(a0)
- move.l (a1)+,58(a0)
- bra control_ret
-
- bend_off: clr.w 8(a0)
- bra control_ret
-
- mod_off: clr.w 16(a0)
- bra control_ret
-
-
- end_fx:
- cmpi.w #6,(a0)
- beq end_fx4p
- cmpi.w #5,(a0)
- beq end_fx3p
- cmpi.w #7,(a0)
- beq end_fx2p
-
- end_fx1p:
- move.w d5,dmacon
- move.w #1,chann1reg+6
- move.w #0,8(a2)
- move.l #0,fxc1
- rts
-
- end_fx2p:
- move.w d5,dmacon
- move.w #1,chann2reg+6
- move.w #0,8(a2)
- move.l #0,fxc2
- rts
-
-
- end_fx3p:
- move.w d5,dmacon
- move.w #1,chann3reg+6
- move.w #0,8(a2)
- move.l #0,fxc3
- rts
-
- end_fx4p:
- move.w d5,dmacon
- move.w #1,chann4reg+6
- move.w #0,8(a2)
- move.l #0,fxc4
- rts
-
- set_acc: move.w #1,66(a0)
- bra control_ret
-
- song_control:
- addq.l #4,a1
- move.l 30(a0),26(a0)
- move.l 26(a0),a1
- addq.l #4,26(a0)
- move.l (a1),a1
- jmp control_ret
-
-
- ;"""""""""""""""""""""""""""""""""""""""""""""""""
-
- ;;; DATA
-
- song_table:
-
- ;************************************************************
- gvars:
- ch1vars
- dc.w 0
- dc.w 0,0,0,0,0,0,0,0,0,0
- pattr1: dc.l 0
- songr1: dc.l 0
- wsong1: dc.l 0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
- ch2vars
- dc.w 0
- dc.w 0,0,0,0,0,0,0,0,0,0
- pattr2: dc.l 0
- songr2: dc.l 0
- wsong2: dc.l 0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
- ch3vars
- dc.w 0
- dc.w 0,0,0,0,0,0,0,0,0,0
- pattr3: dc.l 0
- songr3: dc.l 0
- wsong3: dc.l 0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
- ch4vars
- dc.w 0
- dc.w 0,0,0,0,0,0,0,0,0,0
- pattr4: dc.l 0
- songr4: dc.l 0
- wsong4: dc.l 0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
-
- ch1fxvars
- dc.w 0
- fxintc1:
- dc.w 0,0,0,0,0,0,0,0,0,0
- currfx1:
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
- ch2fxvars
- dc.w 0
- fxintc2:
- dc.w 0,0,0,0,0,0,0,0,0,0
- currfx2:
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
-
- ch3fxvars
- dc.w 0
- fxintc3:
- dc.w 0,0,0,0,0,0,0,0,0,0
- currfx3:
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
- ch4fxvars
- dc.w 0
- fxintc4:
- dc.w 0,0,0,0,0,0,0,0,0,0
- currfx4:
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- ;************************************************************
-
- dummy_reg dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- ;************************************************************
-
- ;PISTOL.CON 4026 rwed Future 00:24:00
- ;HEARTWHI.CON 180 rwed Future 00:20:00
- ;HEARBLIP.CON 1748 rwed Future 00:17:00
- ;XRAY.CON 4908 rwed Future 00:06:00
- ;BOOKSHUF.CON 11124 rwed Future 00:03:00
- ;SCOPE1.CON 3750 rwed Future 00:01:00
- ;SCOPE.CON 3750 rwed Future 00:01:00
- ;DOC.CON 12548 rwed Future 00:03:00
- ;DOOROPEN.CON 8604 rwed Future 01:49:00
- ;HOOPSWIS.CON 9520 rwed Future 01:30:00
- ;PLANT.CON 7334 rwed Future 01:28:00
- ;EXERCIS2.CON 4864 rwed Future 01:21:00
- ;EXERCIS1.CON 4864 rwed Future 01:21:00
- ;FDRAWER.CON 4700 rwed Future 01:15:00
- ;BIN.CON 9682 rwed Future 01:01:00
- ;FANLOOP2.CON 2618 rwed Future 00:59:00
- ;FANLOOP.CON 3532 rwed Future 00:58:00
- ;MONIZIP.CON 5390 rwed Future 00:56:00
- ;BOOKCLUN.CON 3708 rwed Future 00:53:00
- ;PENRATTL.CON 6400 rwed Future 00:53:00
- ;CLACK.CON 2004 rwed Future 00:23:00
-
-
-
-
-
- ; fx patterns here
-
- fxjump_table:
-
- dc.l clackp
- dc.l pen_rattlep
- dc.l book_openp
- dc.l mon_zipp
- dc.l fanp
- dc.l binp
- dc.l leafp
- dc.l calc_zipp
- dc.l filingp
- dc.l ex1p
- dc.l ex2p
- dc.l hoopsp
- dc.l doorp
- dc.l docp
- dc.l micupp
- dc.l micdownp
- dc.l book_shelfp
- dc.l xrayp
- dc.l hmachine
-
- dc.l iconplus
- dc.l iconminus
- dc.l auto_select
- dc.l manual_select
-
- dc.l pistolp
-
-
- max_fx dc.l 25
-
- ;************************************
-
-
- clackp:
- dc.w new_env
- dc.l clack_env
- dc.w new_snd
- dc.l clack
- dc.w r16,8
- dc.w end_fxp
-
- clack_env dc.w 0,64,255
-
- *********************************
-
-
- pen_rattlep:
- dc.w new_env
- dc.l penr_env
- dc.w new_snd
- dc.l penrattl
- dc.w r16,20
- dc.w end_fxp
-
- penr_env dc.w 0,64,255
-
- *********************************
-
-
- book_openp:
- dc.w new_env
- dc.l bo_env
- dc.w new_snd
- dc.l bookclun
- dc.w r16,13
- dc.w end_fxp
-
- bo_env dc.w 0,64,255
-
- *********************************
-
-
- mon_zipp:
- dc.w new_env
- dc.l mz_env
- dc.w new_snd
- dc.l monizip
- dc.w r16,18
- dc.w end_fxp
-
- mz_env dc.w 0,64,255
-
- *********************************
-
-
- fanp:
- dc.w new_env
- dc.l fan_env
- dc.w new_snd
- dc.l fanloop
- dc.w r4,65000
- dc.w end_fxp
-
- fan_env dc.w 0,64,255
-
- *********************************
-
- binp:
- dc.w new_env
- dc.l bin_env
- dc.w new_snd
- dc.l bin
- dc.w r16,32
- dc.w end_fxp
-
- bin_env dc.w 0,64,255
-
- *********************************
-
- leafp:
- dc.w new_env
- dc.l leaf_env
- dc.w new_snd
- dc.l plant
- dc.w r12,35
- dc.w end_fxp
-
- leaf_env dc.w 0,64,255
-
- *********************************
-
-
-
-
- calc_zipp:
- dc.w new_env
- dc.l mz_env
- dc.w new_snd
- dc.l monizip
- dc.w r20,10
- dc.w end_fxp
-
- cz_env dc.w 0,64,255
-
- *********************************
-
- filingp:
- dc.w new_env
- dc.l fc_env
- dc.w new_snd
- dc.l fdrawer
- dc.w r8,32
- dc.w end_fxp
-
- fc_env dc.w 0,64,255
-
-
- *********************************
-
- ex1p:
- dc.w new_env
- dc.l ex1_env
- dc.w new_snd
- dc.l exercis1
- dc.w r8,32
- dc.w end_fxp
-
- ex1_env dc.w 0,64,255
-
-
- *********************************
-
- ex2p:
- dc.w new_env
- dc.l ex2_env
- dc.w new_snd
- dc.l exercis2
- dc.w r8,32
- dc.w end_fxp
-
- ex2_env dc.w 0,64,255
-
-
- *********************************
-
-
- hoopsp:
- dc.w new_env
- dc.l h_env
- dc.w new_snd
- dc.l hoopswis
- dc.w r8,65
- dc.w end_fxp
-
- h_env dc.w 0,64,255
-
-
- *********************************
-
-
- doorp:
- dc.w new_env
- dc.l do_env
- dc.w new_snd
- dc.l dooropen
- dc.w r8,55
- dc.w end_fxp
-
- do_env dc.w 0,64,255
-
-
- *********************************
-
-
- docp:
- dc.w new_env
- dc.l doc_env
- dc.w new_snd
- dc.l doc
- dc.w r10,62
- dc.w pbend,down,1,60000,1
- dc.w r10,50
- dc.w pboff
- dc.w end_fxp
-
- doc_env dc.w 0,64,255
-
-
- *********************************
-
- micupp:
- dc.w new_env
- dc.l m_env
- dc.w new_snd
- dc.l scope
- dc.w r16,15
- dc.w end_fxp
-
- m_env dc.w 0,44,255
-
-
- *********************************
-
- micdownp:
- dc.w new_env
- dc.l m_env
- dc.w new_snd
- dc.l scope1
- dc.w r16,15
- dc.w end_fxp
-
-
-
- *********************************
-
- book_shelfp:
- dc.w new_env
- dc.l bs_env
- dc.w new_snd
- dc.l bookshuf
- dc.w r16,38
- dc.w end_fxp
-
- bs_env dc.w 0,64,255
-
-
- *********************************
-
- xrayp:
- dc.w new_env
- dc.l xr_env
- dc.w new_snd
- dc.l xray
- dc.w r16,18
- dc.w end_fxp
-
- xr_env dc.w 0,64,255
-
-
- *********************************
-
-
- hmachine:
- hrpt dc.w new_env
- dc.l whirr_env
- dc.w new_snd
- dc.l heartwhi
- dc.w r8,60
-
- dc.w new_env
- dc.l blip_env
- dc.w new_snd
- dc.l hearblip
- dc.w r16,5
- dc.w repeat
- dc.l hrpt
-
-
- dc.w end_fxp
-
-
- blip_env dc.w 0,64,255
- whirr_env dc.w 0,8,255
-
-
- *********************************
-
- iconplus:
- dc.w new_env
- dc.l ip_env
- dc.w new_snd
- dc.l sined
- dc.w r20,50
- dc.w end_fxp
-
- ip_env dc.w 0,64,255
-
-
- *********************************
-
- iconminus:
- dc.w new_env
- dc.l ip_env
- dc.w new_snd
- dc.l sined
- dc.w r12,50
- dc.w end_fxp
-
-
-
- *********************************
-
- manual_select:
- dc.w new_env
- dc.l ip_env
- dc.w new_snd
- dc.l sined
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w r20,2,r8,2,r20,2,r8,2
- dc.w end_fxp
-
-
- *********************************
-
-
- auto_select:
- dc.w new_env
- dc.l ip_env
- dc.w new_snd
- dc.l sined
- dc.w pbend,down,20,60000,1
- dc.w c01,50
- dc.w pboff
- dc.w end_fxp
-
-
- *********************************
-
-
- pistolp:
- dc.w new_env
- dc.l pist_env
- dc.w new_snd
- dc.l pistol
- dc.w r12,20
- dc.w end_fxp
-
- pist_env dc.w 0,64,255
-
- *********************************
-
-
-
-
-
- sstart: dc.l 0,end_song
-
- pstart: dc.w end_patt
-
-
- ;----------------------------------
-
-
-
- pr:
- dc.w rest,cr*4
- dc.w end_patt
-
- prf dc.w rest,cr*500
- dc.w end_patt
-
-
-
-
- ;**************************************
-
-
- PISTOL
-
- dc.w 1
- dc.l PISTOLd
- dc.w 4026/2
- dc.l rest_data
- dc.w 16/2
-
- HEARTWHI
- dc.w 1
- dc.l HEARTWHId
- dc.w 180/2
- dc.l HEARTWHId
- dc.w 180/2
-
-
- HEARBLIP
- dc.w 1
- dc.l HEARBLIPd
- dc.w 1748/2
- dc.l rest_data
- dc.w 16/2
-
- XRAY
- dc.w 1
- dc.l XRAYd
- dc.w 4908/2
- dc.l rest_data
- dc.w 16/2
-
-
- BOOKSHUF
- dc.w 1
- dc.l BOOKSHUFd
- dc.w 11124/2
- dc.l rest_data
- dc.w 16/2
-
- SCOPE1
- dc.w 1
- dc.l SCOPE1d
- dc.w 3750/2
- dc.l rest_data
- dc.w 16/2
-
- SCOPE
- dc.w 1
- dc.l SCOPEd
- dc.w 3750/2
- dc.l rest_data
- dc.w 16/2
-
- DOC
- dc.w 1
- dc.l DOCd
- dc.w 12548/2
- dc.l rest_data
- dc.w 16/2
-
- DOOROPEN
- dc.w 1
- dc.l DOOROPENd
- dc.w 8604/2
- dc.l rest_data
- dc.w 16/2
-
-
- HOOPSWIS
- dc.w 1
- dc.l HOOPSWISd
- dc.w 9520/2
- dc.l rest_data
- dc.w 16/2
-
-
- PLANT
- dc.w 1
- dc.l PLANTd
- dc.w 7334/2
- dc.l rest_data
- dc.w 16/2
-
- EXERCIS2
- dc.w 1
- dc.l EXERCIS2d
- dc.w 4864/2
- dc.l rest_data
- dc.w 16/2
-
- EXERCIS1
- dc.w 1
- dc.l EXERCIS1d
- dc.w 4864/2
- dc.l rest_data
- dc.w 16/2
-
- FDRAWER
- dc.w 1
- dc.l FDRAWERd
- dc.w 4700/2
- dc.l rest_data
- dc.w 16/2
-
-
- BIN
- dc.w 1
- dc.l BINd
- dc.w 9682/2
- dc.l rest_data
- dc.w 16/2
-
- FANLOOP
- dc.w 1
- dc.l FANLOOPd
- dc.w 2618/2
- dc.l FANLOOPd
- dc.w 2618/2
-
- MONIZIP
- dc.w 1
- dc.l MONIZIPd
- dc.w 3532/2
- dc.l rest_data
- dc.w 16/2
-
-
- BOOKCLUN
- dc.w 1
- dc.l BOOKCLUNd
- dc.w 3708/2
- dc.l rest_data
- dc.w 16/2
-
- PENRATTL
- dc.w 1
- dc.l PENRATTLd
- dc.w 6400/2
- dc.l rest_data
- dc.w 16/2
-
- CLACK
- dc.w 1
- dc.l CLACKd
- dc.w 2004/2
- dc.l rest_data
- dc.w 16/2
-
- sined
- dc.w 1
- dc.l sine_datad
- dc.w 32/2
- dc.l sine_datad
- dc.w 32/2
-
-
-
- rest_data
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
-
-
- sine_datad:
- dc.w 127,100,50,25,0,-25,-50,-100,-127
- dc.w -127,-100,-50,-25,0,25,50,100,127
-
-
-
-
- rest_env: dc.w 0,0,0,0,0,0,0,0,255
-
- ;**************************************************
-
- PISTOLd incbin ram:PISTOL.CON
- HEARTWHId incbin ram:HEARTWHI.CON
- HEARBLIPd incbin ram:HEARBLIP.CON
- XRAYd incbin ram:XRAY.CON
- BOOKSHUFd incbin ram:BOOKSHUF.CON
- SCOPE1d incbin ram:SCOPE1.CON
- SCOPEd incbin ram:SCOPE.CON
- DOCd incbin ram:DOC.CON
- DOOROPENd incbin ram:DOOROPEN.CON
- HOOPSWISd incbin ram:HOOPSWIS.CON
- PLANTd incbin ram:HOOPSWIS.CON
- EXERCIS2d incbin ram:EXERCIS2.CON
- EXERCIS1d incbin ram:EXERCIS1.CON
- FDRAWERd incbin ram:FDRAWER.CON
- BINd incbin ram:BIN.CON
- FANLOOP2d incbin ram:FANLOOP2.CON
- FANLOOPd incbin ram:FANLOOP.CON
- MONIZIPd incbin ram:MONIZIP.CON
- BOOKCLUNd incbin ram:BOOKCLUN.CON
- PENRATTLd incbin ram:PENRATTL.CON
- CLACKd incbin ram:CLACK.CON
-
-
-
-
-
-
-
- END
-
-
- ;; dc.w modon,1,1,8,8,6,6
- ;dc.w pbend,down,20,60000,1
- ;dc.w c01,cr*32
-
-
- myfile empty rwed Today 22:54:09
- PISTOL.CON 4026 rwed Future 00:24:00
- HEARTWHI.CON 180 rwed Future 00:20:00
- HEARBLIP.CON 1748 rwed Future 00:17:00
- XRAY.CON 4908 rwed Future 00:06:00
- BOOKSHUF.CON 11124 rwed Future 00:03:00
- SCOPE1.CON 3750 rwed Future 00:01:00
- SCOPE.CON 3750 rwed Future 00:01:00
- DOC.CON 12548 rwed Future 00:03:00
- DOOROPEN.CON 8604 rwed Future 01:49:00
- HOOPSWIS.CON 9520 rwed Future 01:30:00
- PLANT.CON 7334 rwed Future 01:28:00
- EXERCIS2.CON 4864 rwed Future 01:21:00
- EXERCIS1.CON 4864 rwed Future 01:21:00
- FDRAWER.CON 4700 rwed Future 01:15:00
- BIN.CON 9682 rwed Future 01:01:00
- FANLOOP2.CON 2618 rwed Future 00:59:00
- FANLOOP.CON 3532 rwed Future 00:58:00
- MONIZIP.CON 5390 rwed Future 00:56:00
- BOOKCLUN.CON 3708 rwed Future 00:53:00
- PENRATTL.CON 6400 rwed Future 00:53:00
- CLACK.CON 2004 rwed Future 00:23:00
- 22 files - 258 blocks used
-
-
-
-
-
-
-