fixing the zx81 graphics

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

fixing the zx81 graphics

Post by stefano »

I'm slowly progressing in fixing the zx81 graphics libraries.
After the rearrangements of the source tree a compound number of bugs made slightly difficult to identify the root cause (mostly because we had few concurrent problems).
Now it is easier.
The circle() functions had a couple of bugs in the 'narrowrez" section, both the normal and "af safe" versions of the functions were affected. I rewrote the latter adapting the standard one, now it is ROMable as well.
All the graphics modes are now reasonably set, but the pseudo-hrg module (which was never completed/ stabilised) and the Memotech one, which had a fragility already but worsened. I'm investigating.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: fixing the zx81 graphics

Post by stefano »

I succeded in building working programs in Memotech HRG mode, standard 192 rows.
The problem wasn't on the library, it was on the EightyOne emulator. On most of its versions it is necessary to disable the "Advanced Effects" flag in the "TV emulation" options set.

The 64 rows mode seems to be still failing, I'm checking furtherly.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: fixing the zx81 graphics

Post by stefano »

The "problem" on the 64rows mode turned out to be an untested, obscure feature I was never able to tune.
All the graphics modes on the ZX81 require customized video generation code.
To complicate things, z88dk requires all the video generators to be modified to preserve the IY index register (z88dk will refer to IX, but a swap of the index registers is later applied by Z80ASM, because IX and AF' on the ZX81 are reserved for the video generator itself), even the text mode is personalized.
The loops of this delicate elements were tuned by running sample programs on the real hardware connected to several different TV models, to be sure that the resulting timing of the picture scan was appropriate.
The Memotech HRG hardware is not very common, and I'm afraid I left it behind: the 192 rows mode was confirmed to be correctly working, but the 64 rows mode needs more tuning.
The EightyOne emulator works surprisingly well even regarding the TV raster emulation, but it is not enough: moreover, depending on the emulator version and on its configuration, the video picture generation behavior changes.
If a Memotech HRG owner is willing to volunteer for such tuning, it will be highly appreciated :)
Post Reply