summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/debug_menu.c10
-rw-r--r--apps/main.c7
-rw-r--r--firmware/export/buffer.h5
-rw-r--r--firmware/export/config/ipodvideo.h13
-rw-r--r--firmware/target/arm/ipod/app.lds4
-rw-r--r--manual/configure_rockbox/system_options.tex6
-rwxr-xr-xtools/configure1
7 files changed, 30 insertions, 16 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index ba0114774d..c0a476dc10 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1601,12 +1601,10 @@ static bool view_battery(void)
lcd_putsf(0, 7, "Headphone: %s",
headphone ? "connected" : "disconnected");
#ifdef IPOD_VIDEO
- x = (adc_read(ADC_4066_ISTAT) * 2400) /
-#if MEM == 64
- (1024 * 2);
-#else
- (1024 * 3);
-#endif
+ if(probed_ramsize == 64)
+ x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 2);
+ else
+ x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 3);
lcd_putsf(0, 8, "Ibat: %d mA", x);
lcd_putsf(0, 9, "Vbat * Ibat: %d mW", x * y / 1000);
#endif
diff --git a/apps/main.c b/apps/main.c
index ceaa85f38f..0c2f0751b3 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -422,6 +422,13 @@ static void init(void)
#endif
system_init();
+#if defined(IPOD_VIDEO)
+ audiobufend=(unsigned char *)audiobufend_lds;
+ if(MEM==64 && probed_ramsize!=64)
+ {
+ audiobufend -= (32<<20);
+ }
+#endif
kernel_init();
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/buffer.h b/firmware/export/buffer.h
index ae8886bffc..f0525edd68 100644
--- a/firmware/export/buffer.h
+++ b/firmware/export/buffer.h
@@ -24,7 +24,12 @@
#include "config.h"
/* defined in linker script */
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
+#if defined(IPOD_VIDEO)
+extern unsigned char *audiobufend_lds[];
+unsigned char *audiobufend;
+#else
extern unsigned char audiobufend[];
+#endif
#else
extern unsigned char *audiobufend;
#endif
diff --git a/firmware/export/config/ipodvideo.h b/firmware/export/config/ipodvideo.h
index e0c3bfb68e..82391d1f77 100644
--- a/firmware/export/config/ipodvideo.h
+++ b/firmware/export/config/ipodvideo.h
@@ -136,15 +136,10 @@
#define HAVE_HEADPHONE_DETECTION
/* Type of mobile power */
-#if (MEM==32) /* this is the 30GB-model */
-# define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the 30GB model */
-# define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
-# define BATTERY_CAPACITY_MAX 1000 /* max. capacity selectable */
-#else /* these are the 60/80GB-models */
-# define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity for the 60/80GB model */
-# define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
-# define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */
-#endif
+#define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the */
+ /* 30GB model. 60/80GB would have 600 */
+#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds
index ec26fdbe38..f8e6906a4c 100644
--- a/firmware/target/arm/ipod/app.lds
+++ b/firmware/target/arm/ipod/app.lds
@@ -192,7 +192,11 @@ SECTIONS
.audiobufend ENDAUDIOADDR (NOLOAD) :
{
+#ifdef IPOD_VIDEO
+ audiobufend_lds = .;
+#else
audiobufend = .;
+#endif
_audiobufend = .;
} > DRAM
diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex
index c9e526ae1d..9e70a0e06d 100644
--- a/manual/configure_rockbox/system_options.tex
+++ b/manual/configure_rockbox/system_options.tex
@@ -38,7 +38,7 @@
\opt{ipodmini}{400~mAh (1G) or 630~mAh (2G)}%
\opt{ipodcolor}{700~mAh}%
\opt{ipodnano}{300~mAh}%
- \opt{ipodvideo}{400~mAh (30~GB) or 600~mAh (60/80~GB)}%
+ \opt{ipodvideo}{400~mAh}%
\opt{ipod4g}{630~mAh}%
\opt{ipod3g}{630~mAh}%
\opt{ipod1g2g}{1200~mAh}%
@@ -52,6 +52,10 @@
calculation. Changing this setting has no effect whatsoever on
actual battery life. This setting only affects the accuracy of the
runtime estimation as shown on screen.
+ \opt{ipodvideo}{Rockbox does not automatically distinguish
+ between the 60/80~GB models and the 30~GB models which determine the
+ default value. If your \dap{} is a 60~GB or 80~GB model
+ set the value to 600~mAh for more accuracy in the runtime estimation.}
\opt{iaudiom3,iaudiom5,iaudiox5}{Rockbox does not automatically distinguish
between the ``L'' models and the ``simple'' models which determine the
default value. If your \dap{} is an
diff --git a/tools/configure b/tools/configure
index e554c3d76b..1742e28789 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1467,6 +1467,7 @@ fi
target_id=15
modelname="ipodvideo"
target="-DIPOD_VIDEO"
+ memory=64 # always. This is reduced at runtime if needed
arm7tdmicc
tool="$rootdir/tools/scramble -add=ipvd"
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"