Re: A92: Gay Scale


[Prev][Next][Index][Thread]

Re: A92: Gay Scale



Adam King wrote:

> To digress from the subject of Fargo II and TI-92+, I have a question
> concerning gray-scale rutiens.
>
> I am trying to write my own rutien to do gray scale.  When I try to
> move
> three bit planes to $4440 in order, to produse gray, they look like
> they are
> being scaned onto screen one longword at a time, insted of being
> blended
> together.  Is there a faster way to have the bit planes pointed to?
> Also,
> I have turned off all the interupts to increase the speed but it
> didn't
> work.  I've also read something to do with screen refresh rates.  Does
> that
> have something to do with gray scale?
>

I don't know, how graylib creares grayscales, but I can write you, how I
made it:
therefore you need the port at address $600010, where the address of the
LCD memory, divided by 8 is stored.
If you want to have 4 grayscales, you will only have to create one more
plane, because you can use the normal LCD mem., too.
The method is the following:
 you allocate the memory block for the 2nd plane.
 You find out the first 8-dividable address in this block
 you write $4440/8 to $600010, pause some time, than you write the
address of plane 8 divided by 8 to $60010, and pause half the time,
$4440/8 was shown.
The result is, that all, which is black in plane 2 is shown lightgrey,
all in plane1 ($4440) is shown dark grey, what is black in both planes,
is black, and what is white in both, is white.
The switch between the two planes can be made by a subroutine, linked to
AutoInt 1.
because the screen is refreshed every 4th time AutoInt 1 is triggered,
you can show plane 1 for 8 cycles, and plane 2 for 4.
This produces very good grayscales (you actually see no flickering).. If
you want to do it with 3 planes, plane 3 will have to be shown 4 cycles,
plane 2  8 cylces and plane 1 16 cylces. I tried this, too but the
result was very bad. It is flickering very much.

excuse my bad english, I know it's not perfect.

PS. If you want to have my graylib, mail me personaly


References: