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: 1264
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Need for speed - the ROM-patches

Post by Andy Rea » Thu Jan 19, 2017 11:10 am

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

Regards Andy
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

User avatar
siggi
Posts: 752
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi » Fri May 05, 2017 10:43 am

zsolt wrote:
Wed Jan 11, 2017 3: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
http://zx81-siggi.endoftheinternet.org/index.html

User avatar
zsolt
Posts: 153
Joined: Wed Apr 20, 2011 10:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt » Tue May 09, 2017 6:58 am

siggi wrote:
Fri May 05, 2017 10: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

User avatar
siggi
Posts: 752
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi » Tue May 09, 2017 8:09 am

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
http://zx81-siggi.endoftheinternet.org/index.html

User avatar
siggi
Posts: 752
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi » Tue May 09, 2017 8:51 am

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 15 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
http://zx81-siggi.endoftheinternet.org/index.html

User avatar
zsolt
Posts: 153
Joined: Wed Apr 20, 2011 10:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt » Tue May 09, 2017 12:11 pm

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

User avatar
siggi
Posts: 752
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi » Tue May 09, 2017 1:44 pm

siggi wrote:
Fri May 05, 2017 10: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
http://zx81-siggi.endoftheinternet.org/index.html

User avatar
zsolt
Posts: 153
Joined: Wed Apr 20, 2011 10:43 am
Location: Fót, Hungary

Re: Need for speed - the ROM-patches

Post by zsolt » Tue May 09, 2017 10: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
Enjoy,
(82.21 KiB) Downloaded 17 times
Zsolt

User avatar
stefano
Posts: 336
Joined: Tue Dec 11, 2012 8:24 am
Contact:

Re: Need for speed - the ROM-patches

Post by stefano » Wed May 31, 2017 8:29 pm

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: 752
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: Need for speed - the ROM-patches

Post by siggi » Fri Aug 25, 2017 3:23 pm

zsolt wrote:
Tue May 09, 2017 10: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
http://zx81-siggi.endoftheinternet.org/index.html

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests