[1/4] Remove SH support and all archos targets

This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
This commit is contained in:
Solomon Peachy 2020-07-15 19:40:55 -04:00
parent 17f7cc92c2
commit 092c340a20
384 changed files with 648 additions and 43225 deletions

2
.gitignore vendored
View file

@ -100,7 +100,6 @@ __pycache__
# /tools/
/tools/bdf2bmp
/tools/sh2d
/tools/scramble
/tools/generate_rocklatin
/tools/descramble
@ -109,7 +108,6 @@ __pycache__
/tools/codepages
/tools/rdf2binary
/tools/mkboot
/tools/player_unifont
/tools/uclpack
/tools/ipod_fw
/tools/wavtrim

View file

@ -75,9 +75,6 @@ iap/iap-lingo7.c
#endif
#endif
screen_access.c
#ifdef HAVE_BUTTONBAR
gui/buttonbar.c
#endif
#ifdef HAVE_LCD_BITMAP
gui/icon.c
#endif
@ -208,12 +205,6 @@ keymaps/keymap-h1x0_h3x0.c
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|| (CONFIG_KEYPAD == IPOD_1G2G_PAD))
keymaps/keymap-ipod.c
#elif CONFIG_KEYPAD == RECORDER_PAD
keymaps/keymap-recorder.c
#elif CONFIG_KEYPAD == ONDIO_PAD
keymaps/keymap-ondio.c
#elif CONFIG_KEYPAD == PLAYER_PAD
keymaps/keymap-player.c
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
keymaps/keymap-x5.c
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD

View file

@ -1004,16 +1004,7 @@ static bool view_battery(void)
lcd_putsf(0, 2, "External: %d.%03d V", y / 1000, y % 1000);
#endif
#if CONFIG_CHARGING
#if defined ARCHOS_RECORDER
lcd_putsf(0, 3, "Chgr: %s %s",
charger_inserted() ? "present" : "absent",
charger_enabled() ? "on" : "off");
lcd_putsf(0, 5, "short delta: %d", short_delta);
lcd_putsf(0, 6, "long delta: %d", long_delta);
lcd_puts(0, 7, power_message);
lcd_putsf(0, 8, "USB Inserted: %s",
usb_inserted() ? "yes" : "no");
#elif defined IPOD_NANO || defined IPOD_VIDEO
#if defined IPOD_NANO || defined IPOD_VIDEO
int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;
int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true;
int dock = (GPIOA_INPUT_VAL & 0x10)?true:false;
@ -1181,18 +1172,6 @@ static bool view_battery(void)
case 3: /* remaining time estimation: */
#ifdef ARCHOS_RECORDER
lcd_putsf(0, 0, "charge_state: %d", charge_state);
lcd_putsf(0, 1, "Cycle time: %d m", powermgmt_last_cycle_startstop_min);
lcd_putsf(0, 2, "Lvl@cyc st: %d%%", powermgmt_last_cycle_level);
lcd_putsf(0, 3, "P=%2d I=%2d", pid_p, pid_i);
lcd_putsf(0, 4, "Trickle sec: %d/60", trickle_sec);
#endif /* ARCHOS_RECORDER */
#if (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE)
lcd_putsf(0, 5, "Last PwrHist: %d.%03dV",
power_history[0] / 1000,
@ -1903,30 +1882,7 @@ static bool dbg_tagcache_info(void)
}
#endif
#if CONFIG_CPU == SH7034
static bool dbg_save_roms(void)
{
int fd;
int oldmode = system_memory_guard(MEMGUARD_NONE);
fd = creat("/internal_rom_0000-FFFF.bin", 0666);
if(fd >= 0)
{
write(fd, (void *)0, 0x10000);
close(fd);
}
fd = creat("/internal_rom_2000000-203FFFF.bin", 0666);
if(fd >= 0)
{
write(fd, (void *)0x2000000, 0x40000);
close(fd);
}
system_memory_guard(oldmode);
return false;
}
#elif defined CPU_COLDFIRE
#if defined CPU_COLDFIRE
static bool dbg_save_roms(void)
{
int fd;
@ -2091,11 +2047,6 @@ static int radio_callback(int btn, struct gui_synclist *lists)
simplelist_addline(
"sd_set: %d Hz", lv24020lp_get(LV24020LP_SD_SET) );
#endif /* LV24020LP */
#if (CONFIG_TUNER & S1A0903X01)
simplelist_addline(
"Samsung regs: %08X", s1a0903x01_get(RADIO_ALL));
/* This one doesn't return dynamic data atm */
#endif /* S1A0903X01 */
#if (CONFIG_TUNER & TEA5767)
struct tea5767_dbg_info nfo;
tea5767_dbg_info(&nfo);
@ -2218,7 +2169,7 @@ static bool dbg_metadatalog(void)
return false;
}
#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE)
#if defined(CPU_COLDFIRE)
static bool dbg_set_memory_guard(void)
{
static const struct opt_items names[MAXMEMGUARD] = {
@ -2233,7 +2184,7 @@ static bool dbg_set_memory_guard(void)
return false;
}
#endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */
#endif /* defined(CPU_COLDFIRE) */
#if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS)
static bool dbg_write_eeprom(void)
@ -2589,13 +2540,13 @@ static const struct {
unsigned char *desc; /* string or ID */
bool (*function) (void); /* return true if USB was connected */
} menuitems[] = {
#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \
#if defined(CPU_COLDFIRE) || \
(defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \
CONFIG_CPU == IMX31L || defined(CPU_TCC780X) || CONFIG_CPU == AS3525v2 || \
CONFIG_CPU == AS3525 || CONFIG_CPU == RK27XX
{ "Dump ROM contents", dbg_save_roms },
#endif
#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \
#if defined(CPU_COLDFIRE) || defined(CPU_PP) \
|| CONFIG_CPU == S3C2440 || CONFIG_CPU == IMX31L || CONFIG_CPU == AS3525 \
|| CONFIG_CPU == DM320 || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2 \
|| CONFIG_CPU == RK27XX
@ -2616,7 +2567,7 @@ static const struct {
#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
{ "S/PDIF analyzer", dbg_spdif },
#endif
#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE)
#if defined(CPU_COLDFIRE)
{ "Catch mem accesses", dbg_set_memory_guard },
#endif
{ "View OS stacks", dbg_os },

View file

@ -80,14 +80,6 @@ lcd_invert
lcd_sleep
#endif
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
masf
#endif
#if (CONFIG_CODEC == MAS3507D)
masd
#endif
#if defined(HAVE_MORSE_INPUT)
morse_input
#endif
@ -115,13 +107,6 @@ radio_remote
#endif
#endif
#if (CONFIG_KEYPAD == RECORDER_PAD)
recorder_pad
#if defined(CONFIG_TUNER)
radio_screen_button_bar
#endif
#endif
#if defined(HAVE_RECORDING)
recording
#if CONFIG_CODEC == SWCODEC
@ -158,10 +143,6 @@ rtc
serial_port
#endif
#if defined(ARCHOS_RECORDER) || defined(ARCHOS_PLAYER)
soft_shutdown
#endif
#if defined(HAVE_SPDIF_POWER)
spdif_power
#endif

View file

@ -1,131 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) Linus Nielsen Feltzing (2002)
*
* 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.
*
****************************************************************************/
/*
2005 Kevin Ferrare :
- Multi screen support
- Rewrote a lot of code to avoid global vars and make it accept eventually
more that 3 buttons on the bar (just the prototype of gui_buttonbar_set
and the constant BUTTONBAR_MAX_BUTTONS to modify)
2008 Jonathan Gordon
- redone to use viewports, items will NOT scroll in their vp.
Bar is always drawn at the bottom of the screen. This may be changed later.
Callers need to remember to adjust their viewports to not be overwitten
*/
#include "config.h"
#include "buttonbar.h"
#include "viewport.h"
#include "lcd.h"
#include "font.h"
#include "string-extra.h"
#include "settings.h"
static struct viewport bb_vp[NB_SCREENS];
void gui_buttonbar_init(struct gui_buttonbar * buttonbar)
{
gui_buttonbar_unset(buttonbar);
FOR_NB_SCREENS(i)
{
viewport_set_defaults(&bb_vp[i], i);
bb_vp[i].font = FONT_SYSFIXED;
bb_vp[i].y = screens[i].lcdheight - BUTTONBAR_HEIGHT;
bb_vp[i].height = BUTTONBAR_HEIGHT;
bb_vp[i].drawmode = DRMODE_COMPLEMENT;
}
}
void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
struct screen * display)
{
buttonbar->display = display;
}
static void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
{
int button_width;
int fh, fw;
struct screen * display = buttonbar->display;
struct viewport vp = bb_vp[display->screen_type];
button_width = display->lcdwidth/BUTTONBAR_MAX_BUTTONS;
vp.width = button_width-1;
vp.x = button_width * num;
display->set_viewport(&vp);
display->fill_viewport();
if(buttonbar->caption[num][0] != 0)
{
display->getstringsize(buttonbar->caption[num], &fw, &fh);
display->putsxy((button_width - fw)/2,
(vp.height-fh)/2, buttonbar->caption[num]);
}
display->set_viewport(NULL);
}
void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
const char *caption1,
const char *caption2,
const char *caption3)
{
gui_buttonbar_unset(buttonbar);
if(caption1)
{
strlcpy(buttonbar->caption[0], caption1, BUTTONBAR_CAPTION_LENGTH);
}
if(caption2)
{
strlcpy(buttonbar->caption[1], caption2, BUTTONBAR_CAPTION_LENGTH);
}
if(caption3)
{
strlcpy(buttonbar->caption[2], caption3, BUTTONBAR_CAPTION_LENGTH);
}
}
void gui_buttonbar_unset(struct gui_buttonbar * buttonbar)
{
int i;
for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
buttonbar->caption[i][0] = 0;
}
void gui_buttonbar_draw(struct gui_buttonbar * buttonbar)
{
struct screen * display = buttonbar->display;
if(!global_settings.buttonbar || !gui_buttonbar_isset(buttonbar))
return;
int i;
display->set_viewport(&bb_vp[display->screen_type]);
display->clear_viewport();
for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
gui_buttonbar_draw_button(buttonbar, i);
display->set_viewport(&bb_vp[display->screen_type]);
display->update_viewport();
display->set_viewport(NULL);
}
bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar)
{
/* If all buttons are unset, the button bar is considered disabled */
int i;
for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
if(buttonbar->caption[i][0] != 0)
return true;
return false;
}

View file

@ -1,85 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2005 by Kevin Ferrare
*
* 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.
*
****************************************************************************/
#ifndef _GUI_BUTTONBAR_H_
#define _GUI_BUTTONBAR_H_
#include "config.h"
#include "button.h"
#include "screen_access.h"
#ifdef HAVE_BUTTONBAR
#define BUTTONBAR_HEIGHT 8
#define BUTTONBAR_MAX_BUTTONS 3
#define BUTTONBAR_CAPTION_LENGTH 8
struct gui_buttonbar
{
char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH];
struct screen * display;
};
/*
* Initializes the buttonbar
* - buttonbar : the buttonbar
*/
extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar);
/*
* Attach the buttonbar to a screen
* - buttonbar : the buttonbar
* - display : the display to attach the buttonbar
*/
extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
struct screen * display);
/*
* Set the caption of the items of the buttonbar
* - buttonbar : the buttonbar
* - caption1,2,3 : the first, second and thirds items of the bar
*/
extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
const char *caption1,
const char *caption2,
const char *caption3);
/*
* Disable the buttonbar
* - buttonbar : the buttonbar
*/
extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar);
/*
* Draw the buttonbar on it's attached screen
* - buttonbar : the buttonbar
*/
extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar);
/*
* Returns true if the buttonbar has something to display, false otherwise
* - buttonbar : the buttonbar
*/
extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar);
#else
#define BUTTONBAR_HEIGHT 0
#endif
#endif /* _GUI_BUTTONBAR_H_ */

View file

@ -553,10 +553,6 @@ void gui_synclist_set_viewport_defaults(struct viewport *vp,
enum screen_type screen)
{
viewport_set_defaults(vp, screen);
#ifdef HAVE_BUTTONBAR
if (screens[screen].has_buttonbar)
vp->height -= BUTTONBAR_HEIGHT;
#endif
}
#ifdef HAVE_LCD_COLOR

View file

@ -25,9 +25,8 @@
#include "screen_access.h"
#include "settings.h"
#if defined (HAVE_SCROLLWHEEL) || \
(CONFIG_KEYPAD == PLAYER_PAD)
/* Define this if your target makes sense to have
#if defined (HAVE_SCROLLWHEEL)
/* Define this if your target makes sense to have
smaller values at the top of the list increasing down the list */
#define ASCENDING_INT_SETTINGS
#endif

View file

@ -126,7 +126,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level)
return buf;
}
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
#if defined (HAVE_PITCHCONTROL)
/* A helper to determine the enum value for pitch/speed.
When there are two choices (i.e. boolean), return 1 if the value is
@ -1452,7 +1452,7 @@ const char *get_token_value(struct gui_wps *gwps,
}
#endif /* (CONFIG_CODEC == SWCODEC) */
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
#if defined (HAVE_PITCHCONTROL)
case SKIN_TOKEN_SOUND_PITCH:
{
int32_t pitch = sound_get_pitch();

View file

@ -262,13 +262,6 @@ void viewportmanager_init()
#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_changed(const int which)
{
#ifdef HAVE_BUTTONBAR
if (which & THEME_BUTTONBAR)
{ /* don't handle further, the custom ui viewport ignores the buttonbar,
* as does viewport_set_defaults(), since only lists use it*/
screens[SCREEN_MAIN].has_buttonbar = global_settings.buttonbar;
}
#endif
if (which & THEME_LANGUAGE)
{
}

View file

@ -354,10 +354,6 @@ bool ffwd_rew(int button)
#else
if (!skin_get_global_state()->paused)
audio_pause();
#endif
#if CONFIG_KEYPAD == PLAYER_PAD
FOR_NB_SCREENS(i)
skin_get_gwps(WPS, i)->display->scroll_stop();
#endif
if (direction > 0)
status_set_ffmode(STATUS_FASTFORWARD);

View file

@ -1,252 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 Jonathan Gordon
*
* 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 archos ondio fm/sp targets
*/
#include "config.h"
#include "action.h"
#include "button.h"
#include "settings.h"
/* CONTEXT_CUSTOM's used in this file...
CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
*/
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_CONTEXT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_STD_MENU, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_OFF|BUTTON_REL, BUTTON_OFF },
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
{ ACTION_WPS_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_OFF },
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_BROWSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_WPS_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
/* { ACTION_WPS_MENU, BUTTON_NONE, BUTTON_NONE }, we can't have that */
{ ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
/* { ACTION_WPS_VIEW_PLAYLIST,BUTTON_NONE, BUTTON_NONE }, can't have this either */
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_settings[] = {
{ 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 },
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_listtree */
static const struct button_mapping button_context_tree_scroll_lr[] = {
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_TREE_PGLEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_TREE_ROOT_INIT, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_MENU|BUTTON_LEFT },
{ ACTION_TREE_PGLEFT, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_TREE_PGRIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_TREE_PGRIGHT, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
};
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_RIGHT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping button_context_bmark[] = {
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_settings_bmark */
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_TOGGLE_MODE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_PS_RESET, BUTTON_MENU, BUTTON_NONE },
{ ACTION_PS_EXIT, BUTTON_OFF, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_pitchscreen */
#ifdef HAVE_RECORDING
static const struct button_mapping button_context_rectrigger[] = {
{ ACTION_STD_OK, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_RECSCREEN)
};
static const struct button_mapping button_context_recscreen[] = {
{ ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ 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 /* HAVE_RECORDING */
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_SELECT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_KBD_DONE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_ABORT, BUTTON_OFF, 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 },
LAST_ITEM_IN_LIST
}; /* button_context_keyboard */
static const struct button_mapping button_context_morse_input[] = {
{ ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_KBD_DONE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_ABORT, BUTTON_OFF, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_SELECT, BUTTON_UP, BUTTON_NONE },
{ ACTION_KBD_MORSE_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_NONE },
LAST_ITEM_IN_LIST
}; /* button_context_morse_input */
#if CONFIG_TUNER
static const struct button_mapping button_context_radio[] = {
{ ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_FM_RECORD_DBLPRE, BUTTON_MENU, BUTTON_NONE},
{ ACTION_FM_RECORD, BUTTON_MENU | BUTTON_REL, BUTTON_NONE },
{ ACTION_FM_STOP, BUTTON_OFF | BUTTON_REPEAT, BUTTON_OFF },
{ ACTION_FM_EXIT, BUTTON_OFF | BUTTON_REL, BUTTON_OFF },
{ 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 },
#ifndef HAS_BUTTON_HOLD
{ ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
};
#endif
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_SETTINGS:
return button_context_settings;
case CONTEXT_YESNOSCREEN:
return button_context_yesno;
case CONTEXT_BOOKMARKSCREEN:
return button_context_bmark;
case CONTEXT_PITCHSCREEN:
return button_context_pitchscreen;
case CONTEXT_TREE:
case CONTEXT_MAINMENU:
if (global_settings.hold_lr_for_scroll_in_list)
return button_context_tree_scroll_lr;
/* else fall through to CUSTOM|CONTEXT_TREE */
case CONTEXT_CUSTOM|CONTEXT_TREE:
return button_context_tree;
#ifdef HAVE_RECORDING
case CONTEXT_RECSCREEN:
return button_context_recscreen;
case CONTEXT_SETTINGS_RECTRIGGER:
return button_context_rectrigger;
#endif
case CONTEXT_KEYBOARD:
return button_context_keyboard;
case CONTEXT_MORSE_INPUT:
return button_context_morse_input;
#if CONFIG_TUNER
case CONTEXT_FM:
return button_context_radio;
#endif
case CONTEXT_LIST:
default:
return button_context_standard;
}
}

View file

@ -1,165 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 Jonathan Gordon
*
* 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 archos player targets
*
*/
#include "config.h"
#include "action.h"
#include "button.h"
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_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_STD_CANCEL, BUTTON_STOP, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_ON, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_STD_MENU, BUTTON_MENU, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
{ ACTION_WPS_STOP, BUTTON_STOP, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_BROWSE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_STOP, BUTTON_NONE },
{ ACTION_WPS_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_settings[] = {
{ 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)
};
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON, BUTTON_NONE },
{ ACTION_TREE_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_listtree */
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesno */
static const struct button_mapping button_context_bmark[] = {
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_settings_bmark */
/*****************************************************************************
* Remote control mappings
*****************************************************************************/
static const struct button_mapping remote_button_context_standard[] = {
{ ACTION_STD_PREV, BUTTON_RC_LEFT, BUTTON_NONE },
{ ACTION_STD_NEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping remote_button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
{ ACTION_WPS_SKIPNEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
{ ACTION_WPS_SKIPPREV, BUTTON_RC_LEFT, BUTTON_NONE },
{ ACTION_WPS_STOP, BUTTON_RC_STOP, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping* get_context_mapping_remote( int context )
{
context ^= CONTEXT_REMOTE;
switch (context)
{
case CONTEXT_WPS:
return remote_button_context_wps;
default:
return remote_button_context_standard;
}
}
const struct button_mapping* get_context_mapping( int context )
{
if (context&CONTEXT_REMOTE)
return get_context_mapping_remote(context);
switch (context)
{
case CONTEXT_WPS:
return button_context_wps;
case CONTEXT_SETTINGS:
return button_context_settings;
case CONTEXT_YESNOSCREEN:
return button_context_yesno;
case CONTEXT_TREE:
case CONTEXT_MAINMENU:
return button_context_tree;
case CONTEXT_BOOKMARKSCREEN:
return button_context_bmark;
case CONTEXT_STD:
case CONTEXT_LIST:
default:
return button_context_standard;
}
}

View file

@ -1,312 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 Antoine Cellerier <dionoea @t videolan d.t org>
*
* 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 archos recorder target
*
* \TODO handle F3
*/
#include "config.h"
#include "action.h"
#include "button.h"
#include "settings.h"
/* CONTEXT_CUSTOM's used in this file...
CONTEXT_CUSTOM|1 = the standard list/tree defines (without directions)
*/
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_ON, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
{ ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_STD_MENU, BUTTON_F1, BUTTON_NONE },
{ ACTION_STD_QUICKSCREEN, BUTTON_F2, BUTTON_NONE },
{ ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_F3, BUTTON_F3, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_wps[] = {
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
{ ACTION_WPS_STOP, BUTTON_OFF|BUTTON_REL, BUTTON_OFF },
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_MENU, BUTTON_F1|BUTTON_REL, BUTTON_F1 },
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_WPS_QUICKSCREEN, BUTTON_F2|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_WPS_BROWSE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_WPS_ID3SCREEN, BUTTON_F1|BUTTON_ON, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_UP, BUTTON_ON },
{ ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_DOWN, BUTTON_ON },
{ ACTION_STD_KEYLOCK, BUTTON_F1|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_F3, BUTTON_F3, BUTTON_NONE },
{ ACTION_WPS_ABSETB_NEXTDIR, BUTTON_ON|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_WPS_ABSETA_PREVDIR, BUTTON_ON|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_WPS_ABRESET, BUTTON_ON|BUTTON_OFF, BUTTON_ON },
LAST_ITEM_IN_LIST
};
static const struct button_mapping button_context_settings[] = {
{ 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 },
{ 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 },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
{ ACTION_TREE_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP, BUTTON_NONE },
{ ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_LISTTREE_PGDOWN, BUTTON_ON|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_LISTTREE_PGDOWN, BUTTON_ON|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_listtree */
static const struct button_mapping button_context_tree_scroll_lr[] = {
{ 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_NONE, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|1),
};
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping button_context_quickscreen[] = {
{ ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE },
{ ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_quickscreen */
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_TOGGLE_MODE, BUTTON_F1, BUTTON_NONE },
{ ACTION_PS_RESET, BUTTON_ON, BUTTON_NONE },
{ ACTION_PS_EXIT, BUTTON_OFF, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_pitchcreen */
static const struct button_mapping button_context_recscreen[] = {
{ ACTION_REC_PAUSE, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_REC_F2, BUTTON_F2, BUTTON_NONE },
{ ACTION_REC_F3, BUTTON_F3, 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_LEFT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_recscreen */
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_ON|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_ON|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_ON|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_KBD_PAGE_FLIP, BUTTON_F1, BUTTON_NONE },
{ ACTION_KBD_DONE, BUTTON_F2, BUTTON_NONE },
{ ACTION_KBD_ABORT, BUTTON_OFF, BUTTON_NONE },
{ ACTION_KBD_BACKSPACE, BUTTON_F3, BUTTON_NONE },
{ ACTION_KBD_BACKSPACE, BUTTON_F3|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_MORSE_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
LAST_ITEM_IN_LIST
}; /* button_context_keyboard */
static const struct button_mapping button_context_bmark[] = {
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_settings_bmark */
static const struct button_mapping button_context_radio[] = {
{ ACTION_FM_MENU, BUTTON_F1, BUTTON_NONE },
{ ACTION_FM_PRESET, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_FM_RECORD, BUTTON_F3, BUTTON_NONE },
{ ACTION_FM_FREEZE, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE },
{ ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON },
{ ACTION_FM_EXIT, BUTTON_ON | BUTTON_REL, BUTTON_ON },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
};
#if BUTTON_REMOTE != 0
/*****************************************************************************
* Remote control mappings
*****************************************************************************/
static const struct button_mapping remote_button_context_standard[] = {
{ ACTION_STD_PREV, BUTTON_RC_LEFT, BUTTON_NONE },
{ ACTION_STD_NEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
static const struct button_mapping remote_button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
{ ACTION_WPS_SKIPNEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
{ ACTION_WPS_SKIPPREV, BUTTON_RC_LEFT, BUTTON_NONE },
{ ACTION_WPS_STOP, BUTTON_RC_STOP, BUTTON_NONE },
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
};
static const struct button_mapping* get_context_mapping_remote( int context )
{
context ^= CONTEXT_REMOTE;
switch (context)
{
case CONTEXT_WPS:
return remote_button_context_wps;
default:
return remote_button_context_standard;
}
}
#endif /* BUTTON_REMOTE != 0 */
const struct button_mapping* get_context_mapping( int context )
{
#if BUTTON_REMOTE != 0
if (context&CONTEXT_REMOTE)
return get_context_mapping_remote(context);
#endif
switch( context )
{
case CONTEXT_WPS:
return button_context_wps;
case CONTEXT_SETTINGS_TIME:
case CONTEXT_SETTINGS:
return button_context_settings;
case CONTEXT_YESNOSCREEN:
return button_context_yesno;
case CONTEXT_PITCHSCREEN:
return button_context_pitchscreen;
case CONTEXT_BOOKMARKSCREEN:
return button_context_bmark;
case CONTEXT_TREE:
case CONTEXT_MAINMENU:
if (global_settings.hold_lr_for_scroll_in_list)
return button_context_tree_scroll_lr;
/* else fall through to CUSTOM|1 */
case CONTEXT_CUSTOM|1:
return button_context_tree;
case CONTEXT_QUICKSCREEN:
return button_context_quickscreen;
case CONTEXT_RECSCREEN:
case CONTEXT_SETTINGS_RECTRIGGER:
return button_context_recscreen;
case CONTEXT_KEYBOARD:
case CONTEXT_MORSE_INPUT:
return button_context_keyboard;
case CONTEXT_FM:
return button_context_radio;
case CONTEXT_STD:
case CONTEXT_LIST:
default:
return button_context_standard;
}
}

View file

@ -52,13 +52,6 @@
# The target names used are picked from the configure script and are set in the
# MODELNAME variable in the root makefile. Currently, they are:
# Target Target string
# Archos
# Player/Studio archosplayer
# Recorder archosrecorder
# FM Recorder archosfmrecorder
# Recorder V2 archosrecorderv2
# Ondio SP archosondiosp
# Ondio FM archosondiofm
# iriver
# H100/H110/H115 iriverh100
# H120/H140 iriverh120
@ -333,7 +326,6 @@
iriverh100,iriverh120,iriverh300: "NAVI = Yes"
ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*,sansaconnect: "SELECT = Yes"
mrobe500: "PLAY, POWER, or top-right = Yes"
archosplayer: "(PLAY/STOP)"
vibe500: "OK = Yes"
creativezen*: "Select = Yes"
</source>
@ -343,7 +335,6 @@
iriverh100,iriverh120,iriverh300: "NAVI = Yes"
ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*,sansaconnect: "SELECT = Yes"
mrobe500: "PLAY, POWER, or top-right = Yes"
archosplayer: "(PLAY/STOP)"
vibe500: "OK = Yes"
creativezen*: "Select = Yes"
</dest>
@ -357,15 +348,12 @@
user: core
<source>
*: "Any Other = No"
archosplayer: none
</source>
<dest>
*: "Any Other = No"
archosplayer: none
</dest>
<voice>
*: ""
archosplayer: none
</voice>
</phrase>
<phrase>
@ -1272,159 +1260,6 @@
lcd_bitmap: "Dithering"
</voice>
</phrase>
<phrase>
id: LANG_LOUDNESS
desc: in sound_settings
user: core
<source>
*: none
masf: "Loudness"
</source>
<dest>
*: none
masf: "Loudness"
</dest>
<voice>
*: none
masf: "Loudness"
</voice>
</phrase>
<phrase>
id: LANG_AUTOVOL
desc: in sound_settings
user: core
<source>
*: none
masf: "Auto Volume"
</source>
<dest>
*: none
masf: "Auto Volume"
</dest>
<voice>
*: none
masf: "Auto Volume"
</voice>
</phrase>
<phrase>
id: LANG_DECAY
desc: in sound_settings
user: core
<source>
*: none
masf: "AV Decay Time"
</source>
<dest>
*: none
masf: "AV Decay Time"
</dest>
<voice>
*: none
masf: ""
</voice>
</phrase>
<phrase>
id: LANG_SUPERBASS
desc: in sound settings
user: core
<source>
*: none
masf: "Super Bass"
</source>
<dest>
*: none
masf: "Super Bass"
</dest>
<voice>
*: none
masf: "Super Bass"
</voice>
</phrase>
<phrase>
id: LANG_MDB_ENABLE
desc: in sound settings
user: core
<source>
*: none
masf: "MDB Enable"
</source>
<dest>
*: none
masf: "MDB Enable"
</dest>
<voice>
*: none
masf: "MDB Enable"
</voice>
</phrase>
<phrase>
id: LANG_MDB_STRENGTH
desc: in sound settings
user: core
<source>
*: none
masf: "MDB Strength"
</source>
<dest>
*: none
masf: "MDB Strength"
</dest>
<voice>
*: none
masf: "MDB Strength"
</voice>
</phrase>
<phrase>
id: LANG_MDB_HARMONICS
desc: in sound settings
user: core
<source>
*: none
masf: "MDB Harmonics"
</source>
<dest>
*: none
masf: "MDB Harmonics"
</dest>
<voice>
*: none
masf: "MDB Harmonics"
</voice>
</phrase>
<phrase>
id: LANG_MDB_CENTER
desc: in sound settings
user: core
<source>
*: none
masf: "MDB Centre Frequency"
</source>
<dest>
*: none
masf: "MDB Centre Frequency"
</dest>
<voice>
*: none
masf: "MDB Centre Frequency"
</voice>
</phrase>
<phrase>
id: LANG_MDB_SHAPE
desc: in sound settings
user: core
<source>
*: none
masf: "MDB Shape"
</source>
<dest>
*: none
masf: "MDB Shape"
</dest>
<voice>
*: none
masf: "MDB Shape"
</voice>
</phrase>
<phrase>
id: LANG_GENERAL_SETTINGS
desc: in the main menu
@ -2322,7 +2157,6 @@
iaudiox5,iaudiom5,gigabeat*,mrobe100,samsungyh*: "Building database... %d found (LEFT to return)"
iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Building database... %d found (PREV to return)"
gogearsa9200: "Building database... %d found (REW to return)"
archosplayer: "Building DB %d found"
</source>
<dest>
*: "Building database... %d found (OFF to return)"
@ -2331,7 +2165,6 @@
iaudiox5,iaudiom5,gigabeat*,mrobe100,samsungyh*: "Building database... %d found (LEFT to return)"
iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Building database... %d found (PREV to return)"
gogearsa9200: "Building database... %d found (REW to return)"
archosplayer: "Building DB %d found"
</dest>
<voice>
*: "entries found for database"
@ -3262,23 +3095,6 @@
lcd_bitmap: "Status Bar"
</voice>
</phrase>
<phrase>
id: LANG_BUTTON_BAR
desc: in settings menu
user: core
<source>
*: none
recorder_pad: "Button Bar"
</source>
<dest>
*: none
recorder_pad: "Button Bar"
</dest>
<voice>
*: none
recorder_pad: "Button Bar"
</voice>
</phrase>
<phrase>
id: LANG_VOLUME_DISPLAY
desc: Volume type title
@ -3353,15 +3169,12 @@
user: core
<source>
*: "Peak Meter"
masd: none
</source>
<dest>
*: "Peak Meter"
masd: none
</dest>
<voice>
*: "Peak Meter"
masd: none
</voice>
</phrase>
<phrase>
@ -3370,15 +3183,12 @@
user: core
<source>
*: "Clip Hold Time"
masd: none
</source>
<dest>
*: "Clip Hold Time"
masd: none
</dest>
<voice>
*: "Clip Hold Time"
masd: none
</voice>
</phrase>
<phrase>
@ -3387,15 +3197,12 @@
user: core
<source>
*: "Peak Hold Time"
masd: none
</source>
<dest>
*: "Peak Hold Time"
masd: none
</dest>
<voice>
*: "Peak Hold Time"
masd: none
</voice>
</phrase>
<phrase>
@ -3404,15 +3211,12 @@
user: core
<source>
*: "Eternal"
masd: none
</source>
<dest>
*: "Eternal"
masd: none
</dest>
<voice>
*: "Eternal"
masd: none
</voice>
</phrase>
<phrase>
@ -3421,15 +3225,12 @@
user: core
<source>
*: "Peak Release"
masd: none
</source>
<dest>
*: "Peak Release"
masd: none
</dest>
<voice>
*: "Peak Release"
masd: none
</voice>
</phrase>
<phrase>
@ -3438,15 +3239,12 @@
user: core
<source>
*: "Scale"
masd: none
</source>
<dest>
*: "Scale"
masd: none
</dest>
<voice>
*: "Scale"
masd: none
</voice>
</phrase>
<phrase>
@ -3455,15 +3253,12 @@
user: core
<source>
*: "Logarithmic (dB)"
masd: none
</source>
<dest>
*: "Logarithmic (dB)"
masd: none
</dest>
<voice>
*: "Logarithmic decibel"
masd: none
</voice>
</phrase>
<phrase>
@ -3472,15 +3267,12 @@
user: core
<source>
*: "Linear (%)"
masd: none
</source>
<dest>
*: "Linear (%)"
masd: none
</dest>
<voice>
*: "Linear percent"
masd: none
</voice>
</phrase>
<phrase>
@ -3489,15 +3281,12 @@
user: core
<source>
*: "Minimum Of Range"
masd: none
</source>
<dest>
*: "Minimum Of Range"
masd: none
</dest>
<voice>
*: "Minimum Of Range"
masd: none
</voice>
</phrase>
<phrase>
@ -3506,15 +3295,12 @@
user: core
<source>
*: "Maximum Of Range"
masd: none
</source>
<dest>
*: "Maximum Of Range"
masd: none
</dest>
<voice>
*: "Maximum Of Range"
masd: none
</voice>
</phrase>
<phrase>
@ -5122,57 +4908,6 @@
radio: "The Preset List is Full"
</voice>
</phrase>
<phrase>
id: LANG_BUTTONBAR_MENU
desc: in button bar
user: core
<source>
*: none
radio_screen_button_bar: "Menu"
</source>
<dest>
*: none
radio_screen_button_bar: "Menu"
</dest>
<voice>
*: none
radio_screen_button_bar: ""
</voice>
</phrase>
<phrase>
id: LANG_FM_BUTTONBAR_EXIT
desc: in radio screen
user: core
<source>
*: none
radio_screen_button_bar: "Exit"
</source>
<dest>
*: none
radio_screen_button_bar: "Exit"
</dest>
<voice>
*: none
radio_screen_button_bar: ""
</voice>
</phrase>
<phrase>
id: LANG_FM_BUTTONBAR_ACTION
desc: in radio screen
user: core
<source>
*: none
radio_screen_button_bar: "Action"
</source>
<dest>
*: none
radio_screen_button_bar: "Action"
</dest>
<voice>
*: none
radio_screen_button_bar: ""
</voice>
</phrase>
<phrase>
id: LANG_PRESET
desc: in button bar and radio screen / menu
@ -5190,40 +4925,6 @@
radio: "Preset"
</voice>
</phrase>
<phrase>
id: LANG_FM_BUTTONBAR_ADD
desc: in radio screen
user: core
<source>
*: none
radio_screen_button_bar: "Add"
</source>
<dest>
*: none
radio_screen_button_bar: "Add"
</dest>
<voice>
*: none
radio_screen_button_bar: ""
</voice>
</phrase>
<phrase>
id: LANG_FM_BUTTONBAR_RECORD
desc: in radio screen
user: core
<source>
*: none
radio_screen_button_bar: "Record"
</source>
<dest>
*: none
radio_screen_button_bar: "Record"
</dest>
<voice>
*: none
radio_screen_button_bar: ""
</voice>
</phrase>
<phrase>
id: LANG_FM_MONO_MODE
desc: in radio screen
@ -5777,15 +5478,15 @@
user: core
<source>
*: none
recording,archosplayer: "Line In"
recording: "Line In"
</source>
<dest>
*: none
recording,archosplayer: "Line In"
recording: "Line In"
</dest>
<voice>
*: none
recording,archosplayer: "Line In"
recording: "Line In"
</voice>
</phrase>
<phrase>
@ -6576,23 +6277,6 @@
*: "Erase dynamic playlist?"
</voice>
</phrase>
<phrase>
id: LANG_SHUTDOWN
desc: in main menu
user: core
<source>
*: none
soft_shutdown: "Shut down"
</source>
<dest>
*: none
soft_shutdown: "Shut down"
</dest>
<voice>
*: none
soft_shutdown: "Shut down"
</voice>
</phrase>
<phrase>
id: LANG_ROCKBOX_INFO
desc: displayed topmost on the info screen and in the info menu
@ -6613,11 +6297,9 @@
user: core
<source>
*: "Buffer:"
archosplayer: "Buf:"
</source>
<dest>
*: "Buffer:"
archosplayer: "Buf:"
</dest>
<voice>
*: "Buffer size"
@ -6629,12 +6311,12 @@
user: core
<source>
*: "Battery: %d%% %dh %dm"
archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %dh %dm"
iriverifp7xx: "%d%% %dh %dm"
iriverh10,ipodmini1g,ipodmini2g: "Batt: %d%% %dh %dm"
</source>
<dest>
*: "Battery: %d%% %dh %dm"
archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %dh %dm"
iriverifp7xx: "%d%% %dh %dm"
iriverh10,ipodmini1g,ipodmini2g: "Batt: %d%% %dh %dm"
</dest>
<voice>
@ -6688,28 +6370,25 @@
</phrase>
<phrase>
id: LANG_DISK_NAME_MMC
desc: in info menu; name for external disk with multivolume (Ondio; keep short!)
desc: in info menu; name for external disk with multivolume (keep short!)
user: core
<source>
*: none
multivolume: "HD1"
sansae200*,sansac200*,sansafuze*,sansaclipplus: "mSD:"
xduoox3: "mSD2:"
archosondio*: "MMC:"
</source>
<dest>
*: none
multivolume: "HD1"
sansae200*,sansac200*,sansafuze*,sansaclipplus: "MSD:"
xduoox3: "mSD2:"
archosondio*: "MMC:"
</dest>
<voice>
*: none
multivolume: "H D 1"
sansae200*,sansac200*,sansafuze*,sansaclipplus: "micro S D"
xduoox3: "micro S D 2"
archosondio*: "M M C"
</voice>
</phrase>
<phrase>
@ -7806,11 +7485,9 @@
user: core
<source>
*: "End of Song List"
archosplayer: "End of List"
</source>
<dest>
*: "End of Song List"
archosplayer: "End of List"
</dest>
<voice>
*: "End of Song List"
@ -8062,40 +7739,6 @@
recording: "minus infinity"
</voice>
</phrase>
<phrase>
id: LANG_CONFIRM_SHUTDOWN
desc: in shutdown screen
user: core
<source>
*: none
soft_shutdown: "Press OFF to shut down"
</source>
<dest>
*: none
soft_shutdown: "Press OFF to shut down"
</dest>
<voice>
*: none
soft_shutdown: ""
</voice>
</phrase>
<phrase>
id: LANG_REMOVE_MMC
desc: before acknowledging usb in case an MMC is inserted (Ondio)
user: core
<source>
*: none
archosondio*: "Please remove inserted MMC"
</source>
<dest>
*: none
archosondio*: "Please remove inserted MMC"
</dest>
<voice>
*: none
archosondio*: "Please remove multimedia card"
</voice>
</phrase>
<phrase>
id: LANG_BOOT_CHANGED
desc: File browser discovered the boot file was changed
@ -8126,11 +7769,11 @@
</phrase>
<phrase>
id: LANG_OFF_ABORT
desc: Used on archosrecorder models
desc: Used on many models
user: core
<source>
*: "OFF to abort"
archosplayer,iriverh100,iriverh120,iriverh300: "STOP to abort"
iriverh100,iriverh120,iriverh300: "STOP to abort"
ipod*: "PLAY/PAUSE to abort"
iaudiox5,iaudiom5: "Long PLAY to abort"
iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV to abort"
@ -8140,7 +7783,7 @@
</source>
<dest>
*: "OFF to abort"
archosplayer,iriverh100,iriverh120,iriverh300: "STOP to abort"
iriverh100,iriverh120,iriverh300: "STOP to abort"
ipod*: "PLAY/PAUSE to abort"
iaudiox5,iaudiom5: "Long PLAY to abort"
iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV to abort"
@ -8210,7 +7853,7 @@
</phrase>
<phrase>
id: LANG_PLUGIN_WRONG_MODEL
desc: The plugin is not compatible with the archos model trying to run it
desc: The plugin is not compatible with the player model trying to run it
user: core
<source>
*: "Incompatible model"
@ -8323,23 +7966,6 @@
charging: "Battery: Charging"
</voice>
</phrase>
<phrase>
id: LANG_BATTERY_TOPOFF_CHARGE
desc: in info display, shows that top off charge is running Only for V1 archosrecorder
user: core
<source>
*: none
archosrecorder: "Battery: Top-Off Chg"
</source>
<dest>
*: none
archosrecorder: "Battery: Top-Off Chg"
</dest>
<voice>
*: none
archosrecorder: "Top off charge"
</voice>
</phrase>
<phrase>
id: LANG_BATTERY_TRICKLE_CHARGE
desc: in info display, shows that trickle charge is running
@ -9803,57 +9429,6 @@
lcd_bitmap: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_DIRBROWSE_F1
desc: in dir browser, F1 button bar text
user: core
<source>
*: none
recorder_pad: "Menu"
</source>
<dest>
*: none
recorder_pad: "Menu"
</dest>
<voice>
*: none
recorder_pad: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_DIRBROWSE_F2
desc: in dir browser, F2 button bar text
user: core
<source>
*: none
recorder_pad: "Option"
</source>
<dest>
*: none
recorder_pad: "Option"
</dest>
<voice>
*: none
recorder_pad: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_DIRBROWSE_F3
desc: in dir browser, F3 button bar text
user: core
<source>
*: none
recorder_pad: "LCD"
</source>
<dest>
*: none
recorder_pad: "LCD"
</dest>
<voice>
*: none
recorder_pad: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_CHANNEL_STEREO
desc: in sound_settings
@ -16531,4 +16106,4 @@ id: VOICE_BAT_BENCH_KEYS
*: none
lcd_bitmap: "Show album and artist at the bottom"
</voice>
</phrase>
</phrase>

View file

@ -418,10 +418,6 @@ static void init(void)
{
int rc;
bool mounted = false;
#if CONFIG_CHARGING && (CONFIG_CPU == SH7034)
/* if nobody initialized ATA before, I consider this a cold start */
bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */
#endif
system_init();
core_allocator_init();
@ -528,24 +524,6 @@ static void init(void)
viewportmanager_init();
CHART("<viewportmanager_init");
#if CONFIG_CHARGING && (CONFIG_CPU == SH7034)
/* charger_inserted() can't be used here because power_thread()
hasn't checked power_input_status() yet */
if (coldstart && (power_input_status() & POWER_INPUT_MAIN_CHARGER)
&& !global_settings.car_adapter_mode
#ifdef ATA_POWER_PLAYERSTYLE
&& !ide_powered() /* relies on probing result from bootloader */
#endif
)
{
rc = charging_screen(); /* display a "charging" screen */
if (rc == 1) /* charger removed */
power_off();
/* "On" pressed or USB connected: proceed */
show_logo(); /* again, to provide better visual feedback */
}
#endif
CHART(">storage_init");
rc = storage_init();
CHART("<storage_init");

View file

@ -60,7 +60,6 @@
/* gui api */
#include "list.h"
#include "buttonbar.h"
#define MAX_MENUS 8
/* used to allow for dynamic menus */
@ -376,12 +375,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
int stack_top = 0;
bool in_stringlist, done = false;
struct viewport *vps = NULL;
#ifdef HAVE_BUTTONBAR
struct gui_buttonbar buttonbar;
gui_buttonbar_init(&buttonbar);
gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
gui_buttonbar_set(&buttonbar, "<<<", "", "");
#endif
menu_callback_type menu_callback = NULL;
/* if hide_theme is true, assume parent has been fixed before passed into
@ -394,23 +387,10 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
gui_synclist_draw(&lists);
gui_synclist_speak_item(&lists);
#ifdef HAVE_BUTTONBAR
if (!hide_theme)
{
gui_buttonbar_set(&buttonbar, "<<<", "", "");
gui_buttonbar_draw(&buttonbar);
}
#endif
while (!done)
{
int new_audio_status;
redraw_lists = false;
if (!hide_theme)
{
#ifdef HAVE_BUTTONBAR
gui_buttonbar_draw(&buttonbar);
#endif
}
#if CONFIG_CODEC == SWCODEC
keyclick_set_callback(gui_synclist_keyclick_callback, &lists);
#endif
@ -590,13 +570,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
int type = (menu->flags&MENU_TYPE_MASK);
/* entering an item that may not be a list, so stop scrolling */
gui_synclist_scroll_stop(&lists);
#ifdef HAVE_BUTTONBAR
if (!hide_theme)
{
gui_buttonbar_unset(&buttonbar);
gui_buttonbar_draw(&buttonbar);
}
#endif
selected = get_menu_selection(gui_synclist_get_sel_pos(&lists), menu);
if (type == MT_MENU)
temp = menu->submenus[selected];
@ -700,13 +673,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
done = true;
break;
}
#ifdef HAVE_BUTTONBAR
if (!hide_theme)
{
gui_buttonbar_set(&buttonbar, "<<<", "", "");
gui_buttonbar_draw(&buttonbar);
}
#endif
}
else
{

View file

@ -264,21 +264,10 @@ static const char* info_getname(int selected_item, void *data,
return str(LANG_BATTERY_CHARGE);
else
#elif CONFIG_CHARGING >= CHARGING_MONITOR
#ifdef ARCHOS_RECORDER
/* Report the particular algorithm state */
if (charge_state == CHARGING)
return str(LANG_BATTERY_CHARGE);
else if (charge_state == TOPOFF)
return str(LANG_BATTERY_TOPOFF_CHARGE);
else if (charge_state == TRICKLE)
return str(LANG_BATTERY_TRICKLE_CHARGE);
else
#else /* !ARCHOS_RECORDER */
/* Go by what power management reports */
if (charging_state())
return str(LANG_BATTERY_CHARGE);
else
#endif /* ARCHOS_RECORDER */
#endif /* CONFIG_CHARGING = */
if (battery_level() >= 0)
snprintf(buffer, buffer_len, str(LANG_BATTERY_TIME),
@ -394,24 +383,6 @@ static int info_speak_item(int selected_item, void * data)
}
else
#elif CONFIG_CHARGING >= CHARGING_MONITOR
#ifdef ARCHOS_RECORDER
/* Report the particular algorithm state */
if (charge_state == CHARGING)
{
talk_id(LANG_BATTERY_CHARGE, true);
if (battery_level() >= 0)
talk_value(battery_level(), UNIT_PERCENT, true);
}
else if (charge_state == TOPOFF)
talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
else if (charge_state == TRICKLE)
{
talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
if (battery_level() >= 0)
talk_value(battery_level(), UNIT_PERCENT, true);
}
else
#else /* !ARCHOS_RECORDER */
/* Go by what power management reports */
if (charging_state())
{
@ -420,7 +391,6 @@ static int info_speak_item(int selected_item, void * data)
talk_value(battery_level(), UNIT_PERCENT, true);
}
else
#endif /* ARCHOS_RECORDER */
#endif /* CONFIG_CHARGING = */
if (battery_level() >= 0)
{

View file

@ -117,20 +117,6 @@ static void make_options_from_indexes(const struct opt_items *src_names,
static int recfrequency_func(void)
{
#if CONFIG_CODEC == MAS3587F
static const struct opt_items names[6] = {
{ "44.1kHz", TALK_ID(44, UNIT_KHZ) },
{ "48kHz", TALK_ID(48, UNIT_KHZ) },
{ "32kHz", TALK_ID(32, UNIT_KHZ) },
{ "22.05kHz", TALK_ID(22, UNIT_KHZ) },
{ "24kHz", TALK_ID(24, UNIT_KHZ) },
{ "16kHz", TALK_ID(16, UNIT_KHZ) }
};
return set_option(str(LANG_FREQUENCY),
&global_settings.rec_frequency, INT,
names, 6, NULL );
#endif /* CONFIG_CODEC == MAS3587F */
#if CONFIG_CODEC == SWCODEC
static const struct opt_items names[REC_NUM_FREQ] = {
REC_HAVE_96_([REC_FREQ_96] = { "96kHz", TALK_ID(96, UNIT_KHZ) },)
@ -221,11 +207,6 @@ static int recchannels_func(void)
[CHN_MODE_STEREO] = { STR(LANG_CHANNEL_STEREO) },
[CHN_MODE_MONO] = { STR(LANG_CHANNEL_MONO) }
};
#if CONFIG_CODEC == MAS3587F
return set_option(str(LANG_CHANNELS),
&global_settings.rec_channels, INT,
names, CHN_NUM_MODES, NULL );
#endif /* CONFIG_CODEC == MAS3587F */
#if CONFIG_CODEC == SWCODEC
struct opt_items opts[CHN_NUM_MODES];
@ -329,10 +310,6 @@ static int recmenu_callback(int action,
}
return action;
}
#if CONFIG_CODEC == MAS3587F
MENUITEM_SETTING(rec_quality, &global_settings.rec_quality, NULL);
MENUITEM_SETTING(rec_editable, &global_settings.rec_editable, NULL);
#endif
MENUITEM_SETTING(rec_split_type, &global_settings.rec_split_type, NULL);
MENUITEM_SETTING(rec_split_method, &global_settings.rec_split_method, NULL);
@ -626,9 +603,6 @@ MENUITEM_FUNCTION(save_recpresets_item, 0, ID2P(LANG_SAVE_SETTINGS),
MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS),
NULL, Icon_Recording,
#if CONFIG_CODEC == MAS3587F
&rec_quality,
#endif
#if CONFIG_CODEC == SWCODEC
&recformat, &enc_global_config_menu_item,
#endif
@ -636,9 +610,6 @@ MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS),
&recchannels,
#if CONFIG_CODEC == SWCODEC
&recmonomode,
#endif
#if CONFIG_CODEC == MAS3587F
&rec_editable,
#endif
&filesplitoptionsmenu,
&rec_prerecord_time,

View file

@ -339,27 +339,6 @@ MAKE_MENU(keyclick_menu, ID2P(LANG_KEYCLICK), 0, Icon_NOICON,
#endif
#endif
#if CONFIG_CODEC == MAS3507D
void dac_line_in(bool enable);
static int linein_callback(int action,
const struct menu_item_ex *this_item,
struct gui_synclist *this_list)
{
(void)this_item;
(void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM: /* on exit */
#ifndef SIMULATOR
dac_line_in(global_settings.line_in);
#endif
break;
}
return action;
}
MENUITEM_SETTING(line_in, &global_settings.line_in, linein_callback);
#endif
#if CONFIG_CHARGING
MENUITEM_SETTING(car_adapter_mode, &global_settings.car_adapter_mode, NULL);
MENUITEM_SETTING(car_adapter_mode_delay, &global_settings.car_adapter_mode_delay, NULL);
@ -440,9 +419,6 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
#ifdef HAVE_MORSE_INPUT
&morse_input,
#endif
#if CONFIG_CODEC == MAS3507D
&line_in,
#endif
#if CONFIG_CHARGING
&car_adapter_mode_menu,
#endif

View file

@ -218,17 +218,6 @@ static int timestretch_callback(int action,
&compressor_knee, &compressor_attack, &compressor_release);
#endif
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
MENUITEM_SETTING(loudness, &global_settings.loudness, NULL);
MENUITEM_SETTING(avc, &global_settings.avc, NULL);
MENUITEM_SETTING(superbass, &global_settings.superbass, NULL);
MENUITEM_SETTING(mdb_enable, &global_settings.mdb_enable, NULL);
MENUITEM_SETTING(mdb_strength, &global_settings.mdb_strength, NULL);
MENUITEM_SETTING(mdb_harmonics, &global_settings.mdb_harmonics, NULL);
MENUITEM_SETTING(mdb_center, &global_settings.mdb_center, NULL);
MENUITEM_SETTING(mdb_shape, &global_settings.mdb_shape, NULL);
#endif
#ifdef HAVE_SPEAKER
MENUITEM_SETTING(speaker_mode, &global_settings.speaker_mode, NULL);
#endif
@ -272,10 +261,6 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
#endif
,&compressor_menu
#endif
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
,&loudness,&avc,&superbass,&mdb_enable,&mdb_strength
,&mdb_harmonics,&mdb_center,&mdb_shape
#endif
#ifdef HAVE_SPEAKER
,&speaker_mode
#endif

View file

@ -198,22 +198,6 @@ static int statusbar_callback(int action,
return statusbar_callback_ex(action, this_item, SCREEN_MAIN);
}
#ifdef HAVE_BUTTONBAR
static int buttonbar_callback(int action,
const struct menu_item_ex *this_item,
struct gui_synclist *this_list)
{
(void)this_item;
(void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
viewportmanager_theme_changed(THEME_BUTTONBAR);
break;
}
return ACTION_REDRAW;
}
#endif
MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL);
MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL);
MENUITEM_SETTING(statusbar, &global_settings.statusbar,
@ -222,9 +206,6 @@ MENUITEM_SETTING(statusbar, &global_settings.statusbar,
MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
statusbar_callback_remote);
#endif
#ifdef HAVE_BUTTONBAR
MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, buttonbar_callback);
#endif
MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
@ -232,9 +213,6 @@ MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
#ifdef HAVE_REMOTE_LCD
&remote_statusbar,
#endif
#if CONFIG_KEYPAD == RECORDER_PAD
&buttonbar,
#endif
&volume_type
#if (CONFIG_BATTERY_MEASURE != 0)
, &battery_display

View file

@ -264,12 +264,6 @@ int time_screen(void* ignored)
FOR_NB_SCREENS(i)
{
viewport_set_defaults(&clock_vps[i], i);
#ifdef HAVE_BUTTONBAR
if (global_settings.buttonbar)
{
clock_vps[i].height -= BUTTONBAR_HEIGHT;
}
#endif
nb_lines = viewport_get_nb_lines(&clock_vps[i]);
gui_synclist_set_viewport_defaults(&menu[i], i);

View file

@ -436,17 +436,6 @@ bool list_stop_handler(void)
}
}
#if CONFIG_CHARGING
#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
else
{
if (charger_inserted())
charging_splash();
else
shutdown_screen(); /* won't return if shutdown actually happens */
ret = true; /* screen is dirty, caller needs to refresh */
}
#endif
#ifndef HAVE_POWEROFF_WHILE_CHARGING
{
static long last_off = 0;
@ -595,10 +584,6 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
case SYS_USB_CONNECTED:
if (callback != NULL)
callback(parameter);
#if (CONFIG_STORAGE & STORAGE_MMC) && (defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM))
if (!mmc_touched() ||
(mmc_remove_request() == SYS_HOTSWAP_EXTRACTED))
#endif
{
system_flush();
#ifdef BOOTFILE

File diff suppressed because it is too large Load diff

View file

@ -318,13 +318,9 @@ static const struct plugin_api rockbox_api = {
viewport_set_fullscreen,
#endif
#ifdef HAVE_BACKLIGHT
/* lcd backlight */
/* The backlight_* functions must be present in the API regardless whether
* HAVE_BACKLIGHT is defined or not. The reason is that the stock Ondio has
* no backlight but can be modded to have backlight (it's prepared on the
* PCB). This makes backlight an all-target feature API wise, and keeps API
* compatible between stock and modded Ondio.
* For OLED targets like the Sansa Clip, the backlight_* functions control
/* For OLED targets like the Sansa Clip, the backlight_* functions control
* the display enable, which has essentially the same effect. */
is_backlight_on,
backlight_on,
@ -346,6 +342,7 @@ static const struct plugin_api rockbox_api = {
remote_backlight_set_timeout_plugged,
#endif
#endif /* HAVE_REMOTE_LCD */
#endif /* HAVE_BACKLIGHT */
/* list */
gui_synclist_init,
@ -615,8 +612,7 @@ static const struct plugin_api rockbox_api = {
#ifdef AUDIOHW_HAVE_EQ
sound_enum_hw_eq_band_setting,
#endif
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
#if ((CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
sound_set_pitch,
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
@ -684,13 +680,6 @@ static const struct plugin_api rockbox_api = {
keyclick_click,
#endif /* CONFIG_CODEC == SWCODEC */
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
peak_meter_scale_value,
peak_meter_set_use_dbfs,
peak_meter_get_use_dbfs,
#endif
/* metadata */
get_metadata,
mp3info,
@ -742,21 +731,6 @@ static const struct plugin_api rockbox_api = {
mpeg_get_last_header,
#endif
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
/* MAS communication */
mas_readmem,
mas_writemem,
mas_readreg,
mas_writereg,
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
mas_codec_writereg,
mas_codec_readreg,
i2c_begin,
i2c_end,
i2c_write,
#endif
#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
/* menu */
root_menu_get_options,
do_menu,

View file

@ -88,8 +88,6 @@ void* plugin_get_buffer(size_t *buffer_size);
#ifdef HAVE_RECORDING
#include "recording.h"
#endif
#else
#include "mas35xx.h"
#endif /* CONFIG_CODEC == SWCODEC */
#include "settings.h"
#include "timer.h"
@ -355,13 +353,9 @@ struct plugin_api {
const enum screen_type screen);
#endif
#ifdef HAVE_BACKLIGHT
/* lcd backlight */
/* The backlight_* functions must be present in the API regardless whether
* HAVE_BACKLIGHT is defined or not. The reason is that the stock Ondio has
* no backlight but can be modded to have backlight (it's prepared on the
* PCB). This makes backlight an all-target feature API wise, and keeps API
* compatible between stock and modded Ondio.
* For OLED targets like the Sansa Clip, the backlight_* functions control
/* For OLED targets like the Sansa Clip, the backlight_* functions control
* the display enable, which has essentially the same effect. */
bool (*is_backlight_on)(bool ignore_always_off);
void (*backlight_on)(void);
@ -383,6 +377,7 @@ struct plugin_api {
void (*remote_backlight_set_timeout_plugged)(int index);
#endif
#endif /* HAVE_REMOTE_LCD */
#endif /* HAVE_BACKLIGHT */
/* list */
void (*gui_synclist_init)(struct gui_synclist * lists,
@ -689,8 +684,7 @@ struct plugin_api {
int (*sound_enum_hw_eq_band_setting)(unsigned int band,
unsigned int band_setting);
#endif /* AUDIOHW_HAVE_EQ */
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
#if ((CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL))
void (*sound_set_pitch)(int32_t pitch);
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
@ -771,13 +765,6 @@ struct plugin_api {
void (*keyclick_click)(bool rawbutton, int action);
#endif /* CONFIG_CODEC == SWCODEC */
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned short (*peak_meter_scale_value)(unsigned short val,
int meterwidth);
void (*peak_meter_set_use_dbfs)(bool use);
bool (*peak_meter_get_use_dbfs)(void);
#endif
/* metadata */
bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname);
bool (*mp3info)(struct mp3entry *entry, const char *filename);
@ -845,21 +832,6 @@ struct plugin_api {
unsigned long (*mpeg_get_last_header)(void);
#endif
/* MAS communication */
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
int (*mas_readreg)(int reg);
int (*mas_writereg)(int reg, unsigned int val);
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int (*mas_codec_writereg)(int reg, unsigned int val);
int (*mas_codec_readreg)(int reg);
void (*i2c_begin)(void);
void (*i2c_end)(void);
int (*i2c_write)(int address, const unsigned char* buf, int count );
#endif
#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
/* menu */
struct menu_table *(*root_menu_get_options)(int *nb_options);
int (*do_menu)(const struct menu_item_ex *menu, int *start_selected,

View file

@ -86,7 +86,7 @@ wolf3d.c
#if PLUGIN_BUFFER_SIZE <= 0x20000 && defined(HAVE_LCD_BITMAP)
#if CONFIG_KEYPAD != ONDIO_PAD && CONFIG_KEYPAD != SANSA_M200_PAD \
#if CONFIG_KEYPAD != SANSA_M200_PAD \
&& CONFIG_KEYPAD != HM60X_PAD
/* not enough buttons for rockboy */
rockboy.c
@ -106,44 +106,16 @@ pictureflow.c
splitedit.c
#endif
#if CONFIG_LCD == LCD_SSD1815
video.c
#endif
#endif /* HWCODEC */
#if defined(ARCHOS_PLAYER) || defined(ARCHOS_RECORDER) || \
defined(ARCHOS_FMRECORDER) || defined(ARCHOS_RECORDERV2)
alpine_cdc.c
#endif
#if defined(ARCHOS_PLAYER) || defined(ARCHOS_RECORDER) || \
defined(ARCHOS_FMRECORDER) || defined(ARCHOS_RECORDERV2) || \
defined(ARCHOS_ONDIOFM) || defined(ARCHOS_ONDIOSP)
firmware_flash.c
#endif
#if defined(IRIVER_H100_SERIES)
iriver_flash.c
#endif
#if (CONFIG_CPU == SH7034)
rockbox_flash.c
#endif /* CONFIG_CPU */
#if defined(IPOD_NANO2G)
crypt_firmware.c
#endif
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
wavplay.c
#endif
#if (CONFIG_CODEC == MAS3587F)
wavrecord.c
#endif
#endif /* PLATFORM_NATIVE */
metronome.c
@ -217,11 +189,6 @@ rocklife.c
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_CHARCELLS /* Archos Player model only */
euroconverter.c
nim.c
#endif /* HAVE_LCD_CHARCELLS */
#if LCD_DEPTH > 1 /* non-mono bitmap targets */
matrix.c

View file

@ -24,8 +24,7 @@ sdl
puzzles
#endif
#if (CONFIG_KEYPAD != ONDIO_PAD) /* not enough buttons */ \
&& (CONFIG_KEYPAD != SANSA_M200_PAD) /* not enough buttons */ \
#if (CONFIG_KEYPAD != SANSA_M200_PAD) /* not enough buttons */ \
&& (CONFIG_KEYPAD != HM60X_PAD) /* not enough buttons */ \
&& (LCD_PIXELFORMAT != HORIZONTAL_PACKING) /* TODO */ \
&& (LCD_PIXELFORMAT != VERTICAL_INTERLEAVED) /* TODO */ \
@ -48,11 +47,7 @@ imageviewer
sudoku
reversi
goban
/* setjmp/longjmp are not implemented on sh */
#if (CONFIG_CPU != SH7034)
frotz
#endif
#ifndef OLYMPUS_MROBE_500
#if PLUGIN_BUFFER_SIZE > 0x40000 || PLUGIN_BUFFER_SIZE <= 0x20000 /* overlay */

File diff suppressed because it is too large Load diff

View file

@ -30,41 +30,12 @@
#define EV_EXIT 1337
/* seems to work with 1300, but who knows... */
/* seems to work with 1300, but who knows... */
#define THREAD_STACK_SIZE DEFAULT_STACK_SIZE + 0x200
#if CONFIG_KEYPAD == RECORDER_PAD
#define BATTERY_ON BUTTON_PLAY
#define BATTERY_OFF BUTTON_OFF
#define BATTERY_ON_TXT "PLAY - start"
#define BATTERY_OFF_TXT "OFF"
#if BUTTON_REMOTE != 0
#define BATTERY_RC_ON BUTTON_RC_PLAY
#define BATTERY_RC_OFF BUTTON_RC_STOP
#endif
#elif CONFIG_KEYPAD == ONDIO_PAD
#define BATTERY_ON BUTTON_RIGHT
#define BATTERY_OFF BUTTON_OFF
#define BATTERY_ON_TXT "RIGHT - start"
#define BATTERY_OFF_TXT "OFF"
#elif CONFIG_KEYPAD == PLAYER_PAD
#define BATTERY_ON BUTTON_PLAY
#define BATTERY_OFF BUTTON_STOP
#define BATTERY_ON_TXT "PLAY - start"
#define BATTERY_OFF_TXT "STOP"
#define BATTERY_RC_ON BUTTON_RC_PLAY
#define BATTERY_RC_OFF BUTTON_RC_STOP
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define BATTERY_ON BUTTON_ON
#define BATTERY_RC_ON BUTTON_RC_ON

View file

@ -28,19 +28,7 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define BTN_QUIT BUTTON_OFF
#define BTN_RIGHT BUTTON_RIGHT
#define BTN_UP BUTTON_UP
#define BTN_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == ONDIO_PAD
#define BTN_QUIT BUTTON_OFF
#define BTN_RIGHT BUTTON_RIGHT
#define BTN_UP BUTTON_UP
#define BTN_DOWN BUTTON_DOWN
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define BTN_QUIT BUTTON_OFF
#define BTN_RIGHT BUTTON_RIGHT
#define BTN_UP BUTTON_UP

View file

@ -42,37 +42,7 @@ enum {
BJ_END,
};
#if CONFIG_KEYPAD == RECORDER_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME "F1"
#define BJACK_QUIT_NAME "OFF"
#define BJACK_DOUBLE_NAME "F2"
#define BJACK_SELECT BUTTON_PLAY
#define BJACK_QUIT BUTTON_OFF
#define BJACK_MAX (BUTTON_ON|BUTTON_UP)
#define BJACK_MIN (BUTTON_ON|BUTTON_DOWN)
#define BJACK_STAY BUTTON_F1
#define BJACK_DOUBLEDOWN BUTTON_F2
#define BJACK_UP BUTTON_UP
#define BJACK_DOWN BUTTON_DOWN
#define BJACK_RIGHT BUTTON_RIGHT
#define BJACK_LEFT BUTTON_LEFT
#elif CONFIG_KEYPAD == ONDIO_PAD
#define BJACK_SELECT_NAME "MENU"
#define BJACK_STAY_NAME "RIGHT"
#define BJACK_QUIT_NAME "OFF"
#define BJACK_DOUBLE_NAME "UP"
#define BJACK_SELECT BUTTON_MENU
#define BJACK_QUIT BUTTON_OFF
#define BJACK_STAY BUTTON_RIGHT
#define BJACK_DOUBLEDOWN BUTTON_UP
#define BJACK_UP BUTTON_UP
#define BJACK_DOWN BUTTON_DOWN
#define BJACK_RIGHT BUTTON_RIGHT
#define BJACK_LEFT BUTTON_LEFT
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#if CONFIG_KEYPAD == IRIVER_H10_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME ">>|"
#define BJACK_QUIT_NAME "POWER"

View file

@ -61,23 +61,6 @@
#define DOWN BUTTON_DOWN
#define RC_QUIT BUTTON_RC_STOP
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CONTINUE_TEXT "MENU To Continue"
#define QUIT BUTTON_OFF
#define LEFT BUTTON_LEFT
#define RIGHT BUTTON_RIGHT
#define SELECT BUTTON_MENU
#define UP BUTTON_UP
#define DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == RECORDER_PAD
#define QUIT BUTTON_OFF
#define LEFT BUTTON_LEFT
#define RIGHT BUTTON_RIGHT
#define SELECT BUTTON_PLAY
#define UP BUTTON_UP
#define DOWN BUTTON_DOWN
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
(CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
@ -1461,9 +1444,7 @@ static int brickmania_help(void)
"< & >:",
#endif
"Moves", "the", "paddle", "",
#if CONFIG_KEYPAD == ONDIO_PAD
"MENU:",
#elif (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IAUDIO_M3_PAD)
#if (CONFIG_KEYPAD == IAUDIO_M3_PAD)
"PLAY:",
#elif CONFIG_KEYPAD == IRIVER_H300_PAD
"NAVI:",
@ -1484,9 +1465,7 @@ static int brickmania_help(void)
(CONFIG_KEYPAD == SANSA_FUZE_PAD)
"MENU:",
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD) || \
(CONFIG_KEYPAD == ONDIO_PAD) || \
(CONFIG_KEYPAD == RECORDER_PAD)
(CONFIG_KEYPAD == IRIVER_H300_PAD)
"STOP:",
#else
"POWER:",

View file

@ -84,7 +84,6 @@ enum {
/* these are better off shooting with up */
#if (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) \
|| (CONFIG_KEYPAD == SAMSUNG_YH92X_PAD) \
|| (CONFIG_KEYPAD == ONDIO_PAD) \
|| (CONFIG_KEYPAD == IRIVER_H10_PAD)
#define SHOOT_WITH_UP
#endif

View file

@ -110,29 +110,8 @@ F3: equal to "="
#endif
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define CALCULATOR_LEFT BUTTON_LEFT
#define CALCULATOR_RIGHT BUTTON_RIGHT
#define CALCULATOR_UP BUTTON_UP
#define CALCULATOR_DOWN BUTTON_DOWN
#define CALCULATOR_QUIT BUTTON_OFF
#define CALCULATOR_INPUT BUTTON_PLAY
#define CALCULATOR_CALC BUTTON_F3
#define CALCULATOR_OPERATORS BUTTON_F2
#define CALCULATOR_CLEAR BUTTON_F1
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CALCULATOR_LEFT BUTTON_LEFT
#define CALCULATOR_RIGHT BUTTON_RIGHT
#define CALCULATOR_UP BUTTON_UP
#define CALCULATOR_DOWN BUTTON_DOWN
#define CALCULATOR_QUIT BUTTON_OFF
#define CALCULATOR_INPUT_CALC_PRE BUTTON_MENU
#define CALCULATOR_INPUT (BUTTON_MENU | BUTTON_REL)
#define CALCULATOR_CALC (BUTTON_MENU | BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CALCULATOR_LEFT BUTTON_LEFT
#define CALCULATOR_RIGHT BUTTON_RIGHT
#define CALCULATOR_UP BUTTON_UP

View file

@ -25,30 +25,8 @@
#include "lib/playback_control.h"
#include "lib/configfile.h"
#if CONFIG_KEYPAD == RECORDER_PAD
#define CALENDAR_QUIT BUTTON_OFF
#define CALENDAR_SELECT BUTTON_PLAY
#define CALENDAR_NEXT_WEEK BUTTON_DOWN
#define CALENDAR_PREV_WEEK BUTTON_UP
#define CALENDAR_NEXT_DAY BUTTON_RIGHT
#define CALENDAR_PREV_DAY BUTTON_LEFT
#define CALENDAR_NEXT_MONTH (BUTTON_ON|BUTTON_DOWN)
#define CALENDAR_PREV_MONTH (BUTTON_ON|BUTTON_UP)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CALENDAR_QUIT BUTTON_OFF
#define CALENDAR_SELECT (BUTTON_MENU|BUTTON_REL)
#define CALENDAR_NEXT_WEEK BUTTON_DOWN
#define CALENDAR_PREV_WEEK BUTTON_UP
#define CALENDAR_NEXT_DAY BUTTON_RIGHT
#define CALENDAR_PREV_DAY BUTTON_LEFT
#define CALENDAR_NEXT_MONTH (BUTTON_MENU|BUTTON_DOWN)
#define CALENDAR_PREV_MONTH (BUTTON_MENU|BUTTON_UP)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CALENDAR_QUIT BUTTON_OFF
#define CALENDAR_SELECT BUTTON_SELECT
#define CALENDAR_NEXT_WEEK BUTTON_DOWN

View file

@ -84,38 +84,6 @@
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == RECORDER_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_RESTART BUTTON_F3
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CB_SELECT_PRE BUTTON_MENU
#define CB_SELECT (BUTTON_MENU|BUTTON_REL)
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY_PRE BUTTON_MENU
#define CB_PLAY (BUTTON_MENU|BUTTON_REPEAT)
#define CB_LEVEL (BUTTON_MENU|BUTTON_OFF)
#define CB_RESTART (BUTTON_MENU|BUTTON_LEFT)
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP

View file

@ -24,40 +24,7 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define CHC_QUIT BUTTON_OFF
#define CHC_STARTSTOP BUTTON_PLAY
#define CHC_RESET BUTTON_LEFT
#define CHC_MENU BUTTON_F1
#define CHC_SETTINGS_INC BUTTON_UP
#define CHC_SETTINGS_DEC BUTTON_DOWN
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_OK2 BUTTON_LEFT
#define CHC_SETTINGS_CANCEL BUTTON_OFF
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CHC_QUIT BUTTON_OFF
#define CHC_STARTSTOP BUTTON_RIGHT
#define CHC_RESET BUTTON_LEFT
#define CHC_MENU BUTTON_MENU
#define CHC_SETTINGS_INC BUTTON_UP
#define CHC_SETTINGS_DEC BUTTON_DOWN
#define CHC_SETTINGS_OK BUTTON_RIGHT
#define CHC_SETTINGS_OK2 BUTTON_LEFT
#define CHC_SETTINGS_CANCEL BUTTON_MENU
#elif CONFIG_KEYPAD == PLAYER_PAD
#define CHC_QUIT BUTTON_ON
#define CHC_STARTSTOP BUTTON_PLAY
#define CHC_RESET BUTTON_STOP
#define CHC_MENU BUTTON_MENU
#define CHC_SETTINGS_INC BUTTON_RIGHT
#define CHC_SETTINGS_DEC BUTTON_LEFT
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANCEL BUTTON_STOP
#define CHC_SETTINGS_CANCEL2 BUTTON_MENU
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CHC_QUIT BUTTON_SELECT
#define CHC_STARTSTOP BUTTON_ON

View file

@ -944,28 +944,8 @@ STATIC void chip8 (void)
#endif
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD /* only 9 out of 16 chip8 buttons */
#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY1 BUTTON_F1
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY3 BUTTON_F3
#define CHIP8_KEY4 BUTTON_LEFT
#define CHIP8_KEY5 BUTTON_PLAY
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY7 BUTTON_F2
#define CHIP8_KEY8 BUTTON_DOWN
#define CHIP8_KEY9 BUTTON_ON
#elif CONFIG_KEYPAD == ONDIO_PAD /* even more limited */
#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY4 BUTTON_LEFT
#define CHIP8_KEY5 BUTTON_MENU
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_DOWN
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY4 BUTTON_LEFT

View file

@ -86,17 +86,6 @@ Still To do:
#define ACTION BUTTON_SELECT
#define ACTIONTEXT "SELECT"
#elif CONFIG_KEYPAD == RECORDER_PAD
#define QUIT BUTTON_OFF
#define ACTION BUTTON_PLAY
#define ACTIONTEXT "PLAY"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define QUIT BUTTON_OFF
#define ACTION BUTTON_UP
#define ACTION2 BUTTON_MENU
#define ACTIONTEXT "UP"
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD \
|| CONFIG_KEYPAD == SAMSUNG_YPR0_PAD
#define QUIT BUTTON_BACK

View file

@ -132,11 +132,8 @@ static int update_rowpos(int action, int cur_pos, int rows_per_screen, int tot_r
static void roll_credits(void)
{
/* to do: use target defines iso keypads to set animation timings */
#if (CONFIG_KEYPAD == RECORDER_PAD)
#define PAUSE_TIME 1.2
#define ANIM_SPEED 35
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define PAUSE_TIME 0
#define ANIM_SPEED 100
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)

View file

@ -37,39 +37,7 @@
#define DISP_TIME 30
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define CUBE_QUIT BUTTON_OFF
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_F1
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_ON
#elif CONFIG_KEYPAD == PLAYER_PAD
#define CUBE_QUIT BUTTON_STOP
#define CUBE_INC BUTTON_RIGHT
#define CUBE_DEC BUTTON_LEFT
#define CUBE_NEXT (BUTTON_ON | BUTTON_RIGHT)
#define CUBE_PREV (BUTTON_ON | BUTTON_LEFT)
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED_PRE BUTTON_ON
#define CUBE_HIGHSPEED (BUTTON_ON | BUTTON_REL)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CUBE_QUIT BUTTON_OFF
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE_PRE BUTTON_MENU
#define CUBE_MODE (BUTTON_MENU | BUTTON_REL)
#define CUBE_PAUSE (BUTTON_MENU | BUTTON_LEFT)
#define CUBE_HIGHSPEED (BUTTON_MENU | BUTTON_RIGHT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CUBE_QUIT BUTTON_OFF
#define CUBE_NEXT BUTTON_RIGHT

View file

@ -1,599 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2003 Pierre Delore
*
* 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 "plugin.h"
#include "lib/configfile.h"
#include "lib/pluginlib_exit.h"
/* Euro converter for the player */
/*
Use:
+ : Digit +1
- : Digit -1
PLAY : Next digit
STOP : Prev digit
ON : RESET
ON+PLAY : Swap Euro<>Home
MENU : Display the Menu
Currency -> Allows to choose the currency
Exit-> Exit the plugin
Notes:
I don't use float.
I use signed long long (64 bits).
A value have 5 digits after the . (123.45 = 12345000)
To do:
- The Irish currency needs 6 digits after the . to have sufficient precision on big number
*/
/* Name and path of the config file*/
static const char cfg_filename[] = "euroconverter.cfg";
#define CFGFILE_VERSION 0 /* Current config file version */
#define CFGFILE_MINVERSION 0 /* Minimum config file version to accept */
/* typedef for simplifying usage of long long type */
typedef long long int longlong_t;
/*Pattern for the converter*/
static unsigned char pattern_euro[]={0x07, 0x08, 0x1E, 0x10, 0x1E, 0x08, 0x07}; /* € */
static unsigned char pattern_home[]={0x04, 0x0A, 0x11, 0x1F, 0x11, 0x11, 0x1F}; /* Home icon*/
/* 1 euro = ... (remenber 5 digits after the .)*/
static int currency[12]={
655957, /*FRF France*/
195583, /*DEM Germany*/
1376030, /*ATS Austria*/
4033990, /*BEF Belgium*/
16638600, /*ESP Spain*/
594573, /*FIM Finland*/
78756, /*IEP Ireland*/
193627000, /*ITL Italy*/
4033990, /*LUF Luxemburg*/
220371, /*NLG Netherlands*/
20048200, /*PTE Portugal*/
34075100, /*GRD Greece*/
};
/* Number of digit of the currency (for the display) */
static int nb_digit[12]={
2, /*FRF France*/
2, /*DEM Germany*/
2, /*ATS Austria*/
2, /*BEF Belgium*/
0, /*ESP Spain*/
2, /*FIM Finland*/
2, /*IEP Ireland*/
0, /*ITL Italy*/
2, /*LUF Luxemburg*/
2, /*NLG Netherlands*/
0, /*PTE Portugal*/
0 /*GRD Greece*/
};
/* max euro to have home currency */
static longlong_t max_euro[12]={
99999999000LL, /*FRF France 999 999.99 */
99999999000LL, /*DEM Germany 999 999.99 */
99999999000LL, /*ATS Austria 999 999.99 */
99999999000LL, /*BEF Belgium 999 999.99 */
99999999000LL, /*ESP Spain 99 999 999 */
99999999000LL, /*FIM Finland 999 999.99 */
99999999000LL, /*IEP Ireland 999 999.99 */
51645690000LL, /*ITL Italy 999 999 999 */
99999999000LL, /*LUF Luxemburg 999 999.99 */
99999999000LL, /*NLG Netherlands 999 999.99 */
99999999000LL, /*PTE Portugal 99 999 999 */
29347028000LL /*GRD Greece 99 999 999 */
};
/* max home to have euro currency */
/* 92233720300000 Limitation due to the max capacity of long long (2^63)*/
static longlong_t max_curr[12]={
99999999000LL, /*FRF France 152449.02 */
99999999000LL, /*DEM Germany 511291.88 */
99999999000LL, /*ATS Austria 72672.83 */
99999999000LL, /*BEF Belgium 24789.35 */
92233720300000LL,/*ESP Spain 5543358.23 */
99999999000LL, /*FIM Finland 168187.92 */
9999999900LL, /*IEP Ireland 1269744.51 exact value=1269738.07 */
92233720300000LL,/*ITL Italy 476347.41 */
99999999000LL, /*LUF Luxemburg 24789.35 */
99999999000LL, /*NLG Netherlands 453780.21 */
92233720300000LL,/*PTE Portugal 4600598.57 */
92233720300000LL /*GRD Greece 2706777.69 */
};
static unsigned char *abbrev_str[12] = {
"...FRF...", /*France*/
"...DEM...", /*Germany*/
"...ATS...", /*Austria*/
"...BEF...", /*Belgium*/
"...ESP...", /*Spain*/
"...FIM...", /*Finland*/
"...IEP...", /*Ireland*/
"...ITL...", /*Italy*/
"...LUF...", /*Luxemburg*/
"...NLG...", /*Netherlands*/
"...PTE...", /*Portugal*/
"...GRD..." /*Greece*/
};
static unsigned long heuro,hhome; /*Handles for the new patterns*/
static char *currency_str[12] = {
"France",
"Germany",
"Austria",
"Belgium",
"Spain",
"Finland",
"Ireland",
"Italy",
"Luxemburg",
"Netherlands",
"Portugal",
"Greece"
};
static int country; /*Country selected*/
static int cur_pos; /*Cursor position*/
static longlong_t inc;
/* Persistent settings */
static struct configdata config[] = {
{ TYPE_ENUM, 0, 12, { .int_p = &country }, "country", currency_str }
};
/* 64bits*64 bits with 5 digits after the . */
static longlong_t mymul(longlong_t a, longlong_t b)
{
return((a*b)/100000LL);
}
/* 64bits/64 bits with 5 digits after the . */
static longlong_t mydiv(longlong_t a, longlong_t b)
{
return((a*100000LL)/b);
}
/* 123.45=12345000 split => i=123 f=45000*/
static void split(longlong_t v, longlong_t* i, longlong_t* f)
{
longlong_t t;
t=v/100000LL;
(*i)=t;
(*f)=(v-(t*100000LL));
}
/* result=10^n */
static longlong_t pow10(int n)
{
int i;
longlong_t r;
r=1;
for (i=0;i<n;i++)
r=r*10LL;
return(r);
}
/* round the i.f at n digit after the . */
static void round(longlong_t* i, longlong_t* f, int n)
{
longlong_t m;
int add=0;
m=(int)pow10(5-n-1);
if (((*f)/m)%10>=5)
add=1;
if (n>0)
{
(*f)=((*f)/(int)pow10(5-n))+add;
if ((*f)==100LL)
{
(*i)+=1;
(*f)=0;
}
}
else
{
(*i)+=add;
(*f)=0;
}
}
/* Display the imput and the result
pos: false : first line
: true : second line
*/
static void display(longlong_t euro, longlong_t home, bool pos)
{
longlong_t i,f;
unsigned char str[20];
unsigned char s1[20];
unsigned char s2[20];
if (pos)
{ /*Edit the second line*/
rb->strcpy(s1," %6d.%02d");
if (nb_digit[country]==2)
rb->strcpy(s2,"\xee\x84\x90%06d.%02d");
else
rb->strcpy(s2,"\xee\x84\x90%09d");
}
else
{
rb->strcpy(s1,"\xee\x84\x90%06d.%02d");
if (nb_digit[country]==2)
rb->strcpy(s2," %6d.%02d");
else
rb->strcpy(s2," %9d");
}
rb->lcd_remove_cursor();
/*First line*/
rb->lcd_putc(0,0,heuro);
split(euro,&i,&f);
if (pos)
round(&i,&f,2);
rb->snprintf(str,sizeof(str),s1,(int)i,(int)f);
if (!pos)
{
rb->lcd_puts(1,0,str);
rb->lcd_put_cursor(10-cur_pos,0,0x5F);
}
else
rb->lcd_puts_scroll(1,0,str);
/*Second line*/
rb->lcd_putc(0,1,hhome);
split(home,&i,&f);
if (!pos)
round(&i,&f,nb_digit[country]);
rb->snprintf(str,sizeof(str),s2,(int)i,(int)f);
if (pos)
{
rb->lcd_puts(1,1,str);
rb->lcd_put_cursor(10-cur_pos,1,0x5F);
}
else
rb->lcd_puts_scroll(1,1,str);
rb->lcd_update();
}
/* Show country Abbreviation */
static void show_abbrev(void)
{
rb->splash(HZ*3/4,abbrev_str[country]);
}
/* Save the config to disk */
static void save_config(void)
{
configfile_save(cfg_filename, config, 1, CFGFILE_VERSION);
}
/* Load the config from disk */
static void load_config(void)
{
configfile_load(cfg_filename, config, 1, CFGFILE_MINVERSION);
}
/*Currency choice*/
static void currency_menu(void)
{
int c=country;
rb->lcd_clear_display();
while (true)
{
rb->lcd_puts(0,0,"Currency:");
rb->lcd_puts(0,1,currency_str[c]);
rb->lcd_update();
switch (rb->button_get(true))
{
case BUTTON_RIGHT|BUTTON_REL:
c++;
if (c>11)
c=0;
break;
case BUTTON_LEFT|BUTTON_REL:
c--;
if (c<0)
c=11;
break;
case BUTTON_PLAY|BUTTON_REL:
country=c;
save_config();
return;
break;
case BUTTON_STOP|BUTTON_REL:
return;
}
}
}
/* Display the choice menu. */
static int euro_menu(void)
{
int c=0;
while (true)
{
rb->lcd_clear_display();
rb->lcd_puts(0,0," Currency");
rb->lcd_puts(0,1," Exit");
rb->lcd_putc(0,c,0xe110);
rb->lcd_update();
switch (rb->button_get(true))
{
case BUTTON_RIGHT|BUTTON_REL:
c=1;
break;
case BUTTON_LEFT|BUTTON_REL:
c=0;
break;
case BUTTON_PLAY|BUTTON_REL:
if (c==0)
currency_menu();
else
return 1;
break;
case BUTTON_STOP|BUTTON_REL:
return 0;
}
}
}
/* Call when the program end */
static void euro_exit(void)
{
//Restore the old pattern (i don't find another way to do this. An idea?)
rb->lcd_unlock_pattern(heuro);
rb->lcd_unlock_pattern(hhome);
//Clear the screen
rb->lcd_clear_display();
rb->lcd_update();
}
/* this is the plugin entry point */
enum plugin_status plugin_start(const void* parameter)
{
bool end, pos;
longlong_t e,h,old_e,old_h;
int button;
/* if you don't use the parameter, you can do like
this to avoid the compiler warning about it */
(void)parameter;
atexit(euro_exit);
/*Get the pattern handle*/
heuro=rb->lcd_get_locked_pattern();
hhome=rb->lcd_get_locked_pattern();
rb->lcd_define_pattern(heuro, pattern_euro);
rb->lcd_define_pattern(hhome, pattern_home);
h=0;
e=0;
end=false;
pos=false;
country=0;
cur_pos=3;
inc=100000;
load_config();
/*Empty the event queue*/
rb->button_clear_queue();
display(e,h,false);
show_abbrev();
display(e,h,false);
/*Main loop*/
while(end!=true)
{
button = rb->button_get(true);
switch (button)
{
case BUTTON_MENU|BUTTON_REL:
switch (euro_menu())
{
case 1:
end=true;
break;
}
if (!pos)
{
if (e>max_euro[country])
e=0;
cur_pos=3;
}
else
{
if (h>max_curr[country])
h=0;
if (nb_digit[country]==2)
cur_pos=3;
else
cur_pos=0;
}
display(e,h,pos);
break;
case BUTTON_ON | BUTTON_PLAY:
pos=!pos;
case BUTTON_ON | BUTTON_REL:
e=0;
h=0;
if (!pos)
{
cur_pos=3;
inc=100000;
}
else
{
inc=100000;
if (nb_digit[country]==2)
cur_pos=3;
else
cur_pos=0;
}
show_abbrev();
break;
case BUTTON_STOP|BUTTON_REL:
cur_pos--;
if (!pos)
{
if (cur_pos<0)
cur_pos=0;
if (cur_pos==2)
cur_pos=1;
if (cur_pos>2)
inc=pow10(3+cur_pos-1);
else
inc=pow10(3+cur_pos);
}
else
{
if (cur_pos<0)
cur_pos=0;
if (nb_digit[country]==2)
{
if (cur_pos==2)
cur_pos=1;
if (cur_pos>2)
inc=pow10(3+cur_pos-1);
else
inc=pow10(3+cur_pos);
}
else
inc=pow10(5+cur_pos);
}
break;
case BUTTON_PLAY|BUTTON_REL:
cur_pos++;
if (!pos)
{
if (cur_pos>8)
cur_pos=8;
if (cur_pos==2)
cur_pos=3;
if (cur_pos>2)
inc=pow10(3+cur_pos-1);
else
inc=pow10(3+cur_pos);
}
else
{
if (cur_pos>8)
cur_pos=8;
if (nb_digit[country]==2)
{
if (cur_pos==2)
cur_pos=3;
if (cur_pos>2)
inc=pow10(3+cur_pos-1);
else
inc=pow10(3+cur_pos);
}
else
inc=pow10(5+cur_pos);
}
break;
case BUTTON_LEFT|BUTTON_REL:
case BUTTON_LEFT|BUTTON_REPEAT:
if (!pos)
{
e-=inc;
if (e<0)
e=0;
}
else
{
h-=inc;
if (h<0)
h=0;
}
break;
case BUTTON_RIGHT|BUTTON_REL:
case BUTTON_RIGHT|BUTTON_REPEAT:
old_e=e;
old_h=h;
if (!pos)
{
e+=inc;
if (e>max_euro[country])
e=old_e;
}
else
{
h+=inc;
if (h>max_curr[country])
h=old_h;
}
break;
default:
exit_on_usb(button);
break;
}
/*Display*/
if (!pos) /*Euro>home*/
h=mymul(e,currency[country]);
else /*Home>euro*/
e=mydiv(h,currency[country]);
display(e,h,pos);
}
return PLUGIN_OK;
}

File diff suppressed because it is too large Load diff

View file

@ -23,42 +23,7 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define FLIPIT_LEFT BUTTON_LEFT
#define FLIPIT_RIGHT BUTTON_RIGHT
#define FLIPIT_UP BUTTON_UP
#define FLIPIT_DOWN BUTTON_DOWN
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE BUTTON_F1
#define FLIPIT_SOLVE BUTTON_F2
#define FLIPIT_STEP_BY_STEP BUTTON_F3
#define FLIPIT_TOGGLE BUTTON_PLAY
#elif CONFIG_KEYPAD == PLAYER_PAD
#define FLIPIT_LEFT BUTTON_LEFT
#define FLIPIT_RIGHT BUTTON_RIGHT
#define FLIPIT_UP_PRE BUTTON_ON
#define FLIPIT_UP (BUTTON_ON | BUTTON_REL)
#define FLIPIT_DOWN BUTTON_MENU
#define FLIPIT_QUIT BUTTON_STOP
#define FLIPIT_SHUFFLE (BUTTON_ON | BUTTON_LEFT)
#define FLIPIT_SOLVE (BUTTON_ON | BUTTON_RIGHT)
#define FLIPIT_STEP_BY_STEP (BUTTON_ON | BUTTON_PLAY)
#define FLIPIT_TOGGLE BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
#define FLIPIT_LEFT BUTTON_LEFT
#define FLIPIT_RIGHT BUTTON_RIGHT
#define FLIPIT_UP BUTTON_UP
#define FLIPIT_DOWN BUTTON_DOWN
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE (BUTTON_MENU | BUTTON_LEFT)
#define FLIPIT_SOLVE (BUTTON_MENU | BUTTON_UP)
#define FLIPIT_STEP_BY_STEP (BUTTON_MENU | BUTTON_RIGHT)
#define FLIPIT_TOGGLE_PRE BUTTON_MENU
#define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define FLIPIT_LEFT BUTTON_LEFT
#define FLIPIT_RIGHT BUTTON_RIGHT
@ -937,20 +902,8 @@ enum plugin_status plugin_start(const void* parameter)
/* print instructions */
rb->lcd_clear_display();
rb->lcd_setfont(FONT_SYSFIXED);
#if CONFIG_KEYPAD == RECORDER_PAD
rb->lcd_putsxy(2, 8, "[OFF] to stop");
rb->lcd_putsxy(2, 18, "[PLAY] toggle");
rb->lcd_putsxy(2, 28, "[F1] shuffle");
rb->lcd_putsxy(2, 38, "[F2] solution");
rb->lcd_putsxy(2, 48, "[F3] step by step");
#elif CONFIG_KEYPAD == ONDIO_PAD
rb->lcd_putsxy(2, 8, "[OFF] to stop");
rb->lcd_putsxy(2, 18, "[MODE] toggle");
rb->lcd_putsxy(2, 28, "[M-LEFT] shuffle");
rb->lcd_putsxy(2, 38, "[M-UP] solution");
rb->lcd_putsxy(2, 48, "[M-RIGHT] step by step");
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
rb->lcd_putsxy(2, 8, "[STOP] to stop");
rb->lcd_putsxy(2, 18, "[SELECT] toggle");
rb->lcd_putsxy(2, 28, "[MODE] shuffle");

View file

@ -1,96 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2009 Tomer Shalev
*
* 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.
*
****************************************************************************/
#ifndef _CPU_SH7043_H
#define _CPU_SH7043_H
inline static short muls16_asr10(short a, short b)
{
short r;
asm (
"muls %[a],%[b] \n"
"sts macl,%[r] \n"
"shlr8 %[r] \n"
"shlr2 %[r] \n"
: /* outputs */
[r]"=r"(r)
: /* inputs */
[a]"r"(a),
[b]"r"(b)
);
return r;
}
inline static long muls32_asr26(long a, long b)
{
long r, t1, t2, t3;
asm (
/* Signed 32bit * 32bit -> 64bit multiplication.
Notation: xxab * xxcd, where each letter represents 16 bits.
xx is the 64 bit sign extension. */
"swap.w %[a],%[t1] \n" /* t1 = ba */
"mulu %[t1],%[b] \n" /* a * d */
"swap.w %[b],%[t3] \n" /* t3 = dc */
"sts macl,%[t2] \n" /* t2 = a * d */
"mulu %[t1],%[t3] \n" /* a * c */
"sts macl,%[r] \n" /* hi = a * c */
"mulu %[a],%[t3] \n" /* b * c */
"clrt \n"
"sts macl,%[t3] \n" /* t3 = b * c */
"addc %[t2],%[t3] \n" /* t3 += t2, carry -> t2 */
"movt %[t2] \n"
"mulu %[a],%[b] \n" /* b * d */
"mov %[t3],%[t1] \n" /* t1t3 = t2t3 << 16 */
"xtrct %[t2],%[t1] \n"
"shll16 %[t3] \n"
"sts macl,%[t2] \n" /* lo = b * d */
"clrt \n" /* hi.lo += t1t3 */
"addc %[t3],%[t2] \n"
"addc %[t1],%[r] \n"
"cmp/pz %[a] \n" /* ab >= 0 ? */
"bt 1f \n"
"sub %[b],%[r] \n" /* no: hi -= cd (sign extension of ab is -1) */
"1: \n"
"cmp/pz %[b] \n" /* cd >= 0 ? */
"bt 2f \n"
"sub %[a],%[r] \n" /* no: hi -= ab (sign extension of cd is -1) */
"2: \n"
/* Shift right by 26 and return low 32 bits */
"shll2 %[r] \n" /* hi <<= 6 */
"shll2 %[r] \n"
"shll2 %[r] \n"
"shlr16 %[t2] \n" /* (unsigned)lo >>= 26 */
"shlr8 %[t2] \n"
"shlr2 %[t2] \n"
"or %[t2],%[r] \n" /* combine result */
: /* outputs */
[r] "=&r"(r),
[t1]"=&r"(t1),
[t2]"=&r"(t2),
[t3]"=&r"(t3)
: /* inputs */
[a] "r" (a),
[b] "r" (b)
);
return r;
}
#endif

View file

@ -22,33 +22,7 @@
#define _FRACTAL_H
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define FRACTAL_QUIT BUTTON_OFF
#define FRACTAL_UP BUTTON_UP
#define FRACTAL_DOWN BUTTON_DOWN
#define FRACTAL_LEFT BUTTON_LEFT
#define FRACTAL_RIGHT BUTTON_RIGHT
#define FRACTAL_ZOOM_IN BUTTON_PLAY
#define FRACTAL_ZOOM_OUT BUTTON_ON
#define FRACTAL_PRECISION_INC BUTTON_F2
#define FRACTAL_PRECISION_DEC BUTTON_F1
#define FRACTAL_RESET BUTTON_F3
#elif CONFIG_KEYPAD == ONDIO_PAD
#define FRACTAL_QUIT BUTTON_OFF
#define FRACTAL_UP BUTTON_UP
#define FRACTAL_DOWN BUTTON_DOWN
#define FRACTAL_LEFT BUTTON_LEFT
#define FRACTAL_RIGHT BUTTON_RIGHT
#define FRACTAL_ZOOM_IN_PRE BUTTON_MENU
#define FRACTAL_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
#define FRACTAL_ZOOM_IN2 (BUTTON_MENU | BUTTON_UP)
#define FRACTAL_ZOOM_OUT (BUTTON_MENU | BUTTON_DOWN)
#define FRACTAL_PRECISION_INC (BUTTON_MENU | BUTTON_RIGHT)
#define FRACTAL_PRECISION_DEC (BUTTON_MENU | BUTTON_LEFT)
#define FRACTAL_RESET (BUTTON_MENU | BUTTON_OFF)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define FRACTAL_QUIT BUTTON_OFF
#define FRACTAL_UP BUTTON_UP

View file

@ -24,18 +24,13 @@
#include "fractal_sets.h"
/* CPU stuff */
#if CONFIG_CPU == SH7034
#include "cpu_sh7043.h"
#elif defined CPU_COLDFIRE
#if defined CPU_COLDFIRE
#include "cpu_coldfire.h"
#elif defined CPU_ARM
#include "cpu_arm.h"
#endif
#if CONFIG_CPU == SH7034
#define MULS16_ASR10(a, b) muls16_asr10(a, b)
#define MULS32_ASR26(a, b) muls32_asr26(a, b)
#elif defined CPU_COLDFIRE
#if defined CPU_COLDFIRE
/* Needs the EMAC initialised to fractional mode w/o rounding and saturation */
#define MULS32_INIT() coldfire_set_macsr(EMAC_FRACTIONAL)
#define MULS16_ASR10(a, b) muls16_asr10(a, b)

View file

@ -297,27 +297,6 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
/* no next var */
#elif (CONFIG_KEYPAD == RECORDER_PAD)
#define GBN_BUTTON_UP BUTTON_UP
#define GBN_BUTTON_DOWN BUTTON_DOWN
#define GBN_BUTTON_LEFT BUTTON_LEFT
#define GBN_BUTTON_RIGHT BUTTON_RIGHT
#define GBN_BUTTON_RETREAT BUTTON_F1
#define GBN_BUTTON_ADVANCE BUTTON_F3
#define GBN_BUTTON_MENU BUTTON_F2
#define GBN_BUTTON_PLAY BUTTON_PLAY | BUTTON_REL
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_ON
#elif (CONFIG_KEYPAD == ONDIO_PAD)
#define GBN_BUTTON_UP BUTTON_UP
#define GBN_BUTTON_DOWN BUTTON_DOWN
#define GBN_BUTTON_LEFT BUTTON_LEFT
#define GBN_BUTTON_RIGHT BUTTON_RIGHT
#define GBN_BUTTON_MENU BUTTON_MENU | BUTTON_REPEAT
#define GBN_BUTTON_PLAY BUTTON_MENU | BUTTON_REL
#define GBN_BUTTON_NAV_MODE BUTTON_OFF
#elif (CONFIG_KEYPAD == SAMSUNG_YH92X_PAD)
#define GBN_BUTTON_UP BUTTON_UP
#define GBN_BUTTON_DOWN BUTTON_DOWN

View file

@ -16,15 +16,8 @@ GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC))
OTHER_SRC += $(GOBAN_SRC)
ifndef APP_TYPE
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
### lowmem targets
ROCKS += $(GOBAN_BUILDDIR)/goban.ovl
GOBAN_OUTLDS = $(GOBAN_BUILDDIR)/goban.link
GOBAN_OVLFLAGS = -T$(GOBAN_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
else
### all other targets
### all targets
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
endif
else
### simulator
ROCKS += $(GOBAN_BUILDDIR)/goban.rock

View file

@ -30,23 +30,7 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define GREYSCALE_SHIFT BUTTON_ON
#define GREYSCALE_UP BUTTON_UP
#define GREYSCALE_DOWN BUTTON_DOWN
#define GREYSCALE_LEFT BUTTON_LEFT
#define GREYSCALE_RIGHT BUTTON_RIGHT
#define GREYSCALE_OFF BUTTON_OFF
#elif CONFIG_KEYPAD == ONDIO_PAD
#define GREYSCALE_SHIFT BUTTON_MENU
#define GREYSCALE_UP BUTTON_UP
#define GREYSCALE_DOWN BUTTON_DOWN
#define GREYSCALE_LEFT BUTTON_LEFT
#define GREYSCALE_RIGHT BUTTON_RIGHT
#define GREYSCALE_OFF BUTTON_OFF
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#if CONFIG_KEYPAD == IRIVER_H100_PAD
#define GREYSCALE_SHIFT BUTTON_ON
#define GREYSCALE_UP BUTTON_UP
#define GREYSCALE_DOWN BUTTON_DOWN

View file

@ -25,31 +25,8 @@
#include "plugin.h"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define IMGVIEW_ZOOM_IN BUTTON_PLAY
#define IMGVIEW_ZOOM_OUT BUTTON_ON
#define IMGVIEW_UP BUTTON_UP
#define IMGVIEW_DOWN BUTTON_DOWN
#define IMGVIEW_LEFT BUTTON_LEFT
#define IMGVIEW_RIGHT BUTTON_RIGHT
#define IMGVIEW_NEXT BUTTON_F3
#define IMGVIEW_PREVIOUS BUTTON_F2
#define IMGVIEW_MENU BUTTON_OFF
#elif CONFIG_KEYPAD == ONDIO_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_MENU
#define IMGVIEW_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
#define IMGVIEW_ZOOM_OUT (BUTTON_MENU | BUTTON_DOWN)
#define IMGVIEW_UP BUTTON_UP
#define IMGVIEW_DOWN BUTTON_DOWN
#define IMGVIEW_LEFT BUTTON_LEFT
#define IMGVIEW_RIGHT BUTTON_RIGHT
#define IMGVIEW_NEXT (BUTTON_MENU | BUTTON_RIGHT)
#define IMGVIEW_PREVIOUS (BUTTON_MENU | BUTTON_LEFT)
#define IMGVIEW_MENU BUTTON_OFF
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define IMGVIEW_ZOOM_IN BUTTON_SELECT
#define IMGVIEW_ZOOM_OUT BUTTON_MODE
#define IMGVIEW_UP BUTTON_UP

View file

@ -39,23 +39,7 @@
INLINE unsigned range_limit(int value)
{
#if CONFIG_CPU == SH7034
unsigned tmp;
asm ( /* Note: Uses knowledge that only low byte of result is used */
"mov #-128,%[t] \n"
"sub %[t],%[v] \n" /* value -= -128; equals value += 128; */
"extu.b %[v],%[t] \n"
"cmp/eq %[v],%[t] \n" /* low byte == whole number ? */
"bt 1f \n" /* yes: no overflow */
"cmp/pz %[v] \n" /* overflow: positive? */
"subc %[v],%[v] \n" /* %[r] now either 0 or 0xffffffff */
"1: \n"
: /* outputs */
[v]"+r"(value),
[t]"=&r"(tmp)
);
return value;
#elif defined(CPU_COLDFIRE)
#if defined(CPU_COLDFIRE)
asm ( /* Note: Uses knowledge that only the low byte of the result is used */
"add.l #128,%[v] \n" /* value += 128; */
"cmp.l #255,%[v] \n" /* overflow? */

View file

@ -28,27 +28,7 @@
#include "pluginbitmaps/jewels.h"
/* button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define JEWELS_UP BUTTON_UP
#define JEWELS_DOWN BUTTON_DOWN
#define JEWELS_LEFT BUTTON_LEFT
#define JEWELS_RIGHT BUTTON_RIGHT
#define JEWELS_SELECT BUTTON_PLAY
#define JEWELS_CANCEL BUTTON_OFF
#define HK_SELECT "PLAY"
#define HK_CANCEL "OFF"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define JEWELS_UP BUTTON_UP
#define JEWELS_DOWN BUTTON_DOWN
#define JEWELS_LEFT BUTTON_LEFT
#define JEWELS_RIGHT BUTTON_RIGHT
#define JEWELS_SELECT BUTTON_MENU
#define JEWELS_CANCEL BUTTON_OFF
#define HK_SELECT "MENU"
#define HK_CANCEL "OFF"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define JEWELS_UP BUTTON_UP
#define JEWELS_DOWN BUTTON_DOWN
#define JEWELS_LEFT BUTTON_LEFT

View file

@ -21,8 +21,6 @@ grey_scroll.c
#ifdef CPU_COLDFIRE
grey_coldfire.S
#elif CONFIG_CPU == SH7034
grey_sh.S
#endif
#endif /* HAVE_LCD_BITMAP && LCD_DEPTH < 4 */

View file

@ -36,35 +36,7 @@
#ifndef SIMULATOR
#if defined ARCHOS_RECORDER /* verified */ \
|| defined ARCHOS_FMRECORDER /* should be identical */ \
|| defined ARCHOS_RECORDERV2 /* should be identical */ \
|| defined ARCHOS_ONDIOFM /* verified */ \
|| defined ARCHOS_ONDIOSP /* verified */
/* Average measurements of a Recorder v1, an Ondio FM, a backlight-modded
* Ondio FM, and an Ondio SP. */
static const unsigned char lcdlinear[256] = {
5, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 29, 31, 33, 35,
37, 39, 40, 42, 43, 45, 46, 48, 49, 50, 51, 53, 54, 55, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 68, 69, 70, 71, 71, 72,
73, 74, 74, 75, 76, 77, 77, 78, 79, 79, 80, 80, 81, 81, 82, 82,
83, 84, 84, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 91, 91,
92, 92, 93, 93, 94, 94, 95, 95, 96, 96, 97, 98, 98, 99, 100, 100,
101, 101, 102, 103, 103, 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109,
110, 110, 111, 112, 112, 113, 114, 114, 115, 115, 116, 117, 117, 118, 119, 119,
120, 120, 121, 122, 123, 123, 124, 125, 126, 126, 127, 128, 129, 129, 130, 131,
132, 132, 133, 134, 135, 135, 136, 137, 138, 138, 139, 140, 140, 141, 141, 142,
143, 144, 145, 146, 147, 147, 148, 149, 150, 151, 152, 153, 154, 154, 155, 156,
157, 158, 159, 160, 161, 161, 162, 163, 164, 165, 166, 167, 168, 168, 169, 170,
171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 184, 185, 186, 187,
188, 189, 191, 192, 194, 195, 197, 198, 199, 200, 202, 203, 204, 205, 207, 208,
209, 210, 212, 213, 215, 216, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228,
229, 230, 232, 233, 234, 235, 237, 238, 239, 240, 242, 243, 244, 246, 247, 248
};
/* The actual LCD scanrate varies a lot with temperature on these targets */
#define LCD_SCANRATE 67 /* Hz */
#elif defined IAUDIO_M3 /* verified */
#if defined IAUDIO_M3 /* verified */
/* Average measurements of 2 iAudio remotes connected to an M3. */
static const unsigned char lcdlinear[256] = {
5, 9, 13, 17, 21, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66,

View file

@ -758,8 +758,7 @@ void grey_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
+ (~yc & _GREY_BMASK);
#endif /* LCD_PIXELFORMAT */
#if ((LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 1) && (CONFIG_CPU == SH7034)) \
|| ((LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 2) && defined(CPU_COLDFIRE)) \
#if ((LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 2) && defined(CPU_COLDFIRE)) \
|| ((LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) && defined(CPU_COLDFIRE))
_grey_line1(width, dst + idx, src, _grey_info.gvalue);
#else

View file

@ -1,137 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* New greyscale framework
* SH1 assembler routines
*
* This is a generic framework to display 129 shades of grey on low-depth
* bitmap LCDs (Archos b&w, Iriver & Ipod 4-grey) within plugins.
*
* Copyright (C) 2008 Jens Arnold
*
* 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 "config.h"
/* Plugins should not normally do this, but we need to check a macro, and
* plugin.h would confuse the assembler. */
.text
.global __grey_line1
.type __grey_line1, @function
#if (LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 1)
/****************************************************************************
* void _grey_line1(int width, r4
* unsigned char *dst, r5
* const unsigned char *src, r6
* const unsigned char *lut); r7
*/
__grey_line1:
mov #1, r0
tst r0, r6
bt .p1_h_end
mov.b @r6+, r0
extu.b r0, r0
mov.b @(r0, r7), r0
add #-1, r4
mov.b r0, @r5
add #8, r5
.p1_h_end:
mov #2, r0
cmp/hs r0, r4
bf .p2_t_end
tst r0, r6
bt .p2_h_end
mov.w @r6+, r1
extu.b r1, r0
mov.b @(r0, r7), r0
shlr8 r1
mov.b r0, @(8, r5)
extu.b r1, r0
mov.b @(r0, r7), r0
add #-2, r4
mov.b r0, @r5
add #16, r5
.p2_h_end:
add #-4, r4
cmp/pz r4
bf .p4_end
add r6, r4
.p4_loop:
mov.l @r6+, r1
swap.w r1, r2
extu.b r2, r0
mov.b @(r0, r7), r0
shlr8 r2
mov.b r0, @(8, r5)
extu.b r2, r0
mov.b @(r0, r7), r2
extu.b r1, r0
mov.b r2, @r5
add #16, r5
mov.b @(r0, r7), r0
shlr8 r1
mov.b r0, @(8, r5)
extu.b r1, r0
mov.b @(r0, r7), r0
cmp/hs r6, r4
mov.b r0, @r5
add #16, r5
bt .p4_loop
/* No need to correct the count, we're only testing bits from now on. */
.p4_end:
mov #2, r0
tst r0, r4
bt .p2_t_end
mov.w @r6+, r1
extu.b r1, r0
mov.b @(r0, r7), r0
shlr8 r1
mov.b r0, @(8, r5)
extu.b r1, r0
mov.b @(r0, r7), r0
mov.b r0, @r5
add #16, r5
.p2_t_end:
mov #1, r0
tst r0, r4
bt .p1_t_end
mov.b @r6+, r0
extu.b r0, r0
mov.b @(r0, r7), r0
rts
mov.b r0, @r5
.p1_t_end:
rts
nop
.size __grey_line1, . - __grey_line1
#endif

View file

@ -22,20 +22,6 @@
#include "plugin.h"
#include "helper.h"
#ifdef CPU_SH
/* Lookup table for using the BIT_N() macro in plugins */
const unsigned bit_n_table[32] = {
1LU<< 0, 1LU<< 1, 1LU<< 2, 1LU<< 3,
1LU<< 4, 1LU<< 5, 1LU<< 6, 1LU<< 7,
1LU<< 8, 1LU<< 9, 1LU<<10, 1LU<<11,
1LU<<12, 1LU<<13, 1LU<<14, 1LU<<15,
1LU<<16, 1LU<<17, 1LU<<18, 1LU<<19,
1LU<<20, 1LU<<21, 1LU<<22, 1LU<<23,
1LU<<24, 1LU<<25, 1LU<<26, 1LU<<27,
1LU<<28, 1LU<<29, 1LU<<30, 1LU<<31
};
#endif
/* Force the backlight on */
void backlight_force_on(void)
{

View file

@ -51,16 +51,6 @@ const struct button_mapping pla_remote_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == PLAYER_PAD) || \
(CONFIG_KEYPAD == RECORDER_PAD)
{ PLA_UP, BUTTON_RC_VOL_UP, BUTTON_NONE},
{ PLA_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
{ PLA_LEFT, BUTTON_RC_LEFT, BUTTON_NONE},
{ PLA_RIGHT, BUTTON_RC_RIGHT, BUTTON_NONE},
{ PLA_UP_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_DOWN_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_REMOTE_KEYPAD == MROBE_REMOTE)
{ PLA_UP, BUTTON_RC_PLAY, BUTTON_NONE},
{ PLA_DOWN, BUTTON_RC_DOWN, BUTTON_NONE},
@ -101,9 +91,7 @@ const struct button_mapping pla_main_ctx[] =
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
|| (CONFIG_KEYPAD == GIGABEAT_PAD) \
|| (CONFIG_KEYPAD == RECORDER_PAD) \
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
|| (CONFIG_KEYPAD == ONDIO_PAD) \
|| (CONFIG_KEYPAD == SANSA_C200_PAD) \
|| (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
|| (CONFIG_KEYPAD == MROBE100_PAD) \
@ -145,15 +133,6 @@ const struct button_mapping pla_main_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
#elif (CONFIG_KEYPAD == PLAYER_PAD)
{ PLA_UP, BUTTON_PLAY, BUTTON_NONE },
{ PLA_DOWN, BUTTON_STOP, BUTTON_NONE },
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ PLA_UP_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_DOWN_REPEAT, BUTTON_STOP|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
{ PLA_UP, BUTTON_SCROLL_UP, BUTTON_NONE },
{ PLA_DOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE },
@ -339,24 +318,6 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == RECORDER_PAD)
{PLA_CANCEL, BUTTON_ON, BUTTON_NONE},
{PLA_EXIT, BUTTON_OFF, BUTTON_NONE},
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == ONDIO_PAD)
{PLA_CANCEL, BUTTON_OFF|BUTTON_REL, BUTTON_OFF},
{PLA_EXIT, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE},
{PLA_SELECT, BUTTON_MENU, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_MENU},
{PLA_SELECT_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == PLAYER_PAD)
{PLA_CANCEL, BUTTON_MENU|BUTTON_REL, BUTTON_MENU},
{PLA_EXIT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
{PLA_SELECT, BUTTON_ON, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_ON|BUTTON_REL, BUTTON_ON},
{PLA_SELECT_REPEAT, BUTTON_ON|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
{PLA_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME},
{PLA_EXIT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE},

View file

@ -396,77 +396,7 @@ void xlcd_scroll_up(int count)
{
#if LCD_PIXELFORMAT == VERTICAL_PACKING
#if (CONFIG_CPU == SH7034) && (LCD_DEPTH == 1)
asm (
"mov #0,r4 \n" /* x = 0 */
"mova .su_shifttbl,r0 \n" /* calculate jump destination for */
"mov.b @(r0,%[cnt]),%[cnt] \n" /* shift amount from table */
"bra .su_cloop \n" /* skip table */
"add r0,%[cnt] \n"
".align 2 \n"
".su_shifttbl: \n" /* shift jump offset table */
".byte .su_shift0 - .su_shifttbl \n"
".byte .su_shift1 - .su_shifttbl \n"
".byte .su_shift2 - .su_shifttbl \n"
".byte .su_shift3 - .su_shifttbl \n"
".byte .su_shift4 - .su_shifttbl \n"
".byte .su_shift5 - .su_shifttbl \n"
".byte .su_shift6 - .su_shifttbl \n"
".byte .su_shift7 - .su_shifttbl \n"
".su_cloop: \n" /* repeat for every column */
"mov %[addr],r2 \n" /* get start address */
"mov #0,r3 \n" /* current_row = 0 */
"mov #0,r1 \n" /* fill with zero */
".su_iloop: \n" /* repeat for all rows */
"sub %[wide],r2 \n" /* address -= width */
"mov.b @r2,r0 \n" /* get data byte */
"shll8 r1 \n" /* old data to 2nd byte */
"extu.b r0,r0 \n" /* extend unsigned */
"or r1,r0 \n" /* combine old data */
"jmp @%[cnt] \n" /* jump into shift "path" */
"extu.b r0,r1 \n" /* store data for next round */
".su_shift6: \n" /* shift right by 0..7 bits */
"shll2 r0 \n"
"bra .su_shift0 \n"
"shlr8 r0 \n"
".su_shift4: \n"
"shlr2 r0 \n"
".su_shift2: \n"
"bra .su_shift0 \n"
"shlr2 r0 \n"
".su_shift7: \n"
"shlr2 r0 \n"
".su_shift5: \n"
"shlr2 r0 \n"
".su_shift3: \n"
"shlr2 r0 \n"
".su_shift1: \n"
"shlr r0 \n"
".su_shift0: \n"
"mov.b r0,@r2 \n" /* store data */
"add #1,r3 \n" /* current_row++ */
"cmp/hi r3,%[rows] \n" /* current_row < bheight - shift ? */
"bt .su_iloop \n"
"add #1,%[addr] \n" /* start_address++ */
"add #1,r4 \n" /* x++ */
"cmp/hi r4,%[wide] \n" /* x < width ? */
"bt .su_cloop \n"
: /* outputs */
: /* inputs */
[addr]"r"(rb->lcd_framebuffer + blocklen * LCD_FBWIDTH),
[wide]"r"(LCD_FBWIDTH),
[rows]"r"(blocklen),
[cnt] "r"(bitcount)
: /* clobbers */
"r0", "r1", "r2", "r3", "r4"
);
#elif defined(CPU_COLDFIRE) && (LCD_DEPTH == 2)
#if defined(CPU_COLDFIRE) && (LCD_DEPTH == 2)
asm (
"move.l %[wide],%%d3\n" /* columns = width */
@ -590,76 +520,7 @@ void xlcd_scroll_down(int count)
{
#if LCD_PIXELFORMAT == VERTICAL_PACKING
#if (CONFIG_CPU == SH7034) && (LCD_DEPTH == 1)
asm (
"mov #0,r4 \n" /* x = 0 */
"mova .sd_shifttbl,r0 \n" /* calculate jump destination for */
"mov.b @(r0,%[cnt]),%[cnt] \n" /* shift amount from table */
"bra .sd_cloop \n" /* skip table */
"add r0,%[cnt] \n"
".align 2 \n"
".sd_shifttbl: \n" /* shift jump offset table */
".byte .sd_shift0 - .sd_shifttbl \n"
".byte .sd_shift1 - .sd_shifttbl \n"
".byte .sd_shift2 - .sd_shifttbl \n"
".byte .sd_shift3 - .sd_shifttbl \n"
".byte .sd_shift4 - .sd_shifttbl \n"
".byte .sd_shift5 - .sd_shifttbl \n"
".byte .sd_shift6 - .sd_shifttbl \n"
".byte .sd_shift7 - .sd_shifttbl \n"
".sd_cloop: \n" /* repeat for every column */
"mov %[addr],r2 \n" /* get start address */
"mov #0,r3 \n" /* current_row = 0 */
"mov #0,r1 \n" /* fill with zero */
".sd_iloop: \n" /* repeat for all rows */
"shlr8 r1 \n" /* shift right to get residue */
"mov.b @r2,r0 \n" /* get data byte */
"jmp @%[cnt] \n" /* jump into shift "path" */
"extu.b r0,r0 \n" /* extend unsigned */
".sd_shift6: \n" /* shift left by 0..7 bits */
"shll8 r0 \n"
"bra .sd_shift0 \n"
"shlr2 r0 \n"
".sd_shift4: \n"
"shll2 r0 \n"
".sd_shift2: \n"
"bra .sd_shift0 \n"
"shll2 r0 \n"
".sd_shift7: \n"
"shll2 r0 \n"
".sd_shift5: \n"
"shll2 r0 \n"
".sd_shift3: \n"
"shll2 r0 \n"
".sd_shift1: \n"
"shll r0 \n"
".sd_shift0: \n"
"or r0,r1 \n" /* combine with last residue */
"mov.b r1,@r2 \n" /* store data */
"add %[wide],r2 \n" /* address += width */
"add #1,r3 \n" /* current_row++ */
"cmp/hi r3,%[rows] \n" /* current_row < bheight - shift ? */
"bt .sd_iloop \n"
"add #1,%[addr] \n" /* start_address++ */
"add #1,r4 \n" /* x++ */
"cmp/hi r4,%[wide] \n" /* x < width ? */
"bt .sd_cloop \n"
: /* outputs */
: /* inputs */
[addr]"r"(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH),
[wide]"r"(LCD_WIDTH),
[rows]"r"(blocklen),
[cnt] "r"(bitcount)
: /* clobbers */
"r0", "r1", "r2", "r3", "r4"
);
#elif defined(CPU_COLDFIRE) && (LCD_DEPTH == 2)
#if defined(CPU_COLDFIRE) && (LCD_DEPTH == 2)
asm (
"move.l %[wide],%%d3\n" /* columns = width */

View file

@ -2667,12 +2667,6 @@ static int handle_button(void)
switch (button)
{
case ACTION_WPS_BROWSE:
#if CONFIG_KEYPAD == ONDIO_PAD
/* ondio doesn't have ACTION_WPS_MENU,
so use ACTION_WPS_BROWSE for menu */
ret = LRC_GOTO_MENU;
break;
#endif
case ACTION_WPS_STOP:
save_changes();
ret = PLUGIN_OK;

View file

@ -28,13 +28,8 @@ OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DIRS = .
ifndef APP_TYPE
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
LDS := archos.lds
OUTPUT = $(OUTDIR)/lua.ovl
else ## iRiver/iPod/... targets
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/lua.rock
endif
else ## simulators
OUTPUT = $(OUTDIR)/lua.rock
endif

View file

@ -23,15 +23,7 @@ LUA_INCLUDELIST := $(addprefix $(LUA_BUILDDIR)/,audio.lua blit.lua color.lua dra
ifndef APP_TYPE
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
### lowmem targets
ROCKS += $(LUA_BUILDDIR)/lua.ovl
LUA_OUTLDS = $(LUA_BUILDDIR)/lua.link
LUA_OVLFLAGS = -T$(LUA_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
else
### all other targets
ROCKS += $(LUA_BUILDDIR)/lua.rock
endif
else
### simulator
ROCKS += $(LUA_BUILDDIR)/lua.rock

View file

@ -39,7 +39,7 @@
* from Lua in its stack in direct order (the first argument is pushed first). To return values to Lua,
* a C function just pushes them onto the stack, in direct order (the first result is pushed first),
* and returns the number of results. Any other value in the stack below the results will be properly
* discarded by Lua. Like a Lua function, a C function called by Lua can also return many results.
* discarded by Lua. Like a Lua function, a C function called by Lua can also return many results.
*
* When porting new functions, don't forget to check rocklib_aux.pl whether it automatically creates
* wrappers for the function and if so, add the function names to @forbidden_functions. This is to
@ -487,8 +487,7 @@ RB_WRAP(sound)
lua_pushstring (L, rb->sound_unit(setting));
return 1;
break;
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
#if ((CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL))
case SOUND_SET_PITCH:
rb->sound_set_pitch(setting);
return 1;/*nil*/
@ -496,7 +495,7 @@ RB_WRAP(sound)
#endif
case SOUND_VAL2PHYS:
value = luaL_checkint(L, 3);
result = rb->sound_val2phys(setting, value);
result = rb->sound_val2phys(setting, value);
break;
default:

View file

@ -34,31 +34,8 @@ enum minesweeper_status {
};
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
# define MINESWP_LEFT BUTTON_LEFT
# define MINESWP_RIGHT BUTTON_RIGHT
# define MINESWP_UP BUTTON_UP
# define MINESWP_DOWN BUTTON_DOWN
# define MINESWP_QUIT BUTTON_OFF
# define MINESWP_TOGGLE BUTTON_ON
# define MINESWP_TOGGLE2 BUTTON_F1
# define MINESWP_DISCOVER BUTTON_PLAY
# define MINESWP_DISCOVER2 BUTTON_F2
# define MINESWP_INFO BUTTON_F3
#elif CONFIG_KEYPAD == ONDIO_PAD
# define MINESWP_LEFT BUTTON_LEFT
# define MINESWP_RIGHT BUTTON_RIGHT
# define MINESWP_UP BUTTON_UP
# define MINESWP_DOWN BUTTON_DOWN
# define MINESWP_QUIT BUTTON_OFF
# define MINESWP_TOGGLE_PRE BUTTON_MENU
# define MINESWP_TOGGLE (BUTTON_MENU | BUTTON_REL)
# define MINESWP_DISCOVER (BUTTON_MENU | BUTTON_REPEAT)
# define MINESWP_INFO (BUTTON_MENU | BUTTON_OFF)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
# define MINESWP_LEFT BUTTON_LEFT
# define MINESWP_RIGHT BUTTON_RIGHT
# define MINESWP_UP BUTTON_UP

View file

@ -1,285 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2003 Pierre Delore
*
* 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 "plugin.h"
#include "lib/pluginlib_exit.h"
/* NIM game for the player
Rules of nim game
-----------------
There are 21 matches.
Two players (you and the cpu) alternately pick a certain number of matches and the one,
who takes the last match, loses.
History:
-------
V1.0 : 2003-07-22
First release of the game
V1.1 : 2003-07-22
I Change the patterns definition in order to have a clean code
V1.2 : 2003-07-30
Patch from JB that change:
. the win and lose message
. the BUTTON_STOP code
. Add a test
I suppress the exit variable
I suppress or translates the comments which were in French
I put min=1 at the of the main loop ( When there are 21 matches you can decide not to
take a match. Later you are obliged to take at least one.)
*/
/*Pattern for the game*/
static unsigned char smile[]={0x00, 0x11, 0x04, 0x04, 0x00, 0x11, 0x0E}; /* :-) */
static unsigned char cry[] ={0x00, 0x11, 0x04, 0x04, 0x00, 0x0E, 0x11}; /* :-( */
static unsigned char pattern3[]={0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15}; /*3 parts*/
static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/
static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/
static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/
static bool end; /*If true game is finished*/
/*Display that the action it's impossible*/
static void impossible(void)
{
rb->lcd_puts(0,1,"Impossible!");
rb->lcd_update();
rb->sleep(HZ);
return;
}
/*Display that the CPU lose :) */
static void lose(void)
{
rb->lcd_define_pattern(hsmile,smile);
rb->lcd_puts(0,1,"You Win!!");
rb->lcd_putc(8,1,hsmile);
rb->lcd_update();
end=true;
rb->sleep(HZ*2);
return;
}
/* Display that the CPU win :( */
static void win(void)
{
rb->lcd_define_pattern(hcry,cry);
rb->lcd_puts(0,1,"You Lose!!");
rb->lcd_putc(9,1,hcry);
rb->lcd_update();
end=true;
rb->sleep(HZ*2);
return;
}
/*Display the first line*/
static void display_first_line(int x)
{
int i;
rb->lcd_putsf(0,0," =%d",x);
rb->lcd_define_pattern(h1,pattern3);
for (i=0;i<x/3;i++)
rb->lcd_putc(i,0,h1);
if (x%3==2)
{
rb->lcd_define_pattern(h2,pattern2);
rb->lcd_putc(i,0,h2);
}
if (x%3==1)
{
rb->lcd_define_pattern(h2,pattern1);
rb->lcd_putc(i,0,h2);
}
}
/* Call when the program end */
static void nim_exit(void)
{
/*Restore the old pattern*/
rb->lcd_unlock_pattern(h1);
rb->lcd_unlock_pattern(h2);
rb->lcd_unlock_pattern(hsmile);
rb->lcd_unlock_pattern(hcry);
/*Clear the screen*/
rb->lcd_clear_display();
rb->lcd_update();
}
/* this is the plugin entry point */
enum plugin_status plugin_start(const void* parameter)
{
int y,z,button;
int x,v,min;
bool ok;
bool go;
atexit(nim_exit);
/* if you don't use the parameter, you can do like
this to avoid the compiler warning about it */
(void)parameter;
/*Get the pattern handle*/
h1=rb->lcd_get_locked_pattern();
h2=rb->lcd_get_locked_pattern();
hcry=rb->lcd_get_locked_pattern();
hsmile=rb->lcd_get_locked_pattern();
rb->splash(HZ, "NIM V1.2");
rb->lcd_clear_display();
/* Main loop */
while (1)
{
/* Init */
x=21;
v=1;
y=1;
end=false;
min=0;
/*Empty the event queue*/
rb->button_clear_queue();
/* Game loop */
while(end!=true)
{
do
{
ok=1;
y=1;
display_first_line(x);
rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y);
rb->lcd_update();
go=false;
while (!go)
{
button = rb->button_get(true);
switch ( button )
{
case BUTTON_STOP|BUTTON_REL:
go = true;
return PLUGIN_OK;
break;
case BUTTON_PLAY|BUTTON_REL:
go=true;
break;
case BUTTON_LEFT|BUTTON_REL:
go=false;
if (y>min)
y--;
break;
case BUTTON_RIGHT|BUTTON_REL:
go=false;
if (y<v)
y++;
break;
default:
exit_on_usb(button);
break;
}
display_first_line(x);
rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y);
rb->lcd_update();
}
if ( (y==0) && (x<21))
{
impossible();
ok=false;
}
else
{
if (y!=0) /*If y=0 and x=21 jump to CPU code */
{
if ((y>v) || (y>x))
{
impossible();
ok=false;
}
if (y-x==0)
win();
else
{
v=y*2;
x-=y;
}
}
}
}
while (ok==false);
display_first_line(x);
/*CPU*/
if (x==1)
lose();
else
if (x==2)
win();
y=0;
if (end==false)
{
for (z=v;z>=1;z--)
{
if (x-z==1)
y=z;
}
if (y<=0)
{
for(z=v;z>=1;z--)
{
if(x-(z*3)==2)
y=z;
}
if ((y==0) && (x>14))
y=v;
if (y==0)
y=1;
}
v=y*2;
x-=y;
rb->lcd_putsf(0,1,"I take=%d",y);
rb->lcd_update();
rb->sleep(HZ);
}
if ((x==1)&&(!end))
win();
min=1;
}
}
return PLUGIN_OK;
}

View file

@ -30,30 +30,7 @@
#include "lib/osd.h"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define OSCILLOSCOPE_QUIT BUTTON_OFF
#define OSCILLOSCOPE_DRAWMODE BUTTON_F1
#define OSCILLOSCOPE_ADVMODE BUTTON_F2
#define OSCILLOSCOPE_ORIENTATION BUTTON_F3
#define OSCILLOSCOPE_PAUSE BUTTON_PLAY
#define OSCILLOSCOPE_SPEED_UP BUTTON_RIGHT
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == ONDIO_PAD
#define OSCILLOSCOPE_QUIT BUTTON_OFF
#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_MENU
#define OSCILLOSCOPE_DRAWMODE (BUTTON_MENU | BUTTON_REL)
#define OSCILLOSCOPE_ADVMODE (BUTTON_MENU | BUTTON_RIGHT)
#define OSCILLOSCOPE_ORIENTATION (BUTTON_MENU | BUTTON_LEFT)
#define OSCILLOSCOPE_PAUSE (BUTTON_MENU | BUTTON_OFF)
#define OSCILLOSCOPE_SPEED_UP BUTTON_RIGHT
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_OFF
#define OSCILLOSCOPE_DRAWMODE BUTTON_SELECT
#define OSCILLOSCOPE_ADVMODE BUTTON_MODE
@ -934,9 +911,6 @@ static void get_peaks(int *left, int *right)
#elif defined (SIMULATOR)
*left = rand() % 0x8000;
*right = rand() % 0x8000;
#elif (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
*left = rb->mas_codec_readreg(0xC);
*right = rb->mas_codec_readreg(0xD);
#else
*left = 0;
*right = 0;

View file

@ -43,41 +43,7 @@
#define HOLE 6
#define PLAYER 7
#if CONFIG_KEYPAD == RECORDER_PAD
#define PEGBOX_SELECT BUTTON_ON
#define PEGBOX_QUIT BUTTON_OFF
#define PEGBOX_RESTART BUTTON_F2
#define PEGBOX_LVL_UP BUTTON_F1
#define PEGBOX_LVL_DOWN BUTTON_F3
#define PEGBOX_UP BUTTON_UP
#define PEGBOX_DOWN BUTTON_DOWN
#define PEGBOX_RIGHT BUTTON_RIGHT
#define PEGBOX_LEFT BUTTON_LEFT
#define SELECT_TEXT "ON"
#define QUIT_TEXT "OFF"
#define RESTART_TEXT "F2"
#define LVL_UP_TEXT "F1"
#define LVL_DOWN_TEXT "F3"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define PEGBOX_SELECT BUTTON_OFF
#define PEGBOX_QUIT (BUTTON_MENU | BUTTON_LEFT)
#define PEGBOX_RESTART (BUTTON_MENU | BUTTON_RIGHT)
#define PEGBOX_LVL_UP (BUTTON_MENU | BUTTON_UP)
#define PEGBOX_LVL_DOWN (BUTTON_MENU | BUTTON_DOWN)
#define PEGBOX_UP BUTTON_UP
#define PEGBOX_DOWN BUTTON_DOWN
#define PEGBOX_RIGHT BUTTON_RIGHT
#define PEGBOX_LEFT BUTTON_LEFT
#define SELECT_TEXT "OFF"
#define QUIT_TEXT "M+LEFT"
#define RESTART_TEXT "M+RIGHT"
#define LVL_UP_TEXT "M+UP"
#define LVL_DOWN_TEXT "M+DOWN"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define PEGBOX_SELECT BUTTON_SELECT
#define PEGBOX_QUIT BUTTON_OFF

View file

@ -89,13 +89,6 @@ const struct button_mapping pf_context_album_scroll[] =
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
{ACTION_NONE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT},
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT},
#endif
#if CONFIG_KEYPAD == ONDIO_PAD
{PF_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_UP},
{PF_CONTEXT, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP},
{ACTION_NONE, BUTTON_UP, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN|1)
};
@ -147,8 +140,7 @@ const struct button_mapping pf_context_buttons[] =
{PF_QUIT, BUTTON_RC_REC, BUTTON_NONE},
#elif CONFIG_KEYPAD == MEIZU_M6SL_PAD
{PF_QUIT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU},
#elif CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD || \
CONFIG_KEYPAD == RECORDER_PAD || CONFIG_KEYPAD == ONDIO_PAD
#elif CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD
{PF_QUIT, BUTTON_OFF, BUTTON_NONE},
#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
{PF_QUIT, BUTTON_REC, BUTTON_NONE},
@ -691,13 +683,7 @@ static inline PFreal fdiv(PFreal num, PFreal den)
#define fabs(a) (a < 0 ? -a : a)
#define fbound(min,val,max) (fmax((min),fmin((max),(val))))
#if CONFIG_CPU == SH7034
/* 16*16->32 bit multiplication is a single instrcution on the SH1 */
#define MULUQ(a, b) ((uint32_t) (((uint16_t) (a)) * ((uint16_t) (b))))
#else
#define MULUQ(a, b) ((a) * (b))
#endif
#if 0
#define fmul(a,b) ( ((a)*(b)) >> PFREAL_SHIFT )

View file

@ -16,15 +16,7 @@ PICTUREFLOW_OBJ := $(call c2obj, $(PICTUREFLOW_SRC))
OTHER_SRC += $(PICTUREFLOW_SRC)
ifndef APP_TYPE
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
### lowmem targets
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl
PICTUREFLOW_OUTLDS = $(PICTUREFLOW_OBJDIR)/picutreflow.link
PICTUREFLOW_OVLFLAGS = -T$(PICTUREFLOW_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
else
### all other targets
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock
endif
else
### simulator
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock

View file

@ -6,8 +6,6 @@
OUTPUT_FORMAT(elf32-m68k)
#elif defined(CPU_ARM)
OUTPUT_FORMAT(elf32-littlearm)
#elif defined(CPU_SH)
OUTPUT_FORMAT(elf32-sh)
#elif defined(CPU_MIPS)
OUTPUT_FORMAT(elf32-littlemips)
#else

View file

@ -39,23 +39,7 @@
#define MOVE_STEP LCD_HEIGHT / 32 /* move pad this many steps up/down each move */
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define PONG_QUIT BUTTON_OFF
#define PONG_PAUSE BUTTON_ON
#define PONG_LEFT_UP BUTTON_F1
#define PONG_LEFT_DOWN BUTTON_LEFT
#define PONG_RIGHT_UP BUTTON_F3
#define PONG_RIGHT_DOWN BUTTON_RIGHT
#elif CONFIG_KEYPAD == ONDIO_PAD
#define PONG_QUIT BUTTON_OFF
#define PONG_PAUSE BUTTON_RIGHT
#define PONG_LEFT_UP BUTTON_LEFT
#define PONG_LEFT_DOWN BUTTON_MENU
#define PONG_RIGHT_UP BUTTON_UP
#define PONG_RIGHT_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#if CONFIG_KEYPAD == IRIVER_H100_PAD
#define PONG_QUIT BUTTON_OFF
#define PONG_LEFT_UP BUTTON_UP
#define PONG_LEFT_DOWN BUTTON_DOWN

View file

@ -27,28 +27,8 @@
#define GAME_FILE PLUGIN_GAMES_DIR "/reversi.rev"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define REVERSI_BUTTON_QUIT BUTTON_OFF
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
#define REVERSI_BUTTON_MENU BUTTON_F1
#elif CONFIG_KEYPAD == ONDIO_PAD
#define REVERSI_BUTTON_QUIT BUTTON_OFF
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_MENU
#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU_LONGPRESS
#define REVERSI_BUTTON_MENU BUTTON_MENU
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define REVERSI_BUTTON_QUIT BUTTON_OFF
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN

View file

@ -58,43 +58,6 @@
#define ROCKBLOX_RC_OFF BUTTON_RC_STOP
#elif CONFIG_KEYPAD == RECORDER_PAD
#define ROCKBLOX_OFF BUTTON_OFF
#define ROCKBLOX_ROTATE_CCW BUTTON_UP
#define ROCKBLOX_ROTATE_CW BUTTON_PLAY
#define ROCKBLOX_DOWN BUTTON_DOWN
#define ROCKBLOX_LEFT BUTTON_LEFT
#define ROCKBLOX_RIGHT BUTTON_RIGHT
#define ROCKBLOX_DROP BUTTON_ON
#define ROCKBLOX_RESTART BUTTON_F1
#elif CONFIG_KEYPAD == PLAYER_PAD
#define ROCKBLOX_OFF_PRE BUTTON_STOP
#define ROCKBLOX_OFF (BUTTON_STOP|BUTTON_REL)
#define ROCKBLOX_ROTATE_CCW BUTTON_PLAY
#define ROCKBLOX_ROTATE_CW (BUTTON_ON|BUTTON_PLAY)
#define ROCKBLOX_DOWN BUTTON_MENU
#define ROCKBLOX_LEFT BUTTON_LEFT
#define ROCKBLOX_RIGHT BUTTON_RIGHT
#define ROCKBLOX_DROP_PRE BUTTON_ON
#define ROCKBLOX_DROP (BUTTON_ON|BUTTON_REL)
#define ROCKBLOX_RESTART (BUTTON_STOP|BUTTON_MENU)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define ROCKBLOX_OFF_PRE BUTTON_OFF
#define ROCKBLOX_OFF (BUTTON_OFF|BUTTON_REL)
#define ROCKBLOX_ROTATE_CCW BUTTON_UP
#define ROCKBLOX_ROTATE_CW (BUTTON_MENU|BUTTON_UP)
#define ROCKBLOX_DOWN BUTTON_DOWN
#define ROCKBLOX_LEFT BUTTON_LEFT
#define ROCKBLOX_RIGHT BUTTON_RIGHT
#define ROCKBLOX_DROP_PRE BUTTON_MENU
#define ROCKBLOX_DROP (BUTTON_MENU|BUTTON_REL)
#define ROCKBLOX_RESTART (BUTTON_OFF|BUTTON_MENU)
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define ROCKBLOX_OFF BUTTON_POWER

View file

@ -1,967 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Plugin for reprogramming only the second image in Flash ROM.
* !!! DON'T MESS WITH THIS CODE UNLESS YOU'RE ABSOLUTELY SURE WHAT YOU DO !!!
*
* Copyright (C) 2003 Jörg Hohensohn aka [IDC]Dragon
*
* 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 "plugin.h"
/* define DUMMY if you only want to "play" with the UI, does no harm */
/* #define DUMMY */
#define LATEST_BOOTLOADER_VERSION 3 /* update this with the bootloader */
#ifndef UINT8
#define UINT8 unsigned char
#endif
#ifndef UINT16
#define UINT16 unsigned short
#endif
#ifndef UINT32
#define UINT32 unsigned long
#endif
/* hard-coded values */
static volatile UINT8* FB = (UINT8*)0x02000000; /* Flash base address */
#define SECTORSIZE 4096 /* size of one flash sector */
#define ROCKBOX_DEST 0x09000000
#define ROCKBOX_EXEC 0x09000200
#define BOOT_VERS_ADR 0xFA /* position of bootloader version value in Flash */
#define FW_VERS_ADR 0xFE /* position of firmware version value in Flash */
#define UCL_HEADER 26 /* size of the header generated by uclpack */
#if CONFIG_KEYPAD == ONDIO_PAD /* limited keypad */
#define KEY1 BUTTON_LEFT
#define KEY2 BUTTON_UP
#define KEYNAME1 "Left"
#define KEYNAME2 "Up"
#else /* recorder keypad */
#define KEY1 BUTTON_F1
#define KEY2 BUTTON_F2
#define KEYNAME1 "F1"
#define KEYNAME2 "F2"
#endif
typedef struct
{
UINT32 destination; /* address to copy it to */
UINT32 size; /* how many bytes of payload (to the next header) */
UINT32 execute; /* entry point */
UINT32 flags; /* uncompressed or compressed */
/* end of header, now comes the payload */
} tImageHeader;
/* result of the CheckFirmwareFile() function */
typedef enum
{
eOK = 0,
eFileNotFound, /* errors from here on */
eTooBig,
eTooSmall,
eReadErr,
eNotUCL,
eWrongAlgorithm,
eMultiBlocks,
eBadRomLink
} tCheckResult;
typedef struct
{
UINT8 manufacturer;
UINT8 id;
int size;
char name[32];
} tFlashInfo;
static UINT8* sector; /* better not place this on the stack... */
/***************** Flash Functions *****************/
/* read the manufacturer and device ID */
static bool ReadID(volatile UINT8* pBase, UINT8* pManufacturerID,
UINT8* pDeviceID)
{
UINT8 not_manu, not_id; /* read values before switching to ID mode */
UINT8 manu, id; /* read values when in ID mode */
pBase = (UINT8*)((UINT32)pBase & 0xFFF80000); /* round down to 512k align,
to make sure */
not_manu = pBase[0]; /* read the normal content */
not_id = pBase[1]; /* should be 'A' (0x41) and 'R' (0x52) from the
"ARCH" marker */
pBase[0x5555] = 0xAA; /* enter command mode */
pBase[0x2AAA] = 0x55;
pBase[0x5555] = 0x90; /* ID command */
rb->sleep(HZ/50); /* Atmel wants 20ms pause here */
manu = pBase[0];
id = pBase[1];
pBase[0] = 0xF0; /* reset flash (back to normal read mode) */
rb->sleep(HZ/50); /* Atmel wants 20ms pause here */
/* I assume success if the obtained values are different from
the normal flash content. This is not perfectly bulletproof, they
could theoretically be the same by chance, causing us to fail. */
if (not_manu != manu || not_id != id) /* a value has changed */
{
*pManufacturerID = manu; /* return the results */
*pDeviceID = id;
return true; /* success */
}
return false; /* fail */
}
/* erase the sector which contains the given address */
static bool EraseSector(volatile UINT8* pAddr)
{
#ifdef DUMMY
(void)pAddr; /* prevents warning */
return true;
#else
volatile UINT8* pBase =
(UINT8*)((UINT32)pAddr & 0xFFF80000); /* round down to 512k align */
unsigned timeout = 43000; /* the timeout loop should be no less than
25ms */
pBase[0x5555] = 0xAA; /* enter command mode */
pBase[0x2AAA] = 0x55;
pBase[0x5555] = 0x80; /* erase command */
pBase[0x5555] = 0xAA; /* enter command mode */
pBase[0x2AAA] = 0x55;
*pAddr = 0x30; /* erase the sector */
/* I counted 7 instructions for this loop -> min. 0.58 us per round
Plus memory waitstates it will be much more, gives margin */
while (*pAddr != 0xFF && --timeout); /* poll for erased */
return (timeout != 0);
#endif
}
/* address must be in an erased location */
static inline bool ProgramByte(volatile UINT8* pAddr, UINT8 data)
{
#ifdef DUMMY
(void)pAddr; /* prevents warnings */
(void)data;
return true;
#else
unsigned timeout = 35; /* the timeout loop should be no less than 20us */
if (~*pAddr & data) /* just a safety feature, not really necessary */
return false; /* can't set any bit from 0 to 1 */
FB[0x5555] = 0xAA; /* enter command mode */
FB[0x2AAA] = 0x55;
FB[0x5555] = 0xA0; /* byte program command */
*pAddr = data;
/* I counted 7 instructions for this loop -> min. 0.58 us per round
Plus memory waitstates it will be much more, gives margin */
while (*pAddr != data && --timeout); /* poll for programmed */
return (timeout != 0);
#endif
}
/* this returns true if supported and fills the info struct */
static bool GetFlashInfo(tFlashInfo* pInfo)
{
rb->memset(pInfo, 0, sizeof(tFlashInfo));
if (!ReadID(FB, &pInfo->manufacturer, &pInfo->id))
return false;
if (pInfo->manufacturer == 0xBF) /* SST */
{
if (pInfo->id == 0xD6)
{
pInfo->size = 256* 1024; /* 256k */
rb->strcpy(pInfo->name, "SST39VF020");
return true;
}
else if (pInfo->id == 0xD7)
{
pInfo->size = 512* 1024; /* 512k */
rb->strcpy(pInfo->name, "SST39VF040");
return true;
}
else
return false;
}
return false;
}
/*********** Tool Functions ************/
/* read a 32 bit value from memory, big endian */
static UINT32 Read32(UINT8* pByte)
{
UINT32 value;
value = (UINT32)pByte[0] << 24;
value |= (UINT32)pByte[1] << 16;
value |= (UINT32)pByte[2] << 8;
value |= (UINT32)pByte[3];
return value;
}
/* get the start address of the second image */
static tImageHeader* GetSecondImage(void)
{
tImageHeader* pImage1;
UINT32 pos = 0; /* default: not found */
UINT32* pFlash = (UINT32*)FB;
/* determine the first image position */
pos = pFlash[2] + pFlash[3]; /* position + size of the bootloader
= after it */
pos = (pos + 3) & ~3; /* be sure it's 32 bit aligned */
pImage1 = (tImageHeader*)pos;
if (pImage1->destination != ROCKBOX_DEST ||
pImage1->execute != ROCKBOX_EXEC)
return 0; /* seems to be no Archos/Rockbox image in here */
if (pImage1->size != 0)
{
/* success, we have a second image */
pos = (UINT32)pImage1 + sizeof(tImageHeader) + pImage1->size;
if (((pos + SECTORSIZE-1) & ~(SECTORSIZE-1)) != pos)
{ /* not sector-aligned */
pos = 0; /* sanity check failed */
}
}
return (tImageHeader*)pos;
}
/* return bootloader version */
static inline unsigned BootloaderVersion(void)
{
return FB[BOOT_VERS_ADR];
}
/*********** Image File Functions ************/
/* so far, only compressed images in UCL NRV algorithm 2e supported */
tCheckResult CheckImageFile(char* filename, int space,
tImageHeader* pHeader, UINT8* pos)
{
int i;
int fd;
int filesize; /* size info */
int fileread = 0; /* total size as read from the file */
int read; /* how many for this sector */
/* magic file header for compressed files */
static const UINT8 magic[8] = { 0x00,0xe9,0x55,0x43,0x4c,0xff,0x01,0x1a };
UINT8 ucl_header[UCL_HEADER];
fd = rb->open(filename, O_RDONLY);
if (fd < 0)
return eFileNotFound;
filesize = rb->filesize(fd);
if (filesize - (int)sizeof(ucl_header) - 8 > space)
{
rb->close(fd);
return eTooBig;
}
else if (filesize < 10000) /* give it some reasonable lower limit */
{
rb->close(fd);
return eTooSmall;
}
/* do some sanity checks */
read = rb->read(fd, ucl_header, sizeof(ucl_header));
fileread += read;
if (read != sizeof(ucl_header))
{
rb->close(fd);
return eReadErr;
}
/* compare the magic header */
for (i=0; i<8; i++)
{
if (ucl_header[i] != magic[i])
{
rb->close(fd);
return eNotUCL;
}
}
pHeader->size = Read32(ucl_header + 22); /* compressed size */
if (pHeader->size != filesize - sizeof(ucl_header) - 8)
{
rb->close(fd);
return eMultiBlocks;
}
/* fill in the hardcoded defaults of the header */
pHeader->destination = ROCKBOX_DEST;
pHeader->execute = ROCKBOX_EXEC;
if (Read32(ucl_header + 18) > pHeader->size) /* compare with uncompressed
size */
{ /* compressed, normal case */
pHeader->flags = 0x00000001; /* flags for UCL compressed */
/* check for supported algorithm */
if (ucl_header[12] != 0x2E)
{
rb->close(fd);
return eWrongAlgorithm;
}
}
else
{ /* uncompressed, either to be copied or run directly in flash */
UINT32 reset_vector; /* image has to start with reset vector */
pHeader->flags = 0x00000000; /* uncompressed */
read = rb->read(fd, &reset_vector, sizeof(reset_vector));
fileread += read;
if (read != sizeof(reset_vector))
{
rb->close(fd);
return eReadErr;
}
if (reset_vector >= (UINT32)FB
&& reset_vector < (UINT32)FB+512*1024) /* ROM address? */
{
/* assume in-place, executing directly in flash */
pHeader->destination = (UINT32)(pos + sizeof(tImageHeader));
/* for new RomBox, this isn't the reset vector,
but the link address, for us to check the position */
if(pHeader->destination != reset_vector) /* compare link addr. */
{
rb->close(fd);
return eBadRomLink; /* not matching the start address */
}
/* read the now following reset vector */
read = rb->read(fd, &reset_vector, sizeof(reset_vector));
fileread += read;
if (read != sizeof(reset_vector))
{
rb->close(fd);
return eReadErr;
}
}
pHeader->execute = reset_vector;
}
/* check if we can read the whole file */
do
{
read = rb->read(fd, sector, SECTORSIZE);
fileread += read;
} while (read == SECTORSIZE);
rb->close(fd);
if (fileread != filesize)
return eReadErr;
return eOK;
}
/* returns the # of failures, 0 on success */
static unsigned ProgramImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader,
int start, int size)
{
int i;
int fd;
int read; /* how many for this sector */
unsigned failures = 0;
fd = rb->open(filename, O_RDONLY);
if (fd < 0)
return false;
/* no error checking necessary here, we checked for minimum size
already */
rb->lseek(fd, start, SEEK_SET); /* go to start position */
*(tImageHeader*)sector = *pImageHeader; /* copy header into sector
buffer */
read = rb->read(fd, sector + sizeof(tImageHeader),
SECTORSIZE - sizeof(tImageHeader)); /* payload behind */
size -= read;
read += sizeof(tImageHeader); /* to be programmed, but not part of the
file */
do {
if (!EraseSector(pos))
{
/* nothing we can do, let the programming count the errors */
}
for (i=0; i<read; i++)
{
if (!ProgramByte(pos + i, sector[i]))
{
failures++;
}
}
pos += SECTORSIZE;
read = rb->read(fd, sector, (size > SECTORSIZE) ? SECTORSIZE : size);
/* payload for next sector */
size -= read;
} while (read > 0);
rb->close(fd);
return failures;
}
/* returns the # of failures, 0 on success */
static unsigned VerifyImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader,
int start, int size)
{
int i;
int fd;
int read; /* how many for this sector */
unsigned failures = 0;
fd = rb->open(filename, O_RDONLY);
if (fd < 0)
return false;
/* no error checking necessary here, we checked for minimum size
already */
rb->lseek(fd, start, SEEK_SET); /* go to start position */
*(tImageHeader*)sector = *pImageHeader; /* copy header into sector
buffer */
read = rb->read(fd, sector + sizeof(tImageHeader),
SECTORSIZE - sizeof(tImageHeader)); /* payload behind */
size -= read;
read += sizeof(tImageHeader); /* to be programmed, but not part of the
file */
do
{
for (i=0; i<read; i++)
{
if (pos[i] != sector[i])
{
failures++;
}
}
pos += SECTORSIZE;
read = rb->read(fd, sector, (size > SECTORSIZE) ? SECTORSIZE : size);
/* payload for next sector */
size -= read;
} while (read);
rb->close(fd);
return failures;
}
/***************** User Interface Functions *****************/
static int WaitForButton(void)
{
int button;
do
{
button = rb->button_get(true);
} while (IS_SYSEVENT(button) || (button & BUTTON_REL));
return button;
}
#ifdef HAVE_LCD_BITMAP
/* helper for DoUserDialog() */
static void ShowFlashInfo(tFlashInfo* pInfo, tImageHeader* pImageHeader)
{
char buf[32];
if (!pInfo->manufacturer)
{
rb->lcd_puts_scroll(0, 0, "Flash: M=?? D=??");
}
else
{
if (pInfo->size)
{
rb->snprintf(buf, sizeof(buf), "Flash size: %d KB",
pInfo->size / 1024);
rb->lcd_puts_scroll(0, 0, buf);
}
else
{
rb->lcd_puts_scroll(0, 0, "Unsupported chip");
}
}
if (pImageHeader)
{
rb->snprintf(buf, sizeof(buf), "Image at %d KB",
((UINT8*)pImageHeader - FB) / 1024);
rb->lcd_puts_scroll(0, 1, buf);
}
else
{
rb->lcd_puts_scroll(0, 1, "No image found!");
}
}
/* Kind of our main function, defines the application flow. */
/* recorder version */
static void DoUserDialog(char* filename)
{
tImageHeader ImageHeader;
tFlashInfo FlashInfo;
int button;
int rc; /* generic return code */
UINT32 space, aligned_size, true_size;
UINT8* pos;
size_t memleft;
unsigned bl_version;
bool show_greet = false;
/* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */
rb->splash(HZ*3, "Not from ROM");
return; /* exit */
}
/* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe())
{
rb->splash(HZ*3, "Battery too low!");
return; /* exit */
}
/* "allocate" memory */
sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{
rb->splash(HZ*3, "Out of memory");
return; /* exit */
}
rb->lcd_setfont(FONT_SYSFIXED);
pos = (void*)GetSecondImage();
rc = GetFlashInfo(&FlashInfo);
ShowFlashInfo(&FlashInfo, (void*)pos);
rb->lcd_update();
if (FlashInfo.size == 0) /* no valid chip */
{
rb->splash(HZ*3, "Not flashable");
return; /* exit */
}
else if (pos == 0)
{
rb->splash(HZ*3, "No image");
return; /* exit */
}
bl_version = BootloaderVersion();
/* Upgrade currently not recommended for FM and V2
recorder due to bugs in V3 BootBox. (FS#12426) */
#if !defined(ARCHOS_FMRECORDER) && !defined(ARCHOS_RECORDERV2)
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->lcd_putsf(0, 0, "Bootloader V%d", bl_version);
rb->lcd_puts(0, 1, "Hint: You're not ");
rb->lcd_puts(0, 2, "using the latest ");
rb->lcd_puts(0, 3, "bootloader. ");
rb->lcd_puts(0, 4, "A full reflash is ");
rb->lcd_puts(0, 5, "recommended. ");
rb->lcd_puts(0, 6, "Press " KEYNAME1 " to ignore");
rb->lcd_update();
if (WaitForButton() != KEY1)
{
return;
}
rb->lcd_clear_display();
}
#endif
rb->lcd_puts(0, show_greet ? 0 : 3, "Checking...");
rb->lcd_update();
space = FlashInfo.size - (pos-FB + sizeof(ImageHeader));
/* size minus start */
rc = CheckImageFile(filename, space, &ImageHeader, pos);
if (rc != eOK)
{
rb->lcd_clear_display(); /* make room for error message */
show_greet = true; /* verbose */
}
rb->lcd_puts(0, show_greet ? 0 : 3, "Checked:");
switch (rc) {
case eOK:
rb->lcd_puts(0, show_greet ? 0 : 4, "File OK.");
break;
case eNotUCL:
rb->lcd_puts(0, 1, "File not UCL ");
rb->lcd_puts(0, 2, "compressed.");
rb->lcd_puts(0, 3, "Use uclpack --2e");
rb->lcd_puts(0, 4, " --10 rockbox.bin");
break;
case eWrongAlgorithm:
rb->lcd_puts(0, 1, "Wrong algorithm");
rb->lcd_puts(0, 2, "for compression.");
rb->lcd_puts(0, 3, "Use uclpack --2e");
rb->lcd_puts(0, 4, " --10 rockbox.bin");
break;
case eFileNotFound:
rb->lcd_puts(0, 1, "File not found:");
rb->lcd_puts_scroll(0, 2, filename);
break;
case eTooBig:
rb->lcd_puts(0, 1, "File too big,");
rb->lcd_puts(0, 2, "won't fit in chip.");
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->lcd_puts(0, 3, "Upgrade bootloader");
}
break;
case eTooSmall:
rb->lcd_puts(0, 1, "File too small.");
rb->lcd_puts(0, 2, "Incomplete?");
break;
case eReadErr:
rb->lcd_puts(0, 1, "File read error.");
break;
case eMultiBlocks:
rb->lcd_puts(0, 1, "File invalid.");
rb->lcd_puts(0, 2, "Blocksize");
rb->lcd_puts(0, 3, " too small?");
break;
case eBadRomLink:
rb->lcd_puts(0, 1, "Bootloader not");
rb->lcd_puts(0, 2, "compatible with");
rb->lcd_puts(0, 3, "RomBox. Start");
rb->lcd_puts(0, 4, "address mismatch.");
break;
default:
rb->lcd_puts(0, 1, "Check failed.");
break;
}
if (rc == eOK)
{ /* was OK */
rb->lcd_puts(0, 6, "[" KEYNAME2 "] to program");
rb->lcd_puts(0, 7, "other key to exit");
}
else
{ /* error occured */
rb->lcd_puts(0, 6, "Any key to exit");
}
rb->lcd_update();
button = WaitForButton();
if (rc != eOK || button != KEY2)
{
return;
}
true_size = ImageHeader.size;
aligned_size = ((sizeof(tImageHeader) + true_size + SECTORSIZE-1) &
~(SECTORSIZE-1)) - sizeof(tImageHeader); /* round up to
next flash
sector */
ImageHeader.size = aligned_size; /* increase image size such that we reach
the next sector */
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Programming...");
rb->lcd_update();
rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
if (rc)
{ /* errors */
rb->lcd_clear_display();
rb->lcd_puts(0, 0, "Error:");
rb->lcd_puts(0, 1, "Programming fail!");
rb->lcd_putsf(0, 2, "%d errors", rc);
rb->lcd_update();
button = WaitForButton();
}
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Verifying...");
rb->lcd_update();
rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
rb->lcd_clear_display();
if (rc == 0)
{
rb->lcd_puts(0, 0, "Verify OK.");
}
else
{
rb->lcd_puts(0, 0, "Error:");
rb->lcd_puts(0, 1, "Verify fail!");
rb->lcd_putsf(0, 2, "%d errors", rc);
rb->lcd_puts(0, 3, "Use safe image");
rb->lcd_puts(0, 4, "if booting hangs:");
rb->lcd_puts(0, 5, "F1 during power-on");
}
rb->lcd_puts(0, 7, "Any key to exit");
rb->lcd_update();
WaitForButton();
}
#else /* #ifdef HAVE_LCD_BITMAP */
/* Player version */
static void DoUserDialog(char* filename)
{
tImageHeader ImageHeader;
tFlashInfo FlashInfo;
static char buf[MAX_PATH];
int button;
int rc; /* generic return code */
UINT32 space, aligned_size, true_size;
UINT8* pos;
size_t memleft;
unsigned bl_version;
/* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */
rb->splash(HZ*3, "Not from ROM");
return; /* exit */
}
/* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe())
{
rb->splash(HZ*3, "Batt. too low!");
return; /* exit */
}
/* "allocate" memory */
sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{
rb->splash(HZ*3, "Out of memory");
return; /* exit */
}
pos = (void*)GetSecondImage();
rc = GetFlashInfo(&FlashInfo);
if (FlashInfo.size == 0) /* no valid chip */
{
rb->splash(HZ*3, "Not flashable");
return; /* exit */
}
else if (pos == 0)
{
rb->splash(HZ*3, "No image");
return; /* exit */
}
bl_version = BootloaderVersion();
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required.");
rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore");
rb->lcd_update();
if (WaitForButton() != BUTTON_MENU)
{
return;
}
rb->lcd_clear_display();
}
rb->lcd_puts(0, 0, "Checking...");
rb->lcd_update();
space = FlashInfo.size - (pos-FB + sizeof(ImageHeader));
/* size minus start */
rc = CheckImageFile(filename, space, &ImageHeader, pos);
rb->lcd_puts(0, 0, "Checked:");
switch (rc) {
case eOK:
rb->lcd_puts(0, 1, "File OK.");
rb->sleep(HZ*1);
break;
case eNotUCL:
rb->lcd_puts_scroll(0, 1, "File not UCL compressed.");
break;
case eWrongAlgorithm:
rb->lcd_puts_scroll(0, 1, "Wrong compression algorithm.");
break;
case eFileNotFound:
rb->lcd_puts_scroll(0, 1, "File not found.");
break;
case eTooBig:
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->lcd_puts_scroll(0, 1, "File too big, upgrade bootloader.");
}
else
{
rb->lcd_puts_scroll(0, 1, "File too big.");
}
break;
case eTooSmall:
rb->lcd_puts_scroll(0, 1, "File too small. Incomplete?");
break;
case eReadErr:
rb->lcd_puts_scroll(0, 1, "File read error.");
break;
case eMultiBlocks:
rb->lcd_puts_scroll(0, 1, "File invalid. Blocksize too small?");
break;
case eBadRomLink:
rb->lcd_puts_scroll(0, 1, "Bootloader not compatible with RomBox.");
break;
default:
rb->lcd_puts_scroll(0, 1, "Check failed.");
break;
}
rb->lcd_update();
if (rc == eOK)
{ /* was OK */
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "[ON] to program,");
rb->lcd_puts_scroll(0, 1, "other key to exit.");
}
else
{ /* error occured */
WaitForButton();
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Flash failed.");
rb->lcd_puts_scroll(0, 1, "Any key to exit.");
}
rb->lcd_update();
button = WaitForButton();
if (rc != eOK || button != BUTTON_ON)
{
return;
}
true_size = ImageHeader.size;
aligned_size = ((sizeof(tImageHeader) + true_size + SECTORSIZE-1) &
~(SECTORSIZE-1)) - sizeof(tImageHeader); /* round up to
next flash
sector */
ImageHeader.size = aligned_size; /* increase image size such that we reach
the next sector */
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Programming...");
rb->lcd_update();
rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
if (rc)
{ /* errors */
rb->lcd_clear_display();
rb->snprintf(buf, sizeof(buf), "%d errors", rc);
rb->lcd_puts_scroll(0, 0, "Programming failed!");
rb->lcd_puts_scroll(0, 1, buf);
rb->lcd_update();
button = WaitForButton();
}
rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Verifying...");
rb->lcd_update();
rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
rb->lcd_clear_display();
if (rc == 0)
{
rb->lcd_puts(0, 0, "Verify OK.");
rb->lcd_update();
}
else
{
rb->snprintf(buf, sizeof(buf), "Verify fail! %d errors", rc);
rb->lcd_puts_scroll(0, 0, buf);
rb->lcd_puts_scroll(0, 1, "Use safe image if booting hangs: [-] during power-on");
rb->lcd_update();
button = WaitForButton();
}
}
#endif /* not HAVE_LCD_BITMAP */
/***************** Plugin Entry Point *****************/
enum plugin_status plugin_start(const void* parameter)
{
int oldmode;
if (parameter == NULL)
{
rb->splash(HZ*3, "Play .ucl file!");
return PLUGIN_OK;
}
/* now go ahead and have fun! */
oldmode = rb->system_memory_guard(MEMGUARD_NONE); /*disable memory guard */
DoUserDialog((char*) parameter);
rb->system_memory_guard(oldmode); /* re-enable memory guard */
return PLUGIN_OK;
}

View file

@ -69,7 +69,7 @@ static void updatepatpix(void) ICODE_ATTR;
static void updatepatpix(void)
{
int i, j;
#if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE))
#if !defined(CPU_COLDFIRE)
int k, a, c;
#endif
byte *vram = lcd.vbank[0];
@ -83,76 +83,7 @@ static void updatepatpix(void)
patdirty[i] = 0;
for (j = 0; j < 8; j++)
{
#if CONFIG_CPU == SH7034
asm volatile (
"mov.w @%2,r1 \n"
"swap.b r1,r2 \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@%0 \n"
"mov.b r0,@(7,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(1,%0) \n"
"mov.b r0,@(6,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(2,%0) \n"
"mov.b r0,@(5,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(3,%0) \n"
"mov.b r0,@(4,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(4,%0) \n"
"mov.b r0,@(3,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(5,%0) \n"
"mov.b r0,@(2,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(6,%0) \n"
"mov.b r0,@(1,%1) \n"
"mov #0,r0 \n"
"shlr r1 \n"
"rotcl r0 \n"
"shlr r2 \n"
"rotcl r0 \n"
"mov.b r0,@(7,%0) \n"
"mov.b r0,@%1 \n"
: /* outputs */
: /* inputs */
/* %0 */ "r"(patpix[i+1024][j]),
/* %1 */ "r"(patpix[i][j]),
/* %2 */ "r"(&vram[(i<<4)|(j<<1)])
: /* clobbers */
"r0", "r1", "r2"
);
#elif defined(CPU_COLDFIRE)
#if defined(CPU_COLDFIRE)
asm volatile (
"move.b (%2),%%d2 \n"
"move.b (1,%2),%%d1 \n"
@ -229,85 +160,7 @@ static void updatepatpix(void)
patpix[i+1024][j][7-k];
#endif
}
#if CONFIG_CPU == SH7034
asm volatile (
"mov.l @%0,r0 \n"
"mov.l @(4,%0),r1 \n"
"mov.l r0,@(56,%1) \n"
"mov.l r1,@(60,%1) \n"
"mov.l @(8,%0),r0 \n"
"mov.l @(12,%0),r1 \n"
"mov.l r0,@(48,%1) \n"
"mov.l r1,@(52,%1) \n"
"mov.l @(16,%0),r0 \n"
"mov.l @(20,%0),r1 \n"
"mov.l r0,@(40,%1) \n"
"mov.l r1,@(44,%1) \n"
"mov.l @(24,%0),r0 \n"
"mov.l @(28,%0),r1 \n"
"mov.l r0,@(32,%1) \n"
"mov.l r1,@(36,%1) \n"
"mov.l @(32,%0),r0 \n"
"mov.l @(36,%0),r1 \n"
"mov.l r0,@(24,%1) \n"
"mov.l r1,@(28,%1) \n"
"mov.l @(40,%0),r0 \n"
"mov.l @(44,%0),r1 \n"
"mov.l r0,@(16,%1) \n"
"mov.l r1,@(20,%1) \n"
"mov.l @(48,%0),r0 \n"
"mov.l @(52,%0),r1 \n"
"mov.l r0,@(8,%1) \n"
"mov.l r1,@(12,%1) \n"
"mov.l @(56,%0),r0 \n"
"mov.l @(60,%0),r1 \n"
"mov.l r0,@%1 \n"
"mov.l r1,@(4,%1) \n"
"add %2,%0 \n"
"add %2,%1 \n"
"mov.l @%0,r0 \n"
"mov.l @(4,%0),r1 \n"
"mov.l r0,@(56,%1) \n"
"mov.l r1,@(60,%1) \n"
"mov.l @(8,%0),r0 \n"
"mov.l @(12,%0),r1 \n"
"mov.l r0,@(48,%1) \n"
"mov.l r1,@(52,%1) \n"
"mov.l @(16,%0),r0 \n"
"mov.l @(20,%0),r1 \n"
"mov.l r0,@(40,%1) \n"
"mov.l r1,@(44,%1) \n"
"mov.l @(24,%0),r0 \n"
"mov.l @(28,%0),r1 \n"
"mov.l r0,@(32,%1) \n"
"mov.l r1,@(36,%1) \n"
"mov.l @(32,%0),r0 \n"
"mov.l @(36,%0),r1 \n"
"mov.l r0,@(24,%1) \n"
"mov.l r1,@(28,%1) \n"
"mov.l @(40,%0),r0 \n"
"mov.l @(44,%0),r1 \n"
"mov.l r0,@(16,%1) \n"
"mov.l r1,@(20,%1) \n"
"mov.l @(48,%0),r0 \n"
"mov.l @(52,%0),r1 \n"
"mov.l r0,@(8,%1) \n"
"mov.l r1,@(12,%1) \n"
"mov.l @(56,%0),r0 \n"
"mov.l @(60,%0),r1 \n"
"mov.l r0,@%1 \n"
"mov.l r1,@(4,%1) \n"
: /* outputs */
: /* inputs */
/* %0 */ "r"(patpix[i][0]),
/* %1 */ "r"(patpix[i+2048][0]),
/* %2 */ "r"(1024*64)
: /* clobbers */
"r0", "r1"
);
#elif defined(CPU_COLDFIRE)
#if defined(CPU_COLDFIRE)
asm volatile (
"movem.l (%0),%%d0-%%d3 \n"
"move.l %%d0,%%d4 \n"

View file

@ -110,16 +110,6 @@ static void setoptions (void)
options.SELECT = BUTTON_SELECT;
options.MENU = BUTTON_OFF;
#elif CONFIG_KEYPAD == RECORDER_PAD
options.UP = BUTTON_UP;
options.DOWN = BUTTON_DOWN;
options.A = BUTTON_F1;
options.B = BUTTON_F2;
options.START = BUTTON_F3;
options.SELECT = BUTTON_PLAY;
options.MENU = BUTTON_OFF;
#elif CONFIG_KEYPAD == IPOD_4G_PAD
options.UP = BUTTON_MENU;
options.DOWN = BUTTON_PLAY;

View file

@ -91,9 +91,6 @@ void ev_poll(void)
if (rb->button_hold()&~holdbutton)
fb.mode=(fb.mode+1)%4;
holdbutton=rb->button_hold();
#elif CONFIG_KEYPAD == RECORDER_PAD
if (pressed & BUTTON_ON)
fb.mode=(fb.mode+1)%4;
#endif
#ifdef HAVE_WHEEL_POSITION
@ -220,12 +217,10 @@ void ev_poll(void)
#else
if(pressed & options.MENU) {
#endif
#if (CONFIG_KEYPAD != RECORDER_PAD)
#ifdef HAVE_WHEEL_POSITION
rb->wheel_send_events(true);
#endif
if (do_user_menu() == USER_MENU_QUIT)
#endif
{
die("");
cleanshut=1;
@ -300,54 +295,6 @@ void vid_update(int scanline)
balance += LCD_WIDTH;
if (balance > 0)
{
#if (CONFIG_CPU == SH7034) && !defined(SIMULATOR)
asm volatile (
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"mov.b @%0,r0 \n"
"add %1,%0 \n"
"tst #0x02, r0 \n" /* ~bit 1 */
"rotcr r1 \n"
"shlr16 r1 \n"
"shlr8 r1 \n"
"not r1,r1 \n" /* account for negated bits */
"mov.b r1,@%2 \n"
: /* outputs */
: /* inputs */
/* %0 */ "r"(scan.buf[0] + cnt),
/* %1 */ "r"(256), /* scan.buf line length */
/* %2 */ "r"(frameb++)
: /* clobbers */
"r0", "r1"
);
#else
register unsigned scrbyte = 0;
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02;
@ -358,7 +305,6 @@ void vid_update(int scanline)
if (scan.buf[6][cnt] & 0x02) scrbyte |= 0x40;
if (scan.buf[7][cnt] & 0x02) scrbyte |= 0x80;
*(frameb++) = scrbyte;
#endif
balance -= 160;
}
cnt ++;

View file

@ -21,26 +21,7 @@
#include "plugin.h"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define PUZZLE_QUIT BUTTON_OFF
#define PUZZLE_LEFT BUTTON_LEFT
#define PUZZLE_RIGHT BUTTON_RIGHT
#define PUZZLE_UP BUTTON_UP
#define PUZZLE_DOWN BUTTON_DOWN
#define PUZZLE_SHUFFLE BUTTON_F1
#define PUZZLE_PICTURE BUTTON_F2
#elif CONFIG_KEYPAD == ONDIO_PAD
#define PUZZLE_QUIT BUTTON_OFF
#define PUZZLE_LEFT BUTTON_LEFT
#define PUZZLE_RIGHT BUTTON_RIGHT
#define PUZZLE_UP BUTTON_UP
#define PUZZLE_DOWN BUTTON_DOWN
#define PUZZLE_SHUFFLE_PICTURE_PRE BUTTON_MENU
#define PUZZLE_SHUFFLE (BUTTON_MENU | BUTTON_REPEAT)
#define PUZZLE_PICTURE (BUTTON_MENU | BUTTON_REL)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define PUZZLE_QUIT BUTTON_OFF
#define PUZZLE_LEFT BUTTON_LEFT
@ -853,15 +834,7 @@ enum plugin_status plugin_start(
/* print instructions */
rb->lcd_clear_display();
rb->lcd_setfont(FONT_SYSFIXED);
#if CONFIG_KEYPAD == RECORDER_PAD
rb->lcd_putsxy(3, 18, "[OFF] to stop");
rb->lcd_putsxy(3, 28, "[F1] shuffle");
rb->lcd_putsxy(3, 38, "[F2] change pic");
#elif CONFIG_KEYPAD == ONDIO_PAD
rb->lcd_putsxy(0, 18, "[OFF] to stop");
rb->lcd_putsxy(0, 28, "[MODE..] shuffle");
rb->lcd_putsxy(0, 38, "[MODE] change pic");
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || \
(CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
rb->lcd_putsxy(0, 18, "[S-MENU] to stop");

View file

@ -41,24 +41,8 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define SNAKE_QUIT BUTTON_OFF
#define SNAKE_LEFT BUTTON_LEFT
#define SNAKE_RIGHT BUTTON_RIGHT
#define SNAKE_UP BUTTON_UP
#define SNAKE_DOWN BUTTON_DOWN
#define SNAKE_PLAYPAUSE BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SNAKE_QUIT BUTTON_OFF
#define SNAKE_LEFT BUTTON_LEFT
#define SNAKE_RIGHT BUTTON_RIGHT
#define SNAKE_UP BUTTON_UP
#define SNAKE_DOWN BUTTON_DOWN
#define SNAKE_PLAYPAUSE BUTTON_MENU
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define SNAKE_QUIT BUTTON_OFF
#define SNAKE_LEFT BUTTON_LEFT
#define SNAKE_RIGHT BUTTON_RIGHT

View file

@ -150,26 +150,8 @@ Head and Tail are stored
#endif
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define SNAKE2_LEFT BUTTON_LEFT
#define SNAKE2_RIGHT BUTTON_RIGHT
#define SNAKE2_UP BUTTON_UP
#define SNAKE2_DOWN BUTTON_DOWN
#define SNAKE2_QUIT BUTTON_OFF
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "Play"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SNAKE2_LEFT BUTTON_LEFT
#define SNAKE2_RIGHT BUTTON_RIGHT
#define SNAKE2_UP BUTTON_UP
#define SNAKE2_DOWN BUTTON_DOWN
#define SNAKE2_QUIT BUTTON_OFF
#define SNAKE2_PLAYPAUSE BUTTON_MENU
#define SNAKE2_PLAYPAUSE_TEXT "Menu"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define SNAKE2_LEFT BUTTON_LEFT
#define SNAKE2_RIGHT BUTTON_RIGHT
#define SNAKE2_UP BUTTON_UP

View file

@ -64,11 +64,7 @@
#endif
/* size of code+bss */
#if CONFIG_CPU == SH7034
#define CODE_SIZE 0x3000 /* 12k */
#else
#define CODE_SIZE 0x5000 /* 20k */
#endif
#define CODE_AND_UNDO_SIZE (CODE_SIZE+0x1000) /* + 4k */
@ -104,39 +100,8 @@
#define SOKOBAN_MOVE_MIN SOKOBAN_MOVE_DOWN
/* variable button definitions */
#if (CONFIG_KEYPAD == RECORDER_PAD)
#define SOKOBAN_LEFT BUTTON_LEFT
#define SOKOBAN_RIGHT BUTTON_RIGHT
#define SOKOBAN_UP BUTTON_UP
#define SOKOBAN_DOWN BUTTON_DOWN
#define SOKOBAN_MENU BUTTON_OFF
#define SOKOBAN_UNDO BUTTON_ON
#define SOKOBAN_REDO BUTTON_PLAY
#define SOKOBAN_LEVEL_DOWN BUTTON_F1
#define SOKOBAN_LEVEL_REPEAT BUTTON_F2
#define SOKOBAN_LEVEL_UP BUTTON_F3
#define SOKOBAN_PAUSE BUTTON_PLAY
#define BUTTON_SAVE BUTTON_ON
#define BUTTON_SAVE_NAME "ON"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SOKOBAN_LEFT BUTTON_LEFT
#define SOKOBAN_RIGHT BUTTON_RIGHT
#define SOKOBAN_UP BUTTON_UP
#define SOKOBAN_DOWN BUTTON_DOWN
#define SOKOBAN_MENU BUTTON_OFF
#define SOKOBAN_UNDO_PRE BUTTON_MENU
#define SOKOBAN_UNDO (BUTTON_MENU | BUTTON_REL)
#define SOKOBAN_REDO (BUTTON_MENU | BUTTON_DOWN)
#define SOKOBAN_LEVEL_DOWN (BUTTON_MENU | BUTTON_LEFT)
#define SOKOBAN_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP)
#define SOKOBAN_LEVEL_UP (BUTTON_MENU | BUTTON_RIGHT)
#define SOKOBAN_PAUSE BUTTON_MENU
#define BUTTON_SAVE BUTTON_MENU
#define BUTTON_SAVE_NAME "MENU"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define SOKOBAN_LEFT BUTTON_LEFT
#define SOKOBAN_RIGHT BUTTON_RIGHT
#define SOKOBAN_UP BUTTON_UP
@ -1642,22 +1607,8 @@ static int sokoban_menu(void)
rb->screens[i]->clear_display();
rb->lcd_setfont(SOKOBAN_FONT);
#if (CONFIG_KEYPAD == RECORDER_PAD)
rb->lcd_putsxy(3, 6, "[OFF] Menu");
rb->lcd_putsxy(3, 16, "[ON] Undo");
rb->lcd_putsxy(3, 26, "[PLAY] Redo");
rb->lcd_putsxy(3, 36, "[F1] Down a Level");
rb->lcd_putsxy(3, 46, "[F2] Restart Level");
rb->lcd_putsxy(3, 56, "[F3] Up a Level");
#elif CONFIG_KEYPAD == ONDIO_PAD
rb->lcd_putsxy(3, 6, "[OFF] Menu");
rb->lcd_putsxy(3, 16, "[MODE] Undo");
rb->lcd_putsxy(3, 26, "[MODE+DOWN] Redo");
rb->lcd_putsxy(3, 36, "[MODE+LEFT] Previous Level");
rb->lcd_putsxy(3, 46, "[MODE+UP] Restart Level");
rb->lcd_putsxy(3, 56, "[MODE+RIGHT] Up Level");
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
rb->lcd_putsxy(3, 6, "[STOP] Menu");
rb->lcd_putsxy(3, 16, "[REC] Undo");
rb->lcd_putsxy(3, 26, "[MODE] Redo");

View file

@ -32,51 +32,8 @@
* Key definitions
*/
#if CONFIG_KEYPAD == RECORDER_PAD
# define SOL_QUIT BUTTON_OFF
# define SOL_UP BUTTON_UP
# define SOL_DOWN BUTTON_DOWN
# define SOL_LEFT BUTTON_LEFT
# define SOL_RIGHT BUTTON_RIGHT
# define SOL_MOVE BUTTON_ON
# define SOL_DRAW BUTTON_F1
# define SOL_REM2CUR BUTTON_PLAY
# define SOL_CUR2STACK BUTTON_F2
# define SOL_REM2STACK BUTTON_F3
# define HK_MOVE "ON"
# define HK_DRAW "F1"
# define HK_REM2CUR "PLAY"
# define HK_CUR2STACK "F2"
# define HK_REM2STACK "F3"
#elif CONFIG_KEYPAD == ONDIO_PAD
# define SOL_QUIT BUTTON_OFF
# define SOL_UP_PRE BUTTON_UP
# define SOL_UP (BUTTON_UP | BUTTON_REL)
# define SOL_DOWN_PRE BUTTON_DOWN
# define SOL_DOWN (BUTTON_DOWN | BUTTON_REL)
# define SOL_LEFT_PRE BUTTON_LEFT
# define SOL_LEFT (BUTTON_LEFT | BUTTON_REL)
# define SOL_RIGHT_PRE BUTTON_RIGHT
# define SOL_RIGHT (BUTTON_RIGHT | BUTTON_REL)
# define SOL_MOVE_PRE BUTTON_MENU
# define SOL_MOVE (BUTTON_MENU | BUTTON_REL)
# define SOL_DRAW_PRE BUTTON_MENU
# define SOL_DRAW (BUTTON_MENU | BUTTON_REPEAT)
# define SOL_REM2CUR_PRE BUTTON_DOWN
# define SOL_REM2CUR (BUTTON_DOWN | BUTTON_REPEAT)
# define SOL_CUR2STACK_PRE BUTTON_UP
# define SOL_CUR2STACK (BUTTON_UP | BUTTON_REPEAT)
# define SOL_REM2STACK_PRE BUTTON_RIGHT
# define SOL_REM2STACK (BUTTON_RIGHT | BUTTON_REPEAT)
# define HK_MOVE "MODE"
# define HK_DRAW "MODE.."
# define HK_REM2CUR "DOWN.."
# define HK_CUR2STACK "UP.."
# define HK_REM2STACK "RIGHT.."
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
# define SOL_QUIT BUTTON_OFF
# define SOL_UP BUTTON_UP
# define SOL_DOWN BUTTON_DOWN

View file

@ -28,26 +28,8 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define AST_PAUSE BUTTON_ON
#define AST_QUIT BUTTON_OFF
#define AST_THRUST BUTTON_UP
#define AST_HYPERSPACE BUTTON_DOWN
#define AST_LEFT BUTTON_LEFT
#define AST_RIGHT BUTTON_RIGHT
#define AST_FIRE BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
#define AST_PAUSE (BUTTON_MENU | BUTTON_OFF)
#define AST_QUIT BUTTON_OFF
#define AST_THRUST BUTTON_UP
#define AST_HYPERSPACE BUTTON_DOWN
#define AST_LEFT BUTTON_LEFT
#define AST_RIGHT BUTTON_RIGHT
#define AST_FIRE BUTTON_MENU
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define AST_PAUSE BUTTON_REC
#define AST_QUIT BUTTON_OFF
#define AST_THRUST BUTTON_UP

View file

@ -24,27 +24,7 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define SPLITEDIT_QUIT BUTTON_OFF
#define SPLITEDIT_PLAY BUTTON_PLAY
#define SPLITEDIT_SAVE BUTTON_F1
#define SPLITEDIT_LOOP_MODE BUTTON_F2
#define SPLITEDIT_SCALE BUTTON_F3
#define SPLITEDIT_SPEED50 (BUTTON_ON | BUTTON_LEFT)
#define SPLITEDIT_SPEED100 (BUTTON_ON | BUTTON_PLAY)
#define SPLITEDIT_SPEED150 (BUTTON_ON | BUTTON_RIGHT)
#define SPLITEDIT_MENU_RUN BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SPLITEDIT_QUIT BUTTON_OFF
#define SPLITEDIT_PLAY_PRE BUTTON_MENU
#define SPLITEDIT_PLAY (BUTTON_MENU | BUTTON_REL)
#define SPLITEDIT_SAVE (BUTTON_MENU | BUTTON_LEFT)
#define SPLITEDIT_LOOP_MODE (BUTTON_MENU | BUTTON_UP)
#define SPLITEDIT_SCALE (BUTTON_MENU | BUTTON_RIGHT)
#define SPLITEDIT_MENU_RUN BUTTON_RIGHT
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#if CONFIG_KEYPAD == IRIVER_H100_PAD
#define SPLITEDIT_QUIT BUTTON_OFF
#define SPLITEDIT_PLAY BUTTON_ON
#define SPLITEDIT_SAVE BUTTON_SELECT
@ -279,12 +259,6 @@ static void update_icons(void)
LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
/* The scale icon */
rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs() ? 1 : 0],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
#else
{
static int idx;
if (idx < 0 || idx > 1) idx = 0;
@ -293,7 +267,6 @@ static void update_icons(void)
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
}
#endif
rb->lcd_update_rect(0, LCD_HEIGHT - BMPHEIGHT, LCD_WIDTH, BMPHEIGHT);
}
@ -961,14 +934,7 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
{
/* read volume info */
unsigned short volume;
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
volume = rb->mas_codec_readreg(0x0c);
volume += rb->mas_codec_readreg(0x0d);
volume = volume / 2;
volume = rb->peak_meter_scale_value(volume, OSCI_HEIGHT);
#else
volume = OSCI_HEIGHT / 2;
#endif
/* update osci_buffer */
if (osci_valid || lastx == x)
@ -1126,25 +1092,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
lastx = time_to_xpos(mp3->elapsed);
break;
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#ifdef SPLITEDIT_SPEED100
case SPLITEDIT_SPEED150:
rb->sound_set_pitch(150L*PITCH_SPEED_PRECISION);
splitedit_invalidate_osci();
break;
case SPLITEDIT_SPEED100:
rb->sound_set_pitch(PITCH_SPEED_100);
splitedit_invalidate_osci();
break;
case SPLITEDIT_SPEED50:
rb->sound_set_pitch(50L*PITCH_SPEED_PRECISION);
splitedit_invalidate_osci();
break;
#endif
#endif
case BUTTON_LEFT:
case BUTTON_LEFT | BUTTON_REPEAT:
if (splitedit_get_split_x() > OSCI_X + 2)
@ -1185,9 +1132,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
break;
case SPLITEDIT_SCALE:
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
rb->peak_meter_set_use_dbfs(!rb->peak_meter_get_use_dbfs());
#endif
splitedit_invalidate_osci();
update_icons();
break;
@ -1257,12 +1201,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
}
}
}
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#ifdef SPLITEDIT_SPEED100
rb->sound_set_pitch(1000); /* make sure to reset pitch */
#endif
#endif
}
return retval;
}

View file

@ -57,42 +57,8 @@
#define STAR_CONTROL_BLOCK 1
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define STAR_QUIT BUTTON_OFF
#define STAR_LEFT BUTTON_LEFT
#define STAR_RIGHT BUTTON_RIGHT
#define STAR_UP BUTTON_UP
#define STAR_DOWN BUTTON_DOWN
#define STAR_TOGGLE_CONTROL BUTTON_ON
#define STAR_TOGGLE_CONTROL2 BUTTON_PLAY
#define STAR_LEVEL_UP BUTTON_F3
#define STAR_LEVEL_DOWN BUTTON_F1
#define STAR_LEVEL_REPEAT BUTTON_F2
#define STAR_TOGGLE_CONTROL_NAME "ON"
#define STAR_QUIT_NAME "OFF"
#define STAR_LEVEL_UP_NAME "F3"
#define STAR_LEVEL_DOWN_NAME "F1"
#define STAR_LEVEL_REPEAT_NAME "F2"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define STAR_QUIT BUTTON_OFF
#define STAR_LEFT BUTTON_LEFT
#define STAR_RIGHT BUTTON_RIGHT
#define STAR_UP BUTTON_UP
#define STAR_DOWN BUTTON_DOWN
#define STAR_TOGGLE_CONTROL_PRE BUTTON_MENU
#define STAR_TOGGLE_CONTROL (BUTTON_MENU | BUTTON_REL)
#define STAR_LEVEL_UP (BUTTON_MENU | BUTTON_RIGHT)
#define STAR_LEVEL_DOWN (BUTTON_MENU | BUTTON_LEFT)
#define STAR_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP)
#define STAR_TOGGLE_CONTROL_NAME "MODE"
#define STAR_QUIT_NAME "OFF"
#define STAR_LEVEL_UP_NAME "M >"
#define STAR_LEVEL_DOWN_NAME "M <"
#define STAR_LEVEL_REPEAT_NAME "M ^"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define STAR_QUIT BUTTON_OFF
#define STAR_LEFT BUTTON_LEFT
#define STAR_RIGHT BUTTON_RIGHT

View file

@ -220,23 +220,17 @@ static int plugin_main(void)
rb->sleep(1);
rb->lcd_clear_display();
#if ((CONFIG_CODEC == SWCODEC) || !defined(SIMULATOR) && \
((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)))
#if (CONFIG_CODEC == SWCODEC)
/* This will make the stars pulse to the music */
if(pulse){
/* Get the peaks. ( Borrowed from vu_meter ) */
#if (CONFIG_CODEC == SWCODEC)
static struct pcm_peaks peaks;
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
&peaks);
#define left_peak peaks.left
#define right_peak peaks.right
#else
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);
#endif
/* Devide peak data by 4098 to bring the max
value down from ~32k to 8 */
left_peak = left_peak/0x1000;
@ -261,8 +255,6 @@ static int plugin_main(void)
starfield.z_move = avg_peak;
} /* if pulse */
#else
(void) avg_peak;
#endif
starfield_move_and_draw(&starfield);

View file

@ -35,31 +35,7 @@
#define STOPWATCH_FILE PLUGIN_APPS_DATA_DIR "/stopwatch.dat"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define STOPWATCH_QUIT BUTTON_OFF
#define STOPWATCH_START_STOP BUTTON_PLAY
#define STOPWATCH_RESET_TIMER BUTTON_LEFT
#define STOPWATCH_LAP_TIMER BUTTON_ON
#define STOPWATCH_SCROLL_UP BUTTON_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == ONDIO_PAD
#define STOPWATCH_QUIT BUTTON_OFF
#define STOPWATCH_START_STOP BUTTON_RIGHT
#define STOPWATCH_RESET_TIMER BUTTON_LEFT
#define STOPWATCH_LAP_TIMER BUTTON_MENU
#define STOPWATCH_SCROLL_UP BUTTON_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == PLAYER_PAD
#define STOPWATCH_QUIT BUTTON_MENU
#define STOPWATCH_START_STOP BUTTON_PLAY
#define STOPWATCH_RESET_TIMER BUTTON_STOP
#define STOPWATCH_LAP_TIMER BUTTON_ON
#define STOPWATCH_SCROLL_UP BUTTON_RIGHT
#define STOPWATCH_SCROLL_DOWN BUTTON_LEFT
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define STOPWATCH_QUIT BUTTON_OFF
#define STOPWATCH_START_STOP BUTTON_SELECT

View file

@ -27,31 +27,8 @@
#define GAME_FILE PLUGIN_GAMES_DIR "/sudoku.ss"
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define SUDOKU_BUTTON_QUIT BUTTON_OFF
#define SUDOKU_BUTTON_UP BUTTON_UP
#define SUDOKU_BUTTON_DOWN BUTTON_DOWN
#define SUDOKU_BUTTON_LEFT BUTTON_LEFT
#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT
#define SUDOKU_BUTTON_TOGGLE BUTTON_PLAY
#define SUDOKU_BUTTON_MENU BUTTON_F1
#define SUDOKU_BUTTON_POSSIBLE BUTTON_F2
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SUDOKU_BUTTON_QUIT BUTTON_OFF
#define SUDOKU_BUTTON_UP BUTTON_UP
#define SUDOKU_BUTTON_DOWN BUTTON_DOWN
#define SUDOKU_BUTTON_LEFT BUTTON_LEFT
#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT
#define SUDOKU_BUTTON_ALTTOGGLE (BUTTON_MENU | BUTTON_DOWN)
#define SUDOKU_BUTTON_TOGGLE_PRE BUTTON_MENU
#define SUDOKU_BUTTON_TOGGLE (BUTTON_MENU | BUTTON_REL)
#define SUDOKU_BUTTON_MENU_PRE BUTTON_MENU
#define SUDOKU_BUTTON_MENU (BUTTON_MENU | BUTTON_REPEAT)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_MENU | BUTTON_LEFT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define SUDOKU_BUTTON_QUIT BUTTON_OFF
#define SUDOKU_BUTTON_UP BUTTON_UP
#define SUDOKU_BUTTON_DOWN BUTTON_DOWN

View file

@ -44,11 +44,7 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
#endif /*HAVE_SCROLLWHEEL*/
/* Default refresh rates in 1/10 Hz */
#if defined ARCHOS_RECORDER || defined ARCHOS_FMRECORDER \
|| defined ARCHOS_RECORDERV2 || defined ARCHOS_ONDIOFM \
|| defined ARCHOS_ONDIOSP
#define DEFAULT_SCAN_RATE 670
#elif defined IAUDIO_M3
#if defined IAUDIO_M3
#define DEFAULT_SCAN_RATE 1500
#define HORIZ_SCAN /* LCD controller updates the panel sideways */
#define NEED_BOOST

View file

@ -44,46 +44,8 @@
* TV_COLUMN_RIGHT one column right
*/
/* Recorder keys */
#if CONFIG_KEYPAD == RECORDER_PAD
#define TV_QUIT BUTTON_OFF
#define TV_SCROLL_UP BUTTON_UP
#define TV_SCROLL_DOWN BUTTON_DOWN
#define TV_SCREEN_LEFT BUTTON_LEFT
#define TV_SCREEN_RIGHT BUTTON_RIGHT
#define TV_MENU BUTTON_F1
#define TV_AUTOSCROLL BUTTON_PLAY
#define TV_LINE_UP (BUTTON_ON | BUTTON_UP)
#define TV_LINE_DOWN (BUTTON_ON | BUTTON_DOWN)
#define TV_COLUMN_LEFT (BUTTON_ON | BUTTON_LEFT)
#define TV_COLUMN_RIGHT (BUTTON_ON | BUTTON_RIGHT)
#define TV_BOOKMARK BUTTON_F2
/* Ondio keys */
#elif CONFIG_KEYPAD == ONDIO_PAD
#define TV_QUIT BUTTON_OFF
#define TV_SCROLL_UP BUTTON_UP
#define TV_SCROLL_DOWN BUTTON_DOWN
#define TV_SCREEN_LEFT BUTTON_LEFT
#define TV_SCREEN_RIGHT BUTTON_RIGHT
#define TV_MENU (BUTTON_MENU|BUTTON_REPEAT)
#define TV_AUTOSCROLL_PRE BUTTON_MENU
#define TV_AUTOSCROLL (BUTTON_MENU|BUTTON_REL)
#define TV_BOOKMARK (BUTTON_MENU|BUTTON_OFF)
/* Player keys */
#elif CONFIG_KEYPAD == PLAYER_PAD
#define TV_QUIT BUTTON_STOP
#define TV_SCROLL_UP BUTTON_LEFT
#define TV_SCROLL_DOWN BUTTON_RIGHT
#define TV_SCREEN_LEFT (BUTTON_ON|BUTTON_LEFT)
#define TV_SCREEN_RIGHT (BUTTON_ON|BUTTON_RIGHT)
#define TV_MENU BUTTON_MENU
#define TV_AUTOSCROLL BUTTON_PLAY
#define TV_BOOKMARK BUTTON_ON
/* iRiver H1x0 && H3x0 keys */
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define TV_QUIT BUTTON_OFF
#define TV_RC_QUIT BUTTON_RC_STOP

File diff suppressed because it is too large Load diff

View file

@ -24,32 +24,8 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define VUMETER_QUIT BUTTON_OFF
#define VUMETER_HELP BUTTON_ON
#define VUMETER_MENU BUTTON_F1
#define VUMETER_UP BUTTON_UP
#define VUMETER_DOWN BUTTON_DOWN
#define LABEL_HELP "ON"
#define LABEL_QUIT "OFF"
#define LABEL_MENU "F1"
#define LABEL_VOLUME "UP/DOWN"
#elif CONFIG_KEYPAD == ONDIO_PAD
#define VUMETER_QUIT BUTTON_OFF
#define VUMETER_HELP_PRE BUTTON_MENU
#define VUMETER_HELP (BUTTON_MENU | BUTTON_REL)
#define VUMETER_MENU_PRE BUTTON_MENU
#define VUMETER_MENU (BUTTON_MENU | BUTTON_REPEAT)
#define VUMETER_UP BUTTON_UP
#define VUMETER_DOWN BUTTON_DOWN
#define LABEL_HELP "MODE"
#define LABEL_QUIT "OFF"
#define LABEL_MENU "MODE.."
#define LABEL_VOLUME "UP/DOWN"
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define VUMETER_QUIT BUTTON_OFF
#define VUMETER_HELP BUTTON_ON
#define VUMETER_MENU BUTTON_SELECT
@ -804,10 +780,7 @@ static void draw_digital_minimeters(void) {
static void analog_meter(void) {
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);
#elif (CONFIG_CODEC == SWCODEC)
#if (CONFIG_CODEC == SWCODEC)
static struct pcm_peaks peaks;
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
&peaks);
@ -864,10 +837,7 @@ static void analog_meter(void) {
}
static void digital_meter(void) {
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);
#elif (CONFIG_CODEC == SWCODEC)
#if (CONFIG_CODEC == SWCODEC)
static struct pcm_peaks peaks;
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
&peaks);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -46,36 +46,8 @@ static long max_cycle;
when a new argh is made */
#define MIN_ARGH_DIST 5
#if (CONFIG_KEYPAD == RECORDER_PAD)
#define BTN_DIR_UP BUTTON_UP
#define BTN_DIR_DOWN BUTTON_DOWN
#define BTN_DIR_LEFT BUTTON_LEFT
#define BTN_DIR_RIGHT BUTTON_RIGHT
#define BTN_PLAYER2_DIR1 BUTTON_F2
#define BTN_PLAYER2_DIR2 BUTTON_F3
#define BTN_STARTPAUSE BUTTON_PLAY
#define BTN_QUIT BUTTON_OFF
#define BTN_STOPRESET BUTTON_ON
#define BTN_TOGGLE_KEYS BUTTON_F1
#if BUTTON_REMOTE != 0
#define BTN_RC_UP BUTTON_RC_VOL_UP
#define BTN_RC_DOWN BUTTON_RC_VOL_DOWN
#define REMOTE
#define MULTIPLAYER
#endif
#elif (CONFIG_KEYPAD == ONDIO_PAD)
#define BTN_DIR_UP BUTTON_UP
#define BTN_DIR_DOWN BUTTON_DOWN
#define BTN_DIR_LEFT BUTTON_LEFT
#define BTN_DIR_RIGHT BUTTON_RIGHT
#define BTN_STARTPAUSE (BUTTON_MENU|BUTTON_REL)
#define BTN_QUIT (BUTTON_OFF|BUTTON_REL)
#define BTN_STOPRESET (BUTTON_OFF|BUTTON_MENU)
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define BTN_DIR_UP BUTTON_MENU
#define BTN_DIR_DOWN BUTTON_PLAY

View file

@ -115,24 +115,6 @@
#define DOWN BUTTON_SCROLL_DOWN
#define PAUSE BUTTON_PLAY
#elif CONFIG_KEYPAD == RECORDER_PAD
#define QUIT BUTTON_OFF
#define LEFT BUTTON_LEFT
#define RIGHT BUTTON_RIGHT
#define DOWN BUTTON_DOWN
#define UP BUTTON_UP
#define PAUSE BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
#define QUIT BUTTON_OFF
#define LEFT BUTTON_LEFT
#define RIGHT BUTTON_RIGHT
#define DOWN BUTTON_DOWN
#define UP BUTTON_UP
#define PAUSE BUTTON_MENU
#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
#define QUIT BUTTON_BACK

View file

@ -47,24 +47,8 @@
#define ZX_SELECT BUTTON_SELECT
#define ZX_MENU BUTTON_PLAY
#elif CONFIG_KEYPAD == RECORDER_PAD
#define ZX_SELECT BUTTON_PLAY
#define ZX_MENU BUTTON_F1
#define ZX_LEFT BUTTON_LEFT
#define ZX_RIGHT BUTTON_RIGHT
#define ZX_UP BUTTON_UP
#define ZX_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == ONDIO_PAD
#define ZX_SELECT BUTTON_MENU
#define ZX_MENU BUTTON_OFF
#define ZX_LEFT BUTTON_LEFT
#define ZX_RIGHT BUTTON_RIGHT
#define ZX_UP BUTTON_UP
#define ZX_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define ZX_SELECT BUTTON_SELECT
#define ZX_SELECT BUTTON_SELECT
#define ZX_MENU BUTTON_PLAY
#define ZX_LEFT BUTTON_LEFT
#define ZX_RIGHT BUTTON_RIGHT

Some files were not shown because too many files have changed in this diff Show more