1
0
Fork 0
forked from len0rd/rockbox

Trivial changes to make the main Rockbox builds for the Sansa m200 and Logik DAX ports compile. Note that some codecs are currently disabled (due to lowmem on these targets), but that needs more work and analysis to decide how much RAM we want to allocate to codecs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18566 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2008-09-22 19:15:18 +00:00
parent 80458b6222
commit 85807cd44e
13 changed files with 482 additions and 45 deletions

View file

@ -200,4 +200,6 @@ keymaps/keymap-sa9200.c
keymaps/keymap-hdd1630.c keymaps/keymap-hdd1630.c
#elif CONFIG_KEYPAD == IAUDIO67_PAD #elif CONFIG_KEYPAD == IAUDIO67_PAD
keymaps/keymap-iaudio67.c keymaps/keymap-iaudio67.c
#elif CONFIG_KEYPAD == LOGIK_DAX_PAD
keymaps/keymap-logikdax.c
#endif #endif

View file

@ -5,25 +5,25 @@ mpa.c
flac.c flac.c
wav.c wav.c
a52.c a52.c
mpc.c
wavpack.c wavpack.c
#ifndef RB_PROFILE #ifndef RB_PROFILE
alac.c alac.c
#endif #endif
#if MEMORYSIZE > 2
mpc.c
wma.c wma.c
#if MEMORYSIZE > 1
aac.c aac.c
#endif sid.c
ape.c ape.c
nsf.c
#endif
spc.c
asap.c
mod.c mod.c
shorten.c shorten.c
aiff.c aiff.c
speex.c speex.c
sid.c
adx.c adx.c
nsf.c
spc.c
asap.c
#if defined(HAVE_RECORDING) && !defined(SIMULATOR) #if defined(HAVE_RECORDING) && !defined(SIMULATOR)
/* encoders */ /* encoders */
aiff_enc.c aiff_enc.c

View file

@ -0,0 +1,319 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2008 Dave Chapman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
/* Button Code Definitions for Sandisk c200 target */
#include "config.h"
#include "action.h"
#include "button.h"
#include "settings.h"
/* {Action Code, Button code, Prereq button code } */
/*
* The format of the list is as follows
* { Action Code, Button code, Prereq button code }
* if there's no need to check the previous button's value, use BUTTON_NONE
* Insert LAST_ITEM_IN_LIST at the end of each mapping
*/
static const struct button_mapping button_context_standard[] = {
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_MENU, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
{ ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
// { ACTION_STD_QUICKSCREEN, BUTTON_REC|BUTTON_SELECT, BUTTON_NONE },
LAST_ITEM_IN_LIST
}; /* button_context_standard */
static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_POWERPLAY|BUTTON_REL, BUTTON_POWERPLAY },
{ ACTION_WPS_STOP, BUTTON_POWERPLAY|BUTTON_REPEAT, BUTTON_POWERPLAY },
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
{ ACTION_WPS_ABSETB_NEXTDIR,BUTTON_MODE|BUTTON_RIGHT, BUTTON_MODE },
{ ACTION_WPS_ABSETA_PREVDIR,BUTTON_MODE|BUTTON_LEFT, BUTTON_MODE },
{ ACTION_WPS_ABRESET, BUTTON_MODE|BUTTON_UP, BUTTON_MODE },
{ ACTION_WPS_MENU, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
{ ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
#if 0
{ ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_SELECT },
{ ACTION_WPS_CONTEXT, BUTTON_VOLDOWN|BUTTON_REL, BUTTON_VOLDOWN },
{ ACTION_WPS_QUICKSCREEN, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_VOLDOWN },
#endif
LAST_ITEM_IN_LIST
}; /* button_context_wps */
static const struct button_mapping button_context_settings[] = {
{ ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE },
{ ACTION_SETTINGS_RESET, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_settings */
static const struct button_mapping button_context_list[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_list */
static const struct button_mapping button_context_tree[] = {
// { ACTION_TREE_WPS, BUTTON_REC|BUTTON_VOLUP, BUTTON_REC },
// { ACTION_TREE_STOP, BUTTON_REC|BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_REC|BUTTON_VOLUP },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
{ ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
}; /* button_context_listtree_scroll_without_combo */
static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
{ ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
// { ACTION_TREE_PGLEFT, BUTTON_REC|BUTTON_LEFT, BUTTON_REC },
// { ACTION_TREE_PGLEFT, BUTTON_REC|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
// { ACTION_TREE_PGRIGHT, BUTTON_REC|BUTTON_RIGHT, BUTTON_REC },
// { ACTION_TREE_PGRIGHT, BUTTON_REC|BUTTON_RIGHT|BUTTON_REPEAT,BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
}; /* button_context_listtree_scroll_with_combo */
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_settings_yesno */
static const struct button_mapping button_context_quickscreen[] = {
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_MODE|BUTTON_REL, BUTTON_NONE },
{ ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REL, BUTTON_NONE },
{ ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE },
{ ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
{ ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
{ ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_quickscreen */
static const struct button_mapping button_context_settings_right_is_inc[] = {
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT,BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_MODE, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_settings_right_is_inc */
static const struct button_mapping button_context_pitchscreen[] = {
{ ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
{ ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
{ ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
{ ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_PS_EXIT, BUTTON_MODE, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_pitchscreen */
/** Recording Screen **/
#ifdef HAVE_RECORDING
static const struct button_mapping button_context_recscreen[] = {
{ ACTION_STD_MENU, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
{ ACTION_REC_PAUSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_STD_CANCEL, BUTTON_MODE|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REL, BUTTON_REC },
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT,BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_recscreen */
#endif
/** FM Radio Screen **/
#if CONFIG_TUNER
static const struct button_mapping button_context_radio[] = {
{ ACTION_NONE, BUTTON_UP, BUTTON_NONE },
{ ACTION_FM_MENU, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_FM_PRESET, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_FM_STOP, BUTTON_POWERPLAY|BUTTON_REPEAT, BUTTON_POWERPLAY },
{ ACTION_FM_MODE, BUTTON_REC, BUTTON_NONE },
{ ACTION_FM_EXIT, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
{ ACTION_FM_PLAY, BUTTON_POWERPLAY|BUTTON_REL, BUTTON_POWERPLAY },
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
}; /* button_context_radio */
#endif
static const struct button_mapping button_context_keyboard[] = {
{ ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
// { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT, BUTTON_NONE },
// { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT|BUTTON_REPEAT,BUTTON_NONE },
// { ACTION_KBD_CURSOR_RIGHT, BUTTON_REC|BUTTON_RIGHT, BUTTON_NONE },
// { ACTION_KBD_CURSOR_RIGHT, BUTTON_REC|BUTTON_RIGHT|BUTTON_REPEAT,BUTTON_NONE },
{ ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
{ ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
// { ACTION_KBD_BACKSPACE, BUTTON_REC|BUTTON_VOLDOWN, BUTTON_NONE },
// { ACTION_KBD_BACKSPACE, BUTTON_REC|BUTTON_VOLDOWN|BUTTON_REPEAT,BUTTON_NONE },
// { ACTION_KBD_PAGE_FLIP, BUTTON_REC|BUTTON_SELECT, BUTTON_REC },
{ ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_KBD_DONE, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_KBD_ABORT, BUTTON_MODE, BUTTON_NONE },
LAST_ITEM_IN_LIST
}; /* button_context_keyboard */
static const struct button_mapping button_context_bmark[] = {
// { ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_bmark */
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
const struct button_mapping* get_context_mapping(int context)
{
switch (context)
{
case CONTEXT_STD:
return button_context_standard;
case CONTEXT_WPS:
return button_context_wps;
case CONTEXT_LIST:
return button_context_list;
case CONTEXT_TREE:
case CONTEXT_MAINMENU:
if (global_settings.hold_lr_for_scroll_in_list)
return button_context_listtree_scroll_without_combo;
else
return button_context_listtree_scroll_with_combo;
case CONTEXT_CUSTOM|CONTEXT_TREE:
return button_context_tree;
case CONTEXT_SETTINGS:
case CONTEXT_SETTINGS_TIME:
return button_context_settings;
case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
case CONTEXT_SETTINGS_COLOURCHOOSER:
case CONTEXT_SETTINGS_EQ:
return button_context_settings_right_is_inc;
case CONTEXT_YESNOSCREEN:
return button_context_yesno;
#if CONFIG_TUNER
case CONTEXT_FM:
return button_context_radio;
#endif
case CONTEXT_BOOKMARKSCREEN:
return button_context_bmark;
case CONTEXT_QUICKSCREEN:
return button_context_quickscreen;
case CONTEXT_PITCHSCREEN:
return button_context_pitchscreen;
#ifdef HAVE_RECORDING
case CONTEXT_RECSCREEN:
return button_context_recscreen;
#endif
case CONTEXT_KEYBOARD:
return button_context_keyboard;
default:
return button_context_standard;
}
return button_context_standard;
}

View file

@ -44,16 +44,12 @@
#include "file.h" #include "file.h"
#include "common.h" #include "common.h"
#if defined(COWON_D2) || defined(IAUDIO_7) && defined(TCCBOOT) #if defined(COWON_D2) || defined(IAUDIO_7)
# define REAL_BOOT #include "pcf50606.h"
#endif #endif
#ifdef REAL_BOOT /* Address to load main Rockbox image to */
# if defined(COWON_D2) || defined(IAUDIO_7) #define LOAD_ADDRESS 0x20000000 /* DRAM_START */
# include "pcf50606.h"
# endif
# define LOAD_ADDRESS 0x20000000 /* DRAM_START */
#endif
char version[] = APPSVERSION; char version[] = APPSVERSION;
@ -70,13 +66,12 @@ void show_debug_screen(void)
int count = 0; int count = 0;
bool do_power_off = false; bool do_power_off = false;
/*lcd_puts_scroll(0,0,"this is a very long line to test scrolling");*/ lcd_puts_scroll(0,0,"this is a very long line to test scrolling");
while(!do_power_off) { while (!do_power_off) {
line = 1; line = 1;
button = button_get(false); button = button_get(false);
/* Power-off if POWER button has been held for a time /* Power-off if POWER button has been held for a time
This loop is currently running at about 100 iterations/second This loop is currently running at about 100 iterations/second
*/ */
if (button & POWEROFF_BUTTON) { if (button & POWEROFF_BUTTON) {
@ -86,7 +81,7 @@ void show_debug_screen(void)
} else { } else {
power_count = 0; power_count = 0;
} }
#ifdef BUTTON_SELECT #if 0
if (button & BUTTON_SELECT){ if (button & BUTTON_SELECT){
_backlight_off(); _backlight_off();
} }
@ -94,17 +89,19 @@ void show_debug_screen(void)
_backlight_on(); _backlight_on();
} }
#endif #endif
/*printf("Btn: 0x%08x",button); printf("Btn: 0x%08x",button);
#if 0
printf("Tick: %d",current_tick); printf("Tick: %d",current_tick);
printf("GPIOA: 0x%08x",GPIOA); printf("GPIOA: 0x%08x",GPIOA);
printf("GPIOB: 0x%08x",GPIOB); printf("GPIOB: 0x%08x",GPIOB);
printf("GPIOC: 0x%08x",GPIOC); printf("GPIOC: 0x%08x",GPIOC);
printf("GPIOD: 0x%08x",GPIOD); printf("GPIOD: 0x%08x",GPIOD);
printf("GPIOE: 0x%08x",GPIOE);*/ printf("GPIOE: 0x%08x",GPIOE);
#endif
#if 0 #if 0
int i; int i;
for (i = 1; i<4; i++) for (i = 0; i<4; i++)
{ {
printf("ADC%d: 0x%04x",i,adc_read(i)); printf("ADC%d: 0x%04x",i,adc_read(i));
} }
@ -124,9 +121,10 @@ void show_debug_screen(void)
printf("(NOT) POWERED OFF"); printf("(NOT) POWERED OFF");
while (true); while (true);
} }
#else /* !CPU_TCC77X */ #else /* !CPU_TCC77X */
void show_debug_screen(void) void show_debug_screen(void)
{ {
int button; int button;
@ -178,7 +176,7 @@ void show_debug_screen(void)
void* main(void) void* main(void)
{ {
#ifdef REAL_BOOT #ifdef TCCBOOT
int rc; int rc;
unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS; unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS;
#endif #endif
@ -203,7 +201,7 @@ void* main(void)
/* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is /* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is
available for loading the firmware. Otherwise display the debug screen. */ available for loading the firmware. Otherwise display the debug screen. */
#ifdef REAL_BOOT #ifdef TCCBOOT
printf("Rockbox boot loader"); printf("Rockbox boot loader");
printf("Version %s", version); printf("Version %s", version);

View file

@ -987,8 +987,10 @@ target/arm/tcc77x/usb-tcc77x.c
target/arm/tcc77x/logikdax/button-logikdax.c target/arm/tcc77x/logikdax/button-logikdax.c
target/arm/tcc77x/logikdax/power-logikdax.c target/arm/tcc77x/logikdax/power-logikdax.c
#ifndef BOOTLOADER #ifndef BOOTLOADER
target/arm/wmcodec-telechips.c
target/arm/tcc77x/debug-tcc77x.c target/arm/tcc77x/debug-tcc77x.c
target/arm/pcm-telechips.c target/arm/pcm-telechips.c
target/arm/tcc77x/logikdax/audio-logikdax.c
#endif /* BOOTLOADER */ #endif /* BOOTLOADER */
#endif /* SIMULATOR */ #endif /* SIMULATOR */
#endif /* LOGIK_DAX */ #endif /* LOGIK_DAX */
@ -1007,8 +1009,10 @@ target/arm/tcc77x/usb-tcc77x.c
target/arm/tcc77x/m200/button-m200.c target/arm/tcc77x/m200/button-m200.c
target/arm/tcc77x/m200/power-m200.c target/arm/tcc77x/m200/power-m200.c
#ifndef BOOTLOADER #ifndef BOOTLOADER
target/arm/wmcodec-telechips.c
target/arm/tcc77x/debug-tcc77x.c target/arm/tcc77x/debug-tcc77x.c
target/arm/pcm-telechips.c target/arm/pcm-telechips.c
target/arm/tcc77x/m200/audio-m200.c
#endif /* BOOTLOADER */ #endif /* BOOTLOADER */
#endif /* SIMULATOR */ #endif /* SIMULATOR */
#endif /* SANSA_M200 */ #endif /* SANSA_M200 */

View file

@ -32,6 +32,8 @@
/* define this if you would like tagcache to build on this target */ /* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE #define HAVE_TAGCACHE
#define HAVE_FAT16SUPPORT
/* define this if you have a flash memory storage */ /* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE #define HAVE_FLASH_STORAGE
@ -54,14 +56,22 @@
/* Define this if you have a software controlled poweroff */ /* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF #define HAVE_SW_POWEROFF
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x9c000
/* The number of bytes reserved for loadable plugins */ /* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x8000 #define PLUGIN_BUFFER_SIZE 0x8c000
#define AB_REPEAT_ENABLE 1 #define AB_REPEAT_ENABLE 1
/* Define this if you do software codec */ /* Define this if you do software codec */
#define CONFIG_CODEC SWCODEC #define CONFIG_CODEC SWCODEC
/* The DAX uses built-in WM8731 codec */
#define HAVE_WM8731
/* Codec is slave on serial bus */
#define CODEC_SLAVE
/* Define this for LCD backlight available */ /* Define this for LCD backlight available */
#define HAVE_BACKLIGHT #define HAVE_BACKLIGHT
@ -109,4 +119,14 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT #define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/" #define BOOTDIR "/"
#define IBSS_ATTR_VOICE_STACK
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define ICODE_ATTR_TREMOR_MDCT
#define ICODE_ATTR_FLAC
#define IBSS_ATTR_FLAC_DECODED0
#define ICONST_ATTR_MPA_HUFFMAN
#define IBSS_ATTR_MPC_SAMPLE_BUF
#define ICODE_ATTR_ALAC
#define IBSS_ATTR_SHORTEN_DECODED0
#endif /* SIMULATOR */ #endif /* SIMULATOR */

View file

@ -57,8 +57,11 @@
/* Define this if you have a software controlled poweroff */ /* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF #define HAVE_SW_POWEROFF
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x20000
/* The number of bytes reserved for loadable plugins */ /* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x8000 #define PLUGIN_BUFFER_SIZE 0x10000
#define AB_REPEAT_ENABLE 1 #define AB_REPEAT_ENABLE 1
@ -118,4 +121,14 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT #define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/" #define BOOTDIR "/"
#define IBSS_ATTR_VOICE_STACK
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define ICODE_ATTR_TREMOR_MDCT
#define ICODE_ATTR_FLAC
#define IBSS_ATTR_FLAC_DECODED0
#define ICONST_ATTR_MPA_HUFFMAN
#define IBSS_ATTR_MPC_SAMPLE_BUF
#define ICODE_ATTR_ALAC
#define IBSS_ATTR_SHORTEN_DECODED0
#endif /* SIMULATOR */ #endif /* SIMULATOR */

View file

@ -94,6 +94,10 @@ void pcm_play_dma_init(void)
BCLKCTR |= DEV_DAI; BCLKCTR |= DEV_DAI;
/* Master mode, 256->64fs, 16bit LSB*/ /* Master mode, 256->64fs, 16bit LSB*/
DAMR = 0x3cce20; DAMR = 0x3cce20;
#elif defined(LOGIK_DAX)
/* TODO */
#elif defined(SANSA_M200)
/* TODO */
#else #else
#error "Target isn't supported" #error "Target isn't supported"
#endif #endif

View file

@ -129,21 +129,8 @@ void lcd_set_invert_display(bool yesno)
/* turn the display upside down (call lcd_update() afterwards) */ /* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno) void lcd_set_flip(bool yesno)
{ {
/* TODO: flip mode isn't working. The commands in the else part of (void)yesno;
this function are how the original firmware inits the LCD */ /* TODO */
if (yesno)
{
lcd_write_command(LCD_SET_SEGMENT_REMAP | 0x01);
lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION);
xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */
}
else
{
lcd_write_command(LCD_SET_SEGMENT_REMAP);
lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION | 0x08);
xoffset = 0;
}
} }

View file

@ -0,0 +1,43 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2007 by Michael Sevakis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "system.h"
#include "cpu.h"
#include "audio.h"
#include "sound.h"
int audio_channels = 2;
int audio_output_source = AUDIO_SRC_PLAYBACK;
void audiohw_enable_output(bool on)
{
(void)on;
}
void audio_set_output_source(int source)
{
(void)source;
}
void audio_input_mux(int source, unsigned flags)
{
(void)source;
(void)flags;
}

View file

@ -0,0 +1,43 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2007 by Michael Sevakis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "system.h"
#include "cpu.h"
#include "audio.h"
#include "sound.h"
int audio_channels = 2;
int audio_output_source = AUDIO_SRC_PLAYBACK;
void audiohw_enable_output(bool on)
{
(void)on;
}
void audio_set_output_source(int source)
{
(void)source;
}
void audio_input_mux(int source, unsigned flags)
{
(void)source;
(void)flags;
}

View file

@ -34,7 +34,7 @@
#if defined(COWON_D2) #if defined(COWON_D2)
/* The D2's audio codec uses an I2C address of 0x34 */ /* The D2's audio codec uses an I2C address of 0x34 */
#define I2C_AUDIO_ADDRESS 0x34 #define I2C_AUDIO_ADDRESS 0x34
#elif defined (IAUDIO_7) #elif defined (IAUDIO_7) || defined(LOGIK_DAX) || defined(SANSA_M200)
#define I2C_AUDIO_ADDRESS 0x34 #define I2C_AUDIO_ADDRESS 0x34
#else #else
#error wmcodec not implemented for this target! #error wmcodec not implemented for this target!

View file

@ -122,7 +122,7 @@ void usage(void)
"\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n" "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n"
"\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\n" "\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\n"
"\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n"); "\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n");
printf("\t 9200, 1630)\n"); printf("\t 9200, 1630, ldax, m200)\n");
printf("\nNo option results in Archos standard player/recorder format.\n"); printf("\nNo option results in Archos standard player/recorder format.\n");
exit(1); exit(1);
@ -277,6 +277,10 @@ int main (int argc, char** argv)
modelnum = 25; modelnum = 25;
else if(!strcmp(&argv[1][5], "9200")) /* Philips SA9200 */ else if(!strcmp(&argv[1][5], "9200")) /* Philips SA9200 */
modelnum = 26; modelnum = 26;
else if (!strcmp(&argv[1][5], "ldax"))
modelnum = 27;
else if (!strcmp(&argv[1][5], "m200"))
modelnum = 29;
else if(!strcmp(&argv[1][5], "1630")) /* Philips HDD1630 */ else if(!strcmp(&argv[1][5], "1630")) /* Philips HDD1630 */
modelnum = 31; modelnum = 31;
else if (!strcmp(&argv[1][5], "i7")) else if (!strcmp(&argv[1][5], "i7"))