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

This commit is contained in:
ed
2020-06-17 00:04:14 +01:00
parent ee2d8d31f4
commit 10b320c6c0
2 changed files with 25 additions and 2 deletions

View File

@@ -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

View File

@@ -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