Zeddy Audio Jukebox
-
- Posts: 329
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Zeddy Audio Jukebox
Play audio from SD-card using a ZX81 and ZXpand classic or plus! Output on tape out AND sound chip if available, with pretty display effect.
Binary player with 4 songs are attached. I only got it working on real ZX81, no emulators.
Read the details or get the source code at https://github.com/NollKollTroll/zeddy-audio-jukebox
EDIT:
New binary with one less bug
More bugs squashed
Binary player with 4 songs are attached. I only got it working on real ZX81, no emulators.
Read the details or get the source code at https://github.com/NollKollTroll/zeddy-audio-jukebox
EDIT:
New binary with one less bug
More bugs squashed
- Attachments
-
- zaj.p
- (2.24 KiB) Downloaded 57 times
-
- audio_examples_zaj.zip
- (3.26 MiB) Downloaded 70 times
Last edited by nollkolltroll on Wed Oct 26, 2022 8:40 am, edited 2 times in total.
/Adam
-
- Posts: 329
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: Zeddy Audio Jukebox
Moggy was wondering how this is done, so here is a general description of the tech behind it all.
The code runs in FAST mode, shutting of the picture generation. The HSYNCs are still generated in the background at 15700Hz though, impossible to turn off on the ZX81.
The code is divided into 2 state-machines, one to read from the SD-card and one to play back the samples.
Reading is done "as usual" from the ZXpand, but chopped up into small chunks to be able to fit into each time-slice of the state-machine. The samples end up in two separate 256-byte buffers.
Sample playing is done by reading each sample byte from one of the buffers and sending the lower 4 bits to the AY sound chip. The top bit of the sample is output on the tape out, synchronized with the HSYNCS thus looking stable and nice. The sound is not very good because the hardware is REALLY not expected to play samples!
The hard part of this tech is counting cycles and be able to fit anything useful in the time allotted.
The code runs in FAST mode, shutting of the picture generation. The HSYNCs are still generated in the background at 15700Hz though, impossible to turn off on the ZX81.
The code is divided into 2 state-machines, one to read from the SD-card and one to play back the samples.
Reading is done "as usual" from the ZXpand, but chopped up into small chunks to be able to fit into each time-slice of the state-machine. The samples end up in two separate 256-byte buffers.
Sample playing is done by reading each sample byte from one of the buffers and sending the lower 4 bits to the AY sound chip. The top bit of the sample is output on the tape out, synchronized with the HSYNCS thus looking stable and nice. The sound is not very good because the hardware is REALLY not expected to play samples!
The hard part of this tech is counting cycles and be able to fit anything useful in the time allotted.
/Adam
Re: Zeddy Audio Jukebox
Moggy faces the general direction of Sweden and salutes!
I have heard a whisper, Adam that you have a R2R DAC design in the pipeline please say this is true!?
Excellent work.
I have heard a whisper, Adam that you have a R2R DAC design in the pipeline please say this is true!?
Excellent work.
-
- Posts: 329
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: Zeddy Audio Jukebox
Moggy there is indeed an 8-bit R2R-DAC player already out, see viewtopic.php?f=6&t=4844
The documentation on how to build the DAC is non-existing though...
It's basically using the same stuff as the old printer port sound cards for PCs, like this one: https://www.jubatian.com/articles/building-an-lpt-dac/
Same type of build, but connected to port B on the AY/YM sound chip. Really easy and cheap, but decent 8-bit goodness.
The documentation on how to build the DAC is non-existing though...
It's basically using the same stuff as the old printer port sound cards for PCs, like this one: https://www.jubatian.com/articles/building-an-lpt-dac/
Same type of build, but connected to port B on the AY/YM sound chip. Really easy and cheap, but decent 8-bit goodness.
/Adam
- 1024MAK
- Posts: 5124
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Zeddy Audio Jukebox
Depends on if you want a PCB and amplifier chip I suppose…
Mark
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: Zeddy Audio Jukebox
For my simple use yes as I only need to worry about connecting the digital gubbins from the B port out put to the board and not faff about trying to link up to the spands AY audio out socket , and then from the boards usefully supplied pre-amp chip to a power amp.
That's the theory anyway.
Ladder DACs are a simple concept I'm familiar with but not possessing the skills to glue a bunch of resistors together then bodge a lump of Vero board onto the spand this seems the way to go for me.
That's the theory anyway.
Ladder DACs are a simple concept I'm familiar with but not possessing the skills to glue a bunch of resistors together then bodge a lump of Vero board onto the spand this seems the way to go for me.
-
- Posts: 329
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: Zeddy Audio Jukebox
Updated the code to remove a pesky bug. Binary in the first post, source and more documentation on Github.
/Adam
-
- Posts: 17
- Joined: Thu Aug 06, 2020 11:29 am
Re: Zeddy Audio Jukebox
this is really AMAZING!! I didnt know the zeddy could do this. You are
is there a program that makes the files for this? or is is something you made up?
-
- Posts: 329
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: Zeddy Audio Jukebox
There is a program to convert audio to the format needed by this player. Have a look at the description at guthub, it tells most you would need to know.
/Adam