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

A place to discuss the ZX80's and ZX81's younger brother - the Sinclair ZX Spectrum
Post Reply
SnowBum
Posts: 6
Joined: Sun Dec 31, 2023 5:59 pm

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

Post 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
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

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

Post 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
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.
SnowBum
Posts: 6
Joined: Sun Dec 31, 2023 5:59 pm

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

Post 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).
Post Reply