Hey there, just trying to figure out a way to do the blink ANSI attribute on MSX2ANSI library...
jANSI has it, but it is "limited"... It just wipe out the possibility of light white (a kind of grey, white without bold), being that it is always bright white, and exchange this for opening the space on the palette for a "blink color", so text with blink attribute will have the current foreground color copied to blink color and a backup, and jANSI is hooked to vdp interrupts and after few interrupts it exchange blink color by the background color, and vice versa (in the palette).
This is limited, as it will allow blinking only correctly for the last attribute set (i.e.: red, blink, RED BLINKING TEXT, blue, blink, BLUE BLINKING TEXT, all text that should blink will blink as blue and with the other color being the backgroun of blue....) and also do not allow light white, that is a grey a little bit different than light black...
I kind of do not like this approach for msx2ansi, mostly because some ansi art can use the difference between regular white, bright white and bright black, and also, implementing a hook on a library would complicate things quite a bit and might cause undesirable results for whoever uses the library.
So I was thinking of using the alternate display of pages, setting the odd page in R#2 and updating page 0 and 1 at the same time, with the difference that page 0 would not have blinking text "printed", so using R9 bit 2 and programming an interval in R#13 and VDP would switch every second or so between pages, making the blinking text blink... This looks great and amazing right? All colors would blink properly on their own background, would not loose regular white...
Except that this would prevent scrolling nicely using register 23... To use it (like msx2ansi actually uses), you need to use all 256 lines in the page, and that means 256 * 512 / 2 (as screen 7 uses 1 byte for 2 pixels), so, if you do this in the two pages (as VDP will just change the page, offset rendering would be the same), where do you store your sprite pattern and palette? All 128KB of VRAM are being used and at some time, you will end-up messing with the table as you start writing on lines >212.... So the sprite cursor goes to hell and some more sprites could start to show as the patterns and palletes get messed up...
So, I did not even checked what would be the performance difference by updating two pages at the same time (as there will be a performance hit, for sure, every operation needs to be done on the two pages, except blinking characters, which are not usual), just lost the motivation doing this blinking attribute on MSX2ANSI...
As usually having other people oppinions can bring fresh (and better) ideas, anyone has a different idea on how to implement this without hampering the performance or losing a color and hooking to VDP interrupts? At this point I'm just thinking that this blink attribute is not worth all this trouble for a multi-purpose library...