diff -u -r ./rockbox-all/bootloader/CVS/Entries /home/slm/projets/rockbox/src/rockbox-all/bootloader/CVS/Entries --- ./rockbox-all/bootloader/CVS/Entries 2006-02-05 16:54:10.171300272 +0100 +++ /home/slm/projets/rockbox/src/rockbox-all/bootloader/CVS/Entries 2006-02-05 00:03:21.000000000 +0100 @@ -1,6 +1,6 @@ /FILES/1.2/Tue Nov 8 00:52:39 2005// /Makefile/1.6/Thu Oct 27 14:39:00 2005// /SOURCES/1.2/Tue Nov 8 00:52:39 2005// -/ipod.c/1.10/Tue Jan 31 09:40:21 2006// +/ipod.c/1.10/Result of merge+Wed Feb 1 22:11:07 2006// /main.c/1.29/Wed Jan 11 15:37:08 2006// D diff -u -r ./rockbox-all/bootloader/CVS/Root /home/slm/projets/rockbox/src/rockbox-all/bootloader/CVS/Root --- ./rockbox-all/bootloader/CVS/Root 2006-02-05 16:54:10.136305592 +0100 +++ /home/slm/projets/rockbox/src/rockbox-all/bootloader/CVS/Root 2006-01-16 17:29:04.000000000 +0100 @@ -1 +1 @@ -:pserver:anonymous@www.rockbox.org:/cvsroot/rockbox +:pserver:anonymous@rockbox.haxx.se:/cvsroot/rockbox Seulement dans /home/slm/projets/rockbox/src/rockbox-all/bootloader/CVS: Template diff -u -r ./rockbox-all/bootloader/ipod.c /home/slm/projets/rockbox/src/rockbox-all/bootloader/ipod.c --- ./rockbox-all/bootloader/ipod.c 2006-01-31 10:40:21.000000000 +0100 +++ /home/slm/projets/rockbox/src/rockbox-all/bootloader/ipod.c 2006-02-05 16:39:19.000000000 +0100 @@ -39,15 +39,27 @@ #include "power.h" #include "file.h" -#define DRAM_START 0x10000000 -#define IPOD_PP5020_RTC 0x60005010 +#define IPOD_PP5020_RTC 0x60005010 +#define IPOD_PP5002_RTC 0xcf001110 +#if (CONFIG_CPU == PP5020) +#define DRAM_START 0x10000000 +#define IPOD_RTC 0x60005010 +#else +#define IPOD_RTC 0xcf001110 +#define IPOD_LCD_BASE 0xc0001000 +#define DRAM_START 0x28000000 +#endif #define IPOD_HW_REVISION (*((volatile unsigned long*)(0x00002084))) + +#define BUTTON_HOLD 0 + /* We copy the hardware revision to the last four bytes of SDRAM and then re-read it after we have re-mapped SDRAM to 0x0 in Rockbox */ #define TMP_IPOD_HW_REVISION (*((volatile unsigned long*)(0x11fffffc))) + #define BUTTON_LEFT 1 #define BUTTON_MENU 2 #define BUTTON_RIGHT 3 @@ -75,6 +87,7 @@ int line=0; + static void memmove16(void *dest, const void *src, unsigned count) { struct bufstr { @@ -99,13 +112,13 @@ /* get current usec counter */ int timer_get_current(void) { - return inl(IPOD_PP5020_RTC); + return inl(IPOD_RTC); } /* check if number of seconds has past */ int timer_check(int clock_start, unsigned int usecs) { - if ((inl(IPOD_PP5020_RTC) - clock_start) >= usecs) { + if ((inl(IPOD_RTC) - clock_start) >= usecs) { return 1; } else { return 0; @@ -115,9 +128,9 @@ /* This isn't a sleep, but let's call it that. */ int usleep(unsigned int usecs) { - unsigned int start = inl(IPOD_PP5020_RTC); + unsigned int start = inl(IPOD_RTC); - while ((inl(IPOD_PP5020_RTC) - start) < usecs) { + while ((inl(IPOD_RTC) - start) < usecs) { // empty } @@ -202,11 +215,22 @@ { unsigned char state; - state = opto_keypad_read(); + +#if CONFIG_CPU == PP5020 + state = opto_keypad_read(); if ((state & 0x4) == 0) return BUTTON_LEFT; if ((state & 0x10) == 0) return BUTTON_MENU; if ((state & 0x8) == 0) return BUTTON_PLAY; if ((state & 0x2) == 0) return BUTTON_RIGHT; +#else + /** For iPod 3G **/ + state = inb(0xcf000030); + if (((state & 0x20) == 0)) return BUTTON_HOLD; /* hold on */ + if ((state & 0x08) == 0) return BUTTON_LEFT; + if ((state & 0x10) == 0) return BUTTON_MENU; + if ((state & 0x04) == 0) return BUTTON_PLAY; + if ((state & 0x01) == 0) return BUTTON_RIGHT; +#endif return 0; } @@ -336,7 +360,8 @@ /* set port L07 on */ outl(((0x100 | 1) << 7), 0x6000d12c); - +#elif CONFIG_BACKLIGHT==BL_IPOD3G + outl(inl(IPOD_LCD_BASE) | 0x2, IPOD_LCD_BASE); #endif TMP_IPOD_HW_REVISION = IPOD_HW_REVISION; @@ -353,7 +378,17 @@ button_init(); #endif - line=0; + /* Notes: iPod Color/Photo LCD is 220x176, Nano is 176x138 */ + + /* Display the 42x47 pixel iPodLinux logo */ + // lcd_bitmap(ipllogo, 20,6, 42,47); + + /* Display the 100x31 pixel Rockbox logo */ + // lcd_bitmap(rockboxlogo, 74,16, 100,31); + + line=1; + lcd_clear_display(); + lcd_update(); lcd_setfont(FONT_SYSFIXED); @@ -397,11 +432,11 @@ pinfo->type, pinfo->size / 2048); lcd_puts(0, line++, buf); lcd_update(); - +#if CONFIG_CPU == PP5020 /* Check for a keypress */ i=key_pressed(); - if ((i!=BUTTON_MENU) && (i!=BUTTON_PLAY)) { + if ((i==BUTTON_MENU)) { lcd_puts(0, line, "Loading Rockbox..."); lcd_update(); rc=load_rockbox(loadbuffer); @@ -441,12 +476,12 @@ } /* If everything else failed, try the original firmware */ - +#endif lcd_puts(0, line, "Loading original firmware..."); lcd_update(); /* Pause for 5 seconds so we can see what's happened */ -// usleep(5000000); + usleep(5000000); entry = tblp->addr + tblp->entryOffset; if (imageno || ((int)tblp->addr & 0xffffff) != 0) { Seulement dans /home/slm/projets/rockbox/src/rockbox-all/bootloader: .#ipod.c.1.6 Seulement dans /home/slm/projets/rockbox/src/rockbox-all/bootloader: .#ipod.c.1.8 diff -u -r ./rockbox-all/bootloader/SOURCES /home/slm/projets/rockbox/src/rockbox-all/bootloader/SOURCES --- ./rockbox-all/bootloader/SOURCES 2005-11-08 01:52:39.000000000 +0100 +++ /home/slm/projets/rockbox/src/rockbox-all/bootloader/SOURCES 2006-01-22 15:16:43.000000000 +0100 @@ -1,4 +1,4 @@ -#if (CONFIG_CPU == PP5020) +#if (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5002) ipod.c #else main.c