Browse Source

Tune: Add printing of song name and artist for PT2 and PT3s

pull/143/head
ed 6 years ago
parent
commit
10b320c6c0
  1. 25
      Source/Apps/Tune/Tune.asm
  2. 2
      Source/Apps/Tune/printing.inc

25
Source/Apps/Tune/Tune.asm

@ -295,7 +295,27 @@ GOPT3 LD A,0 ; SETUP value to PT3 sound files
LD DE,185 ; Avg TS / quark = 7400, so 185 delay loops
JR GOPTX ; Play PTx file
GOPTX LD HL,(QDLY) ; Get basic quark delay
GOPTX
CALL CRLF2
LD DE, MSGSONGNAME ; Print song name message
CALL PRTSTR
LD DE, MDLADDR + $1E ; Print 32 character long song name from module
LD B, $20
GOPTX1 LD A,(DE)
CALL PRTCHR
INC DE
DJNZ GOPTX1
CALL CRLF
LD DE, MSGARTIST ; Print "by" message
CALL PRTSTR
LD DE, MDLADDR + $42 ; Print 32 character long composer/artist from module
LD B, $20
GOPTX2 LD A,(DE)
CALL PRTCHR
INC DE
DJNZ GOPTX2
CALL CRLF
LD HL,(QDLY) ; Get basic quark delay
OR A ; Clear carry
SBC HL,DE ; Adjust for file type
LD (QDLY),HL ; Save updated quark delay factor
@ -609,6 +629,9 @@ HWSTR_RCEB .DB "RC2014 Sound Module (EB)",0
HWSTR_RCMF .DB "RC2014 Sound Module (MF)",0
MSGUNSUP .db "MYM FILES NOT SUPPORTED YET\r\n", 0
MSGSONGNAME .DB "Song name: ", 0
MSGARTIST .DB "by: ", 0
;
;===============================================================================
; PTx Player Routines

2
Source/Apps/Tune/printing.inc

@ -24,7 +24,7 @@ PRTDOT:
;
PRTCR:
;
; shortcut to print a dot preserving all regs
; shortcut to print a carriage return preserving all regs
PUSH AF ; save af
LD A,13 ; load CR value
CALL PRTCHR ; print it

Loading…
Cancel
Save