INTRODUCTION

The video waveform produced by the ZX80 does not completely comply with the standards defined for PAL and NTSC televisions. The timing is slightly out and the waveform lacks a number of control signals. This can cause modern TVs to display the signal from the ZX80 as a very dark picture, with barely visible text. This page presents a simple circuit which can be clipped onto the ZX80 board and causes the introduction of an extra signal into the video waveform to try an overcome this issue. The resultant video signal is closer to the PAL and NTSC specifications and so a wider range of TVs are able to display a bright picture from the ZX80.

To understand why the signal from a standard ZX80 is displayed so badly on modern TVs, consider a typical scan line forming a TV picture:

Structure of a TV Scan Line

Compare this to the waveform output by the ZX80:

Structure of a ZX80 Scan Line

The ZX80's signal is missing the front and back porchs and the sync tip component is of a longer duration. The front porch signal is not used as such by a TV and so can be safely omitted. The back porch signal is comprised of two components: colour burst information and a black level reference. The colour burst component can also be safely omitted since the ZX80 only outputs a monochrome display and so colour reference information is irrelevant. The black level reference component is required to inform the TV of the voltage level used to represent black. This allows the TV to automatically adjust the brightness of its picture. However, the ZX80 does not generate a back porch signal and hence does not provide a black level reference. At the point during a scan line where the TV expects the black level reference to appear, the ZX80 has already begun to construct the left border of the picture information and hence is outputting a voltage corresponding to white. The TV samples this voltage and interprets it as representing black, and this means that whenever the ZX80 outputs white the TV will display it as black. When the ZX80 was launched, the black level reference was not generally checked by TVs and so its lack in the ZX80 video waveform did not cause a problem. The TV would simply use a fixed voltage range to span from black to white.

The horizontal sync pulses generated by the ZX80 are produced using a 2 bit shift register, the last stage of which normally resides at 5V. Every 64µs, an interrupt is triggered which clears both stages of the shift register to 0V, and this forms the start of a sync pulse. At the same time, the Z80 CPU responds to the interrupt by executing the routine located at $0038 within the ROM and this outputs the picture information for the TV scan line. As each subsequent instruction is fetched by the Z80, the shift register is clocked and this causes 5V to ripple its way towards the output. After two instruction fetches, the output of the shift register returns to 5V and therefore ends the sync pulse. The two instructions fetched are always JP and POP, both of which take 10 clock cycles to execute. The duration that the sync signal remains low is therefore 20 clock cycles. The CPU is clocked at 3.25MHz and so 20 clock cycles span 6.15µs. Ideally a sync pulse should last only 4.7µs but TVs will respond to 6.15µs and begin the display of a new scan line. A black level reference voltage is expected to appear at the end of the back porch period (approximately 4µs after the sync pulse has ended) but by this time the ZX80 is outputting a white level for the border.


BACK PORCH CIRCUIT

The lack of a back porch signal (and hence black level reference) means that it is not possible to obtain a usable picture from a ZX80 on most modern TVs. The ZX80 can be modified to bypass its modulator unit and to output a composite video signal instead, but this requires cutting tracks or wires within the ZX80, which is not desirable if one wishes to keep the ZX80 in its original condition. To overcome this problem, I have developed a very simple circuit which can be attached inside the ZX80 without the need to desolder components or cut any tracks/wires, and if small enough clips can be found then the circuit can be connected to the ZX80 board without the need for soldering. This means that the add-on circuit can be completely removed without trace whenever it is desired to return the ZX80 to its virgin state.

The back porch generator circuit consists of a single IC, a resistor and a diode, as shown below.

ZX80 Back Porch Circuit

The designators a and b are used to denote which side of the specified resistor a connection should be made to. When viewing the ZX80 from the front, all of the referenced resistors are orientated from left to right. The designator a is used to refer to the leg on the left and the designator b the leg on the right. The location of these connections are shown in the following photo.

Attachment of ZX80 Back Porch Circuit

The circuit works by creating an elongated version of the horizontal sync pulse, which spans both the sync tip and back porch durations, and then mixes it with the composite video waveform fed into the modulator. The mixing process is performed using resistors, and it is their relative values that dictate the proportion in which the signals are combined. The following diagram demonstrates this mixing process.

ZX80 Back Porch Signal Mixed With Sync Signal

The back porch pulse is generated by the add-on circuit by feeding the ZX80's sync pulse into a new 2 bit shift register. This shift register is clocked each time the Z80 CPU fetches the next instruction and so the back porch signal will lag behind the sync signal by the duration of two instructions. Depending on the path through the interrupt service routine, these two instructions will either take 9 clock cycles (2.77µs) or 17 clock cycles (5.23µs). Both routes result in a back porch pulse that approximately spans the required duration. The diagram below shows the difference in width of the two back porch timings.

ZX80 Video Waveform Back Porch Width

The output of the back porch circuit is then combined with the sync signal and also with the picture information using resistors. The values of these resistors dictate the proportions in which the signals are mixed. The circuit also includes a diode, and this is used to ensure that the back porch output is only mixed with the composite video signal when the back porch level is low. The resultant TV waveform is still not compliant to the PAL/NTSC format but is now good enough for many TVs to detect a suitable black level reference and hence display a bright picture.

The following diagrams show the video waveforms generated by the ZX80 with and without the back porch generator circuit.

ZX80 Video Waveform Without Back Porch Circuit ZX80 Video Waveform With Back Porch Circuit
ZX80 Video Waveform Without Back Porch Circuit ZX80 Video Waveform With Back Porch Circuit

The 1K2 resistor at the output of the circuit is required to lower the d.c. offset voltage present in the ZX80 video signal. This offset voltage can cause some TV sets to fail to recognise the sync signals, and so a pull-down resistor is included to reduce its magnitude.

The improvement in picture quality can be seen in the following photos, which shows the listing and title screen from my ZX80 Pacman game. My television dislikes the flicker-free display more than the standard ZX80 display, and this is due to the increased duration of the vertical sync pulse when running the flicker-free game. It seems that the TV extracts a black reference level voltage during the vertical sync pulse and then takes a number of scan lines to adjust to the lack of black level reference voltage thereafter. So the first few scan lines are displayed brightly and as the TV samples scan lines where the black reference voltage is absent, i.e. it is at the normal white border level, it begins to change its brightness such that all remaining lines are shown very dark.

Although not very noticeable in the photos, every eighth scan line is slightly darker than the others when using the video enhancement circuit. This corresponds to when the new 2 bit shift register only extends the sync signal by 9 clock cycles. Since the back porch period is shorter than ideal, it seems that my TV computes an average of the voltage values appearing throughout the black level reference period and so this includes both the low level back porch signal and the white level of the left border. Should your TV produce scan lines that are too dark and therefore unacceptable then additional stages can be added to the new shift register to stretch the duration of the generated back porch signal.

ZX80 TV Picture 1 Without Back Porch Circuit ZX80 TV Picture 2 Without Back Porch Circuit
ZX80 TV Picture 1 With Back Porch Circuit ZX80 TV Picture 2 With Back Porch Circuit


LIMITATIONS

The circuit suffers from two drawbacks:

The duration of the back porch signal is tiny compared to a size of a pulse output by the SAVE command and so this issue is not likely to cause too much of an issue. However, the lower output voltage does result is a significant difference and so would result in recordings that are quieter on cassette. Playing back such programs at a higher volume may be sufficient to overcome the problem.

The circuit is therefore not an ideal solution but has the advantage that it can be fitted without the need to solder to the ZX80 or cut any tracks. Both of its drawbacks can be overcome using additional electronics but it would then be necessary to solder connections to the ZX80 PCB.

Contact Me
  -   Disclaimer