ZX81X2.ROM - and the big bang

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

ZX81X2.ROM - and the big bang

Post by zsolt »

Dear ZX-Fans,

The first steps of this project (inspired by this topic)
were made about two years ago and the results were published as a continuation of "SG81" (C..G2).

During this "journey" it was managed to speed up: the printing; the number printing; the floating point arithmetics
and parts of the built-in calculator - and several minor bugs have been fixed. And now "we have arrived". (a la Coelho ;) )

The latest improvements:
  • the renewed comparison operations from now have two entry points: one for "=,<,>", and an other for "<>,>=,<=";
  • the improved 'INT' function and the renewed 'NEXT-LOOP' routine are calling directly the new and
    quick numeric comparison instead of subtraction
  • the system variable 'CDFLAG' from now includes two new status bits:

    - bit 5 signs the noncollapsed (expanded) display file, its status is checked by the renewed screen manipulating routines
    - bit 4 is the plot48 flag - if it is set, then the plot origin will be moved to the left bottom corner and the Y coordinate can be 0..47 :!:
  • the ending part of the new 'CLEAR PRINTER BUFFER' routine is used by the new 'CLS' and 'SCROLL' routines
  • the new 'CLS' routine is much faster than the original and sets the new status bit of the 'CDFLAG' (bit 5) depending on the available memory (dramatically reduces also the time required for booting)
  • the 'SCROLL', the 'LOCATE ADDRESS' and the 'PLOT AND UNPLOT' routines were enhanced to work in two ways depending on
    bit 5 of 'CDFLAG':

    (1) as before (bit 5 = 0): eg. the 'SCROLL' damages the display file
    (2) or quick (bit 5 = 1): making use of the direct writing possibility of the linear display file
  • the old 'Handle string AND number' routine was completely removed its function is provided by the 'Handle number AND number' routine
  • the 'Absolute magnitude' and the 'Handle PEEK' functions have been moved
  • the patched routines: 'PRINT A CHARACTER', 'RUBOUT', 'ED-EDGE', 'RND'
    the 'POINTERS' routine is again in its original (unpatched) format

These changes above made the Zeddy's BASIC more agile.
These changes above made the Zeddy's BASIC more agile.

What to find in the ZIP:
  • zx81x2.rom - the new ROM image file;
    zx81x2m.rom - for ZXmore (wo. 3T-patch);
  • zx81x2.asm - the assemby listing of the renewed ROM;
  • tests folder - demo and test programs for zx81x2.rom

Finally let's see the BIG BANG (without the original soundtrack :( )

Enjoy,
Zsolt

:!:
EDIT: click here for the latest variant
:!:
(semi latest release downloaded 565 times)
Last edited by zsolt on Wed Jul 28, 2021 12:28 pm, edited 4 times in total.
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: ZX81X2.ROM - and the big bang

Post by Andy Rea »

Fabulous stuff indeed... cant believe you made that massive increase in speed :ugeek:

regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZX81X2.ROM - and the big bang

Post by Moggy »

Superb work Zsolt, time to fire up the EPROM burner! :ugeek:
olofsen
Posts: 189
Joined: Wed Jan 08, 2014 12:29 pm

Re: ZX81X2.ROM - and the big bang

Post by olofsen »

Congratulations!!! :)
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: ZX81X2.ROM - and the big bang

Post by Andy Rea »

Moggy wrote: Sun Sep 23, 2018 12:58 pm Superb work Zsolt, time to fire up the EPROM burner! :ugeek:
I was wondering just the same... I have 2 zxpand and a zxpand+ was thinking i could cobble my olde zxpand with the zxpand patches and the improved rom. must see if Charlie has the source available for the 6.7 ( err maybe 6.6) rom available.

regards andy
what's that Smell.... smells like fresh flux and solder fumes...
McKlaud
Posts: 337
Joined: Tue Dec 19, 2017 10:02 pm
Location: St Albans, UK

Re: ZX81X2.ROM - and the big bang

Post by McKlaud »

My jaw hits the floor! :o :o :o

Congratulation Zsoft, you did amazing job.
Claudius
----------
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: ZX81X2.ROM - and the big bang

Post by nollkolltroll »

Really amazing work!
/Adam
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: ZX81X2.ROM - and the big bang

Post by Moggy »

Well just had to fire up the burner and see what all the fuss was about. :lol:

Having burned suitable EPROM courtesy of my Spectrum EPROM programmer I plugged in the EPROM and tried a few tests of my own.

First I tried a random chaotic fraction generator of my own device which, rather than use the zeddy inbuilt RND facility, relies in part on the logistic equation to achieve the desired end.

In short work out a fraction print at screen bottom, scroll up one rinse and repeat. As you may imagine this is rather slow but allows you to see if the numbers are chaotic with no obvious patterns.
Tried the new ROM version aaaannndd...

HELLS BELLS!! It goes like you know what off a shiny shovel, God this things fast. :lol:

I then tried my patent Lotto predictor based on the above which usually takes a year off to work things out then slowly print a nice display of numbers inside a grid. The new ROM version? light speed in comparison.

Long story short the maths functions are really improved speed wise and a couple of nice touches are a scroll that doesn't take all day to clear the screen when stopped and a cursor that appears nearly instantly on power up.


All in all a most splendid and more importantly useful addition to our favourite little wedge. :D

Excellent work Zsolt. :ugeek:
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: ZX81X2.ROM - and the big bang

Post by nollkolltroll »

Since the use of this requires a new EPROM anyway, burning a dual rom with a switch is a really good way to go. Speed from the new rom for most things, and a fallback to original rom if/whenever things mess up. Just fantastic!
/Adam
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: ZX81X2.ROM - and the big bang

Post by siggi »

Great :mrgreen:

Now I need to add my own patches (LOAD/SAVE/LPRINT/POKE) to the asm file to run it on my (slightly modified ;) ) Zeddies ..

Thanks for that big bang
Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
Post Reply