Clock doubling on ZX80... is it possible ?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Clock doubling on ZX80... is it possible ?

Post by Andy Rea »

Hi Grant,

Thanks for your input, i'm not so sure that a permanent doubled clock would be easy or even feasable without some serious changes, the thought was under normal operating conditions could you do doubling when the display is not active, I.E outside of the keyboard/picture generation loop....

I'm still not convinced on the 'normal TV' been able to display 64 chars (512 pixels per line) or even 80 (640 pixels per line), sure the BBC's could do it but when hooked up to your average TV of the era the results were sometimes less than ideal, fine graphics in mode 0 i remeber was somewhat blurry at best, and mode whatever it was (the 80 column text mode) was difficult to read. However on a monitor made for the job it was pretty good, and as your probably aware a monochrome monitor (as i mentioned above) because of it's less physical restriction can map pixels where ever the beam falls, unlike it's colour mask color cousins.

I suppose with todays displays it's possible to get more than was intended from old computers, but would we really want to ?

Anyway until i'm in a position to do some testing this is all theorectical thinking.

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Clock doubling on ZX80... is it possible ?

Post by PokeMon »

Andy Rea wrote:Hmmm, quite interesting that Wiki... but...

it seems that the 13.5Mhz you refer to is for digital sources, which probably explains why whenever i have connected the PC to a standard PAL tv the results are less than perfect...

I also note that the Maximum video bandwith for any PAL system (J/K) is 6Mhz therefor the ZX80 / 81 video at 6.5Mhz is outside of this parameter...

However When used on a monochrome monitor, I.E. no colour mask inside the tube, Then the clarity and sharpness is really very good.

currently as it stands, i have no plans to move the crystal from the mainboard onto the ULA, so for now we are stuck at 6.5Mhz

Andy
Yes you are right that this sampling with 13,5 MHz is done when digitizing analog video signals. I think this would be done by digital TV in same way when displaying an anlog signal. In fact I did not try this and made no evaluation, it's only a guess. Even for HDTV signals sampling is done always with a multiple of 2,25 MHz (the proposed 6,75 MHz is exactly 3 times). Can see here:
http://www.itu.int/dms_pubrec/itu-r/rec ... !PDF-E.pdf

As I found further, there is no really standard specification for horizontal resolution of TV displays, only the vertical resolution is fixed defined. As result you have in a PAL signal effective 52 to 53,5 us to bring your information as detailes as possible and tv will display as detailed as resolution of display.
In fact most displays spend a horizontal resolution of about 560 horizontal pictures. I think newer LCD's and Plasma have 1280 to 1366 up to 1920.

You are right that video bandwith in PAL system is limited to 5 MHz for B/G system. But ZX81 is not out of the limit because a pixel duration of 153,8 ns (6,5 million/second) results in a frequency of about 3,25 MHz. Maximum frequency can be reached with one pixel black / one pixel white (like a hi/lo state of a clock signal).

In fact one pixel of ZX81 effects 2 pixels on the standard TV (in best case).
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Clock doubling on ZX80... is it possible ?

Post by PokeMon »

Andy Rea wrote:64 chars per line and true interlaced display.... we are really getting out of ordinary TV world now...

64, 8 bit wide chars would be un-readable on a normal TV

Andy
No, I don't think so. Now you have 2x2 pixel for 1 pixel sent by ZX81 - or picture of ZX81 scaled by two when displayed on TV.

64x8 is 512 pixel, with a small border you can send the 512 pixel in the time window of 52 or 53,5 us like 1/1 and this will be in the bandwith specification of 5 MHz (100ns / pixel). 1 white and 1 black pixel give the maximal frequency of 5 MHz, so within the standard. And instead of A6 you could use A7 as reference.

But it's only an idea.

By the way, does your ULA support the black porch ?
I think there are different ULA versions which supports (the newer) and which does not support (older or first versions).
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Clock doubling on ZX80... is it possible ?

Post by Andy Rea »

But ZX81 is not out of the limit because a pixel duration of 153,8 ns (6,5 million/second) results in a frequency of about 3,25 MHz. Maximum frequency can be reached with one pixel black / one pixel white (like a hi/lo state of a clock signal).
you are simply wrong here, the pixels are output every 153.8ns ~ this IS a rate of 6.5Mhz, outputtung pixels at 1/2 cycles intervals at 6.5Mhz wouls result in a pixel frequency of 13.5Mhz ~

And yes my ULA does do Back Porch generation, since early 2007 i have been working on ways to fix the missing back porch problem, i also designed a circuit using LM1881 to insert the missing back porch onto the video output of the older (184) ULA's

http://forum.tlienhard.com/TS1000/homep ... idmod3.jpg

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Clock doubling on ZX80... is it possible ?

Post by PokeMon »

Andy Rea wrote: you are simply wrong here, the pixels are output every 153.8ns ~ this IS a rate of 6.5Mhz, outputtung pixels at 1/2 cycles intervals at 6.5Mhz wouls result in a pixel frequency of 13.5Mhz ~
Sorry but you are wrong here. It is correct, that one pixel has a duration of 154 ns. The highest "frequency" you can realise is when you have one pixel black and next pixel white and so on. This is in the signal a low voltate, followed by a high voltage. Two pixels give one "cycle" with a duration of 308 ns which results in a frequency of about 3,25 MHz in video signal (bandwith used). This is in general valid for a sinus waveform, of course you have a rectangle signal which has more overwaves to produce a "good" signal (9,75 / 16,25 / 22,75 MHz and so on). If you have for example 2 pixel white followed by two pixel black you will have a video frequency of only 1,625 MHZ with 3rd / 5th / 7th harmonic and so on. So this seems a bit sharper because 4,875 MHz (3rd harmonic) is within the range of 5 MHz video bandwith.

http://en.wikipedia.org/wiki/Square_wave

In fact the video bandwith is limited to 5 MHz in PAL (channel 36 over RF) so the TV will have a more sinus waveform instead of the rectangle after demodulation which gives just different grey values which appears on screen in lost some contrast.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Clock doubling on ZX80... is it possible ?

Post by Andy Rea »

Ok I accept that if you look at the video wave form it represents a 3.25Mhz squarewave... And therefor offer my appologies...

But as they say the proof is in the pudding, so i rigged up a small test, checker board patterns

normal speed pixels 1 pixel per full 6.5Mhz clock cycle, (on monochrome monitor)
This is near a perfect picture and the dark/light spots are near in size (try as i might my camera makes the light spots appear bigger)
Image
Double speed pixels 1 piixel per 1/2 6.5Mhz clock cycle (on monochrome monitor)
You can see the checker pattern but by eye you have to look pretty hard, i guess text would be readable on this monitor at that resolution.
Image

normal speed pixels 1 pixel per full 6.5Mhz clock cycle (on 14 inch colour tv)
My camera does a poor job of taking pictures of this tv, but it wasn't as bad as the image makes it look, you can see the checker pattern but it is not clearly defined as on the monitor.
Image
Double speed pixels 1 piixel per 1/2 6.5Mhz clock cycle (on 14 inch colour tv)
What can i say....No good, no clear checker pattern can be seen, although it's not quite a sea of grey, it would be hard going to see any detail at this resolution on a tv.
Image

So what ever the numbers say rightly or wrongly, TV's suck for anything much quicker than what we have...

Regards Andy.

Soooo anyway.... back to the topic shall we, doubling the frequency of the ZX80 processor when it's doing something other than making a tv picture. I realise there would be problems runnign such titles as invaders or pac-man, which have there own tv routines, so disabling any clock doubling might be the best option in those circumstances.
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Clock doubling on ZX80... is it possible ?

Post by siggi »

Andy Rea wrote: Soooo anyway.... back to the topic shall we, doubling the frequency of the ZX80 processor when it's doing something other than making a tv picture. I realise there would be problems runnign such titles as invaders or pac-man, which have there own tv routines, so disabling any clock doubling might be the best option in those circumstances.
Indeed, that would solve the problem :)
I used a simple switch, when I added a higher frequecy quartz to my SHARP pocket computer PC-1211 several years ago. So when I want to SAVE/LOAD program from/to tape, I switch back to the original quartz ...

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
olpo01
Posts: 3
Joined: Wed Nov 17, 2010 7:19 am

Re: Clock doubling on ZX80... is it possible ?

Post by olpo01 »

Wilf Rigter has some interessting things on his website,

first out is a simple "fix" to increase performance
http://www.user.dccnet.com/wrigter/inde ... 81WAIT.htm

second is a "turbo" function which is as I understandfrom the thread start what you look for.
http://www.user.dccnet.com/wrigter/inde ... /turbo.htm

When the CPU is used for something else than create the TV picture you can boost the freq to it.
zx80nut
Posts: 108
Joined: Mon May 23, 2011 2:10 pm
Location: A bit north of Cardiff, Wales.
Contact:

Re: Clock doubling on ZX80... is it possible ?

Post by zx80nut »

Hi Andy.

I think what you propose would be the way to go. M1 and address to enable/disable the turbo in exactly the same way as you would control it using the NMI enable/disable for ZX81 "SLOW" turbo mode. Flicker-free games would have to run at normal speed, but as they would be using "custom" display routines, they would not trigger the execution traps that you would be adding.
I did an execution address trap on my early version of my CP/M computer to automatically switch out the low ROM when I called the CBIOS code that was bootstrapped into the top of memory after the ROM had loaded it from flash disk.

Grant.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Clock doubling on ZX80... is it possible ?

Post by PokeMon »

Andy Rea wrote:Ok I accept that if you look at the video wave form it represents a 3.25Mhz squarewave... And therefor offer my appologies...

But as they say the proof is in the pudding, so i rigged up a small test, checker board patterns


Double speed pixels 1 piixel per 1/2 6.5Mhz clock cycle (on monochrome monitor)
You can see the checker pattern but by eye you have to look pretty hard, i guess text would be readable on this monitor at that resolution.
Yes correct. So in digitized TV (with 13,5 MHz) one pixel has a "length" of 74 ns which corresponds to 6,5 MHz resulting video frequency (plus 19,5 MHz for some sharp picture, 3rd harmonic). You are right, this would be maybe unreadable when send of a modulator over TV where you have only the defined bandwith of 5 MHz for signal transportation. In the years the industry developped many filters and technics to sharpen the picture over antenna. :mrgreen:

But when you use a video input (s-video for example but also composite video) on a TV or monitor you don't have the restriction with 5 MHz bandwith and a picture over this input can be displayed sharp it the TV has the horizontal resolution. I think modern TV's have a horizontal resolution of the defined 720 pixels per line in general or higher (up to 1920 now for hd tv - which of course need hdmi). But you don't need hdmi for using the 720 pix / line.

But this was only discussion, I know that you leave the "norm" when doubling video resolution. But it would be nice to experimentate with this stuff and maybe you could be able to just "burn" a ULA for double frequency (if it can run at 13,5 MHz in general) with adapted counters for horizontal and verticals synchron pulses. Modification of the ZX81 ROM I could do myself.

It would be great to have this just for evaluation purpose when your ULA is ready. It would be great for me to test this. Thanks in advance for your help.

PS: I know I have to replace Z80 CPU with faster version. Memory and ROM is not a problem to connect on the expansion slot.
And I am talking about the ZX81 (not ZX80 which thread is above).
Post Reply