Frage zu Graphios

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Page 2 of 6
Merlin
Administrator
Avatar
Gender:
Age: 25
Posts: 1468
Registered: 03 / 2005
Subject:

Re: Frage zu Graphios

 · 
Posted: 27.06.2025 - 16:10  ·  #9
Hi Wilbo.

I am guessing that the driver was for monochrome displays and then extended to color later (although i don't know that for sure). Many different displays use the same controller. I see the controller name in the compiler code and have not investigated how that is specified. I could just be an internal reference. From the manual though this is specified by a combination of importing GraphColor and specifying X-Y addressing mode as follows:

Code

// This modus must be imported by: 
From LCDGraphic import GraphColor;  
Define LCDgraphMode = XYaddress, iData;   // colored xy-address mode


Regards

==========================================================================

Hallo Wilbo.

Ich vermute, der Treiber war für monochrome Displays gedacht und wurde später auf Farbdisplays erweitert (das weiß ich aber nicht genau). Viele verschiedene Displays verwenden denselben Controller. Ich sehe den Controllernamen im Compilercode und habe nicht untersucht, wie dieser angegeben wird. Es könnte sich nur um eine interne Referenz handeln. Laut Handbuch wird dies jedoch durch eine Kombination aus dem Importieren von GraphColor und der Angabe des X-Y-Adressierungsmodus wie folgt angegeben:

Code

Dieser Modus muss importiert werden durch:

From LCDGraphic import GraphColor;

Define LCDgraphMode = XYaddress, iData; // Farbiger X-Y-Adressmodus


Grüße
wilbo
Benutzer
Avatar
Gender:
Age: 69
Posts: 59
Registered: 11 / 2023
Subject:

Re: Frage zu Graphios

 · 
Posted: 30.06.2025 - 11:51  ·  #10
Hello Merlin
I had a look at the asmfile and searched for gFillrect. There are 4 entries:
3 times Call gFillRect
1 time gfillrect:
Extract:
CALL SYSTEM.GFILLRECT
SYSTEM.GFillRect:
SYSTEM.gDrawButtonFrame:
there should be no more code between GFillRect: and gDrawButtonFrame:

Greetings wilbo

PS: I have checked your hint in the last post, the import of GraphColor is available and also Define LCDgraphMode = XYaddress, iData;
Merlin
Administrator
Avatar
Gender:
Age: 25
Posts: 1468
Registered: 03 / 2005
Subject:

Re: Frage zu Graphios

 · 
Posted: 30.06.2025 - 13:26  ·  #11
Hi Wilbo.

I am sorry, but I don't really understand what you mean by the last post. If you send me the asm file perhaps it will become clear.

But to take your other comment:

Quote
PS: I have checked your hint in the last post, the import of GraphColor is available and also Define LCDgraphMode = XYaddress, iData;


Can we expand on this?

Are you saying that both those imports are, and have always been, there?

If so your original compile

Code
gFillRect(110, 195, 210, 220, byte(clRed));


Should, according to the manual, have failed, because, again according to the manual, the last parameter should be a tColor, not a byte.

If this is the case then that is something we can investigate.

Regards
wilbo
Benutzer
Avatar
Gender:
Age: 69
Posts: 59
Registered: 11 / 2023
Subject:

Re: Frage zu Graphios

 · 
Posted: 30.06.2025 - 14:03  ·  #12
Hallo Merlin,
ich habe mal den gesamten Projekt Ordner angehängt, dieser läst sich ohne Syntaxfehler compiliern.
gruß wilbo

Hello Merlin,
I have attached the entire project folder, this can be compiled without syntax errors.
greetings wilbo
Attachments
Filename: XMEGA32AU4.zip
Filesize: 136.87 KB
Title:
Download counter: 17
Merlin
Administrator
Avatar
Gender:
Age: 25
Posts: 1468
Registered: 03 / 2005
Subject:

Re: Frage zu Graphios

 · 
Posted: 01.07.2025 - 11:38  ·  #13
Hi Wilbo.

I have looked into it more deeply and most of what I have said is nonsense - sorry.

Whether it is colour or not does solely depend on the import of GraphColor.

The use of RA8875 seems to be an undocumented addition - probably for a specific user to map an 8 bit colour palette to a 16 bit colour palette.

It seems to me most probable that the code you are using does not match the device.

The way you use FillRect suggests to me that your device is one using a 16 bit colour palette.

I think that FillRect is the correct function for you to use and that gFillRect is not.

I think that gFillRect is really for legacy projects.

All that said, the manual does not reflect this, and these are just my opinions. Maybe Harry has a different opinion?

Regards

========================================================================

Ich habe mich genauer damit befasst, aber das meiste, was ich gesagt habe, ist Unsinn – tut mir leid.

Ob es sich um Farbe handelt oder nicht, hängt ausschließlich vom Import von GraphColor ab.

Die Verwendung von RA8875 scheint eine undokumentierte Ergänzung zu sein – wahrscheinlich für einen bestimmten Benutzer, um eine 8-Bit-Farbpalette auf eine 16-Bit-Farbpalette abzubilden.

Ich halte es für sehr wahrscheinlich, dass der von Ihnen verwendete Code nicht zum Gerät passt.

Die Art und Weise, wie Sie FillRect verwenden, lässt darauf schließen, dass Ihr Gerät eine 16-Bit-Farbpalette verwendet.

Ich denke, FillRect ist die richtige Funktion für Sie, gFillRect hingegen nicht.

Ich denke, gFillRect ist eher für ältere Projekte gedacht.

Abgesehen davon spiegelt das Handbuch dies nicht wider, und dies sind nur meine Meinungen. Vielleicht ist Harry anderer Meinung?
wilbo
Benutzer
Avatar
Gender:
Age: 69
Posts: 59
Registered: 11 / 2023
Subject:

Re: Frage zu Graphios

 · 
Posted: 01.07.2025 - 12:35  ·  #14
Hallo Merlin
verstehe mich bitte nicht falsch.
für mich ist das ja eh nur eine Spielerei es geht mir nur um den Compiler. Die Procedure gFillRect muß in irgendeiner Version von AVRCO mit allen Farbdisplays funktioniert haben sonst würden die XGraph_* Demos bestimmt anders geschrieben worden sein. (Siehe Anhang)

Hello Merlin
Please don't get me wrong.
For me it's just a gimmick anyway, I'm only interested in the compiler. The procedure gFillRect must have worked in some version of AVRCO with all colour displays, otherwise the XGraph_* demos would certainly have been written differently. (See attachment)

Greetings wilbo
Attachments
Suche "gfillrect" (67 Treffer in 4 Dateien von 4 gesucht) [Normal]
C:\Program Files (x86)\AVRCo\AVRco\Demos\XGraph_TFT400x240\XGraph_TFT400x240.pas (11 Treffer)
  Zeile 591: gFillRect(5, SliderY - 2, 30, SliderY + 2, byte(clSilver));
  Zeile 593: gFillRect(5, SliderY - 2, 30, SliderY + 2, byte(clRed));
  Zeile 608: gFillRect(17, 200, 48, 218, byte(myBtnColor)); // remove text
  Zeile 615: gFillRect(17, 200, 48, 218, byte(myBtnColor)); // remove text
  Zeile 626: gFillRect(57, 200, 93, 218, byte(myBtnColor));
  Zeile 632: gFillRect(57, 200, 93, 218, byte(myBtnColor));
  Zeile 652: gFillRect(160, 200, 300, 220, byte(clAqua)); // clear text
  Zeile 774: gFillRect(5, 2, 30, -2, byte(clRed));
  Zeile 928: gFillRect(15, 195, 50, 220, byte(myBtnColor));
  Zeile 930: gFillRect(55, 195, 95, 220, byte(myBtnColor));
  Zeile 932: gFillRect(99, 195, 142, 220, byte(myBtnColor));
C:\Program Files (x86)\AVRCo\AVRco\Demos\XGraph_TFT160x128\XGraph_TFT160x128.pas (7 Treffer)
  Zeile 648: gFillRect(15, 90, 50, 115, byte(myBtnColor));
  Zeile 650: gFillRect(55, 90, 95, 115, byte(myBtnColor));
  Zeile 652: gFillRect(99, 90, 142, 115, byte(myBtnColor));
  Zeile 679: gFillRect(17, 92, 48, 113, byte(myBtnColor)); // remove text
  Zeile 685: gFillRect(17, 92, 48, 113, byte(myBtnColor)); // remove text
  Zeile 691: gFillRect(57, 92, 93, 113, byte(myBtnColor));
  Zeile 696: gFillRect(57, 92, 93, 113, byte(myBtnColor));
C:\Program Files (x86)\AVRCo\AVRco\Demos\XGraph_TFT480x272\XGraph_TFT480x272.pas (18 Treffer)
  Zeile 623: gFillRect(17, 233, 48, 258, byte(myBtnColor)); // remove text
  Zeile 630: gFillRect(17, 233, 48, 258, byte(myBtnColor)); // remove text
  Zeile 649: gFillRect(201, 191, 459, 219, byte(myBkGround));
  Zeile 802: gFillRect(20, 200, 160, 220, byte(clAqua)); // clear text
  Zeile 809: gFillRect(201, 191, 459, 219, byte(myBkGround));
Filename: gFillRect.txt
Filesize: 5.23 KB
Title:
Download counter: 25
Merlin
Administrator
Avatar
Gender:
Age: 25
Posts: 1468
Registered: 03 / 2005
Subject:

Re: Frage zu Graphios

 · 
Posted: 01.07.2025 - 15:32  ·  #15
Hi Wilbo.

I can only give an opinion based on what I see in the code. It is clear that FillRect takes a 16 bit colour parameter in which all nibbles are used. An 8 bit parameter such as gFillRect can only map to a 16 bit in one of two ways. Either the upper two bytes are zeroed or there is a mapping. It is also clear that both methods are in use, depending on display. Old colour displays used two nibbles - one for foreground and one for background, based on a 16 colour palette. It is clear that gXXXX is designed for these displays. Such displays are no longer available as far as I know.

It would appear that gXXX has attempted to move with the times to some extent, but, I believe, only to make legacy code work on what were then new devices.

I personally feel that the gXXXX drivers are now obsolete, and to make them work with modern displays would take a total redesign.

Again, as I say, this is just my opinion.

To make it clear, I have not touched to code of any driver, including this one, and I believe you would have the same problems with v5.11, although of course, I cannot test that.

Also to make a further point, as I have made clear from the outset, although I am happy to integrate new drivers written by others, I am not able to write drivers myself. I do not have the technical knowledge or facilities.

============================================================================================

Ich kann nur eine Meinung basierend auf dem abgeben, was ich im Code sehe. Es ist klar, dass FillRect einen 16-Bit-Farbparameter verwendet, in dem alle Nibbles verwendet werden. Ein 8-Bit-Parameter wie gFillRect kann nur auf zwei Arten auf einen 16-Bit-Parameter abgebildet werden: Entweder werden die oberen beiden Bytes auf Null gesetzt, oder es erfolgt eine Abbildung. Es ist auch klar, dass je nach Display beide Methoden verwendet werden. Ältere Farbdisplays verwendeten zwei Nibbles – eines für den Vordergrund und eines für den Hintergrund, basierend auf einer 16-Farben-Palette. Es ist klar, dass gXXXX für diese Displays entwickelt wurde. Solche Displays sind meines Wissens nicht mehr verfügbar.

Es scheint, dass gXXX versucht hat, mit der Zeit zu gehen, aber ich glaube, nur, um Legacy-Code auf damals neuen Geräten kompatibel zu machen.

Ich persönlich bin der Meinung, dass die gXXXX-Treiber mittlerweile veraltet sind und ihre Kompatibilität mit modernen Displays eine komplette Neuentwicklung erfordern würde.

Wie gesagt: Dies ist nur meine Meinung.

Um es klarzustellen: Ich habe den Code von keinem Treiber, auch nicht von diesem, berührt, und ich glaube, Sie würden mit Version 5.11 die gleichen Probleme haben, obwohl ich das natürlich nicht testen kann.

Noch ein weiterer Punkt: Wie ich von Anfang an klargestellt habe, integriere ich zwar gerne neue Treiber, die von anderen geschrieben wurden, kann aber selbst keine Treiber schreiben. Mir fehlen die technischen Kenntnisse oder die Möglichkeiten.




Best regards
miparo
Schreiberling
Avatar
Gender:
Location: Germany
Age: 59
Posts: 975
Registered: 09 / 2007
Subject:

Re: Frage zu Graphios

 · 
Posted: 05.07.2025 - 02:36  ·  #16
Hi wilbo,
diese ganzen XGraph_TFT_XxX habe ich 2016 mal geschrieben.
Dieses XGraph_TFT320x240 Demo hat damals auch funktioniert, es gibt ja diverse Bilder davon in einen alten Threads.
topic.php?t=3421

Da der alte Graph Treiber damals aber kaum die modernen Displays unterstützt hatte wurde hier userdevice GraphIOS? angepasst, was intern dann die Farben in tColors mappt, so schaut es in Proc GraphIOS aus.

Eigentlich ruft gFillRect doch auch nur intern mein FillRect auf ?
Kann aber auch sein, das ich das Fillrect nur geschrieben habe damit der Bildschirm schneller komplett überschrieben/gelöscht wird, da dies über GraphIOS viel länger dauert.....

Aber an viel mehr kann ich mich auch nicht mehr erinnern und leider auch keine Zeit zum testen:(

Gruß
miparo
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Page 2 of 6
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 17 · Cache Hits: 15   139   154 · Page-Gen-Time: 0.025924s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI