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

Jörg joerg.straube at iaeth.ch
Tue Oct 2 11:23:06 CEST 2018


Tomas

Some history: In Native Oberon the "several video drivers" topic was solved somewhat similar.
There were nine different implementations of Display. The files were called
- Displays.Display.Mod
- Empty.Display.Mod
- GD54xx.Display.Mod
- S3C805.Display.Mod
- S3C924.Display.Mod
- S3Trio.Display.Mod
- SVGA.Display.Mod
- VGA.Display.Mod
- W32.Display.Mod

All had the same interface (CONST, TYPE, VAR, PROCEDURE) but different implementations corresponding to the chip of the graphics card.
In Native Oberon, Kernel.Mod offered routines to read configuration strings provided by the boot loader. (see also Oberon.Text)
You configured a prefix (eg "S3Trio." ) to match your HW, Modules.Mod got that video driver prefix from Kernel and took care to load the correct file by adding this prefix to the filename.

But this approach is not implemented in the inner core of ProjectOberon.

br
Jörg


Am 02.10.18, 07:54 schrieb "Jörg" <joerg.straube at iaeth.ch>:

    Tomas
    
    No. The current Display subsystem in ProjectOberon is not prepared for different "video drivers".
    You would have to re-write the Display subsystem to be object oriented.
    With such an approach, all Display procedures Dot, CopyPattern... are procedure variables to be initialized with the correct procedures of the chosen "video driver".
    Basically, Display can then be seen as kind of dispatcher module for the underlying video driver.
    
    But most probably the easiest is to keep the interface of your two Display modules identical.
    If so, compile DisplayBW.Mod (implementing MODULE Display;) and rename Display.rsc to DisplayBW.rsc
    Then compile DisplayColor.Mod (also implementing MODULE Display;) and rename Display.rsc to DisplayColor.rsc
    
    Now, the two files DisplayBW.rsc and DisplayColor.rsc are different implementations of Display having identical keys.
    Before booting, you have to copy the correct DisplayXY.rsc to Display.rsc
    
    br
    Jörg
    
    Am 01.10.18, 21:41 schrieb "Oberon im Auftrag von Tomas Kral" <oberon-bounces at lists.inf.ethz.ch im Auftrag von thomas.kral at email.cz>:
    
        > 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.
        
        Hi,
        
        Now I have two display modules, `Display.Mod' and `Display2.Mod'
        handling 1-bit and 4-bit colour respectively.
        
        While there could be a single driver `vid.v' selecting the mode by a
        switch e.g. swi[6], adjusting video base accordingly. 
        
        Can the system somehow boot with either `Display' or `Display2'
        based on the swi[6]?
        
        `Display' is imported by other modules `Oberon',`Viewers',..
        
        -- 
        Tomas Kral <thomas.kral at email.cz>
        --
        Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
        https://lists.inf.ethz.ch/mailman/listinfo/oberon
        
    




More information about the Oberon mailing list