Attributes and colour inversion
Posted: Wed Jan 12, 2011 6:29 pm
I'm working on a prototype in Basic to figure out the routines and display methods with a view to moving to assembly or C with the OSDK.
Please excuse the inaccuracies in the following images as I knocked them up very quickly in paint.net just for example, they're not a true reflection of the Oric display.
Am I correct in thinking that with the standard Oric colour attribute system, I have to give up an entire character width to a colour change?
I think that if I have a 'forground' tree on the left of the screen, its trunk colour will be retained and bleed into the next character square if I place a smaller background tree immediately to its right thus:
In the above image, the tree in the background should have green at its top, but being within one character of the foreground tree its had the effect of assuming the colour attribute of the trunk to its left.
I think this is how the Oric display would work.
Reading this:
http://www.defence-force.org/download/c ... nglish.txt
I discover that magenta and green are inverse colours.
As the colour attribute is set by bit 7 and the inverse attribute is set by bit 8, can I flip the inversion bit on the character square containing my background tree top and still put pixel data into the character square to give the following result?
Is this correct, or does flipping the inversion bit 8 also require a full character width as with changing the paper/ink colours?
If inversion works, I can simply set the main ink colour to magenta and flip the inversion bit on any area that requires green. This would make things much simpler, so it seems too easy.
Please excuse the inaccuracies in the following images as I knocked them up very quickly in paint.net just for example, they're not a true reflection of the Oric display.
Am I correct in thinking that with the standard Oric colour attribute system, I have to give up an entire character width to a colour change?
I think that if I have a 'forground' tree on the left of the screen, its trunk colour will be retained and bleed into the next character square if I place a smaller background tree immediately to its right thus:
In the above image, the tree in the background should have green at its top, but being within one character of the foreground tree its had the effect of assuming the colour attribute of the trunk to its left.
I think this is how the Oric display would work.
Reading this:
http://www.defence-force.org/download/c ... nglish.txt
I discover that magenta and green are inverse colours.
As the colour attribute is set by bit 7 and the inverse attribute is set by bit 8, can I flip the inversion bit on the character square containing my background tree top and still put pixel data into the character square to give the following result?
Is this correct, or does flipping the inversion bit 8 also require a full character width as with changing the paper/ink colours?
If inversion works, I can simply set the main ink colour to magenta and flip the inversion bit on any area that requires green. This would make things much simpler, so it seems too easy.