On Monday 11 December 2000 11:46, you wrote:

> > So in SCREEN8 the formula to get the address of a pixel is:
> > (taken from modified V9938.c)
> > #define VDP_VRMP8(X, Y) (VRAM + ((X&1)<<16) + ((Y&511)<<7) +
> > ((X&255)>>1))
>
> So when OUT (#98) is done the address latch is remapped like:
>
> remapped = ((address&1)<<16)|(address>>1);
>
> Correct?

Correct.

> > SCREEN7 reorder is more difficult to implement than SCREEN8, because what
> > appears to be a byte to the programmer is actually spread over two VRAM
> > locations. For example, when a byte is written through port #98, it must
> > be split into two nibbles which end up in different VRAM locations.
>
> In the define above, (X&2) is unused; I assume this determines whether the
> high or the low nibble is used. Probably if (X&2) is set, it is the low
> nibble (bit 3 - bit 0) and if it's not set, it's the high nibble (bit 7 -
> bit 4).
>
> Is that correct Maarten?

I have some doubts about the way I described SCREEN7. I can't get the pixel 
reorder working, which could be an implementation error, but could also mean 
I got the algorithm wrong.

Bye,
                Maarten

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to