; ; VOTRAX CROSS-COMPILER FOR ASCII TO VOICE PHONEMES ; ; ORIGINALLY WRITTEN AND RELEASED IN PUBLIC DOMAIN ; 9/22/81 BY ALAN JEWER, SHAWN EVERSON & WILLIAM WHITFORD ; ; ; MACR@ (MACRO) @DRIVER ; ; THE @DRIVER MACRO IS INCLUDED AT THE START OF THE ; VOICE PROGRAM, AND PROVIDES DRIVE TO THE SWEET TALKER ; SPEECH BOARD THRU AN 8255 PROGRAMMABLE PARALLEL ; INTERFACE CHIP. ANY OTHER BOARD USING THE VOTRAX SC-01 ; VOICE SYNTHESIS CHIP SHOULD BE ABLE TO BE SUPPORTED ; BY ONLY SMALL CHANGES TO THE DRIVER PROGRAM. ; WHEN USING THIS MACRO, A .COM FILE (MACHINE CODE) ; IS PRODUCED WHICH IS DIRECTLY EXECUTABLE AS A CP/M ; TRANSIENT. THIS DRIVER CONSISTS OF Z80 CODE, AND ; WILL NOT RUN ON AN 8080. THE MACRO @QUIT MUST BE USED ; AT THE END OF THE VOICE PROGRAM TO PROVIDE AND ; END-OF-FILE INDICATION. THE INVOKING SYNTAX IS: ; ; @DRIVER @FINISH ; ; BODY ; OF ; SPEECH ; PROGRAM ; ; @QUIT ; @DRIVER MACR@ @FINISH I8255 EQU 24H ;LOCATION OF THE 8255 I/O CHIP IDATA EQU I8255 ;DATA OUTPUT PORT ISTROBE EQU I8255+1 ;STROBE OUTPUT PORT IREADY EQU I8255+2 ;READY STATUS LINE INPUT PORT ISETUP EQU I8255+3 ;SETUP PORT FOR 8255 ICONFIG EQU 89H ;A&B OUTPUT, C IS INPUT STBON EQU 255 ;STROBE ACTIVE STBOFF EQU 000 ;STROBE INACTIVE ; ; THE 8255 BASE PORT (PORT A) IS THE DATA OUTPUT PORT ; THE B PORT LSB IS USED AS THE STROBE OUTPUT LINE ; THE C PORT LSB IS USED AS THE READY INPUT LINE ; DB 3EH,ICONFIG ;MVI A,ICONFIG ;SET UP 8255 DB 0D3H,ISETUP ;OUT ISETUP DB 3EH,STBOFF ;MVI A,STBOFF ;SET STROBE POLARITY DB 0D3H,ISTROBE ;OUT ISTROBE DB 0AFH ;XRA A ;CLEAR INFLECTION DB 32H ;STA INFLECT ;THIS IS STORAGE DW INFL DB 21H ;LXI H,@START ;BUFFER POINTER DW @START DB 11H ;LXI D,@FINISH-@START ;COUNTER DW @FINISH-@START DB 0EH,IDATA ;MVI C,IDATA ;OUTPUT PORT ADDR DMPLP: DB 3EH,3FH ;MVI A,3FH ;PHONEMES ARE SMALLER DB 0BEH ;CMP M ;IS PHONEME? DB 30H,DMPIT-$-1 ;JRNC DMPIT ;JUMP IF IT IS DB 7EH ;MOV A,M ;GET INFLECTION DB 0FEH,0FFH ;CPI 0FFH ;IS IT PITCH 0? DB 20H,NOT0-$-1 ;JRNZ NOT0 ;JUMP IF NOT DB 0AFH ;XRA A ;GET 0 FOR PITCH 0 NOT0: DB 32H ;STA INFLECT ;STORE IT DW INFL DB 23H ;INX H ;BUMP RAM POINTER DB 18H,CNTEM-$-1 ;JMPR COUNTEM ;CONTINUE TILL DONE DMPIT: DB 3AH ;LDA INFL ;GET INFLECTION DW INFL DB 86H ;ADD M ;ADD PHONEME DB 77H ;MOV M,A ;CRUDE, BUT EFFECTIVE DB 2FH ;CMA ;FLIP FOR LIGHTS DB 0D3H,0FFH ;OUT FPANEL ;ON THE LIGHTS DB 0EDH,0A3H ;OUTI ;NEXT BYTE TO OUTPUT DB 3EH,STBON ;MVI A,STBON ;TURN ON STROBE DB 0D3H,ISTROBE ;OUT ISTROBE DB 06H,1EH ;MVI B,30 ;WAIT FOR 100 US STLOOP: DB 10H,STLOOP-$-1 ;DJNZ STLOOP ;LOOP TILL TIME UP DB 3EH,STBOFF ;MVI A,STBOFF ;TURN OFF STROBE DB 0D3H,ISTROBE ;OUT ISTROBE WFOR: DB 0DBH,IREADY ;IN IREADY ;GET READY BIT DB 1FH ;RAR ;TO CY DB 30H,WFOR-$-1 ;JRNC WAITFOR ;WAIT FOR VOTRAX CNTEM: DB 1BH ;DCX D ;COUNT BYTE DB 7AH ;MOV A,D ;CHECK FOR 0 DB 0B3H ;ORA E DB 20H,DMPLP-$-1 ;JRNZ DMPLOOP ;LOOP TILL ALL DONE DB 0C9H ;RET ;BACK TO CP/M INFL: DB 0 ;INFLECTION STORAGE @START: ENDM ; @QUIT MACR@ DB 3FH ;;SHUT UP @FINISH: ENDM ;; PITCH0 MACR@ DB 0FFH ;;LOWEST PITCH ENDM PITCH1 MACR@ DB 40H ;;2ND PITCH ENDM PITCH2 MACR@ DB 080H ;;3RD PITCH ENDM PITCH3 MACR@ DB 0C0H ;;HIGHEST PITCH ENDM ; ;; FIRST WE DEFINE THE PHONEMES ;; EH3 EQU 00H ;;59 MS ;JACK/E/T EH2 EQU 01H ;;71 MS ;/E/NLIST EH1 EQU 02H ;;121MS ;H/EA/VY PA0 EQU 03H ;;47 MS ;NO SOUND DT EQU 04H ;;47 MS ;BU/TT/ER A2 EQU 05H ;;71 MS ;M/A/DE A1 EQU 06H ;;103MS ;M/A/DE ZH EQU 07H ;;90 MS ;A/Z/URE AH2 EQU 08H ;;71 MS ;H/O/NEST I3 EQU 09H ;;55 MS ;INHIB/I/T I2 EQU 0AH ;;80 MS ;/I/NHIBIT I1 EQU 0BH ;;121MS ;INH/I/BIT @M EQU 0CH ;;103MS ;/M/AT @N EQU 0DH ;;80 MS ;SU/N/ @B EQU 0EH ;;71 MS ;/B/AG @V EQU 0FH ;;71 MS ;/V/AN CH EQU 10H ;;71 MS ;/CH/IP ;;/T/ MUST PRECEDE /J/ ;;TO PRODUCE CH SOUND SH EQU 11H ;;121MS ;/SH/OP @Z EQU 12H ;;71 MS ;/Z/OO AW1 EQU 13H ;;146MS ;L/AW/FUL NG EQU 14H ;;121MS ;THI/NG/ AH1 EQU 15H ;;146MS ;F/A/THER OO1 EQU 16H ;;103MS ;L/OO/KING OO EQU 17H ;;185MS ;B/OO/K @L EQU 18H ;;103MS ;/L/AND @K EQU 19H ;;80 MS ;TRI/CK/ @J EQU 1AH ;;47 MS ;/J/U/DG/E ;;/D/ MUST PRECEDE /J/ TO PRODUCE ;;J SOUND @H EQU 1BH ;;71 MS ;/H/ELLO @G EQU 1CH ;;71 MS ;/G/ET @F EQU 1DH ;;103MS ;/F/AST @D EQU 1EH ;;55 MS ;PAI/D/ @S EQU 1FH ;;90 MS ;PA/SS/ @A EQU 20H ;;185MS ;D/AY/ AY EQU 21H ;;65 MS ;D/AY/ Y1 EQU 22H ;;80 MS ;/Y/ARD UH3 EQU 23H ;;47 MS ;MISS/IO/N AH EQU 24H ;;250MS ;M/O/P @P EQU 25H ;;103MS ;P/A/ST @O EQU 26H ;;185MS ;C/O/LD @I EQU 27H ;;185MS ;P/I/N @U EQU 28H ;;185MS ;M/O/VE @Y EQU 29H ;;103MS ;AN/Y/ @T EQU 2AH ;;71 MS ;/T/AP @R EQU 2BH ;;90 MS ;/R/ED @E EQU 2CH ;;185MS ;M/EE/T @W EQU 2DH ;;80 MS ;/W/IN AE EQU 2EH ;;185MS ;D/A/D AE1 EQU 2FH ;;103MS ;/A/FTER AW2 EQU 30H ;;90 MS ;S/A/LTY UH2 EQU 31H ;;71 MS ;/A/BOUT UH1 EQU 32H ;;103MS ;/U/NCLE UH EQU 33H ;;185MS ;C/U/P O2 EQU 34H ;;80 MS ;F/O/R O1 EQU 35H ;;121MS ;AB/OA/RD IU EQU 36H ;;59 MS ;Y/OU/ U1 EQU 37H ;;90 MS ;Y/OU/ THV EQU 38H ;;80 MS ;/TH/E TH EQU 39H ;;71 MS ;/TH/IN ER EQU 3AH ;;146MS ;B/I/RD EH EQU 3BH ;;185MS ;G/E/T E1 EQU 3CH ;;121MS ;B/E/ AW EQU 3DH ;;250MS ;C/A/LL PA1 EQU 3EH ;;185MS ;NO SOUND @STOP EQU 3FH ;;47 MS ;NO SOUND ;; ;; ;; THE FOLLOWING LETTERS AND WORDS FORM THE ;; LIBRARY OF WORDS WHICH IS USED TO ASSEMBLE ;; OBJECT FILES FROM SOURCE FILES. ;; ;; THE LIST OF WORDS IN THIS LIBRARY IS: ;;