ZX-Uno FAQ

About this FAQ

avatar Uto This FAQ es manteined by @uto_dev, based in several questions & answeres found in several forums.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

INDEX

ABOUT ZX-UNO

Which are the additional features provided by ZX-Uno Spectrum Core?

The ZX-Spectrum core is able to completely emulate the ZX-Spectrum 48K, 128K and Pentagon models, not just by using different ROMs but also mirroring their differences at hardware level. Also, it implements the following features:

  • DivMMC with support for ESXDOS
  • PS/2 keyboard interface
  • ULAPlus
  • Timex HiColor and HiRes modes
  • Radastan mode
  • Raster interrupt
  • AY sound chip
  • Second AY sound chip (TurboSound)
  • Kempston mouse
  • Turbo modes x2,x4 and x8 (7Mhz, 14Mhz and 28Mhz)
  • Composite video output
  • VGA and RGB output (via adapters)
  • EAR input to load software as in a standard ZX Spectrum
  • Joystick port, can be set up to work as Kepstom, Sinclair, Protek or Fuller interfaces
  • SpecDrum interface support
  • Stereo/Mono sound control

Which other features does ZX-Uno have?

ZX-Uno can be upgraded and new versions of the Spectrum core can be loaded into the system. Also, ZX-Uno has room for 8 cores more (up to 45 if your ZX-Uno has the large flash chip), that can be chosen from a wide list of them:

  • Commodore 64
  • Amstrad CPC 464
  • TTBlue/ZX Spectrum Next
  • Sam Coupé
  • Jupiter Ace
  • BBC Micro
  • Acorn Atom
  • Acorn Electron
  • Vic 20
  • Atari 800XL
  • Sega Master System
  • Nintendo Entertainment System (NES)
  • Atari 2600
  • Apple II

Is there any ZX-Uno emulator?

Yes, ZesarUX supports the ZXUno BIOS and Spectrum CORE and may be used for testing and development.

INSTALLATION AND GAMES

How to set up my ZX-Uno and SD card?

Usually your ZX-Uno maker would provide your some instructions about how to do it. If that is not the case, ask him/her. Anyway what's needed to get your system ready are having a SD card formatted with FAT32 or FAT16, several tap/z80/sna files, and connect it to the TV set via composite video connector. Also you will need to add ESXDOS files in the card, but you will need to know which version of ESXDOS has your ZX-Uno installed, so files in the SD card match firmware in the ZX-Uno flash memory (that¡s why you better ask he one who made it).

As most ZX-Uno currently built come from the crodwfunding campaign, or are made by some of the ZX-Uno member, there is a big chance that the file in link "Archivos de ESXDOS para la tarjeta SD" at the spanish instructions page for backers will be valid for your ZX-Uno, if not, ask your manufacturer for ESXDOS version and overwrite those files with the proper ESXDOS version files. Overwrite and not replace, so you keep some ZX-Uno specific commands that come with the backers package.

Is recommended to format your card with FAT32 format as there are more cores using FAT32 than FAT16. We also recommend you to format the card even when it comes already formmated, just to make sure it's not formmated with NTFS or exFAT.

But... what is ESXDOS?

ESXDOS is an operative system for DivIDE and DivMMC, that is, for disk interfaces for ZX-Spectrum. ESXDOS includes commands to handle the filesystem such as some UNIX OS, although to use them from basic you'll have to precede them with a dot, for instace ".ls", ".cd",".mv", etc.

Also, ESXDOS includes and NMI handler, an application that loads when we press the NMI keys in our keyboard (see next section).

ZX-Uno implements DivMMC exactly as is, so it supports and behaves exactly the same than a real DivMMC interface.

How to load games from SD card?

Once the games are in the SD card and ESXDOS is working (check you see ESXDOS logo at bootc time and you see your SD card detected in that same screen) tuu will just need to generate an NMO (Ctrl+Alt+F5) to access a menu where you can use cursor keys to move aroung and load Z80, SNA and TAP files.

When I press NMI (Ctrl+Alt+F5) my ZX-Uno reboots

Most common causes of this issue are:

  • Your ZX-Uno didn't detect your SD card. Check ESXDOS boot screen for card detection and make sure is FAT formatted.
  • Files in your SD card don't match ESXDOS version inside the ZX-Uno board. Check with the maker of your ZX-Uno.

When I press NMI (Ctrl+Alt+F5) I hear a beep and nothing happens

Your SD card doesn't have the ESXDOS files required to work.

Can I make an snapshot while playing a game and come back later?

Yes, the NMI menu (Ctrl+Alt+F5) has an option so when you press "S" it saves an snapshot in the current folder. First snapshot will be named SNAP0001.SNA, second SNAP0002.SNA, etc.

Sadly, when ZX-Uno is rebooted, ESXDOS looses count on snapshot counter, so next time we try to save will try to save SNAP0001.SNA again and fail cause it already exists. In those ases just press S until you get a message saying snapshot has been saved.

Please notice SNA format is unable to store information other than the one in a real ZX Spectrum, so if the game you are playing is using a non standard mode (Times, Radastan) is likely you will lose that video mode and snapshot becomes non usable.

Game X doesn't work

There may be different reason for a game not working, some incompatibilities are well known from DivMMC interfaces, and there are a few as well that are proper ZX-Uno incompatibilities. These are some well known cases:

  • Some 48K games doesn't work if you've booted a 128K Spectrum: just type OUT 32765,48 or load this tap file that contains OUT 32765,48 before you load the game.
  • Some games doesn't load well, specially some games made with "La Churrera" engine. Try this POKE 23388,16 before loading the game, or load this other tap file that contains POKE 23388,16. Las ESXDOS version to this date (23/9/2016), 0.8.6 beta 5.1, contains a patch able to handle this issue, but is not tested in depth and most ZX-Uno built so far don't have that version installed.
  • Some games (i.e. Mad Mix game) seem too loose color information: try these outs before playing: OUT 64571,15 : OUT 64827,7 or use ZXUC to deactivate Timex modes. There is another option: deactivating extended graphic modes directly from the BIOS but that will make games using those modes to fail (Radastan, Timex or ULA Plus). Fourth and last option is having a ROM specifically set up to deactivate these modes, and use it at boot time when needed (see below).

When I boot I see ESXDOS prints a message about RTC.SYS ERROR

Forget about it. ESXDOS supports DivMMC interfaces with an RTC clock, ZX-Uno is not one of them, but ESXDOS (and ZX-Uno) can work without the RTC clock.

How can I choose which ROM to boot when starting ZX-Uno?

Press Esc when the ZX-Uno logo is shown. If you want to change the default ROM you can do it in the BIOS (see 'configuration' section).

Can I "poke" a game?

Yes, you'll have to boot using the "cargandoleches" ROM.

Using that ROM you won't be able to use the ESXDOS NMI menu so after pressing break after boot you'll have to use dot commands.

To load a tap file move to the folder where the tape file is using CD:

.cd <folder>

then load the game like this:

.tapein <tap file name>
LOAD ""

Once the game is loaded, if you press NMI (Ctrl+Alt+F5) you'll find a field in the upper left corner where you can enter the POKE address, press intro, then the POKE value, press intro again. Once the poke is done, you can enter another address/value pair or just press intro straight ahead when asked for a new address to return to the game.

Note: as of November 1st, 2017, there is a new NMI manager in development, which allows POKEs easily (just press launch NMI when game is running, press P and you can poke). As it is in development, I'm just linking to the thread in the ESXDOS forum where it is announced, so you can check and get latest version:

http://board.esxdos.org/viewtopic.php?id=94&p=6

To replace current NMI handler with this new one just rename NMI.SYS file in SYS folder to NMI.OLD, and extract new handler, including "NMI" folder in that same forder (/SYS)

How can I choose core at boot time?

Your ZX-Uno will run Spectrum core by default, but if you press caps lock when the ZX-Uno logo is displayed you will get the core list. Please notice some cores are VGA only, so if you are using composite video you'll se nothing if you choose them. You can also boot cores in slots 2 to 9 by pressing keys 2 to 9 on boot screen.

Can I choose core once I'm at Spectrum BASIC promt?

If you know the slot the core is at, yes. Just type ".core n", where n is core slot number.

How can I reboot my ZX-Uno?

  • Soft reset : Ctr+Alt+Del
  • Hard reset : Ctr+Alt+Backspace

CONFIGURATION

How can I enter BIOS?

Just press F2 when the Zx-Uno log is shown.

How can I choose the default ROM?

Enter the BIOS, go to ROMS menu, press enter on the one you prefer, choose set active. Make sure you save changes before leaving the BIOS.

How can I choose the default core?

Enter the BIOS, go to BOOT menu, press enter on the chosen core, reboot.

But I choose a 128K model and it runs in 48K mode!

That is a common behaviour when a DivMMC device is active, even in standard Spectrums, it will run with 128K, but on "USR 0 mode", using 48K ROM. There's nothing you can do about it if you want to uses DivMMC.

Ok, but I want to see +3DOS or do some programming on 128K mode.

You have two options:

  • Enter the BIOS and change the "DivMMC" setting from "auto" to "disabled", but all ROMs will have then that setting disabled and you'll be unable to run anything from SD card.
  • Create and install an specific 128K ROM with DivMMC diabled. See the question about installing ROMs below.

Which options can be changed in the BIOS?

As of today, with BIOS v0.70 (14/2/2018):

  • Choose keyboard type (Issue 2/Issue 3)
  • ULA timing (48K, 128K, Pentagon)
  • Contended memory Yes/No
  • DivMMC Yes/no
  • DivMMC NMI Yes/no
  • Keyboard layout EN/ES/Spectrum
  • DB9 Joystick: Kempston, SJS1, SJS2, Protek or Fuller (also QAOPSPCM protocol from bios 0.70 and core EXP26 on)
  • Keyboard joystick:: Kempston, SJS1, SJS2, Protek or Fuller
  • Video: PAL, NTSC o VGA
  • Scanlines for VGA Yes/no
  • Frequency
  • Turbo modes x1, x2, x4 and x8
  • Disable/Enable advanced graphic modes (ULAPlus, Timex, Radastan)

Also, the BIOS has options to upgrade ROMS, perform memory tests, keyboard test, tape tests, upgrade firmware (BIOS), upgrade ESXDOS, install cores, etc.

Can these options be changed when we are already at BASIC prompt?

Most of them can. There are some commands as.JOYCONF, .KEYMAP or .ZXUNOCFG, you can run them wihout parameters to see what they do.

You also have ZXUC, a graphic interface to chnage many options.

Finally you can change most setting just by issuing some OUTs, altering MASTERCONF, DEVCONTROL and DEVCTRL2 registers, that you can see at the list of ZX-Uno registers.

Please notice any change made from BASIC will be lost on next hard reset or power off

.joyconf, .zxunocfg , etc. doesn't work, command not found

You'd probably installed ESXDOS files from an standard ESXDOS package, ask your ZX-Uno maker for a complete package or ask in the ZX-Uno forums for them.

SCREEN AND DISPLAYS

Composite video or VGA?

You'll get best quality with VGA, but many VGA display units won't work at 50Hz so your ZX-Uno Spectrum core would run faster unless you can choose 50Hz in your display unit. Also some cores like the NES core just work with VGA.

On the other hand you won't need an adapter to use composite video, but image quality is worse.

Composite video or RGB?

In the end they come from same source, but if you can get an RGB to SCART/Peritel/Euroconnector cable (ask i the forums) you'll be able to see your Zx-Uno just as with VGA.

How can I switch to VGA mode?

Connect the adapter cable, and press scroll lock key. If you can see the screen, reboot, press F2 continuosly to enter the BIOS, and press scroll lock again. Go to advanced options and choose VGA and 60Hz frequency.

Nevertheless, maybe your display unit supports VGA at lower rates so you can use .zxunocfg or ZXUC to try to reduce frequency until you find one your display unit supports, then go back to BIOS and set it up permanently.

The smaller frequency you use, the better, as increasing frequency also increases ZX-Spectrum speed.

I have changed video mode and I can't see anything on screen.

Reboot ZX-Uno and press F2 all the time to make sure you enter the BIOS even when you cannot see it. Then press Scroll Lock key until you can see the BIOS. Change settings again to set a mode you can use.

UPDATES

What are updates and which ones I can perform?

Your ZX-Uno will allow you to upgrade:

  • BIOS firmware
  • Cores
  • Spectrum core ROM list. Only this ROMs can be altered, other cores have their own ROMs within the core itself.
  • ESXDOS, the SD card operative system.
  • All ZX-Uno flash, including ESXDOS, ROMS, CORES and el firmware

Which is my firmware/BIOS version and how can I update it?

In the ZX-Uno boot screen you would be able to see "ZX Uno BIOS v0.xx". Up to today (23/09/2016) latest version is 0.55.

To upgrade it ask in the forum for location for he latest FIRMWARE.ZX1 file./p>

Note: updating the firmware (BIOS) is dangerous, don't do it if it's not necessery, and if you do it try to have your ZX-Uno plugged in to some UPS or battery sustained power source (as a laptop USB connection).

Once you have the file, save it in your SD card root folder, turn on your ZX-Uno and enter the BIOS pressing F2, go to Upgrade menu and choose "Upgrade BIOS for ZX", then "SD file". Once the BIOS reports upgrade is done, power off/on your ZX-Uno, you're done.

You must not get surprised if the progress bar doesn't fill completely. Progress bar is for the whole flash memory and firmware/BIOS uses just a small part.

How can I upgrade and install cores?

Your ZX-Uno has nine slots for cores, being the first one (#1) reserved for the ZX-Uno Spectrum core. All cores are updated the same, but the Spectrum one. You will need a file named COREn.ZX1, and rename it to CORE2.ZX1, CORE3.ZX1, etc. depending where you want to place that core at (which slot). To find latest COREn.ZX1 version of each core, you better ask in the forums.

Just put the file in the SD card, enter the BIOS, got to Upgrade meno, choose the slot for the chosen core, and prese enter, then "SD file". You'll get a message saying core has been installed and asking you for a name to show in the core list.

You must not get surprised if the progress bar doesn't fill completely. Progress bar is for the whole flash memory and firmware/BIOS uses just a small part.

How can I upgrade Spectrum core?

Exactly like the other core, but you'll need SPECTRUM.ZX1 file instead of CORE1.ZX1 file. Ask for latest version in forums.

Note: updating the Spectrum core is dangerous, don't do it if it's not necessery, and if you do it try to have your ZX-Uno plugged in to some UPS or battery sustained power source (as a laptop USB connection)

How can I delete a core?

You can't. Just rewrite another one over the same slot or rewirte it and enter an empty string when asked for name.

How can I upgrade ESXDOS?

You'll need ESXDOS.ZX1 file, ask in ZX-Uno forum for the latest one, or just rename the file esxmmc.bin from ESXDOS to ESXDOS.ZX1.

Then put the file in SD card root folder, go to BIOS, choose upgrade menu "Upgrade ESXDOS for ZX", then "SD file" and wait for confirmation. Then you'll have to replace BIN and SYS folders in your SD card with the files for the version you have already installed. But don't erase the folders, just overwrite them to avoid loosing the ZX-Uno specific commands.

You must not get surprised if the progress bar doesn't fill completely. Progress bar is for the whole flash memory and firmware/BIOS uses just a small part.

How can I change/update Spectrum ROM list and parameters?

There are two options:

  • Get a tap file for each ROM and from the "ROMS" section in the BIOS press N for a new ROM, and play .tap file from EAR input. Take into account ROMS get up to 4 slots,so if you have a 16K ROM you'll use an slot, but a 32K ROM will use two, etc. Make sure you don't overwrite other ROMs when inserting a new one. If you want to replace a ROM you first have to choose it and select "delete", then add a new one.
  • Generate a file with all your ROMs using ZX1RomPack application, that also allow you to add some setting to those ROMS - as ULA timings, DivMMC enabled/disabled, etc. If you use that tool you'll end up saving a ROMS.ZX1 file, that you'll have to put in your SD card. Then you have to boot ZX-Uno using a specific ROM, the one named "rooted", and once you are at BASIC prompt, type ".romsupgr". There is another ESXDOS command (.romsback) that do the opposite, save the ROMS into our ZX-Uno to a ROMS.ZX1 file. You can get the ROMS you have installed, then use ZX1RomPack to modify it, then save them again with .romsupgr

Since BIOS 0.65 you boot any ROM in rooted mode, just by pressing slash (/) on boot screen and then choosing a ROM (or just let the default one go). You'll see the border flash in blue so you know it has been set to rooted mode.

Can I generate my own tap files to change ROMs?

Yes, use GenROM utility, ask in the forum for latest version. You can run it without parameters (is a command line executable) to know which parameters can be added. Check ZX-Uno register list if you have any doubts.

Is ther any ROM exactly like an specific Spectrum model?

No by default, most of them come with ULAPlus, Timex, DivMMC enabled, even AY sound on 48K Spectrum.

But if you want you can create your own ROM and set the setting you prefer, what can allow you to create a ROM/Settings exactly like a 48K Spectrum.

Can I backup my ZX-Uno flash?

Yes, boot with the "rooted" ROM, and when on ZX1 basic prompt, type ".BACKUP". You can restore that from BIO menu "Upgrade flash from SD"

OTHER CORES

Can I cange other cores ROMS? Sam Coupé one for instance?

No, other cores ROMs are saved inside the core.

How does the Sam Coupe core work?

To load a game, from the coloured bands screen press 7 in numeric keyboard (F7 in Sam's keyboard) or just type LOAD "" to load from EAR input.

How to make Sega Master System core work?

You'll just need some games in .SMS format. When the core boots you'll get a file browser.

If your card is not visible, try another one.

Not all SMS games are working, if one fails, try another.

Pressing F12 you'll get to file browser, pressing Pause pauses the game.

How to make NES core work?

Just put some .NES files in the SD card.

Not all games work, if one fails, try another.

Important: this core is VGA only

How can I make te TTBlue/ZX Next core work?

You need the same COREn.ZX1 file. Also you need to install these files from TTBlue firmware in the SD card.

But the file linked has too many folders, you only need to extrac, from SDCard folder, TTBLUE and TMP folders, amd TTBLUE.FW file. That will allow you to boot, but if when in basic you press F10 and a reset ahppens, and/or any ESXDOS command returns "Nonsense in BASIC", then your core and your SD card doesn't have same ESXDOS version. If that happens, find the ESXDOS zip file for the ESXDOS version installed into your ZX-Uno (ask manufacturer) and get esxmmc.bin file from it. Then rename it as esxmmc.rom and put it into the TTBLUE folder replacing the one inside.

How can I make Jupiter Ace core work?

No special setup is need, just load games via EAR input.

How can I make Sam Coupé core work?

No special setup is need, just load games via EAR input.

How can I make BBC Micro core work?

Format your SD card with slow format, prepare a BEEB.MMB in your root folder using MMBImager and add it as first file in the card before adding anything else.

using PgUp, PgDown you change from VGA to composite mode, Shift+F12 shows file browser, F12 resets.

How can I make Acorn Atom core work?

Format card as FAT and put these files for the Acorn Atom core in root folder.

Shift+F10 shows file browser, F10 resets, F1-F4 chooses turbo mode.

Important: this core is VGA only

How can I make Acorn Electron core work?

PENDING

PgUp, PgDwon chooses VGA/Composite, F10 resets.

How can I make Colecovision core work?

PENDING

How can I make the Atari 2600 core work?

Just press Esc to show menu.

Important: VGA only

How can I make the Apple II core work?

PENDING

Important: VGA only

How can I make the Vic 20 core work?

PENDING

Important: VGA only

How can I make the Atari 800XL core work?

PENDING

Are there cores for Amstrad CPC or MSX?

As of today (10/4/2017) there are already cores for CPC464 and MSX1. Please check details on the forums.

Are there any arcade machine cores?

Yes, have a look at this forum thread about arcade cores.

PROGRAMMING THE ZX-UNO

What specific features does the Zx-Uno have?

Your ZX-Uno has many new features, some inherited from other interfaces implemented inside its core, other are features inherited from old clones, or completey new features for a ZX-Spectrum (Radastan mode or raster interrupt). This is a list of those features not present in the original ZX-Spectrum:

  • Timex HiRes and HiColor graphic modes
  • Radastan graphic mode
  • ULAPlus
  • Raster interrupt
  • Kempston mouse
  • AY chip Sound
  • TurboSound (second AY chip)
  • SpecDrum interface
  • Stero/Mono audio control
  • EXSDOS and SD card access
  • Turbo modes: CPU boost
  • Extra memory

How can I detect a ZX-Uno?

In case you are going to use a ZX-Uno feature it's always better trying to detect that feature specifically, so your software has a chance of running in other machines supporting the same feature. In case that is not possible you may not be able to detect the feature directly, and so you may need to detect the ZX-Uno itself.

To detect a ZX-Uno, a better option is to access the COREID register. To do that, you need to know that this register returns an ASCII string, one char per reading, and never returns values lower than ASCII 32 or greater than ASCII 127. If an out of range value is returned, or an empty string is returned, then it's not a ZX-Uno.

This code checks for a ZX-Uno:

10 OUT 64571, 255
20 LET A$=””
30 LET A= IN 64827
40 IF (A < 32) OR (A > 127) THEN GOTO 60
50 IF (A <> 0) THEN LET A$ = A$ +CHR(A): GOTO 30
60 IF (A$=””) GOTO 80
70 PRINT IT'S A ZX-UNO”: STOP
80 PRINT “IT'S NOT A ZX-UNO”

And how do I determinte if the user has an updated core version I need in order to use a feature only included from that core version on?

Easy, COREID format is LABEL-DATE, for instance T24-03122016 or EXP25-01092017. The label has no use, as original cores had T22, T23, etc. as label, but latest published today is experimental and is labeled EXP25, and ZesarUX emulator shows Z22 instead of T22. However, the date after the hyphen is much clearer (DDMMYYY format) and you just have to check the user has installed a core version whose date is equal or more recent than the one the first core that included your required feature had.

Which graphic modes are supported by ZX-Uno

The ZX-Uno supports four different graphic modes:

  • Standard ZX Spectrum mode: 256x192 pixels, with a paper/ink/bright/flash attribute per each 8x8 pixels block.
  • Timex HiColour mode, 256x192 pixels, with a paper/ink/bright/flash attribute per each 8x1 pixels block.
  • Timex HiRes mode, 512x192 pixels, with just one INK and one PAPER colour for the whole screen. No colour clash (as it's monochrome).
  • Radastan mode, 128x96 pixels, linear, 16 colours per pixel, no colour clash.

Also, and thanks to ULAplus, it is possible to change colour palette, and get up to 64 colours on screen at the same time.

The ZX-Uno will boot using the standard ZX Spectrum mode, but we won't talk about it as it's well known. About the other modes, you need to take into account that Timex computers allow having two memory banks for the screen, that can be switched when needed. First bank is located at the usual memory address (0x4000 or 16384) and is named Screen 0, while the second one is located at 0x6000 (24576) and is named Screen 1. When using the standard mode we can use that feature of switching banks to change the content on the screen fast, having a second screen ready at 0x6000 and commanding ZX-Uno to change to 0x6000, then we can prepare another screen at 0x4000 and switch back to 0x4000, etc. We will see later how to switch from Screen 0 to Screen 1 and vice-versa.

HiColour mode uses the standard screen memory (Screen 0) to define the pixels in the screen, using the usual 6144 bytes to do that, but the attributes, instead of being located right after the pixels, to complete the usual 6912 bytes, are located in the Screen 1 zone. Attributes are placed exactly like the screen pixels are defined, first row first, then 8th row, etc.

HiRes mode uses both zones, Screen 0 and Screen 1, alternating each one per each column. That is , first column is in Screen 0, second in Screen 1, third in Screen 0, etc. In this mode all colours, including border, are with bright active (BRIGHT 1), and border colour is the same as the paper colour. Both screen parts use 6144 bytes each.

One way to see that is the following program:

10 OUT 255,6
20 FOR n=0 TO 6143
30 POKE 16384+n,255:POKE 24576+n,0
40 NEXT n

Per each line, every second columns is 11111111 and 00000000 alternatively.

Radastan mode is a linear mode that uses just Screen 0, using each byte to define the colour of two pixels. This make up of this byte is defined (in binary) like this:

[AAAABBBB]

It means the leftmost pixel uses colour AAAA and rightmost pixel uses colour BBBB. The whole screen uses 128x96/2 = 6144 bytes again.

How to activate Timex HiRes & HiColor modes?

Timex modes are both activated using port 0xFF (255). What you write to that port, is handled like this:

Bits 0-2: Mode: 000=classic at screen 0, 001= classic at screen 1,
                010 = HiColour, 110=HiRes, other values are not valid

Bits 3-5: Only for HiRes mode, defines PAPER & INK
              000 – Black on white       100 – Green on magenta
              001 – Blue on yellow       101 - Cyan on Red
              010 – Red on cyan          110 – Yellow on blue        
              011 – Magenta on green     111 – White on black    

Bit 6:    If set, disable timer interrupt

Bit 7:    Select which bank to use by the horizontal MMU 0=DOCK, 1=EX-ROM.

Knowing that, the command required to activate HiColour is OUT 255, 2, and for HiRes is OUT 252, 6 – this will activate HiRes with black on white colour combination.

About the two upper bits, it's beyond the scope of this manual to fully describe them, so unless you know what you are doing, set them both to 0.

There is an alternative method of activating Timex modes using ULA, you can check how to do it, together with some other ULAplus features that we will explain later, here: http://faqwiki.zxnet.co.uk/wiki/ULAplus

Since BIOS 0.55 it is possible to completely disable these modes, making impossible to set them active. That was done cause some games activated those modes by mistake. To avoid that, you can add OUT 64571,15: OUT 64827,0 at the beginning of your game, to make sure the extra modes are not disabled.

How can I activate the Radastan mode?

The Radastan mode is for the time being exclusive to ZX-Uno. It is a low resolution mode that doesn't have attribute clash. To activate radastan mode, using the RADASCTRL ZX-Uno register is needed (0x40, or 64). This is the sequence to activate it::

OUT 64571,64
OUT 64827,3

To go back to the previous mode, the second OUT value should be 0.

Notes:

  • the first version of the ZX Spectrum core used another method using the ULAPlus register. To avoid future incompatibilities that method has been removed.
  • Radastan mode uses first 16 colors in ULAPlus palette, and that palette defaults to all colors black, so in order to be able to use the mode you have to set the palette (see below in this FAQ how to do that).
  • Since BIOS 0.55 it is possible to completely disable these modes, making impossible to set them active. That was done cause some games activated those modes by mistake. To avoid that, you can add OUT 64571,15: OUT 64827,0 at the beginning of your game, to make sure the extra modes are not disabled.

There is a library for Z88DK ready to use the Radastan mode, the latest version so far can be found by following this link to the ZX-Uno forum.Also, a Radastan mode library has been developed for ZX Basic

What about hardware scroll in Radastan mode?

Radastan mode supports hardware scroll, what means memory mapped screen may be larger than actual screen, and let only a window visible in your display unit.

To control scroll there are two ZX-Uno registeds: RADASOFFSET and RADASPADDING. RADASOFFSET holds a 16 bit value that sets the offset from video address ($4000, or C000 if we are using the shadow screen) where ZX-Uno will start reading screen data. For instance modifying it in 64 steps will produce verticall scroll.

RADASPADDING holds number of bytes that should be used per line, starting by 64 (that is, a value of 0 means 64 bytes, 1 means 65, etc.) So if you for instance write 1 to that register, it means 65 bytes, what leads to ZX-Uno reading only 64 bytes every 65 to paint the screen, leaving 1 byte hidden/unused per line (what in radastan mode is two pixels). That allows horizontal scroll using RADASOFFSET to move one byte left or right. The larger RADASPADDING value is, the more bytes are hidden.

Keep in mind RADASOFFSET works only on a 16K page, if RADASOFFSET value makes screen be further than a 16K page, then ZX-Uno will start reading again at the beginning of that page (it's circular)

RADASOFFSET register is #65, and to write the 16 bit value you have to write to the register twice, first the less significative byte, then the most significative byte:

OUT 64571,65
OUT 64827,LSB
OUT 64827,MSB

Register RADASPADDING is #66, and you can write it like this:

OUT 64571,66
OUT 64827, value

Can I use different palette banks from ULAPLus in radastan mode?

Yes, since core EXP25 you can use register RADASPALBANK, number 0x43 (67). Only three lower bits are used.

ULAPlus palette has 64 colors, and radastan mode uses first 16 entries in the palette by default, but using bits 1 & 0 when can choose which block we use out of four. First blocok is 0, and there are three other 16 color blocks, 1, 2 and 3. So first bank is used by default (value 00) but you can chose others setting those bits to binary 01, 10 o 11.

Bit 2 says which half of the currently selected bank is used for BORDER order, so a value of 0 means entries 0-7 of current bank are used, and value of 1 means entries 8-15 are used. That doesn't mean entries 0-7 or 8-15 from the whole ULAPlus palette, but from the current selected palette, so BORDER 7 when thos three bits are 0, means entry 7, but BORDER when value is 111 means entry 64 (entry 15 of last bank selected by 11).

Please notice that using raster interrupt you can use more than 16 colors in Radastan mode by changing palette bank while the screen is being drawn.

How to switch screen page using Timex/Radastan modes?

As said above, it's possible to switch between Screen 0 and Screen 1, just selecting mode 000 or 001 on port 255, that is, use OUT 255,0 to choose Screen 0 at 0x4000, and OUT 255,1 to choose Screen 1 at 0x6000.

As the Timex modes and the radastan mode are independent of each other, you can also switch between two screens in radastan mode using the same OUT commands.

Going further, this paging system combined with bit 3 of port 0x7FFD, in case 128K paging is active, allows a total of 4 screens (Screen0, Screen1, Screen2 and Screen3) located at 4000h, 6000h, C000h and E000h.

Radastan mode does also support hardware scroll, meaning the memory mapped screen may be larger than the real screen, and then just show a window of that larger screen in the real screen.

How to change the ULAPlus palette?

UUsing ULAplus we can use a 64 colour palette, but first we need to change to 64 colour mode like this:

OUT 48955, 64
OUT 65339, 1

Then we can modify each palette entry (0-63) assigning the colour X like this:

OUT 48955, n
OUT 65339, x

X is an RGB representation in 8 bits: GGGRRRBB. That is, 3 bits are used for green, 3 for red, and 2 for blue (the human eye is less sensitive to the colour blue)

The 64 bit palette is grouped in 4 groups of 16 colours, 8 for INK and 8 for PAPER (so INK and PAPER colours should not be the same ones). When you want to choose a colour for a specific 8x8 block the colour chosen depends on flash/bright/ink/paper like this:

Spectrumcolor01234567
Flash off
Bright off
Ink01234567
Paper89101112131415
Flash off
Bright on
Ink1617181920212223
Paper2425262728293031
Flash on
Bright off
Ink3233343536373839
Paper4041424344454647
Flash on
Bright on
Ink4849505152535455
Paper5657585960616263

Although in theory that would allow us to have 64 colours on screen at the same time, the truth is you only can do it if you paint bars, because it's impossible to use the INK colour from one group together with the PAPER colour from the other group.

We can redefine the palette for all modes mentioned above (standard, HiColour, HiRes and Radastan)

For radastan mode, the first 16 colours in the palette will be used to show the 16 available colours. At the time of writing this document, there is a plan for radastan mode to use colour #17 in the palette for the border, but that feature is not included in the current ZX Spectrum core version.

How does raster interrupt work?

The ZX Spectrum generates an interrupt with a frequency of 50Hz that is synchronized with the vertical retrace of the screen. This has often been used to make various graphic effects.

The ZX-Uno expands on this and allows activating what is called a “raster interrupt”. This new interrupt is generated at any selected screen line.

To use this interrupt, ZX-Uno registers RASTERLINE (0x0C) and RASTERCTRL (0x0D) should be set up first. The value in RASTERLINE combined with a 9th bit contained in the RACTERCTRL register will tell the ZX-Uno which line it should generate the interrupt on. This line is relative to the screen line where the paper area starts. The interrupt will be triggered when the hardware is about to paint the first pixel in the right border of the previous line to the one selected. This allows time for a machine routine to run before the hardware starts generating the screen output of the next line of the paper area.

For example, if the RASTERLINE value is 0 and RACTERCTRL register is 6, it will be triggered when the right border of the line just above the paper starts to be painted. If you want the interrupt to be triggered for line 257, set RASTERLINE to a value of 1 and set RACTERCTRL to a value of 7.

RACTERCTRL register is defined like this:

INT0000DISVINTENARINTLINE8

INT: this bit is read only. Its value is 1 during the 32 clock cycles after the raster interrupt has been triggered. This bit is available even if the processor has interrupts disabled. It is not available if ENARINT is 0.

DISVINT: set to 1 to disable the original maskable interrupts for the vertical retrace (standard ULA interrupt). After a reset this bit is reset to 0. So by default, standard ULA interrupts are enabled.

ENARINT: set to 1 to enable maskable interrupts produced by the raster interrupt. After a reset, this bit is reset to 0.

LINE8: Contains bit 8 (the MSB or the 9th bit) for RASTERLINE. This bit combined with RASTERLINE (register 0x0C) enables a value to be set between 0 and 511 inclusive. This defines the line where the interrupt occurs. Any value between 0 and 511 can be stored, although useful values are limited by the number of lines generated by the ULA (311 in 48K mode, 310 in 128K mode, 319 for Pentagon clone). If a value over the limit is set, the raster interrupt will never be triggered.

As you can see, to enable raster interrupt you need to explicitly activate it using ENARINT, and also when you do that, it’s normally common practice to disable the original interrupt with DISVINT. Unless we have a machine code routine that requires both of them to generate a special effect.

Raster interrupt may be used to make very advanced colour palette combinations, because although there are only 64 palette colours in the ULAPlus, nothing prevents us from changing them using the raster interrupt, allowing actually to use up to 64 colours per line.

It's even possible to switch video mode while the ULA is painting the screen, so it's actually possible to have half the screen in one mode and half the screen in another mode. Imagine for example a text adventure using HiColour for the upper part of the screen for a picture, and HiRes for the lower part for the text.

How to activate turbo modes?

The ZX-Uno is able to run the CPU at 7 or 14MHz as well as the standard 3.5MHz. To activate those frequencies, modifying the Zx-Uno SCANDBLCTRL (0x0B) register is required.

If you just want to test it, just change speed from the BIOS or use ZXUC after the ZX-Uno has booted. There is a chance that with some BIOS versions you find a 28MHz mode, but in that case take into account that this is an experimental mode that may not work well in a real ZX-Uno.

In order to boost your software speed, have a look at how the 0X0B register is configured (leftmost bit is bit 7)

TURBO0FREQENSCANVGA

Bits 7-6 set up turbo mode, where 00 is for 3.5 MHz, 01 for 7 MHz, and 1x for 14 MHz.

It may look like setting the register to 0 sets normal mode, 64 for 7MHz and 128 for 14MHz

OUT 64571,11      (0X0B)
OUT 64827,128

But actually, you have to take into account that bits 0-1 control the way the output to screen is handled, controlling the VGA or PAL connection. So it is best to leave those settings, and also the FREQ setting as they are. Otherwise you may mess things up so that it is not possible to see anything on the screen.

The best way to set turbo mode is first read the current value from the register:

OUT 64571,11   (0X0B)
LET VAL = IN 64827,128

Then clear bits 6-7 (you can do that with AND 63 in assembler, but as Sinclair basic doesn’t have a bitwise AND operator you can do it like this:

IF (VAL>=128) THEN LET VAL=VAL-128
IF (VAL>=64) THEN LET VAL=VAL-64

And finally add 0 for normal mode, 64 for 7MHz or 128 for 14MHz, and modify the register again:

LET VAL=VAL+64
OUT 54571,11
OUT 64827,VAL

How to handle mouse?

The ZX-Uno implements a Kempston mouse interface via the PS/2 connector, where we can connect a PS/2 mouse using a splitter (so we can connect keyboard too).

Mouse data is obtained by Reading several ports:

PuertoHexValue
64479FBDFHorizontal Position(X-axis)
65503FFDFVertical position (Y-axis)
64223FADFButtons status (bitwise)

That way, PRINT IN 64479 will return the X-Axis value.

Value of port 64223 can be decoded like this

BitContent
0Zero if right button pressed.
1Zero if left button pressed.
2Zero if middle button pressed.
3Zero if 4th button pressed.
4 to 7Return mouse wheel position, defaults to 1111

Note: keep in mind there is no driver supporting the mouse, so don’t expect to find a mouse pointer on screen when Zx-Uno boots. Programs that use the mouse will paint the pointer on screen. If you want to support a mouse in your software you will have to paint the pointer yourself.

As well as reading the mouse as a Kepston mouse, we can also read data received through the PS/2 port directly using MOUSEDATA (0x09) and MOUSESTATUS (0x10) registers. Describing that is outside the scope of this manual, but you should know it’s possible and in case you need it you surely will find details of how PS/2 mice work on the internet.

How to programm AY chip?

The AY chip is available in the ZX Spectrum 128K models, but in the ZX-Uno it's available even if you boot a 48K ROM. Of course, if you boot with a 128 K ROM you can use PLAY command from BASIC, but for more advanced tasks you’ll need to know this:

The AY chip has several programmable registers:

RegisterFunctionRange
0Channel A fine pitch8-bit (0-255)
1Channel A course pitch4-bit (0-15)
2Channel B fine pitch8-bit (0-255)
3Channel B course pitch4-bit (0-15)
4Channel C fine pitch8-bit (0-255)
5Channel C course pitch4-bit (0-15)
6Noise pitch5-bit (0-31)
7Mixer8-bit (ver abajo)
8Channel A volume4-bit (0-15, ver abajo)
9Channel B volume4-bit (0-15, ver abajo)
10Channel C volume4-bit (0-15, ver abajo)
11Envelope fine duration8-bit (0-255)
12Envelope course duration8-bit (0-255)
13Envolvente wave4-bit (0-15)
14I/O port A8-bit (0-255)
15I/O port B8-bit (0-255)

To modify a register you should write the register number on port 65533, and then write the value to set on port 49149. To read a register value (not very common, but possible) you have to write the register number to port 65533 and then read again port 65533 (not 49149).

For instance this code sets 255 on register 7:

OUT 65533,7
OUT 49149,255

The mixer register has several fields, that allow activating or deactivating several channels:

76543210
E/SE/SNoise CNoise BNoise ATone CTone BTone A

E/S bits do noting on ZX-Uno for now.

Pitch values

To determine the frequency of the waveform on each channel, that will define the tone played, the pitch values are used. Each tone has a specific frequency assigned, and any tone out of those is considered off-key. This is a list of common frequencies for middle octave:

ToneFrequency (Hz)ToneFrequency (Hz)
A220D#311.1
A #233.3E329.63
B246.94F349.23
C (medio)261.63F#370
C#277.2G392
D293.66G#415.3

The AY chip won’t allow us to directly specify the frequency though, instead of that we will define the pitch, that is a value from 1 to 4095, and the frequency out of a channel is the one resulting from dividing 110,83KHz with the pitch value. So we can obtain a value from 27Hz (pitch 4095) to 110.83Khz (pitch 1).

Pitch value is selected using two registers, the one named “coarse” and the one named “fine”. It’s a 12 bit value and the coarse register contains the 4 most significant bits (value 0-15) and the fine pitch the lower 8 bits.

A simple example in BASIC:

OUT 65533,0 :REM Fine Pitch channel A=43
OUT 49149,43
OUT 65533,1 : REM Course Pitch channel A=1
OUT 49149,1
OUT 65533,8 : REM Volumen channel A a  = 12  
OUT 49149,12
OUT 65533,7 : REM registro MIXER, activo channel A
OUT 49149,1

So with a coarse pitch=1 and fine pitch=43, the pitch value is 299. 110,83Khz divided by 299 equals 370Hz, that is a F#, that will be played with a volume of 12 (out of 15) through channel A as mixer says channel A is active.

Take into account that due to technical limits, it’s more difficult to obtain accurate frequency values in the lower frequencies, so tones may be slightly off-key on those tones.

Volume

Registers 8, 9 and 10 contain a volume value in the lower 4 bits, so volume can be any value from 0 to 15. Despite of that, if bit 5 is active, then volume is ignored and an envelope wave defined in register 13 is applied.

Envelopes

AY chip supports envelope waves defined by register 13. Please note this affects wave amplitude (volume) but not frequency (tone).

Wave applied is defined by four values in register 13:

BitCommand
3Continue
2Attack
1Alternate
0Hold

Depending on the active bits one or another wave will be applied.

The frequency of the enveloping wave depends on register 11 and 12 values. Both registers define a 16 bit value, the coarse one is the most significant byte. That value will divide a base frequency of 6,91KHz, so if the value is 1, the wave will have a 6,91KHz frequency, and if the value is 65535, the frequency would be 0,11Hz.

You can find extended information about AY chips in the following document:

AY chip documentation

How to make use of the second AY chip? (Turbo Sound)

The ZX-Uno supports Turbo Sound, that basically is a second AY chip. By default the first AY chip is accessed via the standard registers, but if we want to switch to the second AY chip we just need to use OUT 65533,254. Then all the AY registers modified will be on the second AY chip. To get back to using the first AY chip use OUT 65533, 255.

How to program the SpecDrum Interface?

Due to complexity in this interface, we suggest using the original Cheetah SpecDrum documentation.

How to control mono/stereo sound?

It is possible to control which speakers (left/right) are used for each AY chip channels and also for spectrum beeper and SpecDrum using por 0xF7 (247). Value sent to this por (via OUT command) or read from that port (via IN function) is interpreted like this:

bitsControl
0-1SpecDrum & beeper
2-3Channel C
4-5Channel B
6-7Channel A
So, each AY chip channel on one side, and both beeper and SpecDrum would have a two bit value, whose meaning is:
ValueSpeaker
00None
01Right
10Left
11Both (mono)

Default value is 10011111b, meaning channel A on left speaker, channel B on right speaker, channel C on both and also beeper/SpecDrum on both. That is basically what is called ACB setup.

How can I use additional memory?

There are three ways you can access additional memory when using ZX-Uno:

  • DivMMC memory
  • Timex MMU horizontal paging
  • Raw access to ZX-Uno memory vía MASTERMAPPER register

The ZX-Uno implements a DivMMC with 128K RAM, so it's possible to use that extra RAM for your developments if you know how to do it. This is a link to Velesoft's documentation about DivIDE memory, compatible with DivMMC memory mapping.

The Timex machines emulated by the ZX-Uno feature a horizontal memory management unit.

The memory map of these computers is:
         EX-ROM      HOME       DOCK
0xffff +----------+----------+----------+
       |  Bank 7' | 32K RAM  |  Bank 7  |
       |          |          |          |
0xe000 +----------+          +----------+
       |  Bank 6' |          |  Bank 6  |
       |          |          |          |    
0xc000 +----------+          +----------+
       |  Bank 5' |          |  Bank 5  |
       |          |          |          |
0xa000 +----------+          +----------+
       |  Bank 4' |          |  Bank 4  |
       |          |          |          |
0x8000 +----------+----------+----------+
       |  Bank 3' | Screen 1 |  Bank 3  |
       |          |          |          |
0x6000 +----------+----------+----------+
       |  Bank 2' | Screen 0 |  Bank 2  |
       |          |          |          |
0x4000 +----------+----------+----------+
       |  Bank 1' | 16K ROM  |  Bank 1  |
       |          |          |          |
0x2000 +----------+          +----------+
       |  Bank 0' |          |  Bank 0  | 
       |          |          |          | 
0x0000 +----------+----------+----------+

Memory is paged in 8K banks from either the DOCK or the EX-ROM, but these banks are mutually exclusive - you cannot page in a bank from both simultaneously. Bit 7 of port 0xff determines which bank to use (0=DOCK, 1=EX-ROM). Port 0xf4 determines which banks are to be paged in with each bit referring to the relevant bank (0-7 or 0'-7'). When memory is being paged, interrupts should be disabled and the stack should be in an area which is not going to change.

The HOME bank is the normal Spectrum memory area. The top 32K is uncontended but the 16K screen area below that is contended. Banks are overlaid on this bank, but paging over the screen area does not change the RAM used by the ULA. This does mean it is possible to set up a screen and page it out.

Reading this port returns the last byte sent to it.

Using standard 128K RAM + DivMMC 128K RAM + Timex MMU 128K RAM allows a programmer to use up to 384 RAM. In case you need more, you'll need RAW access to ZX-Uno's RAM:

Accessing ZX-Uno's memory in RAW mode is also possible using the MASTERMAPPER register (0x01). When writing to that register, the 16K bank selected (0 to 31 in the original ZX-Uno implementation with 512K) will be mapped at 0xC000-0xFFFF. That way you can access the whole memory. Sadly, this raw access is only possible using a rooted ROM at this very moment, as the LOCK bit in MASTERCONF record (0x00) disables both SPI Flash access and raw memory access. It's done like that cause having RAW memory acces is a bit dangerous:

  • Some of the RAM banks are used for storing ROMS (System ROMs and ESXDOS ROMS). Mapping those banks at $C000 and modifying them modifies those ROMs, and won't reset them until a hard reset is made. Although that can be done on purpose, in general is a risky thing to do.
  • Also RAM is used by ESXDOS dot commands, they can be corrupted if you are not careful

Actually, if once started your software does not require system ROM nor ESXDOS, you can use those slots, but in that case it would be good that what you write at system ROM bank, starts by a routine at 0x0000 that just tell the user to perform a hard reset.

UNBRICK YOUR ZX-UNO

Something happened and my ZX-Uno won't boot. Easy unbrick.

If your ZX-Uno is not booting but you see LEDs on or flashing there is a chance the board got bricked

To try to easily unbrick your ZX-Uno try this:

Turn on your ZX-Uno with a joystick connected via composite video, and keeping joystick stick up while pressing fire. If you see a test pattern your are lucky. In that test screen your ZX-Uno is waiting for you to load the BIOS (the firmware) via EAR connection. You will need a .tap file with the BIOS (ask at forums) and play it through EAR connection (use a PC or mobile phone to play the tap file).

You will also need the latest firmware in ZX1 format, located at your SD card root folder. Again, ask at the forums for it.

Ok, just do the joystick trick, play BIOS tap file throug hear connection and BIOS will be loaded an ZX-Uno will reboot. Be ready to press F2 fast cause that copy of the BIOS is in RAM so it will disappear if power is turned off. Once inside the temporary BIOS you have to write the real BIOS to flash memory. To do so, inside the BIOS go to "Upgrade" menu and theselect "Upgrade BIOS from SD".

If that worked, you'll have a bootable ZX-Uno, maybe you need to load Spectrum core, other cores, ROMs,etc. again of maybe they are there. Whatever you need it's in the upgrade section of this FAQ.

If it didn't work, check all points again an retry, but if the problem persists, you'll have to use some cable to unbrick your ZX-Uno. See next questions.

NEXT QUESTION PENDING, BUT CHECK MANUAL -SEE USEFUL LINKS SECTION

ZX-Uno is still in continous evolution, and that's why this FAQ doesn't link to latest version and asks you to ask in forums.

Despite of that, there are some intersting sites you can have a look at, but I suggest you that if you are not 100% sure, don't make updates with files you don't know if they are correct.