summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/SOURCES2
-rw-r--r--apps/codecs/SOURCES14
-rw-r--r--apps/keymaps/keymap-logikdax.c319
-rw-r--r--bootloader/telechips.c36
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/export/config-logikdax.h22
-rw-r--r--firmware/export/config-m200.h15
-rw-r--r--firmware/target/arm/pcm-telechips.c4
-rw-r--r--firmware/target/arm/tcc77x/lcd-ssd1815.c17
-rw-r--r--firmware/target/arm/tcc77x/logikdax/audio-logikdax.c43
-rw-r--r--firmware/target/arm/tcc77x/m200/audio-m200.c43
-rw-r--r--firmware/target/arm/wmcodec-telechips.c2
-rw-r--r--tools/scramble.c6
13 files changed, 482 insertions, 45 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 419d24d7a8..eb09797719 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -200,4 +200,6 @@ keymaps/keymap-sa9200.c
keymaps/keymap-hdd1630.c
#elif CONFIG_KEYPAD == IAUDIO67_PAD
keymaps/keymap-iaudio67.c
+#elif CONFIG_KEYPAD == LOGIK_DAX_PAD
+keymaps/keymap-logikdax.c
#endif
diff --git a/apps/codecs/SOURCES b/apps/codecs/SOURCES
index 3038903f9e..bd82fcf2d6 100644
--- a/apps/codecs/SOURCES
+++ b/apps/codecs/SOURCES
@@ -5,25 +5,25 @@ mpa.c
flac.c
wav.c
a52.c
-mpc.c
wavpack.c
#ifndef RB_PROFILE
alac.c
#endif
+#if MEMORYSIZE > 2
+mpc.c
wma.c
-#if MEMORYSIZE > 1
aac.c
-#endif
+sid.c
ape.c
+nsf.c
+#endif
+spc.c
+asap.c
mod.c
shorten.c
aiff.c
speex.c
-sid.c
adx.c
-nsf.c
-spc.c
-asap.c
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
/* encoders */
aiff_enc.c
diff --git a/apps/keymaps/keymap-logikdax.c b/apps/keymaps/keymap-logikdax.c
new file mode 100644
index 0000000000..fdf51e1652
--- /dev/null
+++ b/apps/keymaps/keymap-logikdax.c
@@ -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;
+}
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index 7f9a3556c0..a4f4d36c11 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -44,16 +44,12 @@
#include "file.h"
#include "common.h"
-#if defined(COWON_D2) || defined(IAUDIO_7) && defined(TCCBOOT)
-# define REAL_BOOT
+#if defined(COWON_D2) || defined(IAUDIO_7)
+#include "pcf50606.h"
#endif
-#ifdef REAL_BOOT
-# if defined(COWON_D2) || defined(IAUDIO_7)
-# include "pcf50606.h"
-# endif
-# define LOAD_ADDRESS 0x20000000 /* DRAM_START */
-#endif
+/* Address to load main Rockbox image to */
+#define LOAD_ADDRESS 0x20000000 /* DRAM_START */
char version[] = APPSVERSION;
@@ -70,13 +66,12 @@ void show_debug_screen(void)
int count = 0;
bool do_power_off = false;
- /*lcd_puts_scroll(0,0,"this is a very long line to test scrolling");*/
- while(!do_power_off) {
-
+ lcd_puts_scroll(0,0,"this is a very long line to test scrolling");
+ while (!do_power_off) {
line = 1;
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
*/
if (button & POWEROFF_BUTTON) {
@@ -86,7 +81,7 @@ void show_debug_screen(void)
} else {
power_count = 0;
}
-#ifdef BUTTON_SELECT
+#if 0
if (button & BUTTON_SELECT){
_backlight_off();
}
@@ -94,17 +89,19 @@ void show_debug_screen(void)
_backlight_on();
}
#endif
- /*printf("Btn: 0x%08x",button);
+ printf("Btn: 0x%08x",button);
+#if 0
printf("Tick: %d",current_tick);
printf("GPIOA: 0x%08x",GPIOA);
printf("GPIOB: 0x%08x",GPIOB);
printf("GPIOC: 0x%08x",GPIOC);
printf("GPIOD: 0x%08x",GPIOD);
- printf("GPIOE: 0x%08x",GPIOE);*/
+ printf("GPIOE: 0x%08x",GPIOE);
+#endif
#if 0
int i;
- for (i = 1; i<4; i++)
+ for (i = 0; i<4; i++)
{
printf("ADC%d: 0x%04x",i,adc_read(i));
}
@@ -124,9 +121,10 @@ void show_debug_screen(void)
printf("(NOT) POWERED OFF");
while (true);
-
}
+
#else /* !CPU_TCC77X */
+
void show_debug_screen(void)
{
int button;
@@ -178,7 +176,7 @@ void show_debug_screen(void)
void* main(void)
{
-#ifdef REAL_BOOT
+#ifdef TCCBOOT
int rc;
unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS;
#endif
@@ -203,7 +201,7 @@ void* main(void)
/* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is
available for loading the firmware. Otherwise display the debug screen. */
-#ifdef REAL_BOOT
+#ifdef TCCBOOT
printf("Rockbox boot loader");
printf("Version %s", version);
diff --git a/firmware/SOURCES b/firmware/SOURCES
index a120c88fa2..6717ccaf93 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -987,8 +987,10 @@ target/arm/tcc77x/usb-tcc77x.c
target/arm/tcc77x/logikdax/button-logikdax.c
target/arm/tcc77x/logikdax/power-logikdax.c
#ifndef BOOTLOADER
+target/arm/wmcodec-telechips.c
target/arm/tcc77x/debug-tcc77x.c
target/arm/pcm-telechips.c
+target/arm/tcc77x/logikdax/audio-logikdax.c
#endif /* BOOTLOADER */
#endif /* SIMULATOR */
#endif /* LOGIK_DAX */
@@ -1007,8 +1009,10 @@ target/arm/tcc77x/usb-tcc77x.c
target/arm/tcc77x/m200/button-m200.c
target/arm/tcc77x/m200/power-m200.c
#ifndef BOOTLOADER
+target/arm/wmcodec-telechips.c
target/arm/tcc77x/debug-tcc77x.c
target/arm/pcm-telechips.c
+target/arm/tcc77x/m200/audio-m200.c
#endif /* BOOTLOADER */
#endif /* SIMULATOR */
#endif /* SANSA_M200 */
diff --git a/firmware/export/config-logikdax.h b/firmware/export/config-logikdax.h
index c66a2ab581..4b205de425 100644
--- a/firmware/export/config-logikdax.h
+++ b/firmware/export/config-logikdax.h
@@ -32,6 +32,8 @@
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
+#define HAVE_FAT16SUPPORT
+
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
@@ -54,14 +56,22 @@
/* Define this if you have a software controlled 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 */
-#define PLUGIN_BUFFER_SIZE 0x8000
+#define PLUGIN_BUFFER_SIZE 0x8c000
#define AB_REPEAT_ENABLE 1
/* Define this if you do software codec */
#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 HAVE_BACKLIGHT
@@ -109,4 +119,14 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#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 */
diff --git a/firmware/export/config-m200.h b/firmware/export/config-m200.h
index f7ab78d87e..eeac509970 100644
--- a/firmware/export/config-m200.h
+++ b/firmware/export/config-m200.h
@@ -57,8 +57,11 @@
/* Define this if you have a software controlled 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 */
-#define PLUGIN_BUFFER_SIZE 0x8000
+#define PLUGIN_BUFFER_SIZE 0x10000
#define AB_REPEAT_ENABLE 1
@@ -118,4 +121,14 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#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 */
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index 63f50f7d78..b3fd9216dc 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -94,6 +94,10 @@ void pcm_play_dma_init(void)
BCLKCTR |= DEV_DAI;
/* Master mode, 256->64fs, 16bit LSB*/
DAMR = 0x3cce20;
+#elif defined(LOGIK_DAX)
+ /* TODO */
+#elif defined(SANSA_M200)
+ /* TODO */
#else
#error "Target isn't supported"
#endif
diff --git a/firmware/target/arm/tcc77x/lcd-ssd1815.c b/firmware/target/arm/tcc77x/lcd-ssd1815.c
index a6e4481fb2..b41c8d26ef 100644
--- a/firmware/target/arm/tcc77x/lcd-ssd1815.c
+++ b/firmware/target/arm/tcc77x/lcd-ssd1815.c
@@ -129,21 +129,8 @@ void lcd_set_invert_display(bool yesno)
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{
- /* TODO: flip mode isn't working. The commands in the else part of
- this function are how the original firmware inits the LCD */
-
- 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;
- }
+ (void)yesno;
+ /* TODO */
}
diff --git a/firmware/target/arm/tcc77x/logikdax/audio-logikdax.c b/firmware/target/arm/tcc77x/logikdax/audio-logikdax.c
new file mode 100644
index 0000000000..bd85e0b573
--- /dev/null
+++ b/firmware/target/arm/tcc77x/logikdax/audio-logikdax.c
@@ -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;
+}
diff --git a/firmware/target/arm/tcc77x/m200/audio-m200.c b/firmware/target/arm/tcc77x/m200/audio-m200.c
new file mode 100644
index 0000000000..bd85e0b573
--- /dev/null
+++ b/firmware/target/arm/tcc77x/m200/audio-m200.c
@@ -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;
+}
diff --git a/firmware/target/arm/wmcodec-telechips.c b/firmware/target/arm/wmcodec-telechips.c
index 5fcc46154b..de3a29c8c7 100644
--- a/firmware/target/arm/wmcodec-telechips.c
+++ b/firmware/target/arm/wmcodec-telechips.c
@@ -34,7 +34,7 @@
#if defined(COWON_D2)
/* The D2's audio codec uses an I2C address of 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
#else
#error wmcodec not implemented for this target!
diff --git a/tools/scramble.c b/tools/scramble.c
index ffcde9328b..3b2ff67291 100644
--- a/tools/scramble.c
+++ b/tools/scramble.c
@@ -122,7 +122,7 @@ void usage(void)
"\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n"
"\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\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");
exit(1);
@@ -277,6 +277,10 @@ int main (int argc, char** argv)
modelnum = 25;
else if(!strcmp(&argv[1][5], "9200")) /* Philips SA9200 */
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 */
modelnum = 31;
else if (!strcmp(&argv[1][5], "i7"))