(Attributed APA-mode)

ZXNet echo conference «hardware.zx»

From Dmitry Malychev To All 9 November 2005

Hello Lethargeek Next thought: if APA graphics can run at the same speed as Spekovskaya, why do you need a separate SCF mode with its own logic on the video card - if can be customized regular APA mode for compatibility with standard Spec mode. In short, "I you gave birth to I’ll kill you" - (c) Taras Bulba. Instead of SCF, we implement “attribute-based” APA. The main difference from the usual "two-plane" APA is that it is read on the second line byte counts not as a “foreground” graphic, but as an attribute (essentially, the counter goes on different addresses). Moreover, the attribute applies only to two easily identifiable colors - white and black (111111 and 000000). That is, in each familiar place we have two “attribute-dependent” plus colors use the remaining 62 freely. Obviously, when moving along a line, for every eight 64-color pixels readable immediately six "attributes". This "redundancy" can be used like this - each "attribute" there will be consist of two bytes, with the second one used for compatibility only when mismatch their BRIGHT bits - it defines an additional three bits of the colors INK and PAPER, then yes There will also be 64 colors for INK/PAPER. Both FLASH and separate ones can be made. And separately included BRIGHT2, and even, probably, FLASH-color, although there is no need, in my opinion - where were they? Well, you can also add a hardware gigascreen - just switch automatically basicvideo memory pages on each new line. And since the “attribute bytes” are read in parallel, you can make separate attributes for two vertical halves of the familiar place, meaning the support of the quarters - and division attributes vertically is carried out as in the old version (see specifications). In total, four bytes out of six were spent. The remaining two can be used as sort of "flag" that determines whether the remaining (non-attribute-dependent) colors in the case, when INK=PAPER. And also for two vertical halves. In "compatibility mode" the "with replacement" entry is always enabled in all plane, that is everything is absolutely transparent to the old Spec software. Reading is possible or in general prohibit (there is a copy of the screen in RAM), or sum the planes by AND (then pixels the rest of the colors will turn out to be zero - PAPER) or OR (then units - INK). Plus The “ignore data” mode must be disabled, because in addition to ldirs yet all sorts of rr/rl [hl], set/res [hl] and rrd/rld perform both reading and writing to memory. The only negative compared to SCF-mode is only one image layer, without all sorts of quickly erasable sprites, but - all 64 colors and a complete absence of clashing, even between sprites. That is, the background will have to be restored, but when adapting branded don't care about toys- if Speck was able to display graphics before, he will be able to do it now. And there's always others video memory pages for the shadow video buffer, and it is not necessary to transfer him in main screen, you can do the opposite - flip the information board (surely less than game window) and simply switch the base page to display. When you can if you want tinker a little longer and adapt the game immediately to a normal “two-plane” APA-mode.