[Oberon] FPGA - Display.Mod 4-bit colour

Jörg joerg.straube at iaeth.ch
Mon Sep 3 13:42:35 CEST 2018


Tomas

Great!
If I look at your screenshot, seems that your CopyPattern() does work in
most case but not in all.
Perhaps something is wrong with your shifting or with your colors or with
both...
Try to draw the same character (in the below case "E") at different x
positions.

  MODULE Test;
  IMPORT Fonts, Display;
  PROCEDURE Do*;
    VAR x, col, patE: INTEGER;
    BEGIN
      Fonts.GetPat(Fonts.Default, "E", x, x, x, x, x, patE);
      FOR x := 0 TO 7 DO
        FOR col := 0 TO 16 DO
          Display.CopyPattern(col, patE, 30+i+col*8, 20+i*11, Display.paint)
        END
      END
    END Do;
  END Test.Do

Do the "E"s display correctly in all cases?

br
Jörg

-----Original Message-----
From: Oberon <oberon-bounces at lists.inf.ethz.ch> On Behalf Of Tomas Kral
Sent: Monday, September 3, 2018 12:33 PM
To: oberon at lists.inf.ethz.ch
Subject: Re: [Oberon] FPGA - Display.Mod 4-bit colour

Hi,

As advised and encouraged by Joerg this is my first try at Oberon IN {0..3}
colour.

Please do not laugh :-) as everything is in yellow, except Log viewer,
(strange?), font render has problems, possibly some other flaws, I do not
see yet. I set these constants to make a switch to 4-bit.

I believe the white now truly is {0,1,2,3} = 15, rather than {0} = 1.
But changing it, would invalidate clients, making a different import KEY.

MODULE Display2;  (*NW 5.11.2013 / 3.7.2016, TK 30.8.2018 4-bit colour*)
  IMPORT SYSTEM, O := Out;

  CONST black* = 0; white* = 1(*5*);  (*black = background*)
    replace* = 0; paint* = 1; invert* = 2;  (*modes*)
    base = 0E7F00H;  (*adr of 1024 x 768 pixel, monocolor display frame*)
    (*base = 09FF00H;*)  (*adr of 1024 x 768 pixel, 4-bit colour display
frame*)
    ppw = 32(*8*); (*pixels per word*)  bpl = (*4*)128; (*bytes per line*)

--
Tomas Kral <thomas.kral at email.cz>



More information about the Oberon mailing list