summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapps/plugins/bubbles.c10
-rw-r--r--apps/plugins/disktidy.c9
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c4
-rw-r--r--apps/plugins/solitaire.c19
-rw-r--r--bootloader/h10.c262
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/export/config-h10.h2
-rw-r--r--firmware/target/arm/ata-pp5020.c (renamed from firmware/target/arm/iriver/h10/ata-h10.c)0
-rw-r--r--firmware/target/arm/ata-target.h23
-rw-r--r--firmware/target/arm/iriver/h10/ata-target.h72
-rw-r--r--firmware/target/arm/iriver/h10/button-h10.c26
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10.c30
-rwxr-xr-xtools/configure5
-rw-r--r--uisimulator/sdl/UI-h10.bmpbin0 -> 613142 bytes
-rw-r--r--uisimulator/sdl/button.c13
15 files changed, 367 insertions, 110 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index 11e415867e..f47889b08b 100755
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -116,6 +116,16 @@ PLUGIN_HEADER
#define BUBBLES_SELECT BUTTON_UP
#define BUBBLES_RESUME BUTTON_DOWN
+#elif CONFIG_KEYPAD == IRIVER_H10_PAD
+#define BUBBLES_LEFT BUTTON_LEFT
+#define BUBBLES_RIGHT BUTTON_RIGHT
+#define BUBBLES_UP BUTTON_SCROLL_UP
+#define BUBBLES_DOWN BUTTON_SCROLL_DOWN
+#define BUBBLES_QUIT BUTTON_POWER
+#define BUBBLES_START BUTTON_PLAY
+#define BUBBLES_SELECT BUTTON_REW
+#define BUBBLES_RESUME BUTTON_FF
+
#else
#error BUBBLES: Unsupported keypad
#endif
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index 321a1b4b31..e8d6385cbe 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -83,6 +83,12 @@ enum tidy_system
#define TIDY_LEFT BUTTON_LEFT
#define TIDY_RIGHT BUTTON_RIGHT
+#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
+#define TIDY_DO BUTTON_PLAY
+#define TIDY_STOP BUTTON_POWER
+#define TIDY_LEFT BUTTON_LEFT
+#define TIDY_RIGHT BUTTON_RIGHT
+
#else
#error DISKTIDY: Unsupported keypad
#endif
@@ -374,6 +380,9 @@ void tidy_lcd_menu(enum tidy_system system)
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
rb->lcd_puts(0, 0, "[Select] to clean up");
rb->lcd_puts(0, 1, "[A] to exit/abort");
+#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
+ rb->lcd_puts(0, 0, "[Play] to clean up");
+ rb->lcd_puts(0, 1, "[Power] to exit/abort");
#else
#error DISKTIDY: Unsupported model
#endif
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 7a5bff4d6c..c27d6aa120 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -67,6 +67,10 @@ extern vo_open_t vo_rockbox_open;
#define MPEG_STOP BUTTON_A
#define MPEG_PAUSE BUTTON_SELECT
+#elif CONFIG_KEYPAD == IRIVER_H10_PAD
+#define MPEG_STOP BUTTON_POWER
+#define MPEG_PAUSE BUTTON_PLAY
+
#else
#error MPEGPLAYER: Unsupported keypad
#endif
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 26830a6b3d..5f7af73861 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -173,6 +173,25 @@ static struct plugin_api* rb;
# define HK_CUR2STACK "SELECT.."
# define HK_REM2STACK "POWER+RIGHT"
+#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
+#define SOL_QUIT BUTTON_POWER
+#define SOL_UP BUTTON_SCROLL_UP
+#define SOL_DOWN BUTTON_SCROLL_DOWN
+#define SOL_LEFT BUTTON_LEFT
+#define SOL_RIGHT BUTTON_RIGHT
+#define SOL_MOVE BUTTON_REW
+#define SOL_DRAW BUTTON_PLAY
+#define SOL_REM2CUR (BUTTON_FF | BUTTON_LEFT)
+#define SOL_CUR2STACK (BUTTON_FF | BUTTON_SCROLL_UP)
+#define SOL_REM2STACK (BUTTON_FF | BUTTON_SCROLL_DOWN)
+#define SOL_MENU_RUN BUTTON_REW
+#define SOL_MENU_INFO BUTTON_PLAY
+#define HK_MOVE "REW"
+#define HK_DRAW "PLAY"
+#define HK_REM2CUR "REW+LEFT"
+#define HK_CUR2STACK "REW+UP.."
+#define HK_REM2STACK "REW+DOWN"
+
#else
# error "Unknown keypad"
#endif
diff --git a/bootloader/h10.c b/bootloader/h10.c
new file mode 100644
index 0000000000..e80e28fe5b
--- /dev/null
+++ b/bootloader/h10.c
@@ -0,0 +1,262 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2006 by Barry Wardell
+ *
+ * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
+ * and the ipodlinux bootloader by Daniel Palffy and Bernard Leach
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "cpu.h"
+#include "system.h"
+#include "lcd.h"
+#include "kernel.h"
+#include "thread.h"
+#include "ata.h"
+#include "fat.h"
+#include "disk.h"
+#include "font.h"
+#include "adc.h"
+#include "backlight.h"
+#include "button.h"
+#include "panic.h"
+#include "power.h"
+#include "file.h"
+
+/* Size of the buffer to store the loaded Rockbox/iriver image */
+#define MAX_LOADSIZE (5*1024*1024)
+
+/* This is identical to the function used in the iPod bootloader */
+static void memmove16(void *dest, const void *src, unsigned count)
+{
+ struct bufstr {
+ unsigned _buf[4];
+ } *d, *s;
+
+ if (src >= dest) {
+ count = (count + 15) >> 4;
+ d = (struct bufstr *) dest;
+ s = (struct bufstr *) src;
+ while (count--)
+ *d++ = *s++;
+ } else {
+ count = (count + 15) >> 4;
+ d = (struct bufstr *)(dest + (count <<4));
+ s = (struct bufstr *)(src + (count <<4));
+ while (count--)
+ *--d = *--s;
+ }
+}
+
+
+/* Load original iriver firmware. This function expects a file called "H10_20GC.mi4" in
+ the root directory of the player. It should be decrypted and have the header stripped
+ using mi4code. It reads the file in to a memory buffer called buf. The rest of the
+ loading is done in main()
+*/
+int load_iriver(unsigned char* buf)
+{
+ int fd;
+ int rc;
+ int len;
+
+ fd = open("/H10_20GC.mi4", O_RDONLY);
+
+ len = filesize(fd);
+ rc = read(fd, buf, len);
+ if(rc < len)
+ return -4;
+
+ close(fd);
+ return len;
+}
+
+/* A buffer to load the iriver firmware or Rockbox into */
+unsigned char loadbuffer[MAX_LOADSIZE];
+
+void main(void)
+{
+ /* Attempt to load original iriver firmware. Successfully starts loading the iriver
+ firmware but then locks up once the "System Initialising" screen is displayed.
+
+ The iriver firmware was decrypted and the header removed. It was then appended to
+ the end of bootloader.bin and an mi4 file was created from the resulting file.
+
+ The original firmware starts at 0xd800 in the file and is of length 0x47da00.
+
+ The whole file (bootloader.bin + decrypted mi4) are loaded to memory by the
+ original iriver bootloader on startup. This copies the mi4 part to the start
+ of DRAM and passes execution to there.
+
+ memmove16((void*)DRAMORIG, (void*)(DRAMORIG + 0xd800), 0x47da00);
+ asm volatile(
+ "mov r0, #" SC(DRAMORIG) "\n"
+ "mov pc, r0 \n"
+ );
+ */
+
+ int i;
+ int rc;
+ int btn;
+
+ i=ata_init();
+ disk_init();
+ rc = disk_mount_all();
+
+ /* Load original iriver firmware. Uses load_iriver(buf) to load the decrypted mi4 file from
+ disk to DRAM. This then copies that part of DRAM to the start of DRAM and passes
+ execution to there.
+
+ rc=load_iriver(loadbuffer);
+ memcpy((void*)DRAMORIG,loadbuffer,rc);
+ asm volatile(
+ "mov r0, #" SC(DRAMORIG) "\n"
+ "mov pc, r0 \n"
+ );*/
+
+
+ /* This assumes that /test.txt exists */
+ int fd;
+ char buffer[24];
+ fd=open("/test.txt",O_RDWR);
+
+
+ /* WARNING: Running this code on the H10 caused permanent damage to my H10's hdd
+ I strongly recommend against trying it.
+
+ for(i=0;i<100;i++){
+ btn = button_read_device();
+ switch(btn){
+ case BUTTON_LEFT:
+ snprintf(buffer, sizeof(buffer), "Left");
+ write(fd,buffer,sizeof(buffer));
+ break;
+ case BUTTON_RIGHT:
+ break;
+ case BUTTON_REW:
+ break;
+ case BUTTON_FF:
+ break;
+ case BUTTON_PLAY:
+ break;
+ default:
+ break;
+ }
+
+
+ }
+ */
+
+
+
+ /* Investigate gpio
+
+ unsigned int gpio_a, gpio_b, gpio_c, gpio_d;
+ unsigned int gpio_e, gpio_f, gpio_g, gpio_h;
+ unsigned int gpio_i, gpio_j, gpio_k, gpio_l;
+
+ gpio_a = GPIOA_INPUT_VAL;
+ gpio_b = GPIOB_INPUT_VAL;
+ gpio_c = GPIOC_INPUT_VAL;
+
+ gpio_g = GPIOG_INPUT_VAL;
+ gpio_h = GPIOH_INPUT_VAL;
+ gpio_i = GPIOI_INPUT_VAL;
+
+ snprintf(buffer, sizeof(buffer), "GPIO_A: %02x GPIO_G: %02x\n", gpio_a, gpio_g);
+ write(fd,buffer,sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "GPIO_B: %02x GPIO_H: %02x\n", gpio_b, gpio_h);
+ write(fd,buffer,sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "GPIO_C: %02x GPIO_I: %02x\n", gpio_c, gpio_i);
+ write(fd,buffer,sizeof(buffer));
+
+ gpio_d = GPIOD_INPUT_VAL;
+ gpio_e = GPIOE_INPUT_VAL;
+ gpio_f = GPIOF_INPUT_VAL;
+
+ gpio_j = GPIOJ_INPUT_VAL;
+ gpio_k = GPIOK_INPUT_VAL;
+ gpio_l = GPIOL_INPUT_VAL;
+
+ snprintf(buffer, sizeof(buffer), "GPIO_D: %02x GPIO_J: %02x\n", gpio_d, gpio_j);
+ write(fd,buffer,sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "GPIO_E: %02x GPIO_K: %02x\n", gpio_e, gpio_k);
+ write(fd,buffer,sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "GPIO_F: %02x GPIO_L: %02x\n", gpio_f, gpio_l);
+ write(fd,buffer,sizeof(buffer));
+ */
+
+
+
+ /* Detect the scroller being touched
+
+ int j = 0;
+ for(j=0;j<1000;j++){
+ if(gpio_c!=0xF7){
+ snprintf(buffer, sizeof(buffer), "GPIO_C: %02x\n", gpio_c);
+ write(fd,buffer,sizeof(buffer));
+ }
+ if(gpio_d!=0xDD){
+ snprintf(buffer, sizeof(buffer), "GPIO_D: %02x\n", gpio_d);
+ write(fd,buffer,sizeof(buffer));
+ }
+ }*/
+
+
+ /* Apparently necessary for the data to be actually written to file */
+ fsync(fd);
+ udelay(1000000);
+
+ /* This causes the device to shut off instantly
+
+ GPIOF_OUTPUT_VAL = 0;
+ */
+
+ close(fd);
+ udelay(1000000);
+}
+
+/* These functions are present in the firmware library, but we reimplement
+ them here because the originals do a lot more than we want */
+
+void reset_poweroff_timer(void)
+{
+}
+
+int dbg_ports(void)
+{
+ return 0;
+}
+
+void mpeg_stop(void)
+{
+}
+
+void usb_acknowledge(void)
+{
+}
+
+void usb_wait_for_disconnect(void)
+{
+}
+
+void sys_poweroff(void)
+{
+}
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 0317b4abff..a0e4922154 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -250,7 +250,7 @@ target/coldfire/iaudio/x5/lcd-remote-x5.c
#ifndef SIMULATOR
target/arm/iriver/h10/backlight-h10.c
target/arm/iriver/h10/button-h10.c
-target/arm/iriver/h10/ata-h10.c
+target/arm/ata-pp5020.c
target/arm/iriver/h10/power-h10.c
target/arm/iriver/h10/usb-h10.c
target/arm/iriver/h10/lcd-h10.c
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h
index 5a410f6b42..cae37fcce4 100644
--- a/firmware/export/config-h10.h
+++ b/firmware/export/config-h10.h
@@ -59,7 +59,7 @@
#define CONFIG_BACKLIGHT BL_H10 /* TODO: figure this out, probably not necessary
because of 'target' stuff */
-#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity
+#define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity
TODO: check this, probably different
for different models too */
diff --git a/firmware/target/arm/iriver/h10/ata-h10.c b/firmware/target/arm/ata-pp5020.c
index f8ca773132..f8ca773132 100644
--- a/firmware/target/arm/iriver/h10/ata-h10.c
+++ b/firmware/target/arm/ata-pp5020.c
diff --git a/firmware/target/arm/ata-target.h b/firmware/target/arm/ata-target.h
new file mode 100644
index 0000000000..417485fb8a
--- /dev/null
+++ b/firmware/target/arm/ata-target.h
@@ -0,0 +1,23 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2006 by Barry Wardell
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+void ata_reset(void);
+void ata_enable(bool on);
+bool ata_is_coldstart(void);
+void ata_device_init(void);
diff --git a/firmware/target/arm/iriver/h10/ata-target.h b/firmware/target/arm/iriver/h10/ata-target.h
deleted file mode 100644
index a93af79015..0000000000
--- a/firmware/target/arm/iriver/h10/ata-target.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2006 by Barry Wardell
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-/* ATA stuff was taken from the iPod code */
-
-/* Plain C read & write loops */
-#define PREFER_C_READING
-#define PREFER_C_WRITING
-
-#if (CONFIG_CPU == PP5002)
-#define ATA_IOBASE 0xc00031e0
-#define ATA_CONTROL (*((volatile unsigned char*)(0xc00033f8)))
-#elif (CONFIG_CPU == PP5020)
-#define ATA_IOBASE 0xc30001e0
-#define ATA_CONTROL (*((volatile unsigned char*)(0xc30003f8)))
-#endif
-
-#define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE)))
-#define ATA_ERROR (*((volatile unsigned char*)(ATA_IOBASE + 0x04)))
-#define ATA_NSECTOR (*((volatile unsigned char*)(ATA_IOBASE + 0x08)))
-#define ATA_SECTOR (*((volatile unsigned char*)(ATA_IOBASE + 0x0c)))
-#define ATA_LCYL (*((volatile unsigned char*)(ATA_IOBASE + 0x10)))
-#define ATA_HCYL (*((volatile unsigned char*)(ATA_IOBASE + 0x14)))
-#define ATA_SELECT (*((volatile unsigned char*)(ATA_IOBASE + 0x18)))
-#define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE + 0x1c)))
-
-#define STATUS_BSY 0x80
-#define STATUS_RDY 0x40
-#define STATUS_DF 0x20
-#define STATUS_DRQ 0x08
-#define STATUS_ERR 0x01
-#define ERROR_ABRT 0x04
-
-#define WRITE_PATTERN1 0xa5
-#define WRITE_PATTERN2 0x5a
-#define WRITE_PATTERN3 0xaa
-#define WRITE_PATTERN4 0x55
-
-#define READ_PATTERN1 0xa5
-#define READ_PATTERN2 0x5a
-#define READ_PATTERN3 0xaa
-#define READ_PATTERN4 0x55
-
-#define READ_PATTERN1_MASK 0xff
-#define READ_PATTERN2_MASK 0xff
-#define READ_PATTERN3_MASK 0xff
-#define READ_PATTERN4_MASK 0xff
-
-#define SET_REG(reg,val) reg = (val)
-#define SET_16BITREG(reg,val) reg = (val)
-
-
-void ata_reset(void);
-void ata_enable(bool on);
-bool ata_is_coldstart(void);
-void ata_device_init(void);
diff --git a/firmware/target/arm/iriver/h10/button-h10.c b/firmware/target/arm/iriver/h10/button-h10.c
index badcd594a1..7979a52976 100644
--- a/firmware/target/arm/iriver/h10/button-h10.c
+++ b/firmware/target/arm/iriver/h10/button-h10.c
@@ -49,6 +49,7 @@ int button_read_device(void)
int btn = BUTTON_NONE;
unsigned char state;
static bool hold_button = false;
+
#if 0
/* light handling */
if (hold_button && !button_hold())
@@ -58,12 +59,25 @@ int button_read_device(void)
#endif
hold_button = button_hold();
- state = GPIOA_INPUT_VAL & 0xf8;
- if ((state & 0x8) == 0) btn |= BUTTON_FF;
- if ((state & 0x16) == 0) btn |= BUTTON_PLAY;
- if ((state & 0x32) == 0) btn |= BUTTON_REW;
- if ((state & 0x64) == 0) btn |= BUTTON_RIGHT;
- if ((state & 0x128) == 0) btn |= BUTTON_LEFT;
+ if (!hold_button)
+ {
+ /* Read normal buttons */
+ state = GPIOA_INPUT_VAL & 0xf8;
+ if ((state & 0x8) == 0) btn |= BUTTON_FF;
+ if ((state & 0x10) == 0) btn |= BUTTON_PLAY;
+ if ((state & 0x20) == 0) btn |= BUTTON_REW;
+ if ((state & 0x40) == 0) btn |= BUTTON_RIGHT;
+ if ((state & 0x80) == 0) btn |= BUTTON_LEFT;
+
+ /* Read power button */
+ if ((GPIOB_INPUT_VAL & 0x1) == 0) btn |= BUTTON_POWER;
+
+ /* Read scroller */
+ if ( ((GPIOC_INPUT_VAL & 0x4)==1) && ((GPIOD_INPUT_VAL & 0x10)==1) )
+ {
+ /* Scroller is pressed */
+ }
+ }
return btn;
}
diff --git a/firmware/target/arm/iriver/h10/lcd-h10.c b/firmware/target/arm/iriver/h10/lcd-h10.c
index c2fa05b05c..3640aa1ba1 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10.c
@@ -36,8 +36,8 @@
static bool display_on=false; /* is the display turned on? */
-#define LCD_CMD *(volatile unsigned short *)0xf0008000
-#define LCD_DATA *(volatile unsigned short *)0xf0008002
+#define LCD_CMD *(volatile unsigned short *)0x70003008 /* or maybe 0x70008a0c */
+#define LCD_DATA *(volatile unsigned short *)0x70003010
/* register defines for the Renesas HD66773R */
#define R_HORIZ_RAM_ADDR_POS 0x16
@@ -98,30 +98,23 @@ const short high8to9[] ICONST_ATTR = {
/* called very frequently - inline! */
inline void lcd_write_reg(int reg, int val)
{
-#if 0
LCD_CMD = (reg >> 8) << 1;
LCD_CMD = (reg & 0xff) << 1;
LCD_DATA = (val >> 8) << 1;
LCD_DATA = (val & 0xff) << 1;
-#endif
- (void)reg;
- (void)val;
}
/* called very frequently - inline! */
inline void lcd_begin_write_gram(void)
{
-#if 0
LCD_CMD = (R_WRITE_DATA_2_GRAM >> 8) << 1;
LCD_CMD = (R_WRITE_DATA_2_GRAM & 0xff) << 1;
-#endif
}
/* called very frequently - inline! */
inline void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR;
inline void lcd_write_data(const unsigned short* p_bytes, int count)
{
-#if 0
unsigned int tmp;
unsigned int *ptr = (unsigned int *)p_bytes;
bool extra;
@@ -144,9 +137,6 @@ inline void lcd_write_data(const unsigned short* p_bytes, int count)
LCD_DATA = high8to9[read >> 8];
LCD_DATA = read<<1;
}
-#endif
- (void)p_bytes;
- (void)count;
}
/*** hardware configuration ***/
@@ -158,15 +148,12 @@ int lcd_default_contrast(void)
void lcd_set_contrast(int val)
{
-#if 0
if (val >= 15) // val must'nt be 15 or 31
++val;
if (val > 30)
return;
lcd_write_reg(0x0e, 0x201e + (val << 8));
-#endif
- (void)val;
}
void lcd_set_invert_display(bool yesno)
@@ -197,9 +184,9 @@ void lcd_roll(int lines)
*/
void lcd_init_device(void)
{
-#if 0
display_on=true;
+#if 0
/* LCD Reset */
and_l(~0x00000010, &GPIO1_OUT);
or_l(0x00000010, &GPIO1_ENABLE);
@@ -268,10 +255,7 @@ void lcd_init_device(void)
void lcd_enable(bool on)
{
-#if 0
display_on = on;
-#endif
- (void)on;
}
/*** update functions ***/
@@ -297,7 +281,6 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
void lcd_update(void) ICODE_ATTR;
void lcd_update(void)
{
-#if 0
if(display_on){
/* Copy display bitmap to hardware */
@@ -305,14 +288,12 @@ void lcd_update(void)
lcd_begin_write_gram();
lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT);
}
-#endif
}
/* Update a fraction of the display. */
void lcd_update_rect(int, int, int, int) ICODE_ATTR;
void lcd_update_rect(int x, int y, int width, int height)
{
-#if 0
if(display_on) {
int ymax = y + height;
@@ -343,9 +324,4 @@ void lcd_update_rect(int x, int y, int width, int height)
lcd_write_reg(R_HORIZ_RAM_ADDR_POS, 0x7f00);
lcd_write_reg(R_VERT_RAM_ADDR_POS, 0x9f00);
}
-#endif
- (void)x;
- (void)y;
- (void)width;
- (void)height;
}
diff --git a/tools/configure b/tools/configure
index 8a97ad85c6..78fb0d7812 100755
--- a/tools/configure
+++ b/tools/configure
@@ -897,11 +897,10 @@ toolsdir='\$(ROOTDIR)/tools'
target="-DIRIVER_H10"
memory=32 # always
arm7tdmicc
- #tool="$rootdir/tools/ -add=iax5"
- tool="$rootdir/tools/mi4code build"
+ tool="$rootdir/tools/mkmi4.sh h10"
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
- output="rockbox.iriver"
+ output="H10_20GC.mi4"
appextra="recorder:gui"
archosrom=""
flash=""
diff --git a/uisimulator/sdl/UI-h10.bmp b/uisimulator/sdl/UI-h10.bmp
new file mode 100644
index 0000000000..1a3b91ded2
--- /dev/null
+++ b/uisimulator/sdl/UI-h10.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 5114e7c2a8..7e78c9d030 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -89,6 +89,8 @@ void button_event(int key, bool pressed)
new_btn = BUTTON_UP;
#elif defined BUTTON_SCROLL_BACK
new_btn = BUTTON_SCROLL_BACK;
+#elif defined BUTTON_SCROLL_UP
+ new_btn = BUTTON_SCROLL_UP;
#elif defined BUTTON_PLAY
new_btn = BUTTON_PLAY;
#endif
@@ -100,6 +102,8 @@ void button_event(int key, bool pressed)
new_btn = BUTTON_DOWN;
#elif defined BUTTON_SCROLL_FWD
new_btn = BUTTON_SCROLL_FWD;
+#elif defined BUTTON_SCROLL_DOWN
+ new_btn = BUTTON_SCROLL_DOWN;
#elif defined BUTTON_STOP
new_btn = BUTTON_STOP;
#endif
@@ -150,6 +154,15 @@ void button_event(int key, bool pressed)
case SDLK_F1:
new_btn = BUTTON_REC;
break;
+#elif defined BUTTON_REW
+ case SDLK_KP_DIVIDE:
+ case SDLK_F1:
+ new_btn = BUTTON_REW;
+ break;
+ case SDLK_KP_MULTIPLY:
+ case SDLK_F2:
+ new_btn = BUTTON_FF;
+ break;
#endif
case SDLK_KP5: