diff --git a/Binary/Apps/Clean.cmd b/Binary/Apps/Clean.cmd new file mode 100644 index 00000000..cf656f2a --- /dev/null +++ b/Binary/Apps/Clean.cmd @@ -0,0 +1,6 @@ +@echo off +setlocal + +if exist *.com del *.com + +setlocal & cd Tunes && call Clean || exit /b 1 & endlocal diff --git a/Binary/Apps/ReadMe.txt b/Binary/Apps/ReadMe.txt new file mode 100644 index 00000000..3659f2c7 --- /dev/null +++ b/Binary/Apps/ReadMe.txt @@ -0,0 +1,14 @@ +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains the executable application files that +are specific to RomWBW. The source for these applications is found +in the Source\Apps directory of the distribution. + +The Tunes subdirectory contains some sample ProTracker sound +files that can be played by the PTxPlay application. \ No newline at end of file diff --git a/Binary/Apps/Tunes/Clean.cmd b/Binary/Apps/Tunes/Clean.cmd new file mode 100644 index 00000000..b57e2e0c --- /dev/null +++ b/Binary/Apps/Tunes/Clean.cmd @@ -0,0 +1,4 @@ +@echo off +setlocal + +if exist *.pt? del *.pt? diff --git a/Binary/Apps/Tunes/ReadMe.txt b/Binary/Apps/Tunes/ReadMe.txt new file mode 100644 index 00000000..0cb783e1 --- /dev/null +++ b/Binary/Apps/Tunes/ReadMe.txt @@ -0,0 +1,10 @@ +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains some sample ProTracker sound +files that can be played by the PTxPlay application. \ No newline at end of file diff --git a/Binary/Clean.cmd b/Binary/Clean.cmd index 0fe3b04e..b0b248d8 100644 --- a/Binary/Clean.cmd +++ b/Binary/Clean.cmd @@ -1,8 +1,12 @@ @echo off +setlocal + if exist *.bin del *.bin if exist *.com del *.com if exist *.img del *.img if exist *.rom del *.rom if exist *.pdf del *.pdf if exist *.log del *.log -if exist *.eeprom del *.eeprom \ No newline at end of file +if exist *.eeprom del *.eeprom + +setlocal & cd Apps && call Clean || exit /b 1 & endlocal diff --git a/Binary/ReadMe.txt b/Binary/ReadMe.txt index 784fe687..1c02fd5a 100644 --- a/Binary/ReadMe.txt +++ b/Binary/ReadMe.txt @@ -105,3 +105,10 @@ indicates which file targets each of the Propeller board variants: Refer to the board documentation of the boards for more information on how to program the EEPROMs on these boards. + +Apps Directory +-------------- + +The Apps subdirectory contains the executable application files that +are specific to RomWBW. The source for these applications is found +in the Source\Apps directory of the distribution. \ No newline at end of file diff --git a/ReadMe.txt b/ReadMe.txt index 3d935c72..57eb648c 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -7,7 +7,7 @@ *********************************************************************** Wayne Warthen (wwarthen@gmail.com) -Version 2.9.0 (prerelease), 2018-01-16 +Version 2.9.0, 2018-01-26 https://www.retrobrewcomputers.org/ RomWBW is a ROM-based implementation of CP/M-80 2.2 and Z-System for diff --git a/Source/Apps/Build.cmd b/Source/Apps/Build.cmd index fd2ad1ce..2018c6f6 100644 --- a/Source/Apps/Build.cmd +++ b/Source/Apps/Build.cmd @@ -2,6 +2,7 @@ setlocal set TOOLS=../../Tools +set APPBIN=..\..\Binary\Apps set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH% @@ -27,6 +28,9 @@ zx MLOAD25 -SURVEY.COM=SURVEY.HEX setlocal & cd XM && call Build || exit /b 1 & endlocal setlocal & cd FDU && call Build || exit /b 1 & endlocal +setlocal & cd PTxPlay && call Build || exit /b 1 & endlocal + +copy *.com %APPBIN%\ goto :eof diff --git a/Source/Apps/Clean.cmd b/Source/Apps/Clean.cmd index ad6761a3..c5394519 100644 --- a/Source/Apps/Clean.cmd +++ b/Source/Apps/Clean.cmd @@ -9,3 +9,4 @@ if exist *.prn del *.prn setlocal & cd XM && call Clean || exit /b 1 & endlocal setlocal & cd FDU && call Clean || exit /b 1 & endlocal +setlocal & cd PTxPlay && call Clean || exit /b 1 & endlocal diff --git a/Source/Apps/FDU/Build.cmd b/Source/Apps/FDU/Build.cmd index f8cdeeb2..a7b9b9dd 100644 --- a/Source/Apps/FDU/Build.cmd +++ b/Source/Apps/FDU/Build.cmd @@ -9,5 +9,5 @@ tasm -t80 -b -fFF FDU.asm FDU.com FDU.lst if errorlevel 1 goto :eof -move /Y FDU.com .. +copy /Y FDU.com ..\..\..\Binary\Apps\ copy /Y FDU.txt ..\..\..\Doc\ \ No newline at end of file diff --git a/Source/Apps/FDU/Clean.cmd b/Source/Apps/FDU/Clean.cmd index 011475b3..40fffbe5 100644 --- a/Source/Apps/FDU/Clean.cmd +++ b/Source/Apps/FDU/Clean.cmd @@ -1,4 +1,6 @@ @echo off +setlocal + if exist *.com del *.com if exist *.lst del *.lst if exist *.zip del *.zip diff --git a/Source/Apps/PTxPlay/Build.cmd b/Source/Apps/PTxPlay/Build.cmd new file mode 100644 index 00000000..325a01db --- /dev/null +++ b/Source/Apps/PTxPlay/Build.cmd @@ -0,0 +1,13 @@ +@echo off +setlocal + +set TOOLS=../../../Tools +set PATH=%TOOLS%\tasm32;%PATH% +set TASMTABS=%TOOLS%\tasm32 + +tasm -t180 -g3 -fFF PTxPlay.asm PTxPlay.com PTxPlay.lst + +if errorlevel 1 goto :eof + +copy /Y PTxPlay.com ..\..\..\Binary\Apps\ +copy /Y Tunes\*.pt3 ..\..\..\Binary\Apps\Tunes\ \ No newline at end of file diff --git a/Source/Apps/PTxPlay/Clean.cmd b/Source/Apps/PTxPlay/Clean.cmd new file mode 100644 index 00000000..07f1d4c3 --- /dev/null +++ b/Source/Apps/PTxPlay/Clean.cmd @@ -0,0 +1,5 @@ +@echo off +setlocal + +if exist *.com del *.com +if exist *.lst del *.lst diff --git a/Source/Apps/PTxPlay/PTxPlay.asm b/Source/Apps/PTxPlay/PTxPlay.asm new file mode 100644 index 00000000..70823cc7 --- /dev/null +++ b/Source/Apps/PTxPlay/PTxPlay.asm @@ -0,0 +1,2124 @@ +;=============================================================================== +; PTXPLAY - Play PT2/PT3 sound files +; +;=============================================================================== +; +; Author: Wayne Warthen (wwarthen@gmail.com) +; +; This application is basically just a RomWBW wrapper of the +; Universal PT2 and PT3 player by S.V.Bulba. See comments +; below. +;_______________________________________________________________________________ +; +; Usage: +; PTXPLAY +; +; of sound file to load and play +; Filename extension determines file type (.pt2 or .pt3) +; +; Notes: +; - Supports AY-3-8910 or compatible (such as YM2149). +; - Max Z80 CPU clock is about 8MHz or sound chip will not handle speed. +; - Z180 is automatically switched to maximum I/O wait state insertions +; during I/O to sound chip. +; - Uses hardware timer support on Z180 processors. Otherwise, a delay +; loop calibrated to CPU speed is used. +; - Plays PT2 or PT3 format files. File extension (.PT2 or .PT3) determines +; file type. +;_______________________________________________________________________________ +; +; Change Log: +; 2018-01-26 [WBW] Initial release +;_______________________________________________________________________________ +; +; ToDo: +;_______________________________________________________________________________ +; +RESTART .EQU $0000 ; CP/M restart vector +BDOS .EQU $0005 ; BDOS invocation vector +; +IDENT .EQU $FFFE ; loc of RomWBW HBIOS ident ptr +; +RMJ .EQU 2 ; intended CBIOS version - major +RMN .EQU 9 ; intended CBIOS version - minor +; +BF_SYSVER .EQU $F1 ; BIOS: VER function +BF_SYSGET .EQU $F8 ; HBIOS: SYSGET function +; +DCNTL .EQU $72 ; Z180 DCNTL PORT +; +FCB .EQU $5C ; Location of default FCB +; +; +; + .ORG $0100 +; + CALL CRLF + LD DE,MSGBAN ; Point to banner message + CALL PRTSTR ; Print message +; + ; Check BIOS and version + CALL IDBIO ; Identify hardware BIOS + CP 1 ; RomWBW HBIOS? + JP NZ,ERRBIO ; If not, handle BIOS error + LD A,RMJ << 4 | RMN ; expected HBIOS ver + CP D ; compare with result above + JP NZ,ERRBIO ; handle BIOS error +; + ; Use platform id to derive port addresses + LD A,L ; Platform ID is still in L from above + LD C,L ; Save platform id in C for now + LD HL,$D0D8 ; For RC2014, RSEL=D8, RDAT=D0 + LD DE,MSGRC ; Message for RC2014 platform + CP 7 ; RC2014? + JR Z,_SETP ; If so, set ports + LD HL,$9D9C ; For N8, RSEL=9C, RDAT=9D + LD DE,MSGN8 ; Message for N8 platform + CP 4 ; N8? + JR Z,_SETP ; If so, set ports + LD HL,$9B9A ; Otherwise SCG, RSEL=9A, RDAT=9B + LD DE,MSGSCG ; Message for SCG platform + LD A,$FF ; Write $FF to the + OUT ($9C),A ; ... SCG ACR register to activate card +_SETP LD (PORTS),HL ; Save port values + CALL CRLF ; Formatting + CALL PRTSTR ; Display platform string +; + ; Choose quark wait mode based on platform + LD A,C ; Recover platform id + LD B,1 ; Assume timer mode + LD DE,MSGTIM ; Corresponding display string + CP 4 ; N8? + JR Z,_SETM ; If so, commit timer mode + CP 5 ; MK4? + JR Z,_SETM ; If so, commit timer mode + LD B,0 ; Otherwise, delay mode + LD DE,MSGDLY ; Corresponding display string +_SETM LD A,B ; Mode flag value to A + LD (WMOD),A ; Save wait mode + CALL PRTSTR ; Print it +; + ; Get CPU speed & type from RomWBW HBIOS and compute quark delay factor + LD B,$F8 ; HBIOS SYSGET function 0xF8 + LD C,$F0 ; CPUINFO subfunction 0xF0 + RST 08 ; Do it, DE := CPU speed in KHz + SRL D ; Divide by 2 + RR E ; ... for delay factor + EX DE,HL ; Move result to HL + OR A ; Clear carry + LD DE,185 ; Avg TS / quark = 7400, so 185 delay loops + SBC HL,DE ; ... removed for quark processing overhead + LD (QDLY),HL ; Save result as quark delay factor +; + ; Test for hardware (sound chip detection) + LD DE,(PORTS) ; D := RDAT, E := RSEL + LD C,E ; Port = RSEL + LD A,2 ; Register 2 + OUT (C),A ; Select register 2 + LD C,D ; Port = RDAT + LD A,$AA ; Value = $AA + OUT (C),A ; Write $AA to register 2 + LD C,E ; Port = RSEL + IN A,(C) ; Read back value in register 2 + ;CALL PRTHEX ; *debug* + CP $AA ; Value as written? + JP NZ,ERRHW ; If not, handle hardware error +; + ; Check sound filename (must be *.PT2 or *.PT3) + LD A,(FCB+1) ; Get first char of filename + CP ' ' ; Compare to blank + JP Z,ERRNAM ; If so, missing filename + LD A,(FCB+9) ; Extension char 1 + CP 'P' ; Check for 'P' + JP NZ,ERRNAM ; If not, bad file extension + LD A,(FCB+10) ; Extension char 2 + CP 'T' ; Check for 'T' + JP NZ,ERRNAM ; If not, bad file extension + LD A,(FCB+11) ; Extension char 3 + LD C,2 ; SETUP value of 2 for PT2 sound file + CP '2' ; Check for '2' + JR Z,_SET ; If so, commit SETUP value + LD C,0 ; SETUP value of 0 for PT3 sound file + CP '3' ; Check for '3' + JR Z,_SET ; If so, commit SETUP value + JP ERRNAM ; Anything else is a bad file extension +_SET LD A,C ; Get SETUP value + LD (START+10),A ; Save SETUP value +; + ; Load sound file +_LD0 LD C,15 ; CPM Open File function + LD DE,FCB ; FCB + CALL BDOS ; Do it + INC A ; Test for error $FF + JP Z,ERRFIL ; Handle file error +; + LD HL,MDLADDR + LD (DMA),HL +; +_LD LD HL,(DMA) ; Get load address + PUSH HL ; Save it + LD DE,128 ; Bump by size of + ADD HL,DE ; ... one record + LD (DMA),HL ; Save for next loop + LD A,$C0 ; A := page limit for load + CP H ; Check to see if limit hit + JP Z,ERRSIZ ; Handle size error + POP DE ; Restore current DMA to DE + LD C,26 ; CPM Set DMA function + CALL BDOS ; Read next 128 bytes +; + LD C,20 ; CPM Read Sequential function + LD DE,FCB ; FCB + CALL BDOS ; Read next 128 bytes + OR A ; Set flags to check EOF + JR NZ,_LDX ; Non-zero is EOF + JR Z,_LD ; Load loop +; +_LDX LD C,16 ; CPM Close File function + LD DE,FCB ; FCB + CALL BDOS ; Do it +; + ; Play loop + CALL CRLF2 ; Formatting + LD DE,MSGPLY ; Playing message + CALL PRTSTR ; Print message + ;CALL CRLF2 ; Formatting +; + CALL START ; Do initialization +_LP CALL START+5 ; Play one quark + LD A,(START+10) ; Get setup byte + BIT 7,A ; Check bit 7 (loop point passed) + JR NZ,EXIT ; Bail out when done playing + CALL GETKEY ; Check for keypress + JR NZ,EXIT ; Abort on keypress + ;LD A,13 ; Back to + ;CALL PRTCHR ; ... start of line + ;LD A,(CurPos) ; Get current position + ;CALL PRTHEX ; ... and display it + CALL WAITQ ; Wait one quark period + JR _LP ; Loop for next quark +; +EXIT CALL START+8 ; Mute audio + ;CALL CRLF2 ; Formatting + LD DE,MSGEND ; Completion message + CALL PRTSTR ; Print message + CALL CRLF ; Formatting + JP 0 ; Exit the easy way +; +; Wait for quark play time. Can use hardware timer if +; supported by hardware or simple delay loop otherwise. +; Delay loop requires QDLY to be pre-set to to achieve +; optimal 20ms wait time. +; +WAITQ LD A,(WMOD) ; Get delay mode + OR A ; Set flags + JR Z,DLY ; Delay mode +; + ; Timer loop + CALL TIM2 ; Read timer LSB into A + LD C,A ; Init prev value +TIM1 PUSH BC ; Save prev value + CALL TIM2 ; Read timer LSB into A + POP BC ; Recover prev value + CP C ; Compare to prev + RET NZ ; Done if changed + JR TIM1 ; Else, loop +; +TIM2 LD B,$F8 ; BIOS SYSGET function + LD C,$D0 ; TIMER sub-function + RST 08 ; Call BIOS + LD A,L ; MSB to A + RET ; Return to loop +; + ; Delay spin loop (40 tstates per loop) +DLY LD BC,(QDLY) ; Load quark delay factor +DLY1 DEC BC ; [6] + NOP ; [4] + NOP ; [4] + NOP ; [4] + NOP ; [4] + LD A,B ; [4] + OR C ; [4] + JP NZ,DLY1 ; [10] + RET +; +; Get a keystroke from CPM +; +GETKEY LD C,6 ; BDOS direct I/O + LD E,$FF ; Get character if available + CALL BDOS ; Call BDOS + OR A ; Set flags, Z set if no key + RET ; Done +; +; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0 +; +IDBIO: +; + ; Check for UNA (UBIOS) + LD A,($FFFD) ; fixed location of UNA API vector + CP $C3 ; jp instruction? + JR NZ,IDBIO1 ; if not, not UNA + LD HL,($FFFE) ; get jp address + LD A,(HL) ; get byte at target address + CP $FD ; first byte of UNA push ix instruction + JR NZ,IDBIO1 ; if not, not UNA + INC HL ; point to next byte + LD A,(HL) ; get next byte + CP $E5 ; second byte of UNA push ix instruction + JR NZ,IDBIO1 ; if not, not UNA, check others +; + LD BC,$04FA ; UNA: get BIOS date and version + RST 08 ; DE := ver, HL := date +; + LD A,2 ; UNA BIOS id = 2 + RET ; and done +; +IDBIO1: + ; Check for RomWBW (HBIOS) + LD HL,($FFFE) ; HL := HBIOS ident location + LD A,'W' ; First byte of ident + CP (HL) ; Compare + JR NZ,IDBIO2 ; Not HBIOS + INC HL ; Next byte of ident + LD A,~'W' ; Second byte of ident + CP (HL) ; Compare + JR NZ,IDBIO2 ; Not HBIOS +; + LD B,BF_SYSVER ; HBIOS: VER function + LD C,0 ; required reserved value + RST 08 ; DE := version, L := platform id +; + LD A,1 ; HBIOS BIOS id = 1 + RET ; and done +; +IDBIO2: + ; No idea what this is + XOR A ; Setup return value of 0 + RET ; and done +; +; Print character in A without destroying any registers +; +PRTCHR: + PUSH BC ; save registers + PUSH DE + PUSH HL + LD E,A ; character to print in E + LD C,$02 ; BDOS function to output a character + CALL BDOS ; do it + POP HL ; restore registers + POP DE + POP BC + RET +; +PRTDOT: +; + ; shortcut to print a dot preserving all regs + PUSH AF ; save af + LD A,'.' ; load dot char + CALL PRTCHR ; print it + POP AF ; restore af + RET ; done +; +PRTCR: +; + ; shortcut to print a dot preserving all regs + PUSH AF ; save af + LD A,13 ; load CR value + CALL PRTCHR ; print it + POP AF ; restore af + RET ; done +; +; Print a zero terminated string at (DE) without destroying any registers +; +PRTSTR: + PUSH DE +; +PRTSTR1: + LD A,(DE) ; get next char + OR A + JR Z,PRTSTR2 + CALL PRTCHR + INC DE + JR PRTSTR1 +; +PRTSTR2: + POP DE ; restore registers + RET +; +; Print the value in A in hex without destroying any registers +; +PRTHEX: + PUSH AF ; save AF + PUSH DE ; save DE + CALL HEXASCII ; convert value in A to hex chars in DE + LD A,D ; get the high order hex char + CALL PRTCHR ; print it + LD A,E ; get the low order hex char + CALL PRTCHR ; print it + POP DE ; restore DE + POP AF ; restore AF + RET ; done +; +; print the hex word value in bc +; +PRTHEXWORD: + PUSH AF + LD A,B + CALL PRTHEX + LD A,C + CALL PRTHEX + POP AF + RET +; +; print the hex dword value in de:hl +; +PRTHEX32: + PUSH BC + PUSH DE + POP BC + CALL PRTHEXWORD + PUSH HL + POP BC + CALL PRTHEXWORD + POP BC + RET +; +; Convert binary value in A to ascii hex characters in DE +; +HEXASCII: + LD D,A ; save A in D + CALL HEXCONV ; convert low nibble of A to hex + LD E,A ; save it in E + LD A,D ; get original value back + RLCA ; rotate high order nibble to low bits + RLCA + RLCA + RLCA + CALL HEXCONV ; convert nibble + LD D,A ; save it in D + RET ; done +; +; Convert low nibble of A to ascii hex +; +HEXCONV: + AND $0F ; low nibble only + ADD A,$90 + DAA + ADC A,$40 + DAA + RET +; +; Print value of A or HL in decimal with leading zero suppression +; Use prtdecb for A or prtdecw for HL +; +PRTDECB: + PUSH HL + LD H,0 + LD L,A + CALL PRTDECW ; print it + POP HL + RET +; +PRTDECW: + PUSH AF + PUSH BC + PUSH DE + PUSH HL + CALL PRTDEC0 + POP HL + POP DE + POP BC + POP AF + RET +; +PRTDEC0: + LD E,'0' + LD BC,-10000 + CALL PRTDEC1 + LD BC,-1000 + CALL PRTDEC1 + LD BC,-100 + CALL PRTDEC1 + LD C,-10 + CALL PRTDEC1 + LD E,0 + LD C,-1 +PRTDEC1: + LD A,'0' - 1 +PRTDEC2: + INC A + ADD HL,BC + JR C,PRTDEC2 + SBC HL,BC + CP E + RET Z + LD E,0 + CALL PRTCHR + RET +; +; Start a new line +; +CRLF2: + CALL CRLF ; two of them +CRLF: + PUSH AF ; preserve AF + LD A,13 ; + CALL PRTCHR ; print it + LD A,10 ; + CALL PRTCHR ; print it + POP AF ; restore AF + RET +; +ERRBIO: ; Invalid BIOS or version + LD DE,MSGBIO + JR ERR +; +ERRHW: ; Hardware error, sound chip not detected + LD DE,MSGHW + JR ERR +; +ERRNAM: ; Missing or invalid filename parameter + LD DE,MSGNAM + JR ERR +; +ERRFIL: ; Error opening sound file + LD DE,MSGFIL + JR ERR +; +ERRSIZ: ; Sound file is too large for memory + LD DE,MSGSIZ + JR ERR +; +ERR: ; print error string and return error signal + CALL CRLF2 ; print newline +; +ERR1: ; without the leading crlf + CALL PRTSTR ; print error string +; +ERR2: ; without the string + CALL CRLF ; print newline + JP 0 ; fast exit + +QDLY .DW 0 ; quark delay factor +WMOD .DB 0 ; delay mode, non-zero to use timer +DCSAV .DB 0 ; for saving Z180 DCNTL value +DMA .DW 0 ; Working DMA + +TMP .DB 0 ; work around use of undocumented Z80 + +PORTS: +RSEL .DB 0 ; Register selection port +RDAT .DB 0 ; Register data port + +MSGBAN .DB "PTxPlayer for RomWBW v1.0, 26-Jan-2018",13,10 + .DB "Copyright (C) 2018, Wayne Warthen, GNU GPL v3",13,10 + .DB "Copyright (C) 2004-2007 S.V.Bulba",0 +MSGBIO .DB "Incompatible BIOS or version, " + .DB "HBIOS v", '0' + RMJ, ".", '0' + RMN, " required",0 +MSGHW .DB "Hardware error, sound chip not detected!",0 +MSGNAM .DB "Sound filename missing or invalid (must be .PT2 or .PT3)",0 +MSGFIL .DB "Sound file not found!",0 +MSGSIZ .DB "Sound file too large to load!",0 +MSGRC .DB "RC2014 Ed Brindley Sound Module",0 +MSGN8 .DB "RetroBrew N8 Onboard Sound System",0 +MSGSCG .DB "RetroBrew SCG ECB Adapter",0 +MSGTIM .DB ", timer mode",0 +MSGDLY .DB ", delay mode",0 +MSGPLY .DB "Playing...",0 +MSGEND .DB "Done",0 + +;Universal PT2 and PT3 player for ZX Spectrum and MSX +;(c)2004-2007 S.V.Bulba +;http://bulba.untergrund.net (http://bulba.at.kz) + +;Release number +;Release .EQU "1" +#DEFINE Release "1" + +;Conditional assembly +;1) Version of ROUT (ZX or MSX standards) +ZX .EQU 0 +MSX .EQU 0 +WBW .EQU 1 +;2) Current position counter at (START+11) +CurPosCounter .EQU 0 +;3) Allow channels allocation bits at (START+10) +ACBBAC .EQU 0 +;4) Allow loop checking and disabling +LoopChecker .EQU 1 +;5) Insert official identificator +Id .EQU 1 + +;Features +;-------- +;-Can be compiled at any address (i.e. no need rounding ORG +; address). +;-Variables (VARS) can be located at any address (not only after +;code block). +;-INIT subprogram checks PT3-module version and rightly +; generates both note and volume tables outside of code block +; (in VARS). +;-Two portamento (spc. command 3xxx) algorithms (depending of +; PT3 module version). +;-New 1.XX and 2.XX special command behaviour (only for PT v3.7 +; and higher). +;-Any Tempo value are accepted (including Tempo=1 and Tempo=2). +;-Fully compatible with Ay_Emul PT3 and PT2 players codes. +;-See also notes at the end of this source code. + +;Limitations +;----------- +;-Can run in RAM only (self-modified code is used). +;-PT2 position list must be end by $FF marker only. + +;Warning!!! PLAY subprogram can crash if no module are loaded +;into RAM or INIT subprogram was not called before. + +;Call MUTE or INIT one more time to mute sound after stopping +;playing + + ;ORG $C000 +;Test codes (commented) +; LD A,2 ;PT2,ABC,Looped +; LD (START+10),A +; CALL START +; EI +;_LP HALT +; CALL START+5 +; XOR A +; IN A,($FE) +; CPL +; AND 15 +; JR Z,_LP +; JR START+8 + +TonA .EQU 0 +TonB .EQU 2 +TonC .EQU 4 +Noise .EQU 6 +Mixer .EQU 7 +AmplA .EQU 8 +AmplB .EQU 9 +AmplC .EQU 10 +Env .EQU 11 +EnvTp .EQU 13 + +;ChannelsVars +; STRUCT CHP +;reset group +PsInOr .EQU 0 +PsInSm .EQU 1 +CrAmSl .EQU 2 +CrNsSl .EQU 3 +CrEnSl .EQU 4 +TSlCnt .EQU 5 +CrTnSl .EQU 6 +TnAcc .EQU 8 +COnOff .EQU 10 +;reset group + +OnOffD .EQU 11 + +;IX for PTDECOD here (+12) +OffOnD .EQU 12 +OrnPtr .EQU 13 +SamPtr .EQU 15 +NNtSkp .EQU 17 +Note .EQU 18 +SlToNt .EQU 19 +Env_En .EQU 20 +Flags .EQU 21 + ;Enabled - 0,SimpleGliss - 2 +TnSlDl .EQU 22 +TSlStp .EQU 23 +TnDelt .EQU 25 +NtSkCn .EQU 27 +Volume .EQU 28 +; ENDS +CHP .EQU 29 + +;Entry and other points +;START initialize playing of module at MDLADDR +;START+3 initialization with module address in HL +;START+5 play one quark +;START+8 mute +;START+10 setup and status flags +;START+11 current position value (byte) (optional) + +START + LD HL,MDLADDR + JR INIT + JP PLAY + JR MUTE +SETUP .DB 0 ;set bit0, if you want to play without looping + ;(optional); + ;set bit1 for PT2 and reset for PT3 before + ;calling INIT; + ;bits2-3: %00-ABC, %01 ACB, %10 BAC (optional); + ;bits4-6 are not used + ;bit7 is set each time, when loop point is passed + ;(optional) +#IF CurPosCounter +CurPos .DB 0 ;for visualization only (i.e. no need for playing) +#ENDIF + +;Identifier + .IF Id + .DB "=Uni PT2 and PT3 Player r.",Release,"=" + .ENDIF + + .IF LoopChecker +CHECKLP LD HL,SETUP + SET 7,(HL) + BIT 0,(HL) + RET Z + POP HL + LD HL,DelyCnt + INC (HL) + LD HL,ChanA+NtSkCn + INC (HL) + .ENDIF + +MUTE XOR A + LD H,A + LD L,A + LD (AYREGS+AmplA),A + LD (AYREGS+AmplB),HL + JP ROUT + +INIT +;HL - AddressOfModule + LD A,(START+10) + AND 2 + JR NZ,INITPT2 + + CALL SETMDAD + PUSH HL + LD DE,100 + ADD HL,DE + LD A,(HL) + LD (Delay),A + PUSH HL + POP IX + ADD HL,DE + LD (CrPsPtr),HL + LD E,(IX+102-100) + INC HL + +#IF CurPosCounter + LD A,L + LD (PosSub+1),A +#ENDIF + + ADD HL,DE + LD (LPosPtr),HL + POP DE + LD L,(IX+103-100) + LD H,(IX+104-100) + ADD HL,DE + LD (PatsPtr),HL + LD HL,169 + ADD HL,DE + LD (OrnPtrs),HL + LD HL,105 + ADD HL,DE + LD (SamPtrs),HL + LD A,(IX+13-100) ;EXTRACT VERSION NUMBER + SUB $30 + JR C,L20 + CP 10 + JR C,L21 +L20 LD A,6 +L21 LD (Version),A + PUSH AF ;VolTable version + CP 4 + LD A,(IX+99-100) ;TONE TABLE NUMBER + RLA + AND 7 + PUSH AF ;NoteTable number + LD HL,(e_-SamCnv-2)*256+$18 + LD (SamCnv),HL + LD A,$BA + LD (OrnCP),A + LD (SamCP),A + LD A,$7B + LD (OrnLD),A + LD (SamLD),A + LD A,$87 + LD (SamClc2),A + LD BC,PT3PD + LD HL,0 + LD DE,PT3EMPTYORN + JR INITCOMMON + +INITPT2 LD A,(HL) + LD (Delay),A + PUSH HL + PUSH HL + PUSH HL + INC HL + INC HL + LD A,(HL) + INC HL + LD (SamPtrs),HL + LD E,(HL) + INC HL + LD D,(HL) + POP HL + AND A + SBC HL,DE + CALL SETMDAD + POP HL + LD DE,67 + ADD HL,DE + LD (OrnPtrs),HL + LD E,32 + ADD HL,DE + LD C,(HL) + INC HL + LD B,(HL) + LD E,30 + ADD HL,DE + LD (CrPsPtr),HL + LD E,A + INC HL + +#IF CurPosCounter + LD A,L + LD (PosSub+1),A +#ENDIF + + ADD HL,DE + LD (LPosPtr),HL + POP HL + ADD HL,BC + LD (PatsPtr),HL + LD A,5 + LD (Version),A + PUSH AF + LD A,2 + PUSH AF + LD HL,$51CB + LD (SamCnv),HL + LD A,$BB + LD (OrnCP),A + LD (SamCP),A + LD A,$7A + LD (OrnLD),A + LD (SamLD),A + LD A,$80 + LD (SamClc2),A + LD BC,PT2PD + LD HL,$8687 + LD DE,PT2EMPTYORN + +INITCOMMON + + LD (PTDECOD+1),BC + LD (PsCalc),HL + PUSH DE + +;note table data depacker +;(c) Ivan Roshin + LD DE,T_PACK + LD BC,T1_+(2*49)-1 +TP_0 LD A,(DE) + INC DE + CP 15*2 + JR NC,TP_1 + LD H,A + LD A,(DE) + LD L,A + INC DE + JR TP_2 +TP_1 PUSH DE + LD D,0 + LD E,A + ADD HL,DE + ADD HL,DE + POP DE +TP_2 LD A,H + LD (BC),A + DEC BC + LD A,L + LD (BC),A + DEC BC + SUB ($F8*2) & $FF + JR NZ,TP_0 + +#IF LoopChecker + LD HL,SETUP + RES 7,(HL) + + #IF CurPosCounter + INC HL + LD (HL),A + #ENDIF + +#ELSE + + #IF CurPosCounter + LD (CurPos),A + #ENDIF + +#ENDIF + + LD HL,VARS + LD (HL),A + LD DE,VARS+1 + LD BC,VAR0END-VARS-1 + LDIR + LD (AdInPtA),HL ;ptr to zero + INC A + LD (DelyCnt),A + LD HL,$F001 ;H - Volume, L - NtSkCn + LD (ChanA+NtSkCn),HL + LD (ChanB+NtSkCn),HL + LD (ChanC+NtSkCn),HL + POP HL + LD (ChanA+OrnPtr),HL + LD (ChanB+OrnPtr),HL + LD (ChanC+OrnPtr),HL + + POP AF + +;NoteTableCreator (c) Ivan Roshin +;A - NoteTableNumber*2+VersionForNoteTable +;(xx1b - 3.xx..3.4r, xx0b - 3.4x..3.6x..VTII1.0) + + LD HL,NT_DATA + PUSH DE + LD D,B + ADD A,A + LD E,A + ADD HL,DE + LD E,(HL) + INC HL + SRL E + SBC A,A + AND $A7 ;$00 (NOP) or $A7 (AND A) + LD (L3),A + EX DE,HL + POP BC ;BC=T1_ + ADD HL,BC + + LD A,(DE) + ADD A,T_ & $FF + LD C,A + ADC A,T_/256 + SUB C + LD B,A + PUSH BC + LD DE,NT_ + PUSH DE + + LD B,12 + LD IX,TMP ; +WW +L1 PUSH BC + LD C,(HL) + INC HL + PUSH HL + LD B,(HL) + + PUSH DE + EX DE,HL + LD DE,23 + ;LD IXH,8 ; -WW + LD (IX),8 ; +WW + +L2 SRL B + RR C +L3 .DB $19 ;AND A or NOP + LD A,C + ADC A,D ;=ADC 0 + LD (HL),A + INC HL + LD A,B + ADC A,D + LD (HL),A + ADD HL,DE + ;DEC IXH ; -WW + DEC (IX) ; +WW + JR NZ,L2 + + POP DE + INC DE + INC DE + POP HL + INC HL + POP BC + DJNZ L1 + + POP HL + POP DE + + LD A,E + CP TCOLD_1 & $FF + JR NZ,CORR_1 + LD A,$FD + LD (NT_+$2E),A + +CORR_1 LD A,(DE) + AND A + JR Z,TC_EXIT + RRA + PUSH AF + ADD A,A + LD C,A + ADD HL,BC + POP AF + JR NC,CORR_2 + DEC (HL) + DEC (HL) +CORR_2 INC (HL) + AND A + SBC HL,BC + INC DE + JR CORR_1 + +TC_EXIT + + POP AF + +;VolTableCreator (c) Ivan Roshin +;A - VersionForVolumeTable (0..4 - 3.xx..3.4x; + ;5.. - 2.x,3.5x..3.6x..VTII1.0) + + CP 5 + LD HL,$11 + LD D,H + LD E,H + LD A,$17 + JR NC,M1 + DEC L + LD E,L + XOR A +M1 LD (M2),A + + LD IX,VT_+16 + + LD C,$F +INITV2 PUSH HL + + ADD HL,DE + EX DE,HL + SBC HL,HL + + LD B,$10 +INITV1 LD A,L +M2 .DB $7D + LD A,H + ADC A,0 + LD (IX),A + INC IX + ADD HL,DE + DJNZ INITV1 + + POP HL + LD A,E + CP $77 + JR NZ,M3 + INC E +M3 DEC C + JR NZ,INITV2 + + JP ROUT + +SETMDAD LD (MODADDR),HL + LD (MDADDR1),HL + LD (MDADDR2),HL + RET + +PTDECOD JP $C3C3 + +;PT2 pattern decoder +PD2_SAM CALL SETSAM + JR PD2_LOOP + +PD2_EOff LD (IX-12+Env_En),A + JR PD2_LOOP + +PD2_ENV LD (IX-12+Env_En),16 + LD (AYREGS+EnvTp),A + LD A,(BC) + INC BC + LD L,A + LD A,(BC) + INC BC + LD H,A + LD (EnvBase),HL + JR PD2_LOOP + +PD2_ORN CALL SETORN + JR PD2_LOOP + +PD2_SKIP INC A + LD (IX-12+NNtSkp),A + JR PD2_LOOP + +PD2_VOL RRCA + RRCA + RRCA + RRCA + LD (IX-12+Volume),A + JR PD2_LOOP + +PD2_DEL CALL C_DELAY + JR PD2_LOOP + +PD2_GLIS SET 2,(IX-12+Flags) + INC A + LD (IX-12+TnSlDl),A + LD (IX-12+TSlCnt),A + LD A,(BC) + INC BC + LD (IX-12+TSlStp),A + ADD A,A + SBC A,A + LD (IX-12+TSlStp+1),A + SCF + JR PD2_LP2 + +PT2PD AND A + +PD2_LP2 EX AF,AF' + +PD2_LOOP LD A,(BC) + INC BC + ADD A,$20 + JR Z,PD2_REL + JR C,PD2_SAM + ADD A,96 + JR C,PD2_NOTE + INC A + JR Z,PD2_EOff + ADD A,15 + JP Z,PD_FIN + JR C,PD2_ENV + ADD A,$10 + JR C,PD2_ORN + ADD A,$40 + JR C,PD2_SKIP + ADD A,$10 + JR C,PD2_VOL + INC A + JR Z,PD2_DEL + INC A + JR Z,PD2_GLIS + INC A + JR Z,PD2_PORT + INC A + JR Z,PD2_STOP + LD A,(BC) + INC BC + LD (IX-12+CrNsSl),A + JR PD2_LOOP + +PD2_PORT RES 2,(IX-12+Flags) + LD A,(BC) + INC BC + INC BC ;ignoring precalc delta to right sound + INC BC + SCF + JR PD2_LP2 + +PD2_STOP LD (IX-12+TSlCnt),A + JR PD2_LOOP + +PD2_REL LD (IX-12+Flags),A + JR PD2_EXIT + +PD2_NOTE LD L,A + LD A,(IX-12+Note) + LD (PrNote+1),A + LD (IX-12+Note),L + XOR A + LD (IX-12+TSlCnt),A + SET 0,(IX-12+Flags) + EX AF,AF' + JR NC,NOGLIS2 + BIT 2,(IX-12+Flags) + JR NZ,NOPORT2 + LD (LoStep),A + ADD A,A + SBC A,A + EX AF,AF' + LD H,A + LD L,A + INC A + CALL SETPORT +NOPORT2 LD (IX-12+TSlCnt),1 +NOGLIS2 XOR A + + +PD2_EXIT LD (IX-12+PsInSm),A + LD (IX-12+PsInOr),A + LD (IX-12+CrTnSl),A + LD (IX-12+CrTnSl+1),A + JP PD_FIN + +;PT3 pattern decoder +PD_OrSm LD (IX-12+Env_En),0 + CALL SETORN +PD_SAM_ LD A,(BC) + INC BC + RRCA + +PD_SAM CALL SETSAM + JR PD_LOOP + +PD_VOL RRCA + RRCA + RRCA + RRCA + LD (IX-12+Volume),A + JR PD_LP2 + +PD_EOff LD (IX-12+Env_En),A + LD (IX-12+PsInOr),A + JR PD_LP2 + +PD_SorE DEC A + JR NZ,PD_ENV + LD A,(BC) + INC BC + LD (IX-12+NNtSkp),A + JR PD_LP2 + +PD_ENV CALL SETENV + JR PD_LP2 + +PD_ORN CALL SETORN + JR PD_LOOP + +PD_ESAM LD (IX-12+Env_En),A + LD (IX-12+PsInOr),A + CALL NZ,SETENV + JR PD_SAM_ + +PT3PD LD A,(IX-12+Note) + LD (PrNote+1),A + LD L,(IX-12+CrTnSl) + LD H,(IX-12+CrTnSl+1) + LD (PrSlide+1),HL + +PD_LOOP LD DE,$2010 +PD_LP2 LD A,(BC) + INC BC + ADD A,E + JR C,PD_OrSm + ADD A,D + JR Z,PD_FIN + JR C,PD_SAM + ADD A,E + JR Z,PD_REL + JR C,PD_VOL + ADD A,E + JR Z,PD_EOff + JR C,PD_SorE + ADD A,96 + JR C,PD_NOTE + ADD A,E + JR C,PD_ORN + ADD A,D + JR C,PD_NOIS + ADD A,E + JR C,PD_ESAM + ADD A,A + LD E,A + LD HL,SPCCOMS+$FF20-$2000 + ADD HL,DE + LD E,(HL) + INC HL + LD D,(HL) + PUSH DE + JR PD_LOOP + +PD_NOIS LD (Ns_Base),A + JR PD_LP2 + +PD_REL RES 0,(IX-12+Flags) + JR PD_RES + +PD_NOTE LD (IX-12+Note),A + SET 0,(IX-12+Flags) + XOR A + +PD_RES LD (PDSP_+1),SP + LD SP,IX + LD H,A + LD L,A + PUSH HL + PUSH HL + PUSH HL + PUSH HL + PUSH HL + PUSH HL +PDSP_ LD SP,$3131 + +PD_FIN LD A,(IX-12+NNtSkp) + LD (IX-12+NtSkCn),A + RET + +C_PORTM LD A,(BC) + INC BC +;SKIP PRECALCULATED TONE DELTA (BECAUSE +;CANNOT BE RIGHT AFTER PT3 COMPILATION) + INC BC + INC BC + EX AF,AF' + LD A,(BC) ;SIGNED TONE STEP + INC BC + LD (LoStep),A + LD A,(BC) + INC BC + AND A + EX AF,AF' + LD L,(IX-12+CrTnSl) + LD H,(IX-12+CrTnSl+1) + +;Set portamento variables +;A - Delay; A' - Hi(Step); ZF' - (A'=0); HL - CrTnSl + +SETPORT RES 2,(IX-12+Flags) + LD (IX-12+TnSlDl),A + LD (IX-12+TSlCnt),A + PUSH HL + LD DE,NT_ + LD A,(IX-12+Note) + LD (IX-12+SlToNt),A + ADD A,A + LD L,A + LD H,0 + ADD HL,DE + LD A,(HL) + INC HL + LD H,(HL) + LD L,A + PUSH HL +PrNote LD A,$3E + LD (IX-12+Note),A + ADD A,A + LD L,A + LD H,0 + ADD HL,DE + LD E,(HL) + INC HL + LD D,(HL) + POP HL + SBC HL,DE + LD (IX-12+TnDelt),L + LD (IX-12+TnDelt+1),H + POP DE +Version .EQU $+1 + LD A,$3E + CP 6 + JR C,OLDPRTM ;Old 3xxx for PT v3.5- +PrSlide LD DE,$1111 + LD (IX-12+CrTnSl),E + LD (IX-12+CrTnSl+1),D +LoStep .EQU $+1 +OLDPRTM LD A,$3E + EX AF,AF' + JR Z,NOSIG + EX DE,HL +NOSIG SBC HL,DE + JP P,SET_STP + CPL + EX AF,AF' + NEG + EX AF,AF' +SET_STP LD (IX-12+TSlStp+1),A + EX AF,AF' + LD (IX-12+TSlStp),A + LD (IX-12+COnOff),0 + RET + +C_GLISS SET 2,(IX-12+Flags) + LD A,(BC) + INC BC + LD (IX-12+TnSlDl),A + AND A + JR NZ,GL36 + LD A,(Version) ;AlCo PT3.7+ + CP 7 + SBC A,A + INC A +GL36 LD (IX-12+TSlCnt),A + LD A,(BC) + INC BC + EX AF,AF' + LD A,(BC) + INC BC + JR SET_STP + +C_SMPOS LD A,(BC) + INC BC + LD (IX-12+PsInSm),A + RET + +C_ORPOS LD A,(BC) + INC BC + LD (IX-12+PsInOr),A + RET + +C_VIBRT LD A,(BC) + INC BC + LD (IX-12+OnOffD),A + LD (IX-12+COnOff),A + LD A,(BC) + INC BC + LD (IX-12+OffOnD),A + XOR A + LD (IX-12+TSlCnt),A + LD (IX-12+CrTnSl),A + LD (IX-12+CrTnSl+1),A + RET + +C_ENGLS LD A,(BC) + INC BC + LD (Env_Del),A + LD (CurEDel),A + LD A,(BC) + INC BC + LD L,A + LD A,(BC) + INC BC + LD H,A + LD (ESldAdd),HL + RET + +C_DELAY LD A,(BC) + INC BC + LD (Delay),A + RET + +SETENV LD (IX-12+Env_En),E + LD (AYREGS+EnvTp),A + LD A,(BC) + INC BC + LD H,A + LD A,(BC) + INC BC + LD L,A + LD (EnvBase),HL + XOR A + LD (IX-12+PsInOr),A + LD (CurEDel),A + LD H,A + LD L,A + LD (CurESld),HL +C_NOP RET + +SETORN ADD A,A + LD E,A + LD D,0 + LD (IX-12+PsInOr),D +OrnPtrs .EQU $+1 + LD HL,$2121 + ADD HL,DE + LD E,(HL) + INC HL + LD D,(HL) +MDADDR2 .EQU $+1 + LD HL,$2121 + ADD HL,DE + LD (IX-12+OrnPtr),L + LD (IX-12+OrnPtr+1),H + RET + +SETSAM ADD A,A + LD E,A + LD D,0 +SamPtrs .EQU $+1 + LD HL,$2121 + ADD HL,DE + LD E,(HL) + INC HL + LD D,(HL) +MDADDR1 .EQU $+1 + LD HL,$2121 + ADD HL,DE + LD (IX-12+SamPtr),L + LD (IX-12+SamPtr+1),H + RET + +;ALL 16 ADDRESSES TO PROTECT FROM BROKEN PT3 MODULES +SPCCOMS .DW C_NOP + .DW C_GLISS + .DW C_PORTM + .DW C_SMPOS + .DW C_ORPOS + .DW C_VIBRT + .DW C_NOP + .DW C_NOP + .DW C_ENGLS + .DW C_DELAY + .DW C_NOP + .DW C_NOP + .DW C_NOP + .DW C_NOP + .DW C_NOP + .DW C_NOP + +CHREGS XOR A + LD (Ampl),A + BIT 0,(IX+Flags) + PUSH HL + JP Z,CH_EXIT + LD (CSP_+1),SP + LD L,(IX+OrnPtr) + LD H,(IX+OrnPtr+1) + LD SP,HL + POP DE + LD H,A + LD A,(IX+PsInOr) + LD L,A + ADD HL,SP + INC A + ;PT2 PT3 +OrnCP INC A ;CP E CP D + JR C,CH_ORPS +OrnLD .DB 1 ;LD A,D LD A,E +CH_ORPS LD (IX+PsInOr),A + LD A,(IX+Note) + ADD A,(HL) + JP P,CH_NTP + XOR A +CH_NTP CP 96 + JR C,CH_NOK + LD A,95 +CH_NOK ADD A,A + EX AF,AF' + LD L,(IX+SamPtr) + LD H,(IX+SamPtr+1) + LD SP,HL + POP DE + LD H,0 + LD A,(IX+PsInSm) + LD B,A + ADD A,A +SamClc2 ADD A,A ;or ADD A,B for PT2 + LD L,A + ADD HL,SP + LD SP,HL + LD A,B + INC A + ;PT2 PT3 +SamCP INC A ;CP E CP D + JR C,CH_SMPS +SamLD .DB 1 ;LD A,D LD A,E +CH_SMPS LD (IX+PsInSm),A + POP BC + POP HL + +;Convert PT2 sample to PT3 + ;PT2 PT3 +SamCnv POP HL ;BIT 2,C JR e_ + POP HL + LD H,B + JR NZ,$+8 + EX DE,HL + AND A + SBC HL,HL + SBC HL,DE + LD D,C + RR C + SBC A,A + CPL + AND $3E + RR C + RR B + AND C + LD C,A + LD A,B + RRA + RRA + RR D + RRA + AND $9F + LD B,A + +e_ LD E,(IX+TnAcc) + LD D,(IX+TnAcc+1) + ADD HL,DE + BIT 6,B + JR Z,CH_NOAC + LD (IX+TnAcc),L + LD (IX+TnAcc+1),H +CH_NOAC EX DE,HL + EX AF,AF' + ADD A,NT_ & $FF + LD L,A + ADC A,NT_/256 + SUB L + LD H,A + LD SP,HL + POP HL + ADD HL,DE + LD E,(IX+CrTnSl) + LD D,(IX+CrTnSl+1) + ADD HL,DE +CSP_ LD SP,$3131 + EX (SP),HL + XOR A + OR (IX+TSlCnt) + JR Z,CH_AMP + DEC (IX+TSlCnt) + JR NZ,CH_AMP + LD A,(IX+TnSlDl) + LD (IX+TSlCnt),A + LD L,(IX+TSlStp) + LD H,(IX+TSlStp+1) + LD A,H + ADD HL,DE + LD (IX+CrTnSl),L + LD (IX+CrTnSl+1),H + BIT 2,(IX+Flags) + JR NZ,CH_AMP + LD E,(IX+TnDelt) + LD D,(IX+TnDelt+1) + AND A + JR Z,CH_STPP + EX DE,HL +CH_STPP SBC HL,DE + JP M,CH_AMP + LD A,(IX+SlToNt) + LD (IX+Note),A + XOR A + LD (IX+TSlCnt),A + LD (IX+CrTnSl),A + LD (IX+CrTnSl+1),A +CH_AMP LD A,(IX+CrAmSl) + BIT 7,C + JR Z,CH_NOAM + BIT 6,C + JR Z,CH_AMIN + CP 15 + JR Z,CH_NOAM + INC A + JR CH_SVAM +CH_AMIN CP -15 + JR Z,CH_NOAM + DEC A +CH_SVAM LD (IX+CrAmSl),A +CH_NOAM LD L,A + LD A,B + AND 15 + ADD A,L + JP P,CH_APOS + XOR A +CH_APOS CP 16 + JR C,CH_VOL + LD A,15 +CH_VOL OR (IX+Volume) + ADD A,VT_ & $FF + LD L,A + ADC A,VT_/256 + SUB L + LD H,A + LD A,(HL) +CH_ENV BIT 0,C + JR NZ,CH_NOEN + OR (IX+Env_En) +CH_NOEN LD (Ampl),A + BIT 7,B + LD A,C + JR Z,NO_ENSL + RLA + RLA + SRA A + SRA A + SRA A + ADD A,(IX+CrEnSl) ;SEE COMMENT BELOW + BIT 5,B + JR Z,NO_ENAC + LD (IX+CrEnSl),A +NO_ENAC LD HL,AddToEn + ADD A,(HL) ;BUG IN PT3 - NEED WORD HERE + LD (HL),A + JR CH_MIX +NO_ENSL RRA + ADD A,(IX+CrNsSl) + LD (AddToNs),A + BIT 5,B + JR Z,CH_MIX + LD (IX+CrNsSl),A +CH_MIX LD A,B + RRA + AND $48 +CH_EXIT LD HL,AYREGS+Mixer + OR (HL) + RRCA + LD (HL),A + POP HL + XOR A + OR (IX+COnOff) + RET Z + DEC (IX+COnOff) + RET NZ + XOR (IX+Flags) + LD (IX+Flags),A + RRA + LD A,(IX+OnOffD) + JR C,CH_ONDL + LD A,(IX+OffOnD) +CH_ONDL LD (IX+COnOff),A + RET + +PLAY XOR A + LD (AddToEn),A + LD (AYREGS+Mixer),A + DEC A + LD (AYREGS+EnvTp),A + LD HL,DelyCnt + DEC (HL) + JP NZ,PL2 + LD HL,ChanA+NtSkCn + DEC (HL) + JR NZ,PL1B +AdInPtA .EQU $+1 + LD BC,$0101 + LD A,(BC) + AND A + JR NZ,PL1A + LD D,A + LD (Ns_Base),A +CrPsPtr .EQU $+1 + LD HL,$2121 + INC HL + LD A,(HL) + INC A + JR NZ,PLNLP + +#IF LoopChecker + CALL CHECKLP +#ENDIF + +LPosPtr .EQU $+1 + LD HL,$2121 + LD A,(HL) + INC A +PLNLP LD (CrPsPtr),HL + DEC A + ;PT2 PT3 +PsCalc DEC A ;ADD A,A NOP + DEC A ;ADD A,(HL) NOP + ADD A,A + LD E,A + RL D + +#IF CurPosCounter + LD A,L +PosSub SUB $D6 + LD (CurPos),A +#ENDIF + +PatsPtr .EQU $+1 + LD HL,$2121 + ADD HL,DE +MODADDR .EQU $+1 + LD DE,$1111 + LD (PSP_+1),SP + LD SP,HL + POP HL + ADD HL,DE + LD B,H + LD C,L + POP HL + ADD HL,DE + LD (AdInPtB),HL + POP HL + ADD HL,DE + LD (AdInPtC),HL +PSP_ LD SP,$3131 +PL1A LD IX,ChanA+12 + CALL PTDECOD + LD (AdInPtA),BC + +PL1B LD HL,ChanB+NtSkCn + DEC (HL) + JR NZ,PL1C + LD IX,ChanB+12 +AdInPtB .EQU $+1 + LD BC,$0101 + CALL PTDECOD + LD (AdInPtB),BC + +PL1C LD HL,ChanC+NtSkCn + DEC (HL) + JR NZ,PL1D + LD IX,ChanC+12 +AdInPtC .EQU $+1 + LD BC,$0101 + CALL PTDECOD + LD (AdInPtC),BC + +Delay .EQU $+1 +PL1D LD A,$3E + LD (DelyCnt),A + +PL2 LD IX,ChanA + LD HL,(AYREGS+TonA) + CALL CHREGS + LD (AYREGS+TonA),HL + LD A,(Ampl) + LD (AYREGS+AmplA),A + LD IX,ChanB + LD HL,(AYREGS+TonB) + CALL CHREGS + LD (AYREGS+TonB),HL + LD A,(Ampl) + LD (AYREGS+AmplB),A + LD IX,ChanC + LD HL,(AYREGS+TonC) + CALL CHREGS + LD (AYREGS+TonC),HL + + LD HL,(Ns_Base_AddToNs) + LD A,H + ADD A,L + LD (AYREGS+Noise),A + +AddToEn .EQU $+1 + LD A,$3E + LD E,A + ADD A,A + SBC A,A + LD D,A + LD HL,(EnvBase) + ADD HL,DE + LD DE,(CurESld) + ADD HL,DE + LD (AYREGS+Env),HL + + XOR A + LD HL,CurEDel + OR (HL) + JR Z,ROUT + DEC (HL) + JR NZ,ROUT +Env_Del .EQU $+1 + LD A,$3E + LD (HL),A +ESldAdd .EQU $+1 + LD HL,$2121 + ADD HL,DE + LD (CurESld),HL + +ROUT +#IF ACBBAC + LD A,(SETUP) + AND 12 + JR Z,ABC + ADD A,CHTABLE + LD E,A + ADC A,CHTABLE/256 + SUB E + LD D,A + LD B,0 + LD IX,AYREGS + LD HL,AYREGS + LD A,(DE) + INC DE + LD C,A + ADD HL,BC + LD A,(IX+TonB) + LD C,(HL) + LD (IX+TonB),C + LD (HL),A + INC HL + LD A,(IX+TonB+1) + LD C,(HL) + LD (IX+TonB+1),C + LD (HL),A + LD A,(DE) + INC DE + LD C,A + ADD HL,BC + LD A,(IX+AmplB) + LD C,(HL) + LD (IX+AmplB),C + LD (HL),A + LD A,(DE) + INC DE + LD (RxCA1),A + XOR 8 + LD (RxCA2),A + LD HL,AYREGS+Mixer + LD A,(DE) + AND (HL) + LD E,A + LD A,(HL) +RxCA1 LD A,(HL) + AND %010010 + OR E + LD E,A + LD A,(HL) + AND %010010 +RxCA2 OR E + OR E + LD (HL),A +ABC +#ENDIF + +#IF ZX + XOR A + LD DE,$FFBF + LD BC,$FFFD + LD HL,AYREGS +LOUT OUT (C),A + LD B,E + OUTI + LD B,D + INC A + CP 13 + JR NZ,LOUT + OUT (C),A + LD A,(HL) + AND A + RET M + LD B,E + OUT (C),A + RET +#ENDIF + +#IF MSX +;MSX version of ROUT (c)Dioniso + XOR A + LD C,$A0 + LD HL,AYREGS +LOUT OUT (C),A + INC C + OUTI + DEC C + INC A + CP 13 + JR NZ,LOUT + OUT (C),A + LD A,(HL) + AND A + RET M + INC C + OUT (C),A + RET +#ENDIF + +#IF WBW + LD A,(WMOD) ; If WMOD = 1, CPU is Z180 + OR A ; Set flags + JR Z,LOUT0 ; Skip Z180 stuff + DI + IN0 A,(DCNTL) ; Get wait states + LD (DCSAV),A ; Save value + OR %00110000 ; Force slow operation (I/O W/S=3) + OUT0 (DCNTL),A ; And update DCNTL +LOUT0 LD DE,(PORTS) ; D := RDAT, E := RSEL + XOR A ; start with reg 0 + LD C,E ; point to address port + LD HL,AYREGS ; start of value list +LOUT OUT (C),A ; select register + LD C,D ; point to data port + OUTI ; write (HL) to data port, bump HL + LD C,E ; point to address port + INC A ; next register + CP 13 ; reg 13? + JR NZ,LOUT ; if not, loop + OUT (C),A ; select register 13 + LD A,(HL) ; get value for register 13 + AND A ; set flags + JP M,LOUT2 ; if bit 7 set, return w/o writing value + LD C,D ; select data port + OUT (C),A ; write value to register 13 +LOUT2 LD A,(WMOD) ; If WMOD = 1, CPU is Z180 + OR A ; Set flags + RET Z ; Skip Z180 stuff + LD A,(DCSAV) ; Get saved DCNTL value + OUT0 (DCNTL),A ; And restore it + EI + RET ; And done +#ENDIF + +#IF ACBBAC +CHTABLE .EQU $-4 + .DB 4,5,15,%001001,0,7,7,%100100 +#ENDIF + +NT_DATA .DB (T_NEW_0-T1_)*2 + .DB TCNEW_0-T_ + .DB (T_OLD_0-T1_)*2+1 + .DB TCOLD_0-T_ + .DB (T_NEW_1-T1_)*2+1 + .DB TCNEW_1-T_ + .DB (T_OLD_1-T1_)*2+1 + .DB TCOLD_1-T_ + .DB (T_NEW_2-T1_)*2 + .DB TCNEW_2-T_ + .DB (T_OLD_2-T1_)*2 + .DB TCOLD_2-T_ + .DB (T_NEW_3-T1_)*2 + .DB TCNEW_3-T_ + .DB (T_OLD_3-T1_)*2 + .DB TCOLD_3-T_ + +T_ + +TCOLD_0 .DB $00+1,$04+1,$08+1,$0A+1,$0C+1,$0E+1,$12+1,$14+1 + .DB $18+1,$24+1,$3C+1,0 +TCOLD_1 .DB $5C+1,0 +TCOLD_2 .DB $30+1,$36+1,$4C+1,$52+1,$5E+1,$70+1,$82,$8C,$9C + .DB $9E,$A0,$A6,$A8,$AA,$AC,$AE,$AE,0 +TCNEW_3 .DB $56+1 +TCOLD_3 .DB $1E+1,$22+1,$24+1,$28+1,$2C+1,$2E+1,$32+1,$BE+1,0 +TCNEW_0 .DB $1C+1,$20+1,$22+1,$26+1,$2A+1,$2C+1,$30+1,$54+1 + .DB $BC+1,$BE+1,0 +TCNEW_1 .EQU TCOLD_1 +TCNEW_2 .DB $1A+1,$20+1,$24+1,$28+1,$2A+1,$3A+1,$4C+1,$5E+1 + .DB $BA+1,$BC+1,$BE+1,0 + +PT3EMPTYORN .EQU $-1 + .DB 1,0 + +;first 12 values of tone tables (packed) + +T_PACK .DB $06EC*2/256,$06EC*2 + .DB $0755-$06EC + .DB $07C5-$0755 + .DB $083B-$07C5 + .DB $08B8-$083B + .DB $093D-$08B8 + .DB $09CA-$093D + .DB $0A5F-$09CA + .DB $0AFC-$0A5F + .DB $0BA4-$0AFC + .DB $0C55-$0BA4 + .DB $0D10-$0C55 + .DB $066D*2/256,$066D*2 + .DB $06CF-$066D + .DB $0737-$06CF + .DB $07A4-$0737 + .DB $0819-$07A4 + .DB $0894-$0819 + .DB $0917-$0894 + .DB $09A1-$0917 + .DB $0A33-$09A1 + .DB $0ACF-$0A33 + .DB $0B73-$0ACF + .DB $0C22-$0B73 + .DB $0CDA-$0C22 + .DB $0704*2/256,$0704*2 + .DB $076E-$0704 + .DB $07E0-$076E + .DB $0858-$07E0 + .DB $08D6-$0858 + .DB $095C-$08D6 + .DB $09EC-$095C + .DB $0A82-$09EC + .DB $0B22-$0A82 + .DB $0BCC-$0B22 + .DB $0C80-$0BCC + .DB $0D3E-$0C80 + .DB $07E0*2/256,$07E0*2 + .DB $0858-$07E0 + .DB $08E0-$0858 + .DB $0960-$08E0 + .DB $09F0-$0960 + .DB $0A88-$09F0 + .DB $0B28-$0A88 + .DB $0BD8-$0B28 + .DB $0C80-$0BD8 + .DB $0D60-$0C80 + .DB $0E10-$0D60 + .DB $0EF8-$0E10 + +;vars from here can be stripped +;you can move VARS to any other address + +VARS + +ChanA .FILL CHP,$00 +ChanB .FILL CHP,$00 +ChanC .FILL CHP,$00 + +;GlobalVars +DelyCnt .DB 0 +CurESld .DW 0 +CurEDel .DB 0 +Ns_Base_AddToNs +Ns_Base .DB 0 +AddToNs .DB 0 + +AYREGS + +VT_ .FILL 256,$00 ;CreatedVolumeTableAddress + +EnvBase .EQU VT_+14 + +T1_ .EQU VT_+16 ;Tone tables data depacked here + +T_OLD_1 .EQU T1_ +T_OLD_2 .EQU T_OLD_1+24 +T_OLD_3 .EQU T_OLD_2+24 +T_OLD_0 .EQU T_OLD_3+2 +T_NEW_0 .EQU T_OLD_0 +T_NEW_1 .EQU T_OLD_1 +T_NEW_2 .EQU T_NEW_0+24 +T_NEW_3 .EQU T_OLD_3 + +PT2EMPTYORN .EQU VT_+31 ;1,0,0 sequence + +NT_ .FILL 192,$00 ;CreatedNoteTableAddress + +;local var +Ampl .EQU AYREGS+AmplC + +VAR0END .EQU VT_+16 ;INIT zeroes from VARS to VAR0END-1 + +VARSEND .EQU $ + +MDLADDR .EQU $ + + .END + +;Release 0 steps: +;02/27/2005 +;Merging PT2 and PT3 players; debug +;02/28/2005 +;debug; optimization +;03/01/2005 +;Migration to SjASM; conditional assembly (ZX, MSX and +;visualization) +;03/03/2005 +;SETPORT subprogram (35 bytes shorter) +;03/05/2005 +;fixed CurPosCounter error +;03/06/2005 +;Added ACB and BAC channels swapper (for Spectre); more cond. +;assembly keys; optimization +;Release 1 steps: +;04/15/2005 +;Removed loop bit resetting for no loop build (5 bytes shorter) +;04/30/2007 +;New 1.xx and 2.xx interpretation for PT 3.7+. + +;Tests in IMMATION TESTER V1.0 by Andy Man/POS +;(for minimal build) +;Module name/author Min tacts Max tacts +;PT3 (a little slower than standalone player) +;Spleen/Nik-O 1720 9368 +;Chuta/Miguel 1720 9656 +;Zhara/Macros 4536 8792 +;PT2 (more slower than standalone player) +;Epilogue/Nik-O 3928 10232 +;NY tHEMEs/zHenYa 3848 9208 +;GUEST 4/Alex Job 2824 9352 +;KickDB/Fatal Snipe 1720 9880 + +;Size (minimal build for ZX Spectrum): +;Code block $7B9 bytes +;Variables $21D bytes (can be stripped) +;Size in RAM $7B9+$21D=$9D6 (2518) bytes + +;Notes: +;Pro Tracker 3.4r can not be detected by header, so PT3.4r tone +;tables realy used only for modules of 3.3 and older versions. diff --git a/Source/Apps/PTxPlay/Tunes/Attack.pt3 b/Source/Apps/PTxPlay/Tunes/Attack.pt3 new file mode 100644 index 00000000..dc9d04a9 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Attack.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Backup.pt3 b/Source/Apps/PTxPlay/Tunes/Backup.pt3 new file mode 100644 index 00000000..e9141fe4 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Backup.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/BadMice.pt3 b/Source/Apps/PTxPlay/Tunes/BadMice.pt3 new file mode 100644 index 00000000..aa78a8d2 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/BadMice.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/HowRU.pt3 b/Source/Apps/PTxPlay/Tunes/HowRU.pt3 new file mode 100644 index 00000000..47fb464e Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/HowRU.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Iteratn.pt3 b/Source/Apps/PTxPlay/Tunes/Iteratn.pt3 new file mode 100644 index 00000000..575cccf4 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Iteratn.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/LookBack.pt3 b/Source/Apps/PTxPlay/Tunes/LookBack.pt3 new file mode 100644 index 00000000..1dd15ac7 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/LookBack.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Louboutn.pt3 b/Source/Apps/PTxPlay/Tunes/Louboutn.pt3 new file mode 100644 index 00000000..8b4b0b15 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Louboutn.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Namida.pt3 b/Source/Apps/PTxPlay/Tunes/Namida.pt3 new file mode 100644 index 00000000..2a2d8562 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Namida.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Recoll.pt3 b/Source/Apps/PTxPlay/Tunes/Recoll.pt3 new file mode 100644 index 00000000..5a2744ab Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Recoll.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Sanxion.pt3 b/Source/Apps/PTxPlay/Tunes/Sanxion.pt3 new file mode 100644 index 00000000..25a77aab Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Sanxion.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Synch.pt3 b/Source/Apps/PTxPlay/Tunes/Synch.pt3 new file mode 100644 index 00000000..16149d1a Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Synch.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/ToStar.pt3 b/Source/Apps/PTxPlay/Tunes/ToStar.pt3 new file mode 100644 index 00000000..9c77ed4f Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/ToStar.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Victory.pt3 b/Source/Apps/PTxPlay/Tunes/Victory.pt3 new file mode 100644 index 00000000..d2c6f3e7 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Victory.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Wicked.pt3 b/Source/Apps/PTxPlay/Tunes/Wicked.pt3 new file mode 100644 index 00000000..840a58d1 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Wicked.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/YeOlde.pt3 b/Source/Apps/PTxPlay/Tunes/YeOlde.pt3 new file mode 100644 index 00000000..ba99371b Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/YeOlde.pt3 differ diff --git a/Source/Apps/PTxPlay/Tunes/Yeovil.pt3 b/Source/Apps/PTxPlay/Tunes/Yeovil.pt3 new file mode 100644 index 00000000..694de685 Binary files /dev/null and b/Source/Apps/PTxPlay/Tunes/Yeovil.pt3 differ diff --git a/Source/Apps/PTxPlay/readme.txt b/Source/Apps/PTxPlay/readme.txt new file mode 100644 index 00000000..4e72acbb --- /dev/null +++ b/Source/Apps/PTxPlay/readme.txt @@ -0,0 +1,113 @@ +Universal PT2 and PT3 player for ZX Spectrum and MSX Release 1 +(c)2004-2007 S.V.Bulba +http://bulba.untergrund.net/ (http://bulba.at.kz/) +Release date: 30 of April 2007 + +Common remarks +-------------- + +The project is a compact combination of two players: Vortex Tracker II v1.0 PT3 +player for ZX Spectrum and Universal PT2 player for ZX Spectrum and MSX +computers. This player is a little slower than standalone players, but more +compact: less than 2K instead of 2.6K (1.6+1). + +As bonus there are some additional functions (conditional assembly): + +1) ROUT procedure for ZX or MSX; +2) positions counter at (START+11); +3) ability to change channels allocation during playing; +4) checking loop point; +5) disabling official identificator. + +New for this release: added PT v3.7 features (commands 1.xx and 2.xx). + +Project was compiled in assembler for Win32: + +SjASM Z80 Assembler v0.39f +Copyright 2005 Sjoerd Mastijn + +Files +----- + +PTxPlay.asm - source Z80 assembler code. +PTxPlay.h - same text is prepared for Alasm. +PTxPlay.txt - same text is prepared for ZX Asm 3.10. +PTxPlay - assembled binary code block in minimal configuration for ZX Spectrum +with identificator to load at #C000 address, zeroes at end can be truncated. + +Entry points +------------ + +Before playing at (START+10) set bit 1 for PT2 and reset for PT3 and call START +(loading) address. To detect module type you can use UniSearch by Spectre. + +Player is not reallocable, so you need to assemble with other ORG value, if you +want to load code at other than #C000 address, also you can place VARS area to +any other address too. After calling START AY is stop any sounding. At START+10 +is located SETUP byte, where bit 0 is used to control looping of melody. At any +time you can set bit 0 to disable loop. Bit 7 can be checked at any moment, it +is set after reaching end of module (finishing playing of last position). Bits +2 and 3 is used for setting channels allocation. Only first three combinations +of these bits are allowed: 0 - ABC, 1 - ACB, 2 - BAC. ABC is used to output +channels "as is". ACB swaps B and C, and BAC swaps A and B. So, any stereo +combinations can be heard: ABC-stereo for the most xUSSR ZX-clones, ACB - East +Europe ones, and BAC - ZS Scorpion 256K. + +In current compilation module must be loaded after variables (by default). Of +course, you can change it in source or in assembled code. Also you can specify +module address in HL as follows: + + LD HL,PT3ModuleAddress + XOR A ;PT3 + LD (START+10),A + CALL START+3 + +By calling START you are proceeding INIT procedure, which analyzes module type +bit and prepares corresponding player branches, checks PT3 module version and +prepares corresponding note and volume tables (it is need for correct playing of +modules of different PT3 subversions). Also you can call START after stopping +playing to mute AY sound. In last case you can call START+8 to simple mute AY +sound, to continue playing simply continue calling START+5 as usually. + +To play, call START+5 address each 1/50 of second (interrupt). Playing selects +right portamento algorithm for old (v3.5-) and new (v3.6+ or VT II) modules. +During running PLAY subprogram no any interrupts are expected, it is your task +to right call PLAY. For example, next example is totaly right: + + CALL #C000 ;calling init + EI ;enable interrupts +_LP HALT ;wait for next interrupt + CALL #C005 ;call play, player uses 10500 tacts max, +;so no interrupt can be before next HALT + XOR A ;test keyboard + IN A,(#FE) + CPL + AND 15 + JR Z,_LP + CALL #C008 ;mute AY sound (you can resume playing from current place) + RET + +At START+11 current position byte can be placed (see conditional assembly keys). +To get common number of position, see module header or use UniSearch by Spectre. + +Example of playing without loop: + + LD A,1 + LD (START+10),A + CALL START + EI +LOOP HALT + CALL START+5 + LD A,(START+10) + RLA + JR NC,LOOP + RET + +Read also all comments in source file. + +Thanks to Andrey Bogdanovich aka Spectre for help and UniSearch; Ivan Roshin for +tone and volume tables generators; Alfonso D.C. aka Dioniso for info about MSX. + +Sergey Bulba + +19 of September 2004 - 30 of April 2007 diff --git a/Source/Apps/Timer.asm b/Source/Apps/Timer.asm index 8d925216..21f7aa13 100644 --- a/Source/Apps/Timer.asm +++ b/Source/Apps/Timer.asm @@ -18,6 +18,7 @@ ; ; Change Log: ; 2018-01-14 [WBW] Initial release +; 2018-01-17 [WBW] Add HBIOS check ;_______________________________________________________________________________ ; ; ToDo: @@ -37,6 +38,7 @@ ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr rmj .equ 2 ; intended CBIOS version - major rmn .equ 9 ; intended CBIOS version - minor ; +bf_sysver .equ $F1 ; BIOS: VER function bf_sysget .equ $F8 ; HBIOS: SYSGET function bf_sysgettimer .equ $D0 ; TIMER subfunction ; @@ -70,6 +72,14 @@ init: call crlf ; formatting ld de,msgban ; point to version message part 1 call prtstr ; print it +; + call idbio ; identify active BIOS + cp 1 ; check for HBIOS + jp nz,errbio ; handle BIOS error +; + ld a,rmj << 4 | rmn ; expected HBIOS ver + cp d ; compare with result above + jp nz,errbio ; handle BIOS error ; initx ; initialization complete @@ -81,14 +91,17 @@ initx process: ; look for start of parms ld hl,$81 ; point to start of parm area (past len byte) +; +process00: call nonblank ; skip to next non-blank char - jp z,process0 ; no parms, go to display + jp z,process0 ; no more parms, go to display ; - ; check for special option, introduced by a "/" + ; check for option, introduced by a "/" cp '/' ; start of options? jp nz,usage ; yes, handle option call option ; do option processing - ret nz ; done if non-zero reture + ret nz ; done if non-zero return + jr process00 ; continue looking for options ; process0: call crlf2 ; formatting @@ -137,6 +150,10 @@ option: ; inc hl ; next char ld a,(hl) ; get it + or a ; zero terminator? + ret z ; done if so + cp ' ' ; blank? + ret z ; done if so cp '?' ; is it a '?'? jp z,usage ; yes, display usage cp 'C' ; is it a 'C', continuous? @@ -145,17 +162,58 @@ option: ; usage: ; - call crlf2 ; blank line - ld de,msguse ; point to usage message - call prtstr ; print it - or $FF ; signal no action performed - ret ; and return + jp erruse ; display usage and get out ; setcont: ; or $FF ; set A to true - ld (cont),a ; and save it - xor a ; signal success + ld (cont),a ; and set continuous flag + jr option ; check for more option letters +; +; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0 +; +idbio: +; + ; Check for UNA (UBIOS) + ld a,($FFFD) ; fixed location of UNA API vector + cp $C3 ; jp instruction? + jr nz,idbio1 ; if not, not UNA + ld hl,($FFFE) ; get jp address + ld a,(hl) ; get byte at target address + cp $FD ; first byte of UNA push ix instruction + jr nz,idbio1 ; if not, not UNA + inc hl ; point to next byte + ld a,(hl) ; get next byte + cp $E5 ; second byte of UNA push ix instruction + jr nz,idbio1 ; if not, not UNA, check others +; + ld bc,$04FA ; UNA: get BIOS date and version + rst 08 ; DE := ver, HL := date +; + ld a,2 ; UNA BIOS id = 2 + ret ; and done +; +idbio1: + ; Check for RomWBW (HBIOS) + ld hl,($FFFE) ; HL := HBIOS ident location + ld a,'W' ; First byte of ident + cp (hl) ; Compare + jr nz,idbio2 ; Not HBIOS + inc hl ; Next byte of ident + ld a,~'W' ; Second byte of ident + cp (hl) ; Compare + jr nz,idbio2 ; Not HBIOS +; + ld b,bf_sysver ; HBIOS: VER function + ld c,0 ; required reserved value + rst 08 ; DE := version, L := platform id +; + ld a,1 ; HBIOS BIOS id = 1 + ret ; and done +; +idbio2: + ; No idea what this is + xor a ; Setup return value of 0 ret ; and done ; ; Print character in A without destroying any registers @@ -375,8 +433,13 @@ erruse: ; command usage error (syntax) errprm: ; command parameter error (syntax) ld de,msgprm jr err +; +errbio: ; invalid BIOS or version + ld de,msgbio + jr err +; err: ; print error string and return error signal - call crlf ; print newline + call crlf2 ; print newline ; err1: ; without the leading crlf call prtstr ; print error string @@ -407,5 +470,7 @@ msguse .db "Usage: TIMER [/C] [/?]",13,10 .db " TIMER /? (display version and usage)",13,10 .db " TIMER /C (display timer value continuously)",0 msgprm .db "Parameter error (TIMER /? for usage)",0 +msgbio .db "Incompatible BIOS or version, " + .db "HBIOS v", '0' + rmj, ".", '0' + rmn, " required",0 ; .end diff --git a/Source/Apps/XM/Build.cmd b/Source/Apps/XM/Build.cmd index 1c0859bb..26cb0ccc 100644 --- a/Source/Apps/XM/Build.cmd +++ b/Source/Apps/XM/Build.cmd @@ -16,4 +16,4 @@ zx mload25 XM=xmdm125,xmhb rem set PROMPT=[Build] %PROMPT% rem %comspec% -move /Y XM.com .. +copy /Y XM.com ..\..\..\Binary\Apps\ diff --git a/Source/Apps/XM/Clean.cmd b/Source/Apps/XM/Clean.cmd index 94273192..09ada3e4 100644 --- a/Source/Apps/XM/Clean.cmd +++ b/Source/Apps/XM/Clean.cmd @@ -4,4 +4,4 @@ setlocal if exist *.hex del *.hex if exist *.prn del *.prn if exist *.lst del *.lst -if exist xm.com del xm.com +if exist *.com del *.com diff --git a/Source/CBIOS/ver.inc b/Source/CBIOS/ver.inc index 066a24ac..5464ad2a 100644 --- a/Source/CBIOS/ver.inc +++ b/Source/CBIOS/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 9 #DEFINE RUP 0 #DEFINE RTP 0 -#DEFINE BIOSVER "2.9.0-pre.0" +#DEFINE BIOSVER "2.9.0" diff --git a/Source/HBIOS/Build.ps1 b/Source/HBIOS/Build.ps1 index 2d5bab44..8f1af1bc 100644 --- a/Source/HBIOS/Build.ps1 +++ b/Source/HBIOS/Build.ps1 @@ -51,6 +51,8 @@ $ComFile = "${OutDir}/${RomName}.com" $ImgFile = "${OutDir}/${RomName}.img" if ($Platform -eq "UNA") {$CBiosFile = '../CBIOS/cbios_una.bin'} else {$CBiosFile = '../CBIOS/cbios_wbw.bin'} +$RomApps = "assign","fdu","format","mode","osldr","rtc","survey","syscopy","sysgen","talk","timer","xm" + "" "Building ${RomName}: ${ROMSize}KB ROM configuration ${Config} for Z${CPUType}..." "" @@ -129,7 +131,14 @@ if (Test-Path "../RomDsk/${Platform}/*.*") { cpmcp -f $RomFmt $RomDiskFile ../RomDsk/${Platform}/*.* 0: } -cpmcp -f $RomFmt $RomDiskFile ../Apps/*.com 0: + +foreach ($App in $RomApps) +{ + cpmcp -f $RomFmt $RomDiskFile ../../Binary/Apps/$App.com 0: +} + + +# cpmcp -f $RomFmt $RomDiskFile ../Apps/*.com 0: cpmcp -f $RomFmt $RomDiskFile *.sys 0: if ($Platform -eq "UNA") diff --git a/Source/HBIOS/ver.inc b/Source/HBIOS/ver.inc index 066a24ac..5464ad2a 100644 --- a/Source/HBIOS/ver.inc +++ b/Source/HBIOS/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 9 #DEFINE RUP 0 #DEFINE RTP 0 -#DEFINE BIOSVER "2.9.0-pre.0" +#DEFINE BIOSVER "2.9.0" diff --git a/Source/Images/ReadMe.txt b/Source/Images/ReadMe.txt index 5ea53ad5..b984e4a4 100644 --- a/Source/Images/ReadMe.txt +++ b/Source/Images/ReadMe.txt @@ -1,70 +1,51 @@ -************************************************************ -*** I m a g e M a k e r *** -*** *** -*** Disk Image Generator for RomWBW *** -************************************************************ - -Builders: Wayne Warthen (wwarthen@gmail.com) - -Updated: 2014-02-16 -Version: 2.5.3 - -This is a supplemental toolset for RomWBW that builds -floppy and/or hard disk images that can be used on -RomWBW by writing the image to a floppy or hard -disk (include CF and SD cards). - -In summary, CP/M files are placed inside of a pre-defined -Windows directory structure. A script is then run to -create floppy and/or hard disk images from the directory -tree contents. The resultant images may be copied directly -to floppy or hard disk media or used for SIMH emulator -disk images. - +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains a toolset for RomWBW that builds floppy and +hard disk media images that can be used on RomWBW by writing the +image to a floppy or hard disk (including CF and SD cards). + +In summary, CP/M files are placed inside of a pre-defined Windows +directory structure. A script is then run to create the floppy and +hard disk images from the directory tree contents. The resultant +images may be copied directly to floppy or hard disk media or used +for SIMH emulator disk images. + System Requirements ------------------- -This ImageMaker scripts run on Microsoft Windows XP -or greater (32 and 64 bit variants of Windows are -fine). - -Other than the contents of the ImageMaker zip archive, -you will need to have Microsoft PowerShell installed. -All variants of Windows XP and later support PowerShell. -It is included in all versions after Windows XP. If you -are using Windows XP, you will need to download it from -Microsoft and install it (free download). - -By default, PowerShell will not run arbitrary scripts -that are not signed. In order to run the ImageMaker -scripts, you will need to tell PowerShell it is OK -to run run "local" scripts that are not signed. -Right-click the file in the ImageMaker archive -called FixPowerShell and choose "Run as Administrator" -and follow the instructions. +The scripts run on Microsoft Windows XP or greater (32 and 64 bit +variants of Windows are fine). You will need to have Microsoft +PowerShell installed. All variants of Windows XP and later support +PowerShell. It is included in all versions after Windows XP. If you +are using Windows XP, you will need to download it from Microsoft and +install it (free download). + +The cpmtools toolset is used to generate the actual disk images. +This toolset is included in the distribution. Preparing the Source Directory Contents --------------------------------------- -The ImageMaker script expects your files to be found -in the Source directory inside a specific directory -structure. Note that you will see there are some -CP/M files in the Source directory tree in the -distribution. These are simply test files I used -and have no specific meaing. You will probably want -to replace them with your own files as desired. - -If you look at the Source directory, you will find -4 directories. fd0 and fd1 will contain the files -to be placed in the two floppy images gneerated. -hd0 and hd1 will contain the files to be used -to generate the two hard disk images. There -is nothing magic about the fact that there are -two of each kind of image generated. It just -seemed like a good number to the author. A quick -review of the scripts and you will see it is very -easy to modify the number of images generated if -you want. +The script expects your files to be found inside a specific directory +structure. Note that you will see there are some CP/M files in the +Source directory tree in the distribution. These are simply test +files I used and have no specific meaing. You will probably want to +replace them with your own files as desired. + +If you look at the Images directory, you will find 4 +sub-directories. fd0 and fd1 will contain the files to be placed in +the two floppy images gneerated. hd0 and hd1 will contain the files +to be used to generate the two hard disk images. There is nothing +magic about the fact that there are two of each kind of image +generated. It just seemed like a good number to the author. A quick +review of the scripts and you will see it is very easy to modify the +number of images generated if you want. For floppy disks, the structure is: @@ -73,18 +54,16 @@ For floppy disks, the structure is: | +--> u15 -Above, fd0 refers to the first floppy disk image and -u0...u15 refer to the user areas on the disk. You -place whatever files you want on fd0, user 0 in the -fd0\u0 directory. You will notice that not all of the -u0...u15 directories exist. The script does not care -and treats a non-existent directory as a directory with -no files. The fd1 directory is exactly the same as fd0 -- -it is simply the second floppy image. +Above, fd0 refers to the first floppy disk image and u0...u15 refer +to the user areas on the disk. You place whatever files you want on +fd0, user 0 in the fd0\u0 directory. You will notice that not all of +the u0...u15 directories exist. The script does not care and treats +a non-existent directory as a directory with no files. The fd1 +directory is exactly the same as fd0 -- it is simply the second +floppy image. -At present, the scripts assume that the floppy media -is 1.44MB. You will need to modify the scripts if you -want to create different media. +At present, the scripts assume that the floppy media is 1.44MB. You +will need to modify the scripts if you want to create different media. For hard disks, the structure has one more level: @@ -108,56 +87,49 @@ For hard disks, the structure has one more level: | +--> u15 -The above uses the same concept as the floppy disk source -structure, but includes an additional directory layer to -represent the first 4 slices of the hard disk. For most -RomWBW builds, s0-s3 would show up as the first 4 hard -disk drive letters, frequently E: to H:. - -No files should be placed in the first two layers of the -tree (hd0 or s0-s3). All files go into the lowest level -of the tree (u0-u15). As above, empty or non-existent -directories are not a problem for the script. Just fill -in or create the appropriate directories. The only constraint -is the the script will only look for two hard disks (hd0-hd1), -4 slices (s0-s4), and 16 user areas (u0-u15). The -number of hard disks and number of slices could be changed -by modifying the generation scripts. +The above uses the same concept as the floppy disk source structure, +but includes an additional directory layer to represent the first 4 +slices of the hard disk. For most RomWBW builds, s0-s3 would show up +as the first 4 hard disk drive letters, frequently E: to H:. + +No files should be placed in the first two layers of the tree (hd0 or +s0-s3). All files go into the lowest level of the tree (u0-u15). As +above, empty or non-existent directories are not a problem for the +script. Just fill in or create the appropriate directories. The +only constraint is the the script will only look for two hard disks +(hd0-hd1), 4 slices (s0-s4), and 16 user areas (u0-u15). The number +of hard disks and number of slices could be changed by modifying the +generation scripts. Building the Images ------------------- -The image creation process simply traverses the directory -structures described above and builds a raw image each -floppy disk or hard disk. Note that cpmtools is used -to generate the images and is included in the archive -under the Tools directory. - -The scripts are intended to be run from a command -prompt. Open a command prompt and navigate to the -ImageMaker directory. To build the floppy disk -images (fd0 and fd1), use the command "BuildFD". -To build the hard disk images (hd0, hd1), use the -command "BuildHD". You can use the command -"BuildAll" to build both the floppy and hard -disk images in one run. - -After completion of the script, the resultant image -files are placed in the Output directory with names -such as fd0.img and hd0.img. - -Below is sample output from building the -hard disk images: - - | C:\Users\WWarthen\Projects\N8VEM\Build\ImageMaker>BuildHD +The image creation process simply traverses the directory structures +described above and builds a raw image each floppy disk or hard +disk. Note that cpmtools is used to generate the images and is +included in the distribution under the Tools directory. + +The scripts are intended to be run from a command prompt. Open a +command prompt and navigate to the Images directory. To build the +floppy disk images (fd0 and fd1), use the command "BuildFD". To build +the hard disk images (hd0, hd1), use the command "BuildHD". You can +use the command "BuildAll" to build both the floppy and hard disk +images in one run. + +After completion of the script, the resultant image files are placed +in the Binary directory with names such as fd0.img and hd0.img. + +Below is sample output from building the hard disk images: + + | C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW\Images>BuildHD | Creating work file... | Creating hard disk images... | Generating Hard Disk 0... | Adding files to slice 0... - | cpmcp -f n8vem_hd0 slice0.tmp Source/hd0/s0/u0/*.* 0: - | cpmcp -f n8vem_hd0 slice0.tmp Source/hd0/s0/u2/*.* 2: + | cpmcp -f wbw_hd0 slice0.tmp Source/hd0/s0/u0/*.* 0: + | cpmcp -f wbw_hd0 slice0.tmp Source/hd0/s0/u2/*.* 2: | Adding files to slice 1... - | cpmcp -f n8vem_hd0 slice1.tmp Source/hd0/s1/u0/*.* 0: + | cpmcp -f wbw_hd0 slice1.tmp Source/hd0/s1/u0/*.* 0: | Adding files to slice 2... | Adding files to slice 3... | Combining slices into final disk image hd0... @@ -178,41 +150,36 @@ hard disk images: | slice3.tmp | 1 file(s) copied. | - | C:\Users\WWarthen\Projects\N8VEM\Build\ImageMaker> + | C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW\Images> -Be aware that the script always builds the image file -from scratch. It will not update the previous contents. -Any contents of a pre-existing image file will be -permanently destroyed. +Be aware that the script always builds the image file from scratch. +It will not update the previous contents. Any contents of a +pre-existing image file will be permanently destroyed. Installing Images ----------------- -First of all, a MAJOR WARNING!!!! The tools described -below are quite capable of obliterating your running -Windows system drive. Use with extreme caution and -make sure you have backups. +First of all, a MAJOR WARNING!!!! The tools described below are +quite capable of obliterating your running Windows system drive. Use +with extreme caution and make sure you have backups. -To install a floppy image on floppy media, you can use -the tool called RaWriteWin. This tool is included in the -Tools directory of the distribution. -This tool will write your floppy image (fd0.img or fd1.img) -to a floppy disk using a raw block transfer. The tool is +To install a floppy image on floppy media, you can use the tool +called RaWriteWin. This tool is included in the Tools directory of +the distribution. This tool will write your floppy image (fd0.img or +fd1.img) to a floppy disk using a raw block transfer. The tool is GUI based and it's operation is self explanatory. -To install a hard disk image on a CF card or SD card, you -must have the appropriate media card slot on your computer. -If you do, you can use the tool called Win32 Disk Imager. -This tool is also included in the Tools directory of the -distribution. This tool will write your hard disk -image (hd0.img or hd1.img) to the designated media -card. This tool is also GUI based and self explanatory. +To install a hard disk image on a CF card or SD card, you must have +the appropriate media card slot on your computer. If you do, you can +use the tool called Win32 Disk Imager. This tool is also included in +the Tools directory of the distribution. This tool will write your +hard disk image (hd0.img or hd1.img) to the designated media card. +This tool is also GUI based and self explanatory. -Use of the SIMH emulator is outside of the scope of this -document. However, if you use SIMH, you will find that -you can attach the hard disk images to the emulator with -lines such as the following in your SIMH configuration -file: +Use of the SIMH emulator is outside of the scope of this document. +However, if you use SIMH, you will find that you can attach the hard +disk images to the emulator with lines such as the following in your +SIMH configuration file: | attach hdsk0 hd0.img | set hdsk0 format=HDSK @@ -222,25 +189,23 @@ file: Making Disk Images Bootable --------------------------- -The current generation of these scripts does not make -the resultant media bootable. This is primarily because -there are multiple choices for what you can put on the -boot tracks of the media and that is a choice best left -to the user. +The current generation of these scripts does not make the resultant +media bootable. This is primarily because there are multiple choices +for what you can put on the boot tracks of the media and that is a +choice best left to the user. -The simplest way to make a resultant image bootable is -to do it from your running CP/M system. Boot your -system using the ROM selection, then use the COPYSYS -command to make the desired drive bootable. +The simplest way to make a resultant image bootable is to do it from +your running CP/M system. Boot your system using the ROM selection, +then use the COPYSYS command to make the desired drive bootable. -You would use a command like the following to make -drive C bootable. +You would use a command like the following to make drive C bootable. | B>COPYSYS C:=CPM.SYS Notes ----- -I realize these instructions are very minimal. I am happy to answer -questions. You will find the Google Group 'N8VEM' to be a great -source of information as well. \ No newline at end of file +I realize these instructions are very minimal. I am happy to answer +questions. You will find the RetroBrew Computers Forum at +https://www.retrobrewcomputers.org/forum/ to be a great source of +information as well. \ No newline at end of file diff --git a/Source/Images/fd1/u0/ASM.COM b/Source/Images/fd1/u0/ASM.COM deleted file mode 100644 index a63e5aec..00000000 Binary files a/Source/Images/fd1/u0/ASM.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/CLRDIR.COM b/Source/Images/fd1/u0/CLRDIR.COM deleted file mode 100644 index d1f2a7d6..00000000 Binary files a/Source/Images/fd1/u0/CLRDIR.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/CR.COM b/Source/Images/fd1/u0/CR.COM deleted file mode 100644 index 8a824bcc..00000000 Binary files a/Source/Images/fd1/u0/CR.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/DDT.COM b/Source/Images/fd1/u0/DDT.COM deleted file mode 100644 index 83f8603f..00000000 Binary files a/Source/Images/fd1/u0/DDT.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/DDTZ.COM b/Source/Images/fd1/u0/DDTZ.COM deleted file mode 100644 index e30a34c0..00000000 Binary files a/Source/Images/fd1/u0/DDTZ.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/DDTZ.DOC b/Source/Images/fd1/u0/DDTZ.DOC deleted file mode 100644 index e4470528..00000000 --- a/Source/Images/fd1/u0/DDTZ.DOC +++ /dev/null @@ -1,564 +0,0 @@ - - DDTZ v2.7 - by C.B. Falconer - edited by George A. Havach - -Introduction: -============ -DDTZ v2.7 is a complete replacement for DDT, Digital Research's -famous Dynamic Debugging Tool, with improved functionality, bug -extermination, and full Z80 support. In general, DDTZ is fully -compatible with the original utility, but it has extra and -extended commands and many fewer quirks. All Z80-specific -instructions can be (dis)assembled, though in Intel rather then -Zilog format. Furthermore, DDTZ will correctly trace ('T' and 'U' -commands) both 8080 and Z80 instructions, depending on which CPU -is operating. On startup, the program announces which CPU it is -running on. - -DDTZ v2.7 now handles the 64180 added opcodes. It does NOT test -for a 64180 CPU, since this cannot be done without executing -illegal Z80 instructions, which in turn will crash some -simulators. However v2.7 does not execute any 64180 instructions -internally, only in the subject program. - -This issue supplies the "M" version assembled, to avoid errors -when switching between MSDOS and CPM systems. The command table -is updated accordingly. Most CPM users are also MSDOS users, but -not vice-versa. - -The program is invoked by typing - - ddtz -or - ddtz [d:]filespec - -In the second form, DDTZ will load the specified file into -memory starting at 0100H, unless it's a .HEX file that sets its -own load address. Besides reporting the NEXT free address and -the PC (program counter) after a successful load, DDTZ also shows -the number of memory pages needed for a SAVE. Instead of having -to write all this down, just use the 'X' command at any time to -redisplay these three values for the current application. - -NOTE: loading more code above the NEXT pointer revises these - values. - -As in DDT, when a program is loaded above the area holding the -'A' and 'U' (and now 'W') command code, these commands are -disabled, and the extra memory is released to the user. Thus, -DDTZ can occupy as little as 3K total memory space. Unlike DDT, -however, DDTZ will not overwrite itself or the system on program -loads (except .HEX files). - -At initialization, the stack pointer (SP) points to a return to -DDTZ, just like for the CCP. Thus, programs that normally return -to the CCP will be returned to DDTZ. The 'B' command -reinitializes this condition. - - -The intercept vector copies the BDOS version number, etc., so -an object program does not know that DDTZ is running (except -for BIOS-BDOS vector size). Thus, programs that check the version -number should execute correctly under DDTZ. - -All input parameters can now be entered in any of three formats: - - (1) hexadecimal (as in DDT), - (2) decimal, by adding a leading '#' character, - (3) ASCII, by enclosing between either single or double - quotes; either one or two characters are allowed. - -Leading blanks in command lines and parameters are absorbed. -Either a comma or a (single) space is a valid delimiter. -Either uppercase or lowercase input is accepted. - -The default command (for anything not otherwise recognizable) -is 'H'. This allows convenient calculation, along with the other -features described below. So, to convert a number, just enter -it! - -As in DDT, the prompt character is '-', and the only error -message is the query ('?'), which generally kicks you back to -command mode. - -New Commands (Over DDT): -======================= - -NOTE: letters in parenthesis, e.g. "(U)", show the equivalent - command for DDTZM version (compatible with MSDOS debug). - - @ Sets or shows (with no parameter) the internally stored - "base" value. Also used with the 'S' and 'D' commands as - an optional parameter (though without the '@') to display - memory from an arbitrary base marker (offset). When set to - zero (the default), it does not affect any screen displays. - - B B)egin: resets the USER stack pointer to its initial value, - such that any program that exits by an RET will return to - DDTZ. DDTZ provides a default stack space of - approximately 24 bytes for user programs. - - C C)ompare first_address,last_address,against_address: shows - all the byte differences between two memory areas, in the - format - - XXXX aa YYYY bb - - where XXXX and YYYY are the comparative memory addresses, - and aa and bb are the corresponding byte values. Can be - used to verify the identity of two files by first - loading them into different memory areas with the 'R' - command (see below). - - - W Write: stores the modified memory area to disk under the - (K) filename specified by the 'I' command, overwriting the - original file from which it was loaded (the user is queried - before doing so). By default, the image of memory from - 0100H through the "NEXT" value -1 is saved. "K first_addr, - last_address" overrides this and allows writing ANY memory - area to a file. Almost a necessity for CPM 3.0 (no SAVE!). - K)eep on DDTZ - - X eXamine: redisplays the "NEXT PC SAVE" report at any time. - (Q) Q)uery size on DDTZ. - - S S)earch first_address, last_addr, value: searches the - (W) specified memory area for the value (a 16-bit word, not a - byte) and shows the locations of all such. Very useful for - finding CALL's or JMP's to a particular address, etc. - W)here on DDTZ - - Y Y)our_option parm1,parm2,address: executes an arbitrary - routine at the specified address, with the BC and DE - registers set to parm1 and parm2, respectively. - - Z Displays (but does not alter) the Z80's alternate register - set, including the index registers (disabled if running on - an 8080). On Z80's, automatically included as the last - part of the display by the 'X' command. - - -Based (Offset) Displays: -======================= - -The 'D' and 'E' commands can use a stored base value (offset), -as set by the '@' command. The current @ value may be -overridden for a single execution of these commands by adding the -base as an extra parameter in the command line. The effect is -to add this value to the first/last address and display -accordingly. The address listing on the left becomes XXXX:YYYY, -where XXXX is the offset address and YYYY is the actual memory -address being displayed. For example, if you have a data area -located at 42B7H and wish to preserve easy access, just enter -"@42b7". Now, "d0,3f" will dump memory starting at 4237H. - - -Further Changes from DDT: -======================== - - A A)ssemble now accepts the full Z80 as well as 8080 - instruction set, although it expects them in Intel rather - than Zilog format (see notes below under the 'L' - command). When in doubt, see the mnemnonic list below. - - D D)isplay or D)ump will accept an optional third parameter - to set the base value for a single execution only. Format - has been cleaned up. - - H H)ex_arithmetic on two values also shows their - difference in decimal. With only one value, converts to - hexadecimal, decimal, and ASCII (low-order byte only). - - - N N)ame now allows drive specification (d:...) and sets up - (I) the complete command line, including both FCB's (at - addresses 005CH and 006CH). The tail (stored at 0081H up) - is NOT upshifted. - I)nput on DDTZ - - U U)nassemble now displays the raw hexcode, especially handy - (L) when examining non-code areas. Intel (8080 style) mnemonics - are used, so some disassembled instructions may look - strange. E.g., the Z80's 'IN B,(C)' and 'OUT (C),B' become - 'INP B' and 'OUTP B', respectively; 'LD (nnnn),BC' becomes - 'SBCD nnnn', 'ADD IX, BC' becomes 'DADX B', and 'JP (IX)' - becomes 'PCIX'. - L)ist on DDTZ - - L L)oad now permits loading a file into memory with an - (R) offset, which is added to the default load address of - 0100H. When reading in a .HEX file with a preset bias, - the 'R' command will not transfer control to an invalid - execution point. Another execution of the 'R' command will - reread the input file, e.g.: - - n blah - l - ...modify the code and generally mess about... - l - - The original file is reloaded, and the modifications are - removed. - R)ead on DDTZ - - E E)nter, like D)isplay, now accepts an optional second - (S) parameter to set the base value for a single execution - only. - S)ubstitute or S)et on DDTZ - - T T)rap/trace on termination now shows the complete CPU - state. Traps and traces no longer lock up when a user RST - 7 instruction is executed. Tracing of BDOS/BIOS calls is - heavily trun cated, avoiding clutter and preventing system - crashes. - -NOTE: Most of the UNDOCUMENTED Z80 op-codes are handled. Others - can crash the system. - - R R)egisters also shows what two-byte values the HL and SP - (X) registers are actually pointing to. On Z80's, displays the - alternate register set. - eX)amine on DDTZ - -NOTE: Any use of the 'W' or 'L' command resets the system DMA - transfer address to the standard default value of 0080H. - - -; This is the output of DDTZ when disassembling OPTYPE.TRY -NOP LDA 06A4 MOV M,H -LXI B,06A4 DCX SP MOV M,L -STAX B INR A HLT -INX B DCR A MOV M,A -INR B MVI A,20 MOV A,B -DCR B CMC MOV A,C -MVI B,20 MOV B,B MOV A,D -RLC MOV B,C MOV A,E -EXAF MOV B,D MOV A,H -DAD B MOV B,E MOV A,L -LDAX B MOV B,H MOV A,M -DCX B MOV B,L MOV A,A -INR C MOV B,M ADD B -DCR C MOV B,A ADD C -MVI C,20 MOV C,B ADD D -RRC MOV C,C ADD E -DJNZ 0134 MOV C,D ADD H -LXI D,06A4 MOV C,E ADD L -STAX D MOV C,H ADD M -INX D MOV C,L ADD A -INR D MOV C,M ADC B -DCR D MOV C,A ADC C -MVI D,20 MOV D,B ADC D -RAL MOV D,C ADC E -JR 0134 MOV D,D ADC H -DAD D MOV D,E ADC L -LDAX D MOV D,H ADC M -DCX D MOV D,L ADC A -INR E MOV D,M SUB B -DCR E MOV D,A SUB C -MVI E,20 MOV E,B SUB D -RAR MOV E,C SUB E -JRNZ 0134 MOV E,D SUB H -LXI H,06A4 MOV E,E SUB L -SHLD 06A4 MOV E,H SUB M -INX H MOV E,L SUB A -INR H MOV E,M SBB B -DCR H MOV E,A SBB C -MVI H,20 MOV H,B SBB D -DAA MOV H,C SBB E -JRZ 0134 MOV H,D SBB H -DAD H MOV H,E SBB L -LHLD 06A4 MOV H,H SBB M -DCX H MOV H,L SBB A -INR L MOV H,M ANA B -DCR L MOV H,A ANA C -MVI L,20 MOV L,B ANA D -CMA MOV L,C ANA E -JRNC 0134 MOV L,D ANA H -LXI SP,06A4 MOV L,E ANA L -STA 06A4 MOV L,H ANA M -INX SP MOV L,L ANA A -INR M MOV L,M XRA B -DCR M MOV L,A XRA C -MVI M,20 MOV M,B XRA D -STC MOV M,C XRA E -JRC 0134 MOV M,D XRA H -DAD SP MOV M,E XRA L - - -XRA M JPE 06A4 SLAR M -XRA A XCHG SLAR A -ORA B CPE 06A4 SRAR B -ORA C XRI 20 SRAR C -ORA D RST 5 SRAR D -ORA E RP SRAR E -ORA H POP PSW SRAR H -ORA L JP 06A4 SRAR L -ORA M DI SRAR M -ORA A CP 06A4 SRAR A -CMP B PUSH PSW SLLR B -CMP C ORI 20 SLLR C -CMP D RST 6 SLLR D -CMP E RM SLLR E -CMP H SPHL SLLR H -CMP L JM 06A4 SLLR L -CMP M EI SLLR M -CMP A CM 06A4 SLLR A -RNZ CPI 20 SRLR B -POP B RST 7 SRLR C -JNZ 06A4 RLCR B SRLR D -JMP 06A4 RLCR C SRLR E -CNZ 06A4 RLCR D SRLR H -PUSH B RLCR E SRLR L -ADI 20 RLCR H SRLR M -RST 0 RLCR L SRLR A -RZ RLCR M BIT 0,B -RET RLCR A BIT 0,C -JZ 06A4 RRCR B BIT 0,D -CZ 06A4 RRCR C BIT 0,E -CALL 06A4 RRCR D BIT 0,H -ACI 20 RRCR E BIT 0,L -RST 1 RRCR H BIT 0,M -RNC RRCR L BIT 0,A -POP D RRCR M BIT 1,B -JNC 06A4 RRCR A BIT 1,C -OUT 20 RALR B BIT 1,D -CNC 06A4 RALR C BIT 1,E -PUSH D RALR D BIT 1,H -SUI 20 RALR E BIT 1,L -RST 2 RALR H BIT 1,M -RC RALR L BIT 1,A -EXX RALR M BIT 2,B -JC 06A4 RALR A BIT 2,C -IN 20 RARR B BIT 2,D -CC 06A4 RARR C BIT 2,E -SBI 20 RARR D BIT 2,H -RST 3 RARR E BIT 2,L -RPO RARR H BIT 2,M -POP H RARR L BIT 2,A -JPO 06A4 RARR M BIT 3,B -XTHL RARR A BIT 3,C -CPO 06A4 SLAR B BIT 3,D -PUSH H SLAR C BIT 3,E -ANI 20 SLAR D BIT 3,H -RST 4 SLAR E BIT 3,L -RPE SLAR H BIT 3,M -PCHL SLAR L BIT 3,A - - -BIT 4,B RES 3,D SET 2,H -BIT 4,C RES 3,E SET 2,L -BIT 4,D RES 3,H SET 2,M -BIT 4,E RES 3,L SET 2,A -BIT 4,H RES 3,M SET 3,B -BIT 4,L RES 3,A SET 3,C -BIT 4,M RES 4,B SET 3,D -BIT 4,A RES 4,C SET 3,E -BIT 5,B RES 4,D SET 3,H -BIT 5,C RES 4,E SET 3,L -BIT 5,D RES 4,H SET 3,M -BIT 5,E RES 4,L SET 3,A -BIT 5,H RES 4,M SET 4,B -BIT 5,L RES 4,A SET 4,C -BIT 5,M RES 5,B SET 4,D -BIT 5,A RES 5,C SET 4,E -BIT 6,B RES 5,D SET 4,H -BIT 6,C RES 5,E SET 4,L -BIT 6,D RES 5,H SET 4,M -BIT 6,E RES 5,L SET 4,A -BIT 6,H RES 5,M SET 5,B -BIT 6,L RES 5,A SET 5,C -BIT 6,M RES 6,B SET 5,D -BIT 6,A RES 6,C SET 5,E -BIT 7,B RES 6,D SET 5,H -BIT 7,C RES 6,E SET 5,L -BIT 7,D RES 6,H SET 5,M -BIT 7,E RES 6,L SET 5,A -BIT 7,H RES 6,M SET 6,B -BIT 7,L RES 6,A SET 6,C -BIT 7,M RES 7,B SET 6,D -BIT 7,A RES 7,C SET 6,E -RES 0,B RES 7,D SET 6,H -RES 0,C RES 7,E SET 6,L -RES 0,D RES 7,H SET 6,M -RES 0,E RES 7,L SET 6,A -RES 0,H RES 7,M SET 7,B -RES 0,L RES 7,A SET 7,C -RES 0,M SET 0,B SET 7,D -RES 0,A SET 0,C SET 7,E -RES 1,B SET 0,D SET 7,H -RES 1,C SET 0,E SET 7,L -RES 1,D SET 0,H SET 7,M -RES 1,E SET 0,L SET 7,A -RES 1,H SET 0,M DADX B -RES 1,L SET 0,A DADX D -RES 1,M SET 1,B LXI X,06A4 -RES 1,A SET 1,C SIXD 06A4 -RES 2,B SET 1,D INX X -RES 2,C SET 1,E DADX X -RES 2,D SET 1,H LIXD 06A4 -RES 2,E SET 1,L DCX X -RES 2,H SET 1,M INR [X+05] -RES 2,L SET 1,A DCR [X+05] -RES 2,M SET 2,B MVI [X+05],20 -RES 2,A SET 2,C DADX SP -RES 3,B SET 2,D MOV B,[X+05] -RES 3,C SET 2,E MOV C,[X+05] - - -MOV D,[X+05] DSBC B DADY B -MOV E,[X+05] SBCD 06A4 DADY D -MOV H,[X+05] NEG LXI Y,06A4 -MOV L,[X+05] RETN SIYD 06A4 -MOV [X+05],B IM0 INX Y -MOV [X+05],C LDIA DADY Y -MOV [X+05],D INP C LIYD 06A4 -MOV [X+05],E OUTP C DCX Y -MOV [X+05],H DADC B INR [Y+05] -MOV [X+05],L LBCD 06A4 DCR [Y+05] -MOV [X+05],A RETI MVI [Y+05],2 -MOV A,[X+05] LDRA DADY SP -ADD [X+05] INP D MOV B,[Y+05] -ADC [X+05] OUTP D MOV C,[Y+05] -SUB [X+05] DSBC D MOV D,[Y+05] -SBB [X+05] SDED 06A4 MOV E,[Y+05] -ANA [X+05] IM1 MOV H,[Y+05] -XRA [X+05] LDAI MOV L,[Y+05] -ORA [X+05] INP E MOV [Y+05],B -CMP [X+05] OUTP E MOV [Y+05],C -POP X DADC D MOV [Y+05],D -XTIX LDED 06A4 MOV [Y+05],E -PUSH X IM2 MOV [Y+05],H -PCIX LDAR MOV [Y+05],L -SPIX INP H MOV [Y+05],A -RLCR [X+05] OUTP H MOV A,[Y+05] -RRCR [X+05] DSBC H ADD [Y+05] -RALR [X+05] shld 06A4 ADC [Y+05] -RARR [X+05] RRD SUB [Y+05] -SLAR [X+05] INP L SBB [Y+05] -SRAR [X+05] OUTP L ANA [Y+05] -SRLR [X+05] DADC H XRA [Y+05] -BIT 0,[X+05] lhld 06A4 ORA [Y+05] -BIT 1,[X+05] RLD CMP [Y+05] -BIT 2,[X+05] INP M POP Y -BIT 3,[X+05] OUTP M XTIY -BIT 4,[X+05] DSBC SP PUSH Y -BIT 5,[X+05] SSPD 06A4 PCIY -BIT 6,[X+05] INP A SPIY -BIT 7,[X+05] OUTP A RLCR [Y+05] -RES 0,[X+05] DADC SP RRCR [Y+05] -RES 1,[X+05] LSPD 06A4 RALR [Y+05] -RES 2,[X+05] LDI RARR [Y+05] -RES 3,[X+05] CCI SLAR [Y+05] -RES 4,[X+05] INI SRAR [Y+05] -RES 5,[X+05] OTI SRLR [Y+05] -RES 6,[X+05] LDD BIT 0,[Y+05] -RES 7,[X+05] CCD BIT 1,[Y+05] -SET 0,[X+05] IND BIT 2,[Y+05] -SET 1,[X+05] OTD BIT 3,[Y+05] -SET 2,[X+05] LDIR BIT 4,[Y+05] -SET 3,[X+05] CCIR BIT 5,[Y+05] -SET 4,[X+05] INIR BIT 6,[Y+05] -SET 5,[X+05] OTIR BIT 7,[Y+05] -SET 6,[X+05] LDDR RES 0,[Y+05] -SET 7,[X+05] CCDR RES 1,[Y+05] -INP B INDR RES 2,[Y+05] -OUTP B OTDR RES 3,[Y+05] - - -RES 4,[Y+05] SET 0,[Y+05] SET 4,[Y+05] -RES 5,[Y+05] SET 1,[Y+05] SET 5,[Y+05] -RES 6,[Y+05] SET 2,[Y+05] SET 6,[Y+05] -RES 7,[Y+05] SET 3,[Y+05] SET 7,[Y+05] - -; These are the result of disassembling 64180OPS.TRY -; These opcodes are available ONLY on the 64180 CPU -; DDTZ will both assemble and disassemble these. -IN0 B,20 TST E MLT B -OUT0 20,B IN0 H,20 MLT D -TST B OUT0 20,H TSTI 20 -IN0 C,20 TST H MLT H -OUT0 20,C IN0 L,20 TSIO 20 -TST C OUT0 20,L SLP -IN0 D,20 TST L MLT SP -OUT0 20,D TST M OTIM -TST D IN0 A,20 OTDM -IN0 E,20 OUT0 20,A OIMR -OUT0 20,E TST A ODMR - -; The following are UNDOCUMENTED z80 opcodes from XTDOPS.TRY. -; DDTZ will disassemble these, but will not assemble them. -; They use xh/xl (or yh/yl) as separate byte registers. -; Use these at your own risk. -INRX H ACXR H MOVY H,B -DCRX H ACXR L MOVY H,C -MVIX H,20 SUXR H MOVY H,D -INRX L SUXR L MOVY H,E -DCRX L SBXR H MOVY H,A -MVIX L,20 SBXR L MOVY L,B -MOVX B,H NDXR H MOVY L,C -MOVX B,L NDXR L MOVY L,D -MOVX C,H XRXR H MOVY L,E -MOVX C,L XRXR L MOVY L,A -MOVX D,H ORXR H MOVY A,H -MOVX D,L ORXR L MOVY A,L -MOVX E,H CPXR H ADYR H -MOVX E,L CPXR L ADYR L -MOVX H,B INRY H ACYR H -MOVX H,C DCRY H ACYR L -MOVX H,D MVIY H,20 SUYR H -MOVX H,E INRY L SUYR L -MOVX H,A DCRY L SBYR H -MOVX L,B MVIY L,20 SBYR L -MOVX L,C MOVY B,H NDYR H -MOVX L,D MOVY B,L NDYR L -MOVX L,E MOVY C,H XRYR H -MOVX L,A MOVY C,L XRYR L -MOVX A,H MOVY D,H ORYR H -MOVX A,L MOVY D,L ORYR L -ADXR H MOVY E,H CPYR H -ADXR L MOVY E,L CPYR L - - -Command Summary: -=============== - -DDTZM command DDTZ command -============= ============ -@ (base) -A)ssemble first_address A -B)egin {i.e., initialize stack and return} B -C)ompare first_address,last_address,against_address C -D)ump first_address[,last_address[,base]] D -E)nter_in_memory first_address[,base] S)ubstitute -F)ill first_address,last_address,value F -G)o_to [address][,trap1[,trap2]] G -H)ex_arithmetic value1(,value2) H -L)oad_file (offset) R)ead -M)ove first_address,last_address,destination M -N)nput FCBs_command_line I)nput -Q)uit (not avail) -R)egister examine/change [register|flag] X)amine -S)earch first_address,last_address,word W)hereis -T)race_execution [count] T - Untrace_execution [count] (i.e. do count instr) U)ntrace -U)nassemble_code first_address[,last_address] L)ist code -W)rite [first_address,last_address] K)eep -X)amine {i.e. display memory parameters for application} Q)uery -Y)our_option BC:=parm1,DE:=parm2,call_address Y -Z)80_register_display Z - - -If you find this program useful, contributions will be gratefully -accepted and will encourage further development and release of -useful CPM programs. My practice is to include source. - -C.B. Falconer -680 Hartford Turnpike, -Hamden, Conn. 06517 (203) 281-1438 - -DDTZ and its associated documentation and other files are -copyright (c) 1980-1988 by C.B. Falconer. They may be freely -copied and used for non-commercial purposes ONLY. - diff --git a/Source/Images/fd1/u0/DIF.COM b/Source/Images/fd1/u0/DIF.COM deleted file mode 100644 index 87b89d75..00000000 Binary files a/Source/Images/fd1/u0/DIF.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/DUMP.COM b/Source/Images/fd1/u0/DUMP.COM deleted file mode 100644 index 03a77c3c..00000000 Binary files a/Source/Images/fd1/u0/DUMP.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/ED.COM b/Source/Images/fd1/u0/ED.COM deleted file mode 100644 index a0f0f541..00000000 Binary files a/Source/Images/fd1/u0/ED.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/LBREXT.COM b/Source/Images/fd1/u0/LBREXT.COM deleted file mode 100644 index c0c950e3..00000000 Binary files a/Source/Images/fd1/u0/LBREXT.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/LIB.COM b/Source/Images/fd1/u0/LIB.COM deleted file mode 100644 index 45d7fb21..00000000 Binary files a/Source/Images/fd1/u0/LIB.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/LINK.COM b/Source/Images/fd1/u0/LINK.COM deleted file mode 100644 index e188fb92..00000000 Binary files a/Source/Images/fd1/u0/LINK.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/LOAD.COM b/Source/Images/fd1/u0/LOAD.COM deleted file mode 100644 index b9601e00..00000000 Binary files a/Source/Images/fd1/u0/LOAD.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/MAC.COM b/Source/Images/fd1/u0/MAC.COM deleted file mode 100644 index f49e835a..00000000 Binary files a/Source/Images/fd1/u0/MAC.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/MBASIC.COM b/Source/Images/fd1/u0/MBASIC.COM deleted file mode 100644 index c9ec3cd3..00000000 Binary files a/Source/Images/fd1/u0/MBASIC.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/NULU.COM b/Source/Images/fd1/u0/NULU.COM deleted file mode 100644 index 3d45098a..00000000 Binary files a/Source/Images/fd1/u0/NULU.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/PIP.COM b/Source/Images/fd1/u0/PIP.COM deleted file mode 100644 index 4b2ce4b6..00000000 Binary files a/Source/Images/fd1/u0/PIP.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/RMAC.COM b/Source/Images/fd1/u0/RMAC.COM deleted file mode 100644 index 9ab7206b..00000000 Binary files a/Source/Images/fd1/u0/RMAC.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/SID.COM b/Source/Images/fd1/u0/SID.COM deleted file mode 100644 index 3b073ba5..00000000 Binary files a/Source/Images/fd1/u0/SID.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/STAT.COM b/Source/Images/fd1/u0/STAT.COM deleted file mode 100644 index 1de359f2..00000000 Binary files a/Source/Images/fd1/u0/STAT.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/SUBMIT.COM b/Source/Images/fd1/u0/SUBMIT.COM deleted file mode 100644 index 2e788827..00000000 Binary files a/Source/Images/fd1/u0/SUBMIT.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/SUPERSUB.COM b/Source/Images/fd1/u0/SUPERSUB.COM deleted file mode 100644 index a25d60a6..00000000 Binary files a/Source/Images/fd1/u0/SUPERSUB.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/UNARC.COM b/Source/Images/fd1/u0/UNARC.COM deleted file mode 100644 index 8cc90746..00000000 Binary files a/Source/Images/fd1/u0/UNARC.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/UNCR.COM b/Source/Images/fd1/u0/UNCR.COM deleted file mode 100644 index 42385ddd..00000000 Binary files a/Source/Images/fd1/u0/UNCR.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/UNZIP.COM b/Source/Images/fd1/u0/UNZIP.COM deleted file mode 100644 index afde7204..00000000 Binary files a/Source/Images/fd1/u0/UNZIP.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/XSUB.COM b/Source/Images/fd1/u0/XSUB.COM deleted file mode 100644 index 15e86abf..00000000 Binary files a/Source/Images/fd1/u0/XSUB.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/ZAP.COM b/Source/Images/fd1/u0/ZAP.COM deleted file mode 100644 index 47ffcbb8..00000000 Binary files a/Source/Images/fd1/u0/ZAP.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/ZDE.COM b/Source/Images/fd1/u0/ZDE.COM deleted file mode 100644 index 9bc493c3..00000000 Binary files a/Source/Images/fd1/u0/ZDE.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/ZDE40.COM b/Source/Images/fd1/u0/ZDE40.COM deleted file mode 100644 index 6a2d37de..00000000 Binary files a/Source/Images/fd1/u0/ZDE40.COM and /dev/null differ diff --git a/Source/Images/fd1/u0/ZDENST.COM b/Source/Images/fd1/u0/ZDENST.COM deleted file mode 100644 index 8ccc9767..00000000 Binary files a/Source/Images/fd1/u0/ZDENST.COM and /dev/null differ diff --git a/Source/Images/hd0/s0/u3/Attack.pt3 b/Source/Images/hd0/s0/u3/Attack.pt3 new file mode 100644 index 00000000..dc9d04a9 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Attack.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Backup.pt3 b/Source/Images/hd0/s0/u3/Backup.pt3 new file mode 100644 index 00000000..e9141fe4 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Backup.pt3 differ diff --git a/Source/Images/hd0/s0/u3/BadMice.pt3 b/Source/Images/hd0/s0/u3/BadMice.pt3 new file mode 100644 index 00000000..aa78a8d2 Binary files /dev/null and b/Source/Images/hd0/s0/u3/BadMice.pt3 differ diff --git a/Source/Images/hd0/s0/u3/HowRU.pt3 b/Source/Images/hd0/s0/u3/HowRU.pt3 new file mode 100644 index 00000000..47fb464e Binary files /dev/null and b/Source/Images/hd0/s0/u3/HowRU.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Iteratn.pt3 b/Source/Images/hd0/s0/u3/Iteratn.pt3 new file mode 100644 index 00000000..575cccf4 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Iteratn.pt3 differ diff --git a/Source/Images/hd0/s0/u3/LookBack.pt3 b/Source/Images/hd0/s0/u3/LookBack.pt3 new file mode 100644 index 00000000..1dd15ac7 Binary files /dev/null and b/Source/Images/hd0/s0/u3/LookBack.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Louboutn.pt3 b/Source/Images/hd0/s0/u3/Louboutn.pt3 new file mode 100644 index 00000000..8b4b0b15 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Louboutn.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Namida.pt3 b/Source/Images/hd0/s0/u3/Namida.pt3 new file mode 100644 index 00000000..2a2d8562 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Namida.pt3 differ diff --git a/Source/Images/hd0/s0/u3/PTxPlay.com b/Source/Images/hd0/s0/u3/PTxPlay.com new file mode 100644 index 00000000..3b47c5c7 Binary files /dev/null and b/Source/Images/hd0/s0/u3/PTxPlay.com differ diff --git a/Source/Images/hd0/s0/u3/Recoll.pt3 b/Source/Images/hd0/s0/u3/Recoll.pt3 new file mode 100644 index 00000000..5a2744ab Binary files /dev/null and b/Source/Images/hd0/s0/u3/Recoll.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Sanxion.pt3 b/Source/Images/hd0/s0/u3/Sanxion.pt3 new file mode 100644 index 00000000..25a77aab Binary files /dev/null and b/Source/Images/hd0/s0/u3/Sanxion.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Synch.pt3 b/Source/Images/hd0/s0/u3/Synch.pt3 new file mode 100644 index 00000000..16149d1a Binary files /dev/null and b/Source/Images/hd0/s0/u3/Synch.pt3 differ diff --git a/Source/Images/hd0/s0/u3/ToStar.pt3 b/Source/Images/hd0/s0/u3/ToStar.pt3 new file mode 100644 index 00000000..9c77ed4f Binary files /dev/null and b/Source/Images/hd0/s0/u3/ToStar.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Victory.pt3 b/Source/Images/hd0/s0/u3/Victory.pt3 new file mode 100644 index 00000000..d2c6f3e7 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Victory.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Wicked.pt3 b/Source/Images/hd0/s0/u3/Wicked.pt3 new file mode 100644 index 00000000..840a58d1 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Wicked.pt3 differ diff --git a/Source/Images/hd0/s0/u3/YeOlde.pt3 b/Source/Images/hd0/s0/u3/YeOlde.pt3 new file mode 100644 index 00000000..ba99371b Binary files /dev/null and b/Source/Images/hd0/s0/u3/YeOlde.pt3 differ diff --git a/Source/Images/hd0/s0/u3/Yeovil.pt3 b/Source/Images/hd0/s0/u3/Yeovil.pt3 new file mode 100644 index 00000000..694de685 Binary files /dev/null and b/Source/Images/hd0/s0/u3/Yeovil.pt3 differ