diff options
-rw-r--r-- | apps/plugins/wormlet.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-ipod.c | 27 | ||||
-rw-r--r-- | firmware/export/config-ipodmini.h | 2 | ||||
-rwxr-xr-x | firmware/export/config-ipodmini2g.h | 99 | ||||
-rw-r--r-- | firmware/export/config.h | 2 | ||||
-rwxr-xr-x | tools/configure | 24 | ||||
-rw-r--r-- | tools/scramble.c | 2 |
7 files changed, 148 insertions, 12 deletions
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 04a29a5414..d6929f2bd7 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c | |||
@@ -109,6 +109,10 @@ PLUGIN_HEADER | |||
109 | #define FOOD_SIZE 3 | 109 | #define FOOD_SIZE 3 |
110 | #define ARGH_SIZE 4 | 110 | #define ARGH_SIZE 4 |
111 | #define SPEED 14 | 111 | #define SPEED 14 |
112 | #elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) | ||
113 | #define FOOD_SIZE 4 | ||
114 | #define ARGH_SIZE 5 | ||
115 | #define SPEED 10 | ||
112 | #elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) | 116 | #elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) |
113 | #define FOOD_SIZE 4 | 117 | #define FOOD_SIZE 4 |
114 | #define ARGH_SIZE 5 | 118 | #define ARGH_SIZE 5 |
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index 2d190d3d70..8936dad912 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c | |||
@@ -76,20 +76,28 @@ static void lcd_wait_write(void) | |||
76 | static void lcd_send_data(int data_lo, int data_hi) | 76 | static void lcd_send_data(int data_lo, int data_hi) |
77 | { | 77 | { |
78 | lcd_wait_write(); | 78 | lcd_wait_write(); |
79 | outl(data_lo, IPOD_LCD_BASE + LCD_DATA); | 79 | #ifdef IPOD_MINI2G |
80 | lcd_wait_write(); | 80 | outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE); |
81 | outl(data_hi, IPOD_LCD_BASE + LCD_DATA); | 81 | outl(data_hi | (data_lo << 8) | 0x760000, IPOD_LCD_BASE+8); |
82 | #else | ||
83 | outl(data_lo, IPOD_LCD_BASE + LCD_DATA); | ||
84 | lcd_wait_write(); | ||
85 | outl(data_hi, IPOD_LCD_BASE + LCD_DATA); | ||
86 | #endif | ||
82 | } | 87 | } |
83 | 88 | ||
84 | /* send LCD command */ | 89 | /* send LCD command */ |
85 | static void lcd_prepare_cmd(int cmd) | 90 | static void lcd_prepare_cmd(int cmd) |
86 | { | 91 | { |
87 | lcd_wait_write(); | 92 | lcd_wait_write(); |
88 | 93 | #ifdef IPOD_MINI2G | |
89 | outl(0x0, IPOD_LCD_BASE + LCD_CMD); | 94 | outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE); |
90 | lcd_wait_write(); | 95 | outl(cmd | 0x740000, IPOD_LCD_BASE+8); |
91 | outl(cmd, IPOD_LCD_BASE + LCD_CMD); | 96 | #else |
92 | 97 | outl(0x0, IPOD_LCD_BASE + LCD_CMD); | |
98 | lcd_wait_write(); | ||
99 | outl(cmd, IPOD_LCD_BASE + LCD_CMD); | ||
100 | #endif | ||
93 | } | 101 | } |
94 | 102 | ||
95 | /* send LCD command and data */ | 103 | /* send LCD command and data */ |
@@ -105,7 +113,8 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi) | |||
105 | * LCD init | 113 | * LCD init |
106 | **/ | 114 | **/ |
107 | void lcd_init_device(void){ | 115 | void lcd_init_device(void){ |
108 | #ifdef APPLE_IPODMINI | 116 | #if defined(IPOD_MINI) || defined(IPOD_MINI2G) |
117 | /* driver output control - 160x112 (ipod mini) */ | ||
109 | lcd_cmd_and_data(0x1, 0x0, 0xd); | 118 | lcd_cmd_and_data(0x1, 0x0, 0xd); |
110 | #else | 119 | #else |
111 | /* driver output control - 160x128 */ | 120 | /* driver output control - 160x128 */ |
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index 5ac97545d4..ea3f4e5c41 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This config file is for the Apple iPod Mini (1st & 2nd Gen) | 2 | * This config file is for the Apple iPod Mini (1st Gen) |
3 | */ | 3 | */ |
4 | #define APPLE_IPODMINI 1 | 4 | #define APPLE_IPODMINI 1 |
5 | 5 | ||
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h new file mode 100755 index 0000000000..60d812f8d7 --- /dev/null +++ b/firmware/export/config-ipodmini2g.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * This config file is for the Apple iPod Mini 2nd Gen | ||
3 | */ | ||
4 | #define APPLE_IPODMINI 1 | ||
5 | |||
6 | #define IPOD_ARCH 1 | ||
7 | |||
8 | /* For Rolo and boot loader */ | ||
9 | #define MODEL_NUMBER 11 | ||
10 | |||
11 | /* define this if you have recording possibility */ | ||
12 | /*#define HAVE_RECORDING 1*/ | ||
13 | |||
14 | /* define this if you have a bitmap LCD display */ | ||
15 | #define HAVE_LCD_BITMAP 1 | ||
16 | |||
17 | /* LCD dimensions */ | ||
18 | #define LCD_WIDTH 138 | ||
19 | #define LCD_HEIGHT 110 | ||
20 | #define LCD_DEPTH 2 /* 4 colours - 2bpp */ | ||
21 | |||
22 | #define LCD_PIXELFORMAT HORIZONTAL_PACKING | ||
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 | #ifndef BOOTLOADER | ||
31 | #define CONFIG_RTC RTC_PCF50605 | ||
32 | #endif | ||
33 | |||
34 | /* Define this if you have a software controlled poweroff */ | ||
35 | #define HAVE_SW_POWEROFF | ||
36 | |||
37 | /* The number of bytes reserved for loadable codecs */ | ||
38 | #define CODEC_SIZE 0x80000 | ||
39 | |||
40 | /* The number of bytes reserved for loadable plugins */ | ||
41 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
42 | |||
43 | /* Define this if you have the WM8975 audio codec */ | ||
44 | #define HAVE_WM8975 | ||
45 | |||
46 | /* Define this for LCD backlight available */ | ||
47 | #define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */ | ||
48 | |||
49 | #ifndef SIMULATOR | ||
50 | |||
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_IPOD2BPP | ||
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 | /* define this if the unit can be powered or charged via USB */ | ||
88 | #define HAVE_USB_POWER | ||
89 | |||
90 | /* Virtual LED (icon) */ | ||
91 | #define CONFIG_LED LED_VIRTUAL | ||
92 | |||
93 | /* Define this if you have adjustable CPU frequency */ | ||
94 | //#define HAVE_ADJUSTABLE_CPU_FREQ | ||
95 | |||
96 | #define BOOTFILE_EXT "ipod" | ||
97 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
98 | |||
99 | #endif | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 4ef4bd63fc..de89dfe99e 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -170,6 +170,8 @@ | |||
170 | #include "config-gigabeat.h" | 170 | #include "config-gigabeat.h" |
171 | #elif defined(IPOD_MINI) | 171 | #elif defined(IPOD_MINI) |
172 | #include "config-ipodmini.h" | 172 | #include "config-ipodmini.h" |
173 | #elif defined(IPOD_MINI2G) | ||
174 | #include "config-ipodmini2g.h" | ||
173 | #else | 175 | #else |
174 | /* no known platform */ | 176 | /* no known platform */ |
175 | #endif | 177 | #endif |
diff --git a/tools/configure b/tools/configure index c9f7f83c10..17bec94891 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -465,9 +465,10 @@ toolsdir='\$(ROOTDIR)/tools' | |||
465 | echo "15 - iPod Video" | 465 | echo "15 - iPod Video" |
466 | echo "16 - iPod 3G" | 466 | echo "16 - iPod 3G" |
467 | echo "17 - iPod 4G (Grayscale)" | 467 | echo "17 - iPod 4G (Grayscale)" |
468 | echo "18 - iPod Mini (1G/2G)" | 468 | echo "18 - iPod Mini (1G)" |
469 | echo "19 - iriver iFP-790" | 469 | echo "19 - iriver iFP-790" |
470 | echo "20 - Toshiba Gigabeat F" | 470 | echo "20 - Toshiba Gigabeat F" |
471 | echo "21 - iPod Mini 2G" | ||
471 | 472 | ||
472 | target_id=`input`; | 473 | target_id=`input`; |
473 | 474 | ||
@@ -870,6 +871,25 @@ toolsdir='\$(ROOTDIR)/tools' | |||
870 | toolset=$gigabeatbitmaptools | 871 | toolset=$gigabeatbitmaptools |
871 | ;; | 872 | ;; |
872 | 873 | ||
874 | 21) | ||
875 | archos="ipodmini2g" | ||
876 | target="-DIPOD_MINI2G" | ||
877 | memory=32 # always | ||
878 | arm7tdmicc | ||
879 | tool="$rootdir/tools/scramble -add=mn2g" | ||
880 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | ||
881 | bmp2rb_native="$rootdir/tools/bmp2rb -f 6" | ||
882 | output="rockbox.ipod" | ||
883 | appextra="recorder:gui" | ||
884 | archosrom="" | ||
885 | flash="" | ||
886 | plugins="yes" | ||
887 | codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a" | ||
888 | # toolset is the tools within the tools directory that we build for | ||
889 | # this particular target. | ||
890 | toolset=$ipodbitmaptools | ||
891 | ;; | ||
892 | |||
873 | *) | 893 | *) |
874 | echo "Please select an actual target platform!" | 894 | echo "Please select an actual target platform!" |
875 | exit | 895 | exit |
@@ -925,7 +945,7 @@ fi | |||
925 | case $option in | 945 | case $option in |
926 | [Bb]) | 946 | [Bb]) |
927 | case $archos in | 947 | case $archos in |
928 | h100|h120|h300|x5|ipodcolor|ipodnano|ipodvideo|ipod3g|ipod4g|ipodmini) | 948 | h100|h120|h300|x5|ipodcolor|ipodnano|ipodvideo|ipod3g|ipod4g|ipodmini|ipodmini2g) |
929 | extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES | 949 | extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES |
930 | appsdir='\$(ROOTDIR)/bootloader' | 950 | appsdir='\$(ROOTDIR)/bootloader' |
931 | apps="bootloader" | 951 | apps="bootloader" |
diff --git a/tools/scramble.c b/tools/scramble.c index cb3630ea5a..8bab41596a 100644 --- a/tools/scramble.c +++ b/tools/scramble.c | |||
@@ -183,6 +183,8 @@ int main (int argc, char** argv) | |||
183 | modelnum = 9; | 183 | modelnum = 9; |
184 | else if(!strcmp(&argv[1][5], "iax5")) | 184 | else if(!strcmp(&argv[1][5], "iax5")) |
185 | modelnum = 10; | 185 | modelnum = 10; |
186 | else if(!strcmp(&argv[1][5], "mn2g")) | ||
187 | modelnum = 11; | ||
186 | else { | 188 | else { |
187 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); | 189 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); |
188 | return 2; | 190 | return 2; |