single line programs in Sinclair BASIC pt.1

Thursday, October 5th, 2017

10 POKE 23692,255: PRINT CHR$(132.2+RND*1);:GO TO 10

Forgive me small inconsequence – the post screenshot you see is not what you will get after running this small program.

The whole cherry on the cake is POKE 23692,255 which one disables SCROLL? prompt on bottom on the screen for… 254 next filled screens.

But to keep you updated, below is GIF containing above typed program*.

* if you are not ‘typing’ fan of BASIC, just copy the code to editor and run zmakebas as mentioned here.

sound card for your ZX Spectrum – ZX AY by bytedelight.com

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 (speccy.pl 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 i.e.read 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:

P4
32
32

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) :

https://drive.google.com/open?id=0B7Kd4Ep9e1kbUGFnYlFadUtHVlE

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

https://drive.google.com/open?id=0B7Kd4Ep9e1kbUGFnYlFadUtHVlE

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.

 

retrolab.pl skeleton/frame for Gotek inside Amiga 1200 and Amiga 600

Sunday, July 9th, 2017

My belowed Amiga 1200 has been sent for recapping (which I recomend you as obligatory with your old Amiga, as condensators tends with time to brake and spill onto tracks on motherboard and destroy the pcb – there is no rule – it’s more towards the computers stored for years and not used, but generally – if you have old Amiga, recap it as soon as you can) – I have decided after recapping my Amiga 600 that I donot want to spend a few hours with magnifying glass and soldering equipment to recap next Amiga.

In Poland generally there is only one service with great reputation – retrolab.pl – so I’ve sent them my computer.

After week and a half I got my Amiga back, with small surprice inside – skeleton frame for Gotek floppy emulator. I use Gotek HxC for Amiga (even having collection of boxed games and programs) because… it’s faster. Gotek is very flexible in HxC firmware – I have used it for emulating floppy drive for Amstrad CPC6128 clone – JustCPC128 by Piotr Bugaj as well as floppy drive for old PC and ZX Spectrum 128k +3. Gotek is easy to install inside typical 3,5″ hole, but in Amiga floppy drive is deeper inside, there is only slot for disc and eject button. No front panel. It means whole Gotek front panel is not well visible inside. I used to hook and connect inside Amiga long (around 0,5 meter) floppy cable and power cable that were coming outside the Amiga case thru floppy hole. Aestheric -5 but it works.

However for not so much more more that I have paid for these two cables (so around 10 GBP) you can get the skeleton frame for Gotek and replace your floppy drive with Gotek pcb.

Oryginally the Gotek pcb is inside the case that is exactly the same size as floppy drive, unfortunately it’s not the best placement of both display and buttons with USB slot for easy access to them when you use it with Amiga, but any other changes means redesigning the pcb and LCD/buttons/USB placement.

Mounting the Gotek on the skeleton and the whole mount inside Amiga is very simple, it’s taken me 3 minutes max

So for now – retrolab.pl Gotek’s skeleton mount is great to keep your Amiga almost stock, without modding it non reversable way and I definately recommend you to go for it.

You can order Gotek skeleton mount for your Amiga on retrolab.pl’s profiles on Ebay or Allegro or thru their page:

on Eba

on Allegro

retrolab.pl

Pixel Heaven 2017

Monday, June 19th, 2017

Bytedelight ZX HD – HDMI output from your ZX Spectrum with ULAplus feature

Wednesday, April 5th, 2017

Looks like this year came with new options for connecting out old ZX Spectrum to modern TV or monitor with HDMI input. I’m really glad that very soon after TKpie I’m able to test another but more feature built unit done by Bytedelight – named ZX HD.

It’s based on similiar solution – external unit listen do ZX Spectrum ports and render using RaspberryPiZero ZX Spectrum screen to HDMI output. It means crispy sharp every pixel. It’s as good as HDMI video from best software emulators on PC or Mac.

So we have two levels of using ZX HD – one is just – video output thru HDMI to modern TV or monitor (so similiar to TKpie), next level is play&fun with ULAplus features.

The whole unit came as DIY kit, I have already soldered RPiZero so it was just a pleasure to put together, kind of LEGO for older geeks.

The enclosure is 3d printed, the only ‘but’ is about back plate – it’s so thin so one side edge is a little bit curved. Otherwise – looks great with all machines I tried with and give great video output.

Minor – as like with TKpie – lack of audio in HDMI connection. If you use separate amplifier for your sound – donot care about this. If you want to put all-in-one cable – you have a little bit trouble.

Of course – there is trick – use HDMI to DVI converter (cheap as 1 USD on ebay), then use converter box (around 25-30 USD) that link together stereo audio L/R and DVI to HDMI output. Sounds complicated, but I did this a few years ago combining DVI signal from my mac and stereo output from firewire800 external sound card. It worked in the past, now is just cheaper.

Also if you use like me Avermedia Gamecapture HDII – there is option in this unit to switch audio from HDMI to analog L/R input – similiar solution can be found in setup of flat LCD/LED TV. Since that moment I’m more then happy 🙂

Basically – using ZX HD is damn simple and it gives great video output.

It starts with ZX HD screen, confirm resolution of the output video, you confirm that by button on the ZX HD and that’s it.

That could be your story – connecting your old speccy to modern flat TV with HDMI input. But let’s complicate it a little bit. Imagine – you can take any HDMI monitor or TV, even small 4″ field monitor and use your speccy on holidays… or at least try to use 🙂

I have taken my SmallHD 4″ video field monitor that I use doing videography and I have connected it to ZX HD hooked ZX Spectrum. No signal. Then I used HDMI splitter and connected two outputs – one to flat TV (Samsung if you asked) and 2nd to SmallHD field monitor. Both had video signal this time. Then I did another test – for gameplay recording I use Avermedia Game Capture HDII – same problem when I connect ZX HD directly only to this unit. Note – I was able to do this with TKpie. I was talking to Ben – probably it’s because ZX HD software “talks” with end hardware to confirm it’s resolution etc. – and here we got the problem if we end unit has loopthru HDMI output… It was just the theory until I tested ZX HD with 9″ portable monitor without loopthru HDMI output feature. Then tried other monitors without loopthru feature… all they worked with ZX HD.

So generally – for recording from ZX HD – you still need regular TV or monitor without feature of loopthru output over HDMI. If you use HDMI splitter (bargain cost like 20-30 USD) you can separate two signals – one to TV, 2nd to recorder or use recorder output for connecting to TV (both ways work).

For all people having access to TV unit with possibility to switch audio source from HDMI to analog – same for any grabber with that function:

ULAplus feature of ZX HD.

This is something new, above other hardware on the market. With ZX HD you have possibility to enjoy more colours on the screen coming initially from your ZX Spectrum. What is the history of ULAplus? The idea comes from developers of ZX Spectrum SE, Andrew Owen and Jarek Adamski, unfortunately apart to the prototype it hasnot been produced. Generally ULAplus extends the total palette to 260 colours. According to ULAplus website:

A static screen using no CPU time can have 64 colours on screen at once. Changing the palette while the screen is drawing enables you to have 256 colours on screen at once. Switching between the 64-colour mode and the standard mode gives you an additional four colours (BRIGHT 0/FLASH 0 INKs 1, 3, 5, and 7) which are not present in the standard palette for a total of 260 colours on screen.

Unfortunately haven’t found too much stuff with that feature. There are Cronosoft games extended to ULAplus feature (as Jonathan Cauldron’s AGD system allow to use ULAplus palette), some nice demos, Palette Editor and some example palettes dedicated for games and… that’s it. Maybe situation will change a little with ZX HD unit – as it gives possibility to enjoy ULAplus additional colours on any speccy with ZX HD.

Some examples of ULAplus features below. I will cover more on these features including Palette Editor soon.

Bytedelight ZX HD software page

webshop ZX HD page

ULAplus website

 

 

I started to learn assembler for Z80 and ZX Spectrum (step 1)

Monday, April 3rd, 2017

A few months ago I decided to do something crazy – from the point where I am by profession and age – and start to learn Z80 assembler to start coding in small form for ZX Spectrum.

Biggest problem – as always is to have simple but effective IDE* – the problem is I’m Apple Mac user. I didn’t wanted to setup Windows on Mac just for that (well – I had to try ZX Spin under Windows and I like it, but overall – Pasmo was my target compiler so decided to try setup all under MacOSX).

So three programs: editor – my is Textmate I just have installed additional budle (actually for ZASM but also works fine . pasmo is my assebler – I managed to compile and install it on my old Macbookpro and the last part of IDE for this moment is emulator with debugger – ZX SP.

Step by step – reading books, analysing code, hitting walls, finding solutions. Stay tuned!

* An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger.

Bytedelight DivMMC Enjoy Black and DivMMC Enjoy Mini

Wednesday, March 29th, 2017

Ben Versteeg from Bytedelight has sent me his new line of DivMMC products. Oryginal DivMMC was done by Mario Prato back in 2013, since then Ben made several versions of his DivMMC including these two newest: DivMMC Enjoy Black 2017 and DivMMC Enjoy Mini. Both units work under ESXDOS 0.8.5 – for full features see here. Maybe I will go for article about how to use more from the DivMMC and ESXDOS then just enter to load game form SD card.

Top of actual line product is dual slot DivMMC Enjoy Black 2017.2 which one has also switchable joystick interface able to work as Sinclar or more popular Kempston (so allowing to use any Atari Commodore, Amiga joystick) standards. For some of you that prefer SD over microSD – this one has regular size SD slot, so you can easy put the card into laptop SD reader port without any adapter that you have to remember about (but adapter is always included with microSD card so it’s just matter of having that around you).

I got Enjoy Black version in nice 3d printed case. It looks good with all ZX Spectrums, but best of all – works great with them. On the side we have set of dip switches allowing us to choose Spectrum model, switch off joystick port, or turn the DivMMC into flash mode (if we need to reprogram it). For so much options it could be mess to remember so Ben put a nice sticker with all dipswitch options described.

During last few days I have tried this unit with grey 128k +2, 128k +3, toastrack 128k, old rubber 16k issue 2, 48k issue 6a, so let’s say most of models that make difference when using with this kind of unit. None of my computers has problem with M1 line in Z80, so DivMMC Enjoy was working flawlessly. Switchable joystick port is nice addition, aspecially for computers without any joystick interface so, every before grey 128k +2. As mentioned in manual included with the unit – it won’t work with Investronica ZX Spectrum 128k.

Working with DivMMC Enjoy is really easy and painless: setup dipswitch up to your model, plugin this into nonworking computer (!!!) – so basically for 16k/48k and 128k +2 grey have switches 3-5 are off/top, toastrack has 4th switch on (down), +2a/3 models has 3rd switch on (down).

Two colour leds show unit status – lower one shows cards – red for card2, blue for card1, top one shows power on.

Basically using the unit looks like: after hooking it to your speccy, you gonna turn speccy on, the ESXDOS boots, recognizing the card(s) and you see copyright screen. This is user0 mode. 128k programs and games works, but it’s not working in 128k BASIC.

For playing around you will use two buttons on the unit: reset and NMI. Reset is what you are missing on your rubber 48k, NMI button invokes EXSDOS menu. I have switched to my card as I have more demos and software on the card over the card included with the unit. ESXDOS emulates tape and provides additional commands to use under BASIC, but one feature is really worth mentioning: snapshots of speccy’s memory. Imagine playing game and possibility to make save anytime, then continue from that point. In the past – Multiface interface have to be involted and these snapshots required to have multiface plugged. ESXDOS with DivMMC create .sna files that can be run on most of Speccy’s emulators like ZX Spin, Spectaculator or Fuse.

Still – has no idea of use of two slot cards, but it’s matter of time 🙂

2nd unit is small version of DivMMC Enjoy – called Mini, without any additional features from its big brother. No joystick, no case, no 2nd card slot. Simple small unit. Work as well as big brother, so when you will need this one against top model?

  • if you own 128k +2 or later model you already have joystick ports (Sinclair ones), so matter of converter Sinclar>Kempston, which is bargain cost like 5-9 EUR.
  • if you donot need two slots and bigger unit on back of your unit and you want to spend less for that kind of equipment for your retro ZX Spectrum
  • I have found that due to it’s size this one can be really nice to put inside the cut down mod of 128k +2 and have all-in-one.

When I have connected it to my black +2a unit first thought was: it will be pain to remove – that was my experience with other short vertical mount interfaces, but – surprisingly not. The connector is not working too hard when dismounting unit.

What can be problematic is the SD card is sticking out…

So I have picked up my Macbookpro SD adapter… and that’s it – if it’s problem – find cutdown SD card adapter like this one:

Summing up: unless M1 problem in your Z80 processor both models will play nice with your ZX Spectrum.

Actually played with both units during Warsaw Retro Meetup last saturday and had no single problem with them.

Both units has 128KB RAM inside, by per request Ben mentioned it can be raised to 512KB.

Bytedelight.com

DivMMC Enjoy Black 2017.2 in webshop

DivMMC Enjoy Mini in webshop