[z88dk-dev] Gray.. thoughts

Bridge to the z88dk-developers mailing list
Post Reply
Stefano Bodrato

[z88dk-dev] Gray.. thoughts

Post by Stefano Bodrato »

I'm re-arranging most of the gray code:
- most of the gray graph functions are based on the existing functions;
they call them twice... but do the work; to keep them as much portable
as possible, I'm calling the page function instead of doing the thing
directly;
- there will probably be two different "tricks" to get the gray stuff on
different platforms: the first (what we are using at the moment) swaps
the base_graphics address and uses the IM 2 mode to "interlace" two
pictures. The trick could be a pixeladdress function change; this would
permit a sort of "dither" on B/W displays and color changes on computers
with a color display (The ZX Spectrum must be seen as a mono computer,
in this case...).
- With both the tricks current gray functions should work.
- I also exchanged the gray pages order; now the base one (page 0) is
the darker;
- Let me do some test and cleaning and I'll send the baby.
User avatar
dom
Well known member
Posts: 2091
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

On Tue, 13 Mar 2001, Stefano Bodrato wrote:

I'm re-arranging most of the gray code:
- most of the gray graph functions are based on the existing functions;
they call them twice... but do the work; to keep them as much portable
as possible, I'm calling the page function instead of doing the thing
directly;

That's the sensible thing to do IMO. It may be slightly slower, and for
speed someone could write a specific version for a machine, but if it's
generic then we could do it.

- there will probably be two different "tricks" to get the gray stuff on
different platforms: the first (what we are using at the moment) swaps
the base_graphics address and uses the IM 2 mode to "interlace" two
pictures. The trick could be a pixeladdress function change; this would
permit a sort of "dither" on B/W displays and color changes on computers
with a color display (The ZX Spectrum must be seen as a mono computer,
in this case...).

Interlace on the Spectrum/swapping the screens around on a 48k machine is
*extremely* machine intensive - I did this (by mistake) a few years ago in
Crystal Kilodemo - part 3, the scrolly up thing - ISTR it caned the
machine somewhat.

A nice way to do it however is with the second screen in page 7 on 128k
spectrums - all you have to do is toggle one bit in port 32765 and you can
swap between them. But then you get into the nightmare of ensuring that
your paging works correctly and code isn't paged out - perhaps we should
implement a fetch/store byte routine in the Spectrum startup code to avoid
these problems?

Sadly, I don't think this sort of trick is possible on the z88 - if I get
some time I might give it a go though and see if we can get double res and
hence some grey.

d.




_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Stefano Bodrato

Post by Stefano Bodrato »

That's the sensible thing to do IMO. It may be slightly slower, and for
speed someone could write a specific version for a machine, but if it's
generic then we could do it.

Massimo Morra (a friend of mine... the fill code author) said he got full
hi-rez colour display on the spectrum (a pixel - a color !) but no space was
left to run the programs.


Interlace on the Spectrum/swapping the screens around on a 48k machine is
*extremely* machine intensive - I did this (by mistake) a few years ago in
Crystal Kilodemo - part 3, the scrolly up thing - ISTR it caned the
machine somewhat.

Should it work on the 3rd part of display ?


A nice way to do it however is with the second screen in page 7 on 128k
spectrums ...

Cool. let's just wait for some software from the TI community... ;-)
Ah! where are the demos Henk told about ?


Sadly, I don't think this sort of trick is possible on the z88 - if I get
some time I might give it a go though and see if we can get double res and
hence some grey.

I'd suggest to try it anyway. Maybe with lower resolutions (96 or 128
horizontal pixels).
If you are unsuccesfull, dither will work, anyway.

TODO:
- TI85 and TI86 support.
- VZ200 :oP
- ZX Spectrum
- Z88
- g_fill
- g_point (I'm working at it. Gray code will be much more useful with this.)
- Gray sprites. It seems to me there's a gray sprites editor for the GBDK...
- Libraries to port from GBDK

I don't mean I'm going to do this all.. any help is welcome !!


_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Henk Poley

Post by Henk Poley »

A nice way to do it however is with the second screen in page 7 on 128k
spectrums ...

Cool. let's just wait for some software from the TI community... ;-)
Ah! where are the demos Henk told about ?

What demos ??? (serious...)

And yes, awaiting something from the Ti community, nah...
They are a bit of die-hards on asm (especialy there own programmed games).

Maybe I should make a "complot" with NickD (owner of the TiCalc.org, if I'm
not mistaken), that everyone who searches in the "Z80 assembly
help"-directories gets a banner of the z88dk + link :)

We just need users, then the rest will come to us (I hope...)

Henk Poley


PS: Doesn't this look like Microsoft's strategy??? ;-()

_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Post Reply