Page 1 of 1

48K ULA CPU clock signal on pin 32 - waveform incorrect?

Posted: Tue Jan 30, 2024 3:01 am
by SnowBum
I've been having issues with my 16K (upgraded to 48K) Speccy.

I did an S-video mod on it and as my TV doesn't accept S-Video via SCART i bought a S-Video/Composite to HDMI convertor.
But i've had issues with it not syncing properly, it would sync for a second at most and then the picture would jump around and then sync again.
I thought it might have been the S-Video mod board, so i removed it and went back to the normal composite mod but i was still getting the same thing happening with the sync problems.

After much investigation i've found that the crystal oscillator input into the ULA pin 39 is fine (a nice 14MHz signal).
But the CPU clock signal coming out on pin 32 keeps dropping cycles, i've attached the waveform i'm getting.

Now i'm assuming that the CPU clock should be constant, or does the ULA stop and start the clock ..... i wouldn't have thought so but i'm not at a level where i fully understand the workings of these lovely little machines yet.
Pin 32 on ULA.jpg

Re: 48K ULA CPU clock signal on pin 32 - waveform incorrect?

Posted: Tue Jan 30, 2024 3:14 pm
by 1024MAK
The ULA stops the clock to the Z80A (or the NEC µPD780C-1) when the processor is trying to access the "lower' DRAM at the same time as the ULA is getting screen data to 'draw' the screen. Or when the processor tries to perform an input or output operation to/from the ULA at the same time as the ULA is getting screen data to 'draw' the screen.

This is known as contention. See also this hardware description

The result is that the processor clock is NOT a continuous 3.5MHz waveform.

Your S-Video / composite video to HDMI converter, most likely does not like the non-standard video signal produced by the Speccy. The ZX Spectrum does not produce interlaced video. It produces one field and then repeats this same field. Whereas normal interlaced video uses two different fields (sometimes called even and odd) which combined make one video frame. This non-standard system has slightly incorrect timing and different horizontal synchronisation pulses.

Mark

Re: 48K ULA CPU clock signal on pin 32 - waveform incorrect?

Posted: Wed Jan 31, 2024 12:14 am
by SnowBum
Thanks for that link, i'm going to read up on it.

The HDMI convertor was recommended to me by someone who has used it with success with their Spectrum.
I've been really struggling to get a way to have a stable picture on a TV.

I shall preserver with my issue 2 Speccy and try all i can to get a stable picture.
But in the meantime i've purchased a +2A 128K Spectrum which i'll be able to get a solid picture out of (with it having the RGB output).