User Tools

Site Tools


p3xtraplayer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
p3xtraplayer [2016/05/11 20:12] darkbytep3xtraplayer [2017/02/16 13:30] (current) darkbyte
Line 1: Line 1:
-==== protracker 3 extra player ====+====PT3 extreme player with fadeout==== 
 + 
 +----
  
 //Syntax is for ASL.// //Syntax is for ASL.//
Line 13: Line 15:
  cpu z80undoc  cpu z80undoc
  relaxed on  relaxed on
- 
- 
-music_init equ p3x_init 
-music_play equ p3x_play 
-music_stop equ p3x_mute 
  
  
Line 23: Line 20:
  
 demo di demo di
- call music_init+ ld hl,songdata 
 + call p3x_initv0
 demoloop ei demoloop ei
  halt  halt
- call music_play+ call p3x_play
  jr demoloop  jr demoloop
  
 +
 + ; bit.0 if you want to play without looping
 +; bit.1 if you play looped but fadeout after few seconds
 +; bit.7 is set each time when loop is passed
 +p3x_setup: db 2 ; 2 - fadeout after loop | 1 - loop forever
  
 ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
  
-p3x_init: ld hl,MDLADDR+p3x_init: ld hl,songdata
 p3x_initv0: ld (modaddr+1),hl p3x_initv0: ld (modaddr+1),hl
  ld (mdaddr2+1),hl  ld (mdaddr2+1),hl
Line 38: Line 41:
  ld de,100  ld de,100
  add hl,de  add hl,de
 + dec hl
 + ld a,(hl)
 + ld (NoteTableMode+1),a
 + inc hl
  ld a,(hl)  ld a,(hl)
  ld (Delay+1),a  ld (Delay+1),a
Line 93: Line 100:
  ld bc,VAR0END-vars-1  ld bc,VAR0END-vars-1
  ldir  ldir
- inc a 
- ld (DelyCnt),a 
  ld hl,$f001  ld hl,$f001
  ld (ChanA+CHP_NtSkCn),hl  ld (ChanA+CHP_NtSkCn),hl
Line 105: Line 110:
  ld (ChanC+CHP_OrnPtr),hl  ld (ChanC+CHP_OrnPtr),hl
  
- xor a 
  ld (p3x_globalvol+1),a  ld (p3x_globalvol+1),a
  ld (chkfadeout+1),a  ld (chkfadeout+1),a
- ld a,(NoteTableMode)+ inc a 
 + ld (DelyCnt),a 
 + 
 +NoteTableMode: ld a,$3a
  rla  rla
  and 7  and 7
Line 453: Line 460:
  ret  ret
  
-c_p3x_delay: ld a,(bc)+c_delay: ld a,(bc)
  inc bc  inc bc
  ld (Delay+1),a  ld (Delay+1),a
Line 501: Line 508:
  dw c_nop  dw c_nop
  dw c_engls  dw c_engls
- dw c_p3x_delay+ dw c_delay
  dw c_nop  dw c_nop
  dw c_nop  dw c_nop
Line 843: Line 850:
  ret  ret
  
-;zavolat forcefade 1-16 v akumulatore pre dohranie modulu po stlaceni klavesy.+;zavolat forcefade 1 v akumulatore pre dohranie modulu fadeoutom
 enablefade: ld a,48 enablefade: ld a,48
 forcefade: ld hl,chkfadeout+1 forcefade: ld hl,chkfadeout+1
Line 867: Line 874:
 divfadeout: ld a,$3e divfadeout: ld a,$3e
  srl a  srl a
 + ld l,a
 + srl l
 + add a,l
  jr nz,divfadeout1  jr nz,divfadeout1
  inc a  inc a
Line 1048: Line 1058:
  
  
-; bit.0 if you want to play without looping 
-; bit.1 if you play looped but fadeout after few seconds 
-; bit.7 is set each time when loop is passed 
-p3x_setup: db 2 ; 2 - fadeout after loop | 1 - loop forever 
  
 + org $C000
  
 ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
-; music in ProTracker 3.6 (Vortex Tracker II) format (without 99 byte header) +; music in ProTracker 3.6 (Vortex Tracker II) format 
-songdata binclude "music.pt3",99+songdata binclude "music.pt3" 
 +</code>
  
-NoteTableMode equ songdata +----
-p3x_delay equ songdata+1 +
-MDLADDR equ songdata-99 +
-</code>+
  
-Navigation: [[general]] . [[math]] . [[graphic]] . [[sound]] . [[system]] . [[other]] . back to [[start]]+**Navigation: [[general]] . [[math]] . [[graphic]] . [[sound]] . [[system]] . [[other]] . back to [[start]]**
p3xtraplayer.1462990328.txt.gz · Last modified: 2016/05/11 20:12 by darkbyte