Dolphin Speech Synthesiser User Guide Series II Synthesiser systems for people with disabilities PO Box 83 Worcester WR3 8TU Tel: 0905 754577 Int: +44 905 754577 Fax: 0905 754559 Int: +44 905 754559 Contents Section Contents Page 1 The Apollo II 1 2 The Europa II PC Card 6 3 The Europa II Toshiba Card 12 4 Trouble Shooting 14 5 Complete Command Set 16 6 Using an Apollo II with a BBC or BBC Master System 25 Appendix One Apollo II Physical Characteristics 33 Appendix Two Special Voice Commands 37 Appendix Three Description of UK English Phonemes 39 Appendix Four Communications 42 Index Alphabetic Index 49 Section One - The Apollo II This section contains a description of the Apollo II speech synthesiser. Introduction The Apollo II is a small, lightweight text-to speech synthesiser which can be used with a wide range of computers. It can be used in conjunction with portable computers, as well as with desktop models. However if you are intending to use an Apollo II with a Toshiba portable then you should consider Dolphin Toshiba cards. The Apollo II is one of the very few synthesisers which has a British English voice and many foreign languages are also available. It is possible to have up to 7 languages resident in the Apollo II at any time. Language ROMs can also be updated or changed as required. The following notes have been taken with the Apollo II speaker facing the reader. There are three connectors as follows. 1 - The 25 way D-Type connector at the back is both a serial port and parallel port. It is used to connect to the computer. N.B. Do not connect cables other than those supplied by Dolphin. The connector is wired in a non-standard way so unless you have made you own cable as per the pin-out in Appendix 1, you should only use Dolphin serial cables or if using a parallel port, the parallel adaptor cable. If you plugged a 'standard' printer cable or 'standard' serial cable into the socket you may blow up the communications port of the synthesiser. For connection to an IBM PC/AT or compatible you will receive a cable with a 25-way Apollo II connector at one end and either a 9 or 25-way female connector at the other. 2 - The connector on the front is for a headphone set or extension speaker. It is a stereo 3.5mm socket (such as Walkman type headphones), and will not work correctly if a mono jack is used. 3 - The last connector is to the rear, and is for the mains adaptor. N.B. Please use only a Dolphin mains adaptor as supplied. If using your own mains adaptor ensure that the voltage, current capacity and polarity are correct. These details can be found in Appendix 1. The only controls provided on the Apollo II are the on/off switch and the volume knob. The on/off switch is located to the rear, right hand side, down is on, up is off. The volume control is located on top of the unit, to the left, just below the speaker grill. When you turn the synthesiser on it should say 'hello' (or the equivalent in your language). See Section 4, 'Trouble Shooting' if it doesn't. Overleaf is a diagram of the Apollo II. On the following page are the front and back panels of the Apollo II. Section Two - The Europa II PC Card This section contains information on how to install the Europa II PC card. Using the card with HAL speech synthesis software and the port address selection procedure. Introduction The Europa II PC Card is a small IBM PC/AT compatible half size card that will fit inside both desktop PCs and portable PCs which have a standard card slot. The card is capable of holding up to seven languages by way of the four on-board ROM sockets. The first ROM socket is a 256k ROM and can hold four languages. The other three ROM sockets are 64k and can hold one language. The first socket can also hold a normal 64k ROM. The physical size of the card is 15.2cm back to front by 10.2cm high overall not including the edge connector. Fitting the Card When fitting the card to your PC try not to touch the edge connector as you may damage the card. Select a spare slot and plug the card in firmly. You may have to bend the face plate slightly to enable securing of the locking screw. This will depend on the card cage of your PC. The card is almost ready for use as you need only plug in either your headphones or external speaker. If you wish to use the internal speaker of your PC the section 'Using the PC's Internal Speaker' has this information. Controls and Connections The Edge Connector The edge connector on the Card is the hardware communication path with the computer. It is a standard 8-bit, IBM PC slot connector but will work perfectly well in a 16-bit AT slot. The card will not work in a MCA type slot as found on certain IBM PS/2 machines. Sockets and Volume Control The card has a volume control, 'spindle' type, to the rear of the machine and a 3.5mm stereo jack on the face plate. This will appear on the back or side of your PC, dependent on the orientation of your card cage, once the card is fitted. The jack socket is used to either connect an external speaker (if you are not using the computers internal speaker - see below) or headphones. The card does not have a speaker on-board. There are jumpers for selecting port addresses. These are discussed in detail below. Using the Card with Software If your are using HAL screen reader software you will normally include either '-cd' or '-c2d' in you command line. The first command is for the default card address and the second is for the secondary card address (see 'Hardware Address Selection' for more details). This would look like HAL -cd (default address) HAL -c2d (secondary address) HAL -cnd (special address) where n is in the range 512 to 639 or 768 to 895 There is also a -Xmin/max parameter which sets a delay between characters sent to the card. HAL will calculate its own values that will usually work, therefore this parameter can normally be ignored. Address Selection The valid address of the PC card is selected by arranging links on seven of the address lines, these lines are A1 to A6 inclusive and A8, each link can be set to either 0 or 1. The default address of the card will still be 0x308, this will correspond to the links as follows. Addr line A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 Hex 3 0 8 Binary 1 1 0 0 0 0 1 0 0 0 Link no LK7 LK6 LK5 LK4 LK3 LK2 LK1 Link pos 1 0 0 0 1 0 0 To change this from 0x308 to 0x318, LK4 would have to be moved from 0 to 1. As with the old PC Europa card, the two default addresses would work in 99% of applications so not many people will need to change more than one link. Most functions of the Europa II Card can be controlled by HAL but if you are using your own software or wish to drive the card directly please see Appendix 4 for a full software command set. Appendix 4 also contains example code in 'C' for driving the card directly from your own software. Hardware Address Selection There is only one address for the Toshiba card, this is 0x2F8, (COM 2:). The address of the PC card is selectable from two ranges, these are 0x200 - 0x 27F and 0x300 - 0x37F. This range includes the old PC card addresses of 0x308 and 0x318. The On-Board ROMs The Europa II PC Card has four on-board ROM sockets, one can hold 4 languages. The other three ROMs can hold only 1 language. The default ROM socket, i.e. the language ROM the card will use when you first turn on the computer, is the one furthest from the volume control. The second ROM (ROM2) would normally be selected automatically, if you are using HAL, when you changed language prompt files. To change ROMs outside of HAL (it actually does the same thing internally) you can use the '@=' command. '@=1' will start the default ROM and '@=2' will start ROM2 etc. See Section 5 for more details of this command. Using the PC's Internal Speaker It is possible to use the internal speaker of your computer for both speech and computer audio output. This will not work successfully with small piezo speakers sometimes found on portables and some desktops, it should really be a standard moving cone type. This facility has two advantages in that you do not need an external speaker with its associated cable, and when using headphones you can hear both speech and computer beeps without disturbing colleagues. (A talking beeping PC can be quite a distraction in a busy office environment!). To use the internal computer speaker, follow these instructions. Disconnect the speaker from the computer and connect it directly to pins 1 and 2 on the audio socket. Pin three of the socket must now be connected to the computer. There will be two connections on the computer and yes, you do have only one lead to connect. Try the lead on both connections to ascertain which one works (this will not damage the card or computer). Only one connection is necessary as the card already has a ground connection with the computer by way of the edge connector. You are only connecting the audio live. You should now have both speech and your computer audio coming from your computer speaker. Section Three - The Europa II Toshiba Card This section contains a specification of the Europa II Toshiba card. Introduction The Europa II Toshiba Card is a custom made text-to-speech synthesiser designed specifically for Toshiba Laptop Portable Computers. A card has been made by Dolphin for the following models. T1800 T1850 The cards function in an identical way to the Europa II PC Card with the following exceptions 1. The internal computer speaker option is not available. 2. If you are using you own software the port address is different - see Appendix 4. 3. If you are using HAL you need to use the following command line parameter. HAL -td Do not forget to add any other command line parameters that you may use. For example, there is a -Xmin/max parameter which sets a delay between characters sent to the card. Add this parameter to the command line when using the card. HAL -td -x40/40 There now follows a brief description of the cards. T-1800 and T-1850 Europa II Cards This card is actually two cards plugged together, an audio card and a logic card. The overall size of the complete unit is approximately 13cm x 5cm x 1.3cm. One ROM socket can be found on the logic board. This large socket is capable of holding either a standard 64K language ROM or a 128K ROM with two languages on board. If you wish to use two languages you must specify on purchasing which two languages you want in the 128K ROM, and in what order, i.e. which language is to be the default. The volume control (knob type) and a 3.5mm stereo jack for headphones or speaker appear on the front left and left side respectively of the Toshiba T1800 once the unit is fitted. Section Four - Trouble Shooting This section contains information on common problems people find with their Apollo II speech synthesisers. Read this section if you are having difficulty with your Apollo II. Introduction If your synthesiser does not function please check the following points. 1. Check that your mains adaptor is plugged all the way into the synthesiser and that is plugged into the mains and turned on. It should say 'hello'. 2. With an Apollo II you should check that data cable is plugged in correctly and into the right communication port on your computer. With cards you must ensure that the card is fitted into its slot correctly and that a speaker or headphone set is attached. 3. If using the HAL screen reader, have you used the correct command line parameter for your synthesiser? Check with the following list: HAL -d speech output to COM1: HAL -2d speech output to COM2: HAL -p speech output to LPT1: HAL -p2 speech output to LPT2: HAL -td speech output to a Toshiba Europa II Card HAL -cd speech output to a Europa II PC Card HAL -c2d speech output to a Europa II PC Card secondary address HAL -1 speech output to an Apollo I COM1: HAL -2 speech output to an Apollo I on COM2: 4. When using a parallel adaptor you must again ensure that you have connected the cables up correctly. See Appendix One for information on the Parallel Adaptor. If all else fails, phone the Dolphin distributor in your country, or Dolphin Ltd. in the UK on 0905 54577. (International: +44 905 754577) between 9am and 5pm. Section Five - Complete Command Set This section contains a complete command set for the Apollo/Europa II speech synthesisers. Read this section if you wish to change the defaults which are stored by the synthesisers. Introduction This guide covers ROM types from V1A onwards. Most of the ROM commands start with an '@' (at sign) and are followed by an ASCII character or Hex, Decimal, Octal or Binary number as indicated by c, h, d, o or b. When a Binary number is indicated you will generally find this is a toggle switch where '0' turns the command off and '1' turns the command on. N.B. The Serbo Croat language ROM uses '$' instead of the '@'. You can also change the command start character with '@+'. Key to Substitute Characters h = hexadecimal (0...9, a...f) d = decimal (0...9) o = octal (0...7) b = binary (0 or 1) c = substitute ASCII character N.B. The default settings shown below are for UK English. stands for carriage return. General Commands Control X This is the mute command. The speech buffer is flushed and speech stops immediately. @An The command @An where n is a single ASCII character representing a hexadecimal digit '0' to 'F', will set the volume control to the selected level, n, a proportion of the level set by the physical volume control. The action of the @A command is synchronised with the speech so that the loudness of the parts of an utterance can be controlled. For example. Quietest @A0 Normal @AA Loudest @AF @Bd This is used to set the degree of voicing. 1 is a whisper (very breathy) and 8 is full voicing. Default = 8 @Dh Sets the pause for end of phrase, breath group or sentence. Default = b @Ec echoes back a character, where c is an alphanumeric character. See Appendix 4 for details of the communications protocols required. @Fc 'c' must be either '+' or '-'. This causes the pitch to be raised or lowered slightly. @Fh Sets the centre point of the voice pitch. Default = 8 @Gb The command @Gb, where b is '0' or '1' will turn the greeting message on or off for soft reset only. When the Apollo II is powered up G is always 1 so that the language dependent greeting is always given. However if @G0 is then sent to the synthesiser, subsequent commands to switch language ROMs (@=n), will not generate a greeting. This feature combined with some operation modifications detailed in Appendix 4 of this technical bulletin, enables Rapid Language Switching (RLS). You can now switch ROMs quickly and silently by disabling the greeting message. This is useful in language translation systems where an operator wishes to switch quickly and silently from one language to the other. @Hb Toggles Hypermode on or off. With Hypermode on only content words are spoken as in a telegram. Default = 0 @I? This feature is only available on serial Apollo II and Europa II synthesisers. On receipt of @I?, the synthesiser will respond with a 4 byte message: I,a,b,T/M Where I indicates the message is an index message, a and b are two ASCII characters representing the one byte hexadecimal text unit counter. The final character T/M represents whether the synthesiser is Talking or Mute, e.g. the synthesiser may have 10 text units in its text buffer but is not talking as it has not yet received a comma, full stop etc. On receipt of a mute command, the normal muting operations take place, and the current values of the indexing flag and unit count are preserved. If the screen reader needs to know the index status it must send @I? before issuing another @I+ which will clear the index flag and counter. @I+ To enable indexing, words or text units must be counted up as they are received. The synthesiser detects that indexing is on by the presence of the first @I+ command after a mute. The synthesiser zeros a text unit count and sets an "indexing on" flag. The text unit counter is a single byte representing the number of units remaining to be spoken by the synthesiser. When indexing is on, the synthesiser will increment the unit count whenever it detects @I+ in its text buffer. Corresponding markers are made in the phoneme buffer. Whenever one of these marks is due to be spoken it is not sent to the synthesiser chip but causes the unit counter to be decremented. So, the Apollo II will keep track of how far the communications with the PC and hence the application, are ahead of the speech synthesiser. @Mc This sets the mark-space ratio which can be described as having an effect on the depth of the voice. Valid characters are A to Z. Default = A @Pb Toggles punctuation on or off. Default = 0 @Qd Sets the length of pause between words. Default = 0 @Ro Sets the level of prosody or excitability of the voice. Default = 4 @Sb Toggles spell mode on or off. Default = 0 @Th This command can be inserted in your text to produce sound effects. The sound effects available are: h duration type of effect 0 very short whoosh 1 short " 2 medium " 3 long " 4 very short buzzer 5 short " 6 medium " 7 long " 8 very short warble 1 9 short " A medium " B long " C very short warble 2 D short " E medium " F long " @Vd One of the six preset voices may be selected with this command. The first three voices (1 to 3) are based on a male voice and the last three voices (4 to 6) are based on a non-male voice. Many more voices can be obtained by using the commands below. N.B. '@V0' will turn the voice off. @Wh Controls the speed of the speech. Default = 3 @Xb Toggles the phonetic mode on or off. Default = 0 @? Speaks the ROM version number. @+c Sets 'c' to be the new command start character (i.e. 'c' is used as the new start character for a command string instead of @). @=d This command will switch from one internal language ROM to another. @=1 Selects ROM 1 (default ROM) @=2 Selects ROM 2 @=3 Selects ROM 3 @=4 Selects ROM 4 As standard the Apollo II has only one ROM of 64k. Additional languages can be ordered. @=n, Switches languages. The comma is not really part of the command, but should be included, otherwise any text between the @=n and the end of the current phrase will be lost. When switching between ROMs of the same version number the Apollo II will do this without having to reset any communications circuitry. A greeting will only be issued if greetings are turned on, (see @G0). If however the ROM versions are different, the switch will still occur, by the synthesiser resetting itself. A greeting will thereby always be given. Section Six - Using an Apollo II with a BBC or BBC Master System Introduction The Apollo II speech synthesiser can be connected to a BBC computer by one of two ports, the serial or the parallel. The serial port is located at the back of the computer and is labelled 'RS423'. The actual position of this port varies slightly depending on which model of BBC computer you have. The plug which fits this socket is a domino plug. This means that it is symmetrical and can therefore be fitted either way round. However, the synthesiser will not work unless it is fitted correctly. The correct way is when the head of the screw in the plug casing faces to the right, as viewed frm the back of the computer. The parallel port is located underneath the computer, to the front of the machine. It is labelled Printer and is immediately to the right of the disk drive port. To connect the synthesiser to this port you have to use a printer cable and an adaptor available from Dolphin. If the synthesiser is connected to this port, a printer cannot be used at the same time. However, if the RS423 port is required for another input device, e.g. TouchTec 501 Touch Screen, it does provide the added facility for speech. It is possible to add speech to BBC basic programs by incorporating one of the following procedures. Serial Port Procedure 20000 DEFPROCSAY (Q$) 20010 *FX3,7 20020 PRINT Q$ '' 20030 *FX3,0 20040 ENDPROC After adding the above procedure it is necessary to call this up at the appropriate part of the program. For example, if a program prints the message "Very Good" on the screen, locate the point in the program where this is generated, and add an additional line. In the example below line 3000 is in the original program, line 3005 will make the synthesiser say the same. 3000 PRINT TAB (5,20) "Very Good" 3005 PROCSAY ("Very Good") The same procedure could be used to make a program which checks the ROM version. 10 PROCSAY ("@?") 20 DEFPROCSAY (Q$) 30 *FX3,7 40 PRINT Q$ '' 50 *FX3,0 60 ENDPROC Parallel Port Procedure 20000 DEFPROCSAY (Q$) 20010 *FX5,1 20020 *FX3,10 20030 PRINT Q$'' 20040 *FX3,0 20050 ENDPROC This procedure is then called up in the same way as outlined in the serial procedure. Software is available for the BBC and the BBC Master System. For more Information contact the Dolphin Helpdesk. BBC Master Settings The BBC Master series can cause confusion as it has a default protocol that is battery backed (as with time and date) and does not match the synthesiser. This default can be changed in the following way noting that all entries are in upper case. *CO. BAUD 7 followed by hard break *CO. DATA 4 followed by hard break 'Hard break' means hold the control key down and tap the break key. The two commands above should set the protocol to 9600 baud, 8 data bits and one stop bit. RM Nimbus When using the RM Nimbus PC 186 in IBM mode with speech, the following information may be of value. The Dolphin screen reading program (HAL) can be used with an Apollo II, if connected to the parallel port of the PC 186. You also need parallel.sys and setpc.exe. You also require a parallel board, available from Research Machines Part No 017-587. Having installed the board, copy parallel.sys to the machine's boot disk or hard disk and alter the config.sys file to include the line: device=parallel.sys /1 This enables access to the board via device LPT1. Next, set the computer to IBM mode by running the setpc.exe program. Type: setpc /m /l=1 From now on the computer is in mono mode with the parallel port set to be LPT1. Now connect the speech synthesiser to the port and insert your HAL disk. To load the HAL screen reader type. HAL -p The -p instructs the screen reader to use the parallel port. The RM Nimbus Technical Support telephone number is Int: +44 865 796197 or you can contact their Special Needs in Education Department on, Int: +44 865 796833. Users may be interested to know a range of software is availalbe for the PC 186. If you require more information on this subject contact the Dolphin Helpdesk. N.B. When using a parallel port you must use both a printer cable and a Dolphin parallel adaptor cable. The Baud Rate Switch & Parallel Adaptor As explained previously, the Baud Rate is the speed at which the computer and synthesiser send data to each other. Generally it is the computer that is sending data to the synthesiser. This is usually text which the synthesiser will speak but may be commands to make the synthesiser function in a certain way. If the Baud Rate setting of the synthesiser (set with the Baud Rate Switch) does not match the speed your computer is using then you will get garbled or no speech. Generally your computer will work at 9600 baud. This is how the baud rate switch in the cable is normally set (see diagram overleaf) when it leaves Dolphin. If you need to change the speed from 9600 baud, which you may need to do if the software you are using runs at a different speed, then please refer to the table of switch settings below. Switch One Switch Two Baud Rate Set On On 19,200 On Off 1,200 Off On 300 Off Off 9,600 If you wish to use the synthesiser with your computer's parallel port then you will need to use a Parallel Adaptor Cable which you can order from Dolphin. The alternative is to make your own as per the pin-outs in Appendix One. The adaptor cable is necessary to convert the synthesiser port to the correct connector and wiring arrangement for a printer cable to be attached. In short it makes the synthesiser look like a printer to your computer and printer cable. To connect the cable correctly plug the end with the 25-way D-type connector into the synthesiser. The other end will connect to the 36-way Centronix connector on the end of your printer cable, which in turn is plugged into the printer (or parallel) port on your computer. Serial Cable for the BBC Parallel Adaptor for the BBC Appendix One - Apollo II Physical Characteristics Weight 670 grams Size 17.1cm x 12.5cm x 7.2cm (lxbxh)(max) Power Source The DC supply should be 12 volts, 200 milliamps, 2.1mm barrel. The polarity is negative tip, positive barrel. Computer Connection Parallel (with adaptor) or Serial with default of 9600 baud, no parity, 8 data bits and 1 stop bit. Pin-outs Serial port Parallel port Pin 19 Ground Pin 1 strobe Pin 22 RTS Pins 2-9 data bits 0 -7 Pin 23 CTS Pin 15 ER at +5v Pin 24 Tx Pin 10 ACK Pin 25 Rx Pin 11 Busy Pin 12 PE at +5v Pin 13 SEL at +5v Pins 14,18 and 19 are ground Baud Rate Pin 20 Baud 1 Pin 21 Baud 2 Baud Rate Table Baud 1 Baud 2 Baud Rate NC* NC 9600 to GND NC 1200 NC to GND 300 to GND to GND 19,200 * Not connected Headphone 3.5mm stereo jack, left and right lives shorted. Controls On/Off control Volume control. The Parallel Adaptor If you wish to use the synthesiser with your computer's parallel port then you will need to use a Parallel Adaptor Cable which you can order from Dolphin or your Dolphin distributor. The alternative is to make your own as per the pin-outs in Appendix 1. The adaptor cable is necessary to convert the synthesiser port to the correct connector and wiring arrangement for a printer cable to be attached. In short it makes the synthesiser look like a printer to your computer and printer cable. To connect the cable correctly plug the end with the 25-way D type connector into the synthesiser. The other end will connect to the 36-way Centronix connector on the end of your printer cable which in turn is plugged into the printer (or parallel) port on your computer. See the diagram overleaf for clarification. The Parallel Adaptor Appendix Two - Special Voice Commands These commands have been provided for you to experiment with the sounds of the synthesiser. Most users will never need them. Commands to modify Formants @@dhh+ @@dhh- Here 'd' is used to select one of the ten parameters in the table below. h- or h+ can be used to add or subtract the hex value (h) from the selected parameter (d). The fourth formant is fixed. Parameter Value of d 0 Fn frequency of nasal formant. 1 F1 frequency of first formant. 2 F2 frequency of second formant. 3 F3 frequency of third formant. 4 ALF low frequency amplitude. 5 A1 amplitude of first formant. 6 A2 amplitude of second formant. 7 A3 amplitude of third formant. 8 A4 amplitude of fourth formant. 9 IV degree of voicing. Same command as @B below Voice Source & Filter @$o This command selects the voice source and filter as per the table below. Default = 0 Value of o Voice Filter Voicing Source 0 male default 1 female default 2 male spike 3 female spike 4 male cut-down default 5 female cut-down default 6 male reduced high frequency filter 7 female reduced high frequency filter Appendix Three - Description of UK English Phonemes This section describes the Apollo II's phonemes. Read this if you want to change the way that words are pronounced. Introduction The following phonemes can be embedded in ASCII text to correct the pronunciation of the Apollo II. To tell the synthesiser that the letters are to be interpreted as a phoneme when mixing text and phonemes you must prefix them with an underline (_). Examples cat = _K_AE_T again = _A_GP_E_N zoo = _Z_OO Dolphin Representation Example of Use _AA st _AI mke _AR fther _AW wter _A bout _B at _CH oose _D og _DH is _EE hd _EI thr _ER bd _E bd _F ar _G ap _H ood _IA fr _IE t _I knt _J ug _KK sool _K at _L ong _M ap _NG lo _N ap _OA bt _OO gd _OR pe _OW pnd _OY j _O sht _PP s

eech _P

at _QQ _Q ick _R ip _SH ut _S it _TH in _TT seel _T ap _UU t _U bt _V an _W et _X epel _Y oung _ZH pleaure _Z ip You could experiment with the phoneme set for your own languages. Appendix Four - Communications This section contains information on how the Apollo/Europa II speech synthesisers communicate with a PC or Toshiba computer. You should read this only if you are going to write your own software to drive the Apollo/Europa II synthesisers. Introduction The new features for the Apollo II require two way (half duplex) communications, in order for the speech and commands to be sent to the Apollo/Europa II and for the indexing and echo back information to be returned. Serial Communications The communication uses RS232 with RTS/CTS hardware handshaking in both directions. The PC is 'master' over the link and initiates all transactions. (Appendix 1 of the User Guide for Dolphin Speech Synthesisers specifies the baud rate selection and cabling). To talk to the Apollo II, the PC raises its RTS line and waits for the Apollo to respond with 'ready to receive data', which it does by raising the PC's CTS line. A data byte is then transmitted to the Apollo II's UART with framing: 1 start bit 8 data bits no parity bit 1 stop bit The Apollo II drops the PC's CTS for a short time while accepting each character. Another data byte may be sent when CTS is raised again. To read data from the Apollo II the PC drops its RTS line and waits or idles (under higher level control) until the character(s) are received. The Apollo II raises the PC's CTS line in order to indicate that it is about to send data to the PC. The Apollo II drops the PC's CTS line when the transmission has finished. If the PC tries to read data when none is available, the Apollo II will return with a NAK character (ASCII 21). Parallel Communications (Printer Port) Indexing and echo back will not work with an Apollo plugged into a printer port, all other functions will. A bi-directional version will be provided in the near future. PC card and Toshiba Communications To talk to Europa II and Toshiba cards the protocol described below is followed. The protocol is intended to make the operation of the PC to card communications independent of the bus and processor speed. The Apollo/Europa II series synthesisers require robust 2-way communications for use by functions such as continuous document read. Since this protocol has to work on cards fitted into the Toshiba modem slot, having no status line back to the processor which we can easily monitor, the system relies on a software handshaking method. To send a character, c: tries = 0 do 1. Read until NUL returned 2. Send char, c, to card 3. Read until ACK(c) or NUL is returned 4. increment tries until ACK(c) or too many tries A NUL (0) read from the card indicates that it is in the quiescent state, i.e. awaiting input (it must have missed the char c being sent). An SOH (1) means that the card has received a character at some point and is still processing it. ACK(c) is a status byte; it is the character, c, with bit 0 flipped if the character was received OK bit 1 flipped if bit 0 flipped and the card has data to send To read the data from the card: tries = 0 do 1. Read until NUL returned 2. Send ENQ (5) to card 3. Read until byte > 7, or a NUL is returned 4. increment tries until too many tries or a byte > 7 is returned A request for data can be made at any time by sending ENQ to the card using the above protocol. If no data is available, NAK (ASCII 21) is returned. The maximum number of retries is typically a large number, say 1000. If you get this many then the card is probably dead. The PC or Toshiba will be much faster than the card processor, so each of the read and write operations above must include a little delay, (say, executing a 100 iteration loop in 'C' code. Example 'C' Code for driving Europa II Cards The following short piece of code shows how a string may be sent from the DOS command line to the Europa II cards. The port numbers for the various cards are shown last. #include #include #include #define PORT_1 0x308 #define PORT_2 0x318 #define CR 13 /* program to send a string from the DOS command line to a Europa II PC Card at 0x308 */ /* function prototype, for routine to wait for busy bit to clear */ void check(void); main(argc, argv) int argc; char *argv[]; { char *p; /* pointer to string */ if (argc != 2) { printf("usage: Europa II string\n"); exit(0); } /* assign pointer to command line string */ p = argv[1]; printf("string to send is %s\n", p); /* while character is not '\0', (end of string), send: */ while (*p != 0) { check(); outp(PORT_1, *p); p++; } /* flush: send a carriage return */ check(); outp(PORT_1, CR); } void check() /* wait for busy bit to clear */ { int ax; do { ax = inp(PORT_1); } while (ax & 128); /* busy bit is MSB */ } PORT_NO = 0x2F8 for Toshiba Europa II Cards PORT_NO = 0x308 for IBM PC Europa II Cards PORT_NO = 0x318 alternate IBM PC Europa II Card address In all other respects the cards are driven in the same way as the serial devices. The ROM command set described previously is valid for both card ROMs and Apollo II. Alphabetic Index Pages Address Selection. . . . . . . . . . . . . . . . . . . . . . . 8, 9 Baud Rate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-31, 34 BBC (general). . . . . . . . . . . . . . . . . . . . . . . . . . 25-32 BBC Master System. . . . . . . . . . . . . . . . . 28-29 Commands (general). . . . . . . . . . . . . . . . . . . . 16-24 Cables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 10, 14-15, 35 Changing Voices Preset. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Adjusting. . . . . . . . . . . . . . . . . . . . . . . . . 18, 21, 23 Communications General. . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 2, 42 Serial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 25-26, 34, 42-43 Parallel Printer port. . . . . . . . . . . . . . . . . 26-27, 34-35, 43 PC & Toshiba Cards. . . . . . . . . . . . . . . . . 8-9 Fitting Cards. . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Greetings on/off. . . . . . . . . . . . . . . . . . . . . . . . 18 Indexing command. . . . . . . . . . . . . . . . . . . . . . 19-20 Pages Muting Command. . . . . . . . . . . . . . . . . . . . . . . 17, 20 Headphones. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 7-10, 13-14, 35 Internal Speaker. . . . . . . . . . . . . . . . . . . . . . . . . 10-11 Language Switching . . . . . . . . . . . . . . . . . . . . . . . . . 18-19, 23-24 Version mixing . . . . . . . . . . . . . . . . . . . . . 24 ROMs General. . . . . . . . . . . . . . . . . . . . . . . . . . 1, 16, 18, 23, 24 Language allocation. . . . . . . . . . . . . . . . 5, 10, 13, 18, 23-24 Physical Characteristics Apollo II. . . . . . . . . . . . . . . . . . . . . . . . . 1, 4, 5, 33 Europa II PC Card. . . . . . . . . . . . . . . . . . 6 Europa II Toshiba Card. . . . . . . . . . . . . . 12-13 Phonemes Embedding in text. . . . . . . . . . . . . . . . . . 39 Phoneme Mode command. . . . . . . . . . . 40-41 Sound Effects. . . . . . . . . . . . . . . . . . . . . . . . . 22 Protocol for Card Communications. . . . . . . 18, 42-44 Volume Control General. . . . . . . . . . . . . . . . . . . . . . . . . . 35 Physical. . . . . . . . . . . . . . . . . . . . . . . . . . 2, 7, 13 Software. . . . . . . . . . . . . . . . . . . . . . . . . 17 The Apollo II The Apollo II Page - {PAGE|4} Page - {PAGE|5} Page - {PAGE|49} The Europa II PC Card The Europa II PC Card Page - {PAGE|50} Page - {PAGE|15} The Europa II Toshiba Card The Europa II Toshiba Card Trouble Shooting Trouble Shooting Complete Command Set Complete Command Set Page - {PAGE|47} Using an Apollo II with a BBC Using an Apollo II with a BBC Appendix One Appendix One Appendix Two Appendix Two Appendix Three Appendix Three Appendix Four Appendix Four Index Index