Archive for September, 2017

sound card for your ZX Spectrum – ZX AY by

Thursday, September 21st, 2017

ZX AY is another solution to give your ZX Spectrum stereo AY sound. This is external unit, so both: you donot need to mod anything inside your ZX Spectrum 128k, it will work also with your older rubber ZX Spectrum 48k – to be honest – I had no single problem to use it with ZX Spectrum 48k, ZX Spectrum 128k, ZX Spectrum 128+2 (grey) and ZX Spectrum 128k +3. Not sure if Spanish toastrack (128k) model will be working without timing problems but – it’s anothoer case and something that should be fixed within one particular model. Ben Versteeg declares that ZX AY works with any ZX Spectrum model from 16k to 128k +3 – however – I will try to run it with Spanish Investronica models soon.

Hooking up ZX AY is damn simple – also it’s connection thru so pretty much universal to be included in any chain of interfaces. I was hooking up to ZX AY Lotharek’s DivIDE2k14 and it was working without any problems. One thing you should see on the pics – there is not much place around EAR/MIC inputs as ZX AY goes cross way, but fortunately not pressing much on these connectors in rubber ZX Spectrum 48k. This problem doesnot exists in 128k +2 and so on +3 models.


The whole interface is made with GI made AY-3-8912, for the bats – there are differences to the other chip makers, but as I wrote – for the bats.

The unit disables internal AY in 128k +2 and +3 models, so when using it – there is no sound on sound output from internal AY.

Generally you have two options to configure ZX AY and it concerts channel stereo setup.

There are two jumpers that are used two ways – horizontal – they will set up ABC Stereo, or vertical – they will set up then ACB Stereo.

ABC Stereo means left channel will contain A+B+Beeper, the right – B+C+Beeper.

ACB Stereo means left channel will contain A+C+Beeper, the right – B+C+Beeper

When plugging ZX AY to anything thru it’s output please remember – the output is STEREO minijack so you cannot use mono minijack as it put ground with one channel.

Enough talking about sound unit, let’s listen to it. I have three tracks for you – all with the same song “General Instruments Mandess Inc” done by v0yager ( member) for latest Riverwash 2017 compo.

All tracks are recorded on my Tascam DR60mk2 thru stereo input (as line signal) with gain set up in the middle.

First track is ABC setup, 2nd one is ACB one (so you can compare what it means to this one specific song) and 3rd track is directly from ZX Spectrum 128k +2 (grey one, issue 1 UK made, no mods, factory default) – so the third one is mono as you can hear as all 128k ZX Spectrum family has AY chip but in mono mode. To have it in stereo you have to add either Bytedelight stereo mod either mode advanced AmpY (which also plays as amplifier for ZX Spectrum).

Coming to final verdict – very nice unit, more expensive then Lotharek’s one, but with possibility to switch two ABC ACB modes. Very good sound level, connection thru, included manual.

you can buy ZX AY directly from bytedelight here.

converting binary to ASCII decimal data list on Mac OSX

Tuesday, September 19th, 2017

Personally I use it to include already compiled assembler binary data or to convert i.e. small portion of bitmap like sprite or tiles to simple ASCII source to be included as DEF… or DATA… either in Assembler or BASIC source.

Above 32x32pixels graphics – to do it just in binary it’s simple but time consuming. 01000000, 00111111, 11100000, 00001111 – this is binary for just first row of above graphics.

On ZX Spectrum BASIC (or text file to be coverted by zmakebas) you need to write it down as 999 DATA BIN 01000000, BIN 00111111, BIN 11100000, BIN 00001111 then in loop of FOR… READ… POKE… NEXT… commands. So to be honest – it’s easy to do by pen on paper, but time consuming to write it down without stupid mistakes in data. And we have computers, you know, to simply stuff like that. So let’s them working.

How to do it with Mac OSX? Of course we need AppleScript.

Let’s do it with converting graphics, in our example 32×32 pixels, monochrome. I will be using Photoshop, pretty old version as CS5.1 but you can easy find relevant options in other software to replicate my moves.

To convert to bitmap (so zero-one data – no colour, no grayscale) it needs to be 8bit (just tip if you convert from 16bit and stuck with greyed bitmap mode in Photoshop).

step 1: save as .pbm

step 2: use my read pbm and extract raw data.scpt Applescript. Adobe Photoshop saves not fully text version of .pbm as described around in the internet. First 9 bytes are text – in our example:


Three tags, between all of them we have $0A handler. One important to note – we have 32×32 bitmap and… bingo – it’s noted in the header, right?

So we can ommit first 9 bytes (as in my Applescript code) and read the rest.

step 3: select and copy everything between { }

step 4: paste do your editor (BBEdit in my example) add code (BASIC or Assembler) and you have it. 30 seconds max 🙂

I will be sharing here more simple code and workflow solutions so – until next time.

Let me know if it works for you, or if you have a problem using this. Cheers!

Assembling Z80 Assembler source files with BBEdit and Pasmo Z80 Assembler

Wednesday, September 13th, 2017

Inspired and with help from Derek Bolli I have made today two scripts for use with Pasmo and BBEdit.

Script #1 making .tap file with BASIC loader (option –tapbas) :

and script #2 making .tzx (option –tzxbas) like above with BASIC loader:

Both scripts are .scpt (Apple Script) files to be put into:

~/Library/Application Support/BBEdit/Scripts/

And from that point they will appear in BBEdit under scipts icon drop down menu.

Files are easy to modify, aspecially if you donot want them to open compiled filed in emulator. I have marked port of code to mark down if you want to turn it off. If any – ask.

Z80 IDE – placing our tools within MacOSX catalog structure (step 2)

Wednesday, September 13th, 2017

Step two for me with setting up IDE for Z80 for use in Mac OSX was placing our tools within MacOSX catalog structure. Why bother with it? The point is to have access to our tools like pasmo or zasm, zmakebas from any folder on the computer without playing with disk/path to them, so it should be “within” system path as other system tools.

For me, under MacOSX 10.11.6 worked copying in terminal to  /usr/local/bin by typing (i.e. copying pasmo) after changing path to folder containing pasmo file:

sudo cp pasmo /usr/local/bin

then enter the root (administrator) password after being asked.

From this point pasmo can be envoked from any disk location. I did it installing all command tools like pasmo, zasm, zmakebas etc.