summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/SOURCES2
-rw-r--r--apps/keymaps/keymap-c100.c19
-rw-r--r--firmware/SOURCES11
-rw-r--r--firmware/export/config-c100.h37
-rw-r--r--firmware/target/arm/pcm-telechips.c2
-rw-r--r--firmware/target/arm/tcc77x/c100/lcd-S6B33B2.c83
-rwxr-xr-xtools/configure3
-rw-r--r--tools/scramble.c6
8 files changed, 55 insertions, 108 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index c974379e39..0fe001b242 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -222,6 +222,8 @@ keymaps/keymap-sa9200.c
keymaps/keymap-hdd1630.c
#elif CONFIG_KEYPAD == IAUDIO67_PAD
keymaps/keymap-iaudio67.c
+#elif CONFIG_KEYPAD == SANSA_C100_PAD
+keymaps/keymap-c100.c
#elif CONFIG_KEYPAD == LOGIK_DAX_PAD
keymaps/keymap-logikdax.c
#elif CONFIG_KEYPAD == SANSA_FUZE_PAD
diff --git a/apps/keymaps/keymap-c100.c b/apps/keymaps/keymap-c100.c
index 2562a053f6..c8ba16cdfb 100644
--- a/apps/keymaps/keymap-c100.c
+++ b/apps/keymaps/keymap-c100.c
@@ -34,15 +34,16 @@
* Insert LAST_ITEM_IN_LIST at the end of each mapping
*/
static const struct button_mapping button_context_standard[] = {
- { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
- { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
- { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
- { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
- { ACTION_STD_MENU, BUTTON_DOWN|BUTTON_REL, BUTTON_DOWN },
- { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
- { ACTION_STD_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN },
+ { 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_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
+ { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
LAST_ITEM_IN_LIST
}; /* button_context_standard */
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 3a78f5540c..8ebdcb79bd 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1086,18 +1086,19 @@ target/arm/tcc77x/m200/audio-m200.c
#ifdef SANSA_C100
#ifndef SIMULATOR
drivers/nand_id.c
-target/arm/tcc77x/adc-tcc77x.c
-target/arm/tcc77x/kernel-tcc77x.c
-target/arm/tcc77x/c100/lcd-S6B33B2.c
-target/arm/tcc77x/powermgmt-tcc77x.c
+target/arm/usb-tcc.c
target/arm/tcc77x/system-tcc77x.c
+target/arm/tcc77x/kernel-tcc77x.c
target/arm/tcc77x/timer-tcc77x.c
-target/arm/usb-tcc.c
+target/arm/tcc77x/adc-tcc77x.c
+target/arm/tcc77x/powermgmt-tcc77x.c
+target/arm/tcc77x/c100/lcd-S6B33B2.c
target/arm/tcc77x/c100/button-c100.c
target/arm/tcc77x/c100/power-c100.c
#ifndef BOOTLOADER
target/arm/tcc77x/debug-tcc77x.c
target/arm/pcm-telechips.c
+target/arm/tcc77x/c100/audio-c100.c
#endif /* BOOTLOADER */
#endif /* SIMULATOR */
#endif /* SANSA_C100 */
diff --git a/firmware/export/config-c100.h b/firmware/export/config-c100.h
index 1fe1a6ca64..c4e5ad5673 100644
--- a/firmware/export/config-c100.h
+++ b/firmware/export/config-c100.h
@@ -5,15 +5,11 @@
#define MODEL_NAME "Sandisk Sansa c100 series"
-/* For Rolo and boot loader */
+/* For Rolo and bootloader */
#define MODEL_NUMBER 30
-/* define this if you have recording possibility */
-//#define HAVE_RECORDING
-
-/* Define bitmask of input sources - recordable bitmask can be defined
- explicitly if different */
-//#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_SPDIF)
+/* define hardware samples rate caps mask */
+#define HW_SAMPR_CAPS (/*SAMPR_CAP_88 | */SAMPR_CAP_44/* | SAMPR_CAP_22 | SAMPR_CAP_11*/)
/* define this if you have a bitmap LCD display */
#define HAVE_LCD_BITMAP
@@ -22,10 +18,10 @@
#define HAVE_LCD_COLOR
/* define this if you can flip your LCD */
-#define HAVE_LCD_FLIP
+/*#define HAVE_LCD_FLIP*/
/* define this if you can invert the colours on your LCD */
-#define HAVE_LCD_INVERT
+/*#define HAVE_LCD_INVERT*/
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
@@ -39,10 +35,13 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+/* Only v1 */
#define CONFIG_STORAGE STORAGE_NAND
-
#define CONFIG_NAND NAND_TCC
+/* c100's with direct-to-NAND access are FAT16 */
+#define HAVE_FAT16SUPPORT
+
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
@@ -63,8 +62,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 0x50000
+
/* The number of bytes reserved for loadable plugins */
-#define PLUGIN_BUFFER_SIZE 0x8000
+#define PLUGIN_BUFFER_SIZE 0x50000
#define AB_REPEAT_ENABLE 1
@@ -74,6 +76,8 @@
/* Define this if you have the TLV320 audio codec */
#define HAVE_TLV320
+/*#define CONFIG_TUNER TEA5767*/
+
/* TLV320 has no tone controls, so we use the software ones */
#define HAVE_SW_TONE_CONTROLS
@@ -102,14 +106,11 @@
/* Define this to the CPU frequency */
#define CPU_FREQ 120000000
-/* Offset ( in the firmware file's header ) to the file length */
-#define FIRMWARE_OFFSET_FILE_LENGTH 0
-
/* Offset ( in the firmware file's header ) to the file CRC */
-#define FIRMWARE_OFFSET_FILE_CRC 4
+#define FIRMWARE_OFFSET_FILE_CRC 0
/* Offset ( in the firmware file's header ) to the real data */
-#define FIRMWARE_OFFSET_FILE_DATA 6
+#define FIRMWARE_OFFSET_FILE_DATA 8
/* The start address index for ROM builds */
/* #define ROM_START 0x11010 for behind original Archos */
@@ -118,11 +119,11 @@
/* Software controlled LED */
#define CONFIG_LED LED_VIRTUAL
-#define CONFIG_LCD LCD_S6B33B2 /* Not sure about this... same as C200? - MarcGuay */
+#define CONFIG_LCD LCD_S6B33B2
#define BOOTFILE_EXT "c100"
#define BOOTFILE "rockbox." BOOTFILE_EXT
-#define BOOTDIR "/"
+#define BOOTDIR "/.rockbox"
#ifdef BOOTLOADER
#define TCCBOOT
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index 06f6638e54..e172e62269 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -93,6 +93,8 @@ void pcm_play_dma_init(void)
/* TODO */
#elif defined(SANSA_M200)
/* TODO */
+#elif defined(SANSA_C100)
+ /* TODO */
#else
#error "Target isn't supported"
#endif
diff --git a/firmware/target/arm/tcc77x/c100/lcd-S6B33B2.c b/firmware/target/arm/tcc77x/c100/lcd-S6B33B2.c
index c6ec9ee996..4f1ec2a1f2 100644
--- a/firmware/target/arm/tcc77x/c100/lcd-S6B33B2.c
+++ b/firmware/target/arm/tcc77x/c100/lcd-S6B33B2.c
@@ -28,7 +28,6 @@
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
/* LCD command set for Samsung S6B33B2 */
-
#define R_NOP 0x00
#define R_OSCILLATION_MODE 0x02
#define R_DRIVER_OUTPUT_MODE 0x10
@@ -179,7 +178,7 @@ void lcd_init_device(void)
lcd_send_command(R_SPEC_DISPLAY_PATTERN);
lcd_send_command(0x0);
-
+
/* Rockbox init */
lcd_clear_display();
lcd_update();
@@ -212,89 +211,27 @@ void lcd_set_flip(bool yesno)
}
/*** update functions ***/
-
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
}
-/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. */
-extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
- int width,
- int stride);
-extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
- int width,
- int stride,
- int x_screen, /* To align dither pattern */
- int y_screen);
-/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_blit_yuv(unsigned char * const src[3],
+/* TODO: implement me */
+void lcd_blit_yuv(unsigned char *const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
- unsigned char const * yuv_src[3];
- off_t z;
+ (void) src;
+ (void) src_x;
+ (void) src_y;
+ (void) stride;
+ (void) x;
+ (void) y;
- /* Sorry, but width and height must be >= 2 or else */
- width &= ~1;
- height >>= 1;
-
- y += 0x1a;
-
- z = stride*src_y;
- yuv_src[0] = src[0] + z + src_x;
- yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1);
- yuv_src[2] = src[2] + (yuv_src[1] - src[1]);
+ return;
- lcd_send_command(R_ENTRY_MODE);
- lcd_send_command(0x80);
-
- lcd_send_command(R_X_ADDR_AREA);
- lcd_send_command(x);
- lcd_send_command(x + width - 1);
-
- if (lcd_yuv_options & LCD_YUV_DITHER)
- {
- do
- {
- lcd_send_command(R_Y_ADDR_AREA);
- lcd_send_command(y);
- lcd_send_command(y + 1);
-
- /* NOP needed because on some c200s, the previous lcd_send_command
- is interpreted as a separate command instead of part of
- R_Y_ADDR_AREA. */
- lcd_send_command(R_NOP);
-
- lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y);
- yuv_src[0] += stride << 1; /* Skip down two luma lines */
- yuv_src[1] += stride >> 1; /* Skip down one chroma line */
- yuv_src[2] += stride >> 1;
- y += 2;
- }
- while (--height > 0);
- }
- else
- {
- do
- {
- lcd_send_command(R_Y_ADDR_AREA);
- lcd_send_command(y);
- lcd_send_command(y + 1);
-
- lcd_send_command(R_NOP);
-
- lcd_write_yuv420_lines(yuv_src, width, stride);
- yuv_src[0] += stride << 1; /* Skip down two luma lines */
- yuv_src[1] += stride >> 1; /* Skip down one chroma line */
- yuv_src[2] += stride >> 1;
- y += 2;
- }
- while (--height > 0);
- }
}
-
/* Update the display.
This must be called after all other LCD functions that change the display. */
void lcd_update(void)
diff --git a/tools/configure b/tools/configure
index 1eec733243..a58e8c6e1c 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1709,7 +1709,7 @@ fi
target_id=42
modelname="c100"
target="-DSANSA_C100"
- memory=32 # unsure, must check
+ memory=2
arm946cc
tool="$rootdir/tools/scramble -add=c100"
boottool="$rootdir/tools/scramble -tcc=crc"
@@ -1719,6 +1719,7 @@ fi
output="rockbox.c100"
appextra="recorder:gui"
plugins=""
+ swcodec="yes"
# toolset is the tools within the tools directory that we build for
# this particular target.
toolset=$tccbitmaptools
diff --git a/tools/scramble.c b/tools/scramble.c
index ffb568b75e..8bf8d3d034 100644
--- a/tools/scramble.c
+++ b/tools/scramble.c
@@ -122,8 +122,8 @@ 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, ldax, m200, clip, e2v2, m2v4, fuze,\n"
- "\t c2v2, clv2, y820, y920, y925)\n");
+ printf("\t 9200, 1630, ldax, m200, c100, clip, e2v2, m2v4,\n"
+ "\t fuze, c2v2, clv2, y820, y920, y925)\n");
printf("\nNo option results in Archos standard player/recorder format.\n");
exit(1);
@@ -278,6 +278,8 @@ int main (int argc, char** argv)
modelnum = 25;
else if (!strcmp(&argv[1][5], "m200"))
modelnum = 29;
+ else if(!strcmp(&argv[1][5], "c100"))
+ modelnum = 30;
else if(!strcmp(&argv[1][5], "1630")) /* Philips HDD1630 */
modelnum = 31;
else if (!strcmp(&argv[1][5], "i7"))