Page 2 of 6

Re: Need for speed - the ROM-patches

Posted: Sat Mar 17, 2012 8:28 pm
by Andy Rea
Thanks for digging that out siggi, i'm gonna patch an image of the ZX81 rom with these and see what happens ;)

Andy

Re: Need for speed - the ROM-patches

Posted: Sat Mar 17, 2012 9:02 pm
by Andy Rea
Siggi,

I looked with interest at the 3T NMI patch which i shal implement, but was most interested to read at the end of the article about using an 'external' counter to trigger the NMI just twice during SLOW mode, this would require more patching to ensure the alternate AF pair is loaded with $FF so that a single NMI will kick the Vsync or Video routines into action.

Did anybody ever try this ?

Of course it would also mean that 'demo' programs that manipulate the display would no longer work... but a 24% speed increase looks tempting...


Andy

Re: Need for speed - the ROM-patches

Posted: Sat Mar 17, 2012 11:50 pm
by siggi
Andy Rea wrote: Did anybody ever try this ?
Sorry, I don't know (I came later to the team in 2004). But maybe you could ask Peter (at Mahlerts)?

Siggi

Re: Need for speed - the ROM-patches

Posted: Mon Mar 19, 2012 7:38 pm
by zsolt
Yesterday I tested the QCOM1-patch and it is very cool :D
the source file of the modified rom and the test programs you can find in the attachment
the source file of the modified rom and the test programs you can find in the attachment
patch_tst.png (11.77 KiB) Viewed 4856 times
Many thanks to Siggi and of course to Ludwig!

What about the FP-patch, mentioned by the editor at the end of the article?
Regards,
Zsolt

Re: Need for speed - the ROM-patches

Posted: Mon Mar 19, 2012 11:04 pm
by Andy Rea
Cool work as always Zsolt, i'm gonna give those roms a go in the Crazy 17.7Mhz Zeedy and see what results i get with CLCKFREQ.

Thanks for taking the time to do it, saved me the hassle :D

regards Andy

Re: Need for speed - the ROM-patches

Posted: Tue Mar 20, 2012 9:29 am
by siggi
zsolt wrote: What about the FP-patch, mentioned by the editor at the end of the article?
I asked Peter about that. Hope he has some information ...

Siggi

Re: Need for speed - the ROM-patches

Posted: Tue Mar 20, 2012 7:25 pm
by PokeMon
I have some idea, not proofed now but maybe you can think about.
The CPU takes a HALT and wait for interrupt in SLOW display mode.
This is not very effective.
But CPU does execute any instruction with bit 6 set, so could be used a RET instruction instead of HALT to jump back and continue program work till interrupt comes.
This would add significant process time in slow mode with combination empty DFILE.

So a CALL is needed instead of a JP (HL) and the address on stack to continue BASIC (or machine code) program.
A CALL instead of a JP would add about 8 more cycles (=2 chars) and the RET about 12 more cycles (=3 chars).
This trick would add instruction time of about 27 chars * 1,2 us = 32us per display line (empty screen).
So in one frame could be added process time of about 6ms / frame which is about 30% faster.
In fact the effect is more because the program can calculate in non displayed area till new line (HSYNC) which would add about 10us more, so effect could be up to 40%.
No in true its more because you have to calculate to normal process time in slow mode. Should be double speed minimum.
Worth a try ! ;)

Have to do follwoing changes:
Allow collapse DFILE anyway with more memory
Adapt ROM routines for display
Check of registers used

Maybe this would be a big patch but could give impressive speed in slow mode with some display output (okay full screen make no sense).
So if somebody have time, this would be a great job. :shock:

Re: Need for speed - the ROM-patches

Posted: Wed Mar 21, 2012 11:03 pm
by siggi
siggi wrote:
zsolt wrote: What about the FP-patch, mentioned by the editor at the end of the article?
I asked Peter about that. Hope he has some information ...

Siggi
Peter sent me an old mail (dated 2002) about that topic. Here is the mail from Ludwig:
Hallo Peter,

ich habe mein altes QCOM ganz neu überarbeitet und möchte es
der Öffentlichkeit zur Verfügung stellen. QCOM ist eine BASIC-
Erweiterung, die dem Interpreter die Zeilen-Sucherei abnimmt.

Jetzt existieren 2 Versionen:

QCOM1, die Minimal-Version, bei der man nur 6 Bytes im ROM
patchen muß

QCOM2, die Voll-Version, die nicht ins 8KB-ROM passt.

(QCOM3 ist dann noch ein Zusatz-Programm zu QCOM2 nur fuer
Programme mit berechneten Zeilen-Nummern)

In der ZIP-Datei findest Du Beschreibungen, Quelltexte, fertige ROMs,
XTender2-Dateien und BASIC-Beispiele.

Nicht von mir ist MC2-DEMO, und ich habe zur Assemblierung auch
den Quelltext des ZX81-ROMs von Geoff Wearmouth benutzt.

Ein 'Abfall-Produkt' sind die 2 Patches:

Der 3T-Patch ändert den NMI und gehört zur Kategorie Tips&Tricks.

Der FP-Patch ändert Teile des RST 28H.

Ich musste leider alles mit dem Emulator testen. Bitte teile mir mit, wenn
etwas nicht funktioniert oder unverständlich ist.

Tschüss,

Ludwig
And here is more information. About the FP/RST28 patch only some information (not the source) is given. But I think, it is obsolete with the SG81 rom:
QCOM.zip
(68.58 KiB) Downloaded 158 times
HTH Siggi

Re: Need for speed - the ROM-patches

Posted: Mon Mar 26, 2012 10:33 pm
by Andy Rea
Whilst at Mahlerts enjoying the fantastic company of our German ZX-team Brothers, i had chance to try out CLCKFREQ.P with the SG81_B.ROM as posted by SZOLT above, the folowing results were great knocking a further 42 Frames off an already fast zeddy :D

with a completely normal zx81rom runnung in SuperTurbo i used to score 262 FRAMES

result with SG81_B.ROM
Image

Could this be the fastest Zeddy Alive.

Regards Andy

Re: Need for speed - the ROM-patches

Posted: Wed Sep 26, 2012 8:36 pm
by Andy Rea
Yes !!!! I've done it... 20Mhz :D

http://www.youtube.com/watch?v=gN4DbRwSXO8

Based very much on the uber Zeddy that is a modified issue 1 board, this one is built on protoboard, has a 40Mhz master Osc, which is divided by 2, for 20Mhxz, by 6 for 6.66Mhz (instead of 6.5) and divided by 12 for 3.25Mhz, it has 128K fast Sram (10 ns, but i reckon 35ns shoudl still work ) some extra logic for clock switching without Glitches.

Gotta try the SG81 rom in it, and the Qcom patches, and recode the wait logic to include Wilf's wait mod... then this sucker will really rock.

Only problem now is that the ay chips require a relatively long write pulse so i'm thinking i will add some auto-wait states for IO activity when running in turbo, this should have minimal impact since as your unlikely to be doing intensive io all the time.

Regards Andy