Rockbox Development > New Ports
SanDisk Sansa c200v2, m200v4, clipv1, clipv2, clip+, and fuzev2
saratoga:
funman: I just realized that I sent you my 8GB player and kept the 4GB (not the other way around as I was thinking for some reason) so I can't test. However I did the test anyway about the 2GB mark and it obviously transfers without trouble. If anyone else wants to try this on a real 8Gb target and let us know if it works:
Apply this patch:
http://www.duke.edu/~mgg6/rockbox/diskcheck.patch
Then use this file:
http://www.duke.edu/~mgg6/rockbox/myfile.txt
with dd as so:
sudo dd if=myfile.txt of=/dev/sdc bs=512 seek=8026112
BE SURE TO CHANGE /DEV/SDC TO WHATEVER YOUR DEVICE MOUNTS AS!
This will write the sequence 1 2 3 ... to the block 0x7A7800. Then check the debug screen under "View IO ports". DIR0 is "0" and DIR4 is "1" if everything is working. If its not, you'll get some other value (at least I hope, I can't test it on mine). Then repeat with funman's patch to see if it works the next time. Then you'll probably want to reformat to fix your file system.
FlynDice:
I postedFS# 10219 for my debugclocks patch. Scrolling is a bit beyond me right now but I did put some paging into it that should work for a clip. See what you think.
funman:
--- Quote from: saratoga on May 18, 2009, 05:49:49 PM ---with dd as so:
sudo dd if=myfile.txt of=/dev/sdc bs=512 seek=8026112
--- End quote ---
The seek= option must be 7964671 (0x7A7800 minus 1 minus OF size)
Also don't forget to write a filesystem which is 3GB or so. This way rockbox won't write data across the 4GB limit, and you don't risk bricking your player.
Also
--- Code: ---+ _DEBUG_PRINTF("DIR0: %x DIR4: %x", *(buf2+512), *(buf2+512+4));
--- End code ---
should be
--- Code: ---+ int *wordbuf = (int*) buf2;
+ _DEBUG_PRINTF("DIR0: %x DIR4: %x", wordbuf[512/4 - 1], wordbuf[512/4]);
--- End code ---
And should return 0x7f and 0x80.
That will show the last word of last sector of first bank, and first word of first sector of second bank.
EDIT:
--- Quote from: FlynDice on May 19, 2009, 03:40:53 AM ---I postedFS# 10219 for my debugclocks patch. Scrolling is a bit beyond me right now but I did put some paging into it that should work for a clip. See what you think.
--- End quote ---
Thanks, I added a few modifications and committed it.
Also thanks to your patch for making me notice a bug in Clip LCD driver :P
EDIT2:
--- Code: ---+ sd_read_sectors(0, 0x7A7800 - 1, 2, buf2);
--- End code ---
should be
--- Code: ---+ sd_read_sectors(0, 0x7A7800 - 0xF000 - 1, 2, buf2);
--- End code ---
because we also skip the OF in sd_read_sectors() .. sorry for the confusion.
Be sure to share your methods with your results so multiple persons can check them!
saratoga:
--- Quote from: funman on May 19, 2009, 06:39:37 AM ---
--- Quote from: saratoga on May 18, 2009, 05:49:49 PM ---with dd as so:
sudo dd if=myfile.txt of=/dev/sdc bs=512 seek=8026112
--- End quote ---
The seek= option must be 7964671 (0x7A7800 minus 1 minus OF size)
--- End quote ---
I don't think the OF shows up over USB, so you don't need to correct for it. At least using 7A7800/2 on my 4GB (since I lack an 8GB) gave me the expected results with dd (first word of the first block of the new bank is 0x01, while the second is 0x02).
funman:
That's because the OF doesn't show up, we need to correct it.
0 ....(OF).... 0xF000 ..... 0x7A7800 (real sectors)
........(OF).................0 ... 0x7A7800-0xF000 (usb)
........(OF).................0 ... 0x7A7800-0xF000 (rockbox)
And on your 4GB Fuze, you only have 1 bank !
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version