Page 5 of 6

Re: Need for speed - the ROM-patches

Posted: Thu Jan 19, 2017 12:10 pm
by Andy Rea
Not yet, hopefully I'll find time over the weekend.

Regards Andy

Re: Need for speed - the ROM-patches

Posted: Fri May 05, 2017 11:43 am
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

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 7:58 am
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

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 9:09 am
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

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 9:51 am
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 330 times
Regards
Siggi

Edit: The problem here is, that the origin of the PLOT coordinates has changed (after POKE 16418)

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 1:11 pm
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

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 2:44 pm
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

Re: Need for speed - the ROM-patches

Posted: Tue May 09, 2017 11:09 pm
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 347 times
Zsolt

Re: Need for speed - the ROM-patches

Posted: Wed May 31, 2017 9:29 pm
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

Re: Need for speed - the ROM-patches

Posted: Fri Aug 25, 2017 4:23 pm
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