Hacker News new | past | comments | ask | show | jobs | submit login

Now that the Atari ST part of the article is out as well, I'll add some corrections regarding ST graphics format. The article states that "There are no bitplanes here like on the Amiga we saw in the previous entry." This is slightly inaccurate. ST does have bitplanes, but the organization is interleaved to 16 bit words, unlike on Amiga where the bitplanes are stored as separate memory regions.

So in 1 bpp hires mode, there's just a single bitplane (and the memory layout is identical when comparing to Amiga 640x400 interlaced hi-res 1 bpp screen mode). In 2 bpp medium res (640x200, 4 colors), there are two bitplanes, alternating bitplanes for every 16-bit word. So 16 bits of bitplane 0 for the first word, then 16 bits of bitplane 1 for the second word (these together form the first 16 pixels), and so on. In the 320x200 low res mode there are four bitplanes interleaved in the same way.

What this means from the programmer's perspective is that you can do similar bitplane tricks as with Amiga, e.g. modify just one of the bitplanes independent of the others. For instance effects where car headlights change the background image colors can be done the same way on both machines: render to just one bitplane and use the palette to achieve the change in colors.

However, when with Amiga it's trivial to modify bitplane pointers independent of each other to scroll graphics around, on Atari ST all bitplanes are tied to the same base pointer (because they are interleaved in the memory). (And to make things like full-screen scrolling even more difficult, this base pointer is aligned to 256 bytes, i.e. the low byte of the video memory base address is always 0 on Atari ST - on STE this is programmable.)

There are some cases where the interleaved bitplane format gives benefits: while neither of the machines are good for writing texture mappers (or other effects that require manipulation of single pixels), it's slightly more efficient on Atari ST because the layout allows some tricks (e.g. using MOVEP instruction to write 8 pixels to all 4 bitplanes at once from a single 32-bit register).

From the point of view of a game like Another World, the bitplane arrangement of Atari ST doesn't really cause additional problems when comparing to the Amiga. The issue is the lack of blitter (and STE blitter isn't that great improvement, it doesn't have the line drawing capabilities of Amiga blitter and has less flexible src/dst mechanism, so no wonder it isn't utilized by the game).




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: