Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You probably mean mode 13h - 320x200x256 colour. Mode X is actually similar in some ways to the Amiga's bitplanes because it uses a planar memory arrangement. This is actually quite useful for fast drawing of pixels because in Mode X for example you can draw four pixels at once with one write.


> Mode X is actually similar in some ways to the Amiga's bitplanes because it uses a planar memory arrangement.

Mode X does not separate bitplanes. With Mode X, you don't need to write to 8 memory addresses to completely change a single pixel. (In the worst case, you needed one slow "out" and one fast "mov" instruction, if you wanted completely random access. However, no one ever did this, because you could simply draw every 4th pixel once for each bank, requiring just 3 (or 4) bank switches per frame.)

Mode X is nothing like Amiga bitplanes.

Also in Mode X each byte does correspond to a pixel on screen, it's just banked in 4 banks.

Mode X it interleaves framebuffer pixels into four banks. Top-left pixel at coordinates 0, 0 is in bank 0, next right is in bank 1, etc. until pixel at coordinates 4, 0 is again in bank 0.

You could also write same pixel to all banks at once (or in any combination).

On Amiga, bitplanes worked very differently. They were basically layered "2-color" bitmaps, one bit corresponds always to one pixel. 1 to 6 bitplanes (or 1-8 for AGA) could be combined to form 2^1 to 2^8 colors. So for example for 256-color display, you actually had to set eight bitplane pointers.

This type of bitplane arrangement made setting a single pixel very slow. You had to rotate desired color value bits and mask & set corresponding pixel in 8 different memory addresses...


Ah right, I think I was confusing it with EGA, where you have one bitplane for each colour component.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: