Dingoonity.org

Dingux (Dingoo Linux) => General => Topic started by: darth_llamah on November 08, 2011, 12:40:15 pm

Title: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on November 08, 2011, 12:40:15 pm
Hi :)
I'm a happy owner of Dingoo a320 unfortunately with ILI9338 lcd.
For your pleasure:
Modified OpenDingux kernel with not-so-blue image
This is first try so don't expect perfect colours and please do tell me if in your opinion image needs to be tweaked.
For now blue colour "brightness" is set to 75% of original value, red and green are original.

Note: this kernel will work only for ILI9338 LCD

Installation- copy zImage_ili9338 to SD card and rename it to zImage

Download:
http://dl.dropbox.com/u/14106051/dingux/zImage_ili9338 (http://dl.dropbox.com/u/14106051/dingux/zImage_ili9338)
MD5: 85DBC47CBB91F3E2919E8E02B71452E5

EDIT:
And some pics
Original kernel:
(http://dl.dropbox.com/u/14106051/dingux/lcd-old.jpg)

Modified kernel:
(http://dl.dropbox.com/u/14106051/dingux/lcd-new.jpg)


EDIT:
A "60% of blue" version, nothing more changed:
http://dl.dropbox.com/u/14106051/dingux/zImage_ili9338_60 (http://dl.dropbox.com/u/14106051/dingux/zImage_ili9338_60)
MD5: 3A3B090E8ACE47C8B207BC32D260AC2E
and updated kernel patch:
http://dl.dropbox.com/u/14106051/dingux/lcd60.patch (http://dl.dropbox.com/u/14106051/dingux/lcd60.patch)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: K-77 on November 09, 2011, 08:12:18 pm
I have this screen too and i haven't see nothing blueish. These unpredictable chinese people and they screens...  :o

Pozdrawiam Karol  :P
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on November 11, 2011, 02:23:53 pm
Maybe your lcd is from a different batch (not-that-cheaply-manufctured) than mine.
Try to play Castlevania: Harmony Of Dissonance (GBA) and compare image with real GBA or gba emulator (vba, vba-m etc)....

ps. r?wnież pozdrawiam ;)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 23, 2011, 12:51:49 pm
I don't know I've tried in Picodrive and I really can't tell the difference but it's because most of the Genesis games already look ok on Dingux. I've tried to take pictures but It's quite hard. I think there's an improvement, but I'm not sure (maybe it's a placebo effect)
I'm trying to install the gba emulator because this console have the worse games regarding colours but the OD emulator doesn't work for me. I could tell the difference inmediately only looking at those games running in OD. You only have to run mario kart (in native the sky is all washed in glaring white) to see if this is working or not.

I guess I cannot use this zimage into Sience Kernel, right? That way I could use fba, snes and such.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on December 23, 2011, 02:05:16 pm
I don't know I've tried in Picodrive and I really can't tell the difference but it's because most of the Genesis games already look ok on Dingux. I've tried to take pictures but It's quite hard. I think there's an improvement, but I'm not sure (maybe it's a placebo effect)
I'm trying to install the gba emulator because this console have the worse games regarding colours but the OD emulator doesn't work for me.
You need gba bios in gbsp folder, in gmenu2x shortcut use Browser
Quote
I could tell the difference inmediately only looking at those games running in OD. You only have to run mario kart (in native the sky is all washed in glaring white) to see if this is working or not.
Also Castlevania series are hard to play, especially Aria Of Sorrow.

Quote
I guess I cannot use this zimage into Sience Kernel, right? That way I could use fba, snes and such.
I didn't touch "legacy" Dingux kernel however here is the patch for ILI9338 driver (rev1) (http://dl.dropbox.com/u/14106051/dingux/lcd.patch)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 23, 2011, 04:22:39 pm
I figured it out. I've tested another bios on a former version of gpsp and it works.

Here you have the link to the comparative shots with your fix (I don't know the reason why this forum isn't capable to show them) and Ili8993.

http://imageshack.us/f/715/mario1600x1200.jpg/

http://imageshack.us/f/577/specialctforces1600x120.jpg/

I think it works, but having more testers would be completely recommendable.

Castlevania Aria of Sorrow stills looks like crap. The problem is black colour doesn't exist in that game.

You've mentioned you reduced the blue channel to 75%, now try to reduce it to 50% and let's see what happens. It's all about contrast.

Anyway, great job.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on December 23, 2011, 04:31:47 pm
You've mentioned you reduced the blue channel to 75%, now try to reduce it to 50% and let's see what happens. It's all about contrast.
I've already tried that, with 50% of blue image is too green-ish.
I'll make a 60% version (most likey after x-mas ;) )
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 23, 2011, 04:38:02 pm
You've mentioned you reduced the blue channel to 75%, now try to reduce it to 50% and let's see what happens. It's all about contrast.
I've already tried that, with 50% of blue image is too green-ish.
I'll make a 60% version (most likey after x-mas ;) )


Ok man. I think you're on the right track, anyway. If the 60% blue channel update doesn't work I think the obvious trick is playing with the others channels. I'll be waiting for the new version.
Happy Xmas!
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on December 23, 2011, 04:53:06 pm
Ok man. I think you're on the right track, anyway. If the 60% blue channel update doesn't work I think the obvious trick is playing with the others channels.
There is no need to change green and red, they both are displayed correctly. Only blue is way too bright.
I can try to use other gamma curve (4 are available) but only if current solution is not enough
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 23, 2011, 05:10:04 pm


And I don't know, I'm looking at genesis games and now they look gorgeous. Maybe the only error is on the GBA, the emulator or something.
I'll try the Dingux patch. I guess I only have to rename the file to zImage, right?
Trial and error, that's the process.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on December 23, 2011, 05:13:28 pm
I'll try the Dingux patch. I guess I only have to rename the file to zImage, right?
Trial and error, that's the process.
Patch is to be applied on kernel sources (for kernel makers), it is not a zImage/rootfs
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 23, 2011, 05:18:50 pm
I'll try the Dingux patch. I guess I only have to rename the file to zImage, right?
Trial and error, that's the process.
Patch is to be applied on kernel sources (for kernel makers), it is not a zImage/rootfs

Ok thanks for the aclaration (I'm not a developer myself so it's better I don't touch that). Thanks.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on December 27, 2011, 11:45:36 am
Could you make a version of this fix for Sience Kernel? There's a lot of blue too. Just asking.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: lorderok on January 16, 2012, 05:34:34 pm
If you don't mind me asking, how do you change the color balance like this? Is there a program, or coding language you need to know?
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on January 16, 2012, 08:09:20 pm
Could you make a version of this fix for Sience Kernel? There's a lot of blue too. Just asking.
It would be better to ask Sience, necessary patch is provided (I didn't play with legacy Dingux at all)

If you don't mind me asking, how do you change the color balance like this? Is there a program, or coding language you need to know?
First of all- get the manual and read it.
In this case I've added custom "color lookup table" setting to LCD driver. This table is responsible for converting 5bit input color value to 6bit output required by LCD panel. Hardware default is "input *2" but this doesn't work good for blue ;) , current version has max blue set to 44 (was 63). Also all the work is done in hardware so this doesn't affect performance
TBH I'm not skilled in any coding language, just c and c++ (very) basics, I just know how to mess with code ;)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: pcercuei on January 16, 2012, 08:12:47 pm
You could make it configurable through /sys, so that it can be changed at runtime.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on January 16, 2012, 08:15:29 pm
You could make it configurable through /sys, so that it can be changed at runtime.
I'm not sure, it's in hardware init (unless there is a way to reset lcd from within the system)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: lorderok on January 19, 2012, 10:37:06 pm
It would be really nice to see a 60% one for the Legacy kernel, though. 
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on January 20, 2012, 09:25:28 pm
It would be really nice to see a 60% one for the Legacy kernel, though.

I agree. It would be terrific.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on January 21, 2012, 09:19:49 pm
I'll try to make "60%" kernels for both OD and Dingux but I can't promise (work, work, work...)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on January 26, 2012, 12:39:21 pm
60% version for OpenDingux added
I'll try to compile Legacy kernel this evening but I can't promise
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on January 27, 2012, 12:12:26 am
Ta, man. We need that Legacy version so  bad.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on January 28, 2012, 10:30:57 pm
We'll be waiting. Right here.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on February 10, 2012, 09:43:20 am
Patiently.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: CREATICA on April 04, 2012, 12:10:04 am
No, seriously, take your time. I've waited 2,5 years to opendingux and is still on the making... so I can wait 3 years or so for this.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: zear on April 04, 2012, 01:37:18 am
No, seriously, take your time. I've waited 2,5 years to opendingux and is still on the making... so I can wait 3 years or so for this.
It's not like OD is some secret project. The source is available. You can download and compile it at any time.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: darth_llamah on April 04, 2012, 02:23:16 pm
No, seriously, take your time. I've waited 2,5 years to opendingux and is still on the making... so I can wait 3 years or so for this.
I really don't have much free time. I didn't forget.
Quote
It's done when it's done
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: PippinA320 on April 21, 2012, 08:28:54 pm
How about a version for the standard or custom firmware?
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: zear on April 22, 2012, 12:23:45 pm
How about a version for the standard or custom firmware?
You can't recompile something that has no source code, silly ;)
Why do you think we port linux to the dingoo? :)
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: PippinA320 on April 22, 2012, 10:00:53 pm
How about a version for the standard or custom firmware?
You can't recompile something that has no source code, silly ;)
Why do you think we port linux to the dingoo? :)

I know theres no source code, i was just thinking perhaps an application, or a modification/filter to remove/improve the issue.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: zear on April 23, 2012, 01:18:59 am
I highly doubt you can write an application that intercepts stuff that is send to the framebuffer, then filter it and send it back to the framebuffer. Without modifying the OS/LCD driver source code at least.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: PippinA320 on April 30, 2012, 02:54:19 am
Perhaps a modified GBA emulator(Experiences the biggest issues) that has a special filter, i dont know. I have kind of given up on my dingoo anyways. As more issues continue to crop up, I just see it as an unwanted contingency.
Title: Re: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: pcercuei on April 30, 2012, 09:31:38 am
I highly doubt you can write an application that intercepts stuff that is send to the framebuffer, then filter it and send it back to the framebuffer. Without modifying the OS/LCD driver source code at least.

No need to do something as complicated as that, all you need to do is to update the color table of the ILI9338. That would be fairly easy to do as the native OS permits direct hardware access.
Title: Re: Kernel for a320 with ILI9338 LCD- helps with "blueish" display
Post by: cheapgw2gold on September 21, 2012, 02:25:00 am
I figured it out. I've tested another bios on a former version of gpsp and it works.