Rockbox

Tasklist

FS#9122 - LCD Corruption Fix for iPod 4G Color with Type 0 LCD

Attached to Project: Rockbox
Opened by Robert Menes (RMenes379) - Thursday, 26 June 2008, 10:20 GMT
Last edited by Dave Chapman (linuxstb) - Thursday, 17 July 2008, 10:10 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System iPod 4G Color
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch should fix most of the color corruption bugs people have experienced after code insertion in r17715. This fix is for type 0 LCDs, and should initialize the LCD to be big-endian again.

NOTE: If you have a Type 1 LCD, please report if this breaks anything!

NOTE 2: Mpegplayer isn't fixed yet, so you may still see corrupt colors in videos. I am already aware of that, and will be working on a fix for that.

Thanks to Dave Chapman (linuxstb) for his advice.
This task depends upon

Closed by  Dave Chapman (linuxstb)
Thursday, 17 July 2008, 10:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in SVN r18079
Comment by Adam West (xxbatman94xx) - Thursday, 26 June 2008, 22:13 GMT
hey im not so familiar with applying patches soo how exactly am i supposed to apply this to my ipod?

Thanks!!
Comment by Adam West (xxbatman94xx) - Friday, 27 June 2008, 00:11 GMT
hey im not so familiar with applying patches soo how exactly am i supposed to apply this to my ipod?

Thanks!!
Comment by Adam West (xxbatman94xx) - Friday, 27 June 2008, 05:43 GMT
hey im not so familiar with applying patches soo how exactly am i supposed to apply this to my ipod?

Thanks!!
Comment by Robert Menes (RMenes379) - Friday, 27 June 2008, 11:43 GMT
Stop posting the same message multiple times!
Comment by Adam West (xxbatman94xx) - Friday, 27 June 2008, 18:33 GMT
sorry it did it randomly i dont even kno how

Sorry hey im applying the patches as we speak ill be back when i official apply it
Comment by Adam West (xxbatman94xx) - Saturday, 28 June 2008, 21:48 GMT
YAY its working hey for all the ppl who dont want to go thro the trouble of compiling this heres a version that i compiled its r17803

so heres a rapid share link
http://rapidshare.com/files/125714326/rockbox_ipod_color_patch.zip.html
Comment by Yoshihisa Uchida (Uchida) - Wednesday, 16 July 2008, 14:13 GMT
I made the new patch file.

My patch file is collected following:
- For iPod color/photo (lcd_type=0, 1),
  image file, mpeg file are collectly displayed.

When the image data was written in LCD framebuffer, if it was "lcd_type=0",
it was made to write in LCD framebuffer after the endian of the image data
had been changed.


Confirmed iPod is following:
iPod photo 30GB
HW version: 0x60000
lcd_type: 0
Apple fw: 1.2.1

Please confirm whether to operate normally:
iPod color/photo (lcd_type=0, 1),
other iPod,
iPod nano,
etc.
Comment by Daniel Beardsall (Beardy) - Wednesday, 16 July 2008, 15:28 GMT
Just made a build with Uchida's new patch, colours now render correctly in menus, photos and mpeg videos. Startup graphic and menu icons still appear corrupt, but still a vast improvement. I'll be making new patched builds every couple of days and hosting them at http://dan2.net/stuff/rockbox.zip for anyone who wants it (currently hosting patched build r18070). I may even look into correcting the remaining colour problems, and will update here if I succeed. Thanks Uchida!
Comment by Yoshihisa Uchida (Uchida) - Thursday, 17 July 2008, 04:31 GMT
Thank you for the confirmation about my patch file.

When Daniel's build Rockbox (http://dan2.net/stuff/rockbox.zip) was used,
the logo image was not correctly displayed.

But when Rockbox that I made(source:svn 18076 + my patch file) was executed,
the logo image was correctly displayed.

Could you confirm operation by using my rockbox.ipod? (rockbox.ipod is only exchanged.)

Maybe, Rockbox's logo image((builddir)/apps/bitmaps/native/rockboxlogo.220x68x16.c) might be wrong.
Please, could you compare "rockboxlogo.220x68x16.c" that exists in your build environment?
Comment by Dave Chapman (linuxstb) - Thursday, 17 July 2008, 07:34 GMT
All,

The approaches taken to this bug by the patches posted here are wrong. The correct fix (i.e. one that will be accepted in SVN) is to correctly initialise the LCD controller in the "type 0" ipods to expect data in the same format as the "type 1" LCDs.

This is how the v1.1 and later Apple bootloaders initialise those LCDs, which is why Rockbox worked for a long time.

The source of this problem is that v1.0 of the Apple bootloader initialises the LCD in the opposite way to the v1.1 and later bootloaders. The code copied from IPL that was committed in an attempt to fix Rockbox on ipods with the v1.0 bootloader actually broke all "type 0" LCDs, by initialising them the same way as the v1.0 bootloader.

So we need to find the LCD init function in v1.1 and later versions of the Apple bootloader, and use that set of commands, rather than the commands taken from the v1.0 bootloader.

I may have found this - could a user with a type 0 LCD try changing line 111 of firmware/target/arm/lcd-color_nano.c from "lcd_cmd_data(0x10, 0x8);" to "lcd_cmd_data(0x10, 0xc);" (and no other changes to the code) ?
Comment by Yoshihisa Uchida (Uchida) - Thursday, 17 July 2008, 09:35 GMT
Hi Dave, thank you for the great comment.

When only the following corrections were done to the source of Rockbox of the latest version(svn 18078),
and Rockbox was made, it was confirmed that the logo, JPEG, and mpeg file had been correctly displayed.

change source:
firmware/target/arm/lcd-color_nano.c
"lcd_cmd_data(0x10, 0x8);" -> "lcd_cmd_data(0x10,0xc);"


I confirmed iPod is following:
iPod photo 30GB
HW version: 0x60000
lcd_type: 0
Apple fw: 1.2.1

Thank you.
Comment by Dave Chapman (linuxstb) - Thursday, 17 July 2008, 10:09 GMT
Uchida,

Thanks for testing - I've just committed that change to SVN and will close this task.

Loading...