[A86] Re: The f'n 86 screen


[Prev][Index][Thread]

[A86] Re: The f'n 86 screen





On Monday, October 01, 2001, David wrote:

> Ah, yes, you are correct.  Again, more proof that the timer interrupt, or
> rather the same hardware that generates the timer interrupt, also controls
> the screen refresh.

> Btw, what ever happened with your fancy grayscale routine?  What ended up
> working out the best?

The standard techniques in use now for getting 1:2 and 2:3 mixing
ratios are probably the best you can do...

I had tried at one point to write a 1:1 routine, with either plane
having a different contrast.  It worked to some extent; there should
be a demo of it in the list archives somewhere...  the problem was if
you used a complex image, it would over-stress the video hardware (or
something, I dunno) and lines would start to disappear.  I think Kirk
picked up on the idea but never got it to work either...

The "over-stressing" effect (again I don't really know what the deal
was with it) is the same thing that happened to the guy who started
this thread (he sent me his program) -- he was having a column fade
out where all his sprites were being drawn.



Anyway, some other stuff regarding port 3...

One interesting thing I found out you can do is to put this code at
end of your interrupt routine, instead of the normal stuff...

        ld a,%00001000
        out (3),a
        ld a,%00001011
        out (3),a

The only benefit is that it's a couple bytes shorter...
For the interested, I'll try and explain what's going on.  When an
interrupt occurrs, you have to write to port 3 and tell the hardware
"ok, good job" by turning off whichever type of interrupt it was.
Otherwise things get ugly...  Of course you then have to turn the
interrupt back on if you want things to continue working.

The routines in the rom work like this....

        in a,(3)        ;ok, let's see what kind of interrupt it was
        rra             ;was it an ON-key interrupt?  (bit 0)
        adc a,9         ;if it was ON-key interrupt, ld a,%00001010
                        ; otherwise assume it was a timer int:
                        ; ld a,%00001001
        ;now you notice %1010 turns off the ON-key interrupts (bit 0)
        ;and %1001 turns off the timer ones (bit 1)

        out (3),a       ;so turn off whichever one it was...
        ld a,%00001011  ;now turn them both back on

What I figured is that it doesn't matter if you turn off the one that
didn't occur, so it's simpler just to turn them both off and be done
with it.  But like I said, there's no benefit other than saving a
couple bytes...

-- 
Aaron was here.
acurti1@umbc.edu