Author Topic: New "Next Generation Speech Synthesizer" for the CPC 464  (Read 1522 times)

0 Members and 1 Guest are viewing this topic.

Offline LambdaMikel

  • CPC464
  • **
  • Posts: 28
  • Country: us
    • Homepage
  • Liked: 13
That's good to know - I will try to clean it up a bit anyways, for nicer look.

Offline LambdaMikel

  • CPC464
  • **
  • Posts: 28
  • Country: us
    • Homepage
  • Liked: 13
Today, something interesting happened - the whole thing stopped working!  :o Checked all the chips, everything seemed to be fine. The AVR wouldn't start up - it turns out the 22 pF capacitors for the oscillator quartz were fried! I would never have thought that a capacitor would fail in such a circuit... must be extermely low grade, or maybe because the following thing happened (below). I replaced them with some higer grade capacitors, and it is working again - hope these will last longer!

I am now trying to make the microcontroller software work with speech games such as "Roland In Space". During that process, I connected my DD3 (in order to load the game) to the CPC expansion port connector holding the speech synthesizer, and it was perfectly blocking the display such that I couldn't see anything. Great design - I should have though about that. Maybe Bryce was right from the beginning and the whole board should not be so tall  :laugh:

I then tried to connect the speech synthesizer card with the flat band cable, similar to my breadboard adapter, and during that process I must have gotten the polarity of the cable / connector wrong.... Might that have blown the capacitors? Who knows. Anyways, I have figured out how to connect both the DD3 and the speech synthesizer to the expansion port by now (see screenshot), using a the breadboard adapter connector I had made, and I am now good to go to investigate how I can make "Roland In Space" speak  :P

I was intruiged to read that DK'tronics speech synth and SSA-1 have the same chip, but are actually not compatible... they use a different IO port. It seems that some games are supporting SSA-1, but only one or two DK'tronics. I can remember the Amsoft Pool / Snooker supported the DK'tronics (interestingly, that does not seem to be listed on the Wiki, but I can remember it speaking from playing it in 1986 with my DK'tronics). It shouldn't be difficult to support both IO ports (SSA-1:  out = in = &FBFE, DK'tronics: out = in = &FBEE). Output port and allophone translation shouldn't be such a big problem, however, INPUT might be.

And here is a question - does anybody know if the games such as Roland in Space would actuall read / poll the port to wait for the "ready" signal from the SSA-1 / DK'tronics? Or do the games just send the allophones slowly enough? I was hoping that I would not have to add this to the hardware, as it requires decoding of ~IOREQ & ~RD and, and, depending on SSA-1 or DK'tronics, I will have to indicate ready as follows:

SSA-1:

 bit7   Status 1 (0=Speech Busy, 1=Ready/Halted)   (SBY Pin, Standby)
 bit6   Status 2 (0=Ready to Receive Data, 1=Busy) (/LRQ Pin, Load Request)
 bit5-0 Not used (garbage, probably usually high)

DK'tronics:

 N/A    Status 1 (none, SP0256.Pin8 is not connected) ;SBY Pin, Standby
 bit7   Status 2 (0=Ready to Receive Data, 1=Busy)    ;LRQ Pin, Load Request
 bit6-0 Not used (garbage, probably usually high-z)

Maybe I will only support SSA-1... since this seems to be different. As I will have to buffer the allophone bytes anyways, and translated them, I can always indicate "ready" for the SSA-1 emulation, using 

 bit7 = 1, bit6 =  0

Maybe this could just be "hardwired". However, does anybody know if the games really wait for ready and need this? I would be happy of not having to change the hardware.
« Last Edit: 07:52, 25 May 17 by LambdaMikel »

Offline gerald

  • 6128 Plus
  • ******
  • Posts: 1.144
  • Liked: 817
And here is a question - does anybody know if the games such as Roland in Space would actuall read / poll the port to wait for the "ready" signal from the SSA-1 / DK'tronics? Or do the games just send the allophones slowly enough? I was hoping that I would not have to add this to the hardware, as it requires decoding of ~IOREQ & ~RD and, and, depending on SSA-1 or DK'tronics, I will have to indicate ready as follows:

SSA-1:

 bit7   Status 1 (0=Speech Busy, 1=Ready/Halted)   (SBY Pin, Standby)
 bit6   Status 2 (0=Ready to Receive Data, 1=Busy) (/LRQ Pin, Load Request)
 bit5-0 Not used (garbage, probably usually high)

DK'tronics:

 N/A    Status 1 (none, SP0256.Pin8 is not connected) ;SBY Pin, Standby
 bit7   Status 2 (0=Ready to Receive Data, 1=Busy)    ;LRQ Pin, Load Request
 bit6-0 Not used (garbage, probably usually high-z)

Maybe I will only support SSA-1... since this seems to be different. As I will have to buffer the allophone bytes anyways, and translated them, I can always indicate "ready" for the SSA-1 emulation, using 

 bit7 = 1, bit6 =  0

Maybe this could just be "hardwired". However, does anybody know if the games really wait for ready and need this? I would be happy of not having to change the hardware.
Roland in Space is indeed reading the port, the original software that came with the SSA1 boes it too.
Its the only way to have a proper synchronisation with the SP0256.
Some reading, if you did not already find it : http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/amstrad-ssa-1-speech-synthesizer-rom-needed/msg4641/#msg4641

Offline LambdaMikel

  • CPC464
  • **
  • Posts: 28
  • Country: us
    • Homepage
  • Liked: 13
Thanks, this is helpful!


> Roland in Time expects the following sequence:
> - LRQ = 0, SBY = 1
> - write: LRQ = 1, SBY = 0
> - waits 18microseconds and then reads port: LRQ = 1, SBY = 1
> After this it has identified an ssa-1 and probably allows the allophone to complete and the final state:
> is back to LRQ = 0, SBY = 1.
>
> It sends allophone 0.

So I really need to create that pulse.
What trouble me is having to create LRQ = 1, SBY = 1.
It would be easier to simply toggle between 01 and 10.
 

Offline LambdaMikel

  • CPC464
  • **
  • Posts: 28
  • Country: us
    • Homepage
  • Liked: 13
... I will try to get the Atmega 328 to do the LRQ and SBY generation... I should still have 2 pins available. Only problem is that 328 doesn't have tri-state output. I had the same issue with READY / WAIT signal before - it seems the only way to put a pin into tristate (not connected) mode is to declare it as an input pin. It is possible to toggle the pin between input (not connected) and output (for 0,1) though, that worked for the READY / WAIT signal.

Anyways, that requires some hardware changes - so back to the breadboard for now... the new PCB (if this will work at all) will require a couple of changes:
  • make READY / WAIT signal a track instead of an extra wire on the current PCB
  • have 2 more tracks for LRQ and SBY
  • a headphone jack - the jack on the Emic is only good for headphones or powered amplifiers, whereas in fact, the Emic has a built-in amplifier which can drive a loudspeaker. These are the two remaining pins SP-, SP+ from the Emic board. I will connect to these.
  • use the 10 switch DIP more wisely - currently, it uses 2 switches for power supply for Emic 2 and AVR (for powercycling - hard reset), and 8 pins for the decoder line F9E<line> (0 - 7). That might be overkill. I might rather use 2 switches for mode selection (0 = Emic 2 native, 1 = DK'tronics, 2 = SSA-1), and then only use 6 switches for <line>, from 0 to 5 or so. For SSA-1 and DK'tronics, the IO address is fixed, anyways, so it would only apply for Emic 2 = mode 0.
  • make sure that the DD3 is visible... reduce height of board.
It would be nice if the headphone jack would just connect to the CPC built-in speaker... not sure that is possible though. The SND pin on the expansion port produces some audible sound if I put my finger on there, but I believe this is intended as output only, not input, or?

For the people that indicated interest in purchasing one of these speech synthesizers, I suggest to wait until the hardware is finalized and Rev. 2 is working ;-) That might take a while though... not sure if the synchronization / emulation of SSA-1 will work out at all to be honest. The good thing about having a microcontroller "on board" - it is mostly a software problem then  :laugh:
« Last Edit: 19:51, 25 May 17 by LambdaMikel »

Offline LambdaMikel

  • CPC464
  • **
  • Posts: 28
  • Country: us
    • Homepage
  • Liked: 13
... I will try to get the Atmega 328 to do the LRQ and SBY generation... I should still have 2 pins available. Only problem is that 328 doesn't have tri-state output.

If it only was so easy  ;D One more catch - just putting bit 7 and bit 6 for LRQ and SBY on the data bus "when the AVR likes to" won't do it, because I will jam the bus - rather, I need to generalize the "IO address recognized & ~IOREQ & ~WR" into "IO address recognized & ~IOREQ"  = X and add two more gates: SPEECH_READ = X & ~RD and SPEECH_WRITE = X & ~WR. Then, SPEECH_READ will have to act as "output enable" of some tristate buffer... I will need one more chip. The AVR cannot get the CPC's bus timing right. Rather, it will provide the LRQ and SBY signals as inputs to the tristate buffer, which puts them on the bus when SPEECH_READ is encountered. That should do the trick, but requires one more chip (the tristate buffer) in the design.

The good thing about requiring one more chip is that I don't need to toggle the AVR pins between input (tristate) and output  (0,1) mode then. They can just stay in output mode.

Btw, if anybody has much easier idea of realizing this, please chime in!
« Last Edit: 20:46, 25 May 17 by LambdaMikel »