home *** CD-ROM | disk | FTP | other *** search
- Address Code Line Source text
-
- 000000 : 1
- 000000 : 2
- 000000 : 3 ; notetable
- 000000 : 4
- 000000 : 5 a02 equ 508
- 000000 : 6 Bb02 equ 480
- 000000 : 7 b02 equ 453
- 000000 : 8 c02 equ 428
- 000000 : 9 Db02 equ 404
- 000000 : 10 d02 equ 381
- 000000 : 11 eb02 equ 360
- 000000 : 12 e02 equ 339
- 000000 : 13 f02 equ 320
- 000000 : 14 gb02 equ 302
- 000000 : 15 g02 equ 285
- 000000 : 16
- 000000 : 17 a01 equ 254
- 000000 : 18 Bb01 equ 240
- 000000 : 19 b01 equ 226
- 000000 : 20 c01 equ 214
- 000000 : 21 Db01 equ 202
- 000000 : 22 d01 equ 190
- 000000 : 23 eb01 equ 180
- 000000 : 24 e01 equ 170
- 000000 : 25 f01 equ 160
- 000000 : 26 gb01 equ 151
- 000000 : 27 g01 equ 143
- 000000 : 28
- 000000 : 29
- 000000 : 30
- 000000 : 31 chann1reg equ $dff0a0 ;sta
- rt of ch1 registers
- 000000 : 32 end_patt equ $ffff
- 000000 : 33 dmacon equ $dff096
- 000000 : 34
- 000000 : 35 ; a0 points to channel vars
- 000000 : 36 ; a1 reads patt data/song data/en
- velope data
- 000000 : 37 ; a2 points to ch reg locations
- 000000 : 38 ; d0 used as general purpose regis
- ter
- 000000 : 39 ; d1 holds bits set for dma contro
- l reg
- 000000 : 40
- 000000 :41F9000000BE 41 lea ch1vars,a0
- 000006 :45F900DFF0A0 42 lea chann1reg,a2
- 00000C :323C8201 43 move.w #%1000001000000001,d1 ;
- enable ch 1
- 000010 : 44
- 000010 : 45
- 000010 : 46 ; *****************************
- 000010 : 47 ; this section checks channel current
- status
- 000010 : 48
- 000010 : 49 sect1:
- 000010 :0C500000 50 cmpi.w #0,(a0) ;
- for test disable
- 000014 :67000004 51 > beq sect1_j1
- 000018 :4E75 52 rts
- 00001A :0C6800000002 53 sect1_j1 cmpi.w #0,2(a0)
- ;counter at zero
- 000020 :67000052 54 > beq sect3 ;
- get new note
- 000024 :0C6800000004 55 cmpi.w #0,4(a0)
- ;is it looped data
- 00002A :6700001C 56 > beq sect2
- 00002E : 57 ; data is looped data
- 00002E :53680002 58 subq #1,2(a0)
- ;decrease counter
- 000032 :32680010 59 movea 16(a0),a1
- ;envelope data needed ?
- 000036 :0C1100FF 60 cmpi.b #255,(a1)
- 00003A :6700000A 61 > beq env_finished
- 00003E :15590008 62 move.b (a1)+,8(a2)
- ;send vol data
- 000042 :21490010 63 move.l a1,16(a0)
- ;store pointer
- 000046 :4E75 64 env_finished: rts
- ; finish
- 000048 : 65
- 000048 : 66 ; ****************************
- *
- 000048 : 67 ; this section sets the registers to
- rest data on the first
- 000048 : 68 ; interrupt following the note trigge
- r only
- 000048 : 69
- 000048 : 70 sect2:
- 000048 :0C6800000006 71 cmpi.w #0,6(a0)
- 00004E :6700001E 72 > beq dma_done
- 000052 : 73 ; move rest data into register
- s
- 000052 :24BC000000F0 74 move.l #restdata,(a2)
- 000058 :357C00180004 75 move.w #24,4(a2);length
- 00005E :357C00000008 76 move.w #0,8(a2) ;zero v
- olume
- 000064 :2179FFFF00010004 77 move.l $ffff0001,4(a0)
- ;max count+loop flag
- 00006C :4E75 78 rts
- 00006E :53680002 79 dma_done: subq #1,2(a0) ; dec
- int count
- 000072 :4E75 80 rts
- 000074 : 81
- 000074 : 82 ; ***************************
- **
- 000074 : 83
- 000074 : 84 ; this section gets new note data
- 000074 : 85
- 000074 : 86 sect3:
- 000074 :22680012 87 move.l 18(a0),a1 ;g
- et patt pointer
- 000078 :3019 88 move.w (a1)+,d0 ;
- next data to d0/pointer inc
- 00007A :0C400064 89 cmpi.w #100,d0
- ;control marker
- 00007E :63000028 90 > bls sect5 ;
- effects flags
- 000082 : 91 ;d1 holds next note pitch
- 000082 :3140000C 92 move.w d0,12(a0) ;s
- tore in curr pitch
- 000086 :31590002 93 move.w (a1)+,2(a0) ;s
- tore count
- 00008A :53680002 94 subq.w #1,2(a0) ;a
- nd decrease
- 00008E :21490012 95 move.l a1,18(a0) ;s
- tore patt pointer
- 000092 :0C6800000004 96 cmpi.w #0,4(a0) ;l
- oop or one shot
- 000098 :6600000E 97 > bne send_one_shot
- 00009C : 98 ; loop data trigger
- 00009C :35400006 99 move.w d0,6(a2) ;p
- itch to reg
- 0000A0 :33C100DFF096 100 move.w d1,dmacon ;s
- tart dma for current channel
- 0000A6 :4E75 101 rts
- 0000A8 : 102 send_one_shot:
- 0000A8 : 103
- 0000A8 : 104
- 0000A8 : 105
- 0000A8 : 106 ; *************************
- **********
- 0000A8 : 107 sect4:
- 0000A8 : 108
- 0000A8 : 109
- 0000A8 : 110
- 0000A8 : 111 ; *************************
- **********
- 0000A8 : 112 ; effects flags d0 holds jump
- offset
- 0000A8 :47F9000000B2 113 sect5: lea jump_table,a3
- 0000AE :4EF30000 114 jmp (a3,d0)
- 0000B2 :000000BE 115 jump_table: defl in_line_data
- 0000B6 :4E71 116 nop
- 0000B8 :4E71 117 nop
- 0000BA :4E71 118 nop
- 0000BC :4E71 119 nop
- 0000BE : 120 in_line_data:
- 0000BE : 121 ; data format = reg offset
- ,data,etc....,end_data
- 0000BE : 122
- 0000BE : 123
- 0000BE : 124
- 0000BE : 125
- 0000BE : 126
- 0000BE : 127
- 0000BE : 128
- 0000BE : 129
- 0000BE : 130
- 0000BE :0000 131 ch1vars defw 0 ; test
- disable
- 0000C0 :0000 132 defw 0 ; inter
- rupt counter
- 0000C2 :0000 133 defw 0 ; loop
- data flag
- 0000C4 :0000 134 defw 0 ; dma f
- lag
- 0000C6 : 135
- 0000C6 :00000000 136 defl 0 ; data address
- 0000CA :0000 137 defw 0 ; length
- 0000CC :0000 138 defw 0 ; pitch
- 0000CE :0000 139 defw 0 ; vol
- 0000D0 : 140
- 0000D0 :00000120 141 defl env1 ; env po
- inter
- 0000D4 :00000000 142 defl 0 ; patt p
- ointer
- 0000D8 :00000000 143 defl 0 ; song p
- ointer
- 0000DC : 144
- 0000DC : 145
- 0000DC : 146
- 0000DC : 147
- 0000DC : 148 sinedata:
- 0000DC :0009 149 defw 9 ;length
- 0000DE :005A7FA681A6 150 defb 0,90,127,-90,-127,-90
- 0000E4 :005A7FA681A6 151 defb 0,90,127,-90,-127,-90
- 0000EA :005A7FA681A6 152 defb 0,90,127,-90,-127,-90
- 0000F0 : 153
- 0000F0 : 154 restdata:
- 0000F0 : 155 ; length=24 words
- 0000F0 :0000000000000000 156 defw 0,0,0,0,0,0,0,0,0,0,0,
- 0000000000000000 0,0,0,0,0,0,0,0,0,0,0,0,0
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 000120 : 157
- 000120 : 158 env1:
- 000120 : 159
- 000120 : 160
- 000120 : 161
- 000120 : 162
- 000120 : 163
- 000120 : 164
- 000120 : 165
- 000120 : 166 end
- Symbol table
-
- A02 = 000001FC BB02 = 000001E0 B02 = 000001C5
-
- C02 = 000001AC DB02 = 00000194 D02 = 0000017D
-
- EB02 = 00000168 E02 = 00000153 F02 = 00000140
-
- GB02 = 0000012E G02 = 0000011D A01 = 000000FE
-
- BB01 = 000000F0 B01 = 000000E2 C01 = 000000D6
-
- DB01 = 000000CA D01 = 000000BE EB01 = 000000B4
-
- E01 = 000000AA F01 = 000000A0 GB01 = 00000097
-
- G01 = 0000008F CHANN1REG = 00DFF0A0 END_PATT = 0000FFFF
-
- DMACON = 00DFF096 SECT1 = 08000010 SECT1_J1 = 0800001A
-
- ENV_FINISHED = 08000046 SECT2 = 08000048 DMA_DONE = 0800006E
-
- SECT3 = 08000074 SEND_ONE_SHOT = 080000A8 SECT4 = 080000A8
-
- SECT5 = 080000A8 JUMP_TABLE = 080000B2
- IN_LINE_DATA = 080000BE CH1VARS = 080000BE SINEDATA = 080000DC
-
- RESTDATA = 080000F0 ENV1 = 08000120
-