Getting a 1980s computer to play samples

https://tautology.org.uk/blog/2024/08/14/getting-a-1980s-computer-to-play-samples/

I have written about the Sharp MZ-700 before: it was the first computer I ever used properly, I taught myself BASIC on it from the excellent manual and had my first experiments in Z80 machine code as well.

After a recently conversation on the Twitters about polyphonic music from the ZX Spectrum, I wondered what the humble MZ-700 would be capable of. Was it possible to abuse the same techniques as the Spectrum to produce more complex music or even play [sampled speech] …(https://www.youtube.com/watch?v=ggX6dlinh-I).

2 Likes

“Best and Worst ZX Spectrum Games Speech” - the best is pretty good!

On the Beeb, there is the seldom-fitted optional TI speech chip, but there was also speech from the SN76489 sound chip - see for example Repton 3 - just keep hitting space bar to get through the instructions, and the splash screen has speech.

1 Like

Maybe not quite samples but there were several packages for the Apple II (1Mhz 6502) to play speech and polyphonic music - which, given that all it had was a 1-bit output from a flip-flop and no form of hardware timing wasn’t that bad…

I remember Castle Wolfenstein being an Apple II game that had speech output (somewhat limited) and I also recall a program that was a demo of world flags plus national anthems, but I can’t find a reference to it online right now…

There was also a package called S.A.M. - Software Automated Mouth which could add speech to programs, but it needed an additional 8-bit DAC for the Apple II

The issue with samples on the old 8-bitters is always going to be RAM needed. One second of 8-bit audio at “telephone quality” of 8K samples/sec needs 8KB of RAM, so something has to give…

-Gordon

There’s an interview with Mark Barton, author of Software Automatic Mouth. It was pretty fascinating, given the history he had. He not only wrote S.A.M., but also the Mac’s (MacinTalk) and the Amiga’s speech synthesizer software (a port of the Mac’s software).

You’re right that the Apple II version needed a separate, plug-in DAC. He mentioned that. He also noted that he had to write his own sound driver for the other versions, the Atari 8-bit and C-64, because the sound hardware wasn’t good enough to do it itself. He said in fact that the Apple DAC had better sound quality than on the Atari and C-64. As I remember, he said the way he did it was very basic; modulating the volume control on the DAC in the Atari and C-64.

3 Likes

I remember games on the C64 but mainly at the intro.
We had some posts about speech

2 Likes

By coincidence I found some nice Commodore and other PDFs including this speech PDF for C64 and VIC-20. Chip is from GE.
Schematics, BASIC code and list of Allophones

http://cini.classiccmp.org//pdf/Commodore/Commodore%20Speech%20Article.pdf

A very nice book is The Complete Commodore Inner Space Anthology.
Interesting there is the 8050 RAM memory map with Zero Page contents at Power up (p 54).

http://cini.classiccmp.org/pdf/Commodore/The%20Complete%20Commodore%20Inner%20Space%20Anthology.pdf

@jhi I am interested in trying to get a few of the ZX spectrum 1-bit engines to run on the MZ700. Have a few legitimate questions to ask - and am happy to do it outside of this thread. Am wanting to use your sample code that actually drives the speaker, and to attempt to put this into some of the easier 1-bit music engines (made by Utz and Shiru).
My biggest hurdle is finding a suitable MZ700 emulator (where and what?, and how to load in a binary & execute for testing within said emulator).
Also, need to find out the format of the binary, if there is a loadable snapshot header etc. Just trying to find this info has been a challenge. Have looked at your github code with no real success yet.

I have managed to port a few of these ZX music players to about 14 different z80 computers so far, and am wanting to add the MZ700 to the list.

Cheers
Dave

I am sadly behind what is currently the best emulator to use. I think the last time I used this one Sharp MZ-800 Emulator download | SourceForge.net (does both 700 and 800), but just searching for “mz700 emulator” brings up e.g. New Z80 MZ-700 emulator implemented in Rust and Slint - Sharp MZ

@Sharpworks do you have more current information?

Not sure what binary format you mean. From the monitor? Maybe there’s no header then but plain data.

The mz8emu has a built in converter BIN to MZF (and vice versa and also MZF to WAV.)
You can then load the MZF.

SHARP MZ Community Web

You can test conversion and check the mem contents and header. There’s a disassembler and debugger and everything.

There’s also an overview of emulators

SHARP MZ Community Web

Or do you mean own, external binaries? (Then no need to know the format).
Another emulator is in MAME (700 not 800) maybe check the sources there.

I found your github and several posts in other forum like this from 2016
Z88dk1.9 - 1 bit sound for other targets?

So you want to port/convert/import the engine itself? Or a low level/hardware solution like for your TRS80 project?
You wrote ASM code for the other systems, why not here?
Or do you search for a tool for importing files to an MZF image?
Probably you have to write everything yourself.

Back in 90-something I did a Sound Card article for EPE, recently found the old board and tried it on my Z80 Playground and on the tiny RC2040 with Richard Russell’s MUSIC compiler and 8-bit samples, great fun: (skip to the relevant bit)
Z80 Playground:
https://www.youtube.com/watch?v=9airdajM6y4
https://www.youtube.com/watch?v=f3FLlewxSAs
RR’s MUSIC compiler:
https://www.youtube.com/watch?v=TI4b-tdONdk
RC2040:
https://youtu.be/HuaUUFC2Goo?si=qDIcv1vkWHKwM2un&t=215

1 Like

I remember a 6809 was often used for music as well. Digital music takes up a lot memory,
so one got a few demos for 8 bit machines, but off hand I can’t think of any music programs
for them.