Hi Zsoltzsolt wrote: ↑Wed Jan 11, 2017 4:32 pmHi,
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.
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 , 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")?
I think it would be better to find out what is causing the problems. I will test the DARKSTAR. Which programs are still affected?
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:
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 ....
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.
Edit: The problem here is, that the origin of the PLOT coordinates has changed (after POKE 16418)
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.
I try to solve the problem as soon as possible.
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.
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 cent on the ideas for an optimized Rom: the lambda changed the fp calculator engine and made it more compact, thus saving some byte
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 ...