Zeddy audio playing now a reality!

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Zeddy audio playing now a reality!

Post by Andy Rea »

Moggy / Adam....

Anyway to sycn up 2 zeddies ? one for each channel ? perhaps an external master ticker providing a constant 22.109 Khz clock.. so zeddies do what they are doing ( i haven't looked at the code to see how constrained it is ) but wait just before output data to the DAC for the EXTernal CLocK.

ooh hum...

just a though ( stolen from "Gasman" Matt Westcott who IIRC dikd somethign similar with spectrums an age ago )

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Moggy
Posts: 3295
Joined: Wed Jun 18, 2008 2:00 pm

Re: Zeddy audio playing now a reality!

Post by Moggy »

I love it when Andy-BUILD-IT-AND-THEY-WILL-COME Rea comes out with things like this. :D :lol:

Whilst I lack the skills to do this, what I can do just for giggles and because I'm set up for it spand, DAC and audio wise, is to split a stereo file with both channels saved separately and play them back through 2 zeddies un-synced just to see what it does and whether it's worth pursuing.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Zeddy audio playing now a reality!

Post by Andy Rea »

@Moggy,

Your gonna have a heck of a time trying to get 2 independent zeddies to be anywhere near close at 22K however you could record output on pc in stereo and time shift the channel to match to get a more accurate idea of what it would sound like...

@NOLLKOLLTROLL / Adam any chance of the source code for the player, would save me some leg work Cheers#

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Moggy
Posts: 3295
Joined: Wed Jun 18, 2008 2:00 pm

Re: Zeddy audio playing now a reality!

Post by Moggy »

Well it works!!

I claim a world first of a stereo track played on two zeddies!!!

A7 19:05 a couple of zeddies played Drive my Car by the Beatles (the Abbey Road stuff is always good for hard panned stereo)
And it stayed in sync for all of 19 seconds!! :lol:

I assume the two oscillators are slightly different speed wise hence the result.

@Andy.

All Adams stuff for audio found here.....

https://github.com/NollKollTroll/zeddy-audio-jukebox

Zajraw.asm I believe is what we are using.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Zeddy audio playing now a reality!

Post by Andy Rea »

I think its possible to build an external device that can plug into the edge connector of 2 zeddies and keep them in sync.

prior to the data been sent to the DAC there is a LD A,(HL) // same for playBuf_A or playBuf_B ... now with mininal changes to the player code.. I.e remove some of the NOPS ( required inn standalone operation for accurate timing ) 147 Clock cycles per sample i believe. we coudl do with a few clock cycles slack... This is where the hardware we attach takes over.

During M1 op-code fetch cycle external hardware Sniffs The LD A,(HL) opcode on the data bus and sets a flip-flop, this flip flop in turn asserts the ~wait line of the CPU stopping the LD A,(HL) from completing its second machine cycle until the flip flop is cleared which is controlled by our own 22,109 Hz oscillator. this should ensure that the 2 zeddies will be NO MORE than 1 clock cycle apart or about 1/147 of a sample apart or about 0.0000003 of a second apart.

will it really work ? only one way to find out :lol:

However... Moggy you may have to wait a short while as i have that other ( wink, wink ) hardware project on going....

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Moggy
Posts: 3295
Joined: Wed Jun 18, 2008 2:00 pm

Re: Zeddy audio playing now a reality!

Post by Moggy »

Understood Andy re the wink wink.

As for an external device for syncing things up I can only paraphrase a quote from the film Field Of Dreams..

"build it and I will come!!" (ooer missus) :oops:

PS I will pester you to death until it is done or hold your TS1500 to ransom! :lol:
User avatar
1024MAK
Posts: 5153
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Zeddy audio playing now a reality!

Post by 1024MAK »

Would a simpler system be:
  • Find a way of supplying both Zeddies from one 6.5MHz oscillator, plus
  • Having some very simple hardware to synchronise the programs on both.
For the latter, I’m thinking of a small modification to the ROM code, to fix the ROM to run at 50Hz video. Then we can pinch the UK/USA input pin for our synchronisation input. It can be as simple as a debounced switch (ideally via a flip-flop).

Has anyone ever tried feeding a 6.5MHz signal into an ULA from a logic gate?

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.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Zeddy audio playing now a reality!

Post by Andy Rea »

The original ULA can be fed with a 6.5Mhz, that's how the original "clock doubling" worked as for replacement ula's YMMV.

And yes i believe it would be a much simpler idea... i don't think you even need to change the rom just have a sync loop before the main player that prompts the user to "press the button" and then release it again once the screen goes blank...

worth pursuing as it wouldn't take much either software or hardware wise.

Thanks for the Idea

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
Paul
Posts: 1536
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Zeddy audio playing now a reality!

Post by Paul »

And how about feeding one Zeddy with 13 MHz and play stereo on channel A and B?
AFAIK Andy has some experience here as well.
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
Paul
Posts: 1536
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Zeddy audio playing now a reality!

Post by Paul »

I had some trouble to find the player program.
I finally found it in https://www.sinclairzxworld.com/viewtop ... f=6&t=4844
To be honest I avoid any threads containing commodore specific words like SID, C64, 1541 etc :twisted:
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply