User Tools

Site Tools


p3xtraplayer

Differences

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

Link to this comparison view

Next revision
Previous revision
p3xtraplayer [2016/05/04 22:34] – created 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.//
  
 <code z80> <code z80>
Line 11: 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 21: 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 36: 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 91: 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 103: 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 451: 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 499: 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 841: Line 850:
  ret  ret
  
-enablefade: ld hl,chkfadeout+1+;zavolat forcefade s 1 v akumulatore pre dohranie modulu fadeoutom 
 +enablefade: ld a,48 
 +forcefade: ld hl,chkfadeout+1
  inc (hl)  inc (hl)
  ld hl,(CrPsPtr+1)  ld hl,(CrPsPtr+1)
  ld (resetfadeout+1),hl  ld (resetfadeout+1),hl
  ld (resetfadeout1+1),bc  ld (resetfadeout1+1),bc
- ld a,48 
  ld (conutfadeout+1),a  ld (conutfadeout+1),a
  ld (divfadeout+1),a  ld (divfadeout+1),a
Line 864: 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 1045: 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 "follin.pt3",99+songdata binclude "music.pt3" 
 +</code>
  
-NoteTableMode equ songdata +---- 
-p3x_delay equ songdata+1 + 
-MDLADDR equ songdata-99 +**Navigation: [[general]] . [[math]] . [[graphic]] . [[sound]] . [[system]] . [[other]] . back to [[start]]**
-</code>+
p3xtraplayer.1462394091.txt.gz · Last modified: 2016/05/04 22:34 by darkbyte