[Oberon] Oberon System emulator for Windows

Joerg joerg.straube at iaeth.ch
Wed Feb 12 17:50:10 CET 2020


Wojtek

 

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.

 

br

Jörg

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200212/9994f50c/attachment.html>


More information about the Oberon mailing list