Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Ipod photo 40gb has bad resolution, all the colours are wrong
« previous next »
  • Print
Pages: 1 2 [3] 4 5

Author Topic: Ipod photo 40gb has bad resolution, all the colours are wrong  (Read 26603 times)

Offline direcow

  • Member
  • *
  • Posts: 6
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #30 on: June 15, 2008, 10:11:26 PM »
I'm also getting the same problem, after upgrading from a much older version (I forget which, but the older version was about 2 weeks older...) Basically the screen has the same garbled colours.

update: patch 17627 works, so something has happened in between. I'll try to work incrementally if I get the time.

update 2: 17694 works too.

update 3: 17704 works, 17722 does not.

update 4: 17713 works.

update 5: 17714 works -  beginning to suspect my problem is different from the original problem in the thread, and might be related to the ipodlinux code.

update 6: 17715 does not work, that's where it breaks for me. looks like the ipodlinux code makes things whacky for those without the problem. I'm going back to 17714 for now.
« Last Edit: June 15, 2008, 10:34:04 PM by direcow »
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #31 on: June 16, 2008, 02:13:52 AM »
I think I understand this now.

Some background - there are two types of LCD used in the ipod Color/Photo, known as "type 0" and "type 1", with "type 0" being the older version, and Apple switched them around the time they renamed the ipod from "Photo" to "Color" (but not exactly).

The LCD is 16-bit, so Rockbox has a choice of sending words as little-endian or big-endian.

The situation seems to be the following:

1) Version 1.0 of the original Apple firmware (OF) initialises the type 0 LCD to be little-endian
2) Version 1.1 and later of the OF initialises the type 0 LCD to be big-endian
3) The code added in r17715 configures the type 0 LCD to be little-endian
4) The type 1 LCD is big-endian

Rockbox has always treated both LCD types as a big-endian, which has worked fine until Austin came along with his 1.0 firmware.   r17715 then broke Rockbox for all other type 0 LCDs.

The IPL kernel LCD driver treats both type 0 and type 1 LCDs the same - so is also broken (but probably only displays either black or white text, which means the byte order doesn't matter).

The LCD driver in the IPL "hotdog" library treats the two types differently - byte-swapping the data before sending it to the "type 1" LCD.

What would be useful is if we could try to understand the code in r17715 (which we've blindly taken from IPL), and try and determine how to set a type 0 LCD to big-endian mode.  This requires someone with such a "type 0" LCD to do some experimenting.

But the first thing I would test would be to change the following line in firmware/export/config-ipodcolor.h:

Code: [Select]
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

to

Code: [Select]
#define LCD_PIXELFORMAT RGB565

This will make Rockbox send all bytes in the opposite order - and confirm that this is indeed what's happening.  You should do a "make clean" before doing this, to ensure all bitmaps are recreated with the new byte ordering.
« Last Edit: June 16, 2008, 02:15:55 AM by linuxstb »
Logged

Offline het_yak

  • Member
  • *
  • Posts: 3
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #32 on: June 16, 2008, 12:30:14 PM »
Hi All,

I just tried to load rock box onto my Ipod photo and ran into the same problem. Not possible to install with the utility nor manually on my mac. manged to install under windows but the colors are off. I do not mind experimenting a bit, where can I read up on how to change the suggested line?

Thanks, friendly regards

Leon
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #33 on: June 16, 2008, 02:39:16 PM »
There is a bunch of documentation if you follow the "index" link on the left.  Scroll down to the "For Developers" section.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #34 on: June 16, 2008, 08:24:24 PM »
I decided to try linuxstb's suggestion above and edited my firmware/export/config-ipodcolor.h as he said. I ran "make clean", and then compiled.

I compiled against SVN trunk r17727, and the result? It works... sort of.

The menu and WPS appear correct, but most of the bitmaps are still corrupt. So we partially solved the problem, but we need to find out what else has to be changed.

My 4G color's LCD is also Type 0, for the record.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #35 on: June 17, 2008, 02:02:40 AM »
Quote from: LambdaCalculus379 on June 16, 2008, 08:24:24 PM
The menu and WPS appear correct, but most of the bitmaps are still corrupt. So we partially solved the problem, but we need to find out what else has to be changed.

OK.  For the bitmaps, I forgot to say that you also need to change the following line in tools/configure (line 1056) from:

    bmp2rb_native="$rootdir/tools/bmp2rb -f 5"

to:

    bmp2rb_native="$rootdir/tools/bmp2rb -f 4"

You then need to do a make clean, then re-run tools/configure

But that isn't a solution - a version of Rockbox compiled with these changes will work on the type 0 LCDs, but won't work on the type 1 LCDs...  What we (or rather someone with a type 0 LCD - I don't have one) need to do is to determine the lcd init sequence to make the existing code work again, and on all type 0 LCDs (i.e. including firmware version 1.0).

Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #36 on: June 17, 2008, 08:06:47 AM »
Quote from: linuxstb on June 17, 2008, 02:02:40 AM
OK.  For the bitmaps, I forgot to say that you also need to change the following line in tools/configure (line 1056) from:

    bmp2rb_native="$rootdir/tools/bmp2rb -f 5"

to:

    bmp2rb_native="$rootdir/tools/bmp2rb -f 4"

You then need to do a make clean, then re-run tools/configure

This indeed works. The RB bitmaps are displaying correctly now.

I've been poking through the code a little bit to determine what the proper LCD init sequence should be for type 0 LCDs. No luck yet, but I'll keep looking.

By firmware version 1.0, you're talking about the Apple firmware, am I correct? My 4G color has Version 1.2.1 on it, so this should be checked on various other Apple firmware versions.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline het_yak

  • Member
  • *
  • Posts: 3
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #37 on: June 20, 2008, 12:30:38 PM »
Hi LambdaCalculus379

Is it possble to put the correted "0 screen" version up somewhere? I am not up to changing the code.

Friendly regards

Leon
Logged

Offline biiig-red

  • Member
  • *
  • Posts: 4
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #38 on: June 20, 2008, 02:15:40 PM »
I had the same problem with IPod Photo 20GB and could solve it with your hints. Thanks a lot for that.
If you need some information about my hardware or something else, just tell me where I can find it.

Have a nice day,

biiig-red
Logged

Offline undo

  • Member
  • *
  • Posts: 6
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #39 on: June 20, 2008, 07:36:29 PM »
Quote from: het_yak on June 20, 2008, 12:30:38 PM
Is it possble to put the correted "0 screen" version up somewhere? I am not up to changing the code.

I have uploaded my build from this morning at http://www.chillt.de/rockbox.zip and will leave it up there for a while. This is a vanilla build with commit 17715 reverted. I have verified that this fixes colors on my type 0 LCD iPod Color/Photo.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #40 on: June 21, 2008, 09:51:22 AM »
Thanks for that, but I'm still going to upload a patch to Flyspray that will fix the bitmap corruption. I just haven't had a chance to, being sick yesterday and Real Life issues taking over as well.

Keep your eyes peeled for the patch.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline biiig-red

  • Member
  • *
  • Posts: 4
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #41 on: June 22, 2008, 01:25:47 AM »
yesterday I noticed that  videos are in wrong colors, although i made the corrections of the two files linuxstb told. Cause I don't know anything about the IPod Hardware and anything about the Rockbox software, I didn't try out if a change in a file can correct the failure.

Quote
being sick yesterday
Hope you'll get well soon!

Quote
Real Life issues taking over as well

I think that RL sucks...  ;)

Have a nice day!

biiig-red
Logged

Offline xxbatman94xx

  • Member
  • *
  • Posts: 3
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #42 on: June 25, 2008, 11:19:02 AM »
Quote from: undo on June 20, 2008, 07:36:29 PM
Quote from: het_yak on June 20, 2008, 12:30:38 PM
Is it possble to put the correted "0 screen" version up somewhere? I am not up to changing the code.

I have uploaded my build from this morning at http://www.chillt.de/rockbox.zip and will leave it up there for a while. This is a vanilla build with commit 17715 reverted. I have verified that this fixes colors on my type 0 LCD iPod Color/Photo.

Hey i tested your version its working correctly even on videos :D
Logged

Offline undo

  • Member
  • *
  • Posts: 6
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #43 on: June 25, 2008, 11:12:38 PM »
Quote from: xxbatman94xx on June 25, 2008, 11:19:02 AM
Hey i tested your version its working correctly even on videos :D

All I did was revert the commit direcow identified as the likely offender. This is just a quick workaround, not a proper fix. It works for me, but all I use are the Rockbox menus and WPS. Some apps/games/plugins may be doing more fancy stuff with the LCD that will require a proper fix. As you can read in this thread, LambdaCalculus379 is working on a patch. Until then, I fear this build or simply an older version of Rockbox before the breakage is as good as it gets.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Ipod photo 40gb has bad resolution, all the colours are wrong
« Reply #44 on: June 26, 2008, 06:22:34 AM »
The patch is up; see FS#9122.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

  • Print
Pages: 1 2 [3] 4 5
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Ipod photo 40gb has bad resolution, all the colours are wrong
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.408 seconds with 14 queries.