diff options
author | Dave Chapman <dave@dchapman.com> | 2005-12-18 13:04:00 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-12-18 13:04:00 +0000 |
commit | 2a7bd9fb7b9698b949ae85e24b17921c807c323c (patch) | |
tree | f81fe7b060f1202996d6e5946ba349e5b9861935 | |
parent | 3f9789b45a971418025a23a437a9c9384c61e2f7 (diff) | |
download | rockbox-2a7bd9fb7b9698b949ae85e24b17921c807c323c.tar.gz rockbox-2a7bd9fb7b9698b949ae85e24b17921c807c323c.zip |
New target - iPod Video.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8261 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/SOURCES | 6 | ||||
-rw-r--r-- | apps/plugins/jewels.c | 4 | ||||
-rw-r--r-- | apps/plugins/sudoku.c | 2 | ||||
-rw-r--r-- | apps/recorder/icons.h | 2 | ||||
-rw-r--r-- | firmware/SOURCES | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-ipodvideo.c | 195 | ||||
-rw-r--r-- | firmware/export/config-ipodvideo.h | 96 | ||||
-rw-r--r-- | firmware/export/config.h | 5 | ||||
-rw-r--r-- | firmware/export/system.h | 2 | ||||
-rw-r--r-- | firmware/system.c | 4 | ||||
-rwxr-xr-x | tools/configure | 20 | ||||
-rw-r--r-- | tools/scramble.c | 4 |
12 files changed, 334 insertions, 11 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index c811dd2757..cf17bbc27c 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -56,11 +56,11 @@ recorder/icons.c | |||
56 | recorder/keyboard.c | 56 | recorder/keyboard.c |
57 | recorder/peakmeter.c | 57 | recorder/peakmeter.c |
58 | recorder/widgets.c | 58 | recorder/widgets.c |
59 | #ifdef IRIVER_H300_SERIES | 59 | #if defined(IRIVER_H300_SERIES) || defined(APPLE_IPODVIDEO) |
60 | recorder/logo-h300.c | 60 | recorder/logo-h300.c |
61 | #elif APPLE_IPODCOLOR | 61 | #elif defined(APPLE_IPODCOLOR) |
62 | recorder/logo-ipod.c | 62 | recorder/logo-ipod.c |
63 | #elif APPLE_IPODNANO | 63 | #elif defined(APPLE_IPODNANO) |
64 | recorder/logo-nano.c | 64 | recorder/logo-nano.c |
65 | #endif | 65 | #endif |
66 | #endif | 66 | #endif |
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 88938dc125..2031a1cc3b 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -103,7 +103,7 @@ | |||
103 | #define SWAP_TIMER 30 | 103 | #define SWAP_TIMER 30 |
104 | 104 | ||
105 | /* use 22x22 tiles */ | 105 | /* use 22x22 tiles */ |
106 | #if (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) && \ | 106 | #if (LCD_HEIGHT >= 176) && (LCD_WIDTH >= 220) && \ |
107 | (LCD_PIXELFORMAT == RGB565SWAPPED) | 107 | (LCD_PIXELFORMAT == RGB565SWAPPED) |
108 | /* size of a tile */ | 108 | /* size of a tile */ |
109 | #define TILE_WIDTH 22 | 109 | #define TILE_WIDTH 22 |
@@ -616,7 +616,7 @@ static unsigned short jewel[8][484] = { | |||
616 | }; | 616 | }; |
617 | 617 | ||
618 | /* use 22x22 tiles */ | 618 | /* use 22x22 tiles */ |
619 | #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) && \ | 619 | #elif (LCD_HEIGHT >= 176) && (LCD_WIDTH >= 220) && \ |
620 | (LCD_PIXELFORMAT == RGB565) | 620 | (LCD_PIXELFORMAT == RGB565) |
621 | /* size of a tile */ | 621 | /* size of a tile */ |
622 | #define TILE_WIDTH 22 | 622 | #define TILE_WIDTH 22 |
diff --git a/apps/plugins/sudoku.c b/apps/plugins/sudoku.c index 9d02ff162a..586b94b721 100644 --- a/apps/plugins/sudoku.c +++ b/apps/plugins/sudoku.c | |||
@@ -381,7 +381,7 @@ static unsigned char num_inverse[10][8]= { | |||
381 | /* Numeral 9 */ | 381 | /* Numeral 9 */ |
382 | {0x3f,0x3f,0x1b,0x15,0x15,0x23,0x3f,0x3f}, | 382 | {0x3f,0x3f,0x1b,0x15,0x15,0x23,0x3f,0x3f}, |
383 | }; | 383 | }; |
384 | #elif (LCD_HEIGHT==176) && (LCD_WIDTH==220) | 384 | #elif (LCD_HEIGHT>=176) && (LCD_WIDTH>=220) |
385 | /* iriver h300 */ | 385 | /* iriver h300 */ |
386 | 386 | ||
387 | /* Internal dimensions of a cell */ | 387 | /* Internal dimensions of a cell */ |
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index 72dc70a95c..98f86cbdac 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -81,7 +81,7 @@ extern const unsigned char bitmap_icon_disk[]; | |||
81 | #if LCD_WIDTH == 112 || LCD_WIDTH == 128 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_WIDTH == 128) | 81 | #if LCD_WIDTH == 112 || LCD_WIDTH == 128 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_WIDTH == 128) |
82 | extern const unsigned char rockbox112x37[]; | 82 | extern const unsigned char rockbox112x37[]; |
83 | #endif | 83 | #endif |
84 | #if defined(IRIVER_H300_SERIES) || defined(APPLE_IPODCOLOR) | 84 | #if defined(IRIVER_H300_SERIES) || defined(APPLE_IPODCOLOR) || defined(APPLE_IPODVIDEO) |
85 | #define ROCKBOXLOGO_WIDTH 220 | 85 | #define ROCKBOXLOGO_WIDTH 220 |
86 | #define ROCKBOXLOGO_HEIGHT 68 | 86 | #define ROCKBOXLOGO_HEIGHT 68 |
87 | extern const unsigned short rockboxlogo[]; | 87 | extern const unsigned short rockboxlogo[]; |
diff --git a/firmware/SOURCES b/firmware/SOURCES index da5453d67d..ce5ec7f803 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -61,6 +61,9 @@ drivers/lcd-16bit.c | |||
61 | #if CONFIG_LCD==LCD_IPODNANO || CONFIG_LCD==LCD_IPODCOLOR | 61 | #if CONFIG_LCD==LCD_IPODNANO || CONFIG_LCD==LCD_IPODCOLOR |
62 | drivers/lcd-ipod.c | 62 | drivers/lcd-ipod.c |
63 | #endif | 63 | #endif |
64 | #if CONFIG_LCD==LCD_IPODVIDEO | ||
65 | drivers/lcd-ipodvideo.c | ||
66 | #endif | ||
64 | #if CONFIG_LCD==LCD_H300 | 67 | #if CONFIG_LCD==LCD_H300 |
65 | drivers/lcd-h300.c | 68 | drivers/lcd-h300.c |
66 | #endif | 69 | #endif |
@@ -99,7 +102,7 @@ drivers/mas.c | |||
99 | #ifdef IRIVER_H300_SERIES | 102 | #ifdef IRIVER_H300_SERIES |
100 | drivers/pcf50606.c | 103 | drivers/pcf50606.c |
101 | #endif | 104 | #endif |
102 | #if defined(APPLE_IPODCOLOR) || defined(APPLE_IPODNANO) | 105 | #if defined(APPLE_IPODCOLOR) || defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO) |
103 | drivers/pcf50605.c | 106 | drivers/pcf50605.c |
104 | #endif | 107 | #endif |
105 | #if CONFIG_RTC == RTC_M41ST84W | 108 | #if CONFIG_RTC == RTC_M41ST84W |
diff --git a/firmware/drivers/lcd-ipodvideo.c b/firmware/drivers/lcd-ipodvideo.c new file mode 100644 index 0000000000..519f185311 --- /dev/null +++ b/firmware/drivers/lcd-ipodvideo.c | |||
@@ -0,0 +1,195 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Dave Chapman | ||
11 | * | ||
12 | * Rockbox driver for iPod Video LCDs | ||
13 | * | ||
14 | * Based on code from ipodlinux - http://ipodlinux.org | ||
15 | * | ||
16 | * All files in this archive are subject to the GNU General Public License. | ||
17 | * See the file COPYING in the source tree root for full license agreement. | ||
18 | * | ||
19 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
20 | * KIND, either express or implied. | ||
21 | * | ||
22 | ****************************************************************************/ | ||
23 | #include "config.h" | ||
24 | #include "cpu.h" | ||
25 | #include "lcd.h" | ||
26 | #include "kernel.h" | ||
27 | #include "system.h" | ||
28 | |||
29 | /*** hardware configuration ***/ | ||
30 | |||
31 | void lcd_set_contrast(int val) | ||
32 | { | ||
33 | /* TODO: Implement lcd_set_contrast() */ | ||
34 | (void)val; | ||
35 | } | ||
36 | |||
37 | void lcd_set_invert_display(bool yesno) | ||
38 | { | ||
39 | /* TODO: Implement lcd_set_invert_display() */ | ||
40 | (void)yesno; | ||
41 | } | ||
42 | |||
43 | /* turn the display upside down (call lcd_update() afterwards) */ | ||
44 | void lcd_set_flip(bool yesno) | ||
45 | { | ||
46 | /* TODO: Implement lcd_set_flip() */ | ||
47 | (void)yesno; | ||
48 | } | ||
49 | |||
50 | /* Rolls up the lcd display by the specified amount of lines. | ||
51 | * Lines that are rolled out over the top of the screen are | ||
52 | * rolled in from the bottom again. This is a hardware | ||
53 | * remapping only and all operations on the lcd are affected. | ||
54 | * -> | ||
55 | * @param int lines - The number of lines that are rolled. | ||
56 | * The value must be 0 <= pixels < LCD_HEIGHT. */ | ||
57 | void lcd_roll(int lines) | ||
58 | { | ||
59 | /* TODO: Implement lcd_roll() */ | ||
60 | lines &= LCD_HEIGHT-1; | ||
61 | } | ||
62 | |||
63 | /* LCD init */ | ||
64 | void lcd_init_device(void) | ||
65 | { | ||
66 | /* iPodLinux doesn't appear have any LCD init code for the Video */ | ||
67 | } | ||
68 | |||
69 | /*** update functions ***/ | ||
70 | |||
71 | /* Performance function that works with an external buffer | ||
72 | note that by and bheight are in 4-pixel units! */ | ||
73 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
74 | int bheight, int stride) | ||
75 | { | ||
76 | /* TODO: Implement lcd_blit() */ | ||
77 | (void)data; | ||
78 | (void)x; | ||
79 | (void)by; | ||
80 | (void)width; | ||
81 | (void)bheight; | ||
82 | (void)stride; | ||
83 | } | ||
84 | |||
85 | static void lcd_bcm_write32(unsigned address, unsigned value) | ||
86 | { | ||
87 | /* write out destination address as two 16bit values */ | ||
88 | outw(address, 0x30010000); | ||
89 | outw((address >> 16), 0x30010000); | ||
90 | |||
91 | /* wait for it to be write ready */ | ||
92 | while ((inw(0x30030000) & 0x2) == 0); | ||
93 | |||
94 | /* write out the value low 16, high 16 */ | ||
95 | outw(value, 0x30000000); | ||
96 | outw((value >> 16), 0x30000000); | ||
97 | } | ||
98 | |||
99 | static void lcd_bcm_setup_rect(unsigned cmd, | ||
100 | unsigned start_horiz, | ||
101 | unsigned start_vert, | ||
102 | unsigned max_horiz, | ||
103 | unsigned max_vert, | ||
104 | unsigned count) | ||
105 | { | ||
106 | lcd_bcm_write32(0x1F8, 0xFFFA0005); | ||
107 | lcd_bcm_write32(0xE0000, cmd); | ||
108 | lcd_bcm_write32(0xE0004, start_horiz); | ||
109 | lcd_bcm_write32(0xE0008, start_vert); | ||
110 | lcd_bcm_write32(0xE000C, max_horiz); | ||
111 | lcd_bcm_write32(0xE0010, max_vert); | ||
112 | lcd_bcm_write32(0xE0014, count); | ||
113 | lcd_bcm_write32(0xE0018, count); | ||
114 | lcd_bcm_write32(0xE001C, 0); | ||
115 | } | ||
116 | |||
117 | static unsigned lcd_bcm_read32(unsigned address) { | ||
118 | while ((inw(0x30020000) & 1) == 0); | ||
119 | |||
120 | /* write out destination address as two 16bit values */ | ||
121 | outw(address, 0x30020000); | ||
122 | outw((address >> 16), 0x30020000); | ||
123 | |||
124 | /* wait for it to be read ready */ | ||
125 | while ((inw(0x30030000) & 0x10) == 0); | ||
126 | |||
127 | /* read the value */ | ||
128 | return inw(0x30000000) | inw(0x30000000) << 16; | ||
129 | } | ||
130 | |||
131 | static void lcd_bcm_finishup(void) { | ||
132 | unsigned data; | ||
133 | |||
134 | outw(0x31, 0x30030000); | ||
135 | |||
136 | lcd_bcm_read32(0x1FC); | ||
137 | |||
138 | do { | ||
139 | data = lcd_bcm_read32(0x1F8); | ||
140 | } while (data == 0xFFFA0005 || data == 0xFFFF); | ||
141 | |||
142 | lcd_bcm_read32(0x1FC); | ||
143 | } | ||
144 | |||
145 | /* Update a fraction of the display. */ | ||
146 | void lcd_update_rect(int x, int y, int width, int height) | ||
147 | { | ||
148 | int rect1,rect2,rect3,rect4; | ||
149 | int newx,newwidth; | ||
150 | int count; | ||
151 | unsigned int curpixel=0; | ||
152 | int c, r; | ||
153 | unsigned long *addr; | ||
154 | int p0,p1; | ||
155 | |||
156 | /* Ensure x and width are both even - so we can read 32-bit aligned | ||
157 | data from lcd_framebuffer */ | ||
158 | newx=x&~1; | ||
159 | newwidth=width&~1; | ||
160 | if (newx+newwidth < x+width) { newwidth+=2; } | ||
161 | x=newx; width=newwidth; | ||
162 | |||
163 | /* calculate the drawing region */ | ||
164 | rect1 = x; /* start horiz */ | ||
165 | rect2 = y; /* start vert */ | ||
166 | rect3 = (x + width) - 1; /* max horiz */ | ||
167 | rect4 = (y + height) - 1; /* max vert */ | ||
168 | |||
169 | /* setup the drawing region */ | ||
170 | count=(width * height) << 1; | ||
171 | lcd_bcm_setup_rect(0x34, rect1, rect2, rect3, rect4, count); | ||
172 | |||
173 | addr = (unsigned long*)&lcd_framebuffer[y][x]; | ||
174 | |||
175 | /* for each row */ | ||
176 | for (r = 0; r < height; r++) { | ||
177 | /* for each column */ | ||
178 | for (c = 0; c < width; c += 2) { | ||
179 | /* output 2 pixels */ | ||
180 | lcd_bcm_write32(0xE0020 + (curpixel << 2), *(addr++)); | ||
181 | curpixel++; | ||
182 | } | ||
183 | |||
184 | addr += (LCD_WIDTH - width)/2; | ||
185 | } | ||
186 | |||
187 | lcd_bcm_finishup(); | ||
188 | } | ||
189 | |||
190 | /* Update the display. | ||
191 | This must be called after all other LCD functions that change the display. */ | ||
192 | void lcd_update(void) | ||
193 | { | ||
194 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | ||
195 | } | ||
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h new file mode 100644 index 0000000000..5972915965 --- /dev/null +++ b/firmware/export/config-ipodvideo.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * This config file is for the Apple iPod Video | ||
3 | */ | ||
4 | #define APPLE_IPODVIDEO 1 | ||
5 | |||
6 | /* For Rolo and boot loader */ | ||
7 | #define MODEL_NUMBER 5 | ||
8 | |||
9 | /* define this if you have recording possibility */ | ||
10 | /*#define HAVE_RECORDING 1*/ | ||
11 | |||
12 | /* define this if you have a bitmap LCD display */ | ||
13 | #define HAVE_LCD_BITMAP 1 | ||
14 | |||
15 | /* define this if you have a colour LCD */ | ||
16 | #define HAVE_LCD_COLOR 1 | ||
17 | |||
18 | /* LCD dimensions */ | ||
19 | #define LCD_WIDTH 320 | ||
20 | #define LCD_HEIGHT 240 | ||
21 | #define LCD_DEPTH 16 /* 65536 colours */ | ||
22 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
23 | |||
24 | #define CONFIG_KEYPAD IPOD_4G_PAD | ||
25 | |||
26 | /* Define this if you do software codec */ | ||
27 | #define CONFIG_CODEC SWCODEC | ||
28 | |||
29 | /* define this if you have a real-time clock */ | ||
30 | #define CONFIG_RTC RTC_PCF50605 | ||
31 | |||
32 | /* Define this if you have a software controlled poweroff */ | ||
33 | //#define HAVE_SW_POWEROFF | ||
34 | |||
35 | /* The number of bytes reserved for loadable codecs */ | ||
36 | #define CODEC_SIZE 0x80000 | ||
37 | |||
38 | /* The number of bytes reserved for loadable plugins */ | ||
39 | #define PLUGIN_BUFFER_SIZE 0xC0000 | ||
40 | |||
41 | /* Define this if you have the WM8975 audio codec */ | ||
42 | #define HAVE_WM8975 | ||
43 | |||
44 | /* Define this for LCD backlight available */ | ||
45 | #define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */ | ||
46 | |||
47 | #ifndef SIMULATOR | ||
48 | |||
49 | /* The Nano actually has a PP5021 - but it's register compatible with | ||
50 | the 5020 so Rockbox doesn't care. */ | ||
51 | /* Define this if you have a PortalPlayer PP5020 */ | ||
52 | #define CONFIG_CPU PP5020 | ||
53 | |||
54 | /* Define this if you want to use the PP5020 i2c interface */ | ||
55 | #define CONFIG_I2C I2C_PP5020 | ||
56 | |||
57 | /* Type of mobile power */ | ||
58 | //#define CONFIG_BATTERY BATT_LIPOL1300 | ||
59 | |||
60 | #define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */ | ||
61 | |||
62 | /* Define this if the platform can charge batteries */ | ||
63 | //#define HAVE_CHARGING 1 | ||
64 | |||
65 | /* define this if the hardware can be powered off while charging */ | ||
66 | //#define HAVE_POWEROFF_WHILE_CHARGING | ||
67 | |||
68 | /* The start address index for ROM builds */ | ||
69 | #define ROM_START 0x00000000 | ||
70 | |||
71 | /* Define this to the CPU frequency */ | ||
72 | #define CPU_FREQ 11289600 | ||
73 | |||
74 | #define CONFIG_LCD LCD_IPODVIDEO | ||
75 | |||
76 | /* Offset ( in the firmware file's header ) to the file length */ | ||
77 | #define FIRMWARE_OFFSET_FILE_LENGTH 0 | ||
78 | |||
79 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
80 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
81 | |||
82 | /* Offset ( in the firmware file's header ) to the real data */ | ||
83 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
84 | |||
85 | #define USB_IPODSTYLE | ||
86 | |||
87 | /* Virtual LED (icon) */ | ||
88 | #define CONFIG_LED LED_VIRTUAL | ||
89 | |||
90 | /* Define this if you have adjustable CPU frequency */ | ||
91 | //#define HAVE_ADJUSTABLE_CPU_FREQ | ||
92 | |||
93 | #define BOOTFILE_EXT "ipod" | ||
94 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
95 | |||
96 | #endif | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index d34c5682c7..858b348ed3 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -75,6 +75,7 @@ | |||
75 | unknown at the time of this writing */ | 75 | unknown at the time of this writing */ |
76 | #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */ | 76 | #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */ |
77 | #define LCD_IPODNANO 7 /* as used by iPod Nano */ | 77 | #define LCD_IPODNANO 7 /* as used by iPod Nano */ |
78 | #define LCD_IPODVIDEO 8 /* as used by iPod Video */ | ||
78 | 79 | ||
79 | /* LCD_PIXELFORMAT */ | 80 | /* LCD_PIXELFORMAT */ |
80 | #define RGB565 565 | 81 | #define RGB565 565 |
@@ -87,7 +88,7 @@ | |||
87 | #define BL_IRIVER_H100 3 /* IRiver GPIO */ | 88 | #define BL_IRIVER_H100 3 /* IRiver GPIO */ |
88 | #define BL_GMINI 4 /* Archos GMini */ | 89 | #define BL_GMINI 4 /* Archos GMini */ |
89 | #define BL_IPOD4G 5 /* Apple iPod 4G */ | 90 | #define BL_IPOD4G 5 /* Apple iPod 4G */ |
90 | #define BL_IPODNANO 6 /* Apple iPod Nano */ | 91 | #define BL_IPODNANO 6 /* Apple iPod Nano and iPod Video*/ |
91 | #define BL_IRIVER_H300 7 /* IRiver PWM */ | 92 | #define BL_IRIVER_H300 7 /* IRiver PWM */ |
92 | 93 | ||
93 | /* CONFIG_I2C */ | 94 | /* CONFIG_I2C */ |
@@ -137,6 +138,8 @@ | |||
137 | #include "config-ipodcolor.h" | 138 | #include "config-ipodcolor.h" |
138 | #elif defined(IPOD_NANO) | 139 | #elif defined(IPOD_NANO) |
139 | #include "config-ipodnano.h" | 140 | #include "config-ipodnano.h" |
141 | #elif defined(IPOD_VIDEO) | ||
142 | #include "config-ipodvideo.h" | ||
140 | #else | 143 | #else |
141 | /* no known platform */ | 144 | /* no known platform */ |
142 | #endif | 145 | #endif |
diff --git a/firmware/export/system.h b/firmware/export/system.h index 40e3884b16..d197b06547 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -34,6 +34,8 @@ extern long cpu_frequency; | |||
34 | #define outl(a,b) (*(volatile unsigned long *) (b) = (a)) | 34 | #define outl(a,b) (*(volatile unsigned long *) (b) = (a)) |
35 | #define inb(a) (*(volatile unsigned char *) (a)) | 35 | #define inb(a) (*(volatile unsigned char *) (a)) |
36 | #define outb(a,b) (*(volatile unsigned char *) (b) = (a)) | 36 | #define outb(a,b) (*(volatile unsigned char *) (b) = (a)) |
37 | #define inw(a) (*(volatile unsigned short *) (a)) | ||
38 | #define outw(a,b) (*(volatile unsigned short *) (b) = (a)) | ||
37 | static inline void udelay(unsigned usecs) | 39 | static inline void udelay(unsigned usecs) |
38 | { | 40 | { |
39 | unsigned start = inl(0x60005010); | 41 | unsigned start = inl(0x60005010); |
diff --git a/firmware/system.c b/firmware/system.c index cbc009aa78..0015b3a55d 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -1126,6 +1126,9 @@ void irq(void) | |||
1126 | 1126 | ||
1127 | static void ipod_init_cache(void) | 1127 | static void ipod_init_cache(void) |
1128 | { | 1128 | { |
1129 | /* Initialising the cache in the iPod Video bootloader prevents | ||
1130 | Rockbox from starting */ | ||
1131 | #if !defined(BOOTLOADER) || !defined(APPLE_IPODVIDEO) | ||
1129 | unsigned i; | 1132 | unsigned i; |
1130 | 1133 | ||
1131 | /* cache init mode? */ | 1134 | /* cache init mode? */ |
@@ -1144,6 +1147,7 @@ static void ipod_init_cache(void) | |||
1144 | 1147 | ||
1145 | for (i = 0x10000000; i < 0x10002000; i += 16) | 1148 | for (i = 0x10000000; i < 0x10002000; i += 16) |
1146 | inb(i); | 1149 | inb(i); |
1150 | #endif | ||
1147 | } | 1151 | } |
1148 | 1152 | ||
1149 | static void ipod_set_cpu_speed(void) | 1153 | static void ipod_set_cpu_speed(void) |
diff --git a/tools/configure b/tools/configure index 5830f89c6d..fc8a52e058 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -410,6 +410,7 @@ appsdir='\$(ROOTDIR)/apps' | |||
410 | echo "12 - iAudio X5" | 410 | echo "12 - iAudio X5" |
411 | echo "13 - iPod Color/Photo" | 411 | echo "13 - iPod Color/Photo" |
412 | echo "14 - iPod Nano" | 412 | echo "14 - iPod Nano" |
413 | echo "15 - iPod Video" | ||
413 | 414 | ||
414 | getit=`input`; | 415 | getit=`input`; |
415 | 416 | ||
@@ -659,6 +660,23 @@ appsdir='\$(ROOTDIR)/apps' | |||
659 | toolset=$ipodbitmaptools | 660 | toolset=$ipodbitmaptools |
660 | ;; | 661 | ;; |
661 | 662 | ||
663 | 15) | ||
664 | archos="ipodvideo" | ||
665 | target="-DIPOD_VIDEO" | ||
666 | memory=32 # 30GB models have 32MB, 60GB have 64MB | ||
667 | arm7tdmicc | ||
668 | tool="$rootdir/tools/scramble -add=ipvd" | ||
669 | output="rockbox.ipod" | ||
670 | appextra="recorder:gui" | ||
671 | archosrom="" | ||
672 | flash="" | ||
673 | plugins="yes" | ||
674 | codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a" | ||
675 | # toolset is the tools within the tools directory that we build for | ||
676 | # this particular target. | ||
677 | toolset=$ipodbitmaptools | ||
678 | ;; | ||
679 | |||
662 | *) | 680 | *) |
663 | echo "Please select an actual target platform!" | 681 | echo "Please select an actual target platform!" |
664 | exit | 682 | exit |
@@ -703,7 +721,7 @@ fi | |||
703 | case $option in | 721 | case $option in |
704 | [Bb]) | 722 | [Bb]) |
705 | case $archos in | 723 | case $archos in |
706 | h100|h120|h300|ipodcolor|ipodnano) | 724 | h100|h120|h300|ipodcolor|ipodnano|ipodvideo) |
707 | extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES | 725 | extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES |
708 | appsdir='\$(ROOTDIR)/bootloader' | 726 | appsdir='\$(ROOTDIR)/bootloader' |
709 | apps="bootloader" | 727 | apps="bootloader" |
diff --git a/tools/scramble.c b/tools/scramble.c index 7d936cf42f..73e4925e48 100644 --- a/tools/scramble.c +++ b/tools/scramble.c | |||
@@ -68,7 +68,7 @@ void usage(void) | |||
68 | "\t-mm=X Archos Multimedia format (X values: A=JBMM, B=AV1xx, C=AV3xx)\n" | 68 | "\t-mm=X Archos Multimedia format (X values: A=JBMM, B=AV1xx, C=AV3xx)\n" |
69 | "\t-iriver iRiver format\n" | 69 | "\t-iriver iRiver format\n" |
70 | "\t-add=X Rockbox generic \"add-up\" checksum format\n" | 70 | "\t-add=X Rockbox generic \"add-up\" checksum format\n" |
71 | "\t (X values: h100, h120, h140, h300, ipco, nano)\n" | 71 | "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd)\n" |
72 | "\nNo option results in Archos standard player/recorder format.\n"); | 72 | "\nNo option results in Archos standard player/recorder format.\n"); |
73 | 73 | ||
74 | exit(1); | 74 | exit(1); |
@@ -166,6 +166,8 @@ int main (int argc, char** argv) | |||
166 | modelnum = 3; | 166 | modelnum = 3; |
167 | else if(!strcmp(&argv[1][5], "nano")) | 167 | else if(!strcmp(&argv[1][5], "nano")) |
168 | modelnum = 4; | 168 | modelnum = 4; |
169 | else if(!strcmp(&argv[1][5], "ipvd")) | ||
170 | modelnum = 5; | ||
169 | else { | 171 | else { |
170 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); | 172 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); |
171 | return 2; | 173 | return 2; |