mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Unify 32mb and 64mb ipod video builds - FS#11580
Since memory on 32mb ipod videos is mapped twice, a 64mb build still has codecs and plugins mapped in a usable area. This means that all that needs to be done to support 32mb and 64mb boards with the same build is to adjust audiobufend to avoid using more than the actually present RAM. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27960 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b9201e3c6f
commit
a1cf4ced83
7 changed files with 30 additions and 16 deletions
|
@ -1601,12 +1601,10 @@ static bool view_battery(void)
|
||||||
lcd_putsf(0, 7, "Headphone: %s",
|
lcd_putsf(0, 7, "Headphone: %s",
|
||||||
headphone ? "connected" : "disconnected");
|
headphone ? "connected" : "disconnected");
|
||||||
#ifdef IPOD_VIDEO
|
#ifdef IPOD_VIDEO
|
||||||
x = (adc_read(ADC_4066_ISTAT) * 2400) /
|
if(probed_ramsize == 64)
|
||||||
#if MEM == 64
|
x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 2);
|
||||||
(1024 * 2);
|
else
|
||||||
#else
|
x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 3);
|
||||||
(1024 * 3);
|
|
||||||
#endif
|
|
||||||
lcd_putsf(0, 8, "Ibat: %d mA", x);
|
lcd_putsf(0, 8, "Ibat: %d mA", x);
|
||||||
lcd_putsf(0, 9, "Vbat * Ibat: %d mW", x * y / 1000);
|
lcd_putsf(0, 9, "Vbat * Ibat: %d mW", x * y / 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -422,6 +422,13 @@ static void init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
system_init();
|
system_init();
|
||||||
|
#if defined(IPOD_VIDEO)
|
||||||
|
audiobufend=(unsigned char *)audiobufend_lds;
|
||||||
|
if(MEM==64 && probed_ramsize!=64)
|
||||||
|
{
|
||||||
|
audiobufend -= (32<<20);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
kernel_init();
|
kernel_init();
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -24,7 +24,12 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
/* defined in linker script */
|
/* defined in linker script */
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
|
#if defined(IPOD_VIDEO)
|
||||||
|
extern unsigned char *audiobufend_lds[];
|
||||||
|
unsigned char *audiobufend;
|
||||||
|
#else
|
||||||
extern unsigned char audiobufend[];
|
extern unsigned char audiobufend[];
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
extern unsigned char *audiobufend;
|
extern unsigned char *audiobufend;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -136,15 +136,10 @@
|
||||||
#define HAVE_HEADPHONE_DETECTION
|
#define HAVE_HEADPHONE_DETECTION
|
||||||
|
|
||||||
/* Type of mobile power */
|
/* Type of mobile power */
|
||||||
#if (MEM==32) /* this is the 30GB-model */
|
#define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the */
|
||||||
# define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the 30GB model */
|
/* 30GB model. 60/80GB would have 600 */
|
||||||
#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
|
#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 */
|
#define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */
|
||||||
#endif
|
|
||||||
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,11 @@ SECTIONS
|
||||||
|
|
||||||
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
||||||
{
|
{
|
||||||
|
#ifdef IPOD_VIDEO
|
||||||
|
audiobufend_lds = .;
|
||||||
|
#else
|
||||||
audiobufend = .;
|
audiobufend = .;
|
||||||
|
#endif
|
||||||
_audiobufend = .;
|
_audiobufend = .;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
\opt{ipodmini}{400~mAh (1G) or 630~mAh (2G)}%
|
\opt{ipodmini}{400~mAh (1G) or 630~mAh (2G)}%
|
||||||
\opt{ipodcolor}{700~mAh}%
|
\opt{ipodcolor}{700~mAh}%
|
||||||
\opt{ipodnano}{300~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{ipod4g}{630~mAh}%
|
||||||
\opt{ipod3g}{630~mAh}%
|
\opt{ipod3g}{630~mAh}%
|
||||||
\opt{ipod1g2g}{1200~mAh}%
|
\opt{ipod1g2g}{1200~mAh}%
|
||||||
|
@ -52,6 +52,10 @@
|
||||||
calculation. Changing this setting has no effect whatsoever on
|
calculation. Changing this setting has no effect whatsoever on
|
||||||
actual battery life. This setting only affects the accuracy of the
|
actual battery life. This setting only affects the accuracy of the
|
||||||
runtime estimation as shown on screen.
|
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
|
\opt{iaudiom3,iaudiom5,iaudiox5}{Rockbox does not automatically distinguish
|
||||||
between the ``L'' models and the ``simple'' models which determine the
|
between the ``L'' models and the ``simple'' models which determine the
|
||||||
default value. If your \dap{} is an
|
default value. If your \dap{} is an
|
||||||
|
|
1
tools/configure
vendored
1
tools/configure
vendored
|
@ -1467,6 +1467,7 @@ fi
|
||||||
target_id=15
|
target_id=15
|
||||||
modelname="ipodvideo"
|
modelname="ipodvideo"
|
||||||
target="-DIPOD_VIDEO"
|
target="-DIPOD_VIDEO"
|
||||||
|
memory=64 # always. This is reduced at runtime if needed
|
||||||
arm7tdmicc
|
arm7tdmicc
|
||||||
tool="$rootdir/tools/scramble -add=ipvd"
|
tool="$rootdir/tools/scramble -add=ipvd"
|
||||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue