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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
« previous next »
  • Print
Pages: 1 ... 3 4 [5] 6 7 ... 65

Author Topic: Cowon D2  (Read 636502 times)

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #60 on: November 12, 2007, 04:34:51 AM »
Good stuff. Just out of interest, how did you build tcctool for Windows?

I've been spending a bit of time cross-referencing various similar/identical routines in the M:Bird XY22 (TCC767 - which we have a datasheet for), Logik DAX (TCC773) and D2 (TCC7801)firmwares - particularly routines like the ARM IRQ/FIQ vectors.

This has allowed me to identify a fair number of port-mappings (eg. IRQ controller, timers, digital audio in/out, ADCs). Of course this info is nowhere near complete, but I'll post what I have on the wiki sometime this week.

Yeah, I had a lot of time on my hands the last few days ;)
Logged

Offline Bagder

  • Member
  • *
  • Posts: 1452
    • Daniel's site
Re: Cowon D2
« Reply #61 on: November 12, 2007, 05:28:34 AM »
linuxstb's windows build of tcctool is now available on the rockbox download mirrors:

http://download.rockbox.org/utils/tcctool/
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Cowon D2
« Reply #62 on: November 12, 2007, 05:53:16 AM »
Quote from: shotofadds on November 12, 2007, 04:34:51 AM
Good stuff. Just out of interest, how did you build tcctool for Windows?

I added instructions for building tcctool on Windows to the README file in the tcctool source directory a couple of days ago.
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #63 on: November 15, 2007, 05:23:05 AM »
As has already been stated, there are instructions for recovering bricked D2s here:

http://www.iaudiophile.net/forums/showthread.php?t=17854
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #64 on: November 24, 2007, 07:34:26 AM »
Just to let you guys know, I'm still working away on the firmware disassembly, but it's slow progress.

From what I've identified so far, some areas (eg. timers/ADC controller/SDRAM controller/audio in-out) seem to be practically identical to the 76x datasheet, but using a different I/O base address. Things like the IRQ/FIQ controller are almost the same, with subtle differences (eg. IRQ numbers are different and what looks like a prioritisation mechanism).

Unfortunately I'm still some way off understanding the LCD controller, it seems quite different to the previous generation (76x).
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #65 on: December 04, 2007, 11:02:28 AM »
Some good news and some bad news...

The good news is that I think I've written enough rudimentary startup and LCD driver code to power on the screen, which should eventually allow a simple "Hello World" type program to run (compiled as a bootloader build).

The bad news is that I haven't tried it yet. I'm not 100% convinced that the D2's reset button is actually a hardware reset that can revert my player to the stock firmware. For instance, nothing at all happens if you press reset when the USB cable is connected. That said, it'd be a pretty stupid reset button if it needed software to drive it...

I guess I can always disconnect the battery internally, but I was hoping for something easier!
Logged

Offline man.dovvn

  • Member
  • *
  • Posts: 9
Re: Cowon D2
« Reply #66 on: December 04, 2007, 11:55:54 AM »
Awesome, so I take it you got the LCD controller working? Full functionality or limited?
Have you any idea how to get input from the touchscreen?
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #67 on: December 04, 2007, 12:29:18 PM »
All I've done is hack together some code that mimics the original firmware's LCD initialisation and power-on code, and added this to my local build tree so that the telechips.c bootloader test program will compile.

What this should do is allow us to write debug text to the screen - a huge help when trying to work out how the rest of the player works internally (eg. buttons, touchscreen).

That is, if I even get that far  ;)
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Cowon D2
« Reply #68 on: December 04, 2007, 12:33:11 PM »
My Telechips player will always take power via USB - even if I remove the AA battery it runs on, it will boot if I insert the USB cable.  Maybe this is why the reset doesn't work when you're attached to USB.

If I was you, I would risk it - you won't be able to work on a Rockbox port if you don't have an easy way to reset, so you may as well find out now...

Nice work with the LCD - I hope it works!
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #69 on: December 04, 2007, 02:12:24 PM »
I took the plunge and uploaded some of my own code. Again, there is good news and bad...

Good: I can confirm that the reset button does work once the USB cable is disconnected, and I can confirm that I have had code running on the device (rather than being rejected by the boot ROM). Phew!

Bad: It doesn't switch the LCD on. Bah.

I know that at least some of the code did run, as I performed two tests:

1. I uploaded a correctly formatted firmware file containing nothing but an infinite loop. As expected, nothing happens whatsoever.

2. I uploaded my test program. Nothing happens, except that with this binary, pressing reset results in a bright white screen for a fraction of a second.

One possibility is that I did manage to enable the LCD controller, but haven't powered on the screen properly...
Logged

Offline man.dovvn

  • Member
  • *
  • Posts: 9
Re: Cowon D2
« Reply #70 on: December 04, 2007, 03:25:45 PM »
White screen - Could be the controller powering on or a break in power causing...well...the controller to power on. Is there documentation on the LCD controller hardware?
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #71 on: December 04, 2007, 05:21:57 PM »
It's pretty likely that the LCD panel physically has no power, so no matter what control instructions I send, it's not going to do much.

The D2 has the same power management chip as some of the other Rockbox targets (PCF50606), and there are a mountain of what I believe to be I2C writes in the original firmware - so I'll see if there's anything identifiable there. That, however, may take some time!

The LCD controller is part of the Telechips CPU so there is no public info - my code simply tries to mimic that in the original firmware. Documentation for the actual Samsung panel is linked from the wiki, but that is only half the story.

EDIT: Not sure how I missed them originally, but one of the first actions in the original firmware is to send a whole stream of commands to I2C address 0x10 - ie the PCF50606. I'll investigate and try doing something similar in a day or two...
« Last Edit: December 04, 2007, 06:47:12 PM by shotofadds »
Logged

Offline stephenp

  • Member
  • *
  • Posts: 3
Re: Cowon D2
« Reply #72 on: December 07, 2007, 05:40:02 PM »
Hi

Recently got one of these ...
some linux programming experience ..
what can I do to help with the porting effort?

Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #73 on: December 11, 2007, 09:22:24 AM »
At the moment it's very much a case of trying to figure out, from a disassembly of the original firmware, how to use the hardware - eg. how it powers on the lcd and writes to the screen, how the buttons/touchscreen work etc. For that you need a decent disassembler, some knowledge of ARM code and an awful lot of time and patience.

Then once these basics are done, we need to figure out how everything else works - the flash filesystem, usb, audio, battery level/charging, coprocessor, radio etc etc will all need to be covered eventually. The Rockbox GUI will need adapting for touchscreen use (I think some work is underway on this for another port) and 24-bit colour is not currently supported (IIRC) - but I can see from the D2 firmware that the LCD can be driven in 16bpp mode for the time being.

What I would suggest is fetching a copy of the current Rockbox build (see http://www.rockbox.org/twiki/bin/view/Main/DocsIndex#For_Developers) and familiarising yourself with its structure.

When I have a bit of spare time, I'll do some more work on the LCD and try to get an extrememly basic "Hello World" type program running. This could then be used as a platform for debugging the buttons/touchscreen etc.  If/when I get to that point I'll submit an initial D2 patch to the Rockbox build, as linuxstb has done for the Logik DAX player.

Hope that hasn't scared you off....
Logged

Offline stephenp

  • Member
  • *
  • Posts: 3
Re: Cowon D2
« Reply #74 on: December 11, 2007, 08:00:10 PM »
Do you know where I could get a copy of the tcc7801 datasheet?
Thanks
Logged

  • Print
Pages: 1 ... 3 4 [5] 6 7 ... 65
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
 

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

Page created in 0.096 seconds with 14 queries.