Loading on the ZX80

Discussion about ZX80 / ZX81 Software
Post Reply
Fruitcake
Posts: 363
Joined: Wed Sep 01, 2010 10:53 pm

Loading on the ZX80

Post by Fruitcake »

Well it’s the start of a new month and I have a very interesting discovery to report.

As you will know, Sinclair sold the ZX81 ROM as an upgrade to the ZX80 to enhance the computer’s ability from integer only maths to floating point maths. The downside, it was widely reported at the time, was that programs couldn’t be shared between computers fitted with the different ROM types. But amazingly it actually turns out not to be the case. The program just had to be saved out in a special compatibility mode. Who knew this ability was available for all these years?!

You don’t believe me? Well if you have about 5 minutes spare then try this...

Download this wav recording of such a program:
ZX8081.wav
(570.1 KiB) Downloaded 192 times

You can either use real ZX computers or an emulator (I use EightyOne but other emulators equally suitable are available - if using EightyOne, remember to set Options > Tape > Source to be the Wave Loader). Then just try loading the wav directly into a ZX80 fitted with its original 4K ROM and also a ZX80 fitted with the 8K ZX81 ROM (or just use a ZX81 instead since it contains the same ROM) by typing the standard LOAD and LOAD “” commands respectively. Then prepare to feel foolish for having doubted me!
dr beep
Posts: 2190
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Loading on the ZX80

Post by dr beep »

Fruitcake wrote: Sat Apr 01, 2023 11:52 am Well it’s the start of a new month and I have a very interesting discovery to report.

As you will know, Sinclair sold the ZX81 ROM as an upgrade to the ZX80 to enhance the computer’s ability from integer only maths to floating point maths. The downside, it was widely reported at the time, was that programs couldn’t be shared between computers fitted with the different ROM types. But amazingly it actually turns out not to be the case. The program just had to be saved out in a special compatibility mode. Who knew this ability was available for all these years?!

You don’t believe me? Well if you have about 5 minutes spare then try this...

Download this wav recording of such a program:
ZX8081.wav
You can either use real ZX computers or an emulator (I use EightyOne but other emulators equally suitable are available - if using EightyOne, remember to set Options > Tape > Source to be the Wave Loader). Then just try loading the wav directly into a ZX80 fitted with its original 4K ROM and also a ZX80 fitted with the 8K ZX81 ROM (or just use a ZX81 instead since it contains the same ROM) by typing the standard LOAD and LOAD “” commands respectively. Then prepare to feel foolish for having doubted me!
This is the second time you succeeded where I failed when we had the same idea.
First time was when your additional hardware for a ROM-ZX81 emulator on the 48K ZX Spectrum worked and mine failed.
I will find out again why your solution works where mine failed.
Last time you used better/faster chips.
Fruitcake
Posts: 363
Joined: Wed Sep 01, 2010 10:53 pm

Re: Loading on the ZX80

Post by Fruitcake »

It seems everyone was far too canny to fall for my ruse of announcing the seemingly implausible claim of a ZX80 dual ROM loading technique on April Fool’s day! :lol:

But the technique is indeed real and here the source code for it:
ZX80_Dual_ROM_Load_Demo.asm
(26.84 KiB) Downloaded 171 times

The demo simply deploys one of two payloads depending on the ROM type in use, which in this instance just happens to be equivalent BASIC programs. The mechanism allows both program versions to be kept together in a single file, but does result in a file size double that of each individual program. A bigger benefit however is gained with machine code programs since they can be crafted so that they run by either ROM.

A full description of the technique, along with a utility to assist in generating dual ROM loading programs, will appear on my website in due course.
User avatar
stefano
Posts: 584
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Loading on the ZX80

Post by stefano »

This is so intriguing !
Post Reply