Sound and speech support for ZX81?

Requests for features
Post Reply
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Sound and speech support for ZX81?

Post by siggi »

There are currently some ZONX-81 compatible sound boards for the ZX81 under development:

in Germany:

http://forum.tlienhard.com/phpBB3/viewt ... ?f=2&t=464

in England:

http://www.rwapservices.co.uk/ZX80_ZX81 ... -t528.html

Would it be possible and make sense to support this sound boards in Z88DK?


The German board will also have the option to add a speech processor board, using a "SP0256-AL2" speech chip (same as in the Spectrum Currah Speech box used).

Is it possible to support that chip at the ZX81 by porting the Spectrum sources? Or is some additional soft/hardware within the Spectrum or Currah box used by Z88DK, which is not available for a ZX81?

Siggi
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

The sound support in z88dk is 1 bit beeper only and not AY unfortunately.

In terms of Currah speech support it looks like there's two ways of driving it: Setting the s$ string which is then picked up by the Currah ROM. The other way is loading the allophone string into memory at an address that's monitored by the ROM - section 6 of ftp://ftp.worldofspectrum.org/pub/sincl ... Manual.txt
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Yes, there is a nice trick to play one-bit sound by making the video flicker, but then you won't see the picture when the music plays !
I'd rather say it is possible to port some of the MSX or SEGA SMS libraries which are based on the Yamaha chip.
I never did it because they are both very basic functions, but.. well let's have a look ;)
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Post by siggi »

stefano wrote:Yes, there is a nice trick to play one-bit sound by making the video flicker, but then you won't see the picture when the music plays !
Meanwhile there are some nice PT3- or STC-players available for the ZX81: :)

http://www.youtube.com/watch?v=bnNnzJ_HuDs

http://www.youtube.com/watch?v=Tizsym426II

The Zeddy is running in SLOW mode (display active) and the player is hooked into the display routine ...

Siggi
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

It is not difficult to make an external hardware play correctly without impact on the screen, but I see no way to do it toggling the *same* bit used for both the video beam and the tape output !
Well, I just committed my attempt to extend the 1-bit sound library to the zx81, the examples in {z88dk}/examples/sound should be runnable in any startup mode (those video flag bits we talked about recently are very cool).
I'd be glad for know how this code behaves on the real hardware.. what happens if you just raise the TV volume ?
Another idea could be to obtain an audio squelch combining an external amp with that "turbo mode led" circuit I saw somewhere on the web and get rid of the TV noise when sound is not playing ;)
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Post by siggi »

Hi Stefano,
the examples work and also some (not all!) sound can be heard with a real TV set :lol:

But instead of making some hardware to detect the time, where sound instead of a picture is made, it makes more sense to add a real sound hardware (with AY or YM chip) and have real good sound ;)

Siggi
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Agree, btw the cheap sound was still missing, now we have it !
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Being fashionably late...
siggi wrote:Would it be possible and make sense to support this sound boards in Z88DK?
There is no AY support within z88dk. Currently music is composed using 3rd party trackers (see eg VortexTracker for Windows) whose output is an interrupt routine that plays the music. You would then arrange to call the routine at a 1/50s rate usually by installing it on an interrupt. On the spectrum this is done with the IM2 library.
The German board will also have the option to add a speech processor board, using a "SP0256-AL2" speech chip (same as in the Spectrum Currah Speech box used).

Is it possible to support that chip at the ZX81 by porting the Spectrum sources? Or is some additional soft/hardware within the Spectrum or Currah box used by Z88DK, which is not available for a ZX81?
I think the right way to do it would be to have it appear as a device that can be attached at the end of a file stream. Then you could printf phonemes to it.

The currah on the spectrum is horrible :P Well, from a m/c (and therefore C) programmer's point of view. Its operation is closely tied to basic and involves passing phonemes using basic string variables. The special library is there to deal with all that craziness.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Well, there is some very basic support (just to access to YM chip registers) on the SEGA/MSX/SORD side, but the functions differ slightly and I never managed to bring the stuff on a common base.
Post Reply