Need for speed - the ROM-patches

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Need for speed - the ROM-patches

Post by Andy Rea »

Not yet, hopefully I'll find time over the weekend.

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
siggi
Posts: 1028
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi »

zsolt wrote: Wed Jan 11, 2017 4:32 pm Hi,

Do you remember this BASIC trick: nnnn POKE 16418,0 (where the 'nnnn' is a BASIC line number) ?
Using this trick, you can write on entire screen - the zeddy accepts the PRINT AT 23,xx

But :!: What about PLOT and SCROLL :?:
The PLOT origin (0,0) does not change - see on the picture below - the SCROLL destroys the system.

Hi Zsolt
I am using the SG81_D in one of my ZX81NUs (having it patched to use the ZX81NU-USB-Interface for LOAD/SAVE from stick):
http://forum.tlienhard.com/phpBB3/viewt ... 327#p28514

The NU now runs quite fast :mrgreen: , but some programes/games don't run properly (corrupted screen. e.g. C-compiled programs like DARKSTAR), probably caused by the PLOT/SCROLL/PRINT_AT enhancements :(

So would it be possible to keep speed enhancements and new (not backward compatible) features in distinct ROM images (separate "branches")?

Regards
Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt »

siggi wrote: Fri May 05, 2017 11:43 am So would it be possible to keep speed enhancements and new (not backward compatible) features in distinct ROM images (separate "branches")?
Hi Siggi,
:?: :o I think it would be better to find out what is causing the problems. I will test the DARKSTAR. Which programs are still affected?
Regards,
Zsolt
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
User avatar
siggi
Posts: 1028
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi »

Hi Zsolt
one of my "feature requests" to the Z88DK developers was, to keep printing to screen using a C program compatible to printing to screen by a BASIC program:

https://www.z88dk.org/forum/viewtopic.php?id=4749

So I think, that all C programs compiled by Z88DK (after that print problem had been fixed) will not run properly on SG81D, where the print/plot origin/screen size is different to standard BASIC (where Z88DK fits to).

I will check also my old BASIC-programs, which use the POKE 16418 and PRINT AT ....

Regards
Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
siggi
Posts: 1028
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi »

Hi Zsolt
this is one of my old programs(AUTORENNEN/car race), which also now does not run properly on SG81D: it uses full screen to PRINT AT (to show the edge of the racetrack) an uses PLOT to indicate the position of the car on the racetrack. Now mixing of PLOT and PRINT_AT gives a different screen on SG81D than before.
autorenn.p
(5.65 KiB) Downloaded 395 times
Regards
Siggi

Edit: The problem here is, that the origin of the PLOT coordinates has changed (after POKE 16418)
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt »

Hi Siggi,

I did try the different versions of the dark star on EO and they worked well - not found the mistake.
Then i played with your program, and yes, you are right: the UNPLOT is not working. :o :cry:
I try to solve the problem as soon as possible.
Regards,
Zsolt
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
User avatar
siggi
Posts: 1028
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi »

siggi wrote: Fri May 05, 2017 11:43 am So would it be possible to keep speed enhancements and new (not backward compatible) features in distinct ROM images (separate "branches")?
Hi Zsolt
beside the problem of UNPLOT: due to the changes in the PLOT/UNPLOT commands (after POKE 16418,0), which moves the origin of the PLOT coordinates (down 2 lines or 4 plot pixel), old programs (using that POKE 16418) running on new SG81D will plot to different locations than before (using ZX81 rom). Thus the PLOT/UNPLOT-commands are not backward compatible.

But PRINT AT is is backward compatible: old programs write to the same screen position on ZX81 rom and SG81D rom, because the origin of PRINT AT coordinates is not moved, only the range has been extended.

Siggi

PS: I will post the DSTAR, where I had problems, later this evening ...

PS2: Sorry, I have not yet found that DSTAR version (lowres TEXT, not hires! ) which failed at SG81D-rom
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt »

The backward compatibility is appreciated, so the plot-mod is removed - but i don't give up, i will find the solution for the "full-screen" (64 x 48) plotting. :D
SG81_d1.zip
Enjoy,
(82.21 KiB) Downloaded 409 times
Zsolt
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
User avatar
stefano
Posts: 592
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Need for speed - the ROM-patches

Post by stefano »

IIRC the z88dk display driver was adapted by simply using the same system variables for current position.

My cent on the ideas for an optimized Rom: the lambda changed the fp calculator engine and made it more compact, thus saving some byte
User avatar
siggi
Posts: 1028
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi »

zsolt wrote: Tue May 09, 2017 11:09 pm The backward compatibility is appreciated, so the plot-mod is removed - but i don't give up, i will find the solution for the "full-screen" (64 x 48) plotting. :D
SG81_d1.zip
Zsolt
Maybe you could leave the origin of PLOT coordinates as is and address the new PLOT pixels using negative numbers (-4..-1 for the lowest 2 text lines)?
That would be compatible to all existing programs, which use values >=0 for PLOTting. I think, that most of the existing programs do not use the "mirrored" PLOT coordinates by using negative values ...

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