Byte Delight ZX-HD User manual

ZX-HD
The HDMI interface for the ZX Spectrum
With 64 color ULAplus
TM
support!
Manual
ZX-HD firmware v1.3
Read this manual before using the ZX-HD interface!
Manufactured by Ben Versteeg

2
Latest versions of manual and firmware:
zx-hd.bytedelight.com
Notice
This manual is copyright material and may not be reproduced, transcribed, translated into any
language or transmitted in any form whatsoever without the prior written consent of ByteDelight.
The manual is intended to provide the user with detailed information adequate for the efficient
installation and operation of the equipment involved. While every effort has been taken to ensure
accuracy, the manufacturer assumes no liability resulting from errors or omissions in this manual, or
from the use of the information contained herein.
The ZX-HD firmware is also copyright material and may not be reproduced, reverse engineered,
translated into any language or transmitted in any form whatsoever without the prior written
consent of ByteDelight.
The manufacturer reserves the right both to change the specifications of the ZX-HD and the
firmware and to revise this publication from time to time without obligation to notify any person of
such revision or changes.
The ZX-HD requires to solder a pin header block to a Raspberry Pi Zero yourself, and to assemble
the ZX-HD. ByteDelight assumes no liability with defects resulting from errors in this process.
Send your feedback to this manual or the ZX-HD to:
Document version: v1.3 September 2017
Manual created by Ben Versteeg

3
Introduction
The ZX-HD - the first HDMI interface for any ZX Spectrum!
Connect your ZX Spectrum to a modern TV through HDMI
–no more composite video or antenna!
+ 64 colours on your ZX Spectrum!ULTRA SHARP
Main features
Totally transparent - no change needed to your ZX Spectrum
Crystal clear and ultra-sharp picture!
ULAplus™–enjoy games with 64 colours!
ZX Spectrum 128 video memory support: works with any software that uses both video buffers!
Synchronous to ULA timing –software with border and multicolour effects run as it should!
Colours have been thoroughly calibrated to keep the unique feel of the ZX Spectrum
Compatibility
The ZX-HD is fully compatible with all Sinclair ZX Spectrum models:
ZX Spectrum 16K, 48K, 48K+, 128K, +2, +2A, +2B, +3, Harlequin kits and some clones.
Check the ‘Troubleshooting’paragraph if you do not get video from your ZX-HD.
In the box
The box contains:
ZX-HD circuit boards
ZX-HD front shell and back plate and set of 4 screws
Micro SD memory card with micro SD to SD adapter
Mini-HDMI to HDMI cable
This printed manual
Other required parts and tools:
A small Philips screwdriver to assemble the case
A Raspberry Pi Zero, with soldered 2x20 pin male pin header block*
A soldering iron to solder the pin header block to the Raspberry Pi Zero (if not yet done)#
* HDMI licensing rules prevents selling the ZX-HD with Raspberry Pi Zero.
You can buy a Raspberry Pi Zero at e.g. Pimoroni.com or Pihut.com.
Make sure you order the Raspberry Pi with 2x20 pin male pin header block.
Also make sure to solder the pin header block at the correct side of the Raspberry Pi Zero!
See the paragraph “Assembling your Raspberry Pi Zero” for detailed information
#ByteDelight offers a free service of assembling the pin header block to the Raspberry Pi Zero.
Check out zx-hd.bytedelight.com for more information.

4
Known limitations
The ZX-HD is not compatible with the (Eastern European) Pentagon ZX Spectrum clone;
The ZX-HD is 99.99% synchronous to the ZX Spectrum ULA, but some very fast so-called ‘border
effects’ may be just as bit out of sync;
The ZX-HD does not have audio over HDMI –check the “Adding sound” chapter for more info;
Although the latest ULAplus™status register can be read, it is currently not possible to read the
ULAplus™palette values, but there is no software that uses that feature (the games that use
ULAplus™only set the 64 colour palette) - we will integrate the feature in the future;
The ZX-HD ULAplus™implementation currently does not yet support Timex modes and HAM256
and HAM8x1 modes (which are all optional ULAplus™features);
The ZX-HD synchronous ULA functionality has not yet been tested or adapted to NTSC models of
the ZX Spectrum or Harlequin kits;
The ZX-HD seems to have issues with an Interface 1 attached; we’re analyzing the problem.
Interlaced Mode
The ZX Spectrum 128 models (the ‘toastrack’, grey +2, black +2A and +3) have 2 video memory
pages. The ZX-HD supports using these two video memory pages.
The ZX-HD even supports software that very quickly switches between these video pages to achieve
a so-called ‘interlacing’of two screen pages.
When the ZX-HD detects that screen pages change with every of 4 consecutive screen updates, it
automatically switches to ‘Interlaced Mode’. If no screen page change is detected during four
consecutive updates it will switch back to normal mode.
In the ZX-HD Interlaced Mode the number of displayed screen lines is doubled, hence the resolution
of the HDMI framebuffer is doubled, and the odd or the even screen lines are updated one after the
other. This results in the two different screen pages being displayed simultaneously.
One reason why the Interlaced Mode is not used permanently, is that the odd/even screen line
updates only refresh half of the screen content at a time: if there is a quickly moving object on the
screen, two different phases of the movement can be seen simultaneously which may result in a bit
odd look.
You can override the automatic Interlaced Mode in the cmdline.txt file on the micro SD card of the
ZX-HD containing the ZX-HD firmware. More information is found in that file.
DivMMC EnJOY! / DivMMC EnJOY! users
When connecting the ZX-HD with a DivMMC EnJOY! to a ZX Spectrum 128 ‘toastrack’, DIP switch 4
of the DivMMC EnJOY! needs to be switched OFF.
When connecting the ZX-HD with a DivMMC EnJOY! to a ZX Spectrum 128 ‘toastrack’, DIP
switch 3 of the DivMMC EnJOY! needs to be switched OFF.
Keeping this DIP switch ON will prevent the system from starting correctly with this setup.

5
Step-by-step guide to complete your ZX-HD before use
ByteDelight does not take responsibility for errors in this process - check the “In the box” paragraph
for a service in case you don’t want to perform these steps yourself.
1. Assembling your Raspberry Pi Zero
The first step is to solder the 2x20 male pin header block to the Raspberry Pi Zero at the side shown
in the photo underneath:
Carefully check all soldering contacts before assembling the Raspberry Pi on to the ZX-HD!
2. Mounting the top circuit board to the lower circuit board
The ZX-HD consists of 2 circuit boards to make it possible to ship the interface in a letterbox (instead
of a package, which would be a lot more expensive to ship).
Top circuit board with ‘ZX-HD’ text
Lower circuit board with serial number
Carefully insert the male pin header of the top baord into the female pin header of the lower board:
Result:

6
Make sure all pins are in the socket, minding the ‘key’ marked with the red rectangle in the above
photo. The connectors should be pushed together completely.
3. Mount the Raspberry Pi Zero
Now mount the pin header of the Raspberry Pi onto the female header on the top part:
4. Insert circuit boards into case
Slide the completed circuit boards into the ZX-HD case:
5. Close the case and insert SD card
Mount the back plate with the 4 included screws, and insert the SD card as shown on the photo:

7
Prepare your ZX Spectrum
Make sure the ZX Spectrum’s edge connector is clean!
It’s important that your ZX Spectrum has a clean edge connector when connecting any add-on to it
–many problems and even defects have been caused by dirty edge connectors in the past.
Advised is to use cotton swabs with pure alcohol.
Connecting the ZX-HD
Always disconnect the power from your ZX Spectrum
before connecting any interface!
Connect the ZX-HD to your ZX Spectrum carefully.
Connect the mini-HDMI plug from the HDMI cable, to the mini-HDMI socket of the ZX-HD.
Connect the other side of the cable to your TV.
Starting up the system with ZX-HD
Always first power on your TV before powering up your ZX Spectrum: the ZX-HD negotiates the
HDMI output resolution with the TV.
Next you can power up your ZX Spectrum, which should result in this boot screen in a few seconds:
At the top of the screen you see information about the automatically detected speed of your ZX
Spectrum which the ZX-HD calibrated itself to, and the Raspberry Pi speeds.
The “Mode:“ shows the output resolution and the mode, either:
ai: automatic Interlaced Mode (default)
fi: forced Interlaced Mode
fp: forced disable of Interlaced Mode
These options can be changed in the cmdline.txt file on the micro SD card of the ZX-HD.
At the bottom you see the message that the RESET button should be pressed to continue.
The ZX-HD has a reset button at the front.

8
Adding sound
The ZX-HD currently does not have sound over HDMI.
Separate analog sound
Many TV’s have the option of adding analog sound to an HDMI signal separately by a 3.5mm stereo
mini-jack input socket. Check your TV’s manual to find out if your TV has this function.
If so, you can use a mono or stereo mini-jack (some ZX Spectrums have a modified stereo output or
external stereo soundcard such as the ZX-AY) to stereo mini-jack cable.
Adding sound using external speakers
Of course a great solution to add sound to your ZX Spectrum with ZX-HD is by using an external set
of speakers.
Almost all speaker sets have a stereo plug. When using a mono audio output on your ZX Spectrum
(such as the MIC socket), this may result in only hearing the audio from one speaker.
To solve this, you will need to use something like an adapter cable or modify the speakers cable.
Firmware upgrades
There are two types of firmware on the ZX-HD:
The CPLD chip in the ZX-HD circuit boards
The firmware on the micro SD card for the Raspberry Pi Zero
Firmware on the micro SD card for the Raspberry Pi Zero
To know which firmware version you are currently using, simply boot up your ZX Spectrum with ZX-
HD and check the ZX-HD boot screen.
At zx-hd.bytedelight.com you can find the latest firmware version for the firmware on the micro SD
card, including upgrade instructions.
The CPLD firmware
The CPLD firmware won’t change quickly.
It’s not possible to upgrade the CPLD firmware without additional programming hardware.
ByteDelight offers a CPLD firmware upgrade service in case there is a potential future CPLD
firmware upgrade that creates new features.
If there is a new CPLD firmware version, it will be listed at zx-hd.bytedelight.com, including more
information about the CPLD firmware upgrade service.
Customizing HDMI output settings
It’s possible to modify the configuration of the ZX-HD by editing the configuration files on the
included SD card.
The HDMI color output can be set by the user, with the choice of a vivid color set (default), or one
that is calibrated to composite video output of the ZX Spectrum, or a custom set of colors.
More information is found in the cmdline.txt file on the micro SD card of the ZX-HD.
The config.txt file on the micro SD card of the ZX-HD can be changed for these settings:
-To stretch the video output to the dimensions of your display, e.g. 16:9
-To remove the small black border around the video output (this may however result in pixels not having
exactly the same width or height)

9
Troubleshooting
No picture and blue ZX-HD led stays off
It sounds as if there is a short-circuit: check the soldering contacts on the Raspberry Pi Zero.
No video output
Always first power on your TV before powering up your ZX Spectrum: the ZX-HD negotiates the
resolution with the TV.
If you do not get video output of your ZX-HD, this may be caused by a display or other HDMI device
that does not return EDID (Extended Display Identification Data) which is needed by the ZX-HD to
determine the output resolution settings.
However there are some ways of solving this by adding one or more of the below configuration sets
to the config.txt file on the micro SD card of the ZX-HD.
Try one set at a time and a combine them only if there is no result:
Set 1
# try to boot with maximum HDMI compatibility:
hdmi_safe=1
Set 2
# ignore EDID/display data if your display doesn't have an accurate EDID:
hdmi_ignore_edid=0xa5000080
Set 3
# force output resolution
hdmi_group=1
# and only one of these:
hdmi_mode=8 #240p
hdmi_mode=9 #240p 16:9
hdmi_mode=12 #240p quadrupling
hdmi_mode=13 #240p quadrupling 16:9
hdmi_mode=23 #288p 50Hz
hdmi_mode=24 #288p 50Hz 16:9
hdmi_mode=27 #288p 50Hz quadrupling
hdmi_mode=28 #288p 50Hz quadrupling 16:9
Other problems
Check the soldering contacts on the Raspberry Pi Zero.
Check zx-hd.bytedelight.com for more troubleshooting hints.

10
ULAplus™ is an extension to the original ULA specifications, developed by Andrew Owen.
The main feature is the possibility of showing 64 colors on screen at a time.
ULAplus™ is a trademark of Chloe Corporation. ULAplus™ is a royalty-free open format. The official
ULAplus™ specification is released under the Creative Commons Attribution-Share Alike License.
The official ULAplus™specification is found at:
facebook.com/notes/cheveron-group/official-ulaplus-specification/1348777308496825
Basic ULAplus usage
ULAplus™ports
ULAplus register port: #BF3B (48955)
ULAplus palette port: #FF3B (65339)
Enabling ULAplus™
OUT 48955,64: OUT 65339,1
With no palette set this will result in a black screen!
Disabling ULAplus™
OUT 48955,64: OUT 65339,0
Setting the 64 palette values
OUT 48955,[palette number 0..63]: OUT 65339,[palette value 0..255]
Find software with ULAplus™colours
You can find a lot of software that takes advantage of the ULAplus™features at these websites:
sites.google.com/site/ulaplus
abrimaal.pro-e.pl/zx/ulaplus.htm
These websites contain some very cool utilities, such as Image2ULAplus to convert e.g. JPG to
ULAplus™screen that can be shown on a ZX Spectrum with ZX-HD, or ZX Paintbrush to edit
ULAplus™screens.

11
zxspectrum.shop
ByteDelight produces several great and well-known products at zxspectrum.shop:
ZX-AY
Simple but useful stereo sound interface for any
ZX Spectrum
The Harlequin kit
Complete ZX Spectrum DIY kit
without original ULA but with parts that can be
currently obtained at electronics stores

12
The DivMMC EnJOY!
The #1 bestselling ZX Spectrum add-on at this
moment - with 2 SD card slots and joystick
interface!
The DivMMC EnJOY!
The smallest SD card interface with full size SD
card slot
K-Mouse Turbo
Connect a modern mouse to your ZX Spectrum
and play dozens of supported titles!
Joystick adapter & tester
Connect a standard Atari compatible joystick to
your ZX Spectrum +2 / +2A / +3 and be able to
test your joysticks!
Speccy Breadboard
Experiment with hardware on your ZX Spectrum
with this starter kit!
The Dual Floppy drive set
Relive the nostalgia of the floppy disk era!
(to use with appropriate floppy disk interface)
ByteDelight.com
Table of contents