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
translations translations
Search



Donate

Rockbox Technical Forums


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

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Sandisk C100 series
« previous next »
  • Print
Pages: 1 2 [3] 4

Author Topic: Sandisk C100 series  (Read 54618 times)

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #30 on: June 16, 2008, 02:32:45 PM »
Shotofadds:

Here are the 2 files you requested in IRC:

* config-c100.h (3.36 kB - downloaded 427 times.)
* lcd-S6B33B2.c (7.27 kB - downloaded 538 times.)
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Sandisk C100 series
« Reply #31 on: June 16, 2008, 03:17:25 PM »
I'm not really sure what to suggest, other than trying to confirm that the initialisation sequence and lcd_send_data() etc that you're using are the same as the OF uses.

Can you describe the on-screen result in a little more detail? What do you see if you modify the bootloader to just display a whole screen of, say red?
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #32 on: June 16, 2008, 08:02:35 PM »
So after poking around for a while looking for differences between the OF and RB, I finally decided to try running a "make clean" to see if some old stuff was jamming up the works, and yeehaw!, I've got the debug screen displaying legibly.  The only problem is that it's offset by about a third from the top by magic rainbow junk.  Will mess around more tomorrow...
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #33 on: June 17, 2008, 02:47:57 PM »
The current state of affairs is attached.  It's strange how the "Count" field is at the top and not the bottom.  I put the "X" after "Btn" to verify I was messing with the right file.  The scrolling line does not appear at all. 

Edit:  Alrighty, it's just that the text is looping around to the top if it doesn't fit the screen.  Commenting everything out but the scrolling line displays it fine.  So it's just a matter of finding out where and why it's displaying everything offset like that.

* c100-bootloader.JPG (112.47 kB, 1024x768 - viewed 826 times.)
« Last Edit: June 17, 2008, 08:41:50 PM by MarcGuay »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #34 on: June 17, 2008, 08:41:13 PM »
The display has been corrected.  Credit goes to amiconn for spotting the unneeded offset leftover from the c200.  I've posted the results of button-press tests here: http://www.rockbox.org/twiki/bin/view/Main/SansaC100Port#GPIOA_Pins.  I thought I'd see if I can find the shutdown routine and try to implement it next... Or perhaps it would make more sense to explore the ADC and get the button specifics down?

* c100-bootloader2.JPG (76.18 kB, 768x576 - viewed 773 times.)
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2275
  • /usr/local/bin/weirdo
    • The Nostalgia Roadtrip
Re: Sandisk C100 series
« Reply #35 on: June 18, 2008, 10:23:22 AM »
Quote from: MarcGuay on June 17, 2008, 08:41:13 PM
Or perhaps it would make more sense to explore the ADC and get the button specifics down?

Sure, the ADC should hold what you're looking for. I'm going to do the same for the m200 (although I'm swapping with shotofadds so he can have my NAND one :)).

I might pick up a c100 if I can find one for dirt cheap and start pitching in a little bit here as well.
Logged
Retired Rockbox dev; still a user!

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

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #36 on: June 18, 2008, 10:26:53 AM »
Unfortunately, I couldn't see any significant changes in the ADC readings while pressing buttons.  But I just remembered that Production Test Mode is triggered on boot when the volume-down and circle-down buttons are held, so the boot sequence must have a button check which would uncover the difference between vol-up and vol-down.
Logged

Offline lowlight

  • Developer
  • Member
  • *
  • Posts: 194
Re: Sandisk C100 series
« Reply #37 on: June 18, 2008, 02:28:44 PM »
I have a c100, but never got around the messing with it. However, MarcGuay's recent success gave me some motivation.  Here's what I found during lunch: in the OF, there's a key test that goes something like this...

Code: [Select]
GPIOA |= 0x4;
GPIOA &= ~0x8;
i=20; while (i--);
if (GPIOA & 0x10) btn |= BUTTON_PLAY; /* up */
if (GPIOA & 0x20) btn |= BUTTON_RIGHT;
if (GPIOA & 0x40) btn |= BUTTON_LEFT;

GPIOA |= 0x8;
GPIOA &= ~0x4;
i=20; while (i--);
if (GPIOA & 0x10) btn |= BUTTON_VOL_UP;
if (GPIOA & 0x20) btn |= BUTTON_VOL_DN;
if (GPIOA & 0x40) btn |= BUTTON_AB; /* down */

if (GPIOA & 0x100) btn |= BUTTON_MENU; /* power */
if (GPIOA & 0x80) btn |= BUTTON_STOP; /* select */
if (GPIOA & 0x2) btn |= BUTTON_HOLD;
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #38 on: June 18, 2008, 04:26:50 PM »
Wow, nothing like working with bits to make you feel dumb.

So my GPIOA testing showed this:

1111000000000100 (F004) 0x4 - Volume Up/Down & A-B Repeat/Down Button
1111000000001000 (F008) 0x8 - Left/Up/Right Directions

And it seems that the key test is checking the bits in bold, which as far as I can tell never change.  There's a line in the OF before the first 2 IF chunks that goes like this:

Code: [Select]
AND     R0, R0, #0x70
Which I believe is just saying "throw out all the bits except those we're about to check", again, the ones that never change.  So where is the OF deriving the uniqueness from?
Logged

Offline lowlight

  • Developer
  • Member
  • *
  • Posts: 194
Re: Sandisk C100 series
« Reply #39 on: June 18, 2008, 05:50:57 PM »
I'm guessing that the key lies in setting/clearing those two bits
Code: [Select]
GPIOA |= 0x4;
GPIOA &= ~0x8;
and
Code: [Select]
GPIOA |= 0x8;
GPIOA &= ~0x4;

before checking the other bits.
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #40 on: June 19, 2008, 10:50:19 AM »
Found it.

Code: [Select]
GPIOA_DIR |= 0xC
was done at the beginning of the key test and adding that to the button_read_device routine (along with the code lowlight posted) gets all the buttons to read correctly!  Psyched.

Any ideas why that pin wasn't switched on during the GPIO init?  I added it there and it works that way as well.  Curious.

I'll try to post a patch to the tracker soon so other people can mess around.

Edit:  I see, there's a button_init_device() routine and that's where it belongs.
« Last Edit: June 19, 2008, 11:02:21 AM by MarcGuay »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #41 on: June 19, 2008, 06:15:29 PM »
Quote from: linuxstb on June 12, 2008, 04:44:18 PM
Have you managed to work out which pin (if any) is the backlight control?

Just found it.  Setting GPIOE 0x2 to zero turns off the backlight.


And here's the patch which adds the c100 as a target:

http://www.rockbox.org/tracker/task/9106
« Last Edit: June 19, 2008, 07:15:35 PM by MarcGuay »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #42 on: July 09, 2008, 07:50:47 PM »
lowlight:  If you're interested in looking at a v1 firmware file, there's a link on the port page to an installer for 1.0005a, and may I ask what lines of the code you're looking at for NAND information?
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #43 on: July 09, 2008, 10:37:57 PM »
I just came across a vague comment in the ABI c100 review comments that insinuates that the c140 and c150 had different firmware versions.

http://www.anythingbutipod.com/archives/2006/03/sandisk-sansa-c100-series-review.php#comment-415125

This would explain why I have problems when trying to downgrade my c150 to v1.  I don't know how seriously to take these people's comments but someone claims to have bricked their device by trying to upgrade their c140 to v2.  Of course, we can always use tcctool to test different versions harmlessly.  The v1 firmware on the c150 provides an interface free of strings (I feel like I've mentionned this before, but maybe now it has more significance).  It remains a mystery why lowlight's reversed v2 NAND code works on the c140 and not the c150, however, and leads me to believe that they are unrelated issues.

For those not following IRC and Flyspray, here's a link to the other half of this:
http://www.rockbox.org/tracker/task/9096

« Last Edit: July 10, 2008, 08:24:17 AM by MarcGuay »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Sandisk C100 series
« Reply #44 on: July 22, 2008, 09:20:28 PM »
It looks as though the c150, or at least the one I have, has a few hardware differences from the c140.  I've posted a new picture of the front of the board here: http://www.rockbox.org/twiki/bin/view/Main/SansaC100Port, and am currently trying to find a way to get at the rest of it without totally trashing the thing.

---

Alrighty, it looks as though there are two versions of the c100 series as well - one with a regular NAND flash interface and one like the v3 m200s and e200/c200 v1s with the bonus chip acting as an SD interface. 
« Last Edit: July 22, 2008, 11:38:43 PM by MarcGuay »
Logged

  • Print
Pages: 1 2 [3] 4
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Sandisk C100 series
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.067 seconds with 22 queries.