mpt.asx
资源名称:tcpmp.rar [点击查看]
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:11k
源码类别:
Windows CE
开发平台:
C/C++
- *----------------*
- * Player MPT 2.4 *
- * ver.spackowana *
- *----------------*
- org $0500
- *--- strona 0
- addr equ $ec ,$ed
- word equ $ee ,$ef
- audzer equ $f0 ,$f1 ,$f2 ,$f3
- licslp equ $f4 ,$f5 ,$f6 ,$f7
- lensmp equ $f8
- lsbmsb equ $f9
- adrs1 equ $fa ,$fb
- adrs2 equ $fc ,$fd
- adrsmp equ $fe ,$ff
- *--- program
- jmp init
- play lda czygrc
- bne *+3
- rts
- lda #0
- sta oraaud
- inc licz
- lda pozptr
- cmp maxptr
- bcc r1
- dec zegar
- beq p1
- jmp r5
- p1 ldx #0
- stx pozptr
- p2 lda #0
- sta ptrwsk,x
- sta licspc,x
- lda adrtrl,x
- sta addr
- lda adrtrh,x
- sta addr+1
- ldy pozsng
- p3 lda (addr),y
- iny
- cmp #$ff
- beq p5
- cmp #$fe
- bne p6
- p4 jmp inic2
- p5 lda (addr),y
- bmi p4
- asl @
- tay
- sty pozsng
- jmp p3
- p6 sta numptr,x
- lda (addr),y
- sta poddzw,x
- p7 inx
- cpx #4
- bne p2
- iny
- sty pozsng
- jmp r5
- r1 dec zegar
- bpl r5
- lda tempo
- sta zegar
- ldx #3
- r2 dec licspc,x
- bpl r4
- lda numptr,x
- asl @
- tay
- aptrlz lda $ffff,y
- sta addr
- iny
- aptrhz lda $ffff,y
- sta addr+1
- ora addr
- beq r4
- lda ptrwsk,x
- sta licptr
- jsr newdzw
- ldy licptr
- iny
- tya
- sta ptrwsk,x
- lda ilespc,x
- sta licspc,x
- cpx #2
- bne r4
- lda adcvol,x
- eor #$f
- asl @
- asl @
- asl @
- asl @
- adc <volstb
- sta volsmp+1
- lda >volstb
- adc #0
- sta volsmp+2
- r4 dex
- bpl r2
- inc pozptr
- r5 ldx #1
- lda typsmp
- cmp #2
- beq r6
- ldx #3
- r6 lda typsmp
- cmp #2
- bne r7
- cpx kansmp
- beq r8
- r7 jmp dzwiek
- r8 lda audzer,x
- and filtry,x
- beq r9
- ldy #$28
- lda (addr),y
- clc
- adc numdzw,x
- jsr czest
- sec
- adc p1pom,x
- sta freq+2,x
- r9 dex
- bpl r6
- lda #3
- sta $d20f
- lda audzer+1
- and #$10
- beq w1
- ldy numdzw+1
- lda bsfrql,y
- sta freq
- lda bsfrqh,y
- sta freq+1
- w1 lda freq
- sta $d200
- lda freq+1
- sta $d202
- lda freq+2
- sta $d204
- lda freq+3
- sta $d206
- lda volume
- ldx #$ff
- ldy typsmp
- cpy #1
- bne w2
- ldx kansmp
- beq w3
- w2 sta $d201
- w3 lda volume+1
- cpx #1
- beq w4
- sta $d203
- w4 cpy #2
- beq w6
- lda volume+2
- cpx #2
- beq w5
- sta $d205
- w5 lda volume+3
- cpx #3
- beq w6
- sta $d207
- w6 lda audzer
- ora audzer+1
- ora audzer+2
- ora audzer+3
- ora oraaud
- sta $d208
- rts
- filtry dta b(4),b(2),b(0),b(0)
- dzwiek lda adrinl,x
- sta addr
- lda adrinh,x
- sta addr+1
- ora addr
- bne d0
- sta volume,x
- sta audzer,x
- jmp r9
- d0 ldy licslp,x
- cpy #$20
- beq d3
- lda (addr),y
- sec
- sbc adcvol,x
- bit sprvol
- beq d1
- and #$f0
- d1 sta volume,x
- iny
- lda (addr),y
- sta przech
- iny
- sty licslp,x
- and #7
- beq d4
- tay
- lda akcadl-1,y
- sta akjmpz+1
- lda akcadh-1,y
- sta akjmpz+2
- lda przech
- lsr @
- lsr @
- lsr @
- lsr @
- lsr @
- ora #$28
- tay
- lda (addr),y
- clc
- akjmpz jsr $ffff
- d2 lda #0
- sta audzer,x
- jmp r9
- d3 lda p3max,x
- beq d4
- dec p3lic,x
- bne d4
- sta p3lic,x
- lda volume,x
- and #15
- beq d4
- dec volume,x
- d4 ldy #$23
- lda (addr),y
- sta audzer,x
- lda trnlic,x
- clc
- adc #$25
- tay
- and #3
- sta trnlic,x
- dey
- lda (addr),y
- adc adcdzw,x
- sta numdzw,x
- jsr czest+2
- sta freq,x
- lda p2lic,x
- beq d5
- dec p2lic,x
- jmp r8
- d5 lda branch,x
- sta p1jmpz+1
- p1jmpz bpl *
- jmp typ0dz
- brk
- jmp typ1dz
- brk
- jmp typ2dz
- brk
- jmp typ3dz
- czygrc dta b(0)
- jmp typ4dz
- zapisx dta b(0)
- jmp typ5dz
- zapisy dta b(0)
- jmp typ6dz
- sprvol dta b($10)
- jmp typ7dz
- newdzw lda #0
- sta adcvol,x
- ldy licptr
- dey
- new iny
- lda (addr),y
- cmp #$fe
- bne q0
- sty licptr
- rts
- q0 cmp #$e0
- bcc q1
- lda maxptr
- sta pozptr
- bne new
- q1 cmp #$d0
- bcc q2
- and #15
- sta tempo
- sta zegar
- bpl new
- q2 cmp #$c0
- bcc q3
- and #15
- eor #15
- sta adcvol,x
- bpl new
- q3 cmp #$80
- bcc q4
- and #$3f
- sta ilespc,x
- bpl new
- q4 cmp #$40
- bcc q5
- iny
- sty licptr
- and #$1f
- sta numsmp,x
- asl @
- tay
- ainslz lda $ffff,y
- sta adrinl,x
- iny
- ainshz lda $ffff,y
- sta adrinh,x
- jmp newdzw
- q5 sty licptr
- sta przech
- clc
- adc poddzw,x
- sta adcdzw,x
- lda typsmp
- beq n9
- cmp #2
- beq n8
- lda numsmp,x
- cmp #$1f
- bne n9
- lda przech
- sec
- sbc #1
- n6 and #15
- tay
- lda (adrsmp),y
- sta adrs2+1
- tya
- ora #$10
- tay
- lda (adrsmp),y
- sta lensmp
- ldy #1
- ora adrs2+1
- bne n7
- ldy #0
- n7 sty czysmp
- lda #0
- sta adrs2
- sta adrinl,x
- sta adrinh,x
- txa
- asl @
- sta wsksmp
- stx kansmp
- rts
- n8 cpx #2
- bcs nb
- n9 lda adrinl,x
- sta word
- lda adrinh,x
- sta word+1
- ora word
- beq na-1
- ldy #$20
- lda (word),y
- and #15
- sta p1lsb,x
- lda (word),y
- and #$70
- lsr @
- lsr @
- sta branch,x
- iny
- lda (word),y
- asl @
- asl @
- pha
- and #$3f
- sta p2lic,x
- pla
- and #$c0
- sta frqwsk,x
- iny
- lda (word),y
- sta p3max,x
- sta p3lic,x
- lda #0
- sta licslp,x
- sta trnlic,x
- sta p1lic,x
- sta p1pom,x
- lda adcdzw,x
- sta numdzw,x
- jsr czest
- sta freq,x
- cpx kansmp
- beq na
- rts
- na ldy #$ff
- sty kansmp
- iny
- sty czysmp
- rts
- nb cpx #2
- bne nd
- ldy adcdzw+2
- lda frsmpl,y
- sta smpl1z+1
- lda frsmph,y
- sta smpl2z+1
- lda #0
- sta lsbmsb
- sta adrs1
- lda numsmp+2
- and #15
- tay
- lda (adrsmp),y
- sta adrs1+1
- tya
- ora #$10
- tay
- lda (adrsmp),y
- sta smpl3z+1
- ora adrs1+1
- bne nc
- sta smpl1z+1
- sta smpl2z+1
- nc rts
- nd lda numsmp+3
- and #15
- tay
- lda (adrsmp),y
- sta adrs2+1
- tya
- ora #$10
- tay
- lda (adrsmp),y
- ora adrs2+1
- beq ne
- lda (adrsmp),y
- sec
- sbc adrs2+1
- sta lensmp
- lda #0
- sta adrs2
- lda #$8d
- bne nf
- ne lda #$ad
- nf sta drum2z
- sta drum1z
- lda #$18
- sta $d207
- rts
- typ0dz lda licz
- and #7
- lsr @
- lsr @
- bcc t2
- bne typ1dz
- lda p1lsb,x
- t1 clc
- sta p1pom,x
- adc freq,x
- sta freq,x
- jmp r8
- t2 lda #0
- sta p1pom,x
- jmp r8
- typ1dz lda freq,x
- sec
- sbc p1lsb,x
- sta freq,x
- sec
- lda #0
- sbc p1lsb,x
- sta p1pom,x
- jmp r8
- typ2dz lda p1lic,x
- clc
- sta p1pom,x
- adc freq,x
- t3 sta freq,x
- clc
- lda p1lic,x
- adc p1lsb,x
- sta p1lic,x
- jmp r8
- typ3dz lda numdzw,x
- sec
- sbc p1lic,x
- t4 sta numdzw,x
- jsr czest
- jmp t3
- typ4dz lda #0
- sec
- sbc p1lic,x
- sta p1pom,x
- lda freq,x
- sec
- sbc p1lic,x
- jmp t3
- typ5dz lda numdzw,x
- clc
- adc p1lic,x
- jmp t4
- typ6dz jsr t5
- jmp t1
- typ7dz jsr t5
- clc
- adc numdzw,x
- jsr a3
- jmp r8
- t5 ldy p1lic,x
- lda p1lsb,x
- bmi t6
- iny
- iny
- t6 dey
- tya
- sta p1lic,x
- cmp p1lsb,x
- bne t7
- lda p1lsb,x
- eor #$ff
- sta p1lsb,x
- t7 lda p1lic,x
- rts
- czest and #$3f
- ora frqwsk,x
- tay
- t1frqz lda $ffff,y
- rts
- akcadl dta l(a1),l(a0),l(a2)
- dta l(a4),l(a5),l(a6),l(a8)
- akcadh dta h(a1),h(a0),h(a2)
- dta h(a4),h(a5),h(a6),h(a8)
- audora dta b($40),b(0),b($20),b(0)
- a0 adc freq,x
- a1 sta freq,x
- rts
- a2 adc adcdzw,x
- a3 sta numdzw,x
- jsr czest
- sta freq,x
- rts
- a4 sta freq,x
- lda audora,x
- bpl a7
- a5 sta freq,x
- lda #$80
- bne a7
- a6 sta freq,x
- lda #1
- a7 ora oraaud
- sta oraaud
- rts
- a8 and $d20a
- sta freq,x
- a9 rts
- bsfrql equ *-1
- dta b($f2),b($33),b($96)
- dta b($e2),b($38),b($8c),b(0)
- dta b($6a),b($e8),b($6a),b($ef)
- dta b($80),b(8),b($ae),b($46)
- dta b($e6),b($95),b($41),b($f6)
- dta b($b0),b($6e),b($30),b($f6)
- dta b($bb),b($84),b($52),b($22)
- dta b($f4),b($c8),b($a0),b($7a)
- dta b($55),b($34),b($14),b($f5)
- dta b($d8),b($bd),b($a4),b($8d)
- dta b($77),b($60),b($4e),b($38)
- dta b($27),b($15),b(6),b($f7)
- dta b($e8),b($db),b($cf),b($c3)
- dta b($b8),b($ac),b($a2),b($9a)
- dta b($90),b($88),b($7f),b($78)
- dta b($70),b($6a),b($64),b($5e)
- bsfrqh equ *-1
- dta b(13,13,12,11,11,10,10,9,8,8,7,7,7,6,6)
- dta b(5,5,5,4,4,4,4,3,3,3,3,3,2,2,2,2)
- dta b(2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,0)
- dta b(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
- volstb dta d'8888888888888888'
- dta d'667777888889999:'
- dta d'556667788899:::;'
- dta d'455667788899::;;'
- dta d'44556677899::;;<'
- dta d'34456677899::;<<'
- dta d'33455677899:;;<='
- dta d'23445677899:;<<='
- dta d'2334566789::;<=='
- dta d'2234566789::;<=>'
- dta d'1234566789::;<=>'
- dta d'1234556789:;;<=>'
- dta d'1234456789:;<<=>'
- dta d'1233456789:;<==>'
- dta d'1223456789:;<=>>'
- dta d'0123456789:;<=>?'
- frsmpl dta b($20),b($22),b($24),b($26),b($29)
- dta b($2b),b($2e),b($30),b($33),b($37)
- dta b($3a),b($3d),b($41),b($45),b($49)
- dta b($4d),b($52),b($57),b($5c),b($61)
- dta b($67),b($6e),b($74),b($7b),b($82)
- dta b($8a),b($92),b($9b),b($a4),b($ae)
- dta b($b8),b($c3),b($cf),b($dc),b($e9)
- dta b($f6),b(5),b($15),b($25),b($37)
- dta b($49),b($5d),b($71),b($87),b($9f)
- dta b($b8),b($d2),b($ed),b($b),b($2a)
- dta b($4b),b($6e),b($93),b($ba),b($e3)
- dta b($f),b($3e),b($70),b($a4),b($db)
- frsmph dta d' '
- dta d' '
- dta d' !!!!!!!!!'
- dta d'!!!"""""""#####'
- *--- inicjacja
- iniadl dta l(inic0),l(inic2)
- dta l(inic4),l(inic5)
- dta l(inic6),l(inic7)
- dta l(inic8),l(inic9)
- iniadh dta h(inic0),h(inic2)
- dta h(inic4),h(inic5)
- dta h(inic6),h(inic7)
- dta h(inic8),h(inic9)
- init stx zapisx
- sty zapisy
- and #7
- tay
- lda iniadl,y
- sta inic1+1
- lda iniadh,y
- sta inic1+2
- inic1 jmp $ffff
- inic0 lda zapisy
- ldx zapisx
- sta ainslz+1
- sta ainshz+1
- stx ainslz+2
- stx ainshz+2
- clc
- adc #$40
- sta aptrlz+1
- sta aptrhz+1
- bcc i2
- inx
- i2 stx aptrlz+2
- stx aptrhz+2
- clc
- adc #$80
- sta t1frqz+1
- bcc i4
- inx
- i4 stx t1frqz+2
- inx
- sta j4+1
- stx j4+2
- ldx #9
- j4 lda $ffff,x
- sta adrtrl,x
- dex
- bpl j4
- dec tempo
- inic2 lda #0
- sta czygrc
- ldx <licptr-branch
- i9 sta branch,x
- dex
- bpl i9
- ldx #8
- k9 sta $d200,x
- dex
- bpl k9
- rts
- inic4 jsr inic2
- lda zapisx
- asl @
- sta pozsng
- lda maxptr
- sta pozptr
- lda #1
- sta zegar
- sta czygrc
- rts
- inic5 lda zapisy
- sta adrsmp
- lda zapisx
- sta adrsmp+1
- j5 rts
- inic6 lda zapisy
- and #3
- tax
- lda zapisx
- jsr n6
- lda czysmp
- beq j5
- asl zapisy
- j6 jsr nopy
- lda #1
- sta typsmp
- j7 lda czysmp
- beq j5
- cmp #1
- bne j9
- ldy #0
- inc czysmp
- j9 lda (adrs2),y
- ldx wsksmp
- lsr @
- lsr @
- lsr @
- lsr @
- ora #$10
- k15h1z sta $d40a
- sta $d40a
- sta $d201,x
- lda (adrs2),y
- ora #$10
- k15h2z sta $d40a
- sta $d40a
- sta $d201,x
- iny
- bne j7
- inc adrs2+1
- lda adrs2+1
- cmp lensmp
- bne j7
- sty czysmp
- rts
- nopy bcc j8
- lda #$ea
- sta k15h1z
- sta k15h1z+1
- sta k15h1z+2
- sta k15h2z
- sta k15h2z+1
- sta k15h2z+2
- rts
- j8 lda #$8d
- sta k15h1z
- sta k15h2z
- lda #$a
- sta k15h1z+1
- sta k15h2z+1
- lda #$d4
- sta k15h1z+2
- sta k15h2z+2
- rts
- inic7 lda #0
- sta czysmp
- lda zapisx
- lsr @
- jsr nopy
- lda #1
- sta typsmp
- k1 jsr j7
- lda typsmp
- bne k1
- rts
- inic8 lda #2
- sta typsmp
- sta kansmp
- ressmp lda #$18
- sta $d207
- lda <ressmp+1
- sta adrs1
- lda >ressmp+1
- sta adrs1+1
- lda #$ad
- sta drum2z
- sta drum1z
- ldy #0
- sty smpl1z+1
- sty smpl2z+1
- k2 ldx $d40b
- lda (adrs2),y
- lsr @
- lsr @
- lsr @
- lsr @
- ora #$10
- drum1z sta $d207
- jsr k6
- k3 cpx $d40b
- beq k3
- sta $d205
- ldx $d40b
- lda (adrs2),y
- inc adrs2
- bne k4
- inc adrs2+1
- dec lensmp
- bne k4
- lda #$ad
- sta drum2z
- sta drum1z
- lda #8
- k4 ora #$10
- drum2z sta $d207
- jsr k6
- k5 cpx $d40b
- beq k5
- sta $d205
- lda typsmp
- bne k2
- rts
- k6 clc
- lda lsbmsb
- smpl1z adc #0
- sta lsbmsb
- lda adrs1
- smpl2z adc #0
- sta adrs1
- bcc k7
- inc adrs1+1
- lda adrs1+1
- smpl3z cmp #0
- bne k7
- sty smpl1z+1
- sty smpl2z+1
- rts
- k7 lda (adrs1),y
- bit lsbmsb
- bmi k8
- lsr @
- lsr @
- lsr @
- lsr @
- k8 and #15
- tay
- volsmp lda volstb,y
- ldy #0
- rts
- inic9 ldy #0
- sty typsmp
- sty czysmp
- dey
- sty kansmp
- rts
- *--- zmienne
- adrtrl org *+4
- adrtrh org *+4
- maxptr org *+1
- tempo org *+1
- branch org *+4
- volume org *+4
- adcvol org *+4
- freq org *+4
- frqwsk org *+4
- adcdzw org *+4
- poddzw org *+4
- adrinl org *+4
- adrinh org *+4
- numdzw org *+4
- numsmp org *+4
- numptr org *+4
- ptrwsk org *+4
- ilespc org *+4
- licspc org *+4
- p1lsb org *+4
- p1lic org *+4
- p1pom org *+4
- p2lic org *+4
- p3max org *+4
- p3lic org *+4
- trnlic org *+4
- zegar org *+1
- pozsng org *+1
- pozptr org *+1
- wsksmp org *+1
- kansmp org *+1
- czysmp org *+1
- typsmp org *+1
- oraaud org *+1
- licz org *+1
- przech org *+1
- licptr org *+1
- end