[Oberon] Oberon System emulator for Windows
joerg.straube at iaeth.ch
Wed Feb 12 17:50:10 CET 2020
Back then when Michael wrote his emulator for the Internet browser, he took over my Display.color.Mod. (Link in Michael’s mail)
It works but is far from optimal. Let me explain: To render text, TextFrames.DisplayLine uses Display.CopyPattern for every character.
Oberon fonts are black and white = 1 bit. Colors can be rendered in two different ways
1. Organize your memory in several 1 bit planes. Then CopyPattern() just copies the 1bit pattern to every color plane individually.
2. Organize your memory that 1 pixel uses N contiguous bits. Then 1bit patterns have to be stretched to N bits
While adapting VID.v I decided for memory approach 2). With the consequence that CopyPattern() had to stretch the 1bit pattern.
With every call to CopyPattern() the 1bit black and white character pattern is stretched. In my case to 4 bits as I use 16 colors.
An optimized approach would be that Fonts.Mod stretches all font patterns only once (e.g. by calling an imaginary Display.NewPattern()), and CopyPattern() only copies the stretched “colorized” pattern to screen and doesn’t have to redo the character stretching over and over again. But this approach would have changed the API of Display.Mod, what I didn’t want to do.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon