From 10b320c6c0bac3417d672b648665fd0440cc2dce Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 17 Jun 2020 00:04:14 +0100 Subject: [PATCH] Tune: Add printing of song name and artist for PT2 and PT3s --- Source/Apps/Tune/Tune.asm | 25 ++++++++++++++++++++++++- Source/Apps/Tune/printing.inc | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Source/Apps/Tune/Tune.asm b/Source/Apps/Tune/Tune.asm index a6e4bfb4..925d922a 100644 --- a/Source/Apps/Tune/Tune.asm +++ b/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 diff --git a/Source/Apps/Tune/printing.inc b/Source/Apps/Tune/printing.inc index 8a6b4e9a..6d118ea2 100644 --- a/Source/Apps/Tune/printing.inc +++ b/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