ZXpand primer

Discussions about Sinclair ZX80 and ZX81 Hardware
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

ZXpand primer

Post by David G »

site search: ZXpand | ZXpand+ Online Manual | [update] Original ZXpand manual (PDF)

ZXpand is a multi-function card for the ZX81 that was created by Charlie Robson (user Sirmorris)

* ZXpand (2011) is a RAMpack/SD card/ROM enhanced module
* ZXpand+ (2017) adds on-board sound and joystick port

Cost was £57 when last available in 2020

ZXpand/ZXpand+ is just a bare board (which plugs into the back of the ZX81 like a 16K RAM pack). If you desire an enclosure, some are available on Sell My Retro. Zxpand does not have a pass-through connector, so if used with a printer it must be plugged in as the last module in the chain

Image

ZXpand features:
* SD Card storage using SAVE and LOAD. No USR call required
* 32K RAM onboard, which supports BASIC and hi-res graphics
* reset button
* Firmware update via SD card

ZXpand+ adds:
* Sound via AY chip and 3.5mm socket
* joystick port for Atari-style 9-pin joystick
* extension port (includes cable to joystick connector. Also 5V TTL serial is available at the port)
For the original ZXpand these features were available on the ZXpand-AY add-on daughter board

The SZ81 emulator can emulate the ZXpand+ (use the sz81 version "sz81p.exe"). To run aZXpand-compatible program, put the P file and its .wad file in the ZXpand_SD_Card folder of the emulator
1024MAK wrote: Sun Nov 08, 2020 3:44 pmThe ZXpand

These were designed by Charlie Robson (sirmorris on forums). The original design was for ZX81 and TS1000 computers. Later he produced a version that worked with a ZX80. He has already manufactured hundreds of ZXpands. More recently a model that includes the sound chip was designed, manufactured and sold as the ZXpand+.

If you want a ZXpand+, they have been made in small batches. When available, they are normally sold on Sell My Retro.
This was the last (most recent) listing for ZXpand+ systems...

They sell out faster than hot cakes. So I suggest you register on the site and make use of the ‘notify when back in stock’ facility.
Additionally, ZXpand in built into the Minstrel ZX81 clone

This is a commercial product, not open source
SirMorris has made the ROM and PIC firmware files available

ZXpand can work with a Sinclair ZX80 by changing the ZX80 ROM and using an adapter cable (see post)


SOUND GENERATION
AY sound is provided by various chips:
* Original ZXpand has Yamaha YM2149F PSG
* ZXpand+ has either the Yamaha, GI AY-3-8910, or a Microchip AY38910 (Microchip is a spin-off of GI)

CHIPS
The first ZXpand+ (issue 5 board) has these chips:
* Microchip AY38910 A/P 9126 (40-pin DIP AY sound chip)
* Microchip PIC18LF4525-I/P (40-pin DIP version of 8-bit microcontroller with 32KB flash and 2KB RAM)
* Winbond W27C512-45Z (24-DIP 64KB EEPROM)
* ? Xilinx XC9536XL (small square 44-pin CPLD [Complex Programmable Logic Device] with custom configuration for the ZXpand+)

Original ZXpand has 2C764 EPROM. ZXpand+ has flash EEPROM

[update] Underneath the EPROM is a CY7C199CN-15PXC (32KB SRAM)

Original ZXpand (2K11) with ZXpand-AY add-on
Image
Last edited by David G on Wed Sep 28, 2022 8:36 am, edited 1 time in total.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZXpand primer

Post by Moggy »

Just a few things to add to the above for clarity.

Trivia.
The original concept goes back to 2007 and consisted of a chunk of vero board inside a Sinclair ram-pack with an SD card sticking out of the top but I digress.


The original spand is not so much ROM "enhanced" as it uses an EPROM with the print functions removed, the CHR table also, so un-enhanced in that regard. the space created by these removals allows spand specific commands to have a home.These commands point to the CHR table in the original ROM and this overlay EPROM has to be switched out for the print functions to work.

The final code contained in this EPROM is marked as 6.6. Some releases have the code as 6.7. The only difference between the two is that it was discovered that very early ZX81's with the bugged ROM hardware fix on top of the CPU caused difficulties when used with the spand. v6.7 cured this anomaly but otherwise the code is the same according to Charlie and offers nothing more over v6.6.

The EPROM in question is a 27c64 device which requires 12v programming voltage. this chip was chosen over the earlier 2764 chip which requires a 21v programming voltage which Charlie's programmer he possessed at the time couldn't handle.

When this chip is removed you will find another chip underneath ( CY7C199CN-15PXC )whose purpose escapes me at the moment.

The original spands ( issues 1 and 3 ) whilst able to use the GI sound chip, will sound at a much higher frequency as the clock setting was chosen for use with the Yamaha chip.

The first issue three spands require a link wire to be soldered between a couple of pins as an error in design meant the clock signal for the AY system was absent and as no one has mentioned any problems with this over the years I will assume all is ok for everyone, I'm not sure if this was ever rectified.

The prototype spand+ used a purple board and very bright pink LEDs this version was broken during my Beta testing of the unit and not repaired as the final spand+ as issued differed somewhat to the prototype.

The spand+ came with the Yamaha chip as standard though Charlie did offer a choice, though I doubt many took up the offer, of the GI chip mainly for it's grittier and more accurate reproduction (volume stepping especially) of the many AY files which were originally created with the GI device.

A turbo board was also offered for the spand+ which could use either two Yamaha or two GI chips,though it should be noted that a mixture of the two different chips cannot be used as due to electrical differences only the Yamaha will sound.

The last issue of the spand+ is 5.1 , main cosmetic differences are a matt finished board,date legend now in Roman numerals and a change to the "REX" message. Also the two onboard side by side regulators have been separated,the reason I suspect, being that they create a localised hotspot especially when used with the original Sinclair power unit and more so when encased although in conversation with Charlie he insists it was just a design consideration and recommends a 7 or 7.5v power unit for use with the spand+.

Charlie has also put on line files for making a couple of breakout boards for use as MIDI connections to either a MIDI keyboard/module or to a stand alone hobbyist synth module available online which is eminently suitable for this purpose being small enough to fit inside a Sinclair ram-pack, minus it's original contents obviously .

With suitable software,( which he also created ), a GM MIDI file player is available although some file changes have to made for them to be streamed from the SD card.
I use all the described MIDI hard/soft ware and can say I'm very pleased with the results considering this was originally just a project between us both to see if it could be done and was never developed further.

More if I remember anything else.

The manual you have linked to concerns the spand+ not the original issues of the device, the manual for those issues can be found at this link.

https://www.rwapsoftware.co.uk/DOC/ZXpand%20Manual.pdf

SAVE/LOAD allows save and load to and from various parts of the spands memory as well as the regular SAVE/LOAD of a whole program.


Although SZ-81 is spand compatible as is Eighty One I have come across the odd program they cannot handle but seeing as they are not games related, which is where interest seems mostly to be, I won't go into them here suffice to say the emulation isn't perfect.
Last edited by Moggy on Wed Sep 28, 2022 2:41 pm, edited 1 time in total.
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZXpand primer

Post by 1024MAK »

The EPROM is a CMOS 27C64 (8k byte).
The CY7C199CN-15PXC is a 32k byte SRAM chip.

The Yamaha YM2149 is a slightly improved design of a GI AY-3-8910 produced under license. It has a internal clock divider. Read more here, here, here and here.

The AY-3-8910 was actually available in a number of versions under slightly different part numbers. It was designed for use with General Instruments own microprocessor. A Microchip branded chip is exactly the same as a GI branded chip (as far as I know).

Microchip is not really a spin-off of GI, but rather the GI Microelectronics semiconductor division that was spun off from the parent company and renamed Microchip. Yes, a subtle difference. Hence why some of the chips sold by Microchip were still being labelled GI until they changed the production equipment.

Alas, these chips are now sold on trading sites, but have been pulled and remarked. Sometimes with implausible dates, and that assumes it’s actually the chip it claims to be…

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.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZXpand primer

Post by Moggy »

1024MAK wrote: Tue Sep 27, 2022 11:22 pm

The Yamaha YM2149 is a slightly improved design of a GI AY-3-8910 produced under license. It has a internal clock divider.



Mark

Is the improvement in the Yamaha chip some other design/electronic feature etc seeing as possessing a two speed clock and a wider volume stepping adds little to the party to be honest? Genuine question.

The GI chip is more highly rated from a sonic/musical viewpoint with a more grittier feel to it, amongst chip tuners hence the 1000's of compositions made on that chip which sound sometimes odd when used with the Yamaha what with its different volume spacings I would argue and is my preference for the spand which I accept is only my opinion.

I agree about the re-badged chips having been caught out with same. Usually the envelope generator is shot as it's the first thing to go kaput on these chips whilst the tone sounders are left ok and is hard to spot at first.

The last spands (v5.x) that are to be sold shortly (I'm told) have an interesting feature concerning ROM addressing which I'm sure Charlie will reveal when the time comes as it's a bit above my head.
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZXpand primer

Post by 1024MAK »

Well, that’s where theory and practice (what it actually sounds like) depart from one another.

As I went from a ZX Spectrum 48K rubber key with just it’s bleeper to an Atari STfm, I’m probably biased slightly, also I have all the musical ability of a squashed slug…

So I can’t really say that the difference is a significant improvement. If to you, you prefer the sound from the AY-3-8910, that’s fine by me.

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.
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: ZXpand primer

Post by David G »

Thanks, I've updated the first post

Wow, ZXpand is more than a multi-function card, it is a work of art


To displays the firmware version string, at the L cursor enter:

Code: Select all

CONFIG "V"
To determine which revision of overlay ROM you have, type

Code: Select all

PRINT PEEK 7679/10
FIRMWARE VERSIONS
ZXpand+
1.13 2017

ZXpand
1.8 2012 July
1.9 2012 August
2.1 2012 September
2.2 2012 October
2.5 'dragon' 2016
2.6 'TROLL' 2017
2.61 'TROLL' 2017 minor update adds LOAD "filename STOP" feature
2.62 'TROLL' 2018 minor update fixes RO file problem

ROM VERSIONS of the overlay ROM
25.5 is non-ZXpand (stock ZX81 ROM, all versions)
6.6 is the final ZXpand ROM
6.7 is the final ZXpand ROM with a bug fix for the original "ZX81 ROM with hardware fix"
7.1 is ZXPAND+

NOTE: The address 7679 is $1DFF which is SPARE in the ZX81 ROM and is normally 255/$FF
Last edited by David G on Thu Sep 29, 2022 12:41 pm, edited 1 time in total.
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZXpand primer

Post by 1024MAK »

David, I think you made a typo in the address in the last line…
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.
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: ZXpand primer

Post by David G »

Updated, thanks. No wonder I had trouble finding it in the ROM the first time I tried. 7679 and 7976 are not the same ...

By the way, what is the "firmware" on the ZXpand? Is it the GAL/CPLD programming or is it the PIC software?
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZXpand primer

Post by Moggy »

I'll let one of the gurus answer that one as they have the Latin for it.

One thing I do know that should the firmware ever screw up on the plus model and the it becomes "un-flashable/updatable" there is a piece of untouchable code hidden somewhere in one of the chips that will respond to a "rescue" file which I'm sure Charlie has made available either here or on his Github site, a file I have had to use quite often as my spand firmware is slightly different from that posted on site and also when testing various changes to the firmware for Charlie things sometimes go awry. :oops:

To paraphrase I think its this piece of code that looks to see if everything has booted or flashed ok and if not looks on the SD card for the rescue file, a kind of fail-safe to restore the spand to normal.


There is also a firmware flash for use of the spand+ with the ZX80 and an unreleased firmware to change they AY port assignments for anyone wanting to use a Zonx unit along side the on board AY for a turbo AY setup.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZXpand primer

Post by Moggy »

Firmware 1.13 has been updated (2020) to improve serial the serial functions on the plus version of the spand.

At boot up 1.13 Shows

ZXPAND 1.13 "MOGGY"

The updated firmware shows.

ZXPAND+ TOMTE

The firmware can be found here..

https://github.com/charlierobson/ZXpand-Vitamins
Post Reply