[Oberon] Project Oberon color

Jörg Straube joerg.straube at iaeth.ch
Sat Dec 9 04:27:23 CET 2017


Hi

> From TextFrames.DisplayLine:
> Display.CopyPattern(R.col, patadr, X + x, Y + y, Display.invert)
> 
> So on white background with black characters, you see exactly nothing.
> 
When introducing colors to the FPGA Oberon system you indeed have to do change the line above to
Display.CopyPattern(R.col, patadr, X+x, Y+y, Display.paint)

But even here it can happen that you don‘t see anything if you write with red font on red background...
BTW: there is some room for interpretation how to map the 0 in B/W patterns... What to do with 0 and the following modes:
- paint: leave screen or set to bg color?
- replace: leave screen or set to bg color?

In my color implementation „paint“ and „replace“ are treated identically and the 0 leave the screen untouched.

> Is there a flexible/standard solution for these kinds of problems?
If yo really want TextFrames to work with B/W and color, you have to detect the nbr of colors from Display and set the mode accordingly.

> Also, is there a standard to inititialze the colors?
Every OS is free to use the colors as it likes. If you port an application from Linux to Windows to macOS and the application uses absolute colors, there is no need for a standard as the application defines the colors (eg 24bit RGB)
If however the OS offers indexed colors, the application only uses indices in a color table, and the color table is NOT initialized by the application itself, then the application looks differently on the different OS.

I enhanced NWs original PO on FPGA from B/W to 16 indexed colors (by changing Verilog source and Display.Mod) and initialized the color table with these Master Color Values: (table 1)
http://www.gno.org/pub/apple2/doc/apple/technotes/iigs/tn.iigs.063

> Frankly, I am absolutely fascinated by the compiler but less exited by the System. Sometimes I really wonder that it works at all.
The fascinating bit of the Oberon System is that it is so small: A working OS <111 kB (without compiler)

> From Texts.Load:
> q.voff := ASR(LSL(bt, -24), 24);

Thats the „standard“ way to upscale a signed 8bit vale to a signed 32bit value😊
It’s equivalent to
IF bt<127 THEN q.voff := bt ELSE q.voff := bt-256 END;

Jörg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171209/0793ad41/attachment.html>


More information about the Oberon mailing list