Only in /home/dast/src/rockbox: CVS
Only in /home/dast/src/rockbox: CVSROOT
Only in /home/dast/src/rockbox/apps: CVS
Only in /home/dast/src/rockbox/apps: FILES
diff -rubBP /home/dast/src/rockbox/apps/Makefile ./apps/Makefile
--- /home/dast/src/rockbox/apps/Makefile	Wed Nov 19 08:14:19 2003
+++ ./apps/Makefile	Mon Nov 24 03:49:11 2003
@@ -1,12 +1,3 @@
-#             __________               __   ___.
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/
-# $Id: Makefile,v 1.56 2003/11/19 07:14:19 bagder Exp $
-#
-
 # $@ is the name to the left of the colon
 # $> is the first name to the right of the colon
 
@@ -25,17 +16,9 @@
 
 CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes	\
 -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES)	\
--DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEM} -DPLUGIN=1
+-DAPPSVERSION=\"$(VERSION)\" -DAPPSBUILD=\"$(BUILD)\" $(EXTRA_DEFINES) -DPLUGIN=1 
 AFLAGS += -small -relax
 
-# Check if this is a kind of Recorder
-ANYREC = $(findstring RECORDER, $(TARGET))
-
-ifndef MEM
-    # if MEM is not set, assume 2MB
-    MEM=2
-endif
-
 LDS := $(FIRMWARE)/app.lds
 
 ifdef DEBUG
@@ -45,24 +28,9 @@
 
 SRC := $(wildcard *.c)
 
-ifeq ($(TARGET), -DARCHOS_FMRECORDER)
-   SCRAMBLE_OPT = -fm
-endif
-ifeq ($(TARGET), -DARCHOS_RECORDERV2)
-   SCRAMBLE_OPT = -v2
-endif
-
-ifeq ($(ANYREC), RECORDER)
-   SRC += $(wildcard recorder/*.c)
-   CFLAGS += -Irecorder
-   OUTNAME = ajbrec.ajz
-else
-   SRC += $(wildcard player/*.c)
-   CFLAGS += -Iplayer
-   OUTNAME = archos.mod
-endif
+OUTNAME = OpenNeo.bin
 
-OBJS := $(OBJDIR)/lang.o $(SRC:%.c=$(OBJDIR)/%.o)
+OBJS := $(OBJDIR)/lang.o $(OBJDIR)/crt0.o $(SRC:%.c=$(OBJDIR)/%.o)
 
 LINKFILE = $(OBJDIR)/linkage.lds
 
@@ -71,57 +39,39 @@
 	@echo "Don't run make here. Run the tools/configure script from your own build"
 	@echo "directory, then run make there."
 	@echo
-	@echo "More help on how to build rockbox can be found here:"
-	@echo "http://rockbox.haxx.se/docs/how_to_compile.html"
+	@echo "More help on how to build Open Neo can be found here:"
+	@echo "http://ssiamerica.com/open/"
 endif
 
 ifndef TOOLSDIR
 	TOOLSDIR=../tools
 endif
 
-all : $(OBJDIR)/$(OUTNAME) $(OBJDIR)/rockbox.ucl rocks
+all : $(OBJDIR)/$(OUTNAME) $(OBJDIR)/openneo.bin
 
-rocks:
-	$(MAKE) -C plugins TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM}
+$(OBJDIR)/libopenneo.a:
+	make -C $(FIRMWARE) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR)
 
-$(OBJDIR)/librockbox.a:
-	make -C $(FIRMWARE) TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR)
-
-# MEM should be passed on to this makefile with the chosen memory size given
-# in number of MB
 $(LINKFILE): $(LDS)
-	cat $< | $(CC) -DMEMORYSIZE=$(MEM) $(DEFINES) -E -P - >$@
+	cat $< | $(CC) $(DEFINES) -E -P - >$@
 
-$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a
-	$(CC) -Os -nostdlib -o $@ $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
+$(OBJDIR)/openneo.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/libopenneo.a
+	$(CC) -Os -nostdlib -o $@ $(OBJS) -L$(OBJDIR) -lopenneo -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/openneo.map
 
-$(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf
+$(OBJDIR)/openneo.bin : $(OBJDIR)/openneo.elf
 	$(OC) -O binary $< $@
 
-$(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin
+$(OBJDIR)/openneo.asm: $(OBJDIR)/openneo.bin
 	$(TOOLSDIR)/sh2d -sh1 $< > $@
 
-$(OBJDIR)/$(OUTNAME) : $(OBJDIR)/rockbox.bin
-	$(TOOLSDIR)/scramble $(SCRAMBLE_OPT) $< $@
-
-$(OBJDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin
-	@a=`uclpack -h 2>/dev/null`; \
-	if test -n "$$a"; then \
-	  echo uclpack --best --2e $< $@ ; \
-	  uclpack --best --2e $< $@ >/dev/null 2>&1; \
-	else \
-	  echo "no uclpack command found, makes a fake UCL file"; \
-	  echo "fake" > $@; \
-	fi
+$(OBJDIR)/$(OUTNAME): $(OBJDIR)/openneo.bin
+	$(TOOLSDIR)/add_header $< $@
 
-$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS
-	perl credits.pl < $< > $@
-
-$(OBJDIR)/credits.o: credits.c credits.h $(OBJDIR)/credits.raw
+$(OBJDIR)/%.o: %.c
 	@mkdir -p `dirname $@`
 	$(CC) $(CFLAGS) -c $< -o $@
 
-$(OBJDIR)/%.o: %.c
+$(OBJDIR)/%.o: %.S
 	@mkdir -p `dirname $@`
 	$(CC) $(CFLAGS) -c $< -o $@
 
@@ -133,20 +83,15 @@
 	$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
 
 clean:
-	-rm -f $(OBJS) $(OBJDIR)/$(OUTNAME) $(OBJDIR)/rockbox.asm \
-	$(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \
+	-rm -f $(OBJS) $(OBJDIR)/$(OUTNAME) $(OBJDIR)/openneo.asm \
+	$(OBJDIR)/openneo.bin $(OBJDIR)/openneo.elf $(OBJDIR)/*.map \
 	$(OBJDIR)/lang.o $(OBJDIR)/build.lang $(OBJDIR)/lang.[ch] \
-	$(OBJDIR)/credits.raw $(LINKFILE) $(OBJDIR)/rockbox.ucl
+	$(LINKFILE)
 	-$(RM) -r $(OBJDIR)/$(DEPS)
-	$(MAKE) -C plugins clean
+	rm -rf *~
 
 DEPS:=.deps
 DEPDIRS:=$(DEPS)
-ifeq ($(ANYREC), RECORDER)
-    DEPDIRS += $(DEPS)/recorder
-else
-    DEPDIRS +=  $(DEPS)/player
-endif
 
 DIRS = $(subst $(DEPS),".",$(DEPDIRS)) 
 
Only in /home/dast/src/rockbox/apps: README
Only in /home/dast/src/rockbox/apps: alarm_menu.c
Only in /home/dast/src/rockbox/apps: alarm_menu.h
diff -rubBP /home/dast/src/rockbox/apps/applimits.h ./apps/applimits.h
--- /home/dast/src/rockbox/apps/applimits.h	Fri Aug 29 13:49:54 2003
+++ ./apps/applimits.h	Wed Oct 29 15:11:59 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: applimits.h,v 1.3 2003/07/01 21:03:28 hardeeps Exp $
- *
- * Copyright (C) 2002 Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _APPLIMITS_H_
 #define _APPLIMITS_H_
 
Only in /home/dast/src/rockbox/apps: credits.c
Only in /home/dast/src/rockbox/apps: credits.h
Only in /home/dast/src/rockbox/apps: credits.pl
diff -rubBP /home/dast/src/rockbox/apps/crt0.S ./apps/crt0.S
--- /home/dast/src/rockbox/apps/crt0.S	Thu Jan  1 01:00:00 1970
+++ ./apps/crt0.S	Wed Oct 29 15:11:59 2003
@@ -0,0 +1,104 @@
+	.section .init.text
+	.global	start
+start:
+	/* copy vector table first */
+	mov.l vbr_k,r1
+	ldc	r1,vbr
+
+	/* Now let's get on with the normal business */
+	mov.l	stack_k,r15
+
+	/* zero out bss */
+	mov.l	edata_k,r0
+	mov.l	end_k,r1
+	mov	#0,r2
+start_l:
+	mov.l	r2,@r0
+	add	#4,r0
+	cmp/ge	r1,r0
+	bf	start_l
+	nop
+
+	/* copy the .data section */
+	mov.l	datacopy_k,r0
+	mov.l	data_k,r1
+	mov.l	dataend_k,r2
+copy_l:
+	mov.l	@r0,r3
+	mov.l	r3,@r1
+	add	#4,r0
+	add	#4,r1
+	cmp/ge	r2,r1
+	bf	copy_l
+	nop
+
+	/* copy the .iram section */
+	mov.l	iramcopy_k,r0
+	mov.l	iram_k,r1
+	mov.l	iramend_k,r2
+copy_l2:
+	mov.l	@r0,r3
+	mov.l	r3,@r1
+	add	#4,r0
+	add	#4,r1
+	cmp/ge	r2,r1
+	bf	copy_l2
+	nop
+
+	/* Munge the main thread stack */
+	mov.l	stack_k,r2
+	mov.l	deadbeef_k,r0
+	mov.l	stackbegin_k,r1
+munge_loop:
+	mov.l	r0,@r1
+	add	#4,r1
+	cmp/ge	r2,r1
+	bf	munge_loop
+	nop
+		
+	mov     #0,r0
+	ldc     r0,gbr
+	
+	! call the mainline	
+	mov.l	main_k,r0
+	jmp	@r0
+	nop
+.hoo:
+    bra .hoo
+
+	.align 2
+stack_k:
+	.long	_stackend	
+stackbegin_k:
+	.long	_stackbegin
+deadbeef_k:
+	.long	0xdeadbeef
+edata_k:
+	.long	_edata
+end_k:
+	.long	_end
+iramcopy_k:
+	.long	_iramcopy
+iram_k:
+	.long	_iramstart
+iramend_k:
+	.long	_iramend
+datacopy_k:
+	.long	_datacopy
+data_k:
+	.long	_datastart
+dataend_k:
+	.long	_dataend
+main_k:
+	.long	_main
+vbr_k:
+	.long	vectors
+orig_vbr_k:
+	.long	0x00020000
+		
+	.section .vectors
+vectors:
+	.long start
+	.long _stackend
+	.long start
+	.long _stackend
Only in /home/dast/src/rockbox/apps: debug_menu.c
Only in /home/dast/src/rockbox/apps: debug_menu.h
diff -rubBP /home/dast/src/rockbox/apps/info.c ./apps/info.c
--- /home/dast/src/rockbox/apps/info.c	Thu Jan  1 01:00:00 1970
+++ ./apps/info.c	Fri Dec  5 01:13:20 2003
@@ -0,0 +1,141 @@
+#include "menu.h"
+#include "lcd.h"
+#include "button.h"
+#include "remote.h"
+#include "version.h"
+#include "sprintf.h"
+#include <string.h>
+#include "fat.h"
+#include "buffer.h"
+#include "lang.h"
+#include "info.h"
+#include "screens.h"
+#include "mas.h"
+
+
+
+bool info_menu(void)
+{
+    int m;
+    bool result;
+
+    struct menu_items items[] = {
+        { str(LANG_OPEN_NEO),		neo_info },
+        { str(LANG_MEMORY),		memory_info },
+        { str(LANG_HARD_DISK),		hd_info },
+        { str(LANG_MPEG_DECODER),	mas_info },
+    };
+
+    m=menu_init( items, sizeof items / sizeof(struct menu_items) );
+    status_set_param(true);
+    result = menu_run(m);
+    status_set_param(false);
+    menu_exit(m);
+    return result;
+}
+
+bool neo_info(void)
+{
+  char s[24];
+ 
+  lcd_clear_display();
+  snprintf( s, sizeof(s), "[%s]",  str(LANG_OPEN_NEO) );
+  lcd_puts_fmt( 0, 0, s, FMT_CENTER );
+  
+  display_field_value( 1, str(LANG_VERSION), appsversion );
+  display_field_value( 2, "Build",  appsbuild );
+  display_field_value( 3, "Voice", str(LANG_SET_BOOL_NO) );
+
+  button_get_flt( true, BUTTON_ALL, BUTTON_ALL, BUTTON_ALL_FLAGS & ~BUTTON_REL );
+  lcd_cancel_scroll();
+  return false;
+}
+
+bool memory_info(void)
+{
+  char s[24];
+  unsigned int buflen = mp3end - mp3buf;
+  unsigned int integer, decimal;
+  
+  lcd_clear_display();
+  snprintf( s, sizeof(s), "[%s]", str(LANG_MEMORY) );
+  lcd_puts_fmt( 0, 0, s, FMT_CENTER );
+  
+  integer = buflen >> 10;   // 1024 = 0x400
+  decimal = (buflen - (integer << 10 )) / 100;
+  snprintf(s, sizeof(s), "%d.%d KB", integer, decimal );
+  
+  display_field_value( 2, "Used", s );
+  
+  button_get_flt( true, BUTTON_ALL, BUTTON_ALL, BUTTON_ALL_FLAGS & ~BUTTON_REL );
+  lcd_cancel_scroll();
+  return false;
+}
+bool hd_info(void)
+{
+  char s[24];
+  unsigned int integer, decimal, size, free;
+  char hdmodel[44];
+  
+  /* Get ATA Disk Name */
+  hdmodel[41] = 0;
+  strncpy( hdmodel, &((char*)ata_get_identify())[54], 40 );
+
+  //remove trailing spaces
+  if( strchr( hdmodel, ' ' ) )
+    *(strchr( hdmodel, ' ' )) = 0;
+
+  lcd_clear_display();
+  snprintf( s, sizeof(s), "[%s]", str(LANG_HARD_DISK) );
+  lcd_puts_fmt( 0, 0, s, FMT_CENTER );
+  
+  display_field_value( 1, str(LANG_MODEL), hdmodel );
+  
+  fat_size( &size, &free );
+  
+  size >>= 10;
+  integer = size >> 10;
+  decimal = (size - ( integer << 10 )) / 100;
+  snprintf(s, sizeof s, str(LANG_GB_STAT), integer, decimal);
+  display_field_value( 2, "Capacity", s );
+  
+  free >>= 10;
+  integer = free >> 10;
+  decimal = (free - ( integer << 10 )) / 100;
+  snprintf(s, sizeof s, str(LANG_GB_STAT), integer, decimal); 
+  display_field_value( 3, str(LANG_FREE), s );
+  
+  button_get_flt( true, BUTTON_ALL, BUTTON_ALL, BUTTON_ALL_FLAGS & ~BUTTON_REL );
+  lcd_cancel_scroll();
+  return false;
+}
+
+bool mas_info(void)
+{
+  char s[24];
+  char* rev;
+
+  switch(mas_version.code ){
+  case 0x0601:
+    rev = "F10";
+    break;
+  case 0x701:
+    rev = "G10";
+    break;
+  default:
+    rev="";
+  }
+  
+  lcd_clear_display();
+  snprintf(s, sizeof(s), "[%s]", str(LANG_MPEG_DECODER) ); 
+  lcd_puts_fmt( 0, 0, s, FMT_CENTER );
+  snprintf(s, sizeof s, "%x-%s",  mas_version.name, rev ); 
+  display_field_value( 1, str(LANG_MODEL), s );
+  snprintf(s, sizeof s, "0x%x",  mas_version.date ); 
+  display_field_value( 2, "Date", s );
+  display_field_value( 3, "Desc", mas_version.description );
+  
+  button_get_flt( true, BUTTON_ALL, BUTTON_ALL, BUTTON_ALL_FLAGS & ~BUTTON_REL );
+  lcd_cancel_scroll();
+  return false;
+}
diff -rubBP /home/dast/src/rockbox/apps/info.h ./apps/info.h
--- /home/dast/src/rockbox/apps/info.h	Thu Jan  1 01:00:00 1970
+++ ./apps/info.h	Tue Dec  2 21:59:15 2003
@@ -0,0 +1,11 @@
+#ifndef _INFO_H
+#define _INFO_H
+
+bool info_menu(void);
+
+bool neo_info(void);
+bool memory_info(void);
+bool hd_info(void);
+bool mas_info(void);
+
+#endif
diff -rubBP /home/dast/src/rockbox/apps/keyboard.c ./apps/keyboard.c
--- /home/dast/src/rockbox/apps/keyboard.c	Thu Jan  1 01:00:00 1970
+++ ./apps/keyboard.c	Wed Dec  3 14:09:39 2003
@@ -0,0 +1,283 @@
+#include "lcd.h"
+#include "button.h"
+#include "remote.h"
+#include "kernel.h"
+#include "version.h"
+#include "sprintf.h"
+#include <string.h>
+#include "lcd-charset.h"
+#include "lang.h"
+#include "debug.h"
+
+#define KEYBOARD_MAX_LENGTH 255
+
+static unsigned char* kbd_screens[3] = {
+  "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+  "abcdefghijklmnopqrstuvwxyz",
+  " !\"#$%&'()*+,-./0123456789;<=>?@[]^_`{|}"
+};
+
+static unsigned char* kbd_screens_names[3] = {
+  "Capitals",
+  "Small",
+  "Others"
+};
+
+static void kbd_show_legend( int nb )
+{
+  char buf[24];
+  snprintf(buf, sizeof(buf), "[%s]", kbd_screens_names[nb] );
+  lcd_puts_fmt( 0, 1, buf, FMT_RPADDED );  
+  lcd_puts_fmt( 0, 2, kbd_screens[nb], FMT_RPADDED );
+  lcd_puts_fmt( 0, 3, &kbd_screens[nb][20], FMT_RPADDED );
+}
+
+/* returns text len 
+   Max = KEYBOARD_MAX_LENGTH characters
+*/
+int kbd_input( char* text, int buflen )
+{
+  char* pstart;
+  char* pcursor;
+  char* pold;
+  int bufferlen;
+  char cursorpos = 0;
+  int ret = 0;
+  char buffer[KEYBOARD_MAX_LENGTH+1];
+  bool done = false;
+  int key;
+  int screen = 0;
+  int screenidx = -1;
+  unsigned char * pcurscreen = kbd_screens[0];
+  bool ctl;
+
+  bufferlen = strlen(text);
+  
+  if( bufferlen > KEYBOARD_MAX_LENGTH )
+    bufferlen = KEYBOARD_MAX_LENGTH;
+  
+  strncpy( buffer, text, bufferlen );
+  buffer[bufferlen] = 0;
+
+  lcd_clear_display();
+
+  //Initial setup
+  lcd_puts_nopad( 0, 0, buffer );
+  kbd_show_legend( screen );
+  lcd_cursor( cursorpos, 0 );
+  lcd_write(true,LCD_BLINKCUR);
+  
+  pstart = pcursor = buffer;
+
+  while(!done) {
+
+    //We want all the keys except the releases and the repeats
+    key = button_get_flt( true, BUTTON_ALL, BUTTON_ALL, BUTTON_REPEAT|BUTTON_IR );
+    
+    if( key & BUTTON_IR)
+      ctl = key & (IR_BUTTON_PLAY|IR_BUTTON_STOP|IR_BUTTON_BROWSE);
+    else
+      ctl = key & (BUTTON_PLAY|BUTTON_STOP|BUTTON_MENU);
+
+    if( ctl ){
+
+      //These key do not change the first line
+
+      switch( key ) {
+      case BUTTON_MENU:
+      case BUTTON_IR|IR_BUTTON_BROWSE:
+	
+	//Toggle legend screen
+	screen++;
+	if( screen == 3 )
+	  screen = 0;
+
+	pcurscreen = kbd_screens[screen];
+
+	screenidx = -1;
+	kbd_show_legend( screen );
+
+	//Restore cursor
+	lcd_cursor( cursorpos, 0 );
+	break;
+	
+      case BUTTON_PLAY:
+      case BUTTON_IR|IR_BUTTON_PLAY:
+
+	if( bufferlen ){
+	  strncpy(text, buffer, bufferlen);
+	  text[bufferlen] = 0;
+	  ret = bufferlen;
+	}
+
+      case BUTTON_STOP:
+      case BUTTON_IR|IR_BUTTON_STOP:
+	
+	//Remove blinking cursor
+	lcd_write(true,LCD_OFFCUR);
+	done = true;
+      }
+    }
+    else {
+      
+      switch( key ) {
+	
+      case BUTTON_PROGRAM:
+      case BUTTON_PROGRAM|BUTTON_REPEAT:
+      case BUTTON_IR|IR_BUTTON_PROGRAM:
+	
+	//Delete char at pcursor
+
+	//Check if we are at the last char
+	if( *(pcursor+1) != 0 ) {
+	  
+	  //move rest of the string to the left in buffer
+	  pold = pcursor;
+	  while( *pcursor ){
+	    *pcursor = *(pcursor+1);
+	    pcursor++;
+	  }
+	  
+	  //Restore position
+	  pcursor = pold;
+	}
+	else {
+	  *pcursor = 0;
+	  pcursor--;
+	  cursorpos--;
+	}
+	  
+	bufferlen--;
+	break;
+	
+      case BUTTON_IR|IR_BUTTON_EQ:
+      case BUTTON_SELECT|BUTTON_LEFT:
+	
+	//Insert left
+
+	if(bufferlen >=  KEYBOARD_MAX_LENGTH )
+	  break;
+	
+	pold = pcursor;
+	
+	//Goto end
+	while( *pcursor )
+	  pcursor++;
+
+	//Move string content to the right
+	while( pcursor >= pold ){
+	  *(pcursor+1) = *pcursor;
+	  pcursor--;
+	}
+
+	pcursor = pold;
+	*pcursor = ' ';
+
+	bufferlen++;
+	break;
+	
+      case BUTTON_IR|IR_BUTTON_MUTE:
+      case BUTTON_SELECT|BUTTON_RIGHT:
+	
+	//Insert Right
+	
+	if(bufferlen >=  KEYBOARD_MAX_LENGTH )
+	  break;
+	
+	pold = pcursor;
+	
+	//Goto end
+	while( *pcursor )
+	  pcursor++;
+	
+	//Move string content to the right
+	while( pcursor > pold ){
+	  *(pcursor+1) = *pcursor;
+	  pcursor--;
+	}
+	
+	pcursor = pold;
+	*(pcursor+1) = ' ';
+	
+	bufferlen++;
+	
+	button_add( BUTTON_RIGHT );
+	break;
+
+      case BUTTON_LEFT:
+      case BUTTON_REPEAT|BUTTON_LEFT:
+      case BUTTON_IR|IR_BUTTON_REWIND:
+      case BUTTON_IR|IR_BUTTON_REWIND|BUTTON_REPEAT:
+
+	// Move cursor left
+	// Shift text right if all the way tot the left
+       
+	//Check for start of string
+	if( pcursor > buffer ) {
+
+	  screenidx = -1;
+	  cursorpos--;
+	  pcursor--;
+
+	  //Check if were going off the screen
+	  if( cursorpos == -1 ) {
+	    cursorpos = 0;
+	    
+	    //Shift text right if we are
+	    pstart--;
+	  }
+	}
+	break;
+      
+      case BUTTON_RIGHT:
+      case BUTTON_REPEAT|BUTTON_RIGHT:
+      case BUTTON_IR|IR_BUTTON_FFORWARD:
+      case BUTTON_IR|IR_BUTTON_FFORWARD|BUTTON_REPEAT:
+
+	// Move cursor right
+	// Shift text left if all the way tot the right
+    
+	//Check for end of string
+	if( *(pcursor+1) != 0 ) {
+	  
+	  screenidx = -1;
+	  cursorpos++;
+	  pcursor++;
+	
+	  //Check if were going of the screen
+	  if( cursorpos == 20 ) {
+	    cursorpos = 19;
+	    
+	    //Shift text left if we are
+	    pstart++;
+	  }
+	}
+	break;
+	
+      case BUTTON_UP:
+      case BUTTON_UP|BUTTON_REPEAT:
+      case BUTTON_IR|IR_BUTTON_VOLUP:
+      case BUTTON_IR|IR_BUTTON_VOLUP|BUTTON_REPEAT:
+	screenidx += 2;
+      case BUTTON_DOWN:
+      case BUTTON_DOWN|BUTTON_REPEAT:
+      case BUTTON_IR|IR_BUTTON_VOLDN:
+      case BUTTON_IR|IR_BUTTON_VOLDN|BUTTON_REPEAT:
+	screenidx--;
+
+	if( screenidx < 0 )
+	  screenidx = strlen(pcurscreen)-1;
+
+	if( pcurscreen[screenidx] == 0 )
+	  screenidx = 0;	   
+
+	//Changes the character over the cursor
+	*pcursor = pcurscreen[screenidx];
+      }
+      
+      lcd_puts_fmt( 0, 0, pstart, FMT_RPADDED );
+      lcd_cursor( cursorpos, 0 );
+    }
+  }
+  return ret;
+}
diff -rubBP /home/dast/src/rockbox/apps/keyboard.h ./apps/keyboard.h
--- /home/dast/src/rockbox/apps/keyboard.h	Wed Dec  4 16:04:42 2002
+++ ./apps/keyboard.h	Wed Oct 29 15:12:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: keyboard.h,v 1.1 2002/12/04 15:04:42 zagor Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _KEYBOARD_H
 #define _KEYBOARD_H
 
Only in /home/dast/src/rockbox/apps/lang: CVS
diff -rubBP /home/dast/src/rockbox/apps/lang/czech.lang ./apps/lang/czech.lang
--- /home/dast/src/rockbox/apps/lang/czech.lang	Wed Nov 19 07:34:43 2003
+++ ./apps/lang/czech.lang	Wed Oct 29 15:12:06 2003
@@ -1,8 +1,15 @@
-# Czech language file 
-# Based on english.lang version 1.91
-# Translated by Jiri Jurecek
-
-
+# $Id: czech.lang,v 1.1.1.1 2003/10/29 14:12:06 knobby2346 Exp $
+#
+# This is the czech language files.
+#
+# *WARNING*
+#
+# If you want to add a new string, add it to the end of this file!
+# If you want to remove a string, just blank it, don't actually remove it!
+#
+# If you re-order things or remove entries, you must bump the binary language
+# file version number in both the 'binlang' tool and the language loader code.
+#
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
 eng: "Sound Settings"
@@ -11,7 +18,7 @@
 id: LANG_GENERAL_SETTINGS
 desc: in the main menu
 eng: "General Settings"
-new: "Obecné nastavení"
+new: "Nastavení"
 
 id: LANG_GAMES
 desc: in the main menu
@@ -108,11 +115,13 @@
 eng: "Loading..."
 new: "Nahrávám..."
 
+# NO LONGER USED
 id: LANG_PLAYLIST_SHUFFLE
 desc: displayed on screen while shuffling a playlist
 eng: "Shuffling..."
 new: "Promíchávání..."
 
+# NO LONGER USED
 id: LANG_PLAYLIST_PLAY
 desc: displayed on screen when start playing a playlist
 eng: "Playing..."
@@ -128,6 +137,7 @@
 eng: "Buffer Full"
 new: "Zaplněný buffer"
 
+# NO LONGER USED
 id: LANG_PLAYINDICES_AMOUNT
 desc: number of files in playlist
 eng: "%d Files"
@@ -140,8 +150,8 @@
 
 id: LANG_SETTINGS_BATTERY_PLAYER
 desc: if save settings has failed
-eng: "Partition?"
-new: "Disk.chyba?"
+eng: "Batt. Low?"
+new: "Vybitá bat?"
 
 id: LANG_SETTINGS_SAVE_RECORDER
 desc: displayed if save settings has failed
@@ -150,8 +160,8 @@
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
-eng: "No partition?"
-new: "Chyba disku?"
+eng: "Is Battery Low?"
+new: "Vybitá baterie?"
 
 id: LANG_TIME_SET
 desc: used in set_time()
@@ -263,11 +273,13 @@
 eng: "Follow Playlist"
 new: "Následování seznamu skladeb"
 
+# depreciated
 id: LANG_RESET_ASK_PLAYER
 desc: confirm to reset settings
 eng: ""
 new: "Opravdu?"
 
+# depreciated
 id: LANG_RESET_CONFIRM_PLAYER
 desc: confirm to reset settings
 eng: ""
@@ -278,11 +290,13 @@
 eng: "Are You Sure?"
 new: "Jste si jistý?"
 
+# depreciated
 id: LANG_RESET_CONFIRM_RECORDER
 desc: confirm to reset settings
 eng: ""
 new: "Play=Vynulovat"
 
+# depreciated
 id: LANG_RESET_CANCEL_RECORDER
 desc: confirm to reset settings
 eng: "OFF=Cancel"
@@ -361,7 +375,7 @@
 id: LANG_LOUDNESS
 desc: in sound_settings
 eng: "Loudness"
-new: "Středy"
+new: "Hlasitost"
 
 id: LANG_BBOOST
 desc: in sound settings
@@ -430,12 +444,12 @@
 
 id: LANG_RESUME_CONFIRM_RECORDER
 desc: possible answer to resume question
-eng: ""
+eng: "PLAY = Yes"
 new: "Play = Ano"
 
 id: LANG_RESUME_CANCEL_RECORDER
 desc: possible answer to resume question
-eng: ""
+eng: "Any Other = No"
 new: "Ostatní = Ne"
 
 id: LANG_KEYLOCK_ON_PLAYER
@@ -451,32 +465,32 @@
 id: LANG_KEYLOCK_ON_RECORDER
 desc: displayed when key lock is on
 eng: "Key Lock Is ON"
-new: "Klávesy zamknuty"
+new: "Klávesy aktivovány"
 
 id: LANG_KEYLOCK_OFF_RECORDER
 desc: displayed when key lock is turned off
 eng: "Key Lock Is OFF"
-new: "Klávesy aktivovány"
+new: "Klávesy zamknuty"
 
 id: LANG_MUTE_ON_PLAYER
 desc: displayed when mute is on
 eng: "Mute ON"
-new: "Zvuk vyp."
+new: "Zvuk zap."
 
 id: LANG_MUTE_OFF_PLAYER
 desc: displayed when mute is off
-eng: "Mute OFF"
-new: "Zvuk zap."
+eng: ""
+new: "Zvuk vyp."
 
 id: LANG_MUTE_ON_RECORDER
 desc: displayed when mute is on
 eng: "Mute Is ON"
-new: "Zvuk vypnutý"
+new: "Zvuk zapnutý"
 
 id: LANG_MUTE_OFF_RECORDER
 desc: displayed when mute is off
 eng: "Mute Is OFF"
-new: "Zvuk zapnutý"
+new: "Zvuk vypnutý"
 
 id: LANG_ID3_INFO
 desc: in the browse_id3() function
@@ -660,117 +674,128 @@
 
 id: LANG_SOKOBAN_LEVEL
 desc: must be smaller than 6 characters
-eng: ""
+eng: "Level"
 new: "Level"
 
 id: LANG_SOKOBAN_MOVE
 desc: must be smaller than 6 characters
-eng: ""
+eng: "Moves"
 new: "Tahů"
 
 id: LANG_SOKOBAN_WIN
 desc: displayed when you win 
-eng: ""
+eng: "YOU WIN!!"
 new: "VYHRÁLS!!"
 
 id: LANG_SOKOBAN_QUIT
 desc: how to quit game
-eng: ""
+eng: "[OFF] To Stop"
 new: "[OFF] - konec"
 
 id: LANG_SOKOBAN_F1
 desc: what does F1 do
-eng: ""
+eng: "[F1] - Level"
 new: "[F1]  - Level"
 
 id: LANG_SOKOBAN_F2
 desc: what does F2 do
-eng: ""
+eng: "[F2] Same Level"
 new: "[F2]  - Stejný Level"
 
 id: LANG_SOKOBAN_F3
 desc: what does F3 do
-eng: ""
+eng: "[F3] + Level"
 new: "[F3]  + Level"
 
+# Next ids are for Worlmet Game.
+# Lenght restrictions for score board strings (LANG_SB_XXX):
+# LCD_PROPFONTS: max 43 pixel
+# fix font: max 7 characters
+
 id: LANG_WORMLET_LENGTH
 desc: wormlet game
-eng: ""
+eng: "Len:%d"
 new: "Vel:%d"
 
 id: LANG_WORMLET_GROWING
 desc: wormlet game 
-eng: ""
+eng: "Growing"
 new: "Roste"
 
 id: LANG_WORMLET_HUNGRY
 desc: wormlet game
-eng: ""
+eng: "Hungry"
 new: "Hladný"
 
 id: LANG_WORMLET_WORMED
 desc: wormlet game
-eng: ""
+eng: "Wormed"
 new: "Sežrán"
 
 id: LANG_WORMLET_ARGH
 desc: wormlet game
-eng: ""
+eng: "Argh"
 new: "Ups"
 
 id: LANG_WORMLET_CRASHED
 desc: wormlet game
-eng: ""
+eng: "Crashed"
 new: "Narazil"
 
 id: LANG_WORMLET_HIGHSCORE
 desc: wormlet game
-eng: ""
+eng: "Hs: %d"
 new: "Rek:%d"
 
+# Length restrictions for wormlet config screen strings (LANG_CS_XXX)
+# They must fit on the entire screen - preferably with the
+# key names aligned right
+
 id: LANG_WORMLET_PLAYERS
 desc: wormlet game
-eng: ""
+eng: "%d Players    UP/DN"
 new: "%d hráč(ů)    UP/DN"
 
 id: LANG_WORMLET_WORMS
 desc: wormlet game
-eng: ""
+eng: "%d Worms        L/R"
 new: "%d červ(ů)      L/P"
 
 id: LANG_WORMLET_REMOTE_CTRL
 desc: wormlet game
-eng: ""
+eng: "Remote Control F1"
 new: "Dálk. ovládání F1"
 
 id: LANG_WORMLET_NO_REM_CTRL
 desc: wormlet game
-eng: ""
+eng: "No Rem. Control F1"
 new: "Bez dálk. ovl.  F1"
 
 id: LANG_WORMLET_2_KEY_CTRL
 desc: wormlet game
-eng: ""
+eng: "2 Key Control   F1"
 new: "2 ovl.klávesy   F1"
 
 id: LANG_WORMLET_4_KEY_CTRL
 desc: wormlet game
-eng: ""
+eng: "4 Key Control   F1"
 new: "4 ovl.klávesy   F1"
 
 id: LANG_WORMLET_NO_CONTROL
 desc: wormlet game
-eng: ""
+eng: "Out Of Control"
 new: "Bez ovládání"
 
+# Wormlet game ids ended
+
 id: LANG_TETRIS_LOSE
 desc: tetris game
-eng: ""
+eng: "You Lose!"
 new: "Dohráls!"
 
 id: LANG_TETRIS_LEVEL
 desc: tetris game
-eng: ""
+eng: "Rows - Level"
 new: "Řadků - Level"
 
 id: LANG_POWEROFF_IDLE
@@ -873,6 +898,10 @@
 eng: "OFF=Cancel"
 new: "OFF =Zachovat"
 
+# NOTE: ignore this label.  It is no longer used/was an error.
+# We are aware of this and it will this instance will be removed in the future
+id: LANG_TETRIS_LEVEL
+
 id: LANG_TIMEFORMAT
 desc: select the time format of time in status bar
 eng: "Time Format"
@@ -1061,7 +1090,7 @@
 id: LANG_RECORDING
 desc: in the main menu
 eng: "Recording"
-new: "Záznam"
+new: "Nahrávání"
 
 id: LANG_RECORDING_GAIN
 desc: in the recording screen
@@ -1116,7 +1145,7 @@
 id: LANG_RECORDING_SETTINGS
 desc: in the main menu
 eng: "Recording Settings"
-new: "Nastavení záznamu"
+new: "Nastavení nahrávání"
 
 id: LANG_DISK_STAT
 desc: disk size info
@@ -1507,273 +1536,3 @@
 desc: (player) Delay before making a jump scroll
 eng: "Jump Scroll Delay"
 new: "Uvodní prodleva"
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Změněn firmware"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Ostatní = Ne"
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "Play = Ano"
-
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Disk je plný. Pro pokračování stiskněte OFF."
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "FlipIt"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Vložit"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Vložit za"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Vložit na konec"
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "OFF zrušit"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othelo"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Chyba při přístupu k playlistu"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Chyba přístupu k konf. souboru playlistu"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "Konf. soubor playlistu je neplatný"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Chyba přístupu k konf. souboru playlistu"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Chyba přístupu k adresáři"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "Vloženo %d skladeb (%s)"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Nastavení playlistu"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "Zařazeno %d skladeb (%s)"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "Uloženo %d skladeb (%s)"
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Chyba při otvírání %s"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Plugin vrátil chybu"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "Nekompatibilní model"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "Nekompatibilní verze"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Zařadit za"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "Zařadit na konec"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Chyba čtení %s"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "Restartovat nyní?"
-
-id: LANG_RECORD_TIMESPLIT
-desc: Prompt for record timer interval setting, in the record settings menu
-eng: "Time Split"
-new: "Interval rozdělení"
-
-id: LANG_RECORD_TIMESPLIT_REC
-desc: 
-eng: "Split time:"
-new: "Interval rozdělení:"
-
-id: LANG_RECURSE_DIRECTORY
-desc: In playlist menu
-eng: "Recursively Insert Directories"
-new: "Vkládat adresáře rekurzivně"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "Uložit dynamický playlist"
-
-id: LANG_SHOW_ICONS
-desc: in settings_menu
-eng: "Show Icons"
-new: "Zobrazit ikony"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Hra 15"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Star"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STOP zrušit"
-
-id: LANG_RECURSE_DIRECTORY_QUESTION
-desc: Asked from onplay screen
-eng: "Recursively?"
-new: "Rekurzivně?"
-
-id: LANG_BUTTONBAR_MENU
-desc: in button bar
-eng: "Menu"
-new: "Menu" 
-
-id: LANG_BUTTONBAR_OPTIONS
-desc: in button bar
-eng: "Option"
-new: "Volby"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Mód auto adaptéru"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Konfigurace"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Fonty"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc: in button bar
-eng: "Preset"
-new: "Předvolba"
-
-id: LANG_FM_DELETE_PRESET
-desc: in radio screen
-eng: "Remove preset"
-new: "Vymaž předvolbu"
-
-id: LANG_FM_NO_FREE_PRESETS
-desc: in radio screen
-eng: "The preset list is full"
-new: "Seznam předvoleb je plný"
-
-id: LANG_FM_NO_PRESETS
-desc: in radio screen
-eng: "The preset list is empty"
-new: "Seznam přdvoleb je prázdný"
-
-id: LANG_FM_PRESET_SAVE_FAILED
-desc: in radio screen
-eng: "Preset save failed"
-new: "Chyba při ukládání předvolby"
-
-id: LANG_FM_SAVE_PRESET
-desc: in radio screen
-eng: "Save preset"
-new: "Uložit předvolbu"
-
-id: LANG_FM_STATION
-desc: in radio screen
-eng: "Station: %d.%dMHz"
-new: "Stanice: %d.%dMHz"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Jazyk"
-
-id: LANG_LINE_IN
-desc: in settings_menu
-eng: "Line In"
-new: "Linkový vstup"
-
-id: LANG_NO_FILES
-desc: in settings_menu
-eng: "No files"
-new: "Žádné soubory"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Pluginy"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Přehrávací obrazovka"
diff -rubBP /home/dast/src/rockbox/apps/lang/deutsch.lang ./apps/lang/deutsch.lang
--- /home/dast/src/rockbox/apps/lang/deutsch.lang	Thu Dec  4 16:35:38 2003
+++ ./apps/lang/deutsch.lang	Wed Oct 29 15:12:08 2003
@@ -1,4 +1,3 @@
-# $Id: deutsch.lang,v 1.30 2003/12/04 14:29:06 zagor Exp $
 
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
@@ -137,6 +136,8 @@
 
 id: LANG_SETTINGS_BATTERY_PLAYER
 desc: if save settings has failed
+### English phrase was changed! Previous translation was made on:
+### "Batt. Low?"
 eng: "Partition?"
 new: "Akku leer?"
 
@@ -147,6 +148,8 @@
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
+### English phrase was changed! Previous translation was made on:
+### "Is Battery Low?"
 eng: "No partition?"
 new: "Akku leer?"
 
@@ -427,11 +430,15 @@
 
 id: LANG_RESUME_CONFIRM_RECORDER
 desc: possible answer to resume question
+### English phrase was changed! Previous translation was made on:
+### "PLAY = Yes"
 eng: ""
 new: "PLAY = Ja"
 
 id: LANG_RESUME_CANCEL_RECORDER
 desc: possible answer to resume question
+### English phrase was changed! Previous translation was made on:
+### "Any Other = No"
 eng: ""
 new: "Sonstige = Nein"
 
@@ -657,116 +664,162 @@
 
 id: LANG_SOKOBAN_LEVEL
 desc: must be smaller than 6 characters
+### English phrase was changed! Previous translation was made on:
+### "Level"
 eng: ""
 new: "Level"
 
 id: LANG_SOKOBAN_MOVE
 desc: must be smaller than 6 characters
+### English phrase was changed! Previous translation was made on:
+### "Moves"
 eng: ""
 new: "Bewg."
 
 id: LANG_SOKOBAN_WIN
 desc: displayed when you win 
+### English phrase was changed! Previous translation was made on:
+### "YOU WIN!!"
 eng: ""
 new: "GEWONNEN!"
 
 id: LANG_SOKOBAN_QUIT
 desc: how to quit game
+### English phrase was changed! Previous translation was made on:
+### "[OFF] To Stop"
 eng: ""
 new: "[OFF] beenden"
 
 id: LANG_SOKOBAN_F1
 desc: what does F1 do
+### English phrase was changed! Previous translation was made on:
+### "[F1] - Level"
 eng: ""
 new: "[F1] - Level"
 
 id: LANG_SOKOBAN_F2
 desc: what does F2 do
+### English phrase was changed! Previous translation was made on:
+### "[F2] Same Level"
 eng: ""
 new: "[F2] gl. Level"
 
 id: LANG_SOKOBAN_F3
 desc: what does F3 do
+### English phrase was changed! Previous translation was made on:
+### "[F3] + Level"
 eng: ""
 new: "[F3] + Level"
 
 id: LANG_WORMLET_LENGTH
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Len:%d"
 eng: ""
 new: "Län:%d"
 
 id: LANG_WORMLET_GROWING
 desc: wormlet game 
+### English phrase was changed! Previous translation was made on:
+### "Growing"
 eng: ""
 new: "Wachse"
 
 id: LANG_WORMLET_HUNGRY
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Hungry"
 eng: ""
 new: "Hungrig"
 
 id: LANG_WORMLET_WORMED
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Wormed"
 eng: ""
 new: "Gewurmt"
 
 id: LANG_WORMLET_ARGH
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Argh"
 eng: ""
 new: "Argh"
 
 id: LANG_WORMLET_CRASHED
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Crashed"
 eng: ""
 new: "Unfall!"
 
 id: LANG_WORMLET_HIGHSCORE
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Hs: %d"
 eng: ""
 new: "Hs: %d"
 
 id: LANG_WORMLET_PLAYERS
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "%d Players    UP/DN"
 eng: ""
 new: "%d Spieler    UP/DN"
 
 id: LANG_WORMLET_WORMS
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "%d Worms        L/R"
 eng: ""
 new: "%d Würmer       L/R"
 
 id: LANG_WORMLET_REMOTE_CTRL
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Remote Control F1"
 eng: ""
 new: "Fernsteuerung  F1"
 
 id: LANG_WORMLET_NO_REM_CTRL
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "No Rem. Control F1"
 eng: ""
 new: "Keine Fernst.   F1"
 
 id: LANG_WORMLET_2_KEY_CTRL
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "2 Key Control   F1"
 eng: ""
 new: "2 Tastenkontr.  F1"
 
 id: LANG_WORMLET_4_KEY_CTRL
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "4 Key Control   F1"
 eng: ""
 new: "4 Tastenkontr.  F1"
 
 id: LANG_WORMLET_NO_CONTROL
 desc: wormlet game
+### English phrase was changed! Previous translation was made on:
+### "Out Of Control"
 eng: ""
 new: "Ohne Kontrolle"
 
 id: LANG_TETRIS_LOSE
 desc: tetris game
+### English phrase was changed! Previous translation was made on:
+### "You Lose!"
 eng: ""
 new: "Verloren!"
 
 id: LANG_TETRIS_LEVEL
 desc: tetris game
+### English phrase was changed! Previous translation was made on:
+### "Rows - Level"
 eng: ""
 new: "Reihen - Level"
 
@@ -1266,11 +1319,15 @@
 new: "OK"
 
 id: LANG_PLAYER_ONPLAY_1
+### Description changed! Previous description was:
+### ""
 desc: Line #1 of player ON+PLAY screen
 eng: "\x81 Queue"
 new: "\x81 Warteschlange"
 
 id: LANG_PLAYER_ONPLAY_2
+### Description changed! Previous description was:
+### ""
 desc: Line #2 of player ON+PLAY screen
 eng: "- Ren + Del"
 new: "- Umb + Ent"
@@ -1485,6 +1542,121 @@
 eng: "Always"
 new: "Immer"
 
+id: LANG_AUTO_BOOKMARK_QUERY
+desc: prompt for user to decide to create an bookmark
+eng: "Create a Bookmark?"
+new: "Lesezeichen erstellen?"
+
+id: LANG_BOOKMARK_AUTOLOAD_QUERY
+desc: prompt for user to decide to create a bookmark
+eng: "Load Last Bookmark?"
+new: "Letztes Lesezeichen laden?"
+
+id: LANG_BOOKMARK_CREATE_FAILURE
+desc: Indicates bookmark was not created
+eng: "Bookmark Failed!"
+new: "Lesezeichen Fehler!"
+
+id: LANG_BOOKMARK_CREATE_SUCCESS
+desc: Indicates bookmark was successfully created
+eng: "Bookmark Created"
+new: "Lesezeichen angelegt"
+
+id: LANG_BOOKMARK_LOAD_EMPTY
+desc: Indicates bookmark was empty
+eng: "Bookmark Empty"
+new: "Lesezeichen leer"
+
+id: LANG_BOOKMARK_MENU
+desc: Text on main menu to get to bookmark commands
+eng: "Bookmarks"
+new: "Lesezeichen"
+
+id: LANG_BOOKMARK_MENU_CREATE
+desc: Used off of the bookmark menu to create a bookmark
+eng: "Create Bookmark"
+new: "Lesezeichen anlegen"
+
+id: LANG_BOOKMARK_MENU_LIST
+desc: Used off of the bookmark menu to list available bookmarks for the currently playing directory or M3U
+eng: "List Bookmarks"
+new: "Lesezeichen auflisten"
+
+id: LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
+desc: Text for the menu text to access the most recent bookmarks list
+eng: "Recent Bookmarks"
+new: "Letzte Lesezeichen"
+
+id: LANG_BOOKMARK_SELECT_BOOKMARK_TEXT
+desc: Used on the bookmark select window to label bookmark number
+eng: "Bookmark"
+new: "Lesezeichen"
+
+id: LANG_BOOKMARK_SELECT_DELETE
+desc: Used on the bookmark select window to indicated the bookmark delete option
+eng: "ON+Play to Delete"
+new: "ON+PLAY = Löschen"
+
+id: LANG_BOOKMARK_SELECT_EXIT
+desc: From the bookmark list screen, allows user to exit
+eng: "LEFT = Exit"
+new: "LINKS = Verlassen"
+
+id: LANG_BOOKMARK_SELECT_INDEX_TEXT
+desc: Used on the bookmark select window to label index number
+eng: "Index"
+new: "Index"
+
+id: LANG_BOOKMARK_SELECT_LIST_BOOKMARKS
+desc: From the auto-load screen, allows user to list all bookmarks
+eng: "Down = List"
+new: "UNTEN = Liste"
+
+id: LANG_BOOKMARK_SELECT_PLAY
+desc: Used on the bookmark select window to indicated the play option
+eng: "PLAY to Select"
+new: "PLAY = Auswählen"
+
+id: LANG_BOOKMARK_SELECT_TIME_TEXT
+desc: Used on the bookmark select window to label elapsed time
+eng: "Time"
+new: "Zeit"
+
+id: LANG_BOOKMARK_SETTINGS
+desc: in general settings
+eng: "Bookmarking"
+new: "Lesezeichen"
+
+id: LANG_BOOKMARK_SETTINGS_AUTOCREATE
+desc: prompt for user to decide to create an bookmark
+eng: "Bookmark on Stop"
+new: "Lesezeichen beim Stoppen"
+
+id: LANG_BOOKMARK_SETTINGS_AUTOLOAD
+desc: prompt for user to decide to create a bookmark
+eng: "Load Last Bookmark"
+new: "Letztes Lesezeichen laden"
+
+id: LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
+desc: Configuration option to maintain a list of recent bookmarks
+eng: "Maintain a List of Recent Bookmarks?"
+new: "Liste mit zuletzt benutzten Lesezeichen verwalten?"
+
+id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
+desc: Save in recent bookmarks only
+eng: "Recent only - Ask"
+new: "Nur letzte - Fragen"
+
+id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
+desc: Save in recent bookmarks only
+eng: "Recent only - Yes"
+new: "Nur letzte - Ja"
+
+id: LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
+desc: Save only on bookmark for each playlist in recent bookmarks
+eng: "Unique only"
+new: "Nur einmalig"
+
 id: LANG_BOOT_CHANGED
 desc: File browser discovered the boot file was changed
 eng: "Boot changed"
@@ -1684,103 +1856,3 @@
 desc: Used on player models
 eng: "STOP to abort"
 new: "STOP zum Abbrechen"
-
-id: LANG_BUTTONBAR_MENU
-desc: in button bar
-eng: "Menu"
-new: "Menü"
-
-id: LANG_BUTTONBAR_OPTIONS
-desc: in button bar
-eng: "Option"
-new: "Option"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Kfz-Adapter Modus"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Einstellungen"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Zeichensätze"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc: in button bar
-eng: "Preset"
-new: "Sender"
-
-id: LANG_FM_DELETE_PRESET
-desc: in radio screen
-eng: "Remove preset"
-new: "Sender entfernen"
-
-id: LANG_FM_NO_FREE_PRESETS
-desc: in radio screen
-eng: "The preset list is full"
-new: "Die Senderliste ist voll"
-
-id: LANG_FM_NO_PRESETS
-desc: in radio screen
-eng: "The preset list is empty"
-new: "Die Senderliste ist leer"
-
-id: LANG_FM_PRESET_SAVE_FAILED
-desc: in radio screen
-eng: "Preset save failed"
-new: "Sender speichern fehlgeschlagen"
-
-id: LANG_FM_SAVE_PRESET
-desc: in radio screen
-eng: "Save preset"
-new: "Sender speichern"
-
-id: LANG_FM_STATION
-desc: in radio screen
-eng: "Station: %d.%dMHz"
-new: "Sender: %d.%dMHz"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Sprache"
-
-id: LANG_LINE_IN
-desc: in settings_menu
-eng: "Line In"
-new: "Line In"
-
-id: LANG_NO_FILES
-desc: in settings_menu
-eng: "No files"
-new: "Keine Dateien"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Plugins"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "While Playing Screen"
-
-id: LANG_FM_BUTTONBAR_RECORD
-desc: in main menu
-eng: "Record"
-new: "Aufnehmen"
-
-id: LANG_FM_RADIO
-desc: in main menu
-eng: "FM Radio"
-new: "FM Radio"
diff -rubBP /home/dast/src/rockbox/apps/lang/english.lang ./apps/lang/english.lang
--- /home/dast/src/rockbox/apps/lang/english.lang	Thu Nov 20 08:44:07 2003
+++ ./apps/lang/english.lang	Tue Dec  2 21:59:16 2003
@@ -1,7 +1,7 @@
-# $Id: english.lang,v 1.92 2003/11/20 00:33:43 linusnielsen Exp $
+# $Id: english.lang,v 1.4 2003/12/02 20:59:16 mrskippy25 Exp $
 #
 # This is the master of the language files. This is the original, the one with
-# all the existing strings Rockbox features.
+# all the existing strings Open Neo features.
 #
 # *WARNING*
 #
@@ -21,16 +21,6 @@
 eng: "General Settings"
 new:
 
-id: LANG_GAMES
-desc: in the main menu
-eng: "Games"
-new:
-
-id: LANG_DEMOS
-desc: in the main menu
-eng: "Demos"
-new:
-
 id: LANG_INFO
 desc: in the main menu
 eng: "Info"
@@ -46,69 +36,9 @@
 eng: "Debug (Keep Out!)"
 new:
 
-id: LANG_USB
-desc: in the main menu
-eng: "USB (Sim)"
-new:
-
-id: LANG_ROCKBOX_INFO
-desc: displayed topmost on the info screen
-eng: "Rockbox Info:"
-new:
-
-id: LANG_BUFFER_STAT_PLAYER
-desc: the buffer size player-screen width, %d MB %d fraction of MB
-eng: "Buf: %d.%03dMB"
-new:
-
-id: LANG_BUFFER_STAT_RECORDER
-desc: the buffer size recorder-screen width, %d MB %d fraction of MB
-eng: "Buffer: %d.%03dMB"
-new:
-
-id: LANG_BATTERY_LEVEL_PLAYER
-desc: the battery level in percentage
-eng: "Batt: %d%%%s"
-new:
-
-id: LANG_BATTERY_LEVEL_RECORDER
-desc: the battery level in percentage
-eng: "Battery: %d%%%s"
-new:
-
-id: LANG_BATTERY_CHARGE
-desc: tells that the battery is charging, instead of battery level
-eng: "Battery: Charging"
-new:
-
-id: LANG_BOUNCE
-desc: in the demos menu
-eng: "Bounce"
-new:
-
-id: LANG_SNOW
-desc: in the demos menu
-eng: "Snow"
-new:
-
-id: LANG_TETRIS
-desc: in the games menu
-eng: "Tetris"
-new:
-
-id: LANG_SOKOBAN
-desc: in the games menu
-eng: "Sokoban"
-new:
-
-id: LANG_WORMLET
-desc: in the games menu
-eng: "Wormlet"
-new:
-
-id: LANG_SNAKE
-desc: in the games menu
-eng: "Snake"
+id: LANG_BUFFER_STAT
+desc: the buffer size player-screen width, %d KB %d fraction of KB
+eng: "Buf: %d.%dKB"
 new:
 
 id: LANG_PLAYLIST_LOAD
@@ -116,18 +46,11 @@
 eng: "Loading..."
 new:
 
-# NO LONGER USED
 id: LANG_PLAYLIST_SHUFFLE
 desc: displayed on screen while shuffling a playlist
 eng: "Shuffling..."
 new:
 
-# NO LONGER USED
-id: LANG_PLAYLIST_PLAY
-desc: displayed on screen when start playing a playlist
-eng: "Playing..."
-new:
-
 id: LANG_PLAYINDICES_PLAYLIST
 desc: in playlist.indices() when playlist is full
 eng: "Playlist"
@@ -138,62 +61,11 @@
 eng: "Buffer Full"
 new:
 
-# NO LONGER USED
-id: LANG_PLAYINDICES_AMOUNT
-desc: number of files in playlist
-eng: "%d Files"
-new:
-
 id: LANG_SETTINGS_SAVE_PLAYER
 desc: displayed if save settings has failed
 eng: "Save Failed"
 new:
 
-id: LANG_SETTINGS_BATTERY_PLAYER
-desc: if save settings has failed
-eng: "Partition?"
-new:
-
-id: LANG_SETTINGS_SAVE_RECORDER
-desc: displayed if save settings has failed
-eng: "Save Failed"
-new:
-
-id: LANG_SETTINGS_BATTERY_RECORDER
-desc: if save settings has failed
-eng: "No partition?"
-new:
-
-id: LANG_TIME_SET
-desc: used in set_time()
-eng: "ON To Set"
-new:
-
-id: LANG_TIME_REVERT
-desc: used in set_time()
-eng: "OFF To Revert"
-new:
-
-id: LANG_HIDDEN
-desc: in settings_menu
-eng: ""
-new:
-
-id: LANG_HIDDEN_SHOW
-desc: in settings_menu 
-eng: ""
-new:
-
-id: LANG_HIDDEN_HIDE
-desc: in settings_menu
-eng: ""
-new:
-
-id: LANG_CONTRAST
-desc: in settings_menu
-eng: "Contrast"
-new:
-
 id: LANG_SHUFFLE
 desc: in settings_menu
 eng: "Shuffle"
@@ -204,11 +76,6 @@
 eng: "Play Selected First"
 new:
 
-id: LANG_MP3FILTER
-desc: in settings_menu
-eng: ""
-new:
-
 id: LANG_SORT_CASE
 desc: in settings_menu
 eng: "Sort Case Sensitive"
@@ -234,31 +101,11 @@
 eng: "On"
 new:
 
-id: LANG_BACKLIGHT
-desc: in settings_menu
-eng: "Backlight"
-new:
-
 id: LANG_SCROLL
 desc: in settings_menu
 eng: "Scroll Speed Setting Example"
 new:
 
-id: LANG_DISCHARGE
-desc: in settings_menu
-eng: "Deep Discharge"
-new:
-
-id: LANG_TIME
-desc: in settings_menu
-eng: "Set Time/Date"
-new:
-
-id: LANG_SPINDOWN
-desc: in settings_menu
-eng: "Disk Spindown"
-new:
-
 id: LANG_FFRW_STEP
 desc: in settings_menu
 eng: "FF/RW Min Step"
@@ -274,35 +121,6 @@
 eng: "Follow Playlist"
 new:
 
-# depreciated
-id: LANG_RESET_ASK_PLAYER
-desc: confirm to reset settings
-eng: ""
-new:
- 
-# depreciated
-id: LANG_RESET_CONFIRM_PLAYER
-desc: confirm to reset settings
-eng: ""
-new:
-
-id: LANG_RESET_ASK_RECORDER
-desc: confirm to reset settings
-eng: "Are You Sure?"
-new: 
-
-# depreciated
-id: LANG_RESET_CONFIRM_RECORDER
-desc: confirm to reset settings
-eng: ""
-new:
-
-# depreciated
-id: LANG_RESET_CANCEL_RECORDER
-desc: confirm to reset settings
-eng: "OFF=Cancel"
-new:
-
 id: LANG_RESET_DONE_SETTING
 desc: visual confirmation after settings reset
 eng: "Settings"
@@ -383,11 +201,6 @@
 eng: "Bass Boost"
 new:
 
-id: LANG_DECAY
-desc: in sound_settings
-eng: "AV Decay Time"
-new:
-
 id: LANG_CHANNEL_MENU
 desc: in sound_settings
 eng: "Channels"
@@ -418,11 +231,6 @@
 eng: "Mono Right"
 new:
 
-id: LANG_AUTOVOL
-desc: in sound_settings
-eng: "Auto Volume"
-new:
-
 id: LANG_SHOWDIR_ERROR_BUFFER
 desc: in showdir(), displayed on screen when you reach buffer limit
 eng: "Dir Buffer"
@@ -443,38 +251,6 @@
 eng: "(PLAY/STOP)"
 new:
 
-# depreciated
-id: LANG_RESUME_CONFIRM_RECORDER
-desc: possible answer to resume question
-eng: ""
-new:
-
-# depreciated
-id: LANG_RESUME_CANCEL_RECORDER
-desc: possible answer to resume question
-eng: ""
-new:
-
-id: LANG_KEYLOCK_ON_PLAYER
-desc: displayed when key lock is on
-eng: "Key Lock ON"
-new:
-
-id: LANG_KEYLOCK_OFF_PLAYER
-desc: displayed when key lock is turned off
-eng: "Key Lock OFF"
-new:
-
-id: LANG_KEYLOCK_ON_RECORDER
-desc: displayed when key lock is on
-eng: "Key Lock Is ON"
-new:
-
-id: LANG_KEYLOCK_OFF_RECORDER
-desc: displayed when key lock is turned off
-eng: "Key Lock Is OFF"
-new:
-
 id: LANG_MUTE_ON_PLAYER
 desc: displayed when mute is on
 eng: "Mute ON"
@@ -485,16 +261,6 @@
 eng: "Mute OFF"
 new:
 
-id: LANG_MUTE_ON_RECORDER
-desc: displayed when mute is on
-eng: "Mute Is ON"
-new:
-
-id: LANG_MUTE_OFF_RECORDER
-desc: displayed when mute is off
-eng: "Mute Is OFF"
-new:
-
 id: LANG_ID3_INFO
 desc: in the browse_id3() function
 eng: "-ID3 Info- "
@@ -585,227 +351,16 @@
 eng: "Pause"
 new:
 
-id: LANG_F2_MODE
-desc: in wps F2 pressed
-eng: "Mode:"
-new:
-
-id: LANG_DIR_FILTER
-desc: in wps F2 pressed
-eng: ""
-new:
-
-id: LANG_F3_STATUS
-desc: in wps F3 pressed
-eng: "Status"
-new:
-
-id: LANG_F3_SCROLL
-desc: in wps F3 pressed
-eng: "Scroll"
-new:
-
-id: LANG_F3_BAR
-desc: in wps F3 pressed
-eng: "Bar"
-new:
-
 id: LANG_END_PLAYLIST_PLAYER
 desc: when playlist has finished
 eng: "End Of List"
 new:
 
-id: LANG_END_CONFIRM_PLAYER
-desc: when playlist has finished
-eng: ""
-new:
-
 id: LANG_END_PLAYLIST_RECORDER
 desc: when playlist has finished
 eng: "End Of Song List"
 new: 
 
-id: LANG_END_CONFIRM_RECORDER
-desc: when playlist has finished
-eng: ""
-new:
-
-id: LANG_SNAKE_SCORE
-desc: when you die in snake game
-eng: "Your score:"
-new:
-
-id: LANG_SNAKE_HISCORE
-desc: high score in snake game
-eng: "High Score: %d"
-new:
-
-id: LANG_SNAKE_HISCORE_NEW
-desc: new high score in snake game
-eng: "New High Score!"
-new:
-
-id: LANG_SNAKE_PAUSE
-desc: displayed when game is paused
-eng: "Game Paused"
-new:
-
-id: LANG_SNAKE_RESUME
-desc: what to do to resume game
-eng: "[PLAY] To Resume"
-new:
-
-id: LANG_SNAKE_QUIT
-desc: how to quit game
-eng: "[OFF] To Quit"
-new:
-
-id: LANG_SNAKE_LEVEL
-desc: level of difficulty
-eng: "Level - %d"
-new:
-
-id: LANG_SNAKE_RANGE
-desc: range of levels
-eng: "(1 - Slow, 9 - Fast)"
-new:
-
-id: LANG_SNAKE_START
-desc: how to start or pause the game
-eng: "[PLAY] To Start/Pause"
-new:
-
-id: LANG_SOKOBAN_LEVEL
-desc: must be smaller than 6 characters
-eng: ""
-new:
-
-id: LANG_SOKOBAN_MOVE
-desc: must be smaller than 6 characters
-eng: ""
-new:
-
-id: LANG_SOKOBAN_WIN
-desc: displayed when you win 
-eng: ""
-new:
-
-id: LANG_SOKOBAN_QUIT
-desc: how to quit game
-eng: ""
-new:
-
-id: LANG_SOKOBAN_F1
-desc: what does F1 do
-eng: ""
-new:
-
-id: LANG_SOKOBAN_F2
-desc: what does F2 do
-eng: ""
-new:
-
-id: LANG_SOKOBAN_F3
-desc: what does F3 do
-eng: ""
-new:
-
-# Next ids are for Worlmet Game.
-# Lenght restrictions for score board strings (LANG_SB_XXX):
-# LCD_PROPFONTS: max 43 pixel
-# fix font: max 7 characters
-
-id: LANG_WORMLET_LENGTH
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_GROWING
-desc: wormlet game 
-eng: ""
-new:
-
-id: LANG_WORMLET_HUNGRY
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_WORMED
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_ARGH
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_CRASHED
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_HIGHSCORE
-desc: wormlet game
-eng: ""
-new:
-
-# Length restrictions for wormlet config screen strings (LANG_CS_XXX)
-# They must fit on the entire screen - preferably with the
-# key names aligned right
-
-id: LANG_WORMLET_PLAYERS
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_WORMS
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_REMOTE_CTRL
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_NO_REM_CTRL
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_2_KEY_CTRL
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_4_KEY_CTRL
-desc: wormlet game
-eng: ""
-new:
-
-id: LANG_WORMLET_NO_CONTROL
-desc: wormlet game
-eng: ""
-new:
-
-# Wormlet game ids ended
-
-id: LANG_TETRIS_LOSE
-desc: tetris game
-eng: ""
-new:
-
-id: LANG_TETRIS_LEVEL
-desc: tetris game
-eng: ""
-new:
-
-id: LANG_POWEROFF_IDLE
-desc: in settings_menu
-eng: "Idle Poweroff"
-new:
-
 id: LANG_LANGUAGE_LOADED
 desc: shown when a language has been loaded from the dir browser
 eng: "New Language"
@@ -871,11 +426,6 @@
 eng: "Units Per Read"
 new: 
 
-id: LANG_BACKLIGHT_ON_WHEN_CHARGING
-desc: in display_settings_menu
-eng: "Backlight On When Plugged"
-new:
-
 id: LANG_REPEAT
 desc: in settings_menu
 eng: "Repeat"
@@ -901,155 +451,21 @@
 eng: "OFF=Cancel"
 new:
 
-# NOTE: ignore this label.  It is no longer used/was an error.
-# We are aware of this and it will this instance will be removed in the future
-id: LANG_TETRIS_LEVEL
-
 id: LANG_TIMEFORMAT
 desc: select the time format of time in status bar
 eng: "Time Format"
 new:
 
-id: LANG_12_HOUR_CLOCK
-desc: option for 12 hour clock
-eng: "12 Hour Clock"
-new:
-
-id: LANG_24_HOUR_CLOCK
-desc: option for 24 hour clock
-eng: "24 Hour Clock"
-new:
-
-id: LANG_WEEKDAY_SUNDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Sun"
-new:
-
-id: LANG_WEEKDAY_MONDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Mon"
-new:
-
-id: LANG_WEEKDAY_TUESDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Tue"
-new:
-
-id: LANG_WEEKDAY_WEDNESDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Wed"
-new:
-
-id: LANG_WEEKDAY_THURSDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Thu"
-new:
-
-id: LANG_WEEKDAY_FRIDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Fri"
-new:
-
-id: LANG_WEEKDAY_SATURDAY
-desc: Maximum 3-letter abbreviation for weekday
-eng: "Sat"
-new:
-
-id: LANG_MONTH_JANUARY
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Jan"
-new:
-
-id: LANG_MONTH_FEBRUARY
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Feb"
-new:
-
-id: LANG_MONTH_MARCH
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Mar"
-new:
-
-id: LANG_MONTH_APRIL
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Apr"
-new:
-
-id: LANG_MONTH_MAY
-desc: Maximum 3-letter abbreviation for monthname
-eng: "May"
-new:
-
-id: LANG_MONTH_JUNE
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Jun"
-new:
-
-id: LANG_MONTH_JULY
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Jul"
-new:
-
-id: LANG_MONTH_AUGUST
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Aug"
-new:
-
-id: LANG_MONTH_SEPTEMBER
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Sep"
-new:
-
-id: LANG_MONTH_OCTOBER
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Oct"
-new:
-
-id: LANG_MONTH_NOVEMBER
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Nov"
-new:
-
-id: LANG_MONTH_DECEMBER
-desc: Maximum 3-letter abbreviation for monthname
-eng: "Dec"
-new:
-
-id: LANG_CUBE
-desc: the name of the cube demo in the demo menu
-eng: "Cube"
-new:
-
-id: LANG_OSCILLOGRAPH
-desc: the name of the oscillograph demo in the demo menu
-eng: "Oscillograph"
-new:
-
 id: LANG_RESUME_SETTING_ASK_ONCE
 desc: in settings_menu
 eng: "Ask Once"
 new:
 
-id: LANG_BATTERY_DISPLAY
-desc: Battery type title
-eng: "Battery Display"
-new:
-
 id: LANG_VOLUME_DISPLAY
 desc: Volume type title
 eng: "Volume Display"
 new:
 
-id: LANG_DISPLAY_GRAPHIC
-desc: Label for type of icon display
-eng: "Graphic"
-new:
-
-id: LANG_DISPLAY_NUMERIC
-desc: Label for type of icon display
-eng: "Numeric"
-new:
-
 id: LANG_PM_PERFORMANCE
 desc: in the peak meter menu
 eng: "Performance"
@@ -1060,10 +476,10 @@
 eng: "High performance"
 new:
 
-id: LANG_PM_ENERGY_SAVER
-desc: in the peak meter menu
-eng: "Save Energy"
-new:
+#id: LANG_PM_ENERGY_SAVER
+#desc: in the peak meter menu
+#eng: "Save Energy"
+#new:
 
 id: LANG_PM_SCALE
 desc: in the peak meter menu
@@ -1090,79 +506,14 @@
 eng: "Maximum Of Range"
 new:
 
-id: LANG_RECORDING
-desc: in the main menu
-eng: "Recording"
-new:
-
-id: LANG_RECORDING_GAIN
-desc: in the recording screen
-eng: "Gain"
-new:
-
-id: LANG_RECORDING_LEFT
-desc: in the recording screen
-eng: "Left"
-new:
-
-id: LANG_RECORDING_RIGHT
-desc: in the recording screen
-eng: "Right"
-new:
-
-id: LANG_RECORDING_QUALITY
-desc: in the recording settings
-eng: "Quality"
-new:
-
-id: LANG_RECORDING_FREQUENCY
-desc: in the recording settings
-eng: "Frequency"
-new:
-
-id: LANG_RECORDING_SOURCE
-desc: in the recording settings
-eng: "Source"
-new:
-
-id: LANG_RECORDING_CHANNELS
-desc: in the recording settings
-eng: "Channels"
-new:
-
-id: LANG_RECORDING_SRC_MIC
-desc: in the recording settings
-eng: "Mic"
-new:
-
-id: LANG_RECORDING_SRC_LINE
-desc: in the recording settings
-eng: "Line In"
-new:
-
-id: LANG_RECORDING_SRC_DIGITAL
-desc: in the recording settings
-eng: "Digital"
-new:
-
-id: LANG_RECORDING_SETTINGS
-desc: in the main menu
-eng: "Recording Settings"
-new:
-
-id: LANG_DISK_STAT
+id: LANG_GB_STAT
 desc: disk size info
-eng: "Disk: %d.%dGB"
+eng: "%d.%dGB"
 new:
 
-id: LANG_DISK_FREE_STAT
-desc: disk size info
-eng: "Free: %d.%dGB"
-new:
-
-id: LANG_POWEROFF
-desc: disk poweroff flag
-eng: "Disk Poweroff"
+id: LANG_FREE
+desc: Used in Neo Info
+eng: "Free"
 new:
 
 id: LANG_FILTER_PLAYLIST
@@ -1170,16 +521,6 @@
 eng: "Playlists"
 new:
 
-id: LANG_BATTERY_TIME
-desc: battery level in % and estimated time remaining
-eng: "%d%% %dh %dm"
-new:
-
-id: LANG_SLEEP_TIMER
-desc: sleep timer setting
-eng: "Sleep Timer"
-new:
-
 id: LANG_MP3BUFFER_MARGIN
 desc: MP3 buffer margin time
 eng: "Anti-Skip Buffer"
@@ -1210,26 +551,6 @@
 eng: "Scroll Speed"
 new:
 
-id: LANG_TRICKLE_CHARGE
-desc: in settings_menu
-eng: "Trickle Charge"
-new:
-
-id: LANG_BATTERY_TOPOFF_CHARGE
-desc: in info display, shows that top off charge is running
-eng: "Battery: Top-Off Chg"
-new:
-
-id: LANG_BATTERY_TRICKLE_CHARGE
-desc: in info display, shows that trickle charge is running
-eng: "Battery: Trickle Chg"
-new:
-
-id: LANG_BATTERY_CAPACITY
-desc: in settings_menu
-eng: "Battery Capacity"
-new:
-
 id: LANG_QUEUE_QUEUED
 desc: queued track name %s
 eng: "Queued: %s"
@@ -1255,16 +576,6 @@
 eng: "OK"
 new:
 
-id: LANG_PLAYER_ONPLAY_1
-desc: Line #1 of player ON+PLAY screen
-eng: "\x81 Queue"
-new:
-
-id: LANG_PLAYER_ONPLAY_2
-desc: Line #2 of player ON+PLAY screen
-eng: "- Ren + Del"
-new:
-
 id: LANG_QUEUE
 desc: The verb/action Queue
 eng: "Queue"
@@ -1295,36 +606,6 @@
 eng: "Failed"
 new: 
 
-id: LANG_ALARM_MOD_ALARM_MENU
-desc: The name of the additional entry in the main menu for the RTC alarm mod.
-eng: "Wake-Up Alarm"
-new: 
-
-id: LANG_ALARM_MOD_TIME
-desc: The current alarm time shown in the alarm menu for the RTC alarm mod.
-eng: "Alarm Time: %02d:%02d"
-new: 
-
-id: LANG_ALARM_MOD_TIME_TO_GO
-desc: The time until the alarm will go off shown in the alarm menu for the RTC alarm mod.
-eng: "Waking Up In %d:%02d"
-new: 
-
-id: LANG_ALARM_MOD_SHUTDOWN
-desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod).
-eng: "Shutting Down..."
-new: 
-
-id: LANG_ALARM_MOD_ERROR
-desc: The text that tells that the time is incorrect (for the RTC alarm mod).
-eng: "Alarm Time Is Too Soon!"
-new: 
-
-id: LANG_ALARM_MOD_KEYS
-desc: Shown key functions in alarm menu (for the RTC alarm mod).
-eng: "PLAY=Set OFF=Cancel"
-new: 
-
 id: LANG_CREATE_PLAYLIST
 desc: Menu option for creating a playlist
 eng: "Create Playlist"
@@ -1355,10 +636,10 @@
 eng: "Abort"
 new:
 
-id: LANG_MENU_SHOW_ID3_INFO
-desc: Menu option to start id3 viewer
-eng: "Show ID3 Info"
-new:
+#id: LANG_MENU_SHOW_ID3_INFO
+#desc: Menu option to start id3 viewer
+#eng: "Show ID3 Info"
+#new:
 
 id: LANG_ID3_GENRE
 desc: ID3 frame 'genre'
@@ -1375,21 +656,6 @@
 eng: "<No Info>"
 new:
 
-id: LANG_RECORDING_TIME
-desc: Display of recorded time
-eng: "Time:"
-new:
-
-id: LANG_RECORDING_SIZE
-desc: Display of recorded file size
-eng: "Size:"
-new:
-
-id: LANG_CPU_SLEEP
-desc: in system_settings_menu() (removed)
-eng: ""
-new:
-
 id: LANG_SETTINGS_LOADED1
 desc: Feedback shown when a .cfg file is loaded
 eng: "Settings"
@@ -1405,16 +671,6 @@
 eng: "Fade On Stop/Pause"
 new:
 
-id: LANG_SOKOBAN_ON
-desc: how to undo move 
-eng: "[ON] To Undo"
-new:
-
-id: LANG_INVERT
-desc: in settings_menu
-eng: "LCD Mode"
-new:
-
 id: LANG_CHANNEL_STEREO_NARROW_PLAYER
 desc: in sound_settings
 eng: "St. Narrow"
@@ -1465,51 +721,6 @@
 eng: "Update VBR file"
 new: 
 
-id: LANG_INVERT_CURSOR
-desc: in settings_menu
-eng: "Line Selector"
-new:
-
-id: LANG_RECORDING_EDITABLE
-desc: Editable recordings setting
-eng: "Independent frames"
-new:
-
-id: LANG_STATUS_BAR
-desc: display menu, F3 substitute
-eng: "Status Bar"
-new:
-
-id: LANG_SCROLL_BAR
-desc: display menu, F3 substitute
-eng: "Scroll Bar"
-new:
-
-id: LANG_CAPTION_BACKLIGHT
-desc: in settings_menu
-eng: "Caption backlight"
-new:
-
-id: LANG_INVERT_CURSOR_POINTER
-desc: in settings_menu
-eng: "Pointer"
-new:
-
-id: LANG_INVERT_CURSOR_BAR
-desc: in settings_menu
-eng: "Bar(Inverse)"
-new:
-
-id: LANG_INVERT_LCD_NORMAL
-desc: in settings_menu
-eng: "Normal"
-new:
-
-id: LANG_INVERT_LCD_INVERSE
-desc: in settings_menu
-eng: "Inverse"
-new:
-
 id: LANG_MAX_FILES_IN_DIR
 desc: in settings_menu
 eng: "Max files in dir browser"
@@ -1540,36 +751,11 @@
 eng: "Jump Scroll Delay"
 new:
 
-id: LANG_RECORD_TIMESPLIT
-desc: Prompt for record timer interval setting, in the record settings menu
-eng: "Time Split"
-new:
-
-id: LANG_RECORD_TIMESPLIT_REC
-decs: Display of record timer interval setting, on the record screen
-eng: "Split time:"
-new:
-
 id: LANG_SHOW_ICONS
 desc: in settings_menu
 eng: "Show Icons"
 new:
 
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new:
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new:
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new:
-
 ##
 ## Strings used in the plugin loader:
 ##
@@ -1584,10 +770,10 @@
 eng: "Failed reading %s"
 new:
 
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new:
+#id: LANG_PLUGIN_WRONG_MODEL
+#desc: The plugin is not compatible with the archos model trying to run it
+#eng: "Incompatible model"
+#new:
 
 id: LANG_PLUGIN_WRONG_VERSION
 desc: The plugin is not compatible with the rockbox version trying to run it
@@ -1599,40 +785,6 @@
 eng: "Plugin returned error"
 new:
 
-##
-## boot change detection
-##
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new:
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new:
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new:
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new:
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new:
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new:
-
 id: LANG_QUEUE_LAST
 desc: in onplay menu.  queue a track/playlist at end of playlist.
 eng: "Queue last"
@@ -1683,11 +835,6 @@
 eng: "Saved %d tracks (%s)"
 new:
 
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new:
-
 id: LANG_STOP_ABORT
 desc: Used on player models
 eng: "STOP to abort"
@@ -1728,102 +875,47 @@
 eng: "Recursively?"
 new:
 
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
+id: LANG_SONG_INFO
+desc: Replaces Show ID3 Info
+eng: "Song Info"
 new:
 
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
+id: LANG_USE_VOLUME_SLIDER
+desc: Asked in display menu
+eng: "Use Volume Slider?"
 new:
 
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
+id: LANG_VOLUME_SLIDER
+desc: In display menu
+eng: "Volume Slider"
 new:
 
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new:
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new:
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new:
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: 
-
-id: LANG_LINE_IN
-desc:  in settings_menu
-eng: "Line In"
-new:
-
-id: LANG_NO_FILES
-desc:  in settings_menu
-eng: "No files"
-new:
-
-id: LANG_BUTTONBAR_MENU
-desc:  in button bar
-eng: "Menu"
-new:
-
-id: LANG_BUTTONBAR_OPTIONS
-desc:  in button bar
-eng: "Option"
-new:
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc:  in button bar
-eng: "Preset"
-new:
-
-id: LANG_FM_SAVE_PRESET
-desc:  in radio screen
-eng: "Save preset"
-new:
-
-id: LANG_FM_DELETE_PRESET
-desc:  in radio screen
-eng: "Remove preset"
-new:
-
-id: LANG_FM_STATION
-desc:  in radio screen
-eng: "Station: %d.%dMHz"
+id: LANG_NEO_INFO
+desc: in the main menu
+eng: "Neo Info"
 new:
 
-id: LANG_FM_PRESET_SAVE_FAILED
-desc:  in radio screen
-eng: "Preset save failed"
+id: LANG_MODEL
+desc: Use in Info menu
+eng: "Model"
 new:
 
-id: LANG_FM_NO_PRESETS
-desc:  in radio screen
-eng: "The preset list is empty"
+id: LANG_OPEN_NEO
+desc: Used alot
+eng: "Open Neo"
 new:
 
-id: LANG_FM_NO_FREE_PRESETS
-desc:  in radio screen
-eng: "The preset list is full"
+id: LANG_MPEG_DECODER
+desc: Used alot
+eng: "MPEG Decoder"
 new:
 
-id: LANG_FM_RADIO
-desc:  in main menu
-eng: "FM Radio"
+id: LANG_MEMORY
+desc: Used in Neo Info
+eng: "Memory"
 new:
 
-id: LANG_FM_BUTTONBAR_RECORD
-desc:  in main menu
-eng: "Record"
+id: LANG_HARD_DISK
+desc: Used in Neo Info
+eng: "Hard Disk"
 new:
diff -rubBP /home/dast/src/rockbox/apps/lang/espanol.lang ./apps/lang/espanol.lang
--- /home/dast/src/rockbox/apps/lang/espanol.lang	Fri May  2 13:57:18 2003
+++ ./apps/lang/espanol.lang	Tue Dec  2 21:59:16 2003
@@ -40,11 +39,6 @@
 eng: "USB (Sim)"
 new: "USB (Simulado)"
 
-id: LANG_ROCKBOX_INFO
-desc: displayed topmost on the info screen
-eng: "Rockbox Info:"
-new: "Info. de rockbox:"
-
 id: LANG_BUFFER_STAT_PLAYER
 desc: the buffer size player-screen width, %d MB %d fraction of MB
 eng: "Buf: %d.%03dMB"
@@ -258,7 +252,7 @@
 id: LANG_FOLLOW
 desc: in settings_menu
 eng: "Follow Playlist"
-new: "Seguir lista de repr."
+new: "Seguir lista de reproduccion"
 
 id: LANG_RESET_ASK_PLAYER
 desc: confirm to reset settings
@@ -519,12 +513,12 @@
 id: LANG_ID3_TRACKNUM
 desc: in wps
 eng: "[Tracknum]"
-new: "[Nş pista]"
+new: "[No pista]"
 
 id: LANG_ID3_NO_TRACKNUM
 desc: in wps if no track number is avaible
 eng: "<No Tracknum>"
-new: "<sin nş pista>" 
+new: "<sin no pista>" 
 
 id: LANG_ID3_LENGHT
 desc: in wps
@@ -784,7 +778,7 @@
 id: LANG_FILTER
 desc: setting name for dir filter
 eng: "Show Files"
-new: "mostrar archivos"
+new: "Mostrar archivos"
 
 id: LANG_FILTER_MUSIC
 desc: show only music-related files
@@ -1086,7 +1080,7 @@
 id: LANG_MP3BUFFER_MARGIN
 desc: MP3 buffer margin time
 eng: "Anti-Skip Buffer"
-new: "Buffer Anit-salto"
+new: "Buffer Anti-salto"
 
 id: LANG_OSCILLOGRAPH
 desc: the name of the oscillograph demo in the demo menu
@@ -1249,11 +1242,6 @@
 eng: "Line In"
 new: "Analogica" 
 
-id: LANG_RECORDING_SRC_MIC
-desc: in the recording settings
-eng: "Mic"
-new: "Micro"
-
 id: LANG_RENAME
 desc: The verb/action Rename
 eng: "Rename"
@@ -1364,11 +1352,6 @@
 eng: "Stereo Wide"
 new: "Estereo Amplio"
 
-id: LANG_CPU_SLEEP
-desc: in system_settings_menu() (removed)
-eng: ""
-new: ""
-
 id: LANG_FADE_ON_STOP
 desc: options menu to set fade on stop or pause
 eng: "Fade On Stop/Pause"
@@ -1478,3 +1461,68 @@
 desc: in settings_menu
 eng: "Inverse"
 new: "Inverso"
+
+id: LANG_PLAYLIST_MENU
+desc: in main menu.
+eng: "Playlist Options"
+new: "Opciones del Playlist"
+
+id: LANG_SAVE_DYNAMIC_PLAYLIST
+desc: in playlist menu.
+eng: "Save Dynamic Playlist"
+new: "Guardar Playlist Dinámico"
+
+id: LANG_RECURSE_DIRECTORY
+desc: In playlist menu
+eng: "Recursively Insert Directories"
+new: "Recurrentemente Insertar Directorio"
+
+id: LANG_SONG_INFO
+desc: Replaces Show ID3 Info
+eng: "Song Info"
+new: "Info de Canción"
+
+id: LANG_MAX_FILES_IN_PLAYLIST
+desc: in settings_menu
+eng: "Max playlist size"
+new: "Tamańo máximo de archivos en browser del directorio"
+
+id: LANG_MAX_FILES_IN_PLAYLIST
+desc: in settings_menu
+eng: "Max playlist size"
+new: "Tamańo máximo del playlist"
+
+id: LANG_JUMP_SCROLL
+desc: (player) menu altarnative for jump scroll
+eng: "Jump scroll"
+new: "Saltar"
+
+id: LANG_ONE_TIME
+desc: (player) the jump scroll shall be done "one time"
+eng: "One time"
+new: "Una vez"
+
+id: LANG_ALWAYS
+desc: (player) the jump scroll shall be done "always"
+eng: "Always"
+new: "Siempre"
+
+id: LANG_JUMP_SCROLL_DELAY
+desc: (player) Delay before making a jump scroll
+eng: "Jump Scroll Delay"
+new: "Retraso de salto"
+
+id: LANG_USE_VOLUME_SLIDER
+desc: Asked in display menu
+eng: "Use Volume Slider?"
+new: "Usar barra de volumen?"
+
+id: LANG_VOLUME_SLIDER
+desc: In display menu
+eng: "Volume Slider"
+new: "Barra de volumen"
+
+id: LANG_NEO_INFO
+desc: in the main menu
+eng: "Neo Info"
+new: "Neo Información"
\ No newline at end of file
diff -rubBP /home/dast/src/rockbox/apps/lang/francais.lang ./apps/lang/francais.lang
--- /home/dast/src/rockbox/apps/lang/francais.lang	Thu Dec  4 16:35:38 2003
+++ ./apps/lang/francais.lang	Tue Dec  2 21:59:16 2003
@@ -1,6 +1,6 @@
-# $Id: francais.lang,v 1.32 2003/12/04 14:29:06 zagor Exp $
+# francais.lang 2003/06/09
 #
-# Based on file english.lang,v 1.92 2003/11/20 00:33:43 linusnielsen
+# Based on file english.lang,v 1.77 2003/06/05 09:38:26 zagor Exp $
 #
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
@@ -75,7 +75,7 @@
 id: LANG_BOUNCE
 desc: in the demos menu
 eng: "Bounce"
-new: "Texte bondissant"
+new: "Texte rebondissant"
 
 id: LANG_SNOW
 desc: in the demos menu
@@ -148,7 +148,7 @@
 id: LANG_SETTINGS_SAVE_RECORDER
 desc: displayed if save settings has failed
 eng: "Save Failed"
-new: "Echec de l'enreg!"
+new: "Echec de l'enregistrement"
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
@@ -193,7 +193,7 @@
 id: LANG_PLAY_SELECTED
 desc: in settings_menu
 eng: "Play Selected First"
-new: "Lire fichier courant en 1er"
+new: "Lire fichier selectionné en 1er"
 
 id: LANG_MP3FILTER
 desc: in settings_menu
@@ -372,7 +372,7 @@
 id: LANG_BBOOST
 desc: in sound settings
 eng: "Bass Boost"
-new: "Ampli. des graves"
+new: "Maximalisation des graves"
 
 id: LANG_DECAY
 desc: in sound_settings
@@ -457,7 +457,7 @@
 id: LANG_KEYLOCK_ON_RECORDER
 desc: displayed when key lock is on
 eng: "Key Lock Is ON"
-new: "Touches désactivées"
+new: "Touches protégées"
 
 id: LANG_KEYLOCK_OFF_RECORDER
 desc: displayed when key lock is turned off
@@ -868,7 +868,7 @@
 id: LANG_REPEAT
 desc: in settings_menu
 eng: "Repeat"
-new: "Répéter"
+new: "Répétition"
 
 id: LANG_REPEAT_ALL
 desc: repeat playlist once all songs have completed
@@ -1138,7 +1138,7 @@
 id: LANG_RECORDING_SETTINGS
 desc: in the main menu
 eng: "Recording Settings"
-new: "Options d'enreg."
+new: "Options d'enregistrement"
 
 id: LANG_DISK_STAT
 desc: disk size info
@@ -1183,7 +1183,7 @@
 id: LANG_SCROLL_DELAY
 desc: Delay before scrolling
 eng: "Scroll Start Delay"
-new: "Délai avant défilement"
+new: "Délai avant début du défilement"
 
 id: LANG_SCROLL_STEP
 desc: Pixels to advance per scroll
@@ -1218,7 +1218,7 @@
 id: LANG_BATTERY_CAPACITY
 desc: in settings_menu
 eng: "Battery Capacity"
-new: "Capacité de batterie"
+new: "Capacité de la batterie"
 
 id: LANG_QUEUE_QUEUED
 desc: queued track name %s
@@ -1258,7 +1258,7 @@
 id: LANG_QUEUE
 desc: The verb/action Queue
 eng: "Queue"
-new: "File d'attente"
+new: "Mettre en queue"
 
 id: LANG_DELETE
 desc: The verb/action Delete
@@ -1388,7 +1388,7 @@
 id: LANG_SETTINGS_LOADED2
 desc: Feedback shown when a .cfg file is loaded
 eng: "Loaded"
-new: "Chargé"
+new: "Chargée"
 
 id: LANG_FADE_ON_STOP
 desc: options menu to set fade on stop or pause
@@ -1439,7 +1439,7 @@
 id: LANG_SETTINGS_SAVED2
 desc: Feedback shown when a .cfg file is saved
 eng: "Saved"
-new: "Enregistré"
+new: "Enregistrée"
 
 id: LANG_VBRFIX_STOP_PLAY
 desc: Tells the user to stop the playback
@@ -1529,292 +1529,59 @@
 id: LANG_JUMP_SCROLL_DELAY
 desc: (player) Delay before making a jump scroll
 eng: "Jump Scroll Delay"
-new: "Délai avant défil."
+new: "Délai avant saut"
 
 id: LANG_RECORD_TIMESPLIT
 desc: Prompt for record timer interval setting, in the record settings menu
 eng: "Time Split"
-new: "Temps de coupure"
+new: "Temps de coupure (hh:mm)"
 
 id: LANG_RECORD_TIMESPLIT_REC
 decs: Display of record timer interval setting, on the record screen
 eng: "Split time:"
-new: "Tps coupe:"
+new: "Tmps coupe:"
 
 id: LANG_SHOW_ICONS
 desc: in settings_menu
 eng: "Show Icons"
 new: "Afficher les icônes"
 
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Disque plein. Presser OFF pour continuer."
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "PLAY = Oui"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Autres = Non"
-
-##
-## Strings used in the plugin loader:
-##
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Impossible d'ouvrir %s"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Erreur de Lecture %s"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "Modčle Incompatible"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "Mauvaise version"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Erreur retourné par le Plugin"
-
-##
-## boot change detection
-##
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Démarrage Modifié"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "Redémarrer?"
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "Flipit"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othelo"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Puzzle taquin"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Star"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "En fin de file"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Insérer"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Insérer Dernier"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Suivant en file"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Insérer suivant"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "Enreg. list musiq. dynamique"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Options Liste musicale"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "%d pistes Insérées (%s)"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "%d pistes (%s) en file d'attente"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "%d pistes (%s) enreg."
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "OFF pour annuler"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STOP pour annuler"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Erreur de mise ŕ jour du fichier control de liste musicale"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Erreur d'accés ŕ la liste musicale"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Erreur d'accés au fichier control de liste musicale"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Erreur d'accés au répertoire"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "Fichier control de liste musicale invalide"
-
 id: LANG_RECURSE_DIRECTORY
 desc: In playlist menu
 eng: "Recursively Insert Directories"
-new: "Insertion récursive des répertoires"
+new: "Inserer les repertoires recursivement?"
 
 id: LANG_RECURSE_DIRECTORY_QUESTION
 desc: Asked from onplay screen
 eng: "Recursively?"
-new: "Récursivement?"
+new: "Recursivement?"
 
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Polices"
+id: LANG_SONG_INFO
+desc: Replaces Show ID3 Info
+eng: "Song Info"
+new: "Info Chanson"
+
+id: LANG_USE_VOLUME_SLIDER
+desc: Asked in display menu
+eng: "Use Volume Slider?"
+new: "Utiliser la barre de volume?"
+
+id: LANG_VOLUME_SLIDER
+desc: In display menu
+eng: "Volume Slider"
+new: "Barre de volume"
 
-id: LANG_FIRMWARE
+id: LANG_NEO_INFO
 desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Langue"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Durant l'écran de lecture"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Configurations"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Plugins"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Mode Adaptateur Voiture"
-
-id: LANG_LINE_IN
-desc:  in settings_menu
-eng: "Line In"
-new: "Entrée(in)"
-
-id: LANG_NO_FILES
-desc:  in settings_menu
-eng: "No files"
-new: "Pas de Fichiers"
+eng: "Neo Info"
+new: "Info Neo"
 
-id: LANG_BUTTONBAR_MENU
-desc:  in button bar
-eng: "Menu"
-new: "Menu"
-
-id: LANG_BUTTONBAR_OPTIONS
-desc:  in button bar
-eng: "Option"
-new: "Option"
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc:  in button bar
-eng: "Preset"
-new: "Pré-selections"
-
-id: LANG_FM_SAVE_PRESET
-desc:  in radio screen
-eng: "Save preset"
-new: "Enreg. pré-selection"
-
-id: LANG_FM_DELETE_PRESET
-desc:  in radio screen
-eng: "Remove preset"
-new: "Suppr. pré-selection"
-
-id: LANG_FM_STATION
-desc:  in radio screen
-eng: "Station: %d.%dMHz"
-new: "Station: %d.%dMHz"
-
-id: LANG_FM_PRESET_SAVE_FAILED
-desc:  in radio screen
-eng: "Preset save failed"
-new: "Echec d'enreg. pré-selection"
-
-id: LANG_FM_NO_PRESETS
-desc:  in radio screen
-eng: "The preset list is empty"
-new: "liste de pré-selections vide"
-
-id: LANG_FM_NO_FREE_PRESETS
-desc:  in radio screen
-eng: "The preset list is full"
-new: "liste de pré-selections pleine"
-
-id: LANG_FM_RADIO
-desc:  in main menu
-eng: "FM Radio"
-new: "Radio FM"
-
-id: LANG_FM_BUTTONBAR_RECORD
-desc:  in main menu
-eng: "Record"
-new: "Enreg."
+id: LANG_MODEL
+desc: Use in Info menu
+eng: "Model"
+new: "Modele"
+
+id: LANG_MPEG_DECODER
+desc: Used alot
+eng: "MPEG Decoder"
+new: "Decodeur MPEG"
diff -rubBP /home/dast/src/rockbox/apps/lang/hebrew.lang ./apps/lang/hebrew.lang
--- /home/dast/src/rockbox/apps/lang/hebrew.lang	Fri Apr 25 14:52:52 2003
+++ ./apps/lang/hebrew.lang	Wed Oct 29 15:12:11 2003
@@ -1,4 +1,4 @@
-# $Id: hebrew.lang,v 1.4 2003/04/21 16:15:10 hohensoh Exp $
+# $Id: hebrew.lang,v 1.1.1.1 2003/10/29 14:12:11 knobby2346 Exp $
 #
 # This is the master of the language files. This is the original, the one with
 # all the existing strings Rockbox features.
Only in /home/dast/src/rockbox/apps/lang: islenska.lang
diff -rubBP /home/dast/src/rockbox/apps/lang/italiano.lang ./apps/lang/italiano.lang
--- /home/dast/src/rockbox/apps/lang/italiano.lang	Wed Nov 19 07:34:43 2003
+++ ./apps/lang/italiano.lang	Wed Oct 29 15:12:12 2003
@@ -662,38 +662,38 @@
 
 id: LANG_SOKOBAN_LEVEL
 desc: must be smaller than 6 characters
-eng: ""
-new: ""
+eng: "Level"
+new: "Liv."
 
 id: LANG_SOKOBAN_MOVE
 desc: must be smaller than 6 characters
-eng: ""
-new: ""
+eng: "Moves"
+new: "Mosse"
 
 id: LANG_SOKOBAN_WIN
 desc: displayed when you win 
-eng: ""
-new: ""
+eng: "YOU WIN!!"
+new: "HAI VINTO!!"
 
 id: LANG_SOKOBAN_QUIT
 desc: how to quit game
-eng: ""
-new: ""
+eng: "[Off] To Stop"
+new: "[Off] Per Interrompere"
 
 id: LANG_SOKOBAN_F1
 desc: what does F1 do
-eng: ""
-new: ""
+eng: "[F1] - Level"
+new: "[F1] - Livello"
 
 id: LANG_SOKOBAN_F2
 desc: what does F2 do
-eng: ""
-new: ""
+eng: "[F2] Same Level"
+new: "[F2] Stesso Livello"
 
 id: LANG_SOKOBAN_F3
 desc: what does F3 do
-eng: ""
-new: ""
+eng: "[F3] + Level"
+new: "[F3] + Livello"
 
 # Next ids are for Worlmet Game.
 # Lenght restrictions for score board strings (LANG_SB_XXX):
@@ -702,38 +702,38 @@
 
 id: LANG_WORMLET_LENGTH
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Len:%d"
+new: "Lun:%d"
 
 id: LANG_WORMLET_GROWING
 desc: wormlet game 
-eng: ""
-new: ""
+eng: "Growing"
+new: "Cresce"
 
 id: LANG_WORMLET_HUNGRY
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Hungry"
+new: "Fame"
 
 id: LANG_WORMLET_WORMED
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Wormed"
+new: "Vermato"
 
 id: LANG_WORMLET_ARGH
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Argh"
+new: "Argh"
 
 id: LANG_WORMLET_CRASHED
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Crashed"
+new: "Scontro"
 
 id: LANG_WORMLET_HIGHSCORE
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Hs: %d"
+new: "Rec: %d"
 
 # Length restrictions for wormlet config screen strings (LANG_CS_XXX)
 # They must fit on the entire screen - preferably with the
@@ -741,50 +741,50 @@
 
 id: LANG_WORMLET_PLAYERS
 desc: wormlet game
-eng: ""
-new: ""
+eng: "%d Players    UP/DN"
+new: "%d Giocatori    Su/Giů"
 
 id: LANG_WORMLET_WORMS
 desc: wormlet game
-eng: ""
-new: ""
+eng: "%d Worms        L/R"
+new: "%d Vermi        D/S"
 
 id: LANG_WORMLET_REMOTE_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Remote control F1"
+new: "Telecomando      F1"
 
 id: LANG_WORMLET_NO_REM_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "No Rem. Control F1"
+new: "No Telecomando  F1"
 
 id: LANG_WORMLET_2_KEY_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "2 Key Control   F1"
+new: "Controllo 2 Tasti F1"
 
 id: LANG_WORMLET_4_KEY_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "4 Key Control   F1"
+new: "Controllo 4 Tasti F1"
 
 id: LANG_WORMLET_NO_CONTROL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Out Of Control"
+new: "Fuori Controllo"
 
 # Wormlet game ids ended
 
 id: LANG_TETRIS_LOSE
 desc: tetris game
-eng: ""
-new: ""
+eng: "You Lose!"
+new: "Hai Perso!"
 
 id: LANG_TETRIS_LEVEL
 desc: tetris game
-eng: ""
-new: ""
+eng: "Rows - Level"
+new: "Linee - Livello"
 
 id: LANG_POWEROFF_IDLE
 desc: in settings_menu
@@ -1495,258 +1495,6 @@
 eng: "Inverse"
 new: "Invertito"
 
-id: LANG_MAX_FILES_IN_DIR
-desc: in settings_menu
-eng: "Max files in dir browser"
-new: "Massimo Numero Di Files Nel Dir Browser"
-
-id: LANG_MAX_FILES_IN_PLAYLIST
-desc: in settings_menu
-eng: "Max playlist size"
-new: "Dimensione Massima Playlist"
-
-id: LANG_JUMP_SCROLL
-desc: (player) menu altarnative for jump scroll
-eng: "Jump scroll"
-new: "Salto Scorrimento"
-
-id: LANG_ONE_TIME
-desc: (player) the jump scroll shall be done "one time"
-eng: "One time"
-new: "Una Volta"
-
-id: LANG_ALWAYS
-desc: (player) the jump scroll shall be done "always"
-eng: "Always"
-new: "Sempre"
-
-id: LANG_JUMP_SCROLL_DELAY
-desc: (player) Delay before making a jump scroll
-eng: "Jump Scroll Delay"
-new: "Ritardo Salto Scorrimento"
-
-id: LANG_RECORD_TIMESPLIT
-desc: Prompt for record timer interval setting, in the record settings menu
-eng: "Time Split"
-new: "Intervallo Di Tempo"
-
-id: LANG_RECORD_TIMESPLIT_REC
-decs: Display of record timer interval setting, on the record screen
-eng: "Split time:"
-new: "Intervallo Di Tempo:"
-
-id: LANG_SHOW_ICONS
-desc: in settings_menu
-eng: "Show Icons"
-new: "Mostra Icone"
-
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Disco Pieno. Premi OFF Per Continuare"
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "PLAY = Si"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Qualsiasi Altro = No"
-
-##
-## Strings used in the plugin loader:
-##
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Non Riesco Ad Aprire %s"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Errore In Lettura Di %s"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "Modello Incompatibile"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "Versione Incompatibile"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Errore Di Ritorno Del Plugin"
-
-##
-## boot change detection
-##
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Boot Cambiato"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "Riavviare Adesso?"
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "Flipit"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othelo"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Sliding Puzzle"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Star"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "Accoda All'ultima"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Inserisci"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Inserisci In Fondo"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Accoda Alla Prossima"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Inserisci Accanto"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "Salva Playlist Dinamica"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Opzioni Playlist"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "Inserite %d Traccie (%s)"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "Accodate %d Traccie (%s)"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "Salvate %d Traccie (%s)"
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "OFF Per Annullare"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STOP Per Annullare"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Errore Aggiornamento File Di Controllo Playlist"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Errore Accesso File Playlist"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Errore Accesso File Di Controllo Playlist"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Errore Accesso Directory"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "File Controllo Playlist Non Valido"
-
-id: LANG_RECURSE_DIRECTORY
-desc: In playlist menu
-eng: "Recursively Insert Directories"
-new: "Inserimento Directories In Modo Ricorsivo"
-
-id: LANG_RECURSE_DIRECTORY_QUESTION
-desc: Asked from onplay screen
-eng: "Recursively?"
-new: "In Modo Ricorsivo?"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Fonts"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Lingua"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Schermata Riproduzione Files"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Configurazioni"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Plugins"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Modalitŕ Adattatore Auto"
 
 
 
diff -rubBP /home/dast/src/rockbox/apps/lang/nederlands.lang ./apps/lang/nederlands.lang
--- /home/dast/src/rockbox/apps/lang/nederlands.lang	Thu Dec  4 16:35:38 2003
+++ ./apps/lang/nederlands.lang	Wed Oct 29 15:12:13 2003
@@ -1,4 +1,4 @@
-# $Id: nederlands.lang,v 1.25 2003/12/04 14:29:06 zagor Exp $
+# $Id: nederlands.lang,v 1.1.1.1 2003/10/29 14:12:13 knobby2346 Exp $
 
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
@@ -137,8 +137,8 @@
 
 id: LANG_SETTINGS_BATTERY_PLAYER
 desc: if save settings has failed
-eng: "Partition?"
-new: "Partitie?"
+eng: "Batt. Low?"
+new: "Batt. Leeg?"
 
 id: LANG_SETTINGS_SAVE_RECORDER
 desc: displayed if save settings has failed
@@ -147,8 +147,8 @@
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
-eng: "No partition?"
-new: "Geen Partitie?"
+eng: "Is Battery Low?"
+new: "Is de batterij leeg ?"
 
 id: LANG_TIME_SET
 desc: used in set_time()
@@ -1678,99 +1678,9 @@
 id: LANG_STOP_ABORT
 desc: Used on player models
 eng: "STOP to abort"
-new: 'STOP om af te breken" 
+new: "STOP om af te breken" 
 
 id: LANG_RECURSE_DIRECTORY_QUESTION
 desc: Asked from onplay screen
 eng: "Recursively?"
 new: "Ook sub-directories?" 
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Configuraties"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Lettertypes"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: 
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Taal"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: 
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Afspeelscherm" 
-
-id: LANG_BUTTONBAR_MENU
-desc: in button bar
-eng: "Menu"
-new: 
-
-id: LANG_BUTTONBAR_OPTIONS
-desc: in button bar
-eng: "Option"
-new: "Optie" 
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Auto Adaptor Mode" 
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc: in button bar
-eng: "Preset"
-new: "Voorkeuze" 
-
-id: LANG_FM_DELETE_PRESET
-desc: in radio screen
-eng: "Remove preset"
-new: "Verwijder voorkeuze" 
-
-id: LANG_FM_NO_FREE_PRESETS
-desc: in radio screen
-eng: "The preset list is full"
-new: "De voorkeuze lijst is vol" 
-
-id: LANG_FM_NO_PRESETS
-desc: in radio screen
-eng: "The preset list is empty"
-new: "De Voorkeuze lijst is leeg" 
-
-id: LANG_FM_PRESET_SAVE_FAILED
-desc: in radio screen
-eng: "Preset save failed"
-new: "Opslaan voorkeuze mislukt"
-
-id: LANG_FM_SAVE_PRESET
-desc: in radio screen
-eng: "Save preset"
-new: "Sla voorkeuze op"
-
-id: LANG_FM_STATION
-desc: in radio screen
-eng: "Station: %d.%dMHz"
-new: "Zender: %d.%dMHz"
-
-id: LANG_LINE_IN
-desc: in settings_menu
-eng: "Line In"
-new: "Lijn in" 
-
-id: LANG_NO_FILES
-desc: in settings_menu
-eng: "No files"
-new: "Geen bestanden" 
Only in /home/dast/src/rockbox/apps/lang: polski-ascii.lang
diff -rubBP /home/dast/src/rockbox/apps/lang/polski.lang ./apps/lang/polski.lang
--- /home/dast/src/rockbox/apps/lang/polski.lang	Thu Dec  4 16:35:39 2003
+++ ./apps/lang/polski.lang	Wed Oct 29 15:12:14 2003
@@ -1,16 +1,14 @@
-# $Id: polski.lang,v 1.9 2003/12/04 14:29:06 zagor Exp $
-# Polish translation: monter.FM (2003/10/29 15:50:00)
-# Use clR6x8-8859-2 font to display properly (only in AJB Recorder).
-#
+# $Id: polski.lang,v 1.1.1.1 2003/10/29 14:12:14 knobby2346 Exp $
+
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
 eng: "Sound Settings"
-new: "Ustawienia dźwięku"
+new: "Ustawienia dzwieku"
 
 id: LANG_GENERAL_SETTINGS
 desc: in the main menu
 eng: "General Settings"
-new: "Ustawienia główne"
+new: "Ustawienia"
 
 id: LANG_GAMES
 desc: in the main menu
@@ -35,17 +33,17 @@
 id: LANG_DEBUG
 desc: in the main menu
 eng: "Debug (Keep Out!)"
-new: "Podgląd procesów"
+new: "Sledz bledy (ostroznie!)"
 
 id: LANG_USB
 desc: in the main menu
 eng: "USB (Sim)"
-new: "USB (Sim)"
+new: "USB (sim)"
 
 id: LANG_ROCKBOX_INFO
 desc: displayed topmost on the info screen
 eng: "Rockbox Info:"
-new: "Rockbox info:"
+new: "Rockbox Info:"
 
 id: LANG_BUFFER_STAT_PLAYER
 desc: the buffer size player-screen width, %d MB %d fraction of MB
@@ -55,7 +53,7 @@
 id: LANG_BUFFER_STAT_RECORDER
 desc: the buffer size recorder-screen width, %d MB %d fraction of MB
 eng: "Buffer: %d.%03dMB"
-new: "Bufor: %d.%03d MB"
+new: "Bufor: %d.%03dMB"
 
 id: LANG_BATTERY_LEVEL_PLAYER
 desc: the battery level in percentage
@@ -70,17 +68,17 @@
 id: LANG_BATTERY_CHARGE
 desc: tells that the battery is charging, instead of battery level
 eng: "Battery: Charging"
-new: "Bateria: Ładowanie"
+new: "Bateria: ladowanie"
 
 id: LANG_BOUNCE
 desc: in the demos menu
 eng: "Bounce"
-new: "Skaczący napis"
+new: "Skaczacy napis"
 
 id: LANG_SNOW
 desc: in the demos menu
 eng: "Snow"
-new: "Śnieg"
+new: "Snieg"
 
 id: LANG_TETRIS
 desc: in the games menu
@@ -100,20 +98,18 @@
 id: LANG_SNAKE
 desc: in the games menu
 eng: "Snake"
-new: "Wąż"
+new: "Waz"
 
 id: LANG_PLAYLIST_LOAD
 desc: displayed on screen while loading a playlist
 eng: "Loading..."
-new: "Ładuję..."
+new: "Ladowanie..."
 
-# NO LONGER USED
 id: LANG_PLAYLIST_SHUFFLE
 desc: displayed on screen while shuffling a playlist
 eng: "Shuffling..."
-new: "Losuję..."
+new: "Losowanie..."
 
-# NO LONGER USED
 id: LANG_PLAYLIST_PLAY
 desc: displayed on screen when start playing a playlist
 eng: "Playing..."
@@ -127,33 +123,32 @@
 id: LANG_PLAYINDICES_BUFFER
 desc: in playlist.indices() when playlist is full
 eng: "Buffer Full"
-new: "Pełny bufor"
+new: "Pelny bufor"
 
-# NO LONGER USED
 id: LANG_PLAYINDICES_AMOUNT
 desc: number of files in playlist
 eng: "%d Files"
-new: "%d plików"
+new: "%d plikow"
 
 id: LANG_SETTINGS_SAVE_PLAYER
 desc: displayed if save settings has failed
 eng: "Save Failed"
-new: "Błąd zapisu"
+new: "Blad zapisu"
 
 id: LANG_SETTINGS_BATTERY_PLAYER
 desc: if save settings has failed
-eng: "Partition?"
-new: "Partycja?"
+eng: "Batt. Low?"
+new: "Slabe bat.?"
 
 id: LANG_SETTINGS_SAVE_RECORDER
 desc: displayed if save settings has failed
 eng: "Save Failed"
-new: "Błąd zapisu"
+new: "Blad zapisu"
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
-eng: "No partition?"
-new: "Brak partycji?"
+eng: "Is Battery Low?"
+new: "Slabe baterie?"
 
 id: LANG_TIME_SET
 desc: used in set_time()
@@ -163,22 +158,22 @@
 id: LANG_TIME_REVERT
 desc: used in set_time()
 eng: "OFF To Revert"
-new: "OFF - przywróć"
+new: "OFF - przywroc"
 
 id: LANG_HIDDEN
 desc: in settings_menu
 eng: ""
-new:
+new: "Ukryte pliki"
 
 id: LANG_HIDDEN_SHOW
 desc: in settings_menu 
 eng: ""
-new:
+new: "Pokaz"
 
 id: LANG_HIDDEN_HIDE
 desc: in settings_menu
 eng: ""
-new:
+new: "Ukryj"
 
 id: LANG_CONTRAST
 desc: in settings_menu
@@ -198,22 +193,22 @@
 id: LANG_MP3FILTER
 desc: in settings_menu
 eng: ""
-new:
+new: "Filtr muzyczny"
 
 id: LANG_SORT_CASE
 desc: in settings_menu
 eng: "Sort Case Sensitive"
-new: "Sortuj uwzgl. wielkość liter"
+new: "Sortuj uwzgl. wielkosc liter"
 
 id: LANG_RESUME
 desc: in settings_menu
 eng: "Resume"
-new: "Dokończ"
+new: "Dokoncz"
 
 id: LANG_OFF
 desc: Used in a lot of places
 eng: "Off"
-new: "wył."
+new: "wyl."
 
 id: LANG_RESUME_SETTING_ASK
 desc: in settings_menu
@@ -223,27 +218,27 @@
 id: LANG_ON
 desc: Used in a lot of places
 eng: "On"
-new: "włącz"
+new: "wlacz"
 
 id: LANG_BACKLIGHT
 desc: in settings_menu
 eng: "Backlight"
-new: "Podświetlenie"
+new: "Podswietlenie"
 
 id: LANG_SCROLL
 desc: in settings_menu
 eng: "Scroll Speed Setting Example"
-new: "Przykładowa prędkość przesuwu"
+new: "Przykladowa predkosc przesuwu"
 
 id: LANG_DISCHARGE
 desc: in settings_menu
 eng: "Deep Discharge"
-new: "Rozładowanie"
+new: "Rozladowanie"
 
 id: LANG_TIME
 desc: in settings_menu
 eng: "Set Time/Date"
-new: "Ustaw datę/czas"
+new: "Ustaw Date/Czas"
 
 id: LANG_SPINDOWN
 desc: in settings_menu
@@ -253,40 +248,40 @@
 id: LANG_FFRW_STEP
 desc: in settings_menu
 eng: "FF/RW Min Step"
-new: "Minim. skok przewijania"
+new: "Skok przewijania (minim.)"
 
 id: LANG_FFRW_ACCEL
 desc: in settings_menu
 eng: "FF/RW Accel"
-new: "Przyśpieszenie przewijania"
+new: "Przyspieszenie przewijania"
 
 id: LANG_FOLLOW
 desc: in settings_menu
 eng: "Follow Playlist"
-new: "Idź do playlisty"
+new: "Idz do playlisty"
 
 # depreciated
 id: LANG_RESET_ASK_PLAYER
 desc: confirm to reset settings
 eng: ""
-new:
+new: "Na pewno?"
  
 # depreciated
 id: LANG_RESET_CONFIRM_PLAYER
 desc: confirm to reset settings
 eng: ""
-new:
+new: "GRAJ/STOP"
 
 id: LANG_RESET_ASK_RECORDER
 desc: confirm to reset settings
 eng: "Are You Sure?"
-new: "Jesteś pewny?"
+new: "Jestes pewny?"
 
 # depreciated
 id: LANG_RESET_CONFIRM_RECORDER
 desc: confirm to reset settings
 eng: ""
-new:
+new: "GRAJ = Tak"
 
 # depreciated
 id: LANG_RESET_CANCEL_RECORDER
@@ -302,12 +297,12 @@
 id: LANG_RESET_DONE_CLEAR
 desc: visual confirmation after settings reset
 eng: "Cleared"
-new: "wyczyszczone"
+new: "Oczyszczono"
 
 id: LANG_RESET_DONE_CANCEL
 desc: Visual confirmation of cancelation
 eng: "Canceled"
-new: "anulowane"
+new: "Anulowano"
 
 id: LANG_CASE_MENU
 desc: in fileview_settings_menu()
@@ -317,12 +312,12 @@
 id: LANG_SCROLL_MENU
 desc: in display_settings_menu()
 eng: "Scroll"
-new: "Przesuwanie napisów"
+new: "Przesuwanie napisow"
 
 id: LANG_RESET
 desc: in system_settings_menu()
 eng: "Reset Settings"
-new: "Ustawienia domyślne"
+new: "Ustawienia domyslne"
 
 id: LANG_PLAYBACK
 desc: in settings_menu()
@@ -332,12 +327,12 @@
 id: LANG_FILE
 desc: in settings_menu()
 eng: "File View"
-new: "Widok plików"
+new: "Widok plikow"
 
 id: LANG_DISPLAY
 desc: in settings_menu()
 eng: "Display"
-new: "Wyświetlanie"
+new: "Wyswietlanie"
 
 id: LANG_SYSTEM
 desc: in settings_menu()
@@ -367,7 +362,7 @@
 id: LANG_LOUDNESS
 desc: in sound_settings
 eng: "Loudness"
-new: "Głośność"
+new: "Glosnosc"
 
 id: LANG_BBOOST
 desc: in sound settings
@@ -377,17 +372,17 @@
 id: LANG_DECAY
 desc: in sound_settings
 eng: "AV Decay Time"
-new: "Czas wyciszenia"
+new: "Czas zejscia"
 
 id: LANG_CHANNEL_MENU
 desc: in sound_settings
 eng: "Channels"
-new: "Kanały"
+new: "Kanaly"
 
 id: LANG_CHANNEL
 desc: in sound_settings
 eng: "Channel Configuration"
-new: "Konfiguracja kanałów"
+new: "Konfiguracja kanalow"
 
 id: LANG_CHANNEL_STEREO
 desc: in sound_settings
@@ -417,34 +412,32 @@
 id: LANG_SHOWDIR_ERROR_BUFFER
 desc: in showdir(), displayed on screen when you reach buffer limit
 eng: "Dir Buffer"
-new: "Bufor katalogów"
+new: "Bufor katalogow"
 
 id: LANG_SHOWDIR_ERROR_FULL
 desc: in showdir(), displayed on screen when you reach buffer limit
 eng: "Is Full!"
-new: "jest pełny!"
+new: "jest pelny!"
 
 id: LANG_RESUME_ASK
 desc: question asked at the begining when resume is on
 eng: "Resume?"
-new: "Dokończyć?"
+new: "Dokonczyc?"
 
 id: LANG_RESUME_CONFIRM_PLAYER
 desc: possible answers to resume question
 eng: "(PLAY/STOP)"
 new: "(GRAJ/STOP)"
 
-# depreciated
 id: LANG_RESUME_CONFIRM_RECORDER
 desc: possible answer to resume question
-eng: ""
-new:
+eng: "PLAY = Yes"
+new: "GRAJ = Tak"
 
-# depreciated
 id: LANG_RESUME_CANCEL_RECORDER
 desc: possible answer to resume question
-eng: ""
-new:
+eng: "Any Other = No"
+new: "Kazdy inny = Nie"
 
 id: LANG_KEYLOCK_ON_PLAYER
 desc: displayed when key lock is on
@@ -459,12 +452,12 @@
 id: LANG_KEYLOCK_ON_RECORDER
 desc: displayed when key lock is on
 eng: "Key Lock Is ON"
-new: "Klawisze są zablokowane"
+new: "Klawisze sa zablokowane"
 
 id: LANG_KEYLOCK_OFF_RECORDER
 desc: displayed when key lock is turned off
 eng: "Key Lock Is OFF"
-new: "Klawisze są odblokowane"
+new: "Klawisze sa odblokowane"
 
 id: LANG_MUTE_ON_PLAYER
 desc: displayed when mute is on
@@ -499,12 +492,12 @@
 id: LANG_ID3_TITLE
 desc: in wps
 eng: "[Title]"
-new: "[Tytuł]"
+new: "[Tytul]"
 
 id: LANG_ID3_NO_TITLE
 desc: in wps when no title is avaible
 eng: "<No Title>"
-new: "<bez tytułu>"
+new: "<bez tytulu>"
 
 id: LANG_ID3_ARTIST
 desc: in wps 
@@ -529,17 +522,17 @@
 id: LANG_ID3_TRACKNUM
 desc: in wps
 eng: "[Tracknum]"
-new: "[Ścieżka nr]"
+new: "[Sciezka nr]"
 
 id: LANG_ID3_NO_TRACKNUM
 desc: in wps if no track number is avaible
 eng: "<No Tracknum>"
-new: "<brak nru ścieżki>"
+new: "<brak nru sciezki>"
 
 id: LANG_ID3_LENGHT
 desc: in wps
 eng: "[Length]"
-new: "[Długość]"
+new: "[Dlugosc]"
 
 id: LANG_ID3_PLAYLIST
 desc: in wps
@@ -554,22 +547,22 @@
 id: LANG_ID3_FRECUENCY
 desc: in wps
 eng: "[Frequency]"
-new: "[Częstotl.]"
+new: "[Czestotl.]"
 
 id: LANG_ID3_PATH
 desc: in wps
 eng: "[Path]"
-new: "[Ścieżka]"
+new: "[Sciezka]"
 
 id: LANG_PITCH_UP
 desc: in wps
 eng: "Pitch Up"
-new: "Podnieś"
+new: "Podnies"
 
 id: LANG_PITCH_DOWN
 desc: in wps
 eng: "Pitch Down"
-new: "Obniż"
+new: "Obniz"
 
 id: LANG_PAUSE
 desc: in wps
@@ -579,17 +572,17 @@
 id: LANG_F2_MODE
 desc: in wps F2 pressed
 eng: "Mode:"
-new: "Tryb:"
+new: "tryb:"
 
 id: LANG_DIR_FILTER
 desc: in wps F2 pressed
 eng: ""
-new:
+new: "Filtr katalogow: %s"
 
 id: LANG_F3_STATUS
 desc: in wps F3 pressed
 eng: "Status"
-new: "Górny"
+new: "Gorny"
 
 id: LANG_F3_SCROLL
 desc: in wps F3 pressed
@@ -609,7 +602,7 @@
 id: LANG_END_CONFIRM_PLAYER
 desc: when playlist has finished
 eng: ""
-new:
+new: "Wcisnij ON"
 
 id: LANG_END_PLAYLIST_RECORDER
 desc: when playlist has finished
@@ -619,12 +612,12 @@
 id: LANG_END_CONFIRM_RECORDER
 desc: when playlist has finished
 eng: ""
-new:
+new: "Wcisnij ON"
 
 id: LANG_SNAKE_SCORE
 desc: when you die in snake game
 eng: "Your score:"
-new: "Twój wynik:"
+new: "Twoj wynik:"
 
 id: LANG_SNAKE_HISCORE
 desc: high score in snake game
@@ -649,7 +642,7 @@
 id: LANG_SNAKE_QUIT
 desc: how to quit game
 eng: "[OFF] To Quit"
-new: "[OFF] zakończ"
+new: "[OFF] zakoncz"
 
 id: LANG_SNAKE_LEVEL
 desc: level of difficulty
@@ -668,38 +661,38 @@
 
 id: LANG_SOKOBAN_LEVEL
 desc: must be smaller than 6 characters
-eng: ""
-new:
+eng: "Level"
+new: "Trudn"
 
 id: LANG_SOKOBAN_MOVE
 desc: must be smaller than 6 characters
-eng: ""
-new:
+eng: "Moves"
+new: "Ruchy"
 
 id: LANG_SOKOBAN_WIN
 desc: displayed when you win 
-eng: ""
-new:
+eng: "YOU WIN!!"
+new: "WYGRALES!"
 
 id: LANG_SOKOBAN_QUIT
 desc: how to quit game
-eng: ""
-new:
+eng: "[OFF] To Stop"
+new: "[OFF] zatrzymaj"
 
 id: LANG_SOKOBAN_F1
 desc: what does F1 do
-eng: ""
-new:
+eng: "[F1] - Level"
+new: "[F1] - poziom"
 
 id: LANG_SOKOBAN_F2
 desc: what does F2 do
-eng: ""
-new:
+eng: "[F2] Same Level"
+new: "[F2] ten sam poz."
 
 id: LANG_SOKOBAN_F3
 desc: what does F3 do
-eng: ""
-new:
+eng: "[F3] + Level"
+new: "[F3] + poziom"
 
 # Next ids are for Worlmet Game.
 # Lenght restrictions for score board strings (LANG_SB_XXX):
@@ -708,38 +701,38 @@
 
 id: LANG_WORMLET_LENGTH
 desc: wormlet game
-eng: ""
-new:
+eng: "Len:%d"
+new: "Dl.:%d"
 
 id: LANG_WORMLET_GROWING
 desc: wormlet game 
-eng: ""
-new:
+eng: "Growing"
+new: "Rosnie"
 
 id: LANG_WORMLET_HUNGRY
 desc: wormlet game
-eng: ""
-new:
+eng: "Hungry"
+new: "Glodny"
 
 id: LANG_WORMLET_WORMED
 desc: wormlet game
-eng: ""
-new:
+eng: "Wormed"
+new: "robacz."
 
 id: LANG_WORMLET_ARGH
 desc: wormlet game
-eng: ""
-new:
+eng: "Argh"
+new: "Auc"
 
 id: LANG_WORMLET_CRASHED
 desc: wormlet game
-eng: ""
-new:
+eng: "Crashed"
+new: "Rozbity"
 
 id: LANG_WORMLET_HIGHSCORE
 desc: wormlet game
-eng: ""
-new:
+eng: "Hs: %d"
+new: "Rek.%d"
 
 # Length restrictions for wormlet config screen strings (LANG_CS_XXX)
 # They must fit on the entire screen - preferably with the
@@ -747,65 +740,65 @@
 
 id: LANG_WORMLET_PLAYERS
 desc: wormlet game
-eng: ""
-new:
+eng: "%d Players    UP/DN"
+new: "%d Graczy       G/D"
 
 id: LANG_WORMLET_WORMS
 desc: wormlet game
-eng: ""
-new:
+eng: "%d Worms        L/R"
+new: "%d Robakow      L/P"
 
 id: LANG_WORMLET_REMOTE_CTRL
 desc: wormlet game
-eng: ""
-new:
+eng: "Remote Control F1"
+new: "Zdalne ster.   F1"
 
 id: LANG_WORMLET_NO_REM_CTRL
 desc: wormlet game
-eng: ""
-new:
+eng: "No Rem. Control F1"
+new: "Brak zdal.ster. F1"
 
 id: LANG_WORMLET_2_KEY_CTRL
 desc: wormlet game
-eng: ""
-new:
+eng: "2 Key Control   F1"
+new: "2 klaw. steruj. F1"
 
 id: LANG_WORMLET_4_KEY_CTRL
 desc: wormlet game
-eng: ""
-new:
+eng: "4 Key Control   F1"
+new: "4 klaw. steruj. F1"
 
 id: LANG_WORMLET_NO_CONTROL
 desc: wormlet game
-eng: ""
-new:
+eng: "Out Of Control"
+new: " Brak sterow. "
 
 # Wormlet game ids ended
 
 id: LANG_TETRIS_LOSE
 desc: tetris game
-eng: ""
-new:
+eng: "You Lose!"
+new: "Przegrales!"
 
 id: LANG_TETRIS_LEVEL
 desc: tetris game
-eng: ""
-new:
+eng: "Rows - Level"
+new: "rzedow - poziom"
 
 id: LANG_POWEROFF_IDLE
 desc: in settings_menu
 eng: "Idle Poweroff"
-new: "Aut. wylączanie"
+new: "Aut. wylaczanie"
 
 id: LANG_LANGUAGE_LOADED
 desc: shown when a language has been loaded from the dir browser
 eng: "New Language"
-new: "Nowy język"
+new: "Nowy jezyk"
 
 id: LANG_FILTER
 desc: setting name for dir filter
 eng: "Show Files"
-new: "Pokaż pliki"
+new: "Pokaz pliki"
 
 id: LANG_FILTER_MUSIC
 desc: show only music-related files
@@ -835,7 +828,7 @@
 id: LANG_PM_MENU
 desc: in the display menu
 eng: "Peak Meter"
-new: "Wskaźnik szczyt."
+new: "Wskaznik szczyt."
 
 id:   LANG_PM_RELEASE
 desc: in the peak meter menu
@@ -865,12 +858,12 @@
 id: LANG_BACKLIGHT_ON_WHEN_CHARGING
 desc: in display_settings_menu
 eng: "Backlight On When Plugged"
-new: "Podświetl kiedy podłączony"
+new: "Podswietl kiedy podlaczony"
 
 id: LANG_REPEAT
 desc: in settings_menu
 eng: "Repeat"
-new: "Powtórz"
+new: "Powtorz"
 
 id: LANG_REPEAT_ALL
 desc: repeat playlist once all songs have completed
@@ -929,7 +922,7 @@
 id: LANG_WEEKDAY_WEDNESDAY
 desc: Maximum 3-letter abbreviation for weekday
 eng: "Wed"
-new: "Śro"
+new: "Sro"
 
 id: LANG_WEEKDAY_THURSDAY
 desc: Maximum 3-letter abbreviation for weekday
@@ -939,7 +932,7 @@
 id: LANG_WEEKDAY_FRIDAY
 desc: Maximum 3-letter abbreviation for weekday
 eng: "Fri"
-new: "Pią"
+new: "Pia"
 
 id: LANG_WEEKDAY_SATURDAY
 desc: Maximum 3-letter abbreviation for weekday
@@ -994,7 +987,7 @@
 id: LANG_MONTH_OCTOBER
 desc: Maximum 3-letter abbreviation for monthname
 eng: "Oct"
-new: "Paź"
+new: "Paz"
 
 id: LANG_MONTH_NOVEMBER
 desc: Maximum 3-letter abbreviation for monthname
@@ -1009,7 +1002,7 @@
 id: LANG_CUBE
 desc: the name of the cube demo in the demo menu
 eng: "Cube"
-new: "Bryła"
+new: "Bryla"
 
 id: LANG_OSCILLOGRAPH
 desc: the name of the oscillograph demo in the demo menu
@@ -1024,52 +1017,52 @@
 id: LANG_BATTERY_DISPLAY
 desc: Battery type title
 eng: "Battery Display"
-new: "Wyświetlanie baterii"
+new: "Wyswietlanie baterii"
 
 id: LANG_VOLUME_DISPLAY
 desc: Volume type title
 eng: "Volume Display"
-new: "Wyświetlanie wzmocnienia"
+new: "Wyswietlanie wzmocnienia"
 
 id: LANG_DISPLAY_GRAPHIC
 desc: Label for type of icon display
 eng: "Graphic"
-new: "graficznie"
+new: "Graficznie"
 
 id: LANG_DISPLAY_NUMERIC
 desc: Label for type of icon display
 eng: "Numeric"
-new: "numerycznie"
+new: "Numerycznie"
 
 id: LANG_PM_PERFORMANCE
 desc: in the peak meter menu
 eng: "Performance"
-new: "Wydajność"
+new: "Wydajnosc"
 
 id: LANG_PM_HIGH_PERFORMANCE
 desc: in the peak meter menu
 eng: "High performance"
-new: "Wysoka wydajność"
+new: "Wysoka wydajnosc"
 
 id: LANG_PM_ENERGY_SAVER
 desc: in the peak meter menu
 eng: "Save Energy"
-new: "Oszczędz. energii"
+new: "Oszczedz. energii"
 
 id: LANG_PM_SCALE
 desc: in the peak meter menu
-eng: "Scale"
-new: "Wskaźnik"
+eng: "dBfs <-> Linear"
+new: "dBfs <-> linearny"
 
 id: LANG_PM_DBFS
 desc: in the peak meter menu
-eng: "Logarithmic(dB)"
-new: "logarytmiczny (dB)"
+eng: "dBfs"
+new: "dBfs"
 
 id: LANG_PM_LINEAR
 desc: in the peak meter menu
-eng: "Linear(%)"
-new: "linearny (%)"
+eng: "Linear"
+new: "linearny"
 
 id: LANG_PM_MIN
 desc: in the peak meter menu
@@ -1104,22 +1097,22 @@
 id: LANG_RECORDING_QUALITY
 desc: in the recording settings
 eng: "Quality"
-new: "Jakość"
+new: "Jakosc"
 
 id: LANG_RECORDING_FREQUENCY
 desc: in the recording settings
 eng: "Frequency"
-new: "Częstotliwość"
+new: "Czestotliwosc"
 
 id: LANG_RECORDING_SOURCE
 desc: in the recording settings
 eng: "Source"
-new: "Źródło"
+new: "Zrodlo"
 
 id: LANG_RECORDING_CHANNELS
 desc: in the recording settings
 eng: "Channels"
-new: "Kanały"
+new: "Kanaly"
 
 id: LANG_RECORDING_SRC_MIC
 desc: in the recording settings
@@ -1144,7 +1137,7 @@
 id: LANG_DISK_STAT
 desc: disk size info
 eng: "Disk: %d.%dGB"
-new: "Dysk: %d.%dGB"
+new: "Dysk %d.%dGB"
 
 id: LANG_DISK_FREE_STAT
 desc: disk size info
@@ -1154,7 +1147,7 @@
 id: LANG_POWEROFF
 desc: disk poweroff flag
 eng: "Disk Poweroff"
-new: "Wyłączanie dysku"
+new: "Wylaczanie dysku"
 
 id: LANG_FILTER_PLAYLIST
 desc: show only playlist
@@ -1174,7 +1167,7 @@
 id: LANG_MP3BUFFER_MARGIN
 desc: MP3 buffer margin time
 eng: "Anti-Skip Buffer"
-new: "Bufor antywstrząsowy"
+new: "Bufor antywstrzasowy"
 
 id: LANG_BIDIR_SCROLL
 desc: Bidirectional scroll limit
@@ -1184,7 +1177,7 @@
 id: LANG_SCROLL_DELAY
 desc: Delay before scrolling
 eng: "Scroll Start Delay"
-new: "Opóźnienie rozpoczęcia przesuwania"
+new: "Opoznienie rozpoczecia przesuwania"
 
 id: LANG_SCROLL_STEP
 desc: Pixels to advance per scroll
@@ -1194,32 +1187,32 @@
 id: LANG_SCROLL_STEP_EXAMPLE
 desc: Pixels to advance per scroll
 eng: "Scroll Step Size Setting Example Text"
-new: "Przykładowy rozmiar skoku przesuwania"
+new: "Przykladowy rozmiar skoku przesuwania"
 
 id: LANG_SCROLL_SPEED
 desc: in display_settings_menu()
 eng: "Scroll Speed"
-new: "Prędkość przesuwania"
+new: "Predkosc przesuwania"
 
 id: LANG_TRICKLE_CHARGE
 desc: in settings_menu
 eng: "Trickle Charge"
-new: "Wolne ładowanie"
+new: "Wolne ladowanie"
 
 id: LANG_BATTERY_TOPOFF_CHARGE
 desc: in info display, shows that top off charge is running
 eng: "Battery: Top-Off Chg"
-new: "Bateria: Doładowanie"
+new: "Bateria: Doladowanie"
 
 id: LANG_BATTERY_TRICKLE_CHARGE
 desc: in info display, shows that trickle charge is running
 eng: "Battery: Trickle Chg"
-new: "Bateria: Wolne ładowanie"
+new: "Bateria: Wolne ladowanie"
 
 id: LANG_BATTERY_CAPACITY
 desc: in settings_menu
 eng: "Battery Capacity"
-new: "Pojemność baterii"
+new: "Pojemnosc baterii"
 
 id: LANG_QUEUE_QUEUED
 desc: queued track name %s
@@ -1269,7 +1262,7 @@
 id: LANG_REALLY_DELETE
 desc: Really Delete?
 eng: "Delete?"
-new: "Skasować?"
+new: "Skasowac?"
 
 id: LANG_DELETED
 desc: A file has beed deleted
@@ -1284,7 +1277,7 @@
 id: LANG_FAILED
 desc: Something failed. To be appended after above actions
 eng: "Failed"
-new: "nie udało się"
+new: "nie udalo sie"
 
 id: LANG_ALARM_MOD_ALARM_MENU
 desc: The name of the additional entry in the main menu for the RTC alarm mod.
@@ -1304,7 +1297,7 @@
 id: LANG_ALARM_MOD_SHUTDOWN
 desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod).
 eng: "Shutting Down..."
-new: "Wyłączanie..."
+new: "Wylaczanie..."
 
 id: LANG_ALARM_MOD_ERROR
 desc: The text that tells that the time is incorrect (for the RTC alarm mod).
@@ -1319,12 +1312,12 @@
 id: LANG_CREATE_PLAYLIST
 desc: Menu option for creating a playlist
 eng: "Create Playlist"
-new: "Stwórz playlistę"
+new: "Stworz playliste"
 
 id: LANG_CREATING
 desc: Screen feedback during playlist creation
 eng: "Creating"
-new: "Tworzę"
+new: "Tworzenie"
 
 id: LANG_PLAYER_KEYBOARD_BACKSPACE
 desc: Backspace alternative in player keyboard interaction
@@ -1344,12 +1337,12 @@
 id: LANG_PLAYER_KEYBOARD_ABORT
 desc: Abort alternative in player keyboard interaction
 eng: "Abort"
-new: "Opuść"
+new: "Opusc"
 
 id: LANG_MENU_SHOW_ID3_INFO
 desc: Menu option to start id3 viewer
 eng: "Show ID3 Info"
-new: "Pokaż info ID3"
+new: "Pokaz info ID3"
 
 id: LANG_ID3_GENRE
 desc: ID3 frame 'genre'
@@ -1377,9 +1370,9 @@
 new: "Rozmiar:"
 
 id: LANG_CPU_SLEEP
-desc: in system_settings_menu() (removed)
-eng: ""
-new:
+desc: in system_settings_menu()
+eng: "Power Saving"
+new: "Oszczedzanie"
 
 id: LANG_SETTINGS_LOADED1
 desc: Feedback shown when a .cfg file is loaded
@@ -1389,32 +1382,32 @@
 id: LANG_SETTINGS_LOADED2
 desc: Feedback shown when a .cfg file is loaded
 eng: "Loaded"
-new: "załadowane"
+new: "zaladowane"
 
 id: LANG_FADE_ON_STOP
 desc: options menu to set fade on stop or pause
 eng: "Fade On Stop/Pause"
-new: "Wycisz przy zatrzymaniu"
+new: "Fade przy zatrzymaniu"
 
 id: LANG_SOKOBAN_ON
 desc: how to undo move 
 eng: "[ON] To Undo"
-new: "[ON] przywróć"
+new: "[ON] przywroc"
 
 id: LANG_INVERT
 desc: in settings_menu
-eng: "LCD Mode"
-new: "Tryb LCD"
+eng: "Invert"
+new: "Negatyw"
 
 id: LANG_CHANNEL_STEREO_NARROW_PLAYER
 desc: in sound_settings
 eng: "St. Narrow"
-new: "wąskie st."
+new: "waskie st."
 
 id: LANG_CHANNEL_STEREO_NARROW_RECORDER
 desc: in sound_settings
 eng: "Stereo Narrow"
-new: "wąskie stereo"
+new: "waskie stereo"
 
 id: LANG_CHANNEL_STEREO_WIDE
 desc: in sound_settings
@@ -1456,300 +1449,12 @@
 eng: "Update VBR file"
 new: "Aktualizuj plik VBR"
 
-id: LANG_INVERT_CURSOR
-desc: in settings_menu
-eng: "Line Selector"
-new: "Zaznaczanie linii"
-
-id: LANG_RECORDING_EDITABLE
-desc: Editable recordings setting
-eng: "Independent frames"
-new: "Niezależne ramki"
-
 id: LANG_STATUS_BAR
 desc: display menu, F3 substitute
 eng: "Status Bar"
-new: "Pasek stanu"
+new: "Gorny pasek"
 
 id: LANG_SCROLL_BAR
 desc: display menu, F3 substitute
 eng: "Scroll Bar"
-new: "Pasek przewijania"
-
-id: LANG_CAPTION_BACKLIGHT
-desc: in settings_menu
-eng: "Caption backlight"
-new: "Podświetlanie napisów"
-
-id: LANG_INVERT_CURSOR_POINTER
-desc: in settings_menu
-eng: "Pointer"
-new: "wskaźnik"
-
-id: LANG_INVERT_CURSOR_BAR
-desc: in settings_menu
-eng: "Bar(Inverse)"
-new: "pasek (w negatywie)"
-
-id: LANG_INVERT_LCD_NORMAL
-desc: in settings_menu
-eng: "Normal"
-new: "normalny"
-
-id: LANG_INVERT_LCD_INVERSE
-desc: in settings_menu
-eng: "Inverse"
-new: "w negatywie"
-
-id: LANG_MAX_FILES_IN_DIR
-desc: in settings_menu
-eng: "Max files in dir browser"
-new: "Maksym. plików w przeglądarce katalogów"
-
-id: LANG_MAX_FILES_IN_PLAYLIST
-desc: in settings_menu
-eng: "Max playlist size"
-new: "Maksym. rozmiar playlisty"
-
-id: LANG_JUMP_SCROLL
-desc: (player) menu altarnative for jump scroll
-eng: "Jump scroll"
-new: "Skok przewijania"
-
-id: LANG_ONE_TIME
-desc: (player) the jump scroll shall be done "one time"
-eng: "One time"
-new: "jednorazowo"
-
-id: LANG_ALWAYS
-desc: (player) the jump scroll shall be done "always"
-eng: "Always"
-new: "zawsze"
-
-id: LANG_JUMP_SCROLL_DELAY
-desc: (player) Delay before making a jump scroll
-eng: "Jump Scroll Delay"
-new: "opóźnienie skoku przewijania"
-
-id: LANG_RECORD_TIMESPLIT
-desc: Prompt for record timer interval setting, in the record settings menu
-eng: "Time Split"
-new: "Dziel plik co"
-
-id: LANG_RECORD_TIMESPLIT_REC
-decs: Display of record timer interval setting, on the record screen
-eng: "Split time:"
-new: "Dziel co:"
-
-id: LANG_SHOW_ICONS
-desc: in settings_menu
-eng: "Show Icons"
-new: "Pokaż ikony"
-
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Dysk jest pełny. Wciśnij OFF żeby kontynuować."
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "GRAJ = Tak"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Każdy inny = Nie"
-
-##
-## Strings used in the plugin loader:
-##
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Nie mogę otworzyć %s"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Błąd odczytu %s"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "Model niekompatybilny"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "Wersja niekompatybilna"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Wtyczka zwróciła błąd"
-
-##
-## boot change detection
-##
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Zmienił się plik startowy"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "Zresetować teraz?"
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "Odwróć"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othelo"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Przesuwne puzzle"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Gwiazda"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "Kolejkuj ostatni/ą"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Wstaw"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Wstaw ostatni/ą"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Kolejkuj następny/ą"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Wstaw następny/ą"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "Zachowaj dynamiczną playlistę"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Opcje playlisty"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "Wstawione %d plików (%s)"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "W kolejce %d plików (%s)"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "Zachowane %d plików (%s)"
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "OFF - anuluj"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STOP - anuluj"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Błąd przy odświeżaniu pliku kontroli playlisty"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Brak dostępu do pliku playlisty"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Brak dostępu do pliku kontroli playlisty"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Brak dostępu do katalogu"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "Plik kontroli playlisty jest uszkodzony"
-
-id: LANG_RECURSE_DIRECTORY
-desc: In playlist menu
-eng: "Recursively Insert Directories"
-new: "Rekursywnie wstawiaj katalogi"
-
-id: LANG_RECURSE_DIRECTORY_QUESTION
-desc: Asked from onplay screen
-eng: "Recursively?"
-new: "Rekursywnie?"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Czcionki"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Język"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Ekran podczas odtwarzania"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Pliki konfiguracji"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Wtyczki"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Tryb adaptera samochodowego"
+new: "Lewy pasek"
diff -rubBP /home/dast/src/rockbox/apps/lang/portugues.lang ./apps/lang/portugues.lang
--- /home/dast/src/rockbox/apps/lang/portugues.lang	Fri Apr 25 14:52:53 2003
+++ ./apps/lang/portugues.lang	Wed Oct 29 15:12:14 2003
@@ -1,4 +1,4 @@
-# $Id: portugues.lang,v 1.6 2003/04/21 16:15:15 hohensoh Exp $
+# $Id: portugues.lang,v 1.1.1.1 2003/10/29 14:12:14 knobby2346 Exp $
 
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
diff -rubBP /home/dast/src/rockbox/apps/lang/slovenscina.lang ./apps/lang/slovenscina.lang
--- /home/dast/src/rockbox/apps/lang/slovenscina.lang	Tue Aug 19 08:43:50 2003
+++ ./apps/lang/slovenscina.lang	Wed Oct 29 15:12:16 2003
@@ -1,4 +1,4 @@
-# $Id: slovenscina.lang,v 1.1 2003/08/19 06:43:50 bagder Exp $
+# $Id: slovenscina.lang,v 1.1.1.1 2003/10/29 14:12:16 knobby2346 Exp $
 #
 # This is the slovenian language files (Slovenski jezik).
 # 
diff -rubBP /home/dast/src/rockbox/apps/lang/svenska.lang ./apps/lang/svenska.lang
--- /home/dast/src/rockbox/apps/lang/svenska.lang	Wed Nov 26 15:06:56 2003
+++ ./apps/lang/svenska.lang	Wed Oct 29 15:12:17 2003
@@ -136,8 +136,8 @@
 
 id: LANG_SETTINGS_BATTERY_PLAYER
 desc: if save settings has failed
-eng: "Partition?"
-new: "Partition?"
+eng: "Batt. Low?"
+new: "Batt. tomt?"
 
 id: LANG_SETTINGS_SAVE_RECORDER
 desc: displayed if save settings has failed
@@ -146,8 +146,8 @@
 
 id: LANG_SETTINGS_BATTERY_RECORDER
 desc: if save settings has failed
-eng: "No partition?"
-new: "Ingen partition?"
+eng: "Is Battery Low?"
+new: "Är batteriet urladdat?"
 
 id: LANG_TIME_SET
 desc: used in set_time()
@@ -426,13 +426,13 @@
 
 id: LANG_RESUME_CONFIRM_RECORDER
 desc: possible answer to resume question
-eng: ""
-new: ""
+eng: "PLAY = Yes"
+new: "Spela = Ja"
 
 id: LANG_RESUME_CANCEL_RECORDER
 desc: possible answer to resume question
-eng: ""
-new: ""
+eng: "Any Other = No"
+new: "Övriga = Nej"
 
 id: LANG_KEYLOCK_ON_PLAYER
 desc: displayed when key lock is on
@@ -656,118 +656,118 @@
 
 id: LANG_SOKOBAN_LEVEL
 desc: must be smaller than 6 characters
-eng: ""
-new: ""
+eng: "Level"
+new: "Nivĺ"
 
 id: LANG_SOKOBAN_MOVE
 desc: must be smaller than 6 characters
-eng: ""
-new: ""
+eng: "Moves"
+new: "Drag"
 
 id: LANG_SOKOBAN_WIN
 desc: displayed when you win 
-eng: ""
-new: ""
+eng: "YOU WIN!!"
+new: "DU VINNER!!"
 
 id: LANG_SOKOBAN_QUIT
 desc: how to quit game
-eng: ""
-new: ""
+eng: "[OFF] To Stop"
+new: "[Av] för att stanna"
 
 id: LANG_SOKOBAN_F1
 desc: what does F1 do
-eng: ""
-new: ""
+eng: "[F1] - Level"
+new: "[F1] - Nivĺ"
 
 id: LANG_SOKOBAN_F2
 desc: what does F2 do
-eng: ""
-new: ""
+eng: "[F2] Same Level"
+new: "[F2] Samma nivĺ"
 
 id: LANG_SOKOBAN_F3
 desc: what does F3 do
-eng: ""
-new: ""
+eng: "[F3] + Level"
+new: "[F3] + Nivĺ"
 
 id: LANG_WORMLET_LENGTH
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Len:%d"
+new: "Längd:%d"
 
 id: LANG_WORMLET_GROWING
 desc: wormlet game 
-eng: ""
-new: ""
+eng: "Growing"
+new: "Växer"
 
 id: LANG_WORMLET_HUNGRY
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Hungry"
+new: "Hungrig"
 
 id: LANG_WORMLET_WORMED
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Wormed"
+new: "Wormed"
 
 id: LANG_WORMLET_ARGH
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Argh"
+new: "Argh"
 
 id: LANG_WORMLET_CRASHED
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Crashed"
+new: "Krasch"
 
 id: LANG_WORMLET_HIGHSCORE
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Hs: %d"
+new: "Hs: %d"
 
 id: LANG_WORMLET_PLAYERS
 desc: wormlet game
-eng: ""
-new: ""
+eng: "%d Players    UP/DN"
+new: "%d Spelare  upp/ner"
 
 id: LANG_WORMLET_WORMS
 desc: wormlet game
-eng: ""
-new: ""
+eng: "%d Worms        L/R"
+new: "%d Worms        h/v"
 
 id: LANG_WORMLET_REMOTE_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Remote Control F1"
+new: "Fjärrkontroll F1"
 
 id: LANG_WORMLET_NO_REM_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "No Rem. Control F1"
+new: "Ingen fjärrkontroll F1"
 
 id: LANG_WORMLET_2_KEY_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "2 Key Control   F1"
+new: "2-tangentskontroll   F1"
 
 id: LANG_WORMLET_4_KEY_CTRL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "4 Key Control   F1"
+new: "4-tangentskontroll   F1"
 
 id: LANG_WORMLET_NO_CONTROL
 desc: wormlet game
-eng: ""
-new: ""
+eng: "Out Of Control"
+new: "Ingen kontroll"
 
 id: LANG_TETRIS_LOSE
 desc: tetris game
-eng: ""
-new: ""
+eng: "You Lose!"
+new: "Du förlorar!"
 
 id: LANG_TETRIS_LEVEL
 desc: tetris game
-eng: ""
-new: ""
+eng: "Rows - Level"
+new: "Rader - Nivĺ"
 
 id: LANG_POWEROFF_IDLE
 desc: in settings_menu
@@ -1498,289 +1498,3 @@
 desc: (player) the jump scroll shall be done "always"
 eng: "Always"
 new: "Alltid"
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Ändrad start"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Nĺgon annan = Nej"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Biltillsatsläge"
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "Spela = Ja"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Konfigureringar"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Fonter"
-
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Disken är full. Tryck AV för att fortsätta."
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Maskinvara"
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "Flipit"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Sätt in"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Sätt in nästa"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Sätt in sist"
-
-id: LANG_JUMP_SCROLL_DELAY
-desc: (player) Delay before making a jump scroll
-eng: "Jump Scroll Delay"
-new: "Hopprullningsfördröjning"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Sprĺk"
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "AV för avbryt"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othello"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Kan ej nĺ filen med spellistan"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Kan ej nĺ filen för spellistekontroll"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "Filen för spellistekontroll är inte korrekt"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Fel vid uppdatering av file för spellistekontroll"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Kan inte nĺ katalogen"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "Insatta %d spĺr (%s)"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Val för spellista"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "Köat %d spĺr (%s)"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "Sparat %d spĺr (%s)"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Insticksmoduler"
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Kan inte öppna %s"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Insticksmodulen gav fel"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "Icke kompatibel model"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "Icke kompatibel version"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Köa nästa"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "Köa sist"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Misslyckad läsning %s"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "Starta om nu?"
-
-id: LANG_RECORD_TIMESPLIT
-desc: Prompt for record timer interval setting, in the record settings menu
-eng: "Time Split"
-new: "Tidsdelning"
-
-id: LANG_RECORD_TIMESPLIT_REC
-desc: 
-eng: "Split time:"
-new: "Tidsdelning:"
-
-id: LANG_RECURSE_DIRECTORY
-desc: In playlist menu
-eng: "Recursively Insert Directories"
-new: "Sätt in kataloger rekursivt"
-
-id: LANG_RECURSE_DIRECTORY_QUESTION
-desc: Asked from onplay screen
-eng: "Recursively?"
-new: "Rekursivt?"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "Spara dynamisk spellista"
-
-id: LANG_SHOW_ICONS
-desc: in settings_menu
-eng: "Show Icons"
-new: "Visa ikoner"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Glidande pussel"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Stjärna"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STANNA för avbryt"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Skärm vid spel"
-
-id: LANG_BUTTONBAR_MENU
-desc: in button bar
-eng: "Menu"
-new: "Meny"
-
-id: LANG_BUTTONBAR_OPTIONS
-desc: in button bar
-eng: "Option"
-new: "Val"
-
-id: LANG_FM_BUTTONBAR_PRESETS
-desc: in button bar
-eng: "Preset"
-new: "Förinställning"
-
-id: LANG_FM_DELETE_PRESET
-desc: in radio screen
-eng: "Remove preset"
-new: "Ta bort förinställning"
-
-id: LANG_FM_NO_FREE_PRESETS
-desc: in radio screen
-eng: "The preset list is full"
-new: "Listan med förinställningar är full"
-
-id: LANG_FM_NO_PRESETS
-desc: in radio screen
-eng: "The preset list is empty"
-new: "Listan med förinställningar är tom"
-
-id: LANG_FM_PRESET_SAVE_FAILED
-desc: in radio screen
-eng: "Preset save failed"
-new: "Fel vid spara förinställningar"
-
-id: LANG_FM_SAVE_PRESET
-desc: in radio screen
-eng: "Save preset"
-new: "Spara förinställningar"
-
-id: LANG_FM_STATION
-desc: in radio screen
-eng: "Station: %d.%dMHz"
-new: "Kanal: %d.%dMHz"
-
-id: LANG_LINE_IN
-desc: in settings_menu
-eng: "Line In"
-new: "Linjeingĺng"
-
-id: LANG_NO_FILES
-desc: in settings_menu
-eng: "No files"
-new: "Inga filer"
-
-id: LANG_FM_BUTTONBAR_RECORD
-desc: in main menu
-eng: "Record"
-new: "Spela in"
-
-id: LANG_FM_RADIO
-desc: in main menu
-eng: "FM Radio"
-new: "FM Radio"
-
diff -rubBP /home/dast/src/rockbox/apps/lang/wallisertitsch.lang ./apps/lang/wallisertitsch.lang
--- /home/dast/src/rockbox/apps/lang/wallisertitsch.lang	Wed Nov 19 07:34:43 2003
+++ ./apps/lang/wallisertitsch.lang	Wed Oct 29 15:12:18 2003
@@ -1,4 +1,4 @@
-# $Id: wallisertitsch.lang,v 1.88 2003/10/24 14:14:08 vicentinimartin
+# $Id: wallisertitsch.lang,v 1.77 2003/06/08 12:43:52 vicentinimartin
 
 id: LANG_SOUND_SETTINGS
 desc: in the main menu
@@ -385,7 +385,7 @@
 id: LANG_CHANNEL
 desc: in sound_settings
 eng: "Channel configuration"
-new: "Kanalischtellig"
+new: "Kanalkonfiguration"
 
 id: LANG_CHANNEL_STEREO
 desc: in sound_settings
@@ -432,13 +432,11 @@
 eng: "(PLAY/STOP)"
 new: "(PLAY/STOP)"
 
-# depreciated
 id: LANG_RESUME_CONFIRM_RECORDER
 desc: posible answer to resume question
 eng: "Play = Yes"
 new: "Play = Ja"
 
-# depreciated
 id: LANG_RESUME_CANCEL_RECORDER
 desc: posible answer to resume question
 eng: "Any Other = No"
@@ -1543,211 +1541,3 @@
 desc: in settings_menu
 eng: "Show Icons"
 new: "Icons azeigu"
-
-id: LANG_DISK_FULL
-desc: in recording screen
-eng: "The disk is full. Press OFF to continue."
-new: "Feschtplatta isch voll. Drick OFF."
-
-id: LANG_CONFIRM_WITH_PLAY_RECORDER
-desc: Generic recorder string to use to confirm
-eng: "PLAY = Yes"
-new: "PLAY = Ja"
-
-id: LANG_CANCEL_WITH_ANY_RECORDER
-desc: Generic recorder string to use to cancel
-eng: "Any Other = No"
-new: "Andri = Nei"
-
-##
-## Strings used in the plugin loader:
-##
-
-id: LANG_PLUGIN_CANT_OPEN
-desc: Plugin open error message
-eng: "Can't open %s"
-new: "Cha %s nit üftüe"
-
-id: LANG_READ_FAILED
-desc: There was an error reading a file
-eng: "Failed reading %s"
-new: "Fähler bim läsu fa %s"
-
-id: LANG_PLUGIN_WRONG_MODEL
-desc: The plugin is not compatible with the archos model trying to run it
-eng: "Incompatible model"
-new: "nit kompatibels Modell"
-
-id: LANG_PLUGIN_WRONG_VERSION
-desc: The plugin is not compatible with the rockbox version trying to run it
-eng: "Incompatible version"
-new: "nit kompatibli Version"
-
-id: LANG_PLUGIN_ERROR
-desc: The plugin return an error code
-eng: "Plugin returned error"
-new: "Plugin mäldut Fähler"
-
-##
-## boot change detection
-##
-
-id: LANG_BOOT_CHANGED
-desc: File browser discovered the boot file was changed
-eng: "Boot changed"
-new: "Boot gändrut"
-
-id: LANG_REBOOT_NOW
-desc: Do you want to reboot?
-eng: "Reboot now?"
-new: "jetz nöü bootu?"
-
-id: LANG_FLIPIT
-desc: in the games menu
-eng: "Flipit"
-new: "zDräjiga"
-
-id: LANG_OTHELO
-desc: in the games menu
-eng: "Othelo"
-new: "Othelo"
-
-id: LANG_SLIDING_PUZZLE
-desc: in the games menu
-eng: "Sliding Puzzle"
-new: "Schiebepuzzle"
-
-id: LANG_STAR
-desc: in the games menu
-eng: "Star"
-new: "Schtäru"
-
-id: LANG_QUEUE_LAST
-desc: in onplay menu.  queue a track/playlist at end of playlist.
-eng: "Queue last"
-new: "Warteschlanga als letschts"
-
-id: LANG_INSERT
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert"
-new: "Ifiegu"
-
-id: LANG_INSERT_LAST
-desc: in onplay menu.  append a track/playlist into dynamic playlist.
-eng: "Insert last"
-new: "Ifiegu als letschts"
-
-id: LANG_QUEUE_FIRST
-desc: in onplay menu.  queue a track/playlist into dynamic playlist.
-eng: "Queue next"
-new: "Warteschlanga als negschts"
-
-id: LANG_INSERT_FIRST
-desc: in onplay menu.  insert a track/playlist into dynamic playlist.
-eng: "Insert next"
-new: "Ifiegu als negschts"
-
-id: LANG_SAVE_DYNAMIC_PLAYLIST
-desc: in playlist menu.
-eng: "Save Dynamic Playlist"
-new: "dynamischi Abschpillischta schpichru"
-
-id: LANG_PLAYLIST_MENU
-desc: in main menu.
-eng: "Playlist Options"
-new: "Abschpillischta Optione"
-
-id: LANG_PLAYLIST_INSERT_COUNT
-desc: splash number of tracks inserted
-eng: "Inserted %d tracks (%s)"
-new: "%d Lieder igfiegt (%s)"
-
-id: LANG_PLAYLIST_QUEUE_COUNT
-desc: splash number of tracks queued
-eng: "Queued %d tracks (%s)"
-new: "%d Lieder agheicht (%s)"
-
-id: LANG_PLAYLIST_SAVE_COUNT
-desc: splash number of tracks saved
-eng: "Saved %d tracks (%s)"
-new: "%d Lieder abgspiichrut (%s)"
-
-id: LANG_OFF_ABORT
-desc: Used on recorder models
-eng: "OFF to abort"
-new: "Off fer abzbrächu"
-
-id: LANG_STOP_ABORT
-desc: Used on player models
-eng: "STOP to abort"
-new: "STOP fer abzbrächu"
-
-id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
-desc: Playlist error
-eng: "Error updating playlist control file"
-new: "Fähler: Aktualisierig Abschpillischta-Kontrolldatii"
-
-id: LANG_PLAYLIST_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist file"
-new: "Fähler: Züegriff Abschpillischta"
-
-id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing playlist control file"
-new: "Fähler: Züegriff Abschpillischta-Kontrolldatii"
-
-id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
-desc: Playlist error
-eng: "Error accessing directory"
-new: "Fähler: Verzeichniszüegriff"
-
-id: LANG_PLAYLIST_CONTROL_INVALID
-desc: Playlist resume error
-eng: "Playlist control file is invalid"
-new: "Abschpillischta-Kontrolldatii isch ungültig"
-
-id: LANG_RECURSE_DIRECTORY
-desc: In playlist menu
-eng: "Recursively Insert Directories"
-new: "Verzeichnis rekursiv ifiegu"
-
-id: LANG_RECURSE_DIRECTORY_QUESTION
-desc: Asked from onplay screen
-eng: "Recursively?"
-new: "Rekursiv?"
-
-id: LANG_CUSTOM_FONT
-desc: in setting_menu()
-eng: "Fonts"
-new: "Schrifte"
-
-id: LANG_FIRMWARE
-desc: in the main menu
-eng: "Firmware"
-new: "Firmware"
-
-id: LANG_LANGUAGE
-desc: in settings_menu
-eng: "Language"
-new: "Spraach"
-
-id: LANG_WHILE_PLAYING
-desc: in settings_menu()
-eng: "While Playing Screen"
-new: "Azeig währund dum Abschpilu (WPS)"
-
-id: LANG_CUSTOM_CFG
-desc: in setting_menu()
-eng: "Configurations"
-new: "Ischtellige"
-
-id: LANG_PLUGINS
-desc: in main_menu()
-eng: "Plugins"
-new: "Plugins"
-
-id: LANG_CAR_ADAPTER_MODE
-desc: Displayed for setting car adapter mode to on/off
-eng: "Car Adapter Mode"
-new: "Autoadapter Modus"
diff -rubBP /home/dast/src/rockbox/apps/language.c ./apps/language.c
--- /home/dast/src/rockbox/apps/language.c	Mon Jan 27 16:33:32 2003
+++ ./apps/language.c	Wed Oct 29 15:12:00 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: language.c,v 1.8 2003/01/24 10:54:07 matsl Exp $
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <file.h>
 #if defined(SIMULATOR) && defined(__MINGW32__)
 extern int printf(const char *format, ...);
@@ -26,11 +7,11 @@
 #include "lang.h"
 #include "debug.h"
 
-static unsigned char language_buffer[MAX_LANGUAGE_SIZE];
+//static unsigned char language_buffer[MAX_LANGUAGE_SIZE];
 
 int lang_load(char *filename)
 {
-    int filesize;
+/*    int filesize;
     int fd = open(filename, O_RDONLY);
     int retcode=0;
     if(fd == -1)
@@ -44,21 +25,21 @@
             filesize-=2;
 
             while(filesize>3) {
-                id = (ptr[0]<<8) | ptr[1];  /* get two-byte id */
-                ptr+=2;                     /* pass the id */
+                id = (ptr[0]<<8) | ptr[1];  // get two-byte id
+    ptr+=2;                     // pass the id
                 if(id < LANG_LAST_INDEX_IN_ARRAY) {
 #ifdef SIMULATOR
                     printf("%2x New: %30s ", id, ptr);
                     printf("Replaces: %s\n", language_strings[id]);
 #endif
-                    language_strings[id] = ptr; /* point to this string */
+                    language_strings[id] = ptr; // point to this string
                 }
-                while(*ptr) {               /* pass the string */
+                while(*ptr) {               // pass the string
                     filesize--;
                     ptr++;
                 }
-                filesize-=3; /* the id and the terminating zero */
-                ptr++;       /* pass the terminating zero-byte */
+                filesize-=3; // the id and the terminating zero
+                ptr++;       // pass the terminating zero-byte
             }
         }
         else {
@@ -72,6 +53,7 @@
     }
     close(fd);
     return retcode;
+*/
 }
 
 /* -----------------------------------------------------------------
diff -rubBP /home/dast/src/rockbox/apps/language.h ./apps/language.h
--- /home/dast/src/rockbox/apps/language.h	Fri Aug 29 13:49:54 2003
+++ ./apps/language.h	Wed Oct 29 15:12:00 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: language.h,v 1.5 2003/08/21 13:49:45 bagder Exp $
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /* size of the buffer used for loadable, translated strings */
 #define MAX_LANGUAGE_SIZE 6000
 
@@ -26,7 +7,3 @@
 
 /* load a given language file */
 int lang_load(char *filename);
-
-/* -----------------------------------------------------------------
- * vim: et sw=4 ts=8 sts=4 tw=78
- */
diff -rubBP /home/dast/src/rockbox/apps/main.c ./apps/main.c
--- /home/dast/src/rockbox/apps/main.c	Thu Dec  4 16:35:38 2003
+++ ./apps/main.c	Tue Dec  2 21:59:15 2003
@@ -1,66 +1,37 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: main.c,v 1.80 2003/12/03 01:03:21 hohensoh Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "ata.h"
 #include "disk.h"
 #include "fat.h"
 #include "lcd.h"
-#include "rtc.h"
 #include "debug.h"
-#include "led.h"
 #include "kernel.h"
 #include "button.h"
+#include "remote.h"
 #include "tree.h"
 #include "panic.h"
 #include "menu.h"
 #include "system.h"
-#include "usb.h"
-#include "powermgmt.h"
-#include "adc.h"
 #include "i2c.h"
-#ifndef DEBUG
-#include "serial.h"
-#endif
 #include "mpeg.h"
 #include "main_menu.h"
 #include "thread.h"
 #include "settings.h"
-#include "backlight.h"
 #include "status.h"
-#include "debug_menu.h"
 #include "version.h"
 #include "sprintf.h"
-#include "font.h"
-#include "language.h"
 #include "wps-display.h"
 #include "playlist.h"
 #include "buffer.h"
-#include "rolo.h"
 #include "screens.h"
-#include "power.h"
 
 char appsversion[]=APPSVERSION;
+char appsbuild[]=APPSBUILD;
 
 void init(void);
 
 void app_main(void)
 {
     init();
+    //startup_sound();
     browse_root();
 }
 
@@ -71,7 +42,6 @@
     init_threads();
     buffer_init();
     lcd_init();
-    font_init();
     show_logo();
     settings_reset();
     settings_load();
@@ -82,9 +52,6 @@
                global_settings.bass,
                global_settings.treble,
                global_settings.balance,
-               global_settings.loudness,
-               global_settings.bass_boost,
-               global_settings.avc,
                global_settings.channel_config );
     while (button_get(false) != 0)
       ; /* Empty the keyboard buffer */
@@ -101,9 +68,10 @@
     int rc, i;
     struct partinfo* pinfo;
     /* if nobody initialized ATA before, I consider this a cold start */
-    bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */
+//    bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */
 
     system_init();
+
     kernel_init();
 
     buffer_init();
@@ -112,7 +80,6 @@
     
     lcd_init();
 
-    font_init();
     show_logo();
 
     set_irq_level(0);
@@ -116,60 +83,76 @@
     show_logo();
 
     set_irq_level(0);
+
 #ifdef DEBUG
     debug_init();
-#else
-    serial_setup();
 #endif
 
     i2c_init();
 
-#ifdef HAVE_RTC
-    rtc_init();
-#endif
-
-    adc_init();
-    
-    usb_init();
-    
-    backlight_init();
-
     button_init();
 
-    powermgmt_init();
+    if (!(PADR&0x4000)) {   //OLD mStation detected...
+        DEBUGF("Detected mStation, disabling stop button.\n");
+        button_found_mStation();
+    }
+
+    if ((PCDR&0x0040) && (PBDR&0x8000)) {
+        //select button released and usb detection
+        lcd_puts(0,0,"     Open Neo!      ");
+        lcd_puts(0,1,"                    ");
+        lcd_puts(0,2,"  USB connection    ");
+        lcd_puts(0,3,"     detected.      ");
+        DEBUGF("USB connection detected, hanging...\n");
+        while (1) {
+        }   /* Must hang here, line can
+               change state after initial
+               signal which gets mis-read
+               as cable disconnection. */
+    }
+    
+    remote_init();
+
+//    CDC_HWInit();
+//    int aux=CDC_Setup();
+//    DEBUGF("CDC says can %scontrol aux power\n",aux?"":"not ");
 
-    if (coldstart && charger_inserted())
-    {
-        rc = charging_screen(); /* display a "charging" screen */
-        if (rc == 1 || rc == 2)  /* charger removed or "Off/Stop" pressed */
-            power_off();
-        /* "On" pressed or USB connected: proceed */
-    }
 
+    for (i=0,rc=1;rc && i<5;++i) {
+        //5 attempts to detect hard drive settings
     rc = ata_init();
+        if (rc)
+            splash(HZ/2,0,true,"Waiting for Hard Drive...");
+    }
     if(rc)
-    {
-#ifdef HAVE_LCD_BITMAP
-        char str[32];
-        lcd_clear_display();
-        snprintf(str, 31, "ATA error: %d", rc);
-        lcd_puts(0, 1, str);
-        lcd_puts(0, 3, "Press ON to debug");
-        lcd_update();
-        while(button_get(true) != BUTTON_ON);
-        dbg_ports();
-#endif
         panicf("ata: %d", rc);
-    }
     
     pinfo = disk_init();
     if (!pinfo)
         panicf("disk: NULL");
 
     for ( i=0; i<4; i++ ) {
-        if (!fat_mount(pinfo[i].start))
+        if (fat_mount(pinfo[i].start)) {
+            if (pinfo[i].type==0x0C) { //supposed to be a FAT32 partition
+                //try and restore
+                lcd_clear_display();
+                lcd_puts(0,0,"Attempting to");
+                lcd_puts(0,1,"restore first");
+                lcd_puts(0,2,"FAT table...");
+                if (fat_mount_backup(pinfo[i].start)) {
+                    lcd_puts(0,3,"FAILED!");
+                    sleep(HZ*3);
+                } else {
+                    lcd_puts(0,3,"done.");
+                    sleep(HZ);
             break;
     }
+            } 
+        } else {
+            //found FAT table
+            break;
+        }
+    }
     if ( i==4 ) {
         DEBUGF("No partition found, trying to mount sector 0.\n");
         rc = fat_mount(0);
@@ -179,15 +162,14 @@
             lcd_puts(0,1,"partition!");
             lcd_update();
             sleep(HZ);
-            while(1)
-                dbg_partitions();
+            while(1) {}
+//                dbg_partitions();
         }
     }
 
     settings_load();
     
     status_init();
-    usb_start_monitoring();
     playlist_init();
     tree_init();
 
@@ -197,29 +179,7 @@
                global_settings.bass,
                global_settings.treble,
                global_settings.balance,
-               global_settings.loudness,
-               global_settings.bass_boost,
-               global_settings.avc,
                global_settings.channel_config );
-
-    /* no auto-rolo on startup any more, but I leave it here for reference */
-#if 0
-    if (coldstart && !usb_detect())
-    {   /* when starting from flash, this time _we_ have to yield */
-        int fd;
-#ifdef ARCHOS_PLAYER
-        static const char filename[] = "/archos.mod"; 
-#else
-        static const char filename[] = "/ajbrec.ajz";
-#endif
-        fd = open(filename, O_RDONLY);
-        if(fd >= 0) /* no complaint if it doesn't exit */
-        {
-            close(fd);
-            rolo_load((char*)filename); /* start if it does */
-        }
-    }
-#endif // #if 0
 }
 
 int main(void)
@@ -227,8 +187,6 @@
     app_main();
 
     while(1) {
-        led(true); sleep(HZ/10);
-        led(false); sleep(HZ/10);
     }
     return 0;
 }
diff -rubBP /home/dast/src/rockbox/apps/main_menu.c ./apps/main_menu.c
--- /home/dast/src/rockbox/apps/main_menu.c	Mon Nov 24 10:56:56 2003
+++ ./apps/main_menu.c	Tue Dec  2 21:59:15 2003
@@ -1,267 +1,39 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: main_menu.c,v 1.88 2003/11/21 13:32:53 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "config.h"
 #include "options.h"
 
 #include "menu.h"
 #include "tree.h"
-#include "credits.h"
 #include "lcd.h"
-#include "font.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
 #include "main_menu.h"
 #include "version.h"
-#include "debug_menu.h"
 #include "sprintf.h"
 #include <string.h>
 #include "playlist.h"
 #include "settings.h"
 #include "settings_menu.h"
-#include "power.h"
-#include "powermgmt.h"
 #include "sound_menu.h"
-#include "status.h"
 #include "fat.h"
-#include "sleeptimer.h"
 #include "wps.h"
 #include "buffer.h"
 #include "screens.h"
 #include "playlist_menu.h"
-#ifdef HAVE_FMRADIO
-#include "radio.h"
-#endif
-
 #include "lang.h"
-
-#ifdef HAVE_MAS3587F
-#include "recording.h"
-#endif
-
-#ifdef HAVE_ALARM_MOD
-#include "alarm_menu.h"
-#endif
-
-#ifdef HAVE_LCD_BITMAP
-#include "bmp.h"
-#include "icons.h"
-#endif /* End HAVE_LCD_BITMAP */
+#include "status.h"
+#include "info.h"
 
 int show_logo( void )
 {
-#ifdef HAVE_LCD_BITMAP
-    char version[32];
-    unsigned char *ptr=rockbox112x37;
-    int height, i, font_h, font_w;
-
-    lcd_clear_display();
-
-    for(i=0; i < 37; i+=8) {
-        /* the bitmap function doesn't work with full-height bitmaps
-           so we "stripe" the logo output */
-        lcd_bitmap(ptr, 0, 10+i, 112, (37-i)>8?8:37-i, false);
-        ptr += 112;
-    }
-    height = 37;
-
-#if 0
-    /*
-     * This code is not used anymore, but I kept it here since it shows
-     * one way of using the BMP reader function to display an externally
-     * providing logo.
-     */
-    unsigned char buffer[112 * 8];
-    int width;
-
-    int i;
-    int eline;
-
-    int failure;
-    failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer);
-
-    debugf("read_bmp_file() returned %d, width %d height %d\n",
-           failure, width, height);
-    
-    for(i=0, eline=0; i < height; i+=8, eline++) {
-        /* the bitmap function doesn't work with full-height bitmaps
-           so we "stripe" the logo output */
-        lcd_bitmap(&buffer[eline*width], 0, 10+i, width,
-                   (height-i)>8?8:height-i, false);
-    }
-#endif
-
-    snprintf(version, sizeof(version), "Ver. %s", appsversion);
-    lcd_setfont(FONT_SYSFIXED);
-    lcd_getstringsize("A", &font_w, &font_h);
-    lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2),
-               LCD_HEIGHT-font_h, version);
-    lcd_update();
-
-#else
-    char *rockbox = "  ROCKbox!";
     lcd_clear_display();
-    lcd_double_height(true);
-    lcd_puts(0, 0, rockbox);
-    lcd_puts(0, 1, appsversion);
-#endif
-
+  lcd_puts(0, 0, "   Neo Car Jukebox  ");
+  lcd_puts_fmt( 0, 1, str(LANG_OPEN_NEO), FMT_CENTER );
+  lcd_puts_fmt( 0, 2, appsversion, FMT_CENTER );
+  lcd_puts(0, 3, "ssiamerica.com/open ");
     return 0;
 }
 
-bool show_credits(void)
-{
-    int j = 0;
-    int btn;
-
-    show_logo();
-#ifdef HAVE_LCD_CHARCELLS
-    lcd_double_height(false);
-#endif
-    
-    for (j = 0; j < 10; j++) {
-        sleep((HZ*2)/10);
-
-        btn = button_get(false);
-        if (btn !=  BUTTON_NONE && !(btn & BUTTON_REL))
-            return false;
-    }
-    roll_credits();
-    return false;
-}
-
-#ifdef SIMULATOR
-extern bool simulate_usb(void);
-#endif
-bool show_info(void)
-{
-    char s[32];
-    /* avoid overflow for 8MB mod :) was: ((mp3end - mp3buf) * 1000) / 0x100000; */
-    int buflen = ((mp3end - mp3buf) * 100) / 0x19999;
-    int integer, decimal;
-    bool done = false;
-    int key;
-    int state = 1;
-
-    while(!done)
-    {
-        int y=0;
-        lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
-        lcd_puts(0, y++, str(LANG_ROCKBOX_INFO));
-        y++;
-        state = 3;
-#endif
-
-        if (state & 1) {
-            integer = buflen / 1000;
-            decimal = buflen % 1000;
-#ifdef HAVE_LCD_CHARCELLS
-            snprintf(s, sizeof(s), str(LANG_BUFFER_STAT_PLAYER),
-                     integer, decimal);
-#else
-            snprintf(s, sizeof(s), str(LANG_BUFFER_STAT_RECORDER),
-                     integer, decimal);
-#endif
-            lcd_puts(0, y++, s);
-            
-#ifdef HAVE_CHARGE_CTRL
-            if (charge_state == 1)
-                snprintf(s, sizeof(s), str(LANG_BATTERY_CHARGE));
-            else if (charge_state == 2)
-                snprintf(s, sizeof(s), str(LANG_BATTERY_TOPOFF_CHARGE));
-            else if (charge_state == 3)
-                snprintf(s, sizeof(s), str(LANG_BATTERY_TRICKLE_CHARGE));
-            else
-#endif
-            if (battery_level() >= 0)
-                snprintf(s, sizeof(s), str(LANG_BATTERY_TIME), battery_level(),
-                         battery_time() / 60, battery_time() % 60);
-            else
-                strncpy(s, "(n/a)", sizeof(s));
-            lcd_puts(0, y++, s);
-        }
-
-        if (state & 2) {
-            unsigned int size, free;
-            fat_size( &size, &free );
-
-            size /= 1024;
-            integer = size / 1024;
-            decimal = size % 1024 / 100;
-            snprintf(s, sizeof s, str(LANG_DISK_STAT), integer, decimal);
-            lcd_puts(0, y++, s);
-            
-            free /= 1024;
-            integer = free / 1024;
-            decimal = free % 1024 / 100;
-            snprintf(s, sizeof s, str(LANG_DISK_FREE_STAT), integer, decimal);
-            lcd_puts(0, y++, s);
-        }
-        lcd_update();
-
-        /* Wait for a key to be pushed */
-        key = button_get_w_tmo(HZ*5);
-        switch(key) {
-#ifdef HAVE_PLAYER_KEYPAD
-            case BUTTON_STOP | BUTTON_REL:
-#else
-            case BUTTON_LEFT | BUTTON_REL:
-            case BUTTON_OFF | BUTTON_REL:
-#endif
-                done = true;
-                break;
-
-#ifdef HAVE_PLAYER_KEYPAD
-            case BUTTON_LEFT:
-            case BUTTON_RIGHT:
-                if (state == 1)
-                    state = 2;
-                else
-                    state = 1;
-                break;
-#endif
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
-        }
-    }
-
-    return false;
-}
-
-static bool firmware_browse(void)
-{
-    return rockbox_browse(ROCKBOX_DIR, SHOW_MOD);
-}
-
-static bool plugin_browse(void)
-{
-    return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS);
-}
-
-#ifdef HAVE_MAS3587F
-static bool recording_settings(void)
-{
-    return recording_menu(false);
-}
-#endif
-
 bool main_menu(void)
 {
     int m;
@@ -271,38 +43,15 @@
     struct menu_items items[] = {
         { str(LANG_SOUND_SETTINGS),     sound_menu        },
         { str(LANG_GENERAL_SETTINGS),   settings_menu     },
-#ifdef HAVE_FMRADIO
-        { str(LANG_FM_RADIO),   radio_screen     },
-#endif
-#ifdef HAVE_MAS3587F
-        { str(LANG_RECORDING),          recording_screen  },
-        { str(LANG_RECORDING_SETTINGS), recording_settings},
-#endif
         { str(LANG_PLAYLIST_MENU),      playlist_menu     },
-        { str(LANG_MENU_SHOW_ID3_INFO), browse_id3        },
-        { str(LANG_SLEEP_TIMER),        sleeptimer_screen },
-#ifdef HAVE_ALARM_MOD
-        { str(LANG_ALARM_MOD_ALARM_MENU), alarm_screen    },
-#endif
-        { str(LANG_PLUGINS),            plugin_browse     },
-        { str(LANG_FIRMWARE),           firmware_browse   },
-        { str(LANG_INFO),               show_info         },
-        { str(LANG_VERSION),            show_credits      },
-#ifndef SIMULATOR
-        { str(LANG_DEBUG),              debug_menu        },
-#else
-        { str(LANG_USB),                simulate_usb      },
-#endif
+        { str(LANG_SONG_INFO),		show_song_info    },
+        { str(LANG_NEO_INFO),           info_menu         }
     };
 
     m=menu_init( items, sizeof items / sizeof(struct menu_items) );
-#ifdef HAVE_LCD_CHARCELLS
     status_set_param(true);
-#endif
     result = menu_run(m);
-#ifdef HAVE_LCD_CHARCELLS
     status_set_param(false);
-#endif
     menu_exit(m);
 
     settings_save();
diff -rubBP /home/dast/src/rockbox/apps/main_menu.h ./apps/main_menu.h
--- /home/dast/src/rockbox/apps/main_menu.h	Thu Oct 31 08:57:52 2002
+++ ./apps/main_menu.h	Wed Oct 29 15:12:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: main_menu.h,v 1.4 2002/09/24 17:22:11 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _MAIN_MENU_H
 #define _MAIN_MENU_H
 
diff -rubBP /home/dast/src/rockbox/apps/menu.c ./apps/menu.c
--- /home/dast/src/rockbox/apps/menu.c	Thu Dec  4 16:35:38 2003
+++ ./apps/menu.c	Tue Dec  2 21:59:15 2003
@@ -1,41 +1,15 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: menu.c,v 1.62 2003/12/04 00:08:25 zagor Exp $
- *
- * Copyright (C) 2002 Robert E. Hak
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 
-#include "hwcompat.h"
 #include "lcd.h"
-#include "font.h"
-#include "backlight.h"
 #include "menu.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
 #include "debug.h"
-#include "usb.h"
 #include "panic.h"
 #include "settings.h"
-#include "status.h"
 #include "screens.h"
-
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "widgets.h"
-#endif
+#include "status.h"
 
 struct menu {
     int top;
@@ -46,42 +20,14 @@
 
 #define MAX_MENUS 4
 
-#ifdef HAVE_LCD_BITMAP
-
-/* pixel margins */
-#define MARGIN_X (global_settings.scrollbar && \
-                  menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) +\
-                  CURSOR_WIDTH
-#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
-
-/* position the entry-list starts at */
-#define LINE_X   0
-#define LINE_Y   (global_settings.statusbar ? 1 : 0)
-
-#define CURSOR_X (global_settings.scrollbar && \
-                  menu_lines < menus[m].itemcount ? 1 : 0)
-#define CURSOR_Y 0 /* the cursor is not positioned in regard to
-                      the margins, so this is the amount of lines
-                      we add to the cursor Y position to position
-                      it on a line */
-#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
-
-#define SCROLLBAR_X      0
-#define SCROLLBAR_Y      lcd_getymargin()
-#define SCROLLBAR_WIDTH  6
-
-#else /* HAVE_LCD_BITMAP */
-
 #define LINE_X      1 /* X position the entry-list starts at */
 
-#define MENU_LINES 2
+#define MENU_LINES 4
 
 #define CURSOR_X    0
 #define CURSOR_Y    0 /* not really used for players */
 
-#endif /* HAVE_LCD_BITMAP */
-
-#define CURSOR_CHAR 0x92
+#define CURSOR_CHAR '>'
 
 static struct menu menus[MAX_MENUS];
 static bool inuse[MAX_MENUS] = { false };
@@ -89,89 +35,31 @@
 /* count in letter positions, NOT pixels */
 void put_cursorxy(int x, int y, bool on)
 {
-#ifdef HAVE_LCD_BITMAP
-    int fh, fw;
-    int xpos, ypos;
-
-    /* check here instead of at every call (ugly, but cheap) */
-    if (global_settings.invert_cursor)
-        return;
-
-    lcd_getstringsize("A", &fw, &fh);
-    xpos = x*6;
-    ypos = y*fh + lcd_getymargin();
-    if ( fh > 8 )
-        ypos += (fh - 8) / 2;
-#endif
-
     /* place the cursor */
     if(on) {
-#ifdef HAVE_LCD_BITMAP
-        lcd_bitmap ( bitmap_icons_6x8[Cursor], 
-                     xpos, ypos, 4, 8, true);
-#else
         lcd_putc(x, y, CURSOR_CHAR);
-#endif
     }
     else {
-#if defined(HAVE_LCD_BITMAP)
-        /* I use xy here since it needs to disregard the margins */
-        lcd_clearrect (xpos, ypos, 4, 8);
-#else
         lcd_putc(x, y, ' ');
-#endif
     }
 }
 
 static void menu_draw(int m)
 {
     int i = 0;
-#ifdef HAVE_LCD_BITMAP
-    int fw, fh;
-    int menu_lines;
-    lcd_setfont(FONT_UI);
-    lcd_getstringsize("A", &fw, &fh);
-    if (global_settings.statusbar)
-        menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
-    else
-        menu_lines = LCD_HEIGHT/fh;
-#else
     int menu_lines = MENU_LINES;
-#endif
 
     lcd_clear_display(); /* ...then clean the screen */
-#ifdef HAVE_LCD_BITMAP
-    lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
-#endif
-    /* correct cursor pos if out of screen */
-    if (menus[m].cursor - menus[m].top >= menu_lines)
-        menus[m].top++;
 
     for (i = menus[m].top; 
          (i < menus[m].itemcount) && (i<menus[m].top+menu_lines);
          i++) {
-        if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
-#ifdef HAVE_LCD_BITMAP
-            if (global_settings.invert_cursor)
-                lcd_puts_scroll_style(LINE_X, i-menus[m].top,
-                                       menus[m].items[i].desc, STYLE_INVERT);
-            else
-#endif
+        if((menus[m].cursor - menus[m].top)==(i-menus[m].top)) {
                 lcd_puts_scroll(LINE_X, i-menus[m].top, menus[m].items[i].desc);
-        else
+        } else {
             lcd_puts(LINE_X, i-menus[m].top, menus[m].items[i].desc);
     }
-
-    /* place the cursor */
-    put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
-#ifdef HAVE_LCD_BITMAP
-    if (global_settings.scrollbar && menus[m].itemcount > menu_lines) 
-        scrollbar(SCROLLBAR_X, SCROLLBAR_Y, SCROLLBAR_WIDTH - 1,
-                  LCD_HEIGHT - SCROLLBAR_Y, menus[m].itemcount, menus[m].top,
-                  menus[m].top + menu_lines, VERTICAL);
-#endif
-    status_draw(true);
-    lcd_update();
+    }
 }
 
 /* 
@@ -180,40 +68,30 @@
  */
 static void put_cursor(int m, int target)
 {
-    bool do_update = true;
-#ifdef HAVE_LCD_BITMAP
-    int fw, fh;
-    int menu_lines;
-    lcd_setfont(FONT_UI);
-    lcd_getstringsize("A", &fw, &fh);
-    if (global_settings.statusbar)
-        menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
-    else
-        menu_lines = LCD_HEIGHT/fh;
-#else
     int menu_lines = MENU_LINES;
-#endif
 
+    if (menus[m].cursor-menus[m].top>=0 && menus[m].cursor-menus[m].top<menu_lines) {
     put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, false);
+        lcd_puts(LINE_X, menus[m].cursor-menus[m].top, menus[m].items[menus[m].cursor].desc);
+    }
     menus[m].cursor = target;
-    menu_draw(m);
 
     if ( target < menus[m].top ) {
-        menus[m].top--;
+        menus[m].top-=menu_lines;
+        if (menus[m].top<0)
+            menus[m].top=0;
         menu_draw(m);
-        do_update = false;
     }
     else if ( target-menus[m].top > menu_lines-1 ) {
-        menus[m].top++;
+        menus[m].top+=menu_lines;
+        if (menus[m].top>menus[m].itemcount-1)
+            menus[m].top=menus[m].itemcount-1;
         menu_draw(m);
-        do_update = false;
     }
 
-    if (do_update && !global_settings.invert_cursor) {
         put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
+    lcd_puts_scroll(LINE_X, menus[m].cursor-menus[m].top, menus[m].items[menus[m].cursor].desc);
         lcd_update();
-    }
-
 }
 
 int menu_init(struct menu_items* mitems, int count)
@@ -246,53 +124,35 @@
 int menu_show(int m)
 {
     bool exit = false;
-#ifdef HAVE_LCD_BITMAP
-    int fw, fh;
-    int menu_lines;
-    lcd_setfont(FONT_UI);
-    lcd_getstringsize("A", &fw, &fh);
-    if (global_settings.statusbar)
-        menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
-    else
-        menu_lines = LCD_HEIGHT/fh;
-#endif
 
     menu_draw(m);
+    put_cursor(m,menus[m].cursor);
+    lcd_update();
 
     while (!exit) {
-        switch( button_get_w_tmo(HZ/2) ) {
-#ifdef HAVE_RECORDER_KEYPAD
+      switch(button_get_flt(true, BUTTON_ALL, BUTTON_ALL, BUTTON_ALL_FLAGS & ~BUTTON_REL)) {
             case BUTTON_UP:
             case BUTTON_UP | BUTTON_REPEAT:
-#else
-            case BUTTON_LEFT:
-            case BUTTON_LEFT | BUTTON_REPEAT:
-#endif
-                if (menus[m].cursor) {
+            case BUTTON_IR | IR_BUTTON_VOLUP:
+            case BUTTON_IR | IR_BUTTON_VOLUP | IR_BUTTON_REPEAT:
+                if (menus[m].cursor>0) {
                     /* move up */
                     put_cursor(m, menus[m].cursor-1);
                 }
                 else {
                     /* move to bottom */
-#ifdef HAVE_RECORDER_KEYPAD
-                    menus[m].top = menus[m].itemcount-(menu_lines+1);
-#else
-                    menus[m].top = menus[m].itemcount-3;
-#endif
+                    menus[m].top = menus[m].itemcount-4;
                     if (menus[m].top < 0)
                         menus[m].top = 0;
-                    menus[m].cursor = menus[m].itemcount-1;
+                    menu_draw(m);
                     put_cursor(m, menus[m].itemcount-1);
                 }
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
             case BUTTON_DOWN:
             case BUTTON_DOWN | BUTTON_REPEAT:
-#else
-            case BUTTON_RIGHT:
-            case BUTTON_RIGHT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_VOLDN:
+            case BUTTON_IR | IR_BUTTON_VOLDN | IR_BUTTON_REPEAT:
                 if (menus[m].cursor < menus[m].itemcount-1) {
                     /* move down */
                     put_cursor(m, menus[m].cursor+1);
@@ -300,55 +160,30 @@
                 else {
                     /* move to top */
                     menus[m].top = 0;
-                    menus[m].cursor = 0;
+                    menu_draw(m);
                     put_cursor(m, 0);
                 }
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_RIGHT:
-#endif
             case BUTTON_PLAY:
+            case BUTTON_RIGHT:
+            case BUTTON_IR | IR_BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
                 /* Erase current display state */
                 lcd_clear_display();
                 return menus[m].cursor;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_LEFT:
-            case BUTTON_F1:
-            case BUTTON_OFF | BUTTON_REPEAT:
-#else
             case BUTTON_STOP:
             case BUTTON_MENU:
-            case BUTTON_STOP | BUTTON_REPEAT:
-#endif
-                lcd_stop_scroll();
+            case BUTTON_LEFT:
+            case BUTTON_IR | IR_BUTTON_STOP:
+            case BUTTON_IR | IR_BUTTON_EQ:
+            case BUTTON_IR | IR_BUTTON_REWIND:
+                lcd_cancel_scroll();
                 exit = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_F2:
-                if (f2_screen())
-                    return MENU_ATTACHED_USB;
-                menu_draw(m);
-                break;
-
-            case BUTTON_F3:
-                if (f3_screen())
-                    return MENU_ATTACHED_USB;
-                menu_draw(m);
-                break;
-#endif
-
-            case SYS_USB_CONNECTED:
-                usb_screen();
-#ifdef HAVE_LCD_CHARCELLS
-                status_set_param(false);
-#endif
-                return MENU_ATTACHED_USB;
         }
-        
-        status_draw(false);
     }
     return MENU_SELECTED_EXIT;
 }
@@ -361,8 +196,6 @@
     int result=menu_show(m);
     if (result == MENU_SELECTED_EXIT)
       return false;
-    else if (result == MENU_ATTACHED_USB)
-      return true;
     if (menus[m].items[menus[m].cursor].function()) {
       return true;
     }
diff -rubBP /home/dast/src/rockbox/apps/menu.h ./apps/menu.h
--- /home/dast/src/rockbox/apps/menu.h	Fri Feb  7 10:43:19 2003
+++ ./apps/menu.h	Wed Oct 29 15:12:00 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: menu.h,v 1.12 2003/01/29 08:26:10 kjer Exp $
- *
- * Copyright (C) 2002 Robert E. Hak
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __MENU_H__
 #define __MENU_H__
 
@@ -24,7 +5,7 @@
 
 struct menu_items {
     unsigned char *desc;
-    bool (*function) (void); /* return true if USB was connected */
+    bool (*function) (void);
 };
 
 int menu_init(struct menu_items* items, int count);
@@ -34,8 +15,7 @@
 
  /* Returns below define, or number of selected menu item*/
 int menu_show(int m);
-#define MENU_ATTACHED_USB -1
-#define MENU_SELECTED_EXIT -2
+#define MENU_SELECTED_EXIT -1
 
 bool menu_run(int menu);
 
diff -rubBP /home/dast/src/rockbox/apps/misc.c ./apps/misc.c
--- /home/dast/src/rockbox/apps/misc.c	Tue May 13 11:28:55 2003
+++ ./apps/misc.c	Wed Oct 29 15:12:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.                  
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___  
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /  
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <   
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \  
- *                     \/            \/     \/    \/            \/ 
- * $Id: misc.c,v 1.3 2003/05/04 02:04:31 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "string.h"
 #include "config.h"
 #include "file.h"
diff -rubBP /home/dast/src/rockbox/apps/misc.h ./apps/misc.h
--- /home/dast/src/rockbox/apps/misc.h	Tue May 13 11:28:55 2003
+++ ./apps/misc.h	Wed Oct 29 15:12:00 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.                  
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___  
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /  
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <   
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \  
- *                     \/            \/     \/    \/            \/ 
- * $Id: misc.h,v 1.2 2003/05/04 02:04:31 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /* The point of this function would be to return a string of the input data,
    but never longer than 5 columns. Add suffix k and M when suitable...
    Make sure to have space for 6 bytes in the buffer. 5 letters plus the
diff -rubBP /home/dast/src/rockbox/apps/onplay.c ./apps/onplay.c
--- /home/dast/src/rockbox/apps/onplay.c	Mon Dec  8 17:02:34 2003
+++ ./apps/onplay.c	Wed Oct 29 15:12:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: onplay.c,v 1.20 2003/12/07 16:57:43 hohensoh Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -31,6 +13,7 @@
 #include "lang.h"
 #include "playlist.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
 #include "keyboard.h"
 #include "mp3data.h"
@@ -59,7 +42,7 @@
     if (new_playlist)
         playlist_create(NULL, NULL);
 
-    if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA)
+    if (selected_file_attr & TREE_ATTR_MPA)
         playlist_insert_track(selected_file, position, queue);
     else if (selected_file_attr & ATTR_DIRECTORY)
     {
@@ -73,20 +56,16 @@
             bool exit = false;
             
             lcd_clear_display();
-            lcd_puts_scroll(0,0,str(LANG_RECURSE_DIRECTORY_QUESTION));
+            lcd_puts_scroll(0,0,"Recurse Directory?");
             lcd_puts_scroll(0,1,selected_file);
             
-#ifdef HAVE_LCD_BITMAP
-            lcd_puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
-            lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER)); 
-#endif
-            
             lcd_update();
             
             while (!exit) {
                 int btn = button_get(true);
                 switch (btn) {
                 case BUTTON_PLAY:
+                    case BUTTON_IR | IR_BUTTON_PLAY:
                     recurse = true;
                     exit = true;
                     break;
@@ -101,7 +80,7 @@
 
         playlist_insert_directory(selected_file, position, queue, recurse);
     }
-    else if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U)
+    else if (selected_file_attr & TREE_ATTR_M3U)
         playlist_insert_playlist(selected_file, position, queue);
 
     if (new_playlist && (playlist_amount() > 0))
@@ -158,7 +137,7 @@
         args[i].queue = true;
         i++;
     }
-    else if (((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) ||
+    else if ((selected_file_attr & TREE_ATTR_MPA) ||
              (selected_file_attr & ATTR_DIRECTORY))
     {
         menu[i].desc = str(LANG_INSERT);
@@ -181,24 +160,20 @@
     bool exit = false;
 
     lcd_clear_display();
-    lcd_puts(0,0,str(LANG_REALLY_DELETE));
+    lcd_puts(0,0,"Really Delete?");
     lcd_puts_scroll(0,1,selected_file);
 
-#ifdef HAVE_LCD_BITMAP
-    lcd_puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
-    lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER)); 
-#endif
-
     lcd_update();
 
     while (!exit) {
         int btn = button_get(true);
         switch (btn) {
         case BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY:
             if (!remove(selected_file)) {
                 onplay_result = ONPLAY_RELOAD_DIR;
                 lcd_clear_display();
-                lcd_puts(0,0,str(LANG_DELETED));
+                    lcd_puts(0,0,"Deleted.");
                 lcd_puts_scroll(0,1,selected_file);
                 lcd_update();
                 sleep(HZ);
@@ -489,8 +464,8 @@
     selected_file = file;
     selected_file_attr = attr;
 
-    if (((attr  & TREE_ATTR_MASK) == TREE_ATTR_MPA) || (attr & ATTR_DIRECTORY) ||
-        (((attr & TREE_ATTR_MASK) == TREE_ATTR_M3U) && (mpeg_status() & MPEG_STATUS_PLAY)))
+    if ((attr & TREE_ATTR_MPA) || (attr & ATTR_DIRECTORY) ||
+        ((attr & TREE_ATTR_M3U) && (mpeg_status() & MPEG_STATUS_PLAY)))
     {
         menu[i].desc = str(LANG_PLAYINDICES_PLAYLIST);
         menu[i].function = playlist_options;
@@ -508,7 +483,7 @@
         i++;
     }
 
-    if ((attr & TREE_ATTR_MASK) == TREE_ATTR_MPA)
+    if (attr & TREE_ATTR_MPA)
     {
         menu[i].desc = str(LANG_VBRFIX);
         menu[i].function = vbr_fix;
diff -rubBP /home/dast/src/rockbox/apps/onplay.h ./apps/onplay.h
--- /home/dast/src/rockbox/apps/onplay.h	Fri Aug 29 13:49:54 2003
+++ ./apps/onplay.h	Wed Oct 29 15:12:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: onplay.h,v 1.2 2003/07/01 21:03:28 hardeeps Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _ONPLAY_H_
 #define _ONPLAY_H_
 
diff -rubBP /home/dast/src/rockbox/apps/options.h ./apps/options.h
--- /home/dast/src/rockbox/apps/options.h	Fri Aug 29 13:49:54 2003
+++ ./apps/options.h	Wed Oct 29 15:12:00 2003
@@ -1,33 +1,4 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: options.h,v 1.5 2003/06/10 23:12:19 bagder Exp $
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __OPTIONS_H__
 #define __OPTIONS_H__
 
-#ifndef DISABLE_DEMOS
-#undef USE_DEMOS /* since older Makefiles set the define */
-#define USE_DEMOS
-#endif
-
-#ifndef DISABLE_GAMES
-#undef USE_GAMES /* since older Makefiles set the define */
-#define USE_GAMES
-#endif
-
 #endif /* End __OPTIONS_H__ */
Only in /home/dast/src/rockbox/apps: player
diff -rubBP /home/dast/src/rockbox/apps/playlist.c ./apps/playlist.c
--- /home/dast/src/rockbox/apps/playlist.c	Tue Dec  9 13:28:39 2003
+++ ./apps/playlist.c	Fri Nov  7 07:55:00 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: playlist.c,v 1.84 2003/12/09 08:18:02 hardeeps Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /*
     Dynamic playlist design (based on design originally proposed by ricII)
 
@@ -82,25 +63,22 @@
 #include "atoi.h"
 #include "misc.h"
 #include "button.h"
+#include "remote.h"
 #include "tree.h"
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "widgets.h"
-#endif
 
 #include "lang.h"
 
 static struct playlist_info playlist;
 
-#define PLAYLIST_CONTROL_FILE ROCKBOX_DIR "/.playlist_control"
-#define PLAYLIST_CONTROL_FILE_VERSION 2
+#define PLAYLIST_CONTROL_FILE OPENNEO_DIR "/.playlist_control"
+#define PLAYLIST_CONTROL_FILE_VERSION 1
 
 /*
     Each playlist index has a flag associated with it which identifies what
     type of track it is.  These flags are stored in the 3 high order bits of
     the index.
     
-    NOTE: This limits the playlist file size to a max of 512M.
+    NOTE: This limits the playlist file size to a max of 512K.
 
     Bits 31-30:
         00 = Playlist track
@@ -145,7 +123,6 @@
                              char *dir);
 static void display_playlist_count(int count, char *fmt);
 static void display_buffer_full(void);
-static int flush_pending_control(void);
 
 /*
  * remove any files and indices associated with the playlist
@@ -171,7 +148,6 @@
     playlist.first_index = 0;
     playlist.amount = 0;
     playlist.last_insert_pos = -1;
-    playlist.shuffle_flush = false;
 
     if (!resume)
     {
@@ -182,10 +158,6 @@
         fd = creat(PLAYLIST_CONTROL_FILE, 0000200);
         if (fd >= 0)
             close(fd);
-
-        /* Reset resume settings */
-        global_settings.resume_first_index = 0;
-        global_settings.resume_seed = -1;
     }
 }
 
@@ -230,13 +202,6 @@
     if(playlist.fd < 0)
         return -1; /* failure */
     
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
-
     splash(0, 0, true, str(LANG_PLAYLIST_LOAD));
 
     /* use mp3 buffer for maximum load speed */
@@ -363,16 +328,8 @@
 
     if (playlist.amount > 0 && insert_position <= playlist.first_index &&
         position != PLAYLIST_PREPEND)
-    {
         playlist.first_index++;
 
-        if (seek_pos < 0)
-        {
-            global_settings.resume_first_index = playlist.first_index;
-            settings_save();
-        }
-    }
-
     if (insert_position < playlist.last_insert_pos ||
         (insert_position == playlist.last_insert_pos && position < 0))
         playlist.last_insert_pos++;
@@ -381,9 +338,6 @@
     {
         int result = -1;
 
-        if (flush_pending_control() < 0)
-            return -1;
-
         mutex_lock(&playlist.control_mutex);
 
         if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
@@ -404,6 +358,7 @@
         if (result < 0)
         {
             splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
+            DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
             return result;
         }
     }
@@ -427,11 +382,11 @@
     int num_files = 0;
     bool buffer_full = false;
     int i;
-    int dirfilter = SHOW_ALL;
+    int button;
     struct entry *files;
 
     /* use the tree browser dircache to load files */
-    files = load_and_sort_directory(dirname, &dirfilter, &num_files,
+    files = load_and_sort_directory(dirname, SHOW_ALL, &num_files,
         &buffer_full);
 
     if(!files)
@@ -452,11 +407,8 @@
     for (i=0; i<num_files; i++)
     {
         /* user abort */
-#ifdef HAVE_PLAYER_KEYPAD
-        if (button_get(false) == BUTTON_STOP)
-#else
-        if (button_get(false) == BUTTON_OFF)
-#endif
+        button=button_get(false);
+        if (button == BUTTON_STOP || button == (BUTTON_IR | IR_BUTTON_STOP))
         {
             result = -1;
             break;
@@ -474,7 +426,7 @@
                     break;
 
                 /* we now need to reload our current directory */
-                files = load_and_sort_directory(dirname, &dirfilter, &num_files,
+                files = load_and_sort_directory(dirname, SHOW_ALL, &num_files,
                     &buffer_full);
                 if (!files)
                 {
@@ -485,7 +437,7 @@
             else
                 continue;
         }
-        else if ((files[i].attr & TREE_ATTR_MASK) == TREE_ATTR_MPA)
+        else if (files[i].attr & TREE_ATTR_MPA)
         {
             int insert_pos;
 
@@ -542,16 +494,8 @@
         playlist.index--;
 
     if (position < playlist.first_index)
-    {
         playlist.first_index--;
 
-        if (write)
-        {
-            global_settings.resume_first_index = playlist.first_index;
-            settings_save();
-        }
-    }
-
     if (position <= playlist.last_insert_pos)
         playlist.last_insert_pos--;
 
@@ -559,9 +503,6 @@
     {
         int result = -1;
 
-        if (flush_pending_control() < 0)
-            return -1;
-
         mutex_lock(&playlist.control_mutex);
 
         if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
@@ -578,6 +519,7 @@
         if (result < 0)
         {
             splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
+            DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
             return result;
         }
     }
@@ -596,10 +538,6 @@
     int store;
     unsigned int current = playlist.indices[playlist.index];
     
-    /* seed 0 is used to identify sorted playlist for resume purposes */
-    if (seed == 0)
-        seed = 1;
-
     /* seed with the given seed */
     srand(seed);
 
@@ -621,13 +559,30 @@
     /* indices have been moved so last insert position is no longer valid */
     playlist.last_insert_pos = -1;
 
-    if (write)
+    if (write && playlist.control_fd >= 0)
+    {
+        int result = -1;
+
+        mutex_lock(&playlist.control_mutex);
+
+        if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
+        {
+            if (fprintf(playlist.control_fd, "S:%d:%d\n", seed,
+                    playlist.first_index) > 0)
+            {
+                fsync(playlist.control_fd);
+                result = 0;
+            }
+        }
+
+        mutex_unlock(&playlist.control_mutex);
+
+        if (result < 0)
     {
-        /* Don't write to disk immediately.  Instead, save in settings and
-           only flush if playlist is modified (insertion/deletion) */
-        playlist.shuffle_flush = true;
-        global_settings.resume_seed = seed;
-        settings_save();
+            splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
+            DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
+            return result;
+        }
     }
 
     return 0;
@@ -653,11 +608,28 @@
 
     if (write && playlist.control_fd >= 0)
     {
-        /* Don't write to disk immediately.  Instead, save in settings and
-           only flush if playlist is modified (insertion/deletion) */
-        playlist.shuffle_flush = true;
-        global_settings.resume_seed = 0;
-        settings_save();
+        int result = -1;
+
+        mutex_lock(&playlist.control_mutex);
+
+        if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
+        {
+            if (fprintf(playlist.control_fd, "U:%d\n", playlist.first_index) >
+                    0)
+            {
+                fsync(playlist.control_fd);
+                result = 0;
+            }
+        }
+
+        mutex_unlock(&playlist.control_mutex);
+
+        if (result < 0)
+        {
+            splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
+            DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
+            return result;
+        }
     }
 
     return 0;
@@ -745,9 +717,7 @@
     {
         if (playlist.indices[i] == seek)
         {
-            playlist.index = global_settings.resume_first_index =
-                playlist.first_index = i;
-            settings_save();
+            playlist.index = playlist.first_index = i;
             break;
         }
     }
@@ -826,10 +796,11 @@
 
         if (max < 0)
         {
-            if (control_file)
+            if (control_file) {
                 splash(HZ*2, 0, true,
                     str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
-            else
+                DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
+            } else
                 splash(HZ*2, 0, true, str(LANG_PLAYLIST_ACCESS_ERROR));
 
             return max;
@@ -915,18 +886,7 @@
 {
     lcd_clear_display();
 
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
-
-#ifdef HAVE_PLAYER_KEYPAD
     splash(0, 0, true, fmt, count, str(LANG_STOP_ABORT));
-#else
-    splash(0, 0, true, fmt, count, str(LANG_OFF_ABORT));
-#endif
 }
 
 /*
@@ -943,56 +903,6 @@
 }
 
 /*
- * Flush any pending control commands to disk.  Called when playlist is being
- * modified.  Returns 0 on success and -1 on failure.
- */
-static int flush_pending_control(void)
-{
-    int result = 0;
-        
-    if (playlist.shuffle_flush && global_settings.resume_seed >= 0)
-    {
-        /* pending shuffle */
-        mutex_lock(&playlist.control_mutex);
-        
-        if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
-        {
-            if (global_settings.resume_seed == 0)
-                result = fprintf(playlist.control_fd, "U:%d\n",
-                    playlist.first_index);
-            else
-                result = fprintf(playlist.control_fd, "S:%d:%d\n",
-                    global_settings.resume_seed, playlist.first_index);
-
-            if (result > 0)
-            {
-                fsync(playlist.control_fd);
-
-                playlist.shuffle_flush = false;
-                global_settings.resume_seed = -1;
-                settings_save();
-
-                result = 0;
-            }
-            else
-                result = -1;
-        }
-        else
-            result = -1;
-        
-        mutex_unlock(&playlist.control_mutex);
-        
-        if (result < 0)
-        {
-            splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
-            return result;
-        }
-    }
-
-    return result;
-}
-
-/*
  * Initialize playlist entries at startup
  */
 void playlist_init(void)
@@ -1016,8 +926,10 @@
     empty_playlist(false);
 
     playlist.control_fd = open(PLAYLIST_CONTROL_FILE, O_RDWR);
-    if (playlist.control_fd < 0)
+    if (playlist.control_fd < 0) {
+        DEBUGF("Playlist_Create: Could not update playlist control file!\n%s (%d)\n",PLAYLIST_CONTROL_FILE,playlist.control_fd);
         splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
+    }
 
     if (!file)
     {
@@ -1060,7 +972,6 @@
     int nread;
     int total_read = 0;
     bool first = true;
-    bool sorted = true;
 
     enum {
         resume_playlist,
@@ -1142,7 +1053,12 @@
                         version = atoi(str1);
                         
                         if (version != PLAYLIST_CONTROL_FILE_VERSION)
-                            return -1;
+                        {
+                            DEBUGF("Playlist control not my version\n");
+                            result = -1;
+                            exit_loop = true;
+                            break;
+                        }
                         
                         update_playlist_filename(str2, str3);
                         
@@ -1156,7 +1072,7 @@
                         else if (str2[0] != '\0')
                         {
                             playlist.in_ram = true;
-                            resume_directory(str2);
+                            DEBUGF("Playlist resuming directory\n - %s\n",str2);
                         }
                         
                         /* load the rest of the data */
@@ -1182,6 +1098,7 @@
                         position = atoi(str1);
                         last_position = atoi(str2);
                         
+                        DEBUGF("Playlist adding file\n - %s\n",str3);
                         queue = (current_command == resume_add)?false:true;
                         
                         /* seek position is based on str3's position in
@@ -1226,19 +1143,12 @@
                             break;
                         }
                         
-                        if (!sorted)
-                        {
-                            /* Always sort list before shuffling */
-                            sort_playlist(false, false);
-                        }
-
                         seed = atoi(str1);
                         playlist.first_index = atoi(str2);
                         
                         if (randomise_playlist(seed, false, false) < 0)
                             return -1;
 
-                        sorted = false;
                         break;
                     }
                     case resume_unshuffle:
@@ -1256,7 +1166,6 @@
                         if (sort_playlist(false, false) < 0)
                             return -1;
 
-                        sorted = true;
                         break;
                     }
                     case resume_reset:
@@ -1391,27 +1300,8 @@
 
         /* Terminate on EOF */
         if(nread <= 0)
-        {
-            if (global_settings.resume_seed >= 0)
-            {
-                /* Apply shuffle command saved in settings */
-                if (global_settings.resume_seed == 0)
-                    sort_playlist(false, true);
-                else
-                {
-                    if (!sorted)
-                        sort_playlist(false, false);
-
-                    randomise_playlist(global_settings.resume_seed, false,
-                        true);
-                }
-
-                playlist.first_index = global_settings.resume_first_index;
-            }
-
             break;
         }
-    }
 
     return 0;
 }
@@ -1436,6 +1326,36 @@
     playlist.buffer_end_pos += len;
     playlist.buffer[playlist.buffer_end_pos++] = '\0';
 
+    if (playlist.control_fd >= 0)
+    {
+        int result = -1;
+
+        mutex_lock(&playlist.control_mutex);
+
+        if (lseek(playlist.control_fd, 0, SEEK_END) >= 0)
+        {
+            if (fprintf(playlist.control_fd, "A:%d:%d:%s\n",
+                    PLAYLIST_INSERT_LAST, playlist.last_insert_pos,filename) > 0)
+            {
+                /* save the position in file where track name is written */
+//                lseek(playlist.control_fd, 0, SEEK_CUR);
+
+//                if (fprintf(playlist.control_fd, "%s\n", filename) > 0)
+                result = 0;
+                fsync(playlist.control_fd);
+            }
+        }
+
+        mutex_unlock(&playlist.control_mutex);
+
+        if (result < 0)
+        {
+            splash(HZ*2, 0, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
+            DEBUGF("Could not update playlist control file %s!",PLAYLIST_CONTROL_FILE);
+            return result;
+        }
+    }
+    
     return 0;
 }
 
@@ -1511,6 +1431,7 @@
     char trackname[MAX_PATH+1];
     int count = 0;
     int result = 0;
+    int button;
 
     if (playlist.control_fd < 0)
     {
@@ -1544,15 +1465,13 @@
     while ((max = read_line(fd, temp_buf, sizeof(temp_buf))) > 0)
     {
         /* user abort */
-#ifdef HAVE_PLAYER_KEYPAD
-        if (button_get(false) == BUTTON_STOP)
-#else
-        if (button_get(false) == BUTTON_OFF)
-#endif
+        button=button_get(false);
+        if (button  == BUTTON_STOP || button == (BUTTON_IR | IR_BUTTON_STOP))
             break;
 
         if (temp_buf[0] != '#' || temp_buf[0] != '\0')
         {
+            DEBUGF("Adding file '%s'\n",temp_buf);
             int insert_pos;
 
             /* we need to format so that relative paths are correctly
@@ -1633,8 +1552,7 @@
     {
         /* store the seek position before the shuffle */
         seek_pos = playlist.indices[start_index];        
-        playlist.index = global_settings.resume_first_index =
-            playlist.first_index = start_index;
+        playlist.index = playlist.first_index = start_index;
         start_current = true;
     }
 
@@ -1642,9 +1560,6 @@
     
     randomise_playlist(random_seed, start_current, true);
 
-    /* Flush shuffle command to disk */
-    flush_pending_control();
-
     return playlist.index;
 }
 
@@ -1697,8 +1612,10 @@
     bool control_file;
 
     index = get_next_index(steps);
-    if (index < 0)
+    if (index < 0) {
+        DEBUGF("get_next_index returned null!\n");
         return NULL;
+    }
 
     control_file = playlist.indices[index] & PLAYLIST_INSERT_TYPE_MASK;
     seek = playlist.indices[index] & PLAYLIST_SEEK_MASK;
@@ -1761,6 +1678,7 @@
     }
 
     index = get_next_index(steps);
+    DEBUGF("playlist_next: Now playing song w/ index %d\n",index);
     playlist.index = index;
 
     if (playlist.last_insert_pos >= 0)
@@ -1814,7 +1732,7 @@
 
 /* Get resume info for current playing song.  If return value is -1 then
    settings shouldn't be saved. */
-int playlist_get_resume_info(short *resume_index)
+int playlist_get_resume_info(int *resume_index)
 {
     *resume_index = playlist.index;
 
@@ -1898,13 +1816,11 @@
         bool control_file;
         bool queue;
         int seek;
+        int button;
 
         /* user abort */
-#ifdef HAVE_PLAYER_KEYPAD
-        if (button_get(false) == BUTTON_STOP)
-#else
-        if (button_get(false) == BUTTON_OFF)
-#endif
+        button=button_get(false);
+        if (button == BUTTON_STOP || button == (BUTTON_IR | IR_BUTTON_STOP))
             break;
 
         control_file = playlist.indices[index] & PLAYLIST_INSERT_TYPE_MASK;
diff -rubBP /home/dast/src/rockbox/apps/playlist.h ./apps/playlist.h
--- /home/dast/src/rockbox/apps/playlist.h	Tue Dec  9 13:28:39 2003
+++ ./apps/playlist.h	Wed Oct 29 15:12:02 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: playlist.h,v 1.29 2003/12/09 08:18:02 hardeeps Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __PLAYLIST_H__
 #define __PLAYLIST_H__
 
@@ -39,11 +20,10 @@
     char *buffer;        /* buffer for in-ram playlists             */
     int  buffer_size;    /* size of buffer                          */
     int  buffer_end_pos; /* last position where buffer was written  */
-    short index;         /* index of current playing track          */
-    short first_index;   /* index of first song in playlist         */
+    int  index;          /* index of current playing track          */
+    int  first_index;    /* index of first song in playlist         */
     int  amount;         /* number of tracks in the index           */
     int  last_insert_pos; /* last position we inserted a track      */
-    bool shuffle_flush;  /* Does shuffle value need to be flushed?  */
     struct mutex control_mutex; /* mutex for control file access    */
 };
 
@@ -63,7 +43,7 @@
 bool playlist_check(int steps);
 char *playlist_peek(int steps);
 int playlist_next(int steps);
-int playlist_get_resume_info(short *resume_index);
+int playlist_get_resume_info(int *resume_index);
 int playlist_get_display_index(void);
 int playlist_amount(void);
 char *playlist_name(char *buf, int buf_size);
diff -rubBP /home/dast/src/rockbox/apps/playlist_menu.c ./apps/playlist_menu.c
--- /home/dast/src/rockbox/apps/playlist_menu.c	Wed Jul  2 17:54:44 2003
+++ ./apps/playlist_menu.c	Tue Dec  2 21:59:15 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: playlist_menu.c,v 1.2 2003/07/02 15:54:44 hardeeps Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <string.h>
 
 #include "menu.h"
@@ -34,9 +15,9 @@
 {
     char filename[MAX_PATH+1];
 
-    strncpy(filename, DEFAULT_PLAYLIST_NAME, sizeof(filename));
+    strncpy( filename, DEFAULT_PLAYLIST_NAME, sizeof(filename) );
 
-    if (!kbd_input(filename, sizeof(filename)))
+    if( kbd_input(&filename[1], sizeof(filename)-1) != 0 )
     {
         playlist_save(filename);
         
diff -rubBP /home/dast/src/rockbox/apps/playlist_menu.h ./apps/playlist_menu.h
--- /home/dast/src/rockbox/apps/playlist_menu.h	Tue Jul  1 23:05:43 2003
+++ ./apps/playlist_menu.h	Wed Oct 29 15:12:02 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: playlist_menu.h,v 1.1 2003/07/01 21:05:43 hardeeps Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _PLAYLIST_MENU_H
 #define _PLAYLIST_MENU_H
 
diff -rubBP /home/dast/src/rockbox/apps/plugin.c ./apps/plugin.c
--- /home/dast/src/rockbox/apps/plugin.c	Tue Dec  9 07:48:55 2003
+++ ./apps/plugin.c	Wed Oct 29 15:12:02 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: plugin.c,v 1.10 2003/12/09 06:48:55 bagder Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
@@ -35,9 +17,6 @@
 #include "keyboard.h"
 #include "mpeg.h"
 
-#ifdef HAVE_LCD_BITMAP
-#include "widgets.h"
-#endif
 
 #ifdef SIMULATOR
   #include <debug.h>
@@ -63,9 +42,9 @@
 static bool plugin_loaded = false;
 static int  plugin_size = 0;
 
-static int plugin_test(int api_version, int model, int memsize);
+static int plugin_test(int api_version);
 
-static struct plugin_api rockbox_api = {
+static struct plugin_api openneo_api = {
     PLUGIN_API_VERSION,
 
     plugin_test,
@@ -75,45 +54,19 @@
     lcd_puts,
     lcd_puts_scroll,
     lcd_stop_scroll,
-#ifdef HAVE_LCD_CHARCELLS
-    lcd_define_pattern,
-    lcd_get_locked_pattern,
-    lcd_unlock_pattern,
     lcd_putc,
-#else
-    lcd_putsxy,
-    lcd_bitmap,
-    lcd_drawline,
-    lcd_clearline,
-    lcd_drawpixel,
-    lcd_clearpixel,
-    lcd_setfont,
-    lcd_clearrect,
-    lcd_fillrect,
-    lcd_drawrect,
-    lcd_invertrect,
-    lcd_getstringsize,
-    lcd_update,
-    lcd_update_rect,
-    progressbar,
-    slidebar,
-    scrollbar,
-#ifndef SIMULATOR
-    lcd_roll,
-#endif
-#endif
 
     /* button */
     button_get,
     button_get_w_tmo,
 
     /* file */
-    (open_func)PREFIX(open),
+    PREFIX(open),
     PREFIX(close),
-    (read_func)read,
+    read,
     lseek,
-    (creat_func)PREFIX(creat),
-    (write_func)write,
+    PREFIX(creat),
+    write,
     remove,
     rename,
     ftruncate,
@@ -128,7 +81,6 @@
 
     /* kernel */
     PREFIX(sleep),
-    usb_screen,
     &current_tick,
 
     /* strings and memory */
@@ -138,18 +90,11 @@
     memset,
     memcpy,
 
-    /* sound */
-#ifndef SIMULATOR
-#ifdef HAVE_MAS3587F
-    mas_codec_readreg,
-#endif
-#endif
-    
     /* misc */
     srand,
     rand,
     splash,
-    (qsort_func)qsort,
+    qsort,
     kbd_input,
     mpeg_current_track,
     atoi,
@@ -170,15 +115,11 @@
 #endif
 
     lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
-    lcd_setmargins(0,0);
-    lcd_update();
-#endif
 #ifdef SIMULATOR
 #ifdef WIN32
     snprintf(path, sizeof path, "%s", plugin);
 #else
-    snprintf(path, sizeof path, "archos%s", plugin);
+    snprintf(path, sizeof path, "neo%s", plugin);
 #endif
     pd = dlopen(path, RTLD_NOW);
     if (!pd) {
@@ -215,32 +156,20 @@
         splash(HZ*2, 0, true, buf);
         return -1;
     }
-    if (plugin_size == 0) {
-        /* loaded a 0-byte plugin, implying it's not for this model */
-        splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL));
-        return -1;
-    }
 #endif
 
     plugin_loaded = true;
-    rc = plugin_start(&rockbox_api, parameter);
+    rc = plugin_start(&openneo_api, parameter);
     plugin_loaded = false;
 
     switch (rc) {
         case PLUGIN_OK:
             break;
 
-        case PLUGIN_USB_CONNECTED:
-            return PLUGIN_USB_CONNECTED;
-
         case PLUGIN_WRONG_API_VERSION:
             splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_VERSION));
             break;
 
-        case PLUGIN_WRONG_MODEL:
-            splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL));
-            break;
-
         default:
             splash(HZ*2, 0, true, str(LANG_PLUGIN_ERROR));
             break;
@@ -276,17 +205,11 @@
     return &pluginbuf[buffer_pos];
 }
 
-static int plugin_test(int api_version, int model, int memsize)
+static int plugin_test(int api_version)
 {
     if (api_version < PLUGIN_MIN_API_VERSION ||
         api_version > PLUGIN_API_VERSION)
         return PLUGIN_WRONG_API_VERSION;
 
-    if (model != MODEL)
-        return PLUGIN_WRONG_MODEL;
-
-    if (memsize != MEM)
-        return PLUGIN_WRONG_MODEL;
-    
     return PLUGIN_OK;
 }
Only in /home/dast/src/rockbox/apps: plugin.c.~1.9.~
diff -rubBP /home/dast/src/rockbox/apps/plugin.h ./apps/plugin.h
--- /home/dast/src/rockbox/apps/plugin.h	Mon Dec  8 22:58:38 2003
+++ ./apps/plugin.h	Wed Oct 29 15:12:02 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: plugin.h,v 1.12 2003/12/08 21:58:38 bagder Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _PLUGIN_H_
 #define _PLUGIN_H_
 
@@ -25,10 +7,6 @@
 #define NO_REDEFINES_PLEASE
 #endif
 
-#ifndef MEM
-#define MEM 2
-#endif
-
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -36,41 +14,26 @@
 #include "dir.h"
 #include "kernel.h"
 #include "button.h"
-#include "font.h"
 #include "system.h"
 #include "lcd.h"
 #include "id3.h"
 #include "mpeg.h"
 
 /* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 7
+#define PLUGIN_API_VERSION 1
 
 /* update this to latest version if a change to the api struct breaks
    backwards compatibility */
-#define PLUGIN_MIN_API_VERSION 6
+#define PLUGIN_MIN_API_VERSION 1
 
 /* plugin return codes */
 enum plugin_status {
     PLUGIN_OK = 0,
-    PLUGIN_USB_CONNECTED,
 
     PLUGIN_WRONG_API_VERSION = -1,
-    PLUGIN_WRONG_MODEL = -2,
-    PLUGIN_ERROR = -3,
-};
-
-/* different (incompatible) plugin models */
-enum model {
-    PLAYER,
-    RECORDER
+    PLUGIN_ERROR = -2,
 };
 
-#ifdef HAVE_LCD_CHARCELLS
-#define MODEL PLAYER
-#else
-#define MODEL RECORDER
-#endif
-
 /* compatibility test macro */
 #define TEST_PLUGIN_API(_api_) \
 do { \
@@ -96,37 +59,7 @@
     void (*lcd_puts)(int x, int y, unsigned char *string);
     void (*lcd_puts_scroll)(int x, int y, unsigned char* string);
     void (*lcd_stop_scroll)(void);
-#ifdef HAVE_LCD_CHARCELLS
-    void (*lcd_define_pattern)(int which,char *pattern);
-    unsigned char (*lcd_get_locked_pattern)(void);
-    void (*lcd_unlock_pattern)(unsigned char pat);
     void (*lcd_putc)(int x, int y, unsigned short ch);
-#else
-    void (*lcd_putsxy)(int x, int y, unsigned char *string);
-    void (*lcd_bitmap)(unsigned char *src, int x, int y,
-                       int nx, int ny, bool clear);
-    void (*lcd_drawline)(int x1, int y1, int x2, int y2);
-    void (*lcd_clearline)(int x1, int y1, int x2, int y2);
-    void (*lcd_drawpixel)(int x, int y);
-    void (*lcd_clearpixel)(int x, int y);
-    void (*lcd_setfont)(int font);
-    void (*lcd_clearrect)(int x, int y, int nx, int ny);
-    void (*lcd_fillrect)(int x, int y, int nx, int ny);
-    void (*lcd_drawrect)(int x, int y, int nx, int ny);
-    void (*lcd_invertrect)(int x, int y, int nx, int ny);
-    int  (*lcd_getstringsize)(unsigned char *str, int *w, int *h);
-    void (*lcd_update)(void);
-    void (*lcd_update_rect)(int x, int y, int width, int height);
-    void (*progressbar)(int x, int y, int width, int height,
-                        int percent, int direction);
-    void (*slidebar)(int x, int y, int width, int height,
-                     int percent, int direction);
-    void (*scrollbar)(int x, int y, int width, int height, int items,
-                      int min_shown, int max_shown, int orientation);
-#ifndef SIMULATOR
-    void (*lcd_roll)(int pixels);
-#endif
-#endif
 
     /* button */
     int (*button_get)(bool block);
@@ -135,13 +68,13 @@
     /* file */
     int (*open)(const char* pathname, int flags);
     int (*close)(int fd);
-    ssize_t (*read)(int fd, void* buf, size_t count);
-    off_t (*lseek)(int fd, off_t offset, int whence);
-    int (*creat)(const char *pathname, mode_t mode);
-    ssize_t (*write)(int fd, const void* buf, size_t count);
+    int (*read)(int fd, void* buf, int count);
+    int (*lseek)(int fd, int offset, int whence);
+    int (*creat)(const char *pathname, int mode);
+    int (*write)(int fd, void* buf, int count);
     int (*remove)(const char* pathname);
     int (*rename)(const char* path, const char* newname);
-    int (*ftruncate)(int fd, off_t length);
+    int (*ftruncate)(int fd, unsigned int size);
     int (*filesize)(int fd);
     int (*fprintf)(int fd, const char *fmt, ...);
     int (*read_line)(int fd, char* buffer, int buffer_size);
@@ -153,7 +86,6 @@
 
     /* kernel */
     void (*sleep)(int ticks);
-    void (*usb_screen)(void);
     long* current_tick;
 
     /* strings and memory */
@@ -163,13 +95,6 @@
     void*  (*memset)(void *dst, int c, size_t length);
     void*  (*memcpy)(void *out, const void *in, size_t n);
 
-    /* sound */
-#ifndef SIMULATOR
-#ifdef HAVE_MAS3587F
-    int (*mas_codec_readreg)(int reg);
-#endif
-#endif
-
     /* misc */
     void (*srand)(unsigned int seed);
     int  (*rand)(void);
@@ -188,7 +113,7 @@
 void* plugin_get_buffer(int *buffer_size);
 
 /* defined by the plugin */
-enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter)
+enum plugin_status plugin_start(struct plugin_api* openneo, void* parameter)
     __attribute__ ((section (".entry")));
 
 #endif
Only in /home/dast/src/rockbox/apps: plugin.h.~1.11.~
Only in /home/dast/src/rockbox/apps: plugins
Only in /home/dast/src/rockbox/apps: recorder
diff -rubBP /home/dast/src/rockbox/apps/screens.c ./apps/screens.c
--- /home/dast/src/rockbox/apps/screens.c	Thu Dec  4 16:35:38 2003
+++ ./apps/screens.c	Mon Nov 24 04:30:19 2003
@@ -1,664 +1,24 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: screens.c,v 1.35 2003/12/04 00:08:25 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
-#include "backlight.h"
 #include "button.h"
 #include "lcd.h"
 #include "lang.h"
-#include "icons.h"
-#include "font.h"
 #include "mpeg.h"
-#include "usb.h"
 #include "settings.h"
 #include "status.h"
 #include "playlist.h"
 #include "sprintf.h"
 #include "kernel.h"
-#include "power.h"
 #include "system.h"
-#include "powermgmt.h"
-#include "adc.h"
 
-#ifdef HAVE_LCD_BITMAP
-#define BMPHEIGHT_usb_logo 32
-#define BMPWIDTH_usb_logo 100
-static unsigned char usb_logo[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08,
-    0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
-    0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 
-    0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
-    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
-    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0,
-    0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c,
-    0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
-    0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00,
-    0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-    0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01, 
-    0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
-    0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
-    0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
-    0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f,
-    0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3,
-    0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02,
-    0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-    0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80,
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87,
-    0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0,
-    0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
-    0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 
-};
-#endif
-
-void usb_display_info(void)
-{
-    lcd_clear_display();
-
-#ifdef HAVE_LCD_BITMAP
-    /* lcd_bitmap() only supports 16 pixels height! */
-    lcd_bitmap(usb_logo, 6, 16,
-               BMPWIDTH_usb_logo, 8, false);
-    lcd_bitmap(usb_logo+BMPWIDTH_usb_logo, 6, 24,
-               BMPWIDTH_usb_logo, 8, false);
-    lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*2, 6, 32,
-               BMPWIDTH_usb_logo, 8, false);
-    lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*3, 6, 40,
-               BMPWIDTH_usb_logo, 8, false);
-    status_draw(true);
-    lcd_update();
-#else
-    lcd_puts(0, 0, "[USB Mode]");
-    status_set_param(false);
-    status_set_audio(false);
-    status_set_usb(true);
-    status_draw(false);
-#endif
-}
-
-void usb_screen(void)
-{
-#ifndef SIMULATOR
-    backlight_on();
-    usb_acknowledge(SYS_USB_CONNECTED_ACK);
-    usb_display_info();
-    while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) {
-        if(usb_inserted()) {
-            status_draw(false);
-        }
-    }
-#ifdef HAVE_LCD_CHARCELLS
-    status_set_usb(false);
-#endif
-
-    backlight_on();
-#endif
-}
-
-
-/* some simulator dummies */
-#ifdef SIMULATOR
-#define BATTERY_SCALE_FACTOR 7000
-unsigned short adc_read(int channel)
-{
-   (void)channel;
-   return 100;
-}
-#endif
-
-
-#ifdef HAVE_LCD_BITMAP
-void charging_display_info(bool animate)
-{
-    unsigned char charging_logo[36];
-    const int pox_x = (LCD_WIDTH - sizeof(charging_logo)) / 2;
-    const int pox_y = 32;
-    static unsigned phase = 3;
-    unsigned i;
-    char buf[32];
-    (void)buf;
-
-#ifdef NEED_ATA_POWER_BATT_MEASURE
-    if (ide_powered()) /* FM and V2 can only measure when ATA power is on */
-#endif
-    {
-        int battery_voltage;
-        int batt_int, batt_frac;
-
-        battery_voltage = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000;
-        batt_int = battery_voltage / 100;
-        batt_frac = battery_voltage % 100;
-
-        snprintf(buf, 32, "  Batt: %d.%02dV %d%%  ", batt_int, batt_frac,
-                 battery_level());
-        lcd_puts(0, 7, buf);
-    }
-
-#ifdef HAVE_CHARGE_CTRL
-
-    snprintf(buf, 32, "Charge mode:");
-    lcd_puts(0, 2, buf);
-
-    if (charge_state == 1)
-        snprintf(buf, 32, str(LANG_BATTERY_CHARGE));
-    else if (charge_state == 2)
-        snprintf(buf, 32, str(LANG_BATTERY_TOPOFF_CHARGE));
-    else if (charge_state == 3)
-        snprintf(buf, 32, str(LANG_BATTERY_TRICKLE_CHARGE));
-    else
-        snprintf(buf, 32, "not charging");
-
-    lcd_puts(0, 3, buf);
-    if (charger_enabled)
-    {
-        backlight_on(); /* using the light gives good indication */
-    }
-    else
-    {
-        backlight_off();
-        animate = false;
-    }
-#endif                
-
-    
-    /* middle part */
-    memset(charging_logo+3, 0x00, 32);
-    charging_logo[0] = 0x3C;
-    charging_logo[1] = 0x24;
-    charging_logo[2] = charging_logo[35] = 0xFF;
-    
-    if (!animate)
-    {   /* draw the outline */
-        /* middle part */
-        lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8, true);
-        /* upper line */
-        charging_logo[0] = charging_logo[1] = 0x00; 
-        memset(charging_logo+2, 0x80, 34);
-        lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8, false);
-        /* lower line */
-        memset(charging_logo+2, 0x01, 34);
-        lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8, false);
-    }
-    else
-    {   /* animate the middle part */
-        for (i = 3; i<MIN(sizeof(charging_logo)-1, phase); i++)
-        {
-            if ((i-phase) % 8 == 0)
-            {   /* draw a "bubble" here */
-                unsigned bitpos;
-                bitpos = (phase + i/8) % 15; /* "bounce" effect */
-                if (bitpos > 7) 
-                    bitpos = 14 - bitpos;
-                charging_logo[i] = 0x01 << bitpos;
-            }
-        }
-        lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8, true);
-        phase++;
-    }
-    lcd_update();
-}
-#else /* not HAVE_LCD_BITMAP */
-void charging_display_info(bool animate)
-{
-    /* ToDo for Player */
-    (void)animate;
-}
-#endif
-
-
-/* blocks while charging, returns on event:
-   1 if charger cable was removed
-   2 if Off/Stop key was pressed
-   3 if On key was pressed
-   4 if USB was connected */
-int charging_screen(void)
-{
-    int button;
-    int rc = 0;
-#ifdef HAVE_RECORDER_KEYPAD
-    const int offbutton = BUTTON_OFF;
-#else
-    const int offbutton = BUTTON_STOP;
-#endif
-
-    ide_power_enable(false); /* power down the disk, else would be spinning */
-
-    lcd_clear_display();
-    backlight_on();
-    status_draw(true);
-
-#ifdef HAVE_LCD_BITMAP
-    charging_display_info(false);
-#else
-    status_set_playmode(STATUS_STOP);
-    lcd_puts(0, 1, "[charging]");
-#endif
-    
-    do
-    {
-        status_draw(false);
-        charging_display_info(true);
-        button = button_get_w_tmo(HZ/3);
-        if (button == (BUTTON_ON | BUTTON_REL))
-            rc = 3;
-        else if (button == offbutton)
-            rc = 2;
-        else
-        {
-            if (usb_detect())
-                rc = 4;
-            else if (!charger_inserted())
-                rc = 1;
-        }
-    } while (!rc);
-
-    return rc;
-}
-
-
-
-#ifdef HAVE_RECORDER_KEYPAD
-/* returns:
-   0 if no key was pressed
-   1 if a key was pressed (or if ON was held down long enough to repeat)
-   2 if USB was connected */
-int on_screen(void)
-{
-    static int pitch = 1000;
-    bool exit = false;
-    bool used = false;
-
-    while (!exit) {
-
-        if ( used ) {
-            char* ptr;
-            char buf[32];
-            int w, h;
-
-            lcd_clear_display();
-            lcd_setfont(FONT_SYSFIXED);
-    
-            ptr = str(LANG_PITCH_UP);
-            lcd_getstringsize(ptr,&w,&h);
-            lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr);
-            lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow],
-                       LCD_WIDTH/2 - 3, h*2, 7, 8, true);
-
-            snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 );
-            lcd_getstringsize(buf,&w,&h);
-            lcd_putsxy((LCD_WIDTH-w)/2, h, buf);
-
-            ptr = str(LANG_PITCH_DOWN);
-            lcd_getstringsize(ptr,&w,&h);
-            lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
-            lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
-                       LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
-
-            ptr = str(LANG_PAUSE);
-            lcd_getstringsize(ptr,&w,&h);
-            lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr);
-            lcd_bitmap(bitmap_icons_7x8[Icon_Pause],
-                       (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8, true);
-
-            lcd_update();
-        }
-
-        /* use lastbutton, so the main loop can decide whether to
-           exit to browser or not */
-        switch (button_get(true)) {
-            case BUTTON_UP:
-            case BUTTON_ON | BUTTON_UP:
-            case BUTTON_ON | BUTTON_UP | BUTTON_REPEAT:
-                used = true;
-                pitch++;
-                if ( pitch > 2000 )
-                    pitch = 2000;
-                mpeg_set_pitch(pitch);
-                break;
-
-            case BUTTON_DOWN:
-            case BUTTON_ON | BUTTON_DOWN:
-            case BUTTON_ON | BUTTON_DOWN | BUTTON_REPEAT:
-                used = true;
-                pitch--;
-                if ( pitch < 500 )
-                    pitch = 500;
-                mpeg_set_pitch(pitch);
-                break;
-
-            case BUTTON_ON | BUTTON_PLAY:
-                mpeg_pause();
-                used = true;
-                break;
-
-            case BUTTON_PLAY | BUTTON_REL:
-                mpeg_resume();
-                used = true;
-                break;
-
-            case BUTTON_ON | BUTTON_PLAY | BUTTON_REL:
-                mpeg_resume();
-                exit = true;
-                break;
-
-            case BUTTON_ON | BUTTON_RIGHT:
-                if ( pitch < 2000 ) {
-                    pitch += 20;
-                    mpeg_set_pitch(pitch);
-                }
-                break;
-
-            case BUTTON_RIGHT | BUTTON_REL:
-                if ( pitch > 500 ) {
-                    pitch -= 20;
-                    mpeg_set_pitch(pitch);
-                }
-                break;
-
-            case BUTTON_ON | BUTTON_LEFT:
-                if ( pitch > 500 ) {
-                    pitch -= 20;
-                    mpeg_set_pitch(pitch);
-                }
-                break;
-
-            case BUTTON_LEFT | BUTTON_REL:
-                if ( pitch < 2000 ) {
-                    pitch += 20;
-                    mpeg_set_pitch(pitch);
-                }
-                break;
-
-#ifdef SIMULATOR
-            case BUTTON_ON:
-#else
-            case BUTTON_ON | BUTTON_REL:
-            case BUTTON_ON | BUTTON_UP | BUTTON_REL:
-            case BUTTON_ON | BUTTON_DOWN | BUTTON_REL:
-#endif
-                exit = true;
-                break;
-
-            case BUTTON_ON | BUTTON_REPEAT:
-                used = true;
-                break;
-
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return 2;
-        }
-    }
-
-    lcd_setfont(FONT_UI);
-
-    if ( used )
-        return 1;
-    else
-        return 0;
-}
-
-bool f2_screen(void)
-{
-    bool exit = false;
-    bool used = false;
-    int w, h;
-    char buf[32];
-    int oldrepeat = global_settings.repeat_mode;
-
-    lcd_setfont(FONT_SYSFIXED);
-    lcd_getstringsize("A",&w,&h);
-
-    while (!exit) {
-        char* ptr=NULL;
-
-        lcd_clear_display();
-
-        /* Shuffle mode */
-        lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_SHUFFLE));
-        lcd_putsxy(0, LCD_HEIGHT/2 - h, str(LANG_F2_MODE));
-        lcd_putsxy(0, LCD_HEIGHT/2, 
-                   global_settings.playlist_shuffle ? 
-                   str(LANG_ON) : str(LANG_OFF));
-        lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], 
-                   LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
-
-        /* Directory Filter */
-        switch ( global_settings.dirfilter ) {
-            case SHOW_ALL:
-                ptr = str(LANG_FILTER_ALL);
-                break;
-
-            case SHOW_SUPPORTED:
-                ptr = str(LANG_FILTER_SUPPORTED);
-                break;
-
-            case SHOW_MUSIC:
-                ptr = str(LANG_FILTER_MUSIC);
-                break;
-                
-            case SHOW_PLAYLIST:
-                ptr = str(LANG_FILTER_PLAYLIST);
-                break;
-        }
-
-        snprintf(buf, sizeof buf, "%s:", str(LANG_FILTER));
-        lcd_getstringsize(buf,&w,&h);
-        lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, buf);
-        lcd_getstringsize(ptr,&w,&h);
-        lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
-        lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
-                   LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
-
-        /* Repeat Mode */
-        switch ( global_settings.repeat_mode ) {
-            case REPEAT_OFF:
-                ptr = str(LANG_OFF);
-                break;
-
-            case REPEAT_ALL:
-                ptr = str(LANG_REPEAT_ALL);
-                break;
-
-            case REPEAT_ONE:
-                ptr = str(LANG_REPEAT_ONE);
-                break;
-        }
-
-        lcd_getstringsize(str(LANG_REPEAT),&w,&h);
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, str(LANG_REPEAT));
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE));
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr);
-        lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], 
-                   LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
-
-        lcd_update();
-
-        switch (button_get(true)) {
-            case BUTTON_LEFT:
-            case BUTTON_F2 | BUTTON_LEFT:
-                global_settings.playlist_shuffle =
-                    !global_settings.playlist_shuffle;
-
-                if(mpeg_status() & MPEG_STATUS_PLAY)
-                {
-                    if (global_settings.playlist_shuffle)
-                        playlist_randomise(current_tick, true);
-                    else
-                        playlist_sort(true);
-                }
-                used = true;
-                break;
-
-            case BUTTON_DOWN:
-            case BUTTON_F2 | BUTTON_DOWN:
-                global_settings.dirfilter++;
-                if ( global_settings.dirfilter >= NUM_FILTER_MODES )
-                    global_settings.dirfilter = 0;
-                used = true;
-                break;
-
-            case BUTTON_RIGHT:
-            case BUTTON_F2 | BUTTON_RIGHT:
-                global_settings.repeat_mode++;
-                if ( global_settings.repeat_mode >= NUM_REPEAT_MODES )
-                    global_settings.repeat_mode = 0;
-                used = true;
-                break;
-
-            case BUTTON_F2 | BUTTON_REL:
-                if ( used )
-                    exit = true;
-                used = true;
-                break;
-
-            case BUTTON_F2 | BUTTON_REPEAT:
-                used = true;
-                break;
-
-            case BUTTON_OFF | BUTTON_REPEAT:
-                return false;
-                
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
-        }
-    }
-
-    settings_save();
-    lcd_setfont(FONT_UI);
-    if ( oldrepeat != global_settings.repeat_mode )
-        mpeg_flush_and_reload_tracks();
-
-    return false;
-}
-
-bool f3_screen(void)
-{
-    bool exit = false;
-    bool used = false;
-
-    lcd_setfont(FONT_SYSFIXED);
-
-    while (!exit) {
-        int w,h;
-        char* ptr;
-
-        ptr = str(LANG_F3_STATUS);
-        lcd_getstringsize(ptr,&w,&h);
-        lcd_clear_display();
-
-        lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_F3_SCROLL));
-        lcd_putsxy(0, LCD_HEIGHT/2 - h, str(LANG_F3_BAR));
-        lcd_putsxy(0, LCD_HEIGHT/2, 
-                   global_settings.scrollbar ? str(LANG_ON) : str(LANG_OFF));
-        lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], 
-                   LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
-
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr);
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F3_BAR));
-        lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, 
-                   global_settings.statusbar ? str(LANG_ON) : str(LANG_OFF));
-        lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], 
-                   LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
-
-        /* Invert */
-        lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, str(LANG_INVERT));
-        lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, 
-                   global_settings.invert ?
-                   str(LANG_INVERT_LCD_INVERSE) : str(LANG_INVERT_LCD_NORMAL));
-        lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
-                   LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
-
-        lcd_update();
-
-        switch (button_get(true)) {
-            case BUTTON_LEFT:
-            case BUTTON_F3 | BUTTON_LEFT:
-                global_settings.scrollbar = !global_settings.scrollbar;
-                used = true;
-                break;
-
-            case BUTTON_RIGHT:
-            case BUTTON_F3 | BUTTON_RIGHT:
-                global_settings.statusbar = !global_settings.statusbar;
-                used = true;
-                break;
-
-            case BUTTON_DOWN:
-            case BUTTON_F3 | BUTTON_DOWN:
-                global_settings.invert = !global_settings.invert;
-                lcd_set_invert_display(global_settings.invert);
-                used = true;
-                break;
-
-            case BUTTON_F3 | BUTTON_REL:
-                if ( used )
-                    exit = true;
-                used = true;
-                break;
-
-            case BUTTON_F3 | BUTTON_REPEAT:
-                used = true;
-                break;
-
-            case BUTTON_OFF | BUTTON_REPEAT:
-                return false;
-                
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
-        }
-    }
-
-    settings_save();
-    if (global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-    lcd_setfont(FONT_UI);
-
-    return false;
-}
-#endif
-
-#ifdef HAVE_LCD_BITMAP
-#define SPACE 3 /* pixels between words */
-#define MAXLETTERS 128 /* 16*8 */
-#define MAXLINES 10
-#else
 #define SPACE 1 /* one letter space */
 #undef LCD_WIDTH
-#define LCD_WIDTH 11
+#define LCD_WIDTH 20
 #undef LCD_HEIGHT
-#define LCD_HEIGHT 2
-#define MAXLETTERS 22 /* 11 * 2 */
-#define MAXLINES 2
-#endif
+#define LCD_HEIGHT 4
+#define MAXLETTERS 80 /* 11 * 2 */
+#define MAXLINES 4
 
 void splash(int ticks,   /* how long */
             int keymask, /* what keymask aborts the waiting (if any) */
@@ -671,15 +31,12 @@
     char *store=NULL;
     int x=0;
     int y=0;
-    int w, h;
+    int w, h=0;
     unsigned char splash_buf[MAXLETTERS];
     va_list ap;
     unsigned char widths[MAXLINES];
     int line=0;
     bool first=true;
-#ifdef HAVE_LCD_BITMAP
-    int maxw=0;
-#endif
 
     va_start( ap, fmt );
     vsnprintf( splash_buf, sizeof(splash_buf), fmt, ap );
@@ -689,12 +46,8 @@
         /* first a pass to measure sizes */
         next = strtok_r(splash_buf, " ", &store);
         while (next) {
-#ifdef HAVE_LCD_BITMAP
-            lcd_getstringsize(next, &w, &h);
-#else
             w = strlen(next);
             h = 1; /* store height in characters */
-#endif
             if(!first) {
                 if(x+w> LCD_WIDTH) {
                     /* Too wide, wrap */
@@ -715,21 +68,9 @@
 
             x += w+SPACE;
             widths[line]=x-SPACE; /* don't count the trailing space */
-#ifdef HAVE_LCD_BITMAP
-            /* store the widest line */
-            if(widths[line]>maxw)
-                maxw = widths[line];
-#endif
             next = strtok_r(NULL, " ", &store);
         }
-#ifdef HAVE_LCD_BITMAP
-        /* Start displaying the message at position y. The reason for the
-           added h here is that it isn't added until the end of lines in the
-           loop above and we always break the loop in the middle of a line. */
         y = (LCD_HEIGHT - (y+h) )/2;
-#else
-        y = 0; /* vertical center on 2 lines would be silly */
-#endif
         first=true;
 
         /* Now recreate the string again since the strtok_r() above has ruined
@@ -745,34 +86,12 @@
             x = 0;
     }
 
-#ifdef HAVE_LCD_BITMAP
-    /* If we center the display and it wouldn't cover the full screen,
-       then just clear the box we need and put a nice little frame and
-       put the text in there! */
-    if(center && (y > 2)) {
-        if(maxw < (LCD_WIDTH -4)) {
-            int xx = (LCD_WIDTH-maxw)/2 - 2;
-            lcd_clearrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
-            lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
-        }
-        else {
-            lcd_clearrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4);
-            lcd_drawline(0, y-2, LCD_WIDTH-1, y-2);
-            lcd_drawline(0, LCD_HEIGHT-y+2, LCD_WIDTH-1, LCD_HEIGHT-y+2);
-        }
-    }
-    else
-#endif
         lcd_clear_display();
     line=0;
     next = strtok_r(splash_buf, " ", &store);
     while (next) {
-#ifdef HAVE_LCD_BITMAP
-        lcd_getstringsize(next, &w, &h);
-#else
         w = strlen(next);
         h = 1;
-#endif
         if(!first) {
             if(x+w> LCD_WIDTH) {
                 /* too wide */
@@ -790,11 +109,7 @@
         }
         else
             first=false;
-#ifdef HAVE_LCD_BITMAP
-        lcd_putsxy(x, y, next);
-#else
         lcd_puts(x, y, next);
-#endif
         x += w+SPACE; /*  pixels space! */
         next = strtok_r(NULL, " ", &store);
     }
@@ -816,8 +131,21 @@
     }
 }
 
-void charging_splash(void)
+void display_field_value( int y, const char* field, const char* value )
 {
-    splash(2*HZ, 0, true, str(LANG_BATTERY_CHARGE));
-    while (button_get(false));
+  char buffer[24];
+  int flen = strlen(field) + 1;
+  int vlen = strlen(value);
+  
+  snprintf( buffer, sizeof(buffer), "%s:", field );
+  lcd_puts_fmt(0, y, buffer, FMT_LEFT|FMT_RPADDED);
+  
+  /* If value does not fit scroll it */
+  if( vlen > (20 - flen) )
+    lcd_puts_scroll(flen, y, value);
+  else
+    {
+      /* Else right align the value */
+      lcd_puts_fmt(0,y,value, FMT_RIGHT );
+    }
 }
diff -rubBP /home/dast/src/rockbox/apps/screens.h ./apps/screens.h
--- /home/dast/src/rockbox/apps/screens.h	Thu Dec  4 16:35:38 2003
+++ ./apps/screens.h	Mon Nov 24 03:55:53 2003
@@ -1,35 +1,6 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: screens.h,v 1.6 2003/12/04 00:08:25 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _SCREENS_H_
 #define _SCREENS_H_
 
-void usb_display_info(void);
-void usb_screen(void);
-int charging_screen(void);
-void charging_splash(void);
-
-#ifdef HAVE_RECORDER_KEYPAD
-int on_screen(void);
-bool f2_screen(void);
-bool f3_screen(void);
-#endif
-
 void splash(int ticks,  /* how long */
             int keymask,/* what keymask aborts the waiting (if any) */
             bool center, /* FALSE means left-justified, TRUE means
@@ -37,5 +8,6 @@
             char *fmt,  /* what to say *printf style */
             ...);
 
+void display_field_value( int y, const char* field, const char* value );
 #endif
 
diff -rubBP /home/dast/src/rockbox/apps/settings.c ./apps/settings.c
--- /home/dast/src/rockbox/apps/settings.c	Tue Dec  9 13:28:39 2003
+++ ./apps/settings.c	Fri Nov  7 07:55:00 2003
@@ -1,23 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: settings.c,v 1.177 2003/12/09 08:18:03 hardeeps Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- * RTC config saving code (C) 2002 by hessu@hes.iki.fi
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <stdio.h>
 #include "config.h"
 #include "kernel.h"
@@ -27,16 +7,12 @@
 #include "panic.h"
 #include "debug.h"
 #include "button.h"
-#include "usb.h"
-#include "backlight.h"
+#include "remote.h"
 #include "lcd.h"
 #include "mpeg.h"
 #include "string.h"
 #include "ata.h"
 #include "fat.h"
-#include "power.h"
-#include "backlight.h"
-#include "powermgmt.h"
 #include "status.h"
 #include "atoi.h"
 #include "screens.h"
@@ -45,119 +21,23 @@
 #include "errno.h"
 #include "system.h"
 #include "misc.h"
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "font.h"
-#include "peakmeter.h"
-#include "hwcompat.h"
-#endif
 #include "lang.h"
 #include "language.h"
 #include "wps-display.h"
-#include "powermgmt.h"
 #include "sprintf.h"
 #include "keyboard.h"
 #include "version.h"
-#ifdef HAVE_MAS3507D
-void dac_line_in(bool enable);
-#endif
+
 struct user_settings global_settings;
-char rockboxdir[] = ROCKBOX_DIR;       /* config/font/data file directory */
+char openneodir[] = OPENNEO_DIR;       /* config/font/data file directory */
 
-#define CONFIG_BLOCK_VERSION 8
+#define CONFIG_BLOCK_VERSION 1
 #define CONFIG_BLOCK_SIZE 512
-#define RTC_BLOCK_SIZE 44
 
-#ifdef HAVE_LCD_BITMAP
-#define MAX_LINES 10
-#else
-#define MAX_LINES 2
-#endif
-
-/********************************************
-
-Config block as saved on the battery-packed RTC user RAM memory block
-of 44 bytes, starting at offset 0x14 of the RTC memory space.
-
-offset  abs
-0x00    0x14    "Roc"   header signature: 0x52 0x6f 0x63
-0x03    0x17    <version byte: 0x0>
-0x04    0x18    <volume byte>
-0x05    0x19    <balance byte>
-0x06    0x1a    <bass byte>
-0x07    0x1b    <treble byte>
-0x08    0x1c    <loudness byte>
-0x09    0x1d    <bass boost byte>
-0x0a    0x1e    <contrast (bit 0-5), invert bit (bit 6), show_icons (bit 7)>
-0x0b    0x1f    <backlight_on_when_charging, invert_cursor, backlight_timeout>
-0x0c    0x20    <poweroff timer byte>
-0x0d    0x21    <resume settings byte>
-0x0e    0x22    <shuffle,dirfilter,sort_case,discharge,statusbar,show_hidden,
-                 scroll bar>
-0x0f    0x23    <volume type, battery type, timeformat, scroll speed>
-0x10    0x24    <ff/rewind min step, acceleration rate>
-0x11    0x25    <AVC, channel config>
-0x12    0x26    <(short) Resume playlist index, or -1 if no playlist resume>
-0x14    0x28    <(short) Resume playlist first index>
-0x16    0x2a    <(int) Byte offset into resume file>
-0x1a    0x2e    <time until disk spindown>
-0x1b    0x2f    <browse current, play selected, recursive dir insert>
-0x1c    0x30    <peak meter hold timeout (bit 0-4),
-                 rec_editable (bit 7)>
-0x1d    0x31    <(int) Resume shuffle seed, or -1 if no shuffle>
-0x21    0x35    <repeat mode (bit 0-1), rec. channels (bit 2),
-                 mic gain (bit 4-7)>
-0x22    0x36    <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)>
-0x23    0x37    <rec. left gain (bit 0-3)>
-0x24    0x38    <rec. right gain (bit 0-3)>
-0x25    0x39    <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3),
-                 Trickle charge flag (bit 4)>
-0x26    0x40    <runtime low byte>
-0x27    0x41    <runtime high byte>
-0x28    0x42    <topruntime low byte>
-0x29    0x43    <topruntime high byte>
-
-0x2a    <checksum 2 bytes: xor of 0x0-0x29>
-
-Config memory is reset to 0xff and initialized with 'factory defaults' if
-a valid header & checksum is not found. Config version number is only
-increased when information is _relocated_ or space is _reused_ so that old
-versions can read and modify configuration changed by new versions. New
-versions should check for the value of '0xff' in each config memory
-location used, and reset the setting in question with a factory default if
-needed. Memory locations not used by a given version should not be
-modified unless the header & checksum test fails.
-
-
-Rest of config block, only saved to disk:
-0xA8  (char)jump scroll mode (only for player)
-0xA9  (char)jump scroll delay (only for player)
-0xAA  Max number of files in playlist (1000-20000)
-0xAC  Max number of files in dir (50-10000)
-0xAE  fade on pause/unpause/stop setting (bit 0)
-      caption backlight (bit 1)
-      car adapter mode (bit 2)
-      line_in (Player only)  (bit 3)
-0xAF  [available/unused]
-0xB0  peak meter clip hold timeout (bit 0-4), peak meter performance (bit 7)
-0xB1  peak meter release step size, peak_meter_dbfs (bit 7)
-0xB2  peak meter min either in -db or in percent
-0xB3  peak meter max either in -db or in percent
-0xB4  battery capacity
-0xB5  scroll step in pixels
-0xB6  scroll start and endpoint delay
-0xB7  bidir scroll setting (bidi if 0-200% longer than screen width)
-0xB8  (char[20]) WPS file
-0xCC  (char[20]) Lang file
-0xE0  (char[20]) Font file
-0xF4  <unused>
-0xF8  <unused>
-0xFC  <unused>
+#define RTC_BLOCK_SIZE 44
 
-*************************************/
+#define MAX_LINES 4
 
-#include "rtc.h"
-long lasttime = 0;
 static unsigned char config_block[CONFIG_BLOCK_SIZE];
 
 /*
@@ -188,76 +68,60 @@
     /* reset to 0xff - all unused */
     memset(config_block, 0xff, CONFIG_BLOCK_SIZE);
     /* insert header */
-    config_block[0] = 'R';
-    config_block[1] = 'o';
-    config_block[2] = 'c';
+    config_block[0] = 'N';
+    config_block[1] = 'e';
+    config_block[2] = 'o';
     config_block[3] = CONFIG_BLOCK_VERSION;
 }
 
 /*
- * save the config block buffer to disk or RTC RAM
+ * save the config block buffer to disk
  */
 static int save_config_buffer( void )
 {
     unsigned short chksum;
-#ifdef HAVE_RTC
-    unsigned int i;
-#endif
+    ata_sectors_t sector;
 
-    DEBUGF( "save_config_buffer()\n" );
+//    DEBUGF( "save_config_buffer()\n" );
     
     /* update the checksum in the end of the block before saving */
     chksum = calculate_config_checksum(config_block);
     config_block[ RTC_BLOCK_SIZE - 2 ] = chksum >> 8;
     config_block[ RTC_BLOCK_SIZE - 1 ] = chksum & 0xff;
 
-#ifdef HAVE_RTC    
-    /* FIXME: okay, it _would_ be cleaner and faster to implement rtc_write so
-       that it would write a number of bytes at a time since the RTC chip
-       supports that, but this will have to do for now 8-) */
-    for (i=0; i < RTC_BLOCK_SIZE; i++ ) {
-        int r = rtc_write(0x14+i, config_block[i]);
-        if (r) {
-            DEBUGF( "save_config_buffer: rtc_write failed at addr 0x%02x: %d\n",
-                    14+i, r );
-            return r;
-        }
-    }
-
-#endif
-
+    memset(&sector,0,sizeof(sector));
+    sector.sector=61;
     if (fat_startsector() != 0)
-        ata_delayed_write( 61, config_block);
-    else
-        return -1;
+        ata_delayed_write( &sector, config_block);
+//    else
+//        return -1;
+//removed temp for nello...
 
     return 0;
 }
 
 /*
- * load the config block buffer from disk or RTC RAM
+ * load the config block buffer from disk
  */
 static int load_config_buffer( void )
 {
     unsigned short chksum;
     bool correct = false;
-
-#ifdef HAVE_RTC
-    unsigned int i;
-    unsigned char rtc_block[RTC_BLOCK_SIZE];
-#endif
+    ata_sectors_t sector;
     
     DEBUGF( "load_config_buffer()\n" );
 
+    memset(&sector,0,sizeof(sector));
+    sector.sector=61;
     if (fat_startsector() != 0) {
-        ata_read_sectors( 61, 1,  config_block);
+        ata_read_sectors( &sector, 1,  config_block);
 
         /* calculate the checksum, check it and the header */
         chksum = calculate_config_checksum(config_block);
         
-        if (config_block[0] == 'R' &&
-            config_block[1] == 'o' &&
-            config_block[2] == 'c' &&
+        if (config_block[0] == 'N' &&
+            config_block[1] == 'e' &&
+            config_block[2] == 'o' &&
             config_block[3] == CONFIG_BLOCK_VERSION &&
             (chksum >> 8) == config_block[RTC_BLOCK_SIZE - 2] &&
             (chksum & 0xff) == config_block[RTC_BLOCK_SIZE - 1])
@@ -267,26 +131,6 @@
         }
     }
 
-#ifdef HAVE_RTC    
-    /* read rtc block */
-    for (i=0; i < RTC_BLOCK_SIZE; i++ )
-        rtc_block[i] = rtc_read(0x14+i);
-
-    chksum = calculate_config_checksum(rtc_block);
-    
-    /* if rtc block is ok, use that */
-    if (rtc_block[0] == 'R' &&
-        rtc_block[1] == 'o' &&
-        rtc_block[2] == 'c' &&
-        rtc_block[3] == CONFIG_BLOCK_VERSION &&
-        (chksum >> 8) == rtc_block[RTC_BLOCK_SIZE - 2] &&
-        (chksum & 0xff) == rtc_block[RTC_BLOCK_SIZE - 1])
-    {
-        memcpy(config_block, rtc_block, RTC_BLOCK_SIZE);
-        correct = true;
-    }
-#endif
-    
     if ( !correct ) {
         /* if checksum is not valid, clear the config buffer */
         DEBUGF( "load_config_buffer: header & checksum test failed\n" );
@@ -298,14 +142,14 @@
 }
 
 /*
- * persist all runtime user settings to disk or RTC RAM
+ * persist all runtime user settings to disk
  */
 int settings_save( void )
 {
-    DEBUGF( "settings_save()\n" );
+//    DEBUGF( "settings_save()\n" );
     
     /* update the config block buffer with current
-       settings and save the block in the RTC */
+       settings and save the block */
     config_block[0x4] = (unsigned char)global_settings.volume;
     config_block[0x5] = (char)global_settings.balance;
     config_block[0x6] = (unsigned char)global_settings.bass;
@@ -313,23 +157,12 @@
     config_block[0x8] = (unsigned char)global_settings.loudness;
     config_block[0x9] = (unsigned char)global_settings.bass_boost;
     
-    config_block[0xa] = (unsigned char)
-      ((global_settings.contrast & 0x3f) |
-       (global_settings.invert ? 0x40 : 0) |
-       (global_settings.show_icons ? 0x80 : 0) );
-
-    config_block[0xb] = (unsigned char)
-        ((global_settings.backlight_on_when_charging?0x40:0) |
-         (global_settings.invert_cursor ? 0x20 : 0) |
-         (global_settings.backlight_timeout & 0x1f));
-    config_block[0xc] = (unsigned char)global_settings.poweroff;
     config_block[0xd] = (unsigned char)global_settings.resume;
     
     config_block[0xe] = (unsigned char)
         ((global_settings.playlist_shuffle & 1) |
          ((global_settings.dirfilter & 1) << 1) |
          ((global_settings.sort_case & 1) << 2) |
-         ((global_settings.discharge & 1) << 3) |
          ((global_settings.statusbar & 1) << 4) |
          ((global_settings.dirfilter & 2) << 4) |
          ((global_settings.scrollbar & 1) << 6));
@@ -348,12 +181,11 @@
         ((global_settings.avc & 0x03) | 
          ((global_settings.channel_config & 0x07) << 2));
 
-    memcpy(&config_block[0x12], &global_settings.resume_index, 2);
-    memcpy(&config_block[0x14], &global_settings.resume_first_index, 2);
+    memcpy(&config_block[0x12], &global_settings.resume_index, 4);
     memcpy(&config_block[0x16], &global_settings.resume_offset, 4);
-    DEBUGF( "+Resume index %X offset %X\n",
-            global_settings.resume_index,
-            global_settings.resume_offset );
+//    DEBUGF( "+Resume index %X offset %X\n",
+//            global_settings.resume_index,
+//            global_settings.resume_offset );
 
     config_block[0x1a] = (unsigned char)global_settings.disk_spindown;
     config_block[0x1b] = (unsigned char)
@@ -361,46 +193,14 @@
          ((global_settings.play_selected & 1) << 1) |
          ((global_settings.recursive_dir_insert & 3) << 2));
     
-    config_block[0x1c] = (unsigned char)global_settings.peak_meter_hold |
-        (global_settings.rec_editable?0x80:0);
-
-    memcpy(&config_block[0x1d], &global_settings.resume_seed, 4);
-
     config_block[0x21] = (unsigned char)
-        ((global_settings.repeat_mode & 3) |
-         ((global_settings.rec_channels & 1) << 2) |
-         ((global_settings.rec_mic_gain & 0x0f) << 4));
-    config_block[0x22] = (unsigned char)
-        ((global_settings.rec_quality & 7) |
-         ((global_settings.rec_source & 3) << 3) |
-         ((global_settings.rec_frequency & 7) << 5));
-    config_block[0x23] = (unsigned char)global_settings.rec_left_gain;
-    config_block[0x24] = (unsigned char)global_settings.rec_right_gain;
+        ((global_settings.repeat_mode & 3));
     config_block[0x25] = (unsigned char)
         ((global_settings.disk_poweroff & 1) |
-         ((global_settings.buffer_margin & 7) << 1) |
-         ((global_settings.trickle_charge & 1) << 4));
-
-    {
-        int elapsed_secs;
-
-        elapsed_secs = (current_tick - lasttime) / HZ;
-        global_settings.runtime += elapsed_secs;
-        lasttime += (elapsed_secs * HZ);
-
-        if ( global_settings.runtime > global_settings.topruntime )
-            global_settings.topruntime = global_settings.runtime;
+         ((global_settings.buffer_margin & 7) << 1));
 
-        config_block[0x26]=(unsigned char)(global_settings.runtime & 0xff);
-        config_block[0x27]=(unsigned char)(global_settings.runtime >> 8);
-        config_block[0x28]=(unsigned char)(global_settings.topruntime & 0xff);
-        config_block[0x29]=(unsigned char)(global_settings.topruntime >> 8);
-    }
-    
-#ifdef HAVE_LCD_CHARCELLS
     config_block[0xa8]=(unsigned char)global_settings.jump_scroll;
     config_block[0xa9]=(unsigned char)global_settings.jump_scroll_delay;
-#endif
     config_block[0xaa] = (unsigned char)
         global_settings.max_files_in_playlist & 0xff;
     config_block[0xab] = (unsigned char)
@@ -410,72 +210,28 @@
     config_block[0xad] = (unsigned char)
         (global_settings.max_files_in_dir >> 8) & 0xff;
     config_block[0xae] = (unsigned char)
-        ((global_settings.fade_on_stop & 1) |
-         ((global_settings.caption_backlight & 1) << 1) |
-         ((global_settings.car_adapter_mode  & 1) << 2) |
-         ((global_settings.line_in & 1) << 3));
-    config_block[0xb0] = (unsigned char)global_settings.peak_meter_clip_hold |
-        (global_settings.peak_meter_performance ? 0x80 : 0);
-    config_block[0xb1] = global_settings.peak_meter_release |
-        (global_settings.peak_meter_dbfs ? 0x80 : 0);
-    config_block[0xb2] = (unsigned char)global_settings.peak_meter_min;
-    config_block[0xb3] = (unsigned char)global_settings.peak_meter_max;
+        ((global_settings.fade_on_stop & 1));
 
-    config_block[0xb4]=(global_settings.battery_capacity - 1000) / 50;
     config_block[0xb5]=(unsigned char)global_settings.scroll_step;
     config_block[0xb6]=(unsigned char)global_settings.scroll_delay;
     config_block[0xb7]=(unsigned char)global_settings.bidir_limit;
 
     strncpy(&config_block[0xb8], global_settings.wps_file, MAX_FILENAME);
     strncpy(&config_block[0xcc], global_settings.lang_file, MAX_FILENAME);
-    strncpy(&config_block[0xe0], global_settings.font_file, MAX_FILENAME);
+
+    config_block[0xe0] = (unsigned char)
+        ((global_settings.use_volume_slider & 1));
 
     if(save_config_buffer())
     {
         lcd_clear_display();
-#ifdef HAVE_LCD_CHARCELLS
-        lcd_puts(0, 0, str(LANG_SETTINGS_SAVE_PLAYER));
-        lcd_puts(0, 1, str(LANG_SETTINGS_BATTERY_PLAYER));
-#else
-        lcd_puts(4, 2, str(LANG_SETTINGS_SAVE_RECORDER));
-        lcd_puts(2, 4, str(LANG_SETTINGS_BATTERY_RECORDER));
-        lcd_update();
-#endif
+        lcd_puts_fmt(0, 0, str(LANG_SETTINGS_SAVE_PLAYER),FMT_CENTER);
         sleep(HZ*2);
         return -1;
     }
     return 0;
 }
 
-#ifdef HAVE_LCD_BITMAP
-/**
- * Applies the range infos stored in global_settings to 
- * the peak meter. 
- */
-void settings_apply_pm_range(void)
-{
-    int pm_min, pm_max;
-
-    /* depending on the scale mode (dBfs or percent) the values
-       of global_settings.peak_meter_dbfs have different meanings */
-    if (global_settings.peak_meter_dbfs) 
-    {
-        /* convert to dBfs * 100          */
-        pm_min = -(((int)global_settings.peak_meter_min) * 100);
-        pm_max = -(((int)global_settings.peak_meter_max) * 100);
-    }
-    else 
-    {
-        /* percent is stored directly -> no conversion */
-        pm_min = global_settings.peak_meter_min;
-        pm_max = global_settings.peak_meter_max;
-    }
-
-    /* apply the range */
-    peak_meter_init_range(global_settings.peak_meter_dbfs, pm_min, pm_max);
-}
-#endif /* HAVE_LCD_BITMAP */
-
 void settings_apply(void)
 {
     char buf[64];
@@ -485,82 +241,34 @@
     mpeg_sound_set(SOUND_BALANCE, global_settings.balance);
     mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
     mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config);
-#ifdef HAVE_MAS3587F
-    mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness);
-    mpeg_sound_set(SOUND_SUPERBASS, global_settings.bass_boost);
-    mpeg_sound_set(SOUND_AVC, global_settings.avc);
-#endif
-
-    mpeg_set_buffer_margin(global_settings.buffer_margin);
     
-    lcd_set_contrast(global_settings.contrast);
     lcd_scroll_speed(global_settings.scroll_speed);
-    backlight_set_timeout(global_settings.backlight_timeout);
-    backlight_set_on_when_charging(global_settings.backlight_on_when_charging);
     ata_spindown(global_settings.disk_spindown);
-#ifdef HAVE_MAS3507D
-    dac_line_in(global_settings.line_in);
-#endif
-#ifdef HAVE_ATA_POWER_OFF
-    ata_poweroff(global_settings.disk_poweroff);
-#endif
-
-    set_poweroff_timeout(global_settings.poweroff);
-#ifdef HAVE_CHARGE_CTRL
-    charge_restart_level = global_settings.discharge ? 
-        CHARGE_RESTART_LO : CHARGE_RESTART_HI;
-    enable_trickle_charge(global_settings.trickle_charge);
-#endif
-
-    set_battery_capacity(global_settings.battery_capacity);
-
-#ifdef HAVE_LCD_BITMAP
-    lcd_set_invert_display(global_settings.invert);
-    settings_apply_pm_range();
-    peak_meter_init_times(
-        global_settings.peak_meter_release, global_settings.peak_meter_hold, 
-        global_settings.peak_meter_clip_hold);
-#endif
 
     if ( global_settings.wps_file[0] && 
          global_settings.wps_file[0] != 0xff ) {
-        snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.wps",
+        snprintf(buf, sizeof buf, OPENNEO_DIR "/%s.wps",
                  global_settings.wps_file);
         wps_load(buf, false);
     }
     else
         wps_reset();
 
-#ifdef HAVE_LCD_BITMAP
-    if ( global_settings.font_file[0] &&
-         global_settings.font_file[0] != 0xff ) {
-        snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.fnt",
-                 global_settings.font_file);
-        font_load(buf);
-    }
-    else
-        font_reset();
-
-    lcd_scroll_step(global_settings.scroll_step);
-#else
     lcd_jump_scroll(global_settings.jump_scroll);
     lcd_jump_scroll_delay(global_settings.jump_scroll_delay * (HZ/10));
-#endif
     lcd_bidir_scroll(global_settings.bidir_limit);
     lcd_scroll_delay(global_settings.scroll_delay * (HZ/10));
 
     if ( global_settings.lang_file[0] &&
          global_settings.lang_file[0] != 0xff ) {
-        snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.lng",
+        snprintf(buf, sizeof buf, OPENNEO_DIR "/%s.lng",
                  global_settings.lang_file);
         lang_load(buf);
     }
-
-    set_car_adapter_mode(global_settings.car_adapter_mode);
 }
 
 /*
- * load settings from disk or RTC RAM
+ * load settings from disk
  */
 void settings_load(void)
 {
@@ -586,34 +294,12 @@
         if (config_block[0x9] != 0xFF)
             global_settings.bass_boost = config_block[0x9];
     
-        if (config_block[0xa] != 0xFF) {
-            global_settings.contrast = config_block[0xa] & 0x3f;
-            global_settings.invert =
-                config_block[0xa] & 0x40 ? true : false;
-            if ( global_settings.contrast < MIN_CONTRAST_SETTING )
-                global_settings.contrast = lcd_default_contrast();
-            global_settings.show_icons =
-                config_block[0xa] & 0x80 ? true : false;
-        }
-
-        if (config_block[0xb] != 0xFF) {
-            /* Bit 7 is unused to be able to detect uninitialized entry */
-            global_settings.backlight_timeout = config_block[0xb] & 0x1f;
-            global_settings.invert_cursor =
-                config_block[0xb] & 0x20 ? true : false;
-            global_settings.backlight_on_when_charging =
-                config_block[0xb] & 0x40 ? true : false;
-        }
-
-        if (config_block[0xc] != 0xFF)
-            global_settings.poweroff = config_block[0xc];
         if (config_block[0xd] != 0xFF)
             global_settings.resume = config_block[0xd];
         if (config_block[0xe] != 0xFF) {
             global_settings.playlist_shuffle = config_block[0xe] & 1;
             global_settings.dirfilter = (config_block[0xe] >> 1) & 1;
             global_settings.sort_case = (config_block[0xe] >> 2) & 1;
-            global_settings.discharge = (config_block[0xe] >> 3) & 1;
             global_settings.statusbar = (config_block[0xe] >> 4) & 1;
             global_settings.dirfilter |= ((config_block[0xe] >> 5) & 1) << 1;
             global_settings.scrollbar = (config_block[0xe] >> 6) & 1;
@@ -640,10 +326,7 @@
         }
 
         if (config_block[0x12] != 0xFF)
-            memcpy(&global_settings.resume_index, &config_block[0x12], 2);
-
-        if (config_block[0x14] != 0xFF)
-            memcpy(&global_settings.resume_first_index, &config_block[0x14], 2);
+            memcpy(&global_settings.resume_index, &config_block[0x12], 4);
 
         if (config_block[0x16] != 0xFF)
             memcpy(&global_settings.resume_offset, &config_block[0x16], 4);
@@ -658,77 +341,21 @@
                 (config_block[0x1b] >> 2) & 3;
         }
 
-        if (config_block[0x1c] != 0xFF) {
-            global_settings.peak_meter_hold = (config_block[0x1c]) & 0x1f;
-            global_settings.rec_editable =
-                (config_block[0x1c] & 0x80)?true:false;
-        }
-
-        if (config_block[0x1d] != 0xFF)
-            memcpy(&global_settings.resume_seed, &config_block[0x1d], 4);
-
         if (config_block[0x21] != 0xFF)
         {
             global_settings.repeat_mode = config_block[0x21] & 3;
-            global_settings.rec_channels = (config_block[0x21] >> 2) & 1;
-            global_settings.rec_mic_gain = (config_block[0x21] >> 4) & 0x0f;
-        }
-
-        if (config_block[0x22] != 0xFF)
-        {
-            global_settings.rec_quality = config_block[0x22] & 7;
-            global_settings.rec_source = (config_block[0x22] >> 3) & 3;
-            global_settings.rec_frequency = (config_block[0x22] >> 5) & 7;
         }
 
-        if (config_block[0x23] != 0xFF)
-            global_settings.rec_left_gain = config_block[0x23] & 0x0f;
-
-        if (config_block[0x24] != 0xFF)
-            global_settings.rec_right_gain = config_block[0x24] & 0x0f;
-
         if (config_block[0x25] != 0xFF)
         {
             global_settings.disk_poweroff = config_block[0x25] & 1;
             global_settings.buffer_margin = (config_block[0x25] >> 1) & 7;
-            global_settings.trickle_charge = (config_block[0x25] >> 4) & 1;
         }
 
-        if (config_block[0x27] != 0xff)
-            global_settings.runtime = 
-                config_block[0x26] | (config_block[0x27] << 8);
-
-        if (config_block[0x29] != 0xff)
-            global_settings.topruntime =
-                config_block[0x28] | (config_block[0x29] << 8);
-
         if (config_block[0xae] != 0xff) {
             global_settings.fade_on_stop = config_block[0xae] & 1;
-            global_settings.caption_backlight = (config_block[0xae] >> 1) & 1;
-            global_settings.car_adapter_mode  = (config_block[0xae] >> 2) & 1;
-            global_settings.line_in = (config_block[0xae] >> 3) & 1;
         }
 
-        if(config_block[0xb0] != 0xff) {
-            global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f;
-            global_settings.peak_meter_performance = 
-                (config_block[0xb0] & 0x80) != 0;
-        }
-
-        if(config_block[0xb1] != 0xff) {
-            global_settings.peak_meter_release = config_block[0xb1] & 0x7f;
-            global_settings.peak_meter_dbfs = (config_block[0xb1] & 0x80) != 0;
-        }
-
-        if(config_block[0xb2] != 0xff)
-            global_settings.peak_meter_min = config_block[0xb2];
-        
-        if(config_block[0xb3] != 0xff)
-            global_settings.peak_meter_max = config_block[0xb3];
-
-        if(config_block[0xb4] != 0xff)
-            global_settings.battery_capacity = config_block[0xb4]*50 + 1000;
-
         if (config_block[0xb5] != 0xff)
             global_settings.scroll_step = config_block[0xb5];
 
@@ -748,13 +375,13 @@
 
         strncpy(global_settings.wps_file, &config_block[0xb8], MAX_FILENAME);
         strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME);
-        strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME);
-#ifdef HAVE_LCD_CHARCELLS
         if (config_block[0xa8] != 0xff)
             global_settings.jump_scroll = config_block[0xa8];
         if (config_block[0xa9] != 0xff)
             global_settings.jump_scroll_delay = config_block[0xa9];
-#endif
+	
+	if (config_block[0xe0] != 0xff)
+            global_settings.use_volume_slider = config_block[0xe0];
     }
 
     settings_apply();
@@ -813,7 +440,7 @@
         ptr--;
     }
         
-    if (strcmp(ROCKBOX_DIR, filename) || (len-extlen > maxlen))
+    if (strcmp(OPENNEO_DIR, filename) || (len-extlen > maxlen))
         return;
         
     strncpy(setting, fptr, len-extlen);
@@ -837,11 +464,9 @@
     *setting = num;
     mpeg_sound_set(type, num);
 
-#ifdef HAVE_MAS3507D
     /* This is required to actually apply balance */
     if (SOUND_BALANCE == type)
         mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
-#endif
 }
 
 static void set_cfg_bool(bool* variable, char* value)
@@ -919,64 +544,6 @@
         }
         else if (!strcasecmp(name, "bidir limit"))
             set_cfg_int(&global_settings.bidir_limit, value, 0, 200);
-#ifdef HAVE_LCD_BITMAP
-        else if (!strcasecmp(name, "font")) {
-            if (font_load(value))
-                set_file(value, global_settings.font_file, MAX_FILENAME);
-        }
-        else if (!strcasecmp(name, "scroll step"))
-            set_cfg_int(&global_settings.scroll_step, value, 1, LCD_WIDTH);
-        else if (!strcasecmp(name, "statusbar"))
-            set_cfg_bool(&global_settings.statusbar, value);
-        else if (!strcasecmp(name, "peak meter release"))
-            set_cfg_int(&global_settings.peak_meter_release, value, 1, 0x7e);
-        else if (!strcasecmp(name, "peak meter hold")) {
-            static char* options[] = {
-                "off","200ms","300ms","500ms",
-                "1","2","3","4","5","6","7","8","9","10",
-                "15","20","30","1min"};
-            set_cfg_option(&global_settings.peak_meter_hold, value,
-                           options, 18);
-        }
-        else if (!strcasecmp(name, "peak meter clip hold")) {
-            static char* options[] = {
-                "on","1","2","3","4","5","6","7","8","9","10",
-                "15","20","25","30","45","60","90",
-                "2min","3min","5min","10min","20min","45min","90min"};
-            set_cfg_option(&global_settings.peak_meter_clip_hold, value,
-                           options, 25);
-        }
-        else if (!strcasecmp(name, "peak meter dbfs"))
-            set_cfg_bool(&global_settings.peak_meter_dbfs, value);
-        else if (!strcasecmp(name, "peak meter min"))
-            set_cfg_int(&global_settings.peak_meter_min, value, 0, 100);
-        else if (!strcasecmp(name, "peak meter max"))
-            set_cfg_int(&global_settings.peak_meter_max, value, 0, 100);
-        else if (!strcasecmp(name, "peak meter busy"))
-            set_cfg_bool(&global_settings.peak_meter_performance, value);
-        else if (!strcasecmp(name, "volume display")) {
-            static char* options[] = {"graphic", "numeric"};
-            set_cfg_option(&global_settings.volume_type, value, options, 2);
-        }
-        else if (!strcasecmp(name, "battery display")) {
-            static char* options[] = {"graphic", "numeric"};
-            set_cfg_option(&global_settings.battery_type, value, options, 2);
-        }
-        else if (!strcasecmp(name, "time format")) {
-            static char* options[] = {"24hour", "12hour"};
-            set_cfg_option(&global_settings.timeformat, value, options, 2);
-        }
-        else if (!strcasecmp(name, "scrollbar"))
-            set_cfg_bool(&global_settings.scrollbar, value);
-        else if (!strcasecmp(name, "invert"))
-            set_cfg_bool(&global_settings.invert, value);
-        else if (!strcasecmp(name, "invert cursor"))
-            set_cfg_bool(&global_settings.invert_cursor, value);
-        else if (!strcasecmp(name, "show icons"))
-            set_cfg_bool(&global_settings.show_icons, value);
-#endif
-        else if (!strcasecmp(name, "caption backlight"))
-            set_cfg_bool(&global_settings.caption_backlight, value);
         else if (!strcasecmp(name, "shuffle"))
             set_cfg_bool(&global_settings.playlist_shuffle, value);
         else if (!strcasecmp(name, "repeat")) {
@@ -997,9 +564,6 @@
             set_cfg_bool(&global_settings.browse_current, value);
         else if (!strcasecmp(name, "play selected"))
             set_cfg_bool(&global_settings.play_selected, value);
-        else if (!strcasecmp(name, "contrast"))
-            set_cfg_int(&global_settings.contrast, value,
-                        MIN_CONTRAST_SETTING, MAX_CONTRAST_SETTING);
         else if (!strcasecmp(name, "scroll speed"))
             set_cfg_int(&global_settings.scroll_speed, value, 1, 10);
         else if (!strcasecmp(name, "scan min step")) {
@@ -1013,84 +577,10 @@
             set_cfg_int(&global_settings.ff_rewind_accel, value, 0, 15);
         else if (!strcasecmp(name, "scroll delay"))
             set_cfg_int(&global_settings.scroll_delay, value, 0, 250);
-        else if (!strcasecmp(name, "backlight timeout")) {
-            static char* options[] = {
-                "off","on","1","2","3","4","5","6","7","8","9",
-                "10","15","20","25","30","45","60","90"};
-            set_cfg_option(&global_settings.backlight_timeout, value,
-                           options, 19);
-        }
-        else if (!strcasecmp(name, "backlight when plugged"))
-            set_cfg_bool(&global_settings.backlight_on_when_charging, value);
         else if (!strcasecmp(name, "antiskip"))
             set_cfg_int(&global_settings.buffer_margin, value, 0, 7);
         else if (!strcasecmp(name, "disk spindown"))
             set_cfg_int(&global_settings.disk_spindown, value, 3, 254);
-#ifdef HAVE_ATA_POWER_OFF
-        else if (!strcasecmp(name, "disk poweroff"))
-            set_cfg_bool(&global_settings.disk_poweroff, value);
-#endif
-#ifdef HAVE_MAS3587F
-        else if (!strcasecmp(name, "loudness"))
-            set_sound(value, SOUND_LOUDNESS, &global_settings.loudness);
-        else if (!strcasecmp(name, "bass boost"))
-            set_sound(value, SOUND_SUPERBASS, &global_settings.bass_boost);
-        else if (!strcasecmp(name, "auto volume")) {
-            static char* options[] = {"off", "2", "4", "8" };
-            set_cfg_option(&global_settings.avc, value, options, 4);
-        }
-        else if (!strcasecmp(name, "rec mic gain"))
-            set_sound(value, SOUND_MIC_GAIN, &global_settings.rec_mic_gain);
-        else if (!strcasecmp(name, "rec left gain"))
-            set_sound(value, SOUND_LEFT_GAIN, &global_settings.rec_left_gain);
-        else if (!strcasecmp(name, "rec right gain"))
-            set_sound(value, SOUND_RIGHT_GAIN, &global_settings.rec_right_gain);
-        else if (!strcasecmp(name, "rec quality"))
-            set_cfg_int(&global_settings.rec_quality, value, 0, 7);
-        else if (!strcasecmp(name, "rec timesplit")){
-            static char* options[] = {"off", "00:05","00:10","00:15",
-                                      "00:30","01:00","02:00","04:00",
-                                      "06:00","08:00","10:00","12:00",
-                                      "18:00","24:00"};
-            set_cfg_option(&global_settings.rec_timesplit, value, 
-                           options, 14);
-        }
-        else if (!strcasecmp(name, "rec source")) {
-            static char* options[] = {"mic", "line", "spdif"};
-            set_cfg_option(&global_settings.rec_source, value, options, 3); 
-        }
-        else if (!strcasecmp(name, "rec frequency")) {
-            static char* options[] = {"44", "48", "32", "22", "24", "16"};
-            set_cfg_option(&global_settings.rec_frequency, value, options, 6);
-        }
-        else if (!strcasecmp(name, "rec channels")) {
-            static char* options[] = {"stereo", "mono"};
-            set_cfg_option(&global_settings.rec_channels, value, options, 2);
-        }
-        else if (!strcasecmp(name, "editable recordings")) {
-            set_cfg_bool(&global_settings.rec_editable, value);
-        }
-#endif
-        else if (!strcasecmp(name, "idle poweroff")) {
-            static char* options[] = {"off","1","2","3","4","5","6","7","8",
-                                      "9","10","15","30","45","60"};
-            set_cfg_option(&global_settings.poweroff, value, options, 15);
-        }
-#ifdef HAVE_MAS3507D
-        else if (!strcasecmp(name, "line in")){
-            set_cfg_bool(&global_settings.line_in, value);
-	    dac_line_in(global_settings.line_in);
-	}
-#endif
-        else if (!strcasecmp(name, "battery capacity"))
-            set_cfg_int(&global_settings.battery_capacity, value,
-                        1500, BATTERY_CAPACITY_MAX);
-#ifdef HAVE_CHARGE_CTRL
-        else if (!strcasecmp(name, "deep discharge"))
-            set_cfg_bool(&global_settings.discharge, value);
-        else if (!strcasecmp(name, "trickle charge"))
-            set_cfg_bool(&global_settings.trickle_charge, value);
-#endif
         else if (!strcasecmp(name, "volume fade"))
             set_cfg_bool(&global_settings.fade_on_stop, value);
         else if (!strcasecmp(name, "max files in dir"))
@@ -1099,13 +589,14 @@
         else if (!strcasecmp(name, "max files in playlist"))
             set_cfg_int(&global_settings.max_files_in_playlist, value,
                         1000, 20000);
-        else if (!strcasecmp(name, "car adapter mode"))
-            set_cfg_bool(&global_settings.car_adapter_mode, value);
         else if (!strcasecmp(name, "recursive directory insert")) {
             static char* options[] = {"off", "on", "ask"};
             set_cfg_option(&global_settings.recursive_dir_insert, value,
                 options, 3);
         }
+	else if (!strcasecmp(name, "volume slider")) {
+	  set_cfg_bool(&global_settings.use_volume_slider, value);
+	}
     }
 
     close(fd);
@@ -1124,7 +615,7 @@
 
     /* find unused filename */
     for (i=0; ; i++) {
-        snprintf(filename, sizeof filename, ROCKBOX_DIR "/config%02d.cfg", i);
+        snprintf(filename, sizeof filename, OPENNEO_DIR "/config%02d.cfg", i);
         fd = open(filename, O_RDONLY);
         if (fd < 0)
             break;
@@ -1157,24 +648,18 @@
         return false;
     }
 
-    fprintf(fd, "# >>> .cfg file created by rockbox %s <<<\r\n", appsversion);
-    fprintf(fd, "# >>>    http://rockbox.haxx.se    <<<\r\n#\r\n");
+    fprintf(fd, "# >>> .cfg file created by Open Neo %s     <<<\r\n", appsversion);
+    fprintf(fd, "# >>>    http://www.ssiamerica.com/open    <<<\r\n#\r\n");
     fprintf(fd, "#\r\n# wps / language / font \r\n#\r\n");
 
     if (global_settings.wps_file[0] != 0)
-        fprintf(fd, "wps: %s/%s.wps\r\n", ROCKBOX_DIR,
+        fprintf(fd, "wps: %s/%s.wps\r\n", OPENNEO_DIR,
                 global_settings.wps_file);
 
     if (global_settings.lang_file[0] != 0)
-        fprintf(fd, "lang: %s/%s.lng\r\n", ROCKBOX_DIR, 
+        fprintf(fd, "lang: %s/%s.lng\r\n", OPENNEO_DIR, 
                 global_settings.lang_file);
 
-#ifdef HAVE_LCD_BITMAP
-    if (global_settings.font_file[0] != 0)
-        fprintf(fd, "font: %s/%s.fnt\r\n", ROCKBOX_DIR,
-                global_settings.font_file);
-#endif
-
     fprintf(fd, "#\r\n# Sound settings\r\n#\r\n");
 
     value = mpeg_val2phys(SOUND_VOLUME, global_settings.volume);
@@ -1197,19 +682,6 @@
                 options[global_settings.channel_config]);
     }
 
-#ifdef HAVE_MAS3587F
-    value = mpeg_val2phys(SOUND_LOUDNESS, global_settings.loudness);
-    fprintf(fd, "loudness: %d\r\n", value);
-
-    value = mpeg_val2phys(SOUND_SUPERBASS, global_settings.bass_boost);
-    fprintf(fd, "bass boost: %d\r\n", value);
-
-    {
-        static char* options[] = {"off", "2", "4", "8" };
-        fprintf(fd, "auto volume: %s\r\n", options[global_settings.avc]);
-    }
-#endif
-
     fprintf(fd, "#\r\n# Playback\r\n#\r\n");
     fprintf(fd, "shuffle: %s\r\n", boolopt[global_settings.playlist_shuffle]);
 
@@ -1251,155 +723,15 @@
 
     fprintf(fd, "#\r\n# Display\r\n#\r\n");
     
-#ifdef HAVE_LCD_BITMAP
-    fprintf(fd, "statusbar: %s\r\nscrollbar: %s\r\n",
-            boolopt[global_settings.statusbar],
-            boolopt[global_settings.scrollbar]);
-
-    {
-        static char* options[] = {"graphic", "numeric"};
-        fprintf(fd, "volume display: %s\r\nbattery display: %s\r\n",
-                options[global_settings.volume_type],
-                options[global_settings.battery_type]);
-    }
-#endif
-
     fprintf(fd, "scroll speed: %d\r\nscroll delay: %d\r\n",
              global_settings.scroll_speed,
              global_settings.scroll_delay);
 
-#ifdef HAVE_LCD_BITMAP
-    fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step);
-#else
     fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll);
     fprintf(fd, "jump scroll delay: %d\r\n", global_settings.jump_scroll_delay);
-#endif
 
     fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit);
 
-    {
-        static char* options[] =
-        {"off","on","1","2","3","4","5","6","7","8","9",
-         "10","15","20","25","30","45","60","90"};
-        fprintf(fd, "backlight timeout: %s\r\n",
-                 options[global_settings.backlight_timeout]);
-    }
-
-    fprintf(fd, "backlight when plugged: %s\r\n",
-            boolopt[global_settings.backlight_on_when_charging]);
-
-    fprintf(fd, "caption backlight: %s\r\n",
-            boolopt[global_settings.caption_backlight]);
-    fprintf(fd, "contrast: %d\r\n", global_settings.contrast);
-
-#ifdef HAVE_LCD_BITMAP
-    fprintf(fd, "invert: %s\r\n", boolopt[global_settings.invert]);
-    
-    fprintf(fd, "invert cursor: %s\r\n",
-            boolopt[global_settings.invert_cursor]);
-
-    fprintf(fd, "show icons: %s\r\n",
-            boolopt[global_settings.show_icons]);
-
-    fprintf(fd, "peak meter release: %d\r\n",
-            global_settings.peak_meter_release);
-
-    {
-        static char* options[] =
-        {"off","200ms","300ms","500ms","1","2","3","4","5",
-         "6","7","8","9","10","15","20","30","1min"};
-        fprintf(fd, "peak meter hold: %s\r\n",
-                options[global_settings.peak_meter_hold]);
-    }
-
-    {
-        static char* options[] =
-        {"on","1","2","3","4","5","6","7","8","9","10","15","20","25","30",
-         "45","60","90","2min","3min","5min","10min","20min","45min","90min"};
-        fprintf(fd, "peak meter clip hold: %s\r\n",
-                options[global_settings.peak_meter_clip_hold]);
-    }
-
-    fprintf(fd, "peak meter busy: %s\r\npeak meter dbfs: %s\r\n",
-            boolopt[global_settings.peak_meter_performance],
-            boolopt[global_settings.peak_meter_dbfs]);
-
-    fprintf(fd, "peak meter min: %d\r\npeak meter max: %d\r\n",
-            global_settings.peak_meter_min,
-            global_settings.peak_meter_max);
-#endif
-
-    fprintf(fd, "#\r\n# System\r\n#\r\ndisk spindown: %d\r\n",
-             global_settings.disk_spindown);
-
-#ifdef HAVE_ATA_POWER_OFF
-    fprintf(fd, "disk poweroff: %s\r\n",
-            boolopt[global_settings.disk_poweroff]);
-#endif
-
-    fprintf(fd, "battery capacity: %d\r\n", global_settings.battery_capacity);
-
-#ifdef HAVE_CHARGE_CTRL
-    fprintf(fd, "deep discharge: %s\r\ntrickle charge: %s\r\n",
-            boolopt[global_settings.discharge],
-            boolopt[global_settings.trickle_charge]);
-#endif
-
-#ifdef HAVE_LCD_BITMAP
-    {
-        static char* options[] = {"24hour", "12hour"};
-        fprintf(fd, "time format: %s\r\n",
-                options[global_settings.timeformat]);
-    }
-#endif
-
-    {
-        static char* options[] =
-        {"off","1","2","3","4","5","6","7","8",
-         "9","10","15","30","45","60"};
-        fprintf(fd, "idle poweroff: %s\r\n",
-                options[global_settings.poweroff]);
-    }
-
-    fprintf(fd, "car adapter mode: %s\r\n",
-            boolopt[global_settings.car_adapter_mode]);
-
-#ifdef HAVE_MAS3507D
-    fprintf(fd, "line in: %s\r\n", boolopt[global_settings.line_in]);
-#endif
-
-#ifdef HAVE_MAS3587F
-    fprintf(fd, "#\r\n# Recording\r\n#\r\n");
-    fprintf(fd, "rec quality: %d\r\n", global_settings.rec_quality);
-    
-    {
-        static char* options[] = {"44", "48", "32", "22", "24", "16"};
-        fprintf(fd, "rec frequency: %s\r\n",
-                options[global_settings.rec_frequency]);
-    }
-
-    {
-        static char* options[] = {"mic", "line", "spdif"};
-        fprintf(fd, "rec source: %s\r\n", options[global_settings.rec_source]);
-    }
-
-    {
-        static char* options[] = {"stereo", "mono"};
-        fprintf(fd, "rec channels: %s\r\n",
-                options[global_settings.rec_channels]);
-    }
-
-    fprintf(fd,
-            "rec mic gain: %d\r\nrec left gain: %d\r\nrec right gain: %d\r\n",
-            global_settings.rec_mic_gain,
-            global_settings.rec_left_gain,
-            global_settings.rec_right_gain);
-
-    fprintf(fd, "editable recordings: %s\r\n",
-            boolopt[global_settings.rec_editable]);
-
-#endif
-
     fprintf(fd, "max files in dir: %d\r\n", global_settings.max_files_in_dir);
     fprintf(fd, "max files in playlist: %d\r\n",
             global_settings.max_files_in_playlist);
@@ -1410,6 +742,9 @@
                 options[global_settings.recursive_dir_insert]);
     }
 
+    fprintf(fd, "volume slider: %s\r\n", boolopt[global_settings.use_volume_slider]);
+ 
+
     close(fd);
 
     lcd_clear_display();
@@ -1435,77 +770,35 @@
     global_settings.bass_boost  = mpeg_sound_default(SOUND_SUPERBASS);
     global_settings.avc         = mpeg_sound_default(SOUND_AVC);
     global_settings.channel_config = mpeg_sound_default(SOUND_CHANNELS);
-    global_settings.rec_quality = 5;
-    global_settings.rec_source = 0;    /* 0=mic */
-    global_settings.rec_frequency = 0; /* 0=44.1kHz */
-    global_settings.rec_channels = 0;  /* 0=Stereo */
-    global_settings.rec_mic_gain = 8;
-    global_settings.rec_left_gain = 2; /* 0dB */
-    global_settings.rec_right_gain = 2; /* 0dB */
-    global_settings.rec_editable = false;
     global_settings.resume      = RESUME_ASK;
-    global_settings.contrast    = lcd_default_contrast();
-    global_settings.invert      = DEFAULT_INVERT_SETTING;
-    global_settings.poweroff    = DEFAULT_POWEROFF_SETTING;
-    global_settings.backlight_timeout   = DEFAULT_BACKLIGHT_TIMEOUT_SETTING;
-    global_settings.invert_cursor = DEFAULT_INVERT_CURSOR_SETTING;
-    global_settings.backlight_on_when_charging   = 
-        DEFAULT_BACKLIGHT_ON_WHEN_CHARGING_SETTING;
-#ifdef HAVE_LIION
-    global_settings.battery_capacity = 2200; /* mAh */
-#else
-    global_settings.battery_capacity = 1500; /* mAh */
-#endif
-    global_settings.trickle_charge = true;
     global_settings.dirfilter   = SHOW_MUSIC;
     global_settings.sort_case   = false;
     global_settings.statusbar   = true;
     global_settings.scrollbar   = true;
     global_settings.repeat_mode = REPEAT_ALL;
     global_settings.playlist_shuffle = false;
-    global_settings.discharge    = 0;
     global_settings.timeformat   = 0;
     global_settings.volume_type  = 0;
-    global_settings.battery_type = 0;
     global_settings.scroll_speed = 8;
     global_settings.bidir_limit  = 50;
-#ifdef HAVE_LCD_CHARCELLS
     global_settings.jump_scroll  = 0;
     global_settings.jump_scroll_delay  = 50;
-#endif    
     global_settings.scroll_delay = 100;
     global_settings.scroll_step  = 6;
     global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP;
     global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING;
     global_settings.resume_index = -1;
-    global_settings.resume_first_index = 0;
     global_settings.resume_offset = -1;
-    global_settings.resume_seed = -1;
-    global_settings.disk_spindown = 5;
-    global_settings.disk_poweroff = false;
     global_settings.buffer_margin = 0;
     global_settings.browse_current = false;
     global_settings.play_selected = true;
-    global_settings.peak_meter_release = 8;
-    global_settings.peak_meter_hold = 3;
-    global_settings.peak_meter_clip_hold = 16;
-    global_settings.peak_meter_dbfs = true;
-    global_settings.peak_meter_min = 60;
-    global_settings.peak_meter_max = 0;
-    global_settings.peak_meter_performance = false;
     global_settings.wps_file[0] = 0;
-    global_settings.font_file[0] = 0;
     global_settings.lang_file[0] = 0;
-    global_settings.runtime = 0;
-    global_settings.topruntime = 0;
     global_settings.fade_on_stop = true;
-    global_settings.caption_backlight = false;
-    global_settings.car_adapter_mode = false;
     global_settings.max_files_in_dir = 400;
     global_settings.max_files_in_playlist = 10000;
-    global_settings.show_icons = true;
     global_settings.recursive_dir_insert = RECURSE_OFF;
-    global_settings.line_in = false;
+    global_settings.use_volume_slider = true;
 }
 
 bool set_bool(char* string, bool* variable )
@@ -1548,13 +841,6 @@
     int button;
     int org_value=*variable;
 
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
-
     lcd_clear_display();
     lcd_puts_scroll(0, 0, string);
 
@@ -1562,48 +848,33 @@
         char str[32];
         snprintf(str,sizeof str,"%d %s  ", *variable, unit);
         lcd_puts(0, 1, str);
-#ifdef HAVE_LCD_BITMAP
-        status_draw(true);
-#endif
         lcd_update();
 
         button = button_get_w_tmo(HZ/2);
         switch(button) {
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_UP:
-            case BUTTON_UP | BUTTON_REPEAT:
-#else
             case BUTTON_RIGHT:
             case BUTTON_RIGHT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
                 *variable += step;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_DOWN:
-            case BUTTON_DOWN | BUTTON_REPEAT:
-#else
             case BUTTON_LEFT:
             case BUTTON_LEFT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_REWIND:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
                 *variable -= step;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_LEFT:
             case BUTTON_PLAY:
-#else
-            case BUTTON_PLAY:
-#endif
+            case BUTTON_IR | IR_BUTTON_PLAY:
                 done = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_OFF:
-#else
             case BUTTON_STOP:
+            case BUTTON_IR | IR_BUTTON_STOP:
             case BUTTON_MENU:
-#endif
+            case BUTTON_IR | IR_BUTTON_EQ:
                 if (*variable != org_value) {
                     *variable=org_value;
                     lcd_stop_scroll();
@@ -1614,10 +885,6 @@
                 done = true;
                 break;
 
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
-
         }
         if(*variable > max )
             *variable = max;
@@ -1655,32 +922,19 @@
     else
         oldval=*boolvar;
 
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
-
     lcd_clear_display();
     lcd_puts_scroll(0, 0, string);
 
     while ( !done ) {
         lcd_puts(0, 1, options[type==INT ? *intvar : (int)*boolvar]);
-#ifdef HAVE_LCD_BITMAP
-        status_draw(true);
-#endif
         lcd_update();
 
         button = button_get_w_tmo(HZ/2);
         switch (button) {
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_UP:
-            case BUTTON_UP | BUTTON_REPEAT:
-#else
             case BUTTON_RIGHT:
             case BUTTON_RIGHT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
                 if (type == INT) {
                     if ( *intvar < (numoptions-1) )
                         (*intvar)++;
@@ -1691,13 +945,10 @@
                     *boolvar = !*boolvar;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_DOWN:
-            case BUTTON_DOWN | BUTTON_REPEAT:
-#else
             case BUTTON_LEFT:
             case BUTTON_LEFT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_REWIND:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
                 if (type == INT) {
                     if ( *intvar > 0 )
                         (*intvar)--;
@@ -1708,21 +959,15 @@
                     *boolvar = !*boolvar;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_LEFT:
-            case BUTTON_PLAY:
-#else
             case BUTTON_PLAY:
-#endif
+            case BUTTON_IR | IR_BUTTON_PLAY:
                 done = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_OFF:
-#else
             case BUTTON_STOP:
+            case BUTTON_IR | IR_BUTTON_STOP:
             case BUTTON_MENU:
-#endif
+            case BUTTON_IR | IR_BUTTON_EQ:
                 if (((type==INT) && (*intvar != oldval)) ||
                     ((type==BOOL) && (*boolvar != (bool)oldval))) {
                     if (type==INT)
@@ -1737,9 +982,6 @@
                 done = true;
                 break;
 
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
         }
 
         if ( function && button != BUTTON_NONE) {
@@ -1752,281 +994,3 @@
     lcd_stop_scroll();
     return false;
 }
-
-#ifdef HAVE_LCD_BITMAP
-#define INDEX_X 0
-#define INDEX_Y 1
-#define INDEX_WIDTH 2
-bool set_time(char* string, int timedate[])
-{
-    bool done = false;
-    int button;
-    int min = 0, steps = 0;
-    int cursorpos = 0;
-    int lastcursorpos = !cursorpos;
-    unsigned char buffer[19];
-    int realyear;
-    int julianday;
-    int i;
-    unsigned char reffub[5];
-    unsigned int width, height;
-    unsigned int separator_width, weekday_width;
-    unsigned int line_height, prev_line_height;
-    int dayname[] = {LANG_WEEKDAY_SUNDAY,
-                     LANG_WEEKDAY_MONDAY,
-                     LANG_WEEKDAY_TUESDAY,
-                     LANG_WEEKDAY_WEDNESDAY,
-                     LANG_WEEKDAY_THURSDAY,
-                     LANG_WEEKDAY_FRIDAY,
-                     LANG_WEEKDAY_SATURDAY};
-    int monthname[] = {LANG_MONTH_JANUARY,
-                       LANG_MONTH_FEBRUARY,
-                       LANG_MONTH_MARCH,
-                       LANG_MONTH_APRIL,
-                       LANG_MONTH_MAY,
-                       LANG_MONTH_JUNE,
-                       LANG_MONTH_JULY,
-                       LANG_MONTH_AUGUST,
-                       LANG_MONTH_SEPTEMBER,
-                       LANG_MONTH_OCTOBER,
-                       LANG_MONTH_NOVEMBER,
-                       LANG_MONTH_DECEMBER};
-    char cursor[][3] = {{ 0,  8, 12}, {18,  8, 12}, {36,  8, 12},
-                        {24, 16, 24}, {54, 16, 18}, {78, 16, 12}};
-    char daysinmonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-    
-    int monthname_len = 0, dayname_len = 0;
-
-
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
-    lcd_clear_display();
-    lcd_puts_scroll(0, 0, string);
-
-    while ( !done ) {
-        /* calculate the number of days in febuary */
-        realyear = timedate[3] + 2000;
-        if((realyear % 4 == 0 && !(realyear % 100 == 0)) || realyear % 400 == 0)
-            daysinmonth[1] = 29;
-        else
-            daysinmonth[1] = 28;
-
-        /* fix day if month or year changed */
-        if (timedate[5] > daysinmonth[timedate[4] - 1])
-            timedate[5] = daysinmonth[timedate[4] - 1];
-
-        /* calculate day of week */
-        julianday = 0;
-        for(i = 0; i < timedate[4] - 1; i++) {
-           julianday += daysinmonth[i];
-        }
-        julianday += timedate[5];
-        timedate[6] = (realyear + julianday + (realyear - 1) / 4 -
-                       (realyear - 1) / 100 + (realyear - 1) / 400 + 7 - 1) % 7;
-
-        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d ",
-                 timedate[0], timedate[1], timedate[2]);
-        lcd_puts(0, 1, buffer);
-
-        /* recalculate the positions and offsets */
-        lcd_getstringsize(string, &width, &prev_line_height);
-        lcd_getstringsize(buffer, &width, &line_height);
-        lcd_getstringsize(":", &separator_width, &height);
-
-        /* hour */
-        strncpy(reffub, buffer, 2);
-        reffub[2] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[0][INDEX_X] = 0;
-        cursor[0][INDEX_Y] = prev_line_height;
-        cursor[0][INDEX_WIDTH] = width;
-
-        /* minute */
-        strncpy(reffub, buffer + 3, 2);
-        reffub[2] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width;
-        cursor[1][INDEX_Y] = prev_line_height;
-        cursor[1][INDEX_WIDTH] = width;
-
-        /* second */
-        strncpy(reffub, buffer + 6, 2);
-        reffub[2] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width +
-                             cursor[1][INDEX_WIDTH] + separator_width;
-        cursor[2][INDEX_Y] = prev_line_height;
-        cursor[2][INDEX_WIDTH] = width;
-
-        lcd_getstringsize(buffer, &width, &prev_line_height);
-
-        snprintf(buffer, sizeof(buffer), "%s 20%02d %s %02d ",
-                 str(dayname[timedate[6]]), timedate[3],
-                 str(monthname[timedate[4] - 1]), timedate[5]);
-        lcd_puts(0, 2, buffer);
-
-        /* recalculate the positions and offsets */
-        lcd_getstringsize(buffer, &width, &line_height);
-
-        /* store these 2 to prevent _repeated_ strlen calls */
-        monthname_len = strlen(str(monthname[timedate[4] - 1]));
-        dayname_len = strlen(str(dayname[timedate[6]]));
-
-        /* weekday */
-        strncpy(reffub, buffer, dayname_len);
-        reffub[dayname_len] = '\0';
-        lcd_getstringsize(reffub, &weekday_width, &height);
-        lcd_getstringsize(" ", &separator_width, &height);
-
-        /* year */
-        strncpy(reffub, buffer + dayname_len + 1, 4);
-        reffub[4] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[3][INDEX_X] = weekday_width + separator_width;
-        cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height;
-        cursor[3][INDEX_WIDTH] = width;
-
-        /* month */
-        strncpy(reffub, buffer + dayname_len + 6, monthname_len);
-        reffub[monthname_len] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[4][INDEX_X] = weekday_width + separator_width +
-                             cursor[3][INDEX_WIDTH] + separator_width;
-        cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height;
-        cursor[4][INDEX_WIDTH] = width;
-
-        /* day */
-        strncpy(reffub, buffer + dayname_len + monthname_len + 7, 2);
-        reffub[2] = '\0';
-        lcd_getstringsize(reffub, &width, &height);
-        cursor[5][INDEX_X] = weekday_width + separator_width +
-                             cursor[3][INDEX_WIDTH] + separator_width +
-                             cursor[4][INDEX_WIDTH] + separator_width;
-        cursor[5][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height;
-        cursor[5][INDEX_WIDTH] = width;
-
-        lcd_invertrect(cursor[cursorpos][INDEX_X],
-                       cursor[cursorpos][INDEX_Y] + lcd_getymargin(),
-                       cursor[cursorpos][INDEX_WIDTH],
-                       line_height);
-
-        lcd_puts(0, 4, str(LANG_TIME_SET));
-        lcd_puts(0, 5, str(LANG_TIME_REVERT));
-#ifdef HAVE_LCD_BITMAP
-        status_draw(true);
-#endif
-        lcd_update();
-
-        /* calculate the minimum and maximum for the number under cursor */
-        if(cursorpos!=lastcursorpos) {
-            lastcursorpos=cursorpos;
-            switch(cursorpos) {
-                case 0: /* hour */
-                    min = 0;
-                    steps = 24;
-                    break;
-                case 1: /* minute */
-                case 2: /* second */
-                    min = 0;
-                    steps = 60;
-                    break;
-                case 3: /* year */
-                    min = 0;
-                    steps = 100;
-                    break;
-                case 4: /* month */
-                    min = 1;
-                    steps = 12;
-                    break;
-                case 5: /* day */
-                    min = 1;
-                    steps = daysinmonth[timedate[4] - 1];
-                    break;
-            }
-        }
-
-        button = button_get_w_tmo(HZ/2);
-        switch ( button ) {
-            case BUTTON_LEFT:
-                cursorpos = (cursorpos + 6 - 1) % 6;
-                break;
-            case BUTTON_RIGHT:
-                cursorpos = (cursorpos + 6 + 1) % 6;
-                break;
-            case BUTTON_UP:
-            case BUTTON_UP | BUTTON_REPEAT:
-                timedate[cursorpos] = (timedate[cursorpos] + steps - min + 1) %
-                    steps + min;
-                if(timedate[cursorpos] == 0)
-                    timedate[cursorpos] += min;
-                break;
-            case BUTTON_DOWN:
-            case BUTTON_DOWN | BUTTON_REPEAT:
-                timedate[cursorpos]=(timedate[cursorpos]+steps - min - 1) % 
-                    steps + min;
-                if(timedate[cursorpos] == 0)
-                    timedate[cursorpos] += min;
-                break;
-            case BUTTON_ON:
-                done = true;
-                if (timedate[6] == 0) /* rtc needs 1 .. 7 */
-                    timedate[6] = 7;
-                break;
-            case BUTTON_OFF:
-                done = true;
-                timedate[0] = -1;
-                break;
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_F3:
-#ifdef HAVE_LCD_BITMAP
-                global_settings.statusbar = !global_settings.statusbar;
-                settings_save();
-                if(global_settings.statusbar)
-                    lcd_setmargins(0, STATUSBAR_HEIGHT);
-                else
-                    lcd_setmargins(0, 0);
-                lcd_clear_display();
-                lcd_puts_scroll(0, 0, string);
-#endif
-                break;
-#endif
-
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
-        }
-    }
-
-    return false;
-}
-#endif
-
-#ifdef HAVE_MAS3587F
-/* This array holds the record timer interval lengths, in seconds */
-static unsigned long rec_timer_seconds[] =
-{
-    24*60*60, /* OFF really means 24 hours, to avoid >2Gbyte files */
-    5*60,     /* 00:05 */
-    10*60,    /* 00:10 */
-    15*60,    /* 00:15 */
-    30*60,    /* 00:30 */
-    60*60,    /* 01:00 */
-    2*60*60,  /* 02:00 */
-    4*60*60,  /* 04:00 */
-    6*60*60,  /* 06:00 */
-    8*60*60,  /* 08:00 */
-    10*60*60, /* 10:00 */
-    12*60*60, /* 12:00 */
-    18*60*60, /* 18:00 */
-    24*60*60  /* 24:00 */
-};
-
-unsigned int rec_timesplit_seconds(void)
-{
-    return rec_timer_seconds[global_settings.rec_timesplit];
-}
-#endif
diff -rubBP /home/dast/src/rockbox/apps/settings.h ./apps/settings.h
--- /home/dast/src/rockbox/apps/settings.h	Tue Dec  9 13:28:39 2003
+++ ./apps/settings.h	Fri Nov  7 07:07:51 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: settings.h,v 1.94 2003/12/09 08:18:03 hardeeps Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __SETTINGS_H__
 #define __SETTINGS_H__
 
@@ -24,8 +5,7 @@
 #include "config.h"
 #include "file.h"
 
-#define ROCKBOX_DIR "/.rockbox"
-#define PLUGIN_DIR ROCKBOX_DIR"/rocks"
+#define OPENNEO_DIR ""
 
 #define MAX_FILENAME 20
 
@@ -65,52 +44,12 @@
     int avc;        /* auto volume correct:  0=disable, 1=2s 2=4s 3=8s       */
     int channel_config;  /* Stereo, Mono, Mono left, Mono right */
 
-    int rec_quality;   /* 0-7 */
-    int rec_source;    /* 0=mic, 1=line, 2=S/PDIF */
-    int rec_frequency; /* 0 = 44.1kHz
-                          1 = 48kHz
-                          2 = 32kHz
-                          3 = 22.05kHz
-                          4 = 24kHz
-                          5 = 16kHz */
-    int rec_channels;  /* 0=Stereo, 1=Mono */
-    int rec_mic_gain; /* 0-15 */
-    int rec_left_gain; /* 0-15 */
-    int rec_right_gain; /* 0-15 */
-    bool rec_editable; /* true means that the bit reservoir is off */
-
-    /* note: timesplit setting is not saved */
-    int rec_timesplit; /* 0 = off,
-                          1 = 00:05, 2 = 00:10, 3 = 00:15, 4 = 00:30
-                          5 = 01:00, 6 = 02:00, 7 = 04:00, 8 = 06:00
-                          9 = 08:00, 10= 10:00, 11= 12:00, 12= 18:00,
-                          13= 24:00 */
-    
-    /* device settings */
-
-    int contrast;   /* lcd contrast:          0-63 0=low 63=high            */
-    bool invert;    /* invert display */
-    bool invert_cursor; /* invert the current file in dir browser and menu
-                           instead of using the default cursor */
-    int poweroff;   /* power off timer */
-    int backlight_timeout;  /* backlight off timeout:  0-18 0=never,
-                               1=always,
-                               then according to timeout_values[] */
-    bool backlight_on_when_charging;
-    bool discharge; /* maintain charge of at least: false = 85%, true = 10%  */
-    bool trickle_charge; /* do trickle charging: 0=off, 1=on */
-    int battery_capacity; /* in mAh */
-
     /* resume settings */
 
     int resume;        /* resume option: 0=off, 1=ask, 2=on */
-    short resume_index;  /* index in playlist (-1 for no active resume) */
-    short resume_first_index;  /* index of first track in playlist */
+    int resume_index;  /* index in playlist (-1 for no active resume) */
     int resume_offset; /* byte offset in mp3 file */
-    int resume_seed;   /* shuffle seed (-1=no resume shuffle 0=sorted
-                                        >0=shuffled) */
 
-    unsigned char font_file[MAX_FILENAME+1]; /* last font */
     unsigned char wps_file[MAX_FILENAME+1];  /* last wps */
     unsigned char lang_file[MAX_FILENAME+1]; /* last language */
 
@@ -131,15 +70,6 @@
     bool disk_poweroff; /* whether to cut disk power after spindown or not */
     int buffer_margin; /* MP3 buffer watermark margin, in seconds */
 
-    int peak_meter_release;   /* units per read out */
-    int peak_meter_hold;      /* hold time for peak meter in 1/100 s */
-    int peak_meter_clip_hold; /* hold time for clips */
-    bool peak_meter_dbfs;     /* show linear or dbfs values */
-    bool peak_meter_performance;  /* true: high performance, else save energy*/
-    int peak_meter_min; /* range minimum */
-    int peak_meter_max; /* range maximum */
-    bool car_adapter_mode; /* 0=off 1=on */
-
     /* show status bar */
     bool statusbar;    /* 0=hide, 1=show */
 
@@ -150,32 +80,18 @@
     bool browse_current; /* 1=goto current song,
                             0=goto previous location */
 
-    int runtime;       /* current runtime since last charge */
-    int topruntime;    /* top known runtime */
-
     int bidir_limit;   /* bidir scroll length limit */
     int scroll_delay;  /* delay (in 1/10s) before starting scroll */
     int scroll_step;   /* pixels to advance per update */
-#ifdef HAVE_LCD_CHARCELLS
     int jump_scroll;   /* Fast jump when scrolling */
     int jump_scroll_delay; /* Delay between jump scroll screens */
-#endif
     bool fade_on_stop; /* fade on pause/unpause/stop */
-    bool caption_backlight; /* turn on backlight at end and start of track */
-
-#ifdef HAVE_FMRADIO
-    int fm_freq_step;    /* Frequency step for manual tuning, in kHz */
-    bool fm_force_mono;  /* Forces Mono mode if true */
-    bool fm_full_range;  /* Enables full 10MHz-160MHz range if true, else
-                            only 88MHz-108MHz */
-#endif
 
     int max_files_in_dir; /* Max entries in directory (file browser) */
     int max_files_in_playlist; /* Max entries in playlist */
-    bool show_icons;   /* 0=hide 1=show */
     int recursive_dir_insert; /* should directories be inserted recursively */
 
-    bool   line_in;       /* false=off, true=active */
+    bool use_volume_slider;
 };
 
 enum optiontype { INT, BOOL };
@@ -202,32 +118,14 @@
 bool set_time(char* string, int timedate[]);
 void set_file(char* filename, char* setting, int maxlen);
 
-#ifdef HAVE_MAS3587F
-unsigned int rec_timesplit_seconds(void);
-#endif
-
 /* global settings */
 extern struct user_settings global_settings;
 /* name of directory where configuration, fonts and other data
  * files are stored */
-extern char rockboxdir[];
-extern long lasttime;
+extern char openneodir[];
 
 /* system defines */
 
-#ifdef HAVE_LCD_CHARCELLS
-#define MAX_CONTRAST_SETTING        31
-#define DEFAULT_CONTRAST_SETTING    30
-#else
-#define MAX_CONTRAST_SETTING        63
-#define DEFAULT_CONTRAST_SETTING    38
-#endif
-#define MIN_CONTRAST_SETTING        5
-#define DEFAULT_INVERT_SETTING    false
-#define DEFAULT_INVERT_CURSOR_SETTING false
-#define DEFAULT_POWEROFF_SETTING    0
-#define DEFAULT_BACKLIGHT_TIMEOUT_SETTING   5
-#define DEFAULT_BACKLIGHT_ON_WHEN_CHARGING_SETTING   0
 #define DEFAULT_FF_REWIND_MIN_STEP  FF_REWIND_1000
 #define DEFAULT_FF_REWIND_ACCEL_SETTING 3
 
@@ -235,11 +133,7 @@
 enum { REPEAT_OFF, REPEAT_ALL, REPEAT_ONE, NUM_REPEAT_MODES };
 
 /* dir filter options */
-/* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
- *       Any new rockbox browse filter modes (accessible through the menu)
- *       must be added after NUM_FILTER_MODES. */
-enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, NUM_FILTER_MODES, 
-SHOW_WPS, SHOW_CFG, SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS};
+enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, NUM_FILTER_MODES };
 
 /* recursive dir insert options */
 enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK };
diff -rubBP /home/dast/src/rockbox/apps/settings_menu.c ./apps/settings_menu.c
--- /home/dast/src/rockbox/apps/settings_menu.c	Wed Nov 19 07:34:42 2003
+++ ./apps/settings_menu.c	Fri Nov  7 06:54:16 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: settings_menu.c,v 1.124 2003/11/04 00:18:19 linusnielsen Exp $
- *
- * Copyright (C) 2002 Robert Hak
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include "config.h"
 
 #include <stdio.h>
@@ -26,349 +7,21 @@
 #include "menu.h"
 #include "mpeg.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
 #include "thread.h"
 #include "sprintf.h"
 #include "settings.h"
 #include "settings_menu.h"
-#include "backlight.h"
 #include "playlist.h"           /* for playlist_shuffle */
 #include "fat.h"                /* For dotfile settings */
-#include "powermgmt.h"
-#include "rtc.h"
 #include "ata.h"
-#include "tree.h"
 #include "screens.h"
-#ifdef HAVE_LCD_BITMAP
-#include "peakmeter.h"
-#endif
 #include "lang.h"
-#ifdef HAVE_MAS3507D
-void dac_line_in(bool enable);
-#endif
-
-static bool car_adapter_mode(void)
-{
-    return set_bool_options( str(LANG_CAR_ADAPTER_MODE),
-                             &global_settings.car_adapter_mode,
-                             str(LANG_SET_BOOL_YES),
-                             str(LANG_SET_BOOL_NO),
-                             set_car_adapter_mode);
-}
-
-static bool contrast(void)
-{
-    return set_int( str(LANG_CONTRAST), "", &global_settings.contrast, 
-                    lcd_set_contrast, 1, MIN_CONTRAST_SETTING,
-                    MAX_CONTRAST_SETTING );
-}
-
-static bool caption_backlight(void)
-{
-    bool rc = set_bool( str(LANG_CAPTION_BACKLIGHT),
-                        &global_settings.caption_backlight);
-
-    return rc;
-}
 
 /**
  * Menu to set icon visibility
  */
-static bool show_icons(void)
-{
-    return set_bool( str(LANG_SHOW_ICONS), &global_settings.show_icons );
-}
-
-#ifdef HAVE_LCD_BITMAP
-
- /**
- * Menu to set LCD Mode (normal/inverse)
- */
-static bool invert(void)
-{
-     bool rc = set_bool_options(str(LANG_INVERT),
-                                &global_settings.invert,
-                                str(LANG_INVERT_LCD_INVERSE),
-                                str(LANG_INVERT_LCD_NORMAL),
-                                lcd_set_invert_display);
-     return rc;
-}
-
-/**
- * Menu to set Line Selector Type (Pointer/Bar)
- */
-static bool invert_cursor(void)
-{
-        return set_bool_options(str(LANG_INVERT_CURSOR),
-                            &global_settings.invert_cursor,
-                            str(LANG_INVERT_CURSOR_BAR),
-                            str(LANG_INVERT_CURSOR_POINTER),
-                            NULL);
-}
-
-/**
- * Menu to configure the battery display on status bar
- */
-static bool battery_type(void)
-{
-    char* names[] = { str(LANG_DISPLAY_GRAPHIC), 
-                      str(LANG_DISPLAY_NUMERIC)  };
-
-    return set_option( str(LANG_BATTERY_DISPLAY), 
-                       &global_settings.battery_type, INT, names, 2, NULL);
-}
-
-/**
- * Menu to configure the volume display on status bar
- */
-static bool volume_type(void)
-{
-    char* names[] = { str(LANG_DISPLAY_GRAPHIC), 
-                      str(LANG_DISPLAY_NUMERIC) };
-
-    return set_option( str(LANG_VOLUME_DISPLAY), &global_settings.volume_type,
-                       INT, names, 2, NULL);
-}
-
-#ifdef PM_DEBUG
-static bool peak_meter_fps_menu(void) {
-    bool retval = false;
-    retval = set_int( "Refresh rate", "/s", 
-             &peak_meter_fps,
-             NULL, 1, 5, 40);
-    return retval;
-}
-#endif /* PM_DEBUG */
-
-/**
- * Menu to set the hold time of normal peaks.
- */
-static bool peak_meter_hold(void) {
-    bool retval = false;
-    char* names[] = { str(LANG_OFF),
-                      "200 ms ", "300 ms ", "500 ms ", "1 s ", "2 s ",
-                      "3 s ", "4 s ", "5 s ", "6 s ", "7 s",
-                      "8 s", "9 s", "10 s", "15 s", "20 s",
-                      "30 s", "1 min"
-    };
-    retval = set_option( str(LANG_PM_PEAK_HOLD),
-                         &global_settings.peak_meter_hold, INT, names,
-                         18, NULL);
-
-    peak_meter_init_times(global_settings.peak_meter_release,
-        global_settings.peak_meter_hold, 
-        global_settings.peak_meter_clip_hold);
-
-    return retval;
-}
-
-/**
- * Menu to set the hold time of clips.
- */
-static bool peak_meter_clip_hold(void) {
-    bool retval = false;
-
-    char* names[] = { str(LANG_PM_ETERNAL),
-                      "1s ", "2s ", "3s ", "4s ", "5s ",
-                      "6s ", "7s ", "8s ", "9s ", "10s",
-                      "15s", "20s", "25s", "30s", "45s",
-                      "60s", "90s", "2min", "3min", "5min",
-                      "10min", "20min", "45min", "90min"
-    };
-
-    retval = set_option( str(LANG_PM_CLIP_HOLD), 
-                         &global_settings.peak_meter_clip_hold, INT, names,
-                         25, peak_meter_set_clip_hold);
-
-    peak_meter_init_times(global_settings.peak_meter_release,
-        global_settings.peak_meter_hold, 
-        global_settings.peak_meter_clip_hold);
-
-    return retval;
-}
-
-/**
- * Menu to set the release time of the peak meter.
- */
-static bool peak_meter_release(void)  {
-    bool retval = false;
-
-    /* The range of peak_meter_release is restricted so that it
-       fits into a 7 bit number. The 8th bit is used for storing
-       something else in the rtc ram.
-       Also, the max value is 0x7e, since the RTC value 0xff is reserved */
-    retval = set_int( str(LANG_PM_RELEASE), str(LANG_PM_UNITS_PER_READ), 
-                    &global_settings.peak_meter_release,
-             NULL, 1, 1, 0x7e);
-
-    peak_meter_init_times(global_settings.peak_meter_release,
-        global_settings.peak_meter_hold, 
-        global_settings.peak_meter_clip_hold);
-
-    return retval;
-}
-
-/**
- * Menu to select wether the scale of the meter 
- * displays dBfs of linear values.
- */
-static bool peak_meter_scale(void) {
-    bool retval = false;
-    bool use_dbfs = global_settings.peak_meter_dbfs;
-    retval = set_bool_options(str(LANG_PM_SCALE), 
-        &use_dbfs, 
-        str(LANG_PM_DBFS), str(LANG_PM_LINEAR),
-        NULL);
-
-    /* has the user really changed the scale? */
-    if (use_dbfs != global_settings.peak_meter_dbfs) {
-
-        /* store the change */
-        global_settings.peak_meter_dbfs = use_dbfs;
-        peak_meter_set_use_dbfs(use_dbfs);
-
-        /* If the user changed the scale mode the meaning of
-           peak_meter_min (peak_meter_max) has changed. Thus we have
-           to convert the values stored in global_settings. */
-        if (use_dbfs) {
-
-            /* we only store -dBfs */
-            global_settings.peak_meter_min = -peak_meter_get_min() / 100;
-            global_settings.peak_meter_max = -peak_meter_get_max() / 100;
-        } else {
-            int max;
-            
-            /* linear percent */
-            global_settings.peak_meter_min = peak_meter_get_min();
-
-            /* converting dBfs -> percent results in a precision loss.
-               I assume that the user doesn't bother that conversion
-               dBfs <-> percent isn't symmetrical for odd values but that
-               he wants 0 dBfs == 100%. Thus I 'correct' the percent value
-               resulting from dBfs -> percent manually here */
-            max = peak_meter_get_max();
-            global_settings.peak_meter_max = max < 99 ? max : 100;
-        }
-        settings_apply_pm_range();
-    }
-    return retval;
-}
-
-/**
- * Adjust the min value of the value range that
- * the peak meter shall visualize.
- */
-static bool peak_meter_min(void) {
-    bool retval = false;
-    if (global_settings.peak_meter_dbfs) {
-
-        /* for dBfs scale */
-        int range_max = -global_settings.peak_meter_max;
-        int min = -global_settings.peak_meter_min;
-
-        retval =  set_int(str(LANG_PM_MIN), str(LANG_PM_DBFS),
-            &min, NULL, 1, -89, range_max);
-
-        global_settings.peak_meter_min = - min;
-    } 
-
-    /* for linear scale */
-    else {
-        int min = global_settings.peak_meter_min;
-
-        retval =  set_int(str(LANG_PM_MIN), "%",
-            &min, NULL, 
-            1, 0, global_settings.peak_meter_max - 1);
-
-        global_settings.peak_meter_min = (unsigned char)min;
-    }
-
-    settings_apply_pm_range();
-    return retval;
-}
-
-
-/**
- * Adjust the max value of the value range that
- * the peak meter shall visualize.
- */
-static bool peak_meter_max(void) {
-    bool retval = false;
-    if (global_settings.peak_meter_dbfs) {
-
-        /* for dBfs scale */
-        int range_min = -global_settings.peak_meter_min;
-        int max = -global_settings.peak_meter_max;;
-
-        retval =  set_int(str(LANG_PM_MAX), str(LANG_PM_DBFS),
-            &max, NULL, 1, range_min, 0);
-
-        global_settings.peak_meter_max = - max;
-
-    } 
-    
-    /* for linear scale */
-    else {
-        int max = global_settings.peak_meter_max;
-
-        retval =  set_int(str(LANG_PM_MAX), "%",
-            &max, NULL, 
-            1, global_settings.peak_meter_min + 1, 100);
-
-        global_settings.peak_meter_max = (unsigned char)max;
-    }
-
-    settings_apply_pm_range();
-    return retval;
-}
-
-/**
- * Menu to select wether the meter is in
- * precision or in energy saver mode
- */
-static bool peak_meter_performance(void) {
-    bool retval = false;
-    retval = set_bool_options(str(LANG_PM_PERFORMANCE), 
-        &global_settings.peak_meter_performance, 
-        str(LANG_PM_HIGH_PERFORMANCE), str(LANG_PM_ENERGY_SAVER),
-        NULL);
-
-    if (global_settings.peak_meter_performance) {
-        peak_meter_fps = 25;
-    } else {
-        peak_meter_fps = 20;
-    }
-    return retval;
-}
-
-/**
- * Menu to configure the peak meter
- */
-static bool peak_meter_menu(void) 
-{
-    int m;
-    bool result;
-
-    struct menu_items items[] = {
-        { str(LANG_PM_RELEASE)  , peak_meter_release   },  
-        { str(LANG_PM_PEAK_HOLD), peak_meter_hold      },  
-        { str(LANG_PM_CLIP_HOLD), peak_meter_clip_hold },
-        { str(LANG_PM_PERFORMANCE), peak_meter_performance },
-#ifdef PM_DEBUG
-        { "Refresh rate"        , peak_meter_fps_menu  },
-#endif
-        { str(LANG_PM_SCALE)    , peak_meter_scale     },
-        { str(LANG_PM_MIN)      , peak_meter_min       },
-        { str(LANG_PM_MAX)      , peak_meter_max       },
-    };
-    
-    m=menu_init( items, sizeof items / sizeof(struct menu_items) );
-    result = menu_run(m);
-    menu_exit(m);
-    return result;
-}
-#endif /* HAVE_LCD_BITMAP */
-
 static bool shuffle(void)
 {
     return set_bool( str(LANG_SHUFFLE), &global_settings.playlist_shuffle );
@@ -424,37 +77,6 @@
                        names, 4, NULL );
 }
 
-static bool backlight_on_when_charging(void)
-{
-    bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING),
-                           &global_settings.backlight_on_when_charging);
-    backlight_set_on_when_charging(global_settings.backlight_on_when_charging);
-    return result;
-}
-
-static bool backlight_timer(void)
-{
-    char* names[] = { str(LANG_OFF), str(LANG_ON),
-                      "1s ", "2s ", "3s ", "4s ", "5s ",
-                      "6s ", "7s ", "8s ", "9s ", "10s",
-                      "15s", "20s", "25s", "30s", "45s",
-                      "60s", "90s"};
-
-    return set_option(str(LANG_BACKLIGHT), &global_settings.backlight_timeout,
-                      INT, names, 19, backlight_set_timeout );
-}
-
-static bool poweroff_idle_timer(void)
-{
-    char* names[] = { str(LANG_OFF),
-                      "1m ", "2m ", "3m ", "4m ", "5m ",
-                      "6m ", "7m ", "8m ", "9m ", "10m",
-                      "15m", "30m", "45m", "60m"};
-
-    return set_option(str(LANG_POWEROFF_IDLE), &global_settings.poweroff,
-                      INT, names, 15, set_poweroff_timeout);
-}
-
 static bool scroll_speed(void)
 {
     return set_int(str(LANG_SCROLL), "Hz", &global_settings.scroll_speed, 
@@ -471,22 +93,12 @@
     return rc;
 }
 
-#ifdef HAVE_LCD_BITMAP
-static bool scroll_step(void)
-{
-    return set_int(str(LANG_SCROLL_STEP_EXAMPLE), "pixels",
-                   &global_settings.scroll_step,
-                   &lcd_scroll_step, 1, 1, LCD_WIDTH );
-}
-#endif
-
 static bool bidir_limit(void)
 {
     return set_int(str(LANG_BIDIR_SCROLL), "%", &global_settings.bidir_limit, 
                    &lcd_bidir_scroll, 25, 0, 200 );
 }
 
-#ifdef HAVE_LCD_CHARCELLS
 static bool jump_scroll(void)
 {
     char* names[] = { str(LANG_OFF), str(LANG_ONE_TIME), "2",
@@ -504,158 +116,12 @@
     global_settings.jump_scroll_delay = dummy / (HZ/10);
     return rc;
 }
-#endif
-
-#ifndef SIMULATOR
-/**
- * Menu to set the battery capacity
- */
-static bool battery_capacity(void)
-{
-    return set_int(str(LANG_BATTERY_CAPACITY), "mAh", &global_settings.battery_capacity, 
-                   &set_battery_capacity, 50, 1500, BATTERY_CAPACITY_MAX );
-}
-#endif
-
-#ifdef HAVE_CHARGE_CTRL
-static bool deep_discharge(void)
-{
-    bool result;
-    result = set_bool( str(LANG_DISCHARGE), &global_settings.discharge );
-    charge_restart_level = global_settings.discharge ? 
-        CHARGE_RESTART_LO : CHARGE_RESTART_HI;
-    return result;
-}
-static bool trickle_charge(void)
-{
-    bool result;
-    result = set_bool( str(LANG_TRICKLE_CHARGE), &global_settings.trickle_charge );
-    enable_trickle_charge(global_settings.trickle_charge);
-    return result;
-}
-#endif
-
-#ifdef HAVE_LCD_BITMAP
-static bool timedate_set(void)
-{
-    int timedate[7]; /* hour,minute,second,year,month,day,dayofweek */
-    bool result;
-
-#ifdef HAVE_RTC
-    timedate[0] = rtc_read(0x03); /* hour   */
-    timedate[1] = rtc_read(0x02); /* minute */
-    timedate[2] = rtc_read(0x01); /* second */
-    timedate[3] = rtc_read(0x07); /* year   */
-    timedate[4] = rtc_read(0x06); /* month  */
-    timedate[5] = rtc_read(0x05); /* day    */
-
-    /* day of week not read, calculated in set_time() */
-    /* hour   */
-    timedate[0] = ((timedate[0] & 0x30) >> 4) * 10 + (timedate[0] & 0x0f); 
-    /* minute */
-    timedate[1] = ((timedate[1] & 0x70) >> 4) * 10 + (timedate[1] & 0x0f); 
-    /* second */
-    timedate[2] = ((timedate[2] & 0x70) >> 4) * 10 + (timedate[2] & 0x0f); 
-    /* year   */
-    timedate[3] = ((timedate[3] & 0xf0) >> 4) * 10 + (timedate[3] & 0x0f); 
-    /* month  */
-    timedate[4] = ((timedate[4] & 0x10) >> 4) * 10 + (timedate[4] & 0x0f); 
-    /* day    */
-    timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f);
-
-    /* do some range checks */
-    /* This prevents problems with time/date setting after a power loss */
-    if (timedate[0] < 0 || timedate[0] > 23 ||
-        timedate[1] < 0 || timedate[1] > 59 || 
-        timedate[2] < 0 || timedate[2] > 59 ||
-        timedate[3] < 0 || timedate[3] > 99 ||
-        timedate[4] < 1 || timedate[4] > 12 ||
-        timedate[5] < 1 || timedate[5] > 31)
-    {
-        /* hour   */
-        timedate[0] = 0;
-        /* minute */
-        timedate[1] = 0;
-        /* second */
-        timedate[2] = 0;
-        /* year   */
-        timedate[3] = 3;
-        /* month  */
-        timedate[4] = 1;
-        /* day    */
-        timedate[5] = 1;
-    }
-#endif
-
-    result = set_time(str(LANG_TIME),timedate);
-
-#ifdef HAVE_RTC
-    if(timedate[0] != -1) {
-        /* hour   */
-        timedate[0] = ((timedate[0]/10) << 4 | timedate[0]%10) & 0x3f; 
-        /* minute */
-        timedate[1] = ((timedate[1]/10) << 4 | timedate[1]%10) & 0x7f; 
-        /* second */
-        timedate[2] = ((timedate[2]/10) << 4 | timedate[2]%10) & 0x7f; 
-        /* year   */
-        timedate[3] = ((timedate[3]/10) << 4 | timedate[3]%10) & 0xff; 
-        /* month  */
-        timedate[4] = ((timedate[4]/10) << 4 | timedate[4]%10) & 0x1f; 
-        /* day    */
-        timedate[5] = ((timedate[5]/10) << 4 | timedate[5]%10) & 0x3f; 
-
-        rtc_write(0x03, timedate[0] | (rtc_read(0x03) & 0xc0)); /* hour */
-        rtc_write(0x02, timedate[1] | (rtc_read(0x02) & 0x80)); /* minute */
-        rtc_write(0x01, timedate[2] | (rtc_read(0x01) & 0x80)); /* second */
-        rtc_write(0x07, timedate[3]);                           /* year */
-        rtc_write(0x06, timedate[4] | (rtc_read(0x06) & 0xe0)); /* month */
-        rtc_write(0x05, timedate[5] | (rtc_read(0x05) & 0xc0)); /* day */
-        rtc_write(0x04, timedate[6] | (rtc_read(0x04) & 0xf8)); /* dayofweek */
-        rtc_write(0x00, 0x00); /* 0.1 + 0.01 seconds */
-    }
-#endif
-    return result;
-}
-
-static bool timeformat_set(void)
-{
-    char* names[] = { str(LANG_24_HOUR_CLOCK),
-                      str(LANG_12_HOUR_CLOCK) };
-
-    return set_option(str(LANG_TIMEFORMAT), &global_settings.timeformat, 
-                      INT, names, 2, NULL);
-}
-#endif
-
-static bool spindown(void)
-{
-    return set_int(str(LANG_SPINDOWN), "s", &global_settings.disk_spindown,
-                   ata_spindown, 1, 3, 254 );
-}
-
-#ifdef HAVE_MAS3507D
-static bool line_in(void)
-{
-    bool rc = set_bool(str(LANG_LINE_IN), &global_settings.line_in);
-    dac_line_in(global_settings.line_in);
-    return rc;
-}
-#endif
-
-#ifdef HAVE_ATA_POWER_OFF
-static bool poweroff(void)
-{
-    bool rc = set_bool(str(LANG_POWEROFF), &global_settings.disk_poweroff);
-    ata_poweroff(global_settings.disk_poweroff);
-    return rc;
-}
-#endif
 
 static bool max_files_in_dir(void)
 {
     return set_int(str(LANG_MAX_FILES_IN_DIR), "",
                    &global_settings.max_files_in_dir,
-                   NULL, 50, 50, 10000 );
+                   NULL, 50, 50, 400 );
 }
 
 static bool max_files_in_playlist(void)
@@ -705,40 +171,6 @@
     return set_bool( str(LANG_FOLLOW), &global_settings.browse_current );
 }
 
-static bool custom_wps_browse(void)
-{
-    return rockbox_browse(ROCKBOX_DIR, SHOW_WPS);
-}
-
-static bool custom_cfg_browse(void)
-{
-    return rockbox_browse(ROCKBOX_DIR, SHOW_CFG);
-}
-
-static bool language_browse(void)
-{
-    return rockbox_browse(ROCKBOX_DIR, SHOW_LNG);
-}
-
-#ifdef HAVE_RECORDER_KEYPAD
-static bool font_browse(void)
-{
-    return rockbox_browse(ROCKBOX_DIR, SHOW_FONT);
-}
-#endif
-
-#ifdef HAVE_LCD_BITMAP
-static bool scroll_bar(void)
-{
-    return set_bool( str(LANG_SCROLL_BAR), &global_settings.scrollbar );
-}
-
-static bool status_bar(void)
-{
-    return set_bool( str(LANG_STATUS_BAR), &global_settings.statusbar );
-}
-#endif
-
 static bool playback_settings_menu(void)
 {
     int m;
@@ -782,12 +214,7 @@
  
     lcd_clear_display();
 
-#ifdef HAVE_LCD_CHARCELLS
     line = 0;
-#else
-    line = 1;
-    lcd_puts(0,0,str(LANG_RESET_ASK_RECORDER));
-#endif
     lcd_puts(0,line,str(LANG_RESET_CONFIRM));
     lcd_puts(0,line+1,str(LANG_RESET_CANCEL));
 
@@ -796,6 +223,7 @@
     while(!done) {
         switch(button_get(true)) {
         case BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY:
             settings_reset();
             settings_apply();
             lcd_clear_display();
@@ -803,19 +231,13 @@
             done = true;
             break;
 
-#ifdef HAVE_LCD_BITMAP
-        case BUTTON_OFF:
-#else
         case BUTTON_STOP:
-#endif
+            case BUTTON_IR | IR_BUTTON_STOP:
             lcd_clear_display();
             lcd_puts(0,1,str(LANG_RESET_DONE_CANCEL));
             done = true;
             break;
 
-        case SYS_USB_CONNECTED:
-            usb_screen();
-            return true;
         }
     }
 
@@ -851,14 +273,9 @@
     struct menu_items items[] = {
         { str(LANG_SCROLL_SPEED),     scroll_speed    },
         { str(LANG_SCROLL_DELAY),    scroll_delay    },  
-#ifdef HAVE_LCD_BITMAP
-        { str(LANG_SCROLL_STEP),     scroll_step     },  
-#endif
         { str(LANG_BIDIR_SCROLL),    bidir_limit    },
-#ifdef HAVE_LCD_CHARCELLS
         { str(LANG_JUMP_SCROLL),    jump_scroll    },
         { str(LANG_JUMP_SCROLL_DELAY),    jump_scroll_delay    },
-#endif
     };
 
     m = menu_init( items, sizeof items / sizeof(struct menu_items) );
@@ -867,7 +284,10 @@
     return result;
 }
 
-
+static bool volume_slider(void)
+{
+  return set_bool(str(LANG_USE_VOLUME_SLIDER), &global_settings.use_volume_slider );
+}
 
 static bool display_settings_menu(void)
 {
@@ -876,20 +296,7 @@
 
     struct menu_items items[] = {
         { str(LANG_SCROLL_MENU),     scroll_settings_menu },  
-        { str(LANG_BACKLIGHT),       backlight_timer },
-        { str(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging },
-        { str(LANG_CONTRAST),        contrast        },  
-#ifdef HAVE_LCD_BITMAP
-        { str(LANG_SCROLL_BAR),      scroll_bar },
-        { str(LANG_STATUS_BAR),      status_bar },
-        { str(LANG_INVERT),          invert },
-        { str(LANG_INVERT_CURSOR),   invert_cursor },
-        { str(LANG_PM_MENU),         peak_meter_menu },  
-        { str(LANG_VOLUME_DISPLAY),  volume_type },
-        { str(LANG_BATTERY_DISPLAY), battery_type },
-#endif
-        { str(LANG_SHOW_ICONS),      show_icons },
-        { str(LANG_CAPTION_BACKLIGHT), caption_backlight },
+	{ str(LANG_VOLUME_SLIDER), volume_slider },
     };
     
     m=menu_init( items, sizeof items / sizeof(struct menu_items) );
@@ -904,28 +311,8 @@
     bool result;
 
     struct menu_items items[] = {
-        { str(LANG_SPINDOWN),    spindown        },
-#ifdef HAVE_MAS3507D
-        { str(LANG_LINE_IN),     line_in         },
-#endif
-#ifdef HAVE_ATA_POWER_OFF
-        { str(LANG_POWEROFF),    poweroff        },
-#endif
         { str(LANG_MAX_FILES_IN_DIR),    max_files_in_dir        },
         { str(LANG_MAX_FILES_IN_PLAYLIST),    max_files_in_playlist        },
-#ifndef SIMULATOR
-        { str(LANG_BATTERY_CAPACITY), battery_capacity },
-#endif
-#ifdef HAVE_CHARGE_CTRL
-        { str(LANG_DISCHARGE),        deep_discharge   },
-        { str(LANG_TRICKLE_CHARGE),   trickle_charge   },
-#endif
-#ifdef HAVE_LCD_BITMAP
-        { str(LANG_TIME),        timedate_set    },
-        { str(LANG_TIMEFORMAT),  timeformat_set  },
-#endif
-        { str(LANG_POWEROFF_IDLE),  poweroff_idle_timer },
-        { str(LANG_CAR_ADAPTER_MODE), car_adapter_mode },
         { str(LANG_RESET),          reset_settings },
     };
     
@@ -942,16 +329,10 @@
 
     struct menu_items items[] = {
         { str(LANG_PLAYBACK),        playback_settings_menu },
-        { str(LANG_CUSTOM_CFG),      custom_cfg_browse      },
-        { str(LANG_WHILE_PLAYING),   custom_wps_browse      },
-        { str(LANG_LANGUAGE),        language_browse        },
         { str(LANG_FILE),            fileview_settings_menu },
         { str(LANG_DISPLAY),         display_settings_menu  },
-#ifdef HAVE_RECORDER_KEYPAD
-        { str(LANG_CUSTOM_FONT),     font_browse            },
-#endif
         { str(LANG_SYSTEM),          system_settings_menu   },
-        { str(LANG_SAVE_SETTINGS),   settings_save_config   },
+//        { str(LANG_SAVE_SETTINGS),   settings_save_config   },
     };
     
     m = menu_init( items, sizeof items / sizeof(struct menu_items) );
diff -rubBP /home/dast/src/rockbox/apps/settings_menu.h ./apps/settings_menu.h
--- /home/dast/src/rockbox/apps/settings_menu.h	Thu Oct 31 08:57:53 2002
+++ ./apps/settings_menu.h	Wed Oct 29 15:12:04 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: settings_menu.h,v 1.5 2002/09/24 17:22:11 zagor Exp $
- *
- * Copyright (C) 2002 Robert Hak
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _SETTINGS_MENU_H
 #define _SETTINGS_MENU_H
 
Only in /home/dast/src/rockbox/apps: sleeptimer.c
Only in /home/dast/src/rockbox/apps: sleeptimer.h
diff -rubBP /home/dast/src/rockbox/apps/sound_menu.c ./apps/sound_menu.c
--- /home/dast/src/rockbox/apps/sound_menu.c	Thu Nov 20 08:44:07 2003
+++ ./apps/sound_menu.c	Wed Oct 29 15:12:04 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: sound_menu.c,v 1.41 2003/11/20 00:33:43 linusnielsen Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "config.h"
 #include <stdio.h>
 #include <stdbool.h>
@@ -23,13 +5,11 @@
 #include "lcd.h"
 #include "menu.h"
 #include "button.h"
+#include "remote.h"
 #include "mpeg.h"
 #include "settings.h"
 #include "status.h"
 #include "screens.h"
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#endif
 #include "lang.h"
 #include "sprintf.h"
 
@@ -59,12 +39,6 @@
     min = mpeg_sound_min(setting);
     max = mpeg_sound_max(setting);
     
-#ifdef HAVE_LCD_BITMAP
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
     lcd_clear_display();
     lcd_puts_scroll(0,0,string);
 
@@ -88,52 +62,40 @@
 
         changed = false;
         switch( button_get_w_tmo(HZ/2) ) {
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_UP:
-            case BUTTON_UP | BUTTON_REPEAT:
-#else
             case BUTTON_RIGHT:
             case BUTTON_RIGHT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
                 (*variable)++;
                 if(*variable > max )
                     *variable = max;
                 changed = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_DOWN:
-            case BUTTON_DOWN | BUTTON_REPEAT:
-#else
             case BUTTON_LEFT:
             case BUTTON_LEFT | BUTTON_REPEAT:
-#endif
+            case BUTTON_IR | IR_BUTTON_REWIND:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
                 (*variable)--;
                 if(*variable < min )
                     *variable = min;
                 changed = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_LEFT:
-#else
+            case BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY:
             case BUTTON_STOP:
+            case BUTTON_IR | IR_BUTTON_STOP:
             case BUTTON_MENU:
-            case BUTTON_PLAY:
-#endif
+            case BUTTON_IR | IR_BUTTON_EQ:
                 done = true;
                 break;
 
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                return true;
         }
         if (changed) {
             mpeg_sound_set(setting, *variable);
-#ifdef HAVE_MAS3507D
             if(setting == SOUND_BALANCE)
                 mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
-#endif
         }
     }
     lcd_stop_scroll();
@@ -161,88 +123,6 @@
     return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE);
 }
 
-#ifdef HAVE_MAS3587F
-static bool loudness(void)
-{
-    return set_sound(str(LANG_LOUDNESS), &global_settings.loudness, 
-                     SOUND_LOUDNESS);
-};
-
-static bool bass_boost(void)
-{
-    return set_sound(str(LANG_BBOOST), &global_settings.bass_boost, 
-                     SOUND_SUPERBASS);
-};
-
-static void set_avc(int val)
-{
-    mpeg_sound_set(SOUND_AVC, val);
-}
-
-static bool avc(void)
-{
-    char* names[] = { str(LANG_OFF), "2s", "4s", "8s" };
-    return set_option(str(LANG_DECAY), &global_settings.avc, INT,
-                      names, 4, set_avc);
-}
-
-static bool recsource(void)
-{
-    char *names[] = {str(LANG_RECORDING_SRC_MIC), str(LANG_RECORDING_SRC_LINE),
-                     str(LANG_RECORDING_SRC_DIGITAL) };
-    return set_option(str(LANG_RECORDING_SOURCE),
-                      &global_settings.rec_source, INT,
-                      names, 3, NULL );
-}
-
-static bool recfrequency(void)
-{
-    char *names[] = {"44.1kHz", "48kHz", "32kHz",
-                     "22.05kHz", "24kHz", "16kHz"};
-
-    return set_option(str(LANG_RECORDING_FREQUENCY),
-                      &global_settings.rec_frequency, INT,
-                      names, 6, NULL );
-}
-
-static bool recchannels(void)
-{
-    char *names[] = {str(LANG_CHANNEL_STEREO), str(LANG_CHANNEL_MONO)};
-
-    return set_option(str(LANG_RECORDING_CHANNELS),
-                      &global_settings.rec_channels, INT,
-                      names, 2, NULL );
-}
-
-static bool recquality(void)
-{
-    return set_int(str(LANG_RECORDING_QUALITY), "",
-                   &global_settings.rec_quality, 
-                   NULL, 1, 0, 7 );
-}
-
-static bool receditable(void)
-{
-    return set_bool(str(LANG_RECORDING_EDITABLE),
-                    &global_settings.rec_editable);
-}
-
-static bool rectimesplit(void)
-{
-    char *names[] = {
-        str(LANG_OFF), "00:05","00:10","00:15",
-        "00:30","01:00","02:00","04:00",
-        "06:00","08:00","10:00","12:00",
-        "18:00","24:00"
-    };
-
-    return set_option(str(LANG_RECORD_TIMESPLIT),
-                      &global_settings.rec_timesplit, INT,
-                      names, 14, NULL );
-}
-
-#endif /* HAVE_MAS3587F */
-
 static void set_chanconf(int val)
 {
     mpeg_sound_set(SOUND_CHANNELS, val);
@@ -252,11 +132,7 @@
 {
     char *names[] = {
         str(LANG_CHANNEL_STEREO),
-#ifdef HAVE_LCD_CHARCELLS
         str(LANG_CHANNEL_STEREO_NARROW_PLAYER),
-#else
-        str(LANG_CHANNEL_STEREO_NARROW_RECORDER),
-#endif
         str(LANG_CHANNEL_MONO),
         str(LANG_CHANNEL_LEFT), str(LANG_CHANNEL_RIGHT),
         str(LANG_CHANNEL_KARAOKE), str(LANG_CHANNEL_STEREO_WIDE)
@@ -275,11 +151,6 @@
         { str(LANG_TREBLE), treble },
         { str(LANG_BALANCE), balance },
         { str(LANG_CHANNEL_MENU), chanconf },
-#ifdef HAVE_MAS3587F
-        { str(LANG_LOUDNESS), loudness },
-        { str(LANG_BBOOST), bass_boost },
-        { str(LANG_AUTOVOL), avc }
-#endif
     };
     
     m=menu_init( items, sizeof items / sizeof(struct menu_items) );
@@ -288,34 +159,3 @@
 
     return result;
 }
-
-#ifdef HAVE_MAS3587F
-bool recording_menu(bool no_source)
-{
-    int m;
-    int i = 0;
-    struct menu_items menu[6];
-    bool result;
-
-    menu[i].desc = str(LANG_RECORDING_QUALITY);
-    menu[i++].function = recquality;
-    menu[i].desc = str(LANG_RECORDING_FREQUENCY);
-    menu[i++].function = recfrequency;
-    if(!no_source) {
-        menu[i].desc = str(LANG_RECORDING_SOURCE);
-        menu[i++].function = recsource;
-    }
-    menu[i].desc = str(LANG_RECORDING_CHANNELS);
-    menu[i++].function = recchannels;
-    menu[i].desc = str(LANG_RECORDING_EDITABLE);
-    menu[i++].function = receditable;
-    menu[i].desc = str(LANG_RECORD_TIMESPLIT);
-    menu[i++].function = rectimesplit;
-        
-    m=menu_init( menu, i );
-    result = menu_run(m);
-    menu_exit(m);
-
-    return result;
-}
-#endif
diff -rubBP /home/dast/src/rockbox/apps/sound_menu.h ./apps/sound_menu.h
--- /home/dast/src/rockbox/apps/sound_menu.h	Thu Nov 20 08:44:07 2003
+++ ./apps/sound_menu.h	Wed Oct 29 15:12:04 2003
@@ -5,7 +5,7 @@
  *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
  *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
  *                     \/            \/     \/    \/            \/
- * $Id: sound_menu.h,v 1.5 2003/11/20 00:33:43 linusnielsen Exp $
+ * $Id: sound_menu.h,v 1.1.1.1 2003/10/29 14:12:04 knobby2346 Exp $
  *
  * Copyright (C) 2002 Björn Stenberg
  *
@@ -22,6 +22,6 @@
 #include "menu.h"
 
 bool sound_menu(void);
-bool recording_menu(bool no_source);
+bool recording_menu(void);
 
 #endif
diff -rubBP /home/dast/src/rockbox/apps/status.c ./apps/status.c
--- /home/dast/src/rockbox/apps/status.c	Thu Dec  4 16:35:38 2003
+++ ./apps/status.c	Wed Oct 29 15:12:04 2003
@@ -1,49 +1,18 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: status.c,v 1.48 2003/12/03 23:21:13 zagor Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "string.h"
 #include "lcd.h"
 #include "debug.h"
 #include "kernel.h"
-#include "power.h"
 #include "thread.h"
 #include "settings.h"
 #include "status.h"
 #include "mpeg.h"
 #include "wps.h"
-#ifdef HAVE_RTC
-#include "timefuncs.h"
-#endif
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "font.h"
-#endif
-#include "powermgmt.h"
 
 static enum playmode current_mode = STATUS_STOP;
 
 static long switch_tick;
-static int  battery_charge_step = 0;
-static bool plug_state;
-static bool battery_state = true;
 
 struct status_info {
-    int battlevel;
     int volume;
     int hour;
     int minute;
@@ -51,8 +20,6 @@
     int repeat;
     bool inserted;
     bool shuffle;
-    bool keylock;
-    bool battery_safe;
 };
 
 void status_init(void)
@@ -66,16 +33,8 @@
     status_draw(false);
 }
 
-#if defined(HAVE_LCD_CHARCELLS)
-static bool record = false;
 static bool audio = false;
 static bool param = false;
-static bool usb = false;
-
-void status_set_record(bool b)
-{
-    record = b;
-}
 
 void status_set_audio(bool b)
 {
@@ -87,130 +46,15 @@
     param = b;
 }
 
-void status_set_usb(bool b)
-{
-    usb = b;
-}
-
-#endif /* HAVE_LCD_CHARCELLS */
-
 void status_draw(bool force_redraw)
 {
     struct status_info info;
 
-#ifdef HAVE_LCD_BITMAP
-    static struct status_info lastinfo;
-    struct tm* tm;
-
-    if ( !global_settings.statusbar )
-        return;
-#else
     (void)force_redraw; /* players always "redraw" */
-#endif
 
     info.volume = mpeg_val2phys(SOUND_VOLUME, global_settings.volume);
-    info.inserted = charger_inserted();
-    info.battlevel = battery_level();
-    info.battery_safe = battery_level_safe();
-
-#ifdef HAVE_LCD_BITMAP
-    tm = get_time();
-    info.hour = tm->tm_hour;
-    info.minute = tm->tm_min;
-    info.shuffle = global_settings.playlist_shuffle;
-    info.keylock = keys_locked;
-    info.repeat = global_settings.repeat_mode;
-    info.playmode = current_mode;
-
-    /* only redraw if forced to, or info has changed */
-    if (force_redraw ||
-        info.inserted ||
-        !info.battery_safe || 
-        memcmp(&info, &lastinfo, sizeof(struct status_info)))
-    {
-        lcd_clearrect(0,0,LCD_WIDTH,8);
-#else
-    /* players always "redraw" */
-    {
-#endif
-        
-        if (info.inserted) {
-            battery_state = true;
-            plug_state = true;
-#ifdef HAVE_CHARGE_CTRL
-            /* zero battery run time if charging */
-            if (charge_state > 0) {
-                global_settings.runtime = 0;
-                lasttime = current_tick;
-            }
-            
-            /* animate battery if charging */
-            if (charge_state == 1) {
-#else
-            global_settings.runtime = 0;
-            lasttime = current_tick;
-            {
-#endif
-                /* animate in three steps (34% per step for a better look) */
-                info.battlevel = battery_charge_step * 34;
-                if (info.battlevel > 100)
-                    info.battlevel = 100;
-                if(TIME_AFTER(current_tick, switch_tick)) {
-                    battery_charge_step=(battery_charge_step+1)%4;
-                    switch_tick = current_tick + HZ;
-                }
-            }
-        }
-        else {
-            plug_state=false;
-            if (info.battery_safe)
-                battery_state = true;
-            else {
-                /* blink battery if level is low */
-                if(TIME_AFTER(current_tick, switch_tick) &&
-                   (info.battlevel > -1)) {
-                    switch_tick = current_tick+HZ;
-                    battery_state =! battery_state;
-                }
-            }
-        }
-
-#ifdef HAVE_LCD_BITMAP
-        if (battery_state)
-            statusbar_icon_battery(info.battlevel, plug_state);
-            
-        statusbar_icon_volume(info.volume);
-        statusbar_icon_play_state(current_mode + Icon_Play);
-        switch (info.repeat) {
-            case REPEAT_ONE:
-                statusbar_icon_play_mode(Icon_RepeatOne);
-                break;
-
-            case REPEAT_ALL:
-                statusbar_icon_play_mode(Icon_Repeat);
-                break;
-        }
-        if (info.shuffle)
-            statusbar_icon_shuffle();
-        if (info.keylock)
-            statusbar_icon_lock();
-#ifdef HAVE_RTC
-        statusbar_time(info.hour, info.minute);
-#endif
-        lcd_update_rect(0, 0, LCD_WIDTH, STATUSBAR_HEIGHT);
-        lastinfo = info;
-#endif
-    }
-
-
-#if defined(HAVE_LCD_CHARCELLS)
-    if (info.battlevel > -1)
-    lcd_icon(ICON_BATTERY, battery_state);
-    lcd_icon(ICON_BATTERY_1, info.battlevel > 25);
-    lcd_icon(ICON_BATTERY_2, info.battlevel > 50);
-    lcd_icon(ICON_BATTERY_3, info.battlevel > 75);
 
-    lcd_icon(ICON_VOLUME, true);
+/*    lcd_icon(ICON_VOLUME, true);
     lcd_icon(ICON_VOLUME_1, info.volume > 10);
     lcd_icon(ICON_VOLUME_2, info.volume > 30);
     lcd_icon(ICON_VOLUME_3, info.volume > 50);
@@ -223,56 +67,10 @@
     lcd_icon(ICON_REPEAT, global_settings.repeat_mode != REPEAT_OFF);
     lcd_icon(ICON_1, global_settings.repeat_mode == REPEAT_ONE);
     
-    lcd_icon(ICON_RECORD, record);
     lcd_icon(ICON_AUDIO, audio);
-    lcd_icon(ICON_PARAM, param);
-    lcd_icon(ICON_USB, usb);
-#endif
-
+    lcd_icon(ICON_PARAM, param);*/
 }
 
-#ifdef HAVE_LCD_BITMAP
-static void draw_buttonbar_btn(int num, char* caption)
-{
-    int xpos, ypos, button_width, text_width;
-    int fw, fh;
 
-    lcd_setfont(FONT_SYSFIXED);
-    lcd_getstringsize("M", &fw, &fh);
 
-    button_width = LCD_WIDTH/3;
-    xpos = num * button_width;
-    ypos = LCD_HEIGHT - fh;
-    
-    if(caption)
-    {
-        /* center the text */
-        text_width = fw * strlen(caption);
-        lcd_putsxy(xpos + (button_width - text_width)/2, ypos, caption);
-    }
     
-    lcd_invertrect(xpos, ypos, button_width - 1, fh);
-}
-
-static char stored_caption1[8];
-static char stored_caption2[8];
-static char stored_caption3[8];
-
-void buttonbar_set(char* caption1, char *caption2, char *caption3)
-{
-    strncpy(stored_caption1, caption1, 7);
-    stored_caption1[7] = 0;
-    strncpy(stored_caption2, caption2, 7);
-    stored_caption2[7] = 0;
-    strncpy(stored_caption3, caption3, 7);
-    stored_caption3[7] = 0;
-}
-
-void buttonbar_draw(void)
-{
-    lcd_clearrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8);
-    draw_buttonbar_btn(0, stored_caption1);
-    draw_buttonbar_btn(1, stored_caption2);
-    draw_buttonbar_btn(2, stored_caption3);
-}
-#endif
diff -rubBP /home/dast/src/rockbox/apps/status.h ./apps/status.h
--- /home/dast/src/rockbox/apps/status.h	Wed Nov 19 07:34:42 2003
+++ ./apps/status.h	Wed Oct 29 15:12:04 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: status.h,v 1.9 2003/11/05 08:59:55 linusnielsen Exp $
- *
- * Copyright (C) 2002 Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _STATUS_H
 #define _STATUS_H
 
@@ -32,19 +14,11 @@
 
 void status_init(void);
 void status_set_playmode(enum playmode mode);
-#ifdef HAVE_LCD_BITMAP
-bool statusbar(bool state);
-void buttonbar_set(char* caption1, char* caption2, char* caption3);
-void buttonbar_draw(void);
-#endif
 void status_draw(bool force_redraw);
 
-#if defined(HAVE_LCD_CHARCELLS)
 void status_set_record(bool b);
 void status_set_audio(bool b);
 void status_set_param(bool b);
-void status_set_usb(bool b);
-#endif
 
 #ifdef SIMULATOR
 #include <time.h>
diff -rubBP /home/dast/src/rockbox/apps/tree.c ./apps/tree.c
--- /home/dast/src/rockbox/apps/tree.c	Mon Dec  8 17:02:34 2003
+++ ./apps/tree.c	Mon Nov 24 03:55:13 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: tree.c,v 1.215 2003/12/07 16:57:43 hohensoh Exp $
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -26,11 +7,9 @@
 #include "dir.h"
 #include "file.h"
 #include "lcd.h"
-#include "font.h"
-#include "backlight.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
-#include "usb.h"
 #include "tree.h"
 #include "main_menu.h"
 #include "sprintf.h"
@@ -43,8 +22,6 @@
 #include "status.h"
 #include "debug.h"
 #include "ata.h"
-#include "rolo.h"
-#include "icons.h"
 #include "lang.h"
 #include "language.h"
 #include "screens.h"
@@ -52,46 +29,6 @@
 #include "onplay.h"
 #include "buffer.h"
 #include "plugin.h"
-#include "power.h"
-
-#ifdef HAVE_LCD_BITMAP
-#include "widgets.h"
-#define BOOTFILE "ajbrec.ajz"
-#else
-#define BOOTFILE "archos.mod"
-#endif
-
-/* a table for the know file types */
-static struct
-{
-    char* extension; /* extension for which the file type is recognized */
-    int tree_attr; /* which identifier */
-    int icon; /* the icon which shall be used for it, -1 if unknown */
-    /* To have it extendable, there could be more useful stuff in here, 
-       like handler functions, plugin name, etc. */
-} filetypes[] = {
-    { ".mp3", TREE_ATTR_MPA, File     },
-    { ".mp2", TREE_ATTR_MPA, File     },
-    { ".mpa", TREE_ATTR_MPA, File     },
-    { ".m3u", TREE_ATTR_M3U, Playlist },
-    { ".cfg", TREE_ATTR_CFG, Config   },
-    { ".wps", TREE_ATTR_WPS, Wps,     },
-    { ".txt", TREE_ATTR_TXT, Text     },
-    { ".lng", TREE_ATTR_LNG, Language },
-    { ".rock",TREE_ATTR_ROCK,Plugin   },
-#ifdef HAVE_LCD_BITMAP
-    { ".fnt", TREE_ATTR_FONT,Font     },
-    { ".ch8", TREE_ATTR_CH8, -1       },
-#endif
-#ifndef SIMULATOR
-#ifdef ARCHOS_RECORDER
-    { ".ucl", TREE_ATTR_UCL, Flashfile},
-    { ".ajz", TREE_ATTR_MOD, Mod_Ajz  },
-#else
-    { ".mod", TREE_ATTR_MOD, Mod_Ajz  },
-#endif
-#endif /* #ifndef SIMULATOR */
-};
 
 /* Boot value of global_settings.max_files_in_dir */
 static int max_files_in_dir;
@@ -111,81 +48,37 @@
 static char lastdir[MAX_PATH];
 static char lastfile[MAX_PATH];
 static char currdir[MAX_PATH];
-static char currdir_save[MAX_PATH];
 static bool reload_dir = false;
-static int boot_size = 0;
-static int boot_cluster;
-static bool boot_changed = false;
 
-static bool dirbrowse(char *root, int *dirfilter);
+static bool dirbrowse(char *root);
 
 void browse_root(void)
 {
 #ifndef SIMULATOR
-    dirbrowse("/", &global_settings.dirfilter);
+    dirbrowse("/");
 #else
-    if (!dirbrowse("/", &global_settings.dirfilter)) {
+    if (!dirbrowse("/")) {
         DEBUGF("No filesystem found. Have you forgotten to create it?\n");
     }
 #endif
 }
 
 
-#ifdef HAVE_LCD_BITMAP
-
-/* pixel margins */
-#define MARGIN_X (global_settings.scrollbar && \
-                  filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \
-                  CURSOR_WIDTH + (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0)
-#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
-
-/* position the entry-list starts at */
-#define LINE_X   0 
-#define LINE_Y   (global_settings.statusbar ? 1 : 0)
-
-#define CURSOR_X (global_settings.scrollbar && \
-                  filesindir > tree_max_on_screen ? 1 : 0)
-#define CURSOR_Y 0 /* the cursor is not positioned in regard to
-                      the margins, so this is the amount of lines
-                      we add to the cursor Y position to position
-                      it on a line */
-#define CURSOR_WIDTH  (global_settings.invert_cursor ? 0 : 4)
-
-#define ICON_WIDTH    6
-
-#define SCROLLBAR_X      0
-#define SCROLLBAR_Y      lcd_getymargin()
-#define SCROLLBAR_WIDTH  6
-
-extern unsigned char bitmap_icons_6x8[LastIcon][6];
-
-#else /* HAVE_LCD_BITMAP */
-
-#define TREE_MAX_ON_SCREEN   2
-#define TREE_MAX_LEN_DISPLAY 11 /* max length that fits on screen */
-#define LINE_X      2 /* X position the entry-list starts at */
+#define TREE_MAX_ON_SCREEN   4
+#define TREE_MAX_LEN_DISPLAY 19 /* max length that fits on screen */
+#define LINE_X      1 /* X position the entry-list starts at */
 #define LINE_Y      0 /* Y position the entry-list starts at */
 
 #define CURSOR_X    0
 #define CURSOR_Y    0 /* not really used for players */
 
-#endif /* HAVE_LCD_BITMAP */
-
-#ifdef HAVE_RECORDER_KEYPAD
 #define TREE_NEXT  BUTTON_DOWN
 #define TREE_PREV  BUTTON_UP
 #define TREE_EXIT  BUTTON_LEFT
 #define TREE_ENTER BUTTON_RIGHT
-#define TREE_MENU  BUTTON_F1
-#else
-#define TREE_NEXT  BUTTON_RIGHT
-#define TREE_PREV  BUTTON_LEFT
-#define TREE_EXIT  BUTTON_STOP
-#define TREE_ENTER BUTTON_PLAY
 #define TREE_MENU  BUTTON_MENU
-#endif /* HAVE_RECORDER_KEYPAD */
 
-static int build_playlist(int start_index)
+/*static int build_playlist(int start_index)
 {
     int i;
     int start=start_index;
@@ -199,15 +92,15 @@
                 break;
         }
         else
-        {
+        {*/
             /* Adjust the start index when se skip non-MP3 entries */
-            if(i < start)
+/*            if(i < start)
                 start_index--;
         }
     }
 
     return start_index;
-}
+    }*/
 
 static int compare(const void* p1, const void* p2)
 {
@@ -223,18 +116,13 @@
         return ( e2->attr & ATTR_DIRECTORY ) - ( e1->attr & ATTR_DIRECTORY );
 }
 
-static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
+static void showfileline(int line, int direntry, bool scroll)
 {
     char* name = dircache[direntry].name;
     int xpos = LINE_X;
 
-#ifdef HAVE_LCD_CHARCELLS
-    if (!global_settings.show_icons)
-        xpos--;
-#endif
-
     /* if any file filter is on, strip the extension */
-    if (*dirfilter != SHOW_ALL && 
+    if (global_settings.dirfilter != SHOW_ALL && 
         !(dircache[direntry].attr & ATTR_DIRECTORY))
     {
         char* dotpos = strrchr(name, '.');
@@ -244,11 +132,6 @@
             *dotpos = 0;
         }
         if(scroll)
-#ifdef HAVE_LCD_BITMAP
-            if (global_settings.invert_cursor)
-                lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
-            else
-#endif
                 lcd_puts_scroll(xpos, line, name);
         else
             lcd_puts(xpos, line, name);
@@ -257,11 +140,6 @@
     }
     else {
         if(scroll)
-#ifdef HAVE_LCD_BITMAP
-            if (global_settings.invert_cursor)
-                lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
-            else
-#endif
                 lcd_puts_scroll(xpos, line, name);
         else
             lcd_puts(xpos, line, name);
@@ -269,7 +147,7 @@
 }
 
 /* load sorted directory into dircache.  returns NULL on failure. */
-struct entry* load_and_sort_directory(char *dirname, int *dirfilter,
+struct entry* load_and_sort_directory(char *dirname, int dirfilter,
                                       int *num_files, bool *buffer_full)
 {
     int i;
@@ -307,57 +185,62 @@
         }
         
         /* filter out dotfiles and hidden files */
-        if (*dirfilter != SHOW_ALL &&
+        if (dirfilter != SHOW_ALL &&
             ((entry->d_name[0]=='.') ||
             (entry->attribute & ATTR_HIDDEN))) {
             i--;
             continue;
         }
         
-        dptr->attr = entry->attribute;
-        
-        /* check for known file types */
-        if ( !(dptr->attr & ATTR_DIRECTORY) && (len > 4) ) 
-        {
-            unsigned j;
-            for (j=0; j<sizeof(filetypes)/sizeof(*filetypes); j++)
-            {
-                if (!strcasecmp(
-                    &entry->d_name[len-strlen(filetypes[j].extension)],
-                    filetypes[j].extension))
-                {
-                    dptr->attr |= filetypes[j].tree_attr;
-                    break;
-                }
+        if (len >4) {
+            if (!strcasecmp(&entry->d_name[len-4],".mpf") ||
+                !strcasecmp(&entry->d_name[len-4],".mps") ||
+                !strcasecmp(&entry->d_name[len-4],".mpl")) {
+                i--;
+                continue;
             }
         }
 
-        /* memorize/compare details about the boot file */
-        if ((currdir[1] == 0) && !strcasecmp(entry->d_name, BOOTFILE)) {
-            if (boot_size) {
-                if ((entry->size != boot_size) ||
-                    (entry->startcluster != boot_cluster))
-                    boot_changed = true;
+        dptr->attr = entry->attribute;
+        
+        /* mark mp? and m3u files as such */
+        if ( !(dptr->attr & ATTR_DIRECTORY) && (len > 4) ) {
+            if (!strcasecmp(&entry->d_name[len-4], ".mp3") ||
+                (!strcasecmp(&entry->d_name[len-4], ".mp2")) ||
+                (!strcasecmp(&entry->d_name[len-4], ".mpa")))
+                dptr->attr |= TREE_ATTR_MPA;
+            else if (!strcasecmp(&entry->d_name[len-4], ".m3u"))
+                dptr->attr |= TREE_ATTR_M3U;
+            else if (!strcasecmp(&entry->d_name[len-4], ".cfg"))
+                dptr->attr |= TREE_ATTR_CFG;
+            else if (!strcasecmp(&entry->d_name[len-4], ".wps"))
+                dptr->attr |= TREE_ATTR_WPS;
+            else if (!strcasecmp(&entry->d_name[len-4], ".txt"))
+                dptr->attr |= TREE_ATTR_TXT;
+            else if (!strcasecmp(&entry->d_name[len-4], ".lng"))
+                dptr->attr |= TREE_ATTR_LNG;
+            else if (!strcasecmp(&entry->d_name[len-5], ".neo"))
+                dptr->attr |= TREE_ATTR_NEO; }
+        
+        /* filter out all non-playlist files */
+        if ( dirfilter == SHOW_PLAYLIST &&
+            (!(dptr->attr &
+            (ATTR_DIRECTORY|TREE_ATTR_M3U))) ) {
+            i--;
+            continue;
             }
-            boot_size = entry->size;
-            boot_cluster = entry->startcluster;
+        
+        /* filter out non-music files */
+        if ( dirfilter == SHOW_MUSIC &&
+            (!(dptr->attr &
+            (ATTR_DIRECTORY|TREE_ATTR_MPA|TREE_ATTR_M3U))) ) {
+            i--;
+            continue;
         }
 
-        /* filter out non-visible files */
-        if (!(dptr->attr & ATTR_DIRECTORY) && (
-            (*dirfilter == SHOW_PLAYLIST &&
-             (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_M3U) ||
-            ((*dirfilter == SHOW_MUSIC &&
-             (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_MPA) &&
-             (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_M3U) ||
-            (*dirfilter == SHOW_SUPPORTED && !(dptr->attr & TREE_ATTR_MASK)) ||
-            (*dirfilter == SHOW_WPS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_WPS) ||
-            (*dirfilter == SHOW_CFG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_CFG) ||
-            (*dirfilter == SHOW_LNG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_LNG) ||
-            (*dirfilter == SHOW_MOD && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_MOD) ||
-            (*dirfilter == SHOW_FONT && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_FONT) ||
-            (*dirfilter == SHOW_PLUGINS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_ROCK)))
-        {
+        /* filter out non-supported files */
+        if ( dirfilter == SHOW_SUPPORTED &&
+            (!(dptr->attr & TREE_ATTR_MASK)) ) {
             i--;
             continue;
         }
@@ -380,34 +263,22 @@
     return dircache;
 }
 
-static int showdir(char *path, int start, int *dirfilter)
+static int showdir(char *path, int start)
 {
-    int icon_type = 0;
+//    int icon_type = 0;
     int i;
     int tree_max_on_screen;
     bool dir_buffer_full;
 
-#ifdef HAVE_LCD_BITMAP
-    int line_height;
-    int fw, fh;
-    lcd_setfont(FONT_UI);
-    lcd_getstringsize("A", &fw, &fh);
-    tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-    line_height = fh;
-#else
     tree_max_on_screen = TREE_MAX_ON_SCREEN;
-#endif
 
     /* new dir? cache it */
     if (strncmp(path,lastdir,sizeof(lastdir)) || reload_dir) {
-        if (!load_and_sort_directory(path, dirfilter,
+        if (!load_and_sort_directory(path, global_settings.dirfilter,
                 &filesindir, &dir_buffer_full))
             return -1;
 
         if ( dir_buffer_full || filesindir == max_files_in_dir ) {
-#ifdef HAVE_LCD_CHARCELLS
-            lcd_double_height(false);
-#endif
             lcd_clear_display();
             lcd_puts(0,0,str(LANG_SHOWDIR_ERROR_BUFFER));
             lcd_puts(0,1,str(LANG_SHOWDIR_ERROR_FULL));
@@ -463,75 +334,58 @@
         dirstart = start;
     }
 
-#ifdef HAVE_LCD_CHARCELLS
     lcd_stop_scroll();
-    lcd_double_height(false);
-#endif
     lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
-    lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
-    lcd_setfont(FONT_UI);
-#endif
 
     for ( i=start; i < start+tree_max_on_screen; i++ ) {
         int len;
-        unsigned j;
 
         if ( i >= filesindir )
             break;
 
         len = strlen(dircache[i].name);
 
-        if (dircache[i].attr & ATTR_DIRECTORY)
-        {
-            icon_type = Folder;
-        }
-        else
-        {
-            /* search which icon to use */
-            icon_type = -1; /* default to none */
-            for (j=0; j<sizeof(filetypes)/sizeof(*filetypes); j++)
-            {
-                if ((dircache[i].attr & TREE_ATTR_MASK) == filetypes[j].tree_attr)
-                {
-                    icon_type = filetypes[j].icon;
+/*        switch ( dircache[i].attr & TREE_ATTR_MASK ) {
+            case ATTR_DIRECTORY:
+//                icon_type = Folder;
                     break;
-                }
-            }
 
-            if (icon_type == -1)
-            {
-#ifdef HAVE_LCD_BITMAP
-                icon_type = 0;
-#else
-                icon_type = Unknown;
-#endif
-            }
-        }
+            case TREE_ATTR_M3U:
+//                icon_type = Playlist;
+                break;
+
+            case TREE_ATTR_MPA:
+//                icon_type = File;
+                break;
+
+            case TREE_ATTR_WPS:
+//                icon_type = Wps;
+                break;
+
+            case TREE_ATTR_CFG:
+//                icon_type = Config;
+                break;
+
+            case TREE_ATTR_TXT:
+//                icon_type = Text;
+                break;
+
+            case TREE_ATTR_LNG:
+//                icon_type = Language;
+                break;
+
+            case TREE_ATTR_NEO:
+//                icon_type = Plugin;
+                break;
+
+//            default:
+//                icon_type = Unknown;
+}*/
 
-        if (icon_type && global_settings.show_icons) {
-#ifdef HAVE_LCD_BITMAP
-            int offset=0;
-            if ( line_height > 8 )
-                offset = (line_height - 8) / 2;
-            lcd_bitmap(bitmap_icons_6x8[icon_type], 
-                       CURSOR_X * 6 + CURSOR_WIDTH, 
-                       MARGIN_Y+(i-start)*line_height + offset,
-                       6, 8, true);
-#else
-            lcd_putc(LINE_X-1, i-start, icon_type);
-#endif
-        }
 
-        showfileline(i-start, i, false, dirfilter); /* no scroll */
+        showfileline(i-start, i, false); /* no scroll */
     }
 
-#ifdef HAVE_LCD_BITMAP
-    if (global_settings.scrollbar && (filesindir > tree_max_on_screen)) 
-        scrollbar(SCROLLBAR_X, SCROLLBAR_Y, SCROLLBAR_WIDTH - 1,
-                  LCD_HEIGHT - SCROLLBAR_Y, filesindir, start,
-                  start + tree_max_on_screen, VERTICAL);
-#endif
     status_draw(true);
     return filesindir;
 }
@@ -540,43 +394,22 @@
 {
     bool stop = false;
     
-#ifdef HAVE_LCD_CHARCELLS
-    lcd_double_height(false);
-#endif
-
     /* always resume? */
     if ( global_settings.resume == RESUME_ON )
         return true;
 
     lcd_clear_display();
-    lcd_puts(0,0,str(LANG_RESUME_ASK));
-#ifdef HAVE_LCD_CHARCELLS
+    lcd_puts_fmt(0,1,str(LANG_RESUME_ASK),FMT_CENTER);
     status_draw(false);
-    lcd_puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
-#else
-    lcd_puts(0,1,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
-    lcd_puts(0,2,str(LANG_CANCEL_WITH_ANY_RECORDER));
-#endif
+    lcd_puts_fmt(0,2,str(LANG_RESUME_CONFIRM_PLAYER),FMT_CENTER);
     lcd_update();
 
     while (!stop) {
         switch (button_get(true)) {
+            case BUTTON_IR | IR_BUTTON_PLAY:
             case BUTTON_PLAY:
-            case BUTTON_RC_PLAY:
                 return true;
 
-                /* ignore the ON button, since it might
-                   still be pressed since booting */
-            case BUTTON_ON:
-            case BUTTON_ON | BUTTON_REL:
-            case BUTTON_ON | BUTTON_REPEAT:
-                break;
-                
-            case SYS_USB_CONNECTED:
-                usb_screen();
-                stop = true;
-                break;
-
             default:
                 stop = true;
                 break;
@@ -591,19 +424,6 @@
     return false;
 }
 
-/* load tracks from specified directory to resume play */
-void resume_directory(char *dir)
-{
-    bool buffer_full;
-
-    if (!load_and_sort_directory(dir, &global_settings.dirfilter, &filesindir,
-            &buffer_full))
-        return;
-    lastdir[0] = 0;
-    
-    build_playlist(0);
-}
-
 /* Returns the current working directory and also writes cwd to buf if
    non-NULL.  In case of error, returns NULL. */
 char *getcwd(char *buf, int size)
@@ -694,111 +514,7 @@
     }
 }
 
-static bool handle_on(int *ds, int *dc, int numentries, int tree_max_on_screen, int *dirfilter)
-{
-    bool exit = false;
-    bool used = false;
-
-    int dirstart = *ds;
-    int dircursor = *dc;
-    char buf[MAX_PATH];
-
-#ifdef HAVE_LCD_BITMAP
-    int fw, fh;
-    lcd_getstringsize("A", &fw, &fh);
-#endif
-
-    while (!exit) {
-        switch (button_get(true)) {
-            case TREE_PREV:
-            case BUTTON_RC_LEFT:
-            case BUTTON_ON | TREE_PREV:
-            case BUTTON_ON | TREE_PREV | BUTTON_REPEAT:
-                used = true;
-                if ( dirstart ) {
-                    dirstart -= tree_max_on_screen;
-                    if ( dirstart < 0 )
-                        dirstart = 0;
-                }
-                else
-                    dircursor = 0;
-                break;
-                
-            case TREE_NEXT:
-            case BUTTON_RC_RIGHT:
-            case BUTTON_ON | TREE_NEXT:
-            case BUTTON_ON | TREE_NEXT | BUTTON_REPEAT:
-                used = true;
-                if ( dirstart < numentries - tree_max_on_screen ) {
-                    dirstart += tree_max_on_screen;
-                    if ( dirstart > 
-                         numentries - tree_max_on_screen )
-                        dirstart = numentries - tree_max_on_screen;
-                }
-                else
-                    dircursor = numentries - dirstart - 1;
-                break;
-
-
-            case BUTTON_PLAY:
-            case BUTTON_RC_PLAY:
-            case BUTTON_ON | BUTTON_PLAY: {
-                int onplay_result;
-
-                if (currdir[1])
-                    snprintf(buf, sizeof buf, "%s/%s",
-                             currdir, dircache[dircursor+dirstart].name);
-                else
-                    snprintf(buf, sizeof buf, "/%s",
-                             dircache[dircursor+dirstart].name);
-                onplay_result = onplay(buf,
-                    dircache[dircursor+dirstart].attr);
-                switch (onplay_result)
-                {
-                    case ONPLAY_OK:
-                        used = true;
-                        break;
-                    case ONPLAY_RELOAD_DIR:
-                        reload_dir = 1;
-                        used = true;
-                        break;
-                    case ONPLAY_START_PLAY:
-                        used = false; /* this will enable the wps */
-                        break;
-                }
-                exit = true;
-                break;
-            }    
-            case BUTTON_ON | BUTTON_REL:
-            case BUTTON_ON | TREE_PREV | BUTTON_REL:
-            case BUTTON_ON | TREE_NEXT | BUTTON_REL:
-                exit = true;
-                break;
-        }
-        if ( used && !exit ) {
-#ifdef HAVE_LCD_BITMAP
-            int xpos,ypos;
-#endif
-            showdir(currdir, dirstart, dirfilter);
-#ifdef HAVE_LCD_BITMAP
-            if (global_settings.invert_cursor) {
-                xpos = lcd_getxmargin();
-                ypos = (CURSOR_Y + dircursor) * fh + lcd_getymargin();
-                lcd_invertrect(xpos, ypos, LCD_WIDTH-xpos, fh);
-            }
-            else
-#endif
-                put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
-            lcd_update();
-        }
-    }
-    *ds = dirstart;
-    *dc = dircursor;
-
-    return used;
-}
-
-static bool dirbrowse(char *root, int *dirfilter)
+static bool dirbrowse(char *root)
 {
     int numentries=0;
     char buf[MAX_PATH];
@@ -807,22 +523,15 @@
     int button;
     int tree_max_on_screen;
     bool reload_root = false;
-    int lastfilter = *dirfilter;
+    int lastfilter = global_settings.dirfilter;
     bool lastsortcase = global_settings.sort_case;
     int lastdircursor=-1;
     bool need_update = true;
-    bool exit_func = false;
+
     bool update_all = false; /* set this to true when the whole file list
                                 has been refreshed on screen */
 
-#ifdef HAVE_LCD_BITMAP
-    int fw, fh;
-    lcd_setfont(FONT_UI);
-    lcd_getstringsize("A", &fw, &fh);
-    tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-#else
     tree_max_on_screen = TREE_MAX_ON_SCREEN;
-#endif
 
     dircursor=0;
     dirstart=0;
@@ -830,19 +539,11 @@
 
     memcpy(currdir,root,sizeof(currdir));
 
-    if (*dirfilter < NUM_FILTER_MODES)
         start_resume(true);
 
-    numentries = showdir(currdir, dirstart, dirfilter);
+    numentries = showdir(currdir, dirstart);
     if (numentries == -1) 
         return false;  /* currdir is not a directory */
-    
-    if (*dirfilter > NUM_FILTER_MODES && numentries==0)
-    {
-        splash(HZ*2, 0, true, str(LANG_NO_FILES));
-        return false;  /* No files found for rockbox_browser() */
-    }
-    
     update_all = true;
 
     put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
@@ -854,29 +555,11 @@
 
         button = button_get_w_tmo(HZ/5);
 
-#ifndef SIMULATOR
-        if (boot_changed) {
-            lcd_clear_display();
-            lcd_puts(0,0,str(LANG_BOOT_CHANGED));
-            lcd_puts(0,1,str(LANG_REBOOT_NOW));
-#ifdef HAVE_LCD_BITMAP
-            lcd_puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
-            lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER));
-            lcd_update();
-#endif
-            if (button_get(true) == BUTTON_PLAY)
-                rolo_load("/" BOOTFILE);
-            restore = true;
-            boot_changed = false;
-        }
-#endif
-
         switch ( button ) {
             case TREE_EXIT:
-            case BUTTON_RC_STOP:
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_LEFT | BUTTON_REPEAT:
-#endif
+            case TREE_EXIT | BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_REWIND:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
                 i=strlen(currdir);
                 if (i>1) {
                     while (currdir[i-1]!='/')
@@ -900,43 +583,22 @@
 
                     restore = true;
                 }
-                if (*dirfilter > NUM_FILTER_MODES)
-                    exit_func = true;
                 break;
 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_OFF:
-                mpeg_stop();
-                status_set_playmode(STATUS_STOP);
-                status_draw(false);
-                restore = true;
-                break;
-
-            case BUTTON_OFF | BUTTON_REL:
-#else
             case BUTTON_STOP | BUTTON_REL:
-#endif
+            case BUTTON_IR | IR_BUTTON_STOP | BUTTON_REL:
                 settings_save();
                 break;
                 
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_OFF | BUTTON_REPEAT:
-#else
-            case BUTTON_STOP | BUTTON_REPEAT:
-#endif
-                if (charger_inserted()) {
-                    charging_splash();
-                    restore = true;
-                }
-                break;
-
-            case TREE_ENTER:
-            case TREE_ENTER | BUTTON_REPEAT:
-            case BUTTON_RC_PLAY:
-#ifdef HAVE_RECORDER_KEYPAD
             case BUTTON_PLAY:
             case BUTTON_PLAY | BUTTON_REPEAT: 
-#endif
+            case BUTTON_IR | IR_BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY | IR_BUTTON_REPEAT:
+            {
+                int seed = current_tick;
+                bool play = false;
+                int start_index=0;
+                
                 if ( !numentries )
                     break;
                 if (currdir[1])
@@ -945,6 +607,8 @@
                     snprintf(buf,sizeof(buf),"/%s",file->name);
 
                 if (file->attr & ATTR_DIRECTORY) {
+                    if (playlist_create(buf, NULL) != -1)
+                    {
                     memcpy(currdir,buf,sizeof(currdir));
                     if ( dirlevel < MAX_DIR_LEVELS ) {
                         dirpos[dirlevel] = dirstart;
@@ -953,12 +617,23 @@
                     dirlevel++;
                     dircursor=0;
                     dirstart=0;
+                        
+                        lcd_clear_display();
+                        lcd_puts(0,0,str(LANG_CREATING));
+                        lcd_puts_scroll(0,1,"dynamic playlist");
+                        lcd_update();
+
+                        
+                        playlist_insert_directory(buf, PLAYLIST_INSERT_LAST, false, true);
+                        if (global_settings.playlist_shuffle)
+                        {
+                            start_index=playlist_shuffle(seed,0);
                 }
-                else {
-                    int seed = current_tick;
-                    bool play = false;
-                    int start_index=0;
 
+                        playlist_start(start_index, 0);
+                        play = true;
+                    }
+                } else if (!(file->attr & ATTR_DIRECTORY)) {
                     lcd_stop_scroll();
                     switch ( file->attr & TREE_ATTR_MASK ) {
                         case TREE_ATTR_M3U:
@@ -975,21 +650,8 @@
                         case TREE_ATTR_MPA:
                             if (playlist_create(currdir, NULL) != -1)
                             {
-                                start_index =
-                                    build_playlist(dircursor+dirstart);
-                                if (global_settings.playlist_shuffle)
-                                {
-                                    start_index =
-                                        playlist_shuffle(seed,start_index);
-                                    
-                                    /* when shuffling dir.: play all files
-                                       even if the file selected by user is
-                                       not the first one */
-                                    if (!global_settings.play_selected)
-                                        start_index = 0;
-                                }
-                                
-                                playlist_start(start_index, 0);
+                                playlist_add(file->name);
+                                playlist_start(0, 0);
                                 play = true;
                             }
                             break;
@@ -1008,25 +670,12 @@
                             lcd_clear_display();
                             lcd_puts(0,0,str(LANG_SETTINGS_LOADED1));
                             lcd_puts(0,1,str(LANG_SETTINGS_LOADED2));
-#ifdef HAVE_LCD_BITMAP
-                            lcd_update();
-
-                            /* maybe we have a new font */
-                            lcd_getstringsize("A", &fw, &fh);
-                            tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-                            /* make sure cursor is on screen */
-                            while ( dircursor > tree_max_on_screen ) 
-                            {
-                                dircursor--;
-                                dirstart++;
-                            }
-#endif
                             sleep(HZ/2);
                             restore = true;
                             break;
 
                         case TREE_ATTR_TXT:
-                            plugin_load("/.rockbox/rocks/viewer.rock",buf);
+                            plugin_load("/.openneo/plugins/viewer.plg",buf);
                             restore = true;
                             break;
 
@@ -1039,45 +688,140 @@
                             }
                             break;
 
-#ifdef HAVE_LCD_BITMAP
-                            /* chip-8 game */
-                        case TREE_ATTR_CH8:
-                            plugin_load("/.rockbox/rocks/chip8.rock",buf);
+                            /* plugin file */
+                        case TREE_ATTR_NEO:
+                            if (plugin_load(buf,NULL) == PLUGIN_OK)
+                                restore = true;
                             break; 
+                    }
+                }
 
-                        case TREE_ATTR_FONT:
-                            font_load(buf);
-                            set_file(buf, global_settings.font_file,
-                                     MAX_FILENAME);
+                if ( play ) {
+                    if ( global_settings.resume ) {
+                        /* the resume_index must always be the index in the
+                           shuffled list in case shuffle is enabled */
+                        global_settings.resume_index = start_index;
+                        global_settings.resume_offset = 0;
+                        settings_save();
+                    }
 
-                            lcd_getstringsize("A", &fw, &fh);
-                            tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-                            /* make sure cursor is on screen */
-                            while ( dircursor > tree_max_on_screen ) {
-                                dircursor--;
-                                dirstart++;
+                    status_set_playmode(STATUS_PLAY);
+                    status_draw(false);
+                    lcd_stop_scroll();
+                    wps_show();
+                }
                             }
                             restore = true;
                             break;
-#endif
 
-#ifndef SIMULATOR
-                            /* firmware file */
-                        case TREE_ATTR_MOD:
-                            rolo_load(buf);
+                
+            case TREE_ENTER:
+            case TREE_ENTER | BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
+                if ( !numentries )
                             break;
+                if (currdir[1])
+                    snprintf(buf,sizeof(buf),"%s/%s",currdir, file->name);
+                else
+                    snprintf(buf,sizeof(buf),"/%s",file->name);
 
-                            /* ucl flash file */
-                        case TREE_ATTR_UCL:
-                            plugin_load("/.rockbox/rocks/rockbox_flash.rock",buf);
+                if (file->attr & ATTR_DIRECTORY) {
+                    memcpy(currdir,buf,sizeof(currdir));
+                    if ( dirlevel < MAX_DIR_LEVELS ) {
+                        dirpos[dirlevel] = dirstart;
+                        cursorpos[dirlevel] = dircursor;
+                    }
+                    dirlevel++;
+                    dircursor=0;
+                    dirstart=0;
+                }
+                else {
+                    int seed = current_tick;
+                    bool play = false;
+                    int start_index=0;
+
+                    lcd_stop_scroll();
+                    switch ( file->attr & TREE_ATTR_MASK ) {
+                        case TREE_ATTR_M3U:
+                            if (mpeg_status() & MPEG_STATUS_PLAY) {
+                                playlist_insert_playlist(buf,
+                                                         PLAYLIST_INSERT_LAST,
+                                                         false);
+                                if (global_settings.playlist_shuffle) {
+                                    start_index =
+                                        playlist_randomise(seed,true);
+                                }
+                            } else {
+                                if (playlist_create(currdir, file->name) != -1) {
+                                    if (global_settings.playlist_shuffle)
+                                        playlist_shuffle(seed, -1);
+                                    start_index = 0;
+                                    playlist_start(start_index,0);
+                                }
+                            }
+                            play = true;
+                            break;
+                            
+                        case TREE_ATTR_MPA:
+                            if (mpeg_status() & MPEG_STATUS_PLAY) {
+                                playlist_insert_track(buf,
+                                                      PLAYLIST_INSERT_LAST,
+                                                      false);
+
+                                if (global_settings.playlist_shuffle) {
+                                    start_index =
+                                        playlist_randomise(seed,true);
+                                }
+                            } else {
+                                if (playlist_create(currdir, NULL) != -1) {
+                                    lcd_clear_display();
+                                    lcd_puts(0,0,str(LANG_CREATING));
+                                    lcd_puts_scroll(0,1,"dynamic playlist");
+                                    lcd_update();
+                                    
+                                    playlist_insert_directory(currdir, PLAYLIST_INSERT_LAST, false, true);
+                                    playlist_start(0, 0);
+                                }
+                                play = true;
+                            }
+                            break;
+
+                            /* wps config file */
+                        case TREE_ATTR_WPS:
+                            wps_load(buf,true);
+                            set_file(buf, global_settings.wps_file,
+                                     MAX_FILENAME);
+                            restore = true;
+                            break;
+
+                        case TREE_ATTR_CFG:
+                            if (!settings_load_config(buf))
+                                break;
+                            lcd_clear_display();
+                            lcd_puts(0,0,str(LANG_SETTINGS_LOADED1));
+                            lcd_puts(0,1,str(LANG_SETTINGS_LOADED2));
+                            sleep(HZ/2);
+                            restore = true;
+                            break;
+
+                        case TREE_ATTR_TXT:
+                            plugin_load("/.openneo/plugins/viewer.plg",buf);
+                            restore = true;
+                            break;
+
+                        case TREE_ATTR_LNG:
+                            if(!lang_load(buf)) {
+                                set_file(buf, global_settings.lang_file,
+                                         MAX_FILENAME);
+                                splash(HZ, 0, true, str(LANG_LANGUAGE_LOADED));
+                                restore = true;
+                            }
                             break; 
-#endif
 
                             /* plugin file */
-                        case TREE_ATTR_ROCK:
-                            if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED)
-                                reload_root = true;
-                            else
+                        case TREE_ATTR_NEO:
+                            if (plugin_load(buf,NULL) == PLUGIN_OK)
                                 restore = true;
                             break;
                     }
@@ -1087,29 +831,23 @@
                             /* the resume_index must always be the index in the
                                shuffled list in case shuffle is enabled */
                             global_settings.resume_index = start_index;
-                            global_settings.resume_offset = 0;
+                            global_settings.resume_offset = ((struct mp3entry *)(mpeg_current_track()))->elapsed;
                             settings_save();
                         }
 
                         status_set_playmode(STATUS_PLAY);
                         status_draw(false);
                         lcd_stop_scroll();
-                        if ( wps_show() == SYS_USB_CONNECTED ) {
-                            reload_root = true;
-                        }
-#ifdef HAVE_LCD_BITMAP
-                        tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-#endif
+                        wps_show();
                     }
-                    else if (*dirfilter > NUM_FILTER_MODES)
-                        exit_func = true;
                 }
                 restore = true;
                 break;
 
             case TREE_PREV:
             case TREE_PREV | BUTTON_REPEAT:
-            case BUTTON_RC_LEFT:
+            case BUTTON_IR | IR_BUTTON_VOLUP:
+            case BUTTON_IR | IR_BUTTON_VOLUP | IR_BUTTON_REPEAT:
                 if(filesindir) {
                     if(dircursor) {
                         put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, false);
@@ -1118,9 +856,15 @@
                     }
                     else {
                         if (dirstart) {
-                            dirstart--;
-                            numentries = showdir(currdir, dirstart, dirfilter);
+                            int oldstart=dirstart;
+                            dirstart-=TREE_MAX_ON_SCREEN-1;
+                            if (dirstart<0)
+                                dirstart=0;
+                            dircursor+=oldstart-dirstart;
+                            lastdircursor=dircursor;
+                            numentries = showdir(currdir, dirstart);
                             update_all=true;
+                            lasti=-1;
                             put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
                         }
                         else {
@@ -1134,7 +878,7 @@
                             else {
                                 dirstart = numentries - tree_max_on_screen;
                                 dircursor = tree_max_on_screen - 1;
-                                numentries = showdir(currdir, dirstart, dirfilter);
+                                numentries = showdir(currdir, dirstart);
                                 update_all = true;
                                 put_cursorxy(CURSOR_X, CURSOR_Y +
                                              tree_max_on_screen - 1, true);
@@ -1147,7 +891,8 @@
 
             case TREE_NEXT:
             case TREE_NEXT | BUTTON_REPEAT:
-            case BUTTON_RC_RIGHT:
+            case BUTTON_IR | IR_BUTTON_VOLDN:
+            case BUTTON_IR | IR_BUTTON_VOLDN | IR_BUTTON_REPEAT:
                 if(filesindir)
                 {
                     if (dircursor + dirstart + 1 < numentries ) {
@@ -1157,8 +902,11 @@
                             put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
                         } 
                         else {
-                            dirstart++;
-                            numentries = showdir(currdir, dirstart, dirfilter);
+                            dirstart+=TREE_MAX_ON_SCREEN-1;
+                            dircursor-=TREE_MAX_ON_SCREEN-1;
+                            lastdircursor=dircursor;
+                            numentries = showdir(currdir, dirstart);
+                            lasti=-1;
                             update_all = true;
                             put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
                         }
@@ -1171,7 +919,7 @@
                         } 
                         else {
                             dirstart = dircursor = 0;
-                            numentries = showdir(currdir, dirstart, dirfilter);
+                            numentries = showdir(currdir, dirstart);
                             update_all=true;
                             put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
                         }
@@ -1180,74 +928,24 @@
                 }
                 break;
 
-            case TREE_MENU:
-                if (*dirfilter < NUM_FILTER_MODES)
-                {
-                    lcd_stop_scroll();
-                    if (main_menu())
-                        reload_root = true;
-                    restore = true;
-                }
-                break;
-
-            case BUTTON_ON:
-                if (handle_on(&dirstart, &dircursor, numentries,
-                              tree_max_on_screen, dirfilter))
-                {
-                    /* start scroll */
-                    restore = true;
-                }
-                else
-                {
-                    if (mpeg_status() & MPEG_STATUS_PLAY)
-                    {
-                        lcd_stop_scroll();
-                        if (wps_show() == SYS_USB_CONNECTED)
-                            reload_root = true;
-#ifdef HAVE_LCD_BITMAP
-                        tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-#endif
-                        restore = true;
-                    }
-                    else
-                    {
-                        start_resume(false);
-                        restore = true;
-                    }
-                }
-                break;
-
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_F2:
-                if (*dirfilter < NUM_FILTER_MODES)
-                {
-                    if (f2_screen())
-                        reload_root = true;
+            case BUTTON_SELECT:
+	    case BUTTON_IR | IR_BUTTON_BROWSE:
+            case BUTTON_IR | IR_BUTTON_SETTING:
+                lcd_cancel_scroll();
+                wps_show();
                     restore = true;
                     break;
-                }
 
-            case BUTTON_F3:
-                if (*dirfilter < NUM_FILTER_MODES)
-                {
-                    if (f3_screen())
+            case TREE_MENU:
+            case BUTTON_IR | IR_BUTTON_EQ:
+                lcd_cancel_scroll();
+                if (main_menu())
                         reload_root = true;
-
-#ifdef HAVE_LCD_BITMAP
-                    tree_max_on_screen = (LCD_HEIGHT - MARGIN_Y) / fh;
-#endif
                     restore = true;
-                }
-                break;
-#endif
-
-            case SYS_USB_CONNECTED:
-                status_set_playmode(STATUS_STOP);
-                usb_screen();
-                reload_root = true;
                 break;
 
             case BUTTON_NONE:
+            case BUTTON_IR | IR_BUTTON_NONE:
                 status_draw(false);
                 break;
         }
@@ -1257,7 +955,7 @@
         
         /* do we need to rescan dir? */
         if (reload_dir || reload_root ||
-            lastfilter != *dirfilter ||
+            lastfilter != global_settings.dirfilter ||
             lastsortcase != global_settings.sort_case)
         {
             if ( reload_root ) {
@@ -1271,15 +969,11 @@
                 dirstart = 0;
                 lastdir[0] = 0;
             }
-
-            lastfilter = *dirfilter;
+            lastfilter = global_settings.dirfilter;
             lastsortcase = global_settings.sort_case;
             restore = true;
         }
 
-        if (exit_func)
-            break;
-
         if (restore || reload_dir) {
             /* restore display */
 
@@ -1289,13 +983,7 @@
                 dirstart++;
                 dircursor--;
             }
-#ifdef HAVE_LCD_BITMAP
-            /* the sub-screen might've ruined the margins */
-            lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and
-                                                  icon */
-            lcd_setfont(FONT_UI);
-#endif
-            numentries = showdir(currdir, dirstart, dirfilter);
+            numentries = showdir(currdir, dirstart);
             update_all = true;
             put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
             
@@ -1312,13 +1000,18 @@
 
                 /* So if lastdircursor and dircursor differ, and then full
                    screen was not refreshed, restore the previous line */
-                if ((lastdircursor != dircursor) && !update_all ) {
-                    showfileline(lastdircursor, lasti, false, dirfilter); /* no scroll */
+                if ((lastdircursor != dircursor) &&
+                     //skipped from button to top
+//                    ((lastdircursor==TREE_MAX_ON_SCREEN-1 && dircursor==0) ||
+                     //skipped from top to bottom
+//                     (lastdircursor==0 && dircursor==TREE_MAX_ON_SCREEN-1)) &&
+                    !update_all ) {
+                    showfileline(lastdircursor, lasti, false); /* no scroll */
                 }
                 lasti=i;
                 lastdircursor=dircursor;
 
-                showfileline(dircursor, i, true, dirfilter); /* scroll please */
+                showfileline(dircursor, i, true); /* scroll please */
                 need_update = true;
             }
         }
@@ -1340,13 +1033,11 @@
     bool abort = false;
     char buf[MAX_PATH/2]; /* saving a little stack... */
     DIR* dir;
+    int button;
     
     /* check for user abort */
-#ifdef HAVE_PLAYER_KEYPAD
-    if (button_get(false) == BUTTON_STOP)
-#else
-    if (button_get(false) == BUTTON_OFF)
-#endif
+    button=button_get(false);
+    if (button == BUTTON_STOP || button == (BUTTON_IR | IR_BUTTON_STOP))
         return true;
     
     dir = opendir(dirname);
@@ -1385,23 +1076,18 @@
 
                 plsize++;
                 snprintf(buf, sizeof buf, "%d", plsize);
-#ifdef HAVE_LCD_BITMAP
-                lcd_puts(0,4,buf);
-                lcd_update();
-#else
-                x = 10;
+                x = 12;
                 if (plsize > 999)
-                    x=7;
+                    x=9;
                 else {
                     if (plsize > 99)
-                        x=8;
+                        x=10;
                     else {
                         if (plsize > 9)
-                            x=9;
+                            x=11;
                     }
                 }
                 lcd_puts(x,0,buf);
-#endif
             }
         }
     }
@@ -1435,30 +1121,6 @@
     return true;
 }
 
-bool rockbox_browse(char *root, int dirfilter)
-{
-    bool rc;
-    int dircursor_save = dircursor;
-    int dirstart_save = dirstart;
-    int dirlevel_save = dirlevel;
-    int dirpos_save = dirpos[0];
-    int cursorpos_save = cursorpos[0];
-
-    memcpy(currdir_save, currdir, sizeof(currdir));
-    reload_dir = true;
-    rc = dirbrowse(root, &dirfilter);
-    memcpy(currdir, currdir_save, sizeof(currdir));
-
-    reload_dir = true;
-    dirstart = dirstart_save;
-    cursorpos[0] = cursorpos_save;
-    dirlevel = dirlevel_save;
-    dircursor = dircursor_save;
-    dirpos[0] = dirpos_save;
-
-    return false;
-}
-
 void tree_init(void)
 {
     /* We copy the settings value in case it is changed by the user. We can't
@@ -1468,4 +1130,21 @@
     
     name_buffer = buffer_alloc(name_buffer_size);
     dircache = buffer_alloc(max_files_in_dir * sizeof(struct entry));
+    //verify existance of config directory
+//    DIR *dir=opendir(OPENNEO_DIR);
+//    if (!dir) {
+//        splash(HZ,0,true,"Please create settings folder %s",OPENNEO_DIR);
+        //create it
+//        createdir(OPENNEO_DIR);
+//        dir=opendir(OPENNEO_DIR);
+//        if (!dir) {
+//            DEBUGF("Could not create %s for settings\n",OPENNEO_DIR);
+//        } else {
+//            DEBUGF("Created %s for settings.\n",OPENNEO_DIR);
+//            closedir(dir);
+//        }
+//    } else {
+//        DEBUGF("Settings directory already exists.\n");
+//        closedir(dir);
+//    }
 }
diff -rubBP /home/dast/src/rockbox/apps/tree.h ./apps/tree.h
--- /home/dast/src/rockbox/apps/tree.h	Mon Dec  8 17:02:34 2003
+++ ./apps/tree.h	Wed Oct 29 15:12:04 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: tree.h,v 1.11 2003/12/07 16:57:43 hohensoh Exp $
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _TREE_H_
 #define _TREE_H_
 
@@ -27,28 +9,24 @@
 };
 
 /* using attribute not used by FAT */
-#define TREE_ATTR_MPA  0x0100 /* mpeg audio file */
-#define TREE_ATTR_M3U  0x0200 /* playlist */
-#define TREE_ATTR_WPS  0x0300 /* wps config file */
-#define TREE_ATTR_MOD  0x0400 /* firmware file */
-#define TREE_ATTR_CFG  0x0500 /* config file */
-#define TREE_ATTR_TXT  0x0600 /* text file */
-#define TREE_ATTR_FONT 0x0700 /* font file */
-#define TREE_ATTR_LNG  0x0800 /* binary lang file */
-#define TREE_ATTR_ROCK 0x0900 /* binary rockbox plugin */
-#define TREE_ATTR_UCL  0x0A00 /* rockbox flash image */ 
-#define TREE_ATTR_CH8  0x0B00 /* chip-8 game */ 
-#define TREE_ATTR_MASK 0xFFC0 /* which bits tree.c uses (above) */
+#define TREE_ATTR_MPA 0x40 /* mpeg audio file */
+#define TREE_ATTR_M3U 0x80 /* playlist */
+#define TREE_ATTR_WPS 0x100 /* wps config file */
+#define TREE_ATTR_CFG 0x400 /* config file */
+#define TREE_ATTR_TXT 0x500 /* text file */
+#define TREE_ATTR_FONT 0x800 /* font file */
+#define TREE_ATTR_LNG  0x1000 /* binary lang file */
+#define TREE_ATTR_NEO 0x2000 /* binary Open Neo plugin */
+#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */
 
 void tree_init(void);
 void browse_root(void);
 void set_current_file(char *path);
-bool rockbox_browse(char *root, int dirfilter);
 bool create_playlist(void);
 void resume_directory(char *dir);
 char *getcwd(char *buf, int size);
 void reload_directory(void);
-struct entry* load_and_sort_directory(char *dirname, int *dirfilter,
+struct entry* load_and_sort_directory(char *dirname, int dirfilter,
                                       int *num_files, bool *buffer_full);
 
 #endif
diff -rubBP /home/dast/src/rockbox/apps/version.h ./apps/version.h
--- /home/dast/src/rockbox/apps/version.h	Mon Jul 15 15:34:36 2002
+++ ./apps/version.h	Mon Nov 24 03:52:09 2003
@@ -1,24 +1,7 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: version.h,v 1.4 2002/07/15 13:34:36 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _VERSION_H_
 #define _VERSION_H_
 
 extern char appsversion[];
+extern char appsbuild[];
 
 #endif
Only in /home/dast/src/rockbox/apps: win32.mak
diff -rubBP /home/dast/src/rockbox/apps/wps-display.c ./apps/wps-display.c
--- /home/dast/src/rockbox/apps/wps-display.c	Thu Dec  4 16:35:38 2003
+++ ./apps/wps-display.c	Tue Dec  2 21:59:15 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: wps-display.c,v 1.79 2003/12/04 14:06:00 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /* ID3 formatting based on code from the MAD Winamp plugin (in_mad.dll), 
  * Copyright (C) 2000-2001 Robert Leslie. 
  * See http://www.mars.org/home/rob/proj/mpeg/ for more information.
@@ -27,8 +8,7 @@
 #include <stdlib.h>
 
 #include "lcd.h"
-#include "hwcompat.h"
-#include "font.h"
+#include "lcd-charset.h"
 #include "mpeg.h"
 #include "id3.h"
 #include "settings.h"
@@ -40,34 +20,20 @@
 #include "debug.h"
 #include "mas.h"
 #include "lang.h"
-#include "powermgmt.h"
 #include "sprintf.h"
-#include "backlight.h"
 
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "widgets.h"
-#include "peakmeter.h"
-#endif
-
-#define WPS_CONFIG ROCKBOX_DIR "/default.wps"
-
-#ifdef HAVE_LCD_BITMAP
-#define MAX_LINES 10
-#else
-#define MAX_LINES 2
-#endif
+#define WPS_CONFIG OPENNEO_DIR "/default.wps"
+
+#define MAX_LINES 4
 
 #define FORMAT_BUFFER_SIZE 300
 
-#ifdef HAVE_LCD_CHARCELLS
-static unsigned char wps_progress_pat[8]={0,0,0,0,0,0,0,0};
+//static unsigned char wps_progress_pat[8]={0,0,0,0,0,0,0,0};
 static bool full_line_progressbar=0;
 static bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count);
-static void draw_player_fullbar(char* buf, int buf_size,
+static void draw_player_fullbar(char* buf, unsigned int buf_size,
                                 struct mp3entry* id3, int ff_rewwind_count);
 static char map_fullbar_char(char ascii_val);
-#endif
 
 static char format_buffer[FORMAT_BUFFER_SIZE];
 static char* format_lines[MAX_LINES];
@@ -113,14 +79,13 @@
 static void wps_format(char* fmt)
 {
     char* buf = format_buffer;
-    char* start_of_line = format_buffer;
     int line = 0;
     
     strncpy(format_buffer, fmt, sizeof(format_buffer));
     format_buffer[sizeof(format_buffer) - 1] = 0;
     format_lines[line] = buf;
     
-    while ((*buf) && (line < MAX_LINES))
+    while (*buf)
     {
         switch (*buf)
         {
@@ -131,34 +96,24 @@
             case '\n': /* LF */
                 *buf = 0;
 
-                if(*start_of_line != '#') /* A comment? */
-                    line++;
-                
-                if (line < MAX_LINES)
+                if (++line < MAX_LINES)
                 {
                     /* the next line starts on the next byte */
                     format_lines[line] = buf+1;
-                    start_of_line = format_lines[line];
                 }
                 break;
         }
         buf++;
     }
 
-    /* if supplied input didn't define a format line   
-       for each line on the wps, set the rest to null */
-    if (line < MAX_LINES)
-    {
-        /* if the final line didn't terminate with a newline,  
-           the line index wasn't incremented */
-        if (buf != format_lines[line])
+    if(buf != format_lines[line])
+        /* the last line didn't terminate with a newline */
             line++;
 
         for (; line < MAX_LINES; line++)
         {
             format_lines[line] = NULL;
         }
-    }
 }
 
 void wps_reset(void)
@@ -189,9 +144,6 @@
         if ( display ) {
             int i;
             lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
-            lcd_setmargins(0,0);
-#endif
             for (i=0; i<MAX_LINES && format_lines[i]; i++)
                 lcd_puts(0,i,format_lines[i]);
             lcd_update();
@@ -330,25 +282,7 @@
                     return NULL;
 
                 case 'v': /* id3 version */
-                    switch (id3->id3version) {
-                        case ID3_VER_1_0:
-                            return "1";
-
-                        case ID3_VER_1_1:
-                            return "1.1";
-
-                        case ID3_VER_2_2:
-                            return "2.2";
-
-                        case ID3_VER_2_3:
-                            return "2.3";
-
-                        case ID3_VER_2_4:
-                            return "2.4";
-
-                        default:
-                            return NULL;
-                    }
+		  return gets_id3_version(id3->id3version); 
             }
             break;
 
@@ -403,30 +337,19 @@
         case 'p':  /* Playlist/Song Information */
             switch(tag[1])
             {
-                case 'b':  /* progress bar */
-                    *flags |= WPS_REFRESH_PLAYER_PROGRESS;
-#ifdef HAVE_LCD_CHARCELLS
-                    snprintf(buf, buf_size, "%c", wps_progress_pat[0]);
-                    full_line_progressbar=0;
-                    return buf;
-#else
-                    return "\x01";
-#endif
+//                case 'b':  /* progress bar */
+//                    *flags |= WPS_REFRESH_PLAYER_PROGRESS;
+//                    snprintf(buf, buf_size, "%c", wps_progress_pat[0]);
+//                    full_line_progressbar=0;
+//                    return buf;
                 case 'f':  /* full-line progress bar */
-#ifdef HAVE_LCD_CHARCELLS
-                    if(has_new_lcd()) {
                         *flags |= WPS_REFRESH_PLAYER_PROGRESS;
                         *flags |= WPS_REFRESH_DYNAMIC;
                         full_line_progressbar=1;
-                        /* we need 11 characters (full line) for
+                    /* we need 20 characters (full line) for
                            progress-bar */
                         snprintf(buf, buf_size, "           ");
-                    } else {
-                        /* Tell the user if we have an OldPlayer */
-                        snprintf(buf, buf_size, " <Old LCD> ");
-                    }
                     return buf;
-#endif
                 case 'p':  /* Playlist Position */
                     *flags |= WPS_REFRESH_STATIC;
                     snprintf(buf, buf_size, "%d", playlist_get_display_index());
@@ -457,11 +380,6 @@
                     format_time(buf, buf_size, id3->length);
                     return buf;
 
-#ifdef HAVE_LCD_BITMAP
-                case 'm': /* Peak Meter */
-                    *flags |= WPS_REFRESH_PEAK_METER;
-                    return "\x01";
-#endif
                 case 's': /* shuffle */
                     if ( global_settings.playlist_shuffle )
                         return "s";
@@ -477,24 +395,6 @@
             }
             break;
 
-        case 'b': /* battery info */
-            switch (tag[1]) {
-                case 'l': /* battery level */
-                    snprintf(buf, buf_size, "%d%%", battery_level());
-                    return buf;
-
-                case 't': /* estimated battery time */
-                {
-                    int t = battery_time();
-                    if (t >= 0)
-                        snprintf(buf, buf_size, "%dh %dm", t / 60, t % 60);
-                    else
-                        strncpy(buf, "?h ?m", buf_size);
-                    return buf;
-                }
-            }
-            break;
-
         case 'd': /* Directory path information */
             {
                 int level = tag[1] - '0';
@@ -681,24 +581,10 @@
     unsigned char flags;
     int i;
     bool update_line;
-#ifdef HAVE_LCD_BITMAP
-    int h = font_get(FONT_UI)->height;
-    int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0;
-    /* to find out wether the peak meter is enabled we
-       assume it wasn't until we find a line that contains
-       the peak meter. We can't use peak_meter_enabled itself
-       because that would mean to turn off the meter thread 
-       temporarily. (That shouldn't matter unless yield 
-       or sleep is called but who knows...)
-    */
-    bool enable_pm = false;
-#endif
-#ifdef HAVE_LCD_CHARCELLS
-    for (i=0; i<8; i++) {
+/*    for (i=0; i<8; i++) {
        if (wps_progress_pat[i]==0)
            wps_progress_pat[i]=lcd_get_locked_pattern();
-    }
-#endif
+           }*/
 
     if (!id3)
     {
@@ -721,36 +607,6 @@
             format_display(buf, sizeof(buf), id3, format_lines[i], &flags);
             line_type[i] = flags;
             
-#ifdef HAVE_LCD_BITMAP
-            /* progress */
-            if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) {
-                int percent=
-                    id3->length?
-                    (id3->elapsed + ff_rewind_count) * 100 / id3->length:0;
-                slidebar(0, i*h + offset + 1, LCD_WIDTH, 6, 
-                         percent, Grow_Right);
-                update_line = true;
-            }
-            if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) {
-                /* peak meter */
-                int peak_meter_y;
-
-                update_line = true;
-                peak_meter_y = i * h + offset;
-
-                /* The user might decide to have the peak meter in the last 
-                   line so that it is only displayed if no status bar is 
-                   visible. If so we neither want do draw nor enable the
-                   peak meter. */
-                if (peak_meter_y + h <= LCD_HEIGHT) {
-                    /* found a line with a peak meter -> remember that we must
-                       enable it later */
-                    enable_pm = true;
-                    peak_meter_draw(0, peak_meter_y, LCD_WIDTH,
-                                    MIN(h, LCD_HEIGHT - peak_meter_y));
-                }
-            }
-#else
             /* progress */
             if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) {
                 if (full_line_progressbar)
@@ -759,7 +615,6 @@
                 else
                     draw_player_progress(id3, ff_rewind_count);
             }
-#endif
             if (flags & WPS_REFRESH_SCROLL) {
                 /* scroll line */
                 if (refresh_mode & WPS_REFRESH_SCROLL)  {
@@ -775,33 +630,8 @@
                 lcd_puts(0, i, buf);
             }
         }
-#ifdef HAVE_LCD_BITMAP
-        if (update_line) {
-            lcd_update_rect(0, i*h + offset, LCD_WIDTH, h);
-        }
-#endif
-    }
-#ifdef HAVE_LCD_BITMAP
-    /* Now we know wether the peak meter is used. 
-       So we can enable / disable the peak meter thread */
-    peak_meter_enabled = enable_pm;
-#endif
-
-#ifndef SIMULATOR
-    if (global_settings.caption_backlight && id3) {
-        /* turn on backlight n seconds before track ends, and turn it off n
-           seconds into the new track. n == backlight_timeout, or 5s */
-        int n = 
-            backlight_timeout_value[global_settings.backlight_timeout] * 1000;
-
-        if ( n < 1000 )
-            n = 5000; /* use 5s if backlight is always on or off */
- 
-        if ((id3->elapsed < 1000) ||
-            ((id3->length - id3->elapsed) < (unsigned)n))
-            backlight_on();
     }
-#endif
+
     return true;
 }
 
@@ -811,12 +641,7 @@
 
     if (!id3 && !(mpeg_status() & MPEG_STATUS_PLAY))
     {
-#ifdef HAVE_LCD_CHARCELLS
         lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER));
-#else
-        lcd_puts(0, 2, str(LANG_END_PLAYLIST_RECORDER));
-        lcd_update();
-#endif
         global_settings.resume_index = -1;
         status_set_playmode(STATUS_STOP);
         status_draw(true);
@@ -827,19 +652,13 @@
     {
         if (!wps_loaded) {
             if ( !format_buffer[0] ) {
-#ifdef HAVE_LCD_BITMAP
-                wps_format("%s%?it<%?in<%in. |>%it|%fn>\n"
-                           "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
-                           "%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>\n"
-                           "\n"
-                           "%pc/%pt [%pp:%pe]\n"
-                           "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
-                           "%pb\n"
-                           "%pm\n");
-#else
-                wps_format("%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
-                           "%pc%?ps<*|/>%pt\n");
-#endif
+//                wps_format("%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
+//                           "%pc%?ps<*|/>%pt\n");
+                wps_format("Vol:%pv %?ps<R| > (%pp/%pe)\n"
+                           "%s%?ia<%ia|%d1>\n"
+                           //"%s%it\n"
+                           "%s%?it<%it|%fn>\n"
+                           "%pf\n");
             }
         }
     }
@@ -850,7 +669,6 @@
     return false;
 }
 
-#ifdef HAVE_LCD_CHARCELLS
 static bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
 {
     char player_progressbar[7];
@@ -882,131 +700,46 @@
             player_progressbar[i] += binline[i*5+j];
         }
     }
-    lcd_define_pattern(wps_progress_pat[0], player_progressbar);
+//    lcd_define_pattern(wps_progress_pat[0], player_progressbar);
     return true;
 }
 
-static void draw_player_fullbar(char* buf, int buf_size,
+static void draw_player_fullbar(char* buf, unsigned int buf_size,
                                 struct mp3entry* id3, int ff_rewwind_count)
 {
-    int i,j,lcd_char_pos;
-
-    char player_progressbar[7];
-    char binline[36];
-    char numbers[12][4][3]={{{1,1,1},{1,0,1},{1,0,1},{1,1,1}},/*0*/
-                            {{0,1,0},{1,1,0},{0,1,0},{0,1,0}},/*1*/
-                            {{1,1,1},{0,0,1},{0,1,0},{1,1,1}},/*2*/
-                            {{1,1,1},{0,0,1},{0,1,1},{1,1,1}},/*3*/
-                            {{1,0,0},{1,1,0},{1,1,1},{0,1,0}},/*4*/
-                            {{1,1,1},{1,1,0},{0,0,1},{1,1,0}},/*5*/
-                            {{1,1,1},{1,0,0},{1,1,1},{1,1,1}},/*6*/
-                            {{1,1,1},{0,0,1},{0,1,0},{1,0,0}},/*7*/
-                            {{1,1,1},{1,1,1},{1,0,1},{1,1,1}},/*8*/
-                            {{1,1,1},{1,1,1},{0,0,1},{1,1,1}},/*9*/
-                            {{0,0,0},{0,1,0},{0,0,0},{0,1,0}},/*:*/
-                            {{0,0,0},{0,0,0},{0,0,0},{0,0,0}}};/*<blank>*/
-
-    int songpos = 0;
-    int digits[6];
-    int time;
+    unsigned int songpos,time,i;
+    unsigned int lcd_char_pos;
     char timestr[7];
     
-    for (i=0; i < buf_size; i++)
-        buf[i] = ' ';
-           
     if(id3->elapsed >= id3->length)
-        songpos = 55;
+        songpos = 0;
     else {
         if(wps_time_countup == false)
-            songpos = ((id3->elapsed - ff_rewwind_count) * 55) / id3->length;
+            songpos = (((id3->elapsed - ff_rewwind_count)*100) / id3->length);
         else
-            songpos = ((id3->elapsed + ff_rewwind_count) * 55) / id3->length;
+            songpos = (((id3->elapsed + ff_rewwind_count)*100) / id3->length);
     }
 
     time=(id3->elapsed + ff_rewind_count);
    
     memset(timestr, 0, sizeof(timestr));
+    //snprintf(timestr,sizeof(timestr),"%d", mas_MPEGframecount() );
     format_time(timestr, sizeof(timestr), time);
-    for(lcd_char_pos=0; lcd_char_pos<6; lcd_char_pos++) {
-        digits[lcd_char_pos] = map_fullbar_char(timestr[lcd_char_pos]);
-    }
 
-    /* build the progressbar-icons */
-    for (lcd_char_pos=0; lcd_char_pos<6; lcd_char_pos++) {
-        memset(binline, 0, sizeof binline);
-        memset(player_progressbar, 0, sizeof player_progressbar);
+    memset(buf,FULLGRID_CHAR,songpos/5);
+    memset(buf+(songpos/5),' ',20-(songpos/5));
 
-        /* make the character (progressbar & digit)*/
-        for (i=0; i<7; i++) {
-            for (j=0;j<5;j++) {
-                /* make the progressbar */
-                if (lcd_char_pos==(songpos/5)) {
-                    /* partial */
-                    if ((j<(songpos%5))&&(i>4))
-                        binline[i*5+j] = 1;
-                    else
-                        binline[i*5+j] = 0;
-                }
-                else {
-                    if (lcd_char_pos<(songpos/5)) {
-                        /* full character */
-                        if (i>4)
-                            binline[i*5+j] = 1;
-                    }
-                }
-                /* insert the digit */
-                if ((j<3)&&(i<4)) {
-                    if (numbers[digits[lcd_char_pos]][i][j]==1)
-                        binline[i*5+j] = 1;
-                }
-            }
-        }
+    if (songpos%5>0)
+        buf[songpos/5]=(PROGRESS1_CHAR-1)+songpos%5;
          
-        for (i=0; i<=6; i++) {
-            for (j=0;j<5;j++) {
-                player_progressbar[i] <<= 1;
-                player_progressbar[i] += binline[i*5+j];
-            }
-        }
+    unsigned int start=(9-strlen(timestr)/2)+1;
+    for (i=start;i<start+strlen(timestr) && i<buf_size;++i)
+        buf[i]=timestr[i-start];
        
-        lcd_define_pattern(wps_progress_pat[lcd_char_pos+1],player_progressbar);
-        buf[lcd_char_pos]=wps_progress_pat[lcd_char_pos+1];
-       
-    }
-
-    /* make rest of the progressbar if necessary */
-    if (songpos/5>5) {
-   
-        /* set the characters positions that use the full 5 pixel wide bar */
-        for (lcd_char_pos=6; lcd_char_pos < (songpos/5); lcd_char_pos++)
-            buf[lcd_char_pos] = 0x86; /* '_' */
-
-        /* build the partial bar character for the tail character position */
-        memset(binline, 0, sizeof binline);
-        memset(player_progressbar, 0, sizeof player_progressbar);
-
-        for (i=5; i<7; i++) {
-            for (j=0;j<5;j++) {
-                if (j<(songpos%5)) {
-                    binline[i*5+j] = 1;
-                }
-            }
-        }
-       
-        for (i=0; i<7; i++) {
-            for (j=0;j<5;j++) {
-                player_progressbar[i] <<= 1;
-                player_progressbar[i] += binline[i*5+j];
-            }
-        }
-       
-        lcd_define_pattern(wps_progress_pat[7],player_progressbar);
-           
-        buf[songpos/5]=wps_progress_pat[7];
-    }
+    return;
 }
 
-static char map_fullbar_char(char ascii_val)
+/*static char map_fullbar_char(char ascii_val)
 {
     if (ascii_val >= '0' && ascii_val <= '9') {
         return(ascii_val - '0');
@@ -1015,11 +748,9 @@
         return(10);
     }
     else
-        return(11); /* anything besides a number or ':' is mapped to <blank> */
+        return(11); /* anything besides a number or ':' is mapped to <blank>
 }
-
-
-#endif
+*/
 
 /* -----------------------------------------------------------------
  * vim: et sw=4 ts=8 sts=4 tw=78
diff -rubBP /home/dast/src/rockbox/apps/wps-display.h ./apps/wps-display.h
--- /home/dast/src/rockbox/apps/wps-display.h	Sat Feb 15 00:30:32 2003
+++ ./apps/wps-display.h	Wed Oct 29 15:12:05 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: wps-display.h,v 1.10 2003/02/11 15:03:26 zagor Exp $
- *
- * Copyright (C) 2002 Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef WPS_DISPLAY
 #define WPS_DISPLAY
 
diff -rubBP /home/dast/src/rockbox/apps/wps.c ./apps/wps.c
--- /home/dast/src/rockbox/apps/wps.c	Wed Nov 19 07:34:42 2003
+++ ./apps/wps.c	Tue Dec  2 21:59:15 2003
@@ -1,30 +1,12 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: wps.c,v 1.198 2003/11/03 00:28:23 linusnielsen Exp $
- *
- * Copyright (C) 2002 Jerome Kuptz
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 #include "file.h"
 #include "lcd.h"
-#include "font.h"
-#include "backlight.h"
+#include "lcd-charset.h"
 #include "button.h"
+#include "remote.h"
 #include "kernel.h"
 #include "tree.h"
 #include "debug.h"
@@ -33,17 +15,13 @@
 #include "wps.h"
 #include "wps-display.h"
 #include "mpeg.h"
-#include "usb.h"
 #include "status.h"
 #include "main_menu.h"
 #include "ata.h"
 #include "screens.h"
 #include "playlist.h"
-#ifdef HAVE_LCD_BITMAP
-#include "icons.h"
-#include "peakmeter.h"
-#endif
 #include "lang.h"
+
 #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ 
                                 /* 3% of 30min file == 54s step size */
 
@@ -47,13 +25,14 @@
 #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ 
                                 /* 3% of 30min file == 54s step size */
 
-bool keys_locked = false;
 static bool ff_rewind = false;
 static bool paused = false;
 static struct mp3entry* id3 = NULL;
 static char current_track_path[MAX_PATH+1];
+static bool muted = false;
+
+static void toggle_mute(void);
 
-#ifdef HAVE_PLAYER_KEYPAD
 void player_change_volume(int button)
 {
     bool exit = false;
@@ -94,59 +73,141 @@
         snprintf(buffer,sizeof(buffer),"Vol: %d %%       ", 
                  mpeg_val2phys(SOUND_VOLUME, global_settings.volume));
 
-#ifdef HAVE_LCD_CHARCELLS
         lcd_puts(0, 0, buffer);
-#else
-        lcd_puts(2, 3, buffer);
-        lcd_update();
-#endif
-        status_draw(false);
-
         if (!exit)
             button = button_get(true);
     }
+    status_draw(false);
     wps_refresh(id3,0, WPS_REFRESH_ALL);
 }
-#endif
 
-void display_keylock_text(bool locked)
+void display_mute_text(bool muted)
 {
-    char* s;
-    lcd_stop_scroll();
-#ifdef HAVE_LCD_CHARCELLS
-    if(locked)
-        s = str(LANG_KEYLOCK_ON_PLAYER);
-    else
-        s = str(LANG_KEYLOCK_OFF_PLAYER);
-#else
-    if(locked)
-        s = str(LANG_KEYLOCK_ON_RECORDER);
-    else
-        s = str(LANG_KEYLOCK_OFF_RECORDER);
-#endif
-    splash(HZ, 0, true, s);
+  lcd_clear_display();
+  lcd_puts_fmt(0, 1, muted?str(LANG_MUTE_ON_PLAYER):str(LANG_MUTE_OFF_PLAYER), FMT_CENTER);
+  sleep(HZ/2);
 }
 
-void display_mute_text(bool muted)
+bool show_song_info(void)
 {
+  int button;
+  int screen = 1;
+  int menu_max = 4;
+  bool exit = false;
+  char scroll_text[MAX_PATH];
+  
+  if (!(mpeg_status() & MPEG_STATUS_PLAY))
+    return false;
+
+  while(!exit){
+
     lcd_clear_display();
 
-#ifdef HAVE_LCD_CHARCELLS
-    if (muted)
-        lcd_puts(0, 0, str(LANG_MUTE_ON_PLAYER));
-    else
-        lcd_puts(0, 0, str(LANG_MUTE_OFF_PLAYER));
-#else
-    if (muted)
-        lcd_puts(2, 3, str(LANG_MUTE_ON_RECORDER));
+    switch( screen ) {
+    case 1:
+      lcd_puts_nopad( 0, 0, str(LANG_ID3_TITLE) );
+      lcd_puts_scroll( 0, 1, id3->title ? id3->title:str(LANG_ID3_NO_INFO) );
+      lcd_puts_nopad( 0, 2, str(LANG_ID3_ARTIST) );
+      lcd_puts_scroll( 0, 3, id3->artist ? id3->artist:str(LANG_ID3_NO_INFO) );
+      break;
+      
+    case 2:
+      lcd_puts_nopad( 0, 0, str(LANG_ID3_ALBUM) );
+      lcd_puts_scroll( 0, 1, id3->album ? id3->album:str(LANG_ID3_NO_INFO) );
+      lcd_puts_nopad( 0, 2, str(LANG_ID3_GENRE) );
+      
+      if( id3->genre_string )
+	lcd_puts_scroll( 0, 3, id3->genre_string );
     else
-        lcd_puts(2, 3, str(LANG_MUTE_OFF_RECORDER));
-    lcd_update();
-#endif
+	lcd_puts_scroll( 0, 3, wps_get_genre(id3->genre)? wps_get_genre(id3->genre):str(LANG_ID3_NO_INFO));
+      break;
     
-    sleep(HZ);
-}
+    case 3:
+      
+      if( id3->track_string )
+	strcpy( scroll_text,id3->track_string);
+      else if(id3->tracknum)
+	snprintf(scroll_text,sizeof(scroll_text), "%d", id3->tracknum);
+      else
+	strcpy( scroll_text, str(LANG_ID3_NO_INFO) );
+      
+      display_field_value( 0, "Track", scroll_text );
+      
+      if( id3->year_string )
+	strcpy( scroll_text, id3->year_string );
+      else if(id3->year)
+	snprintf(scroll_text,sizeof(scroll_text), "%d", id3->year );
+      else
+	strcpy(scroll_text, str(LANG_ID3_NO_INFO) );
+      
+      display_field_value( 1, "Year", scroll_text );
+	  
+	  
+      snprintf(scroll_text,sizeof(scroll_text), "%d/%d",playlist_get_display_index(), playlist_amount());
+      display_field_value( 2, "Playlist", scroll_text );
+
+      display_field_value( 3, "ID3", id3->id3version?gets_id3_version(id3->id3version):"No" );
+      break;
+	  
+    case 4:
+      
+      snprintf(scroll_text,sizeof(scroll_text), "%d:%02d",
+	       id3->length / 60000,
+	       id3->length % 60000 / 1000 );
+      display_field_value( 0, "Length", scroll_text );
+      
+      
+      snprintf(scroll_text,sizeof(scroll_text), "%d kbps%s", id3->bitrate, id3->vbr?" VBR":"");
+      display_field_value( 1, "Bitrate", scroll_text );
+      
+      snprintf(scroll_text,sizeof(scroll_text), "%d Hz", id3->frequency);
+      display_field_value( 2, "Freq", scroll_text );
+      
+      snprintf(scroll_text,sizeof(scroll_text), "%d.%d MB", id3->filesize >> 10, (id3->filesize - ( (id3->filesize >> 10) << 10 )) / 100);
+      display_field_value( 3, "Size", scroll_text );
+      break;
+	  
+    case 5:
+      lcd_puts_nopad(0, 0, str(LANG_ID3_PATH));
+      lcd_puts_scroll(0, 1, id3->path);
+      break;
+        }
+           
+    button = button_get_flt(true, BUTTON_LEFT|BUTTON_RIGHT|BUTTON_STOP|BUTTON_MENU|BUTTON_PLAY,IR_BUTTON_SETTING|IR_BUTTON_PLAY|IR_BUTTON_STOP|IR_BUTTON_REWIND|IR_BUTTON_FFORWARD, BUTTON_IR);
+      
+    switch(button)
+      {
+      case BUTTON_LEFT:
+      case BUTTON_IR | IR_BUTTON_REWIND:
+	screen--;
+	
+	if( screen == 0 )
+	  screen = menu_max;
+	
+	break;
+	  
+      case BUTTON_RIGHT:
+      case BUTTON_IR | IR_BUTTON_FFORWARD:
+	screen++;
 
+	if( screen > menu_max)
+	  screen = 1;
+	break;
+          
+      case BUTTON_STOP:
+      case BUTTON_MENU:
+      case BUTTON_PLAY:
+      case BUTTON_IR | IR_BUTTON_PLAY:
+      case BUTTON_IR | IR_BUTTON_STOP:
+      case BUTTON_IR | IR_BUTTON_SETTING:
+	lcd_cancel_scroll();
+	exit = true;
+	break;
+      }
+  }
+  return false;
+}
+/*
 bool browse_id3(void)
 {
     int button;
@@ -256,9 +317,7 @@
         switch(button)
         {
             case BUTTON_LEFT:
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_UP:
-#endif
+            case BUTTON_IR | IR_BUTTON_REWIND:
                 if (menu_pos > 0)
                     menu_pos--;
                 else
@@ -266,9 +325,7 @@
                 break;
 
             case BUTTON_RIGHT:
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_DOWN:
-#endif
+            case BUTTON_IR | IR_BUTTON_FFORWARD:
                 if (menu_pos < menu_max)
                     menu_pos++;
                 else
@@ -278,27 +335,20 @@
             case BUTTON_REPEAT:
                 break;
 
-#ifdef HAVE_PLAYER_KEYPAD
             case BUTTON_STOP:
-#else
-            case BUTTON_OFF:
-#endif
             case BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY:
+            case BUTTON_IR | IR_BUTTON_STOP:
                 lcd_stop_scroll();
-                /* eat release event */
+// eat release event
                 button_get(true);
                 exit = true;
                 break;
-
-            case SYS_USB_CONNECTED: 
-                status_set_playmode(STATUS_STOP);
-                usb_screen();
-                return true;
-                break;
         }
     }
     return false;
 }
+*/
 
 static bool ffwd_rew(int button)
 {
@@ -315,12 +365,13 @@
     int direction = 1;         /* forward=1 or backward=-1 */
     long accel_tick = 0;       /* next time at which to bump the step size */
     bool exit = false;
-    bool usb = false;
 
     while (!exit) {
         switch ( button ) {
             case BUTTON_LEFT | BUTTON_REPEAT:
             case BUTTON_RIGHT | BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
                 if (ff_rewind)
                 {
                     ff_rewind_count += step * direction;
@@ -343,10 +394,11 @@
                     {
                         if (!paused)
                             mpeg_pause();
-#ifdef HAVE_PLAYER_KEYPAD
                         lcd_stop_scroll();
-#endif
+                        if (button & BUTTON_RIGHT || button & BUTTON_LEFT)
                         direction = (button & BUTTON_RIGHT) ? 1 : -1;
+                        else
+                            direction = (button & IR_BUTTON_FFORWARD) ? 1: -1;
 
                         if (direction > 0) 
                             status_set_playmode(STATUS_FASTFORWARD);
@@ -392,6 +444,8 @@
 
             case BUTTON_LEFT | BUTTON_REL:
             case BUTTON_RIGHT | BUTTON_REL: 
+            case BUTTON_IR | IR_BUTTON_FFORWARD | BUTTON_REL:
+            case BUTTON_IR | IR_BUTTON_REWIND | BUTTON_REL:
                 mpeg_ff_rewind(id3->elapsed+ff_rewind_count);
                 ff_rewind_count = 0;
                 ff_rewind = false;
@@ -401,27 +455,16 @@
                     mpeg_resume();
                     status_set_playmode(STATUS_PLAY);
                 }
-#ifdef HAVE_LCD_CHARCELLS
                 wps_display(id3);
-#endif
-                exit = true;
-                break;
-
-            case SYS_USB_CONNECTED:
-                status_set_playmode(STATUS_STOP);
-                usb_screen();
-                usb = true;
                 exit = true;
                 break;
         }
-        if (!exit)
+        if (!exit) {
             button = button_get(true);
     }
-
-    /* let mpeg thread update id3->elapsed before calling wps_refresh */
-    yield(); 
+    }
     wps_refresh(id3, 0, WPS_REFRESH_ALL);
-    return usb;
+    return false;
 }
 
 static bool update(void)
@@ -451,8 +494,8 @@
     if ( id3 &&
          global_settings.resume &&
          global_settings.resume_offset != id3->offset ) {
-        DEBUGF("R%X,%X (%X)\n", global_settings.resume_offset,
-               id3->offset,id3);
+//        DEBUGF("R%X,%X (%X)\n", global_settings.resume_offset,
+//               id3->offset,id3);
  
         if (!playlist_get_resume_info(&global_settings.resume_index))
         {
@@ -471,70 +514,34 @@
 
 static bool menu(void)
 {
-    static bool muted = false;
     bool exit = false;
     int last_button = 0;
 
-#ifdef HAVE_LCD_CHARCELLS
     status_set_param(true);
     status_draw(false);
-#endif
 
     while (!exit) {
         int button = button_get(true);
         
         switch ( button ) {
             /* go into menu */
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_F1 | BUTTON_REL:
-#else
             case BUTTON_MENU | BUTTON_REL:
-#endif
+            case BUTTON_IR | IR_BUTTON_EQ | BUTTON_REL:
                 exit = true;
-                if ( !last_button && !keys_locked ) {
+                if ( !last_button ) {
                     lcd_stop_scroll();
 
                     if (main_menu())
                         return true;
-#ifdef HAVE_LCD_BITMAP
-                    if(global_settings.statusbar)
-                        lcd_setmargins(0, STATUSBAR_HEIGHT);
-                    else
-                        lcd_setmargins(0, 0);
-#endif
                 }
                 break;
 
                 /* mute */
-#ifdef HAVE_PLAYER_KEYPAD
             case BUTTON_MENU | BUTTON_PLAY:
-#else
-            case BUTTON_F1 | BUTTON_PLAY:
-#endif
-                if ( muted )
-                    mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
-                else
-                    mpeg_sound_set(SOUND_VOLUME, 0);
-                muted = !muted;
-#ifdef HAVE_LCD_CHARCELLS
-                status_set_param(false);
-#endif
-                display_mute_text(muted);
+            case BUTTON_IR | IR_BUTTON_MUTE:
+	      toggle_mute();
                 break;
 
-                /* key lock */
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_F1 | BUTTON_DOWN:
-#else
-            case BUTTON_MENU | BUTTON_STOP:
-#endif
-                keys_locked = !keys_locked;
-                display_keylock_text(keys_locked);
-                exit = true;
-                while (button_get(false)); /* clear button queue */
-                break;
-
-#ifdef HAVE_PLAYER_KEYPAD
                 /* change volume */
             case BUTTON_MENU | BUTTON_LEFT:
             case BUTTON_MENU | BUTTON_LEFT | BUTTON_REPEAT:
@@ -545,38 +552,28 @@
                 break;
 
                 /* show id3 tags */
-            case BUTTON_MENU | BUTTON_ON:
+            case BUTTON_MENU:
+            case BUTTON_IR | IR_BUTTON_EQ:
                 status_set_param(true);
                 status_set_audio(true);
-#else
-            case BUTTON_F1 | BUTTON_ON:
-#endif
                 lcd_clear_display();
                 lcd_puts(0, 0, str(LANG_ID3_INFO));
                 lcd_puts(0, 1, str(LANG_ID3_SCREEN));
                 lcd_update();
                 sleep(HZ);
  
-                if(browse_id3())
+                if(show_song_info())
                     return true;
-#ifdef HAVE_PLAYER_KEYPAD
                 status_set_param(false);
                 status_set_audio(true);
-#endif
                 exit = true;
                 break;
 
-            case SYS_USB_CONNECTED:
-                status_set_playmode(STATUS_STOP);
-                usb_screen();
-                return true;
         }
         last_button = button;
     }
 
-#ifdef HAVE_LCD_CHARCELLS
     status_set_param(false);
-#endif
 
     wps_display(id3);
     wps_refresh(id3, 0, WPS_REFRESH_ALL);
@@ -619,6 +616,118 @@
     }
 }
 
+static void display_volume_slider(void)
+{
+  char buffer[24];
+  int  i,g,per,button;
+  char prev_cgram[64];
+  
+  // Keep a backup of cgrams chars
+  lcd_save_cgram( prev_cgram );
+
+  lcd_clear_display();
+
+  //Load our characters in cgram
+  unsigned char progress2[] = { 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b };
+  unsigned char progress1[] = { 0x18, 0x18, 0x18, 0x18, 0x1b, 0x18, 0x18, 0x18 };
+  unsigned char blank_bar[] = { 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00 };
+  
+  lcd_add_char(blank_bar,0);
+  lcd_add_char(progress1,1);
+  lcd_add_char(progress2,2);
+   	
+  while(1){
+    
+    // We wait for a button we want...
+    button = button_get_w_tmo_flt( HZ/2, BUTTON_UP|BUTTON_DOWN, IR_BUTTON_VOLUP|IR_BUTTON_VOLDN,BUTTON_IR|BUTTON_REPEAT|IR_BUTTON_REPEAT );
+	
+    if( button == BUTTON_NONE )
+      break;
+
+    switch( button ){
+    case BUTTON_UP:
+    case BUTTON_UP | BUTTON_REPEAT:
+    case BUTTON_IR | IR_BUTTON_VOLUP:
+    case BUTTON_IR | IR_BUTTON_VOLUP | IR_BUTTON_REPEAT:
+      if(button&(BUTTON_REPEAT|IR_BUTTON_REPEAT))
+	global_settings.volume+=4;
+      else
+	global_settings.volume++;
+      break;
+    case BUTTON_DOWN:
+    case BUTTON_DOWN | BUTTON_REPEAT:
+    case BUTTON_IR | IR_BUTTON_VOLDN:
+    case BUTTON_IR | IR_BUTTON_VOLDN | IR_BUTTON_REPEAT:
+      if(button&(BUTTON_REPEAT|IR_BUTTON_REPEAT))
+	global_settings.volume-=4;
+      else
+	global_settings.volume--;
+      break;
+    }
+
+    if(global_settings.volume < mpeg_sound_min(SOUND_VOLUME))
+      global_settings.volume = mpeg_sound_min(SOUND_VOLUME);
+    
+    if(global_settings.volume > mpeg_sound_max(SOUND_VOLUME))
+      global_settings.volume = mpeg_sound_max(SOUND_VOLUME);
+    
+    mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
+    per = mpeg_val2phys(SOUND_VOLUME, global_settings.volume);
+    
+    snprintf( buffer, sizeof(buffer), "%s %2d%%", str(LANG_VOLUME), per );
+    lcd_puts_fmt(0, 1, buffer, FMT_CENTER );
+    
+    buffer[20] = 0;
+  
+    //Volume bar goes from 0-40
+    per = per * 40 / 100;
+
+    g = per/2;
+    memset( buffer, CGRAM2_CHAR, g );
+    memset( &buffer[g], CGRAM0_CHAR, 20-g );
+   
+    i = per - 2*g;
+
+    if( i )
+      buffer[g++] = CGRAM1_CHAR;
+
+    lcd_puts_nopad( 0, 2, buffer);
+  }
+  settings_save();
+  status_draw(false);
+
+  // We have to erase the line because when the cgrams are going to be retored
+  // the user will see a whole different line...
+  lcd_puts_fmt(0, 2, " ", FMT_RPADDED );
+  lcd_restore_cgram( prev_cgram );
+}
+
+static void toggle_mute(void)
+{
+  mpeg_sound_set(SOUND_VOLUME, muted?global_settings.volume:0);
+  muted = !muted;
+  status_set_param(false);
+  display_mute_text(muted);
+}
+
+static void no_pop(void)
+{
+    /* fade out */
+    int current_volume = global_settings.volume;
+    
+    while (current_volume > 20) {    
+        current_volume -= 10;
+        sleep(1);
+        mpeg_sound_set(SOUND_VOLUME, current_volume);
+    }
+    //can't stop mpeg here as some things dislike the closing
+    //of the mpeg file, etc. Need a better way to do this...
+//    mpeg_stop();
+    sleep(HZ/2); /* let mpeg thread run */
+
+    /* reset volume to what it was before the fade */
+    mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
+}
 
 /* demonstrates showing different formats from playtune */
 int wps_show(void)
@@ -631,15 +740,8 @@
     id3 = NULL;
     current_track_path[0] = '\0';
 
-#ifdef HAVE_LCD_CHARCELLS
     status_set_audio(true);
     status_set_param(false);
-#else
-    if(global_settings.statusbar)
-        lcd_setmargins(0, STATUSBAR_HEIGHT);
-    else
-        lcd_setmargins(0, 0);
-#endif
 
     ff_rewind = false;
 
@@ -657,149 +759,30 @@
         restore = true;
     }
 
-    while ( 1 )
-    {
-        bool mpeg_paused = (mpeg_status() & MPEG_STATUS_PAUSE)?true:false;
-        
-        /* did someone else (i.e power thread) change mpeg pause mode? */
-        if (paused != mpeg_paused) {
-            paused = mpeg_paused;
-            status_set_playmode(paused ? STATUS_PAUSE : STATUS_PLAY);
-
-            /* if another thread paused mpeg, we are probably in car mode,
-               about to shut down. lets save the settings. */
-            if (paused && global_settings.resume) {
-                settings_save();
-#ifndef HAVE_RTC
-                ata_flush();
-#endif
-            }
-        }
-
-#ifdef HAVE_LCD_BITMAP
-        /* when the peak meter is enabled we want to have a
-            few extra updates to make it look smooth. On the
-            other hand we don't want to waste energy if it 
-            isn't displayed */
-        if (peak_meter_enabled) {
-            int i;
-
-            /* In high performance mode we read out the mas as
-               often as we can. There is no sleep for cpu */
-            if (global_settings.peak_meter_performance) {
-                long next_refresh = current_tick;
-                long next_big_refresh = current_tick + HZ / 5;
-                button = BUTTON_NONE;
-                while (!TIME_AFTER(current_tick, next_big_refresh)) {
-                    button = button_get(false);
-                    if (button != BUTTON_NONE) {
-                        break;
-                    }
-                    peak_meter_peek();
-                    sleep(1);
-
-                    if (TIME_AFTER(current_tick, next_refresh)) {
-                        wps_refresh(id3, 0, WPS_REFRESH_PEAK_METER);
-                        next_refresh = current_tick + HZ / peak_meter_fps;
-                    }
-                }
+    if (mpeg_status() & MPEG_STATUS_PAUSE) {
+        paused = true;
+    } else {
+        paused = false;
             } 
             
-            /* In energy saver mode the cpu may sleep a 
-               little bit while waiting for buttons */
-            else {
-            for (i = 0; i < 4; i++) {
-                    button = button_get_w_tmo(HZ / peak_meter_fps);
-                if (button != 0) {
-                    break;
-                }
-                    wps_refresh(id3, 0, WPS_REFRESH_PEAK_METER);
-                }
-            }
-        } 
+    while ( 1 )
+    {
         
-        /* The peak meter is disabled 
-           -> no additional screen updates needed */
-        else {
             button = button_get_w_tmo(HZ/5);
-        }
-#else
-        button = button_get_w_tmo(HZ/5);
-#endif
 
         /* discard first event if it's a button release */
         if (button && ignore_keyup)
         {
             ignore_keyup = false;
-            if (button & BUTTON_REL && button != SYS_USB_CONNECTED)
-                continue;
-        }
-        
-        /* ignore non-remote buttons when keys are locked */
-        if (keys_locked &&
-#ifdef HAVE_RECORDER_KEYPAD
-            ! ((button & BUTTON_F1) ||
-#else
-            ! ((button & BUTTON_MENU) ||
-#endif
-               (button == BUTTON_NONE) ||
-               (button == SYS_USB_CONNECTED) ||
-               (button & BUTTON_REMOTE)))
-        {
-            while (button_get(false)); /* clear button queue */
-            display_keylock_text(true);
-            restore = true;
+            if (button & BUTTON_REL)
             continue;
         }
 
-        /* Exit if mpeg has stopped playing. This can happen if using the
-           sleep timer with the charger plugged or if starting a recording
-           from F1 */
-        if (!mpeg_status())
-            exit = true;
-
         switch(button)
         {
-            case BUTTON_ON:
-#ifdef HAVE_RECORDER_KEYPAD
-                switch (on_screen()) {
-                    case 2:
-                        /* usb connected? */
-                        return SYS_USB_CONNECTED;
-                
-                    case 1:
-                        /* was on_screen used? */
-                        restore = true;
-
-                        /* pause may have been turned off by pitch screen */
-                        if (paused && !(mpeg_status() & MPEG_STATUS_PAUSE)) {
-                            paused = false;
-                            status_set_playmode(STATUS_PLAY);
-                        }
-                        break;
-
-                    case 0:
-                        /* otherwise, exit to browser */
-#else
-                        status_set_record(false);
-                        status_set_audio(false);
-#endif
-                        lcd_stop_scroll();
-
-                        /* set dir browser to current playing song */
-                        if (global_settings.browse_current &&
-                            current_track_path[0] != '\0')
-                            set_current_file(current_track_path);
-                        
-                        return 0;
-#ifdef HAVE_RECORDER_KEYPAD
-                }
-                break;
-#endif
-
                 /* play/pause */
             case BUTTON_PLAY:
-            case BUTTON_RC_PLAY:
+            case BUTTON_IR | IR_BUTTON_PLAY:
                 if ( paused )
                 {
                     paused = false;
@@ -819,55 +802,73 @@
                         mpeg_pause();
                     if (global_settings.resume) {
                         settings_save();
-#ifndef HAVE_RTC
-                        ata_flush();
-#endif
                     }
                 }
                 break;
 
-                /* volume up */
-#ifdef HAVE_RECORDER_KEYPAD
+            case BUTTON_IR | IR_BUTTON_MUTE:
+                toggle_mute();
+                restore=true;
+                break;
+
             case BUTTON_UP:
             case BUTTON_UP | BUTTON_REPEAT:
-#endif
-            case BUTTON_RC_VOL_UP:
+            case BUTTON_IR | IR_BUTTON_VOLUP:
+            case BUTTON_IR | IR_BUTTON_VOLUP | IR_BUTTON_REPEAT:
+
+	      if( global_settings.use_volume_slider ){
+	        if( !(button & BUTTON_REL) ){
+		  button_add( button );
+		  display_volume_slider();
+		  restore=true;
+		}
+	      }
+	      else{
                 global_settings.volume++;
                 if(global_settings.volume > mpeg_sound_max(SOUND_VOLUME))
                     global_settings.volume = mpeg_sound_max(SOUND_VOLUME);
                 mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
                 status_draw(false);
                 settings_save();
+	      }
                 break;
 
-                /* volume down */
-#ifdef HAVE_RECORDER_KEYPAD
             case BUTTON_DOWN:
             case BUTTON_DOWN | BUTTON_REPEAT:
-#endif
-            case BUTTON_RC_VOL_DOWN:
+            case BUTTON_IR | IR_BUTTON_VOLDN:
+            case BUTTON_IR | IR_BUTTON_VOLDN | IR_BUTTON_REPEAT:
+
+	      if( global_settings.use_volume_slider ){
+	        if( !(button & BUTTON_REL) ){
+		  button_add( button );
+		  display_volume_slider();
+		  restore=true;
+		}
+	      }
+	      else{
                 global_settings.volume--;
                 if(global_settings.volume < mpeg_sound_min(SOUND_VOLUME))
                     global_settings.volume = mpeg_sound_min(SOUND_VOLUME);
                 mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
                 status_draw(false);
                 settings_save();
+	      }
+
                 break;
 
                 /* fast forward / rewind */
             case BUTTON_LEFT | BUTTON_REPEAT:
             case BUTTON_RIGHT | BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_FFORWARD | IR_BUTTON_REPEAT:
+            case BUTTON_IR | IR_BUTTON_REWIND | IR_BUTTON_REPEAT:
+                DEBUGF("ffrew\n");
                 ffwd_rew(button);
                 break;
 
                 /* prev / restart */
-            case BUTTON_RC_LEFT:
             case BUTTON_LEFT | BUTTON_REL:
-#ifdef HAVE_RECORDER_KEYPAD
-                if ((button == (BUTTON_LEFT | BUTTON_REL)) &&
-                    (lastbutton != BUTTON_LEFT ))
-                    break; 
-#endif
+            case BUTTON_IR | IR_BUTTON_REWIND | BUTTON_REL:
+//                no_pop();
                 if (!id3 || (id3->elapsed < 3*1000)) {
                     mpeg_prev();
                 }
@@ -883,60 +884,55 @@
                 break;
 
                 /* next */
-            case BUTTON_RC_RIGHT:
             case BUTTON_RIGHT | BUTTON_REL:
-#ifdef HAVE_RECORDER_KEYPAD
-                if ((button == (BUTTON_RIGHT | BUTTON_REL)) &&
-                    (lastbutton != BUTTON_RIGHT))
-                     break; 
-#endif
+            case BUTTON_IR | IR_BUTTON_FFORWARD | BUTTON_REL:
+                DEBUGF("next\n");
+//                no_pop();
                 mpeg_next();
                 break;
 
                 /* menu key functions */
-#ifdef HAVE_PLAYER_KEYPAD
             case BUTTON_MENU:
-#else
-            case BUTTON_F1:
-#endif
+            case BUTTON_IR | IR_BUTTON_EQ:
                 if (menu())
-                    return SYS_USB_CONNECTED;
-
-                restore = true;
-                break;
+		  return 0;
 
-#ifdef HAVE_RECORDER_KEYPAD
-                /* play settings */
-            case BUTTON_F2:
-                if (f2_screen())
-                    return SYS_USB_CONNECTED;
-                restore = true;
-                break;
+                /* if user recorded, playback is stopped and we should exit */
+                if (!mpeg_status())
+		  exit = true;
 
-                /* screen settings */
-            case BUTTON_F3:
-                if (f3_screen())
-                    return SYS_USB_CONNECTED;
                 restore = true;
                 break;
-#endif
 
                 /* stop and exit wps */
-            case BUTTON_RC_STOP:
-#ifdef HAVE_RECORDER_KEYPAD
-            case BUTTON_OFF:
-#else
             case BUTTON_STOP | BUTTON_REL:
-                if ( lastbutton != BUTTON_STOP )
+            case BUTTON_IR | IR_BUTTON_STOP | BUTTON_REL:
+                if ( (button & BUTTON_STOP) && lastbutton != BUTTON_STOP)
                     break;
-#endif
                 exit = true;
                 break;
 
-            case SYS_USB_CONNECTED:
-                status_set_playmode(STATUS_STOP);
-                usb_screen();
-                return SYS_USB_CONNECTED;
+            case BUTTON_SELECT:
+            case BUTTON_IR | IR_BUTTON_SETTING:
+            case BUTTON_IR | IR_BUTTON_BROWSE:
+                lcd_stop_scroll();
+
+                /* set dir browser to current playing song */
+                if (global_settings.browse_current &&
+                    current_track_path[0] != '\0')
+                    set_current_file(current_track_path);
+                return 0;
+
+            case BUTTON_PROGRAM:
+            case BUTTON_IR | IR_BUTTON_PROGRAM:
+                if (global_settings.playlist_shuffle) {
+                    playlist_sort(true);
+                    global_settings.playlist_shuffle=false;
+                } else {
+                    playlist_randomise(current_tick,true);
+                    global_settings.playlist_shuffle=true;
+                }
+                break;
 
             case BUTTON_NONE: /* Timeout */
                 if (update())
@@ -952,10 +948,7 @@
         }
 
         if (exit) {
-#ifdef HAVE_LCD_CHARCELLS
-            status_set_record(false);
             status_set_audio(false);
-#endif
             if (global_settings.fade_on_stop)
                 fade(0);
                 
@@ -963,10 +956,6 @@
             mpeg_stop();
             status_set_playmode(STATUS_STOP);
 
-            /* Keys can be locked when exiting, so either unlock here
-               or implement key locking in tree.c too */
-            keys_locked=false;
-
             /* set dir browser to current playing song */
             if (global_settings.browse_current &&
                 current_track_path[0] != '\0')
@@ -975,10 +964,6 @@
             return 0;
         }
                     
-
-        if ( button )
-            ata_spin();
-
         if (restore) {
             restore = false;
             if (wps_display(id3))
diff -rubBP /home/dast/src/rockbox/apps/wps.h ./apps/wps.h
--- /home/dast/src/rockbox/apps/wps.h	Sat Feb 15 00:30:33 2003
+++ ./apps/wps.h	Mon Nov 24 03:57:09 2003
@@ -1,37 +1,14 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: wps.h,v 1.18 2003/02/11 15:03:28 zagor Exp $
- *
- * Copyright (C) 2002 Jerome Kuptz
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _WPS_H
 #define _WPS_H
 #include "id3.h"
 #include "playlist.h" 
 
-extern bool keys_locked;
 extern bool wps_time_countup;
 
 int wps_show(void);
 bool refresh_wps(bool refresh_scroll);
 void handle_usb(void);
 bool browse_id3(void);
-
-#ifdef HAVE_RECORDER_KEYPAD
-bool f2_screen(void);
-bool f3_screen(void);
-#endif
+bool show_song_info(void);
 
 #endif
Only in /home/dast/src/rockbox: build-player
Only in /home/dast/src/rockbox: build-recorder
Only in /home/dast/src/rockbox: build-recorderv2
Only in /home/dast/src/rockbox: build-simplayer-win32
Only in /home/dast/src/rockbox: build-simrecorder
Only in /home/dast/src/rockbox: build-simrecorder-win32
Only in /home/dast/src/rockbox: docs
Only in /home/dast/src/rockbox/firmware: COPYING
Only in /home/dast/src/rockbox/firmware: CVS
Only in /home/dast/src/rockbox/firmware: FILES
diff -rubBP /home/dast/src/rockbox/firmware/Makefile ./firmware/Makefile
--- /home/dast/src/rockbox/firmware/Makefile	Mon Oct 27 08:05:46 2003
+++ ./firmware/Makefile	Wed Oct 29 15:12:18 2003
@@ -1,12 +1,3 @@
-#             __________               __   ___.
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/
-# $Id: Makefile,v 1.44 2003/10/12 16:40:45 hohensoh Exp $
-#
-
 CC    = sh-elf-gcc
 LD    = sh-elf-ld
 AR    = sh-elf-ar
@@ -15,12 +6,7 @@
 
 INCLUDES=-Iinclude -I. -Iexport -Icommon -Idrivers
 
-CFLAGS = -W -Wall -O -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM}
-
-ifndef MEM
-    # if MEM is not set, assume 2MB
-    MEM=2
-endif
+CFLAGS = -W -Wall -O -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
 
 ifdef DEBUG
 CFLAGS += -g -DDEBUG
@@ -30,35 +16,16 @@
 
 SRC := $(wildcard drivers/*.c common/*.c *.c)
 
-OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/crt0.o $(OBJDIR)/bitswap.o $(OBJDIR)/descramble.o
+#OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/crt0.o $(OBJDIR)/bitswap.o
+OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/bitswap.o
 DEPS:=.deps
 DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
 
 DIRS = $(subst $(DEPS),".",$(DEPDIRS)) 
 
-OUTPUT = $(OBJDIR)/librockbox.a
-
-ifeq (RECORDER,$(findstring RECORDER, $(CFLAGS)))
-	OBJS +=	$(OBJDIR)/sysfont.o
-endif
-
-ifndef OBJDIR
-no_configure:
-	@echo "Don't run make here. Run the tools/configure script from your own build"
-	@echo "directory, then run make there."
-	@echo
-	@echo "More help on how to build rockbox can be found here:"
-	@echo "http://rockbox.haxx.se/docs/how_to_compile.html"
-endif
-
-ifndef TOOLSDIR
-	TOOLSDIR=../tools
-endif
+OUTPUT = $(OBJDIR)/libopenneo.a
 
-all: $(TOOLSDIR)/convbdf $(OUTPUT) $(EXTRA_TARGETS)
-
-$(TOOLSDIR)/convbdf:
-	$(MAKE) -C $(TOOLSDIR)
+all: $(OUTPUT) $(EXTRA_TARGETS)
 
 $(OUTPUT): $(OBJS)
 	$(AR) ruv $@ $+
@@ -71,21 +38,15 @@
 	@mkdir -p `dirname $@`
 	$(CC) $(CFLAGS) -c $< -o $@
 
-tags:
-	@$(SHELL) -c 'for d in $(DIRS); do { etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; }; done'
-
 clean:
-	rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c
+	rm -f $(OBJS) $(OUTPUT)
+	rm -rf *~
 	rm -rf $(OBJDIR)/$(DEPS)
 
 # Special targets
 $(OBJDIR)/thread.o: thread.c export/thread.h
 	$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@
 
-$(OBJDIR)/sysfont.o: fonts/clR6x8.bdf
-	$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $<
-	$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@
-
 $(OBJDIR)/$(DEPS)/%.d: %.c
 	@$(SHELL) -c 'for d in $(DEPDIRS); do { if [ ! -d $(OBJDIR)/$$d ]; then mkdir $(OBJDIR)/$$d; fi; }; done'
 	@echo "Updating dependencies for $<"
Only in /home/dast/src/rockbox/firmware: README
diff -rubBP /home/dast/src/rockbox/firmware/app.lds ./firmware/app.lds
--- /home/dast/src/rockbox/firmware/app.lds	Mon Oct 27 08:05:46 2003
+++ ./firmware/app.lds	Wed Oct 29 15:12:18 2003
@@ -1,100 +1,81 @@
 ENTRY(start)
 OUTPUT_FORMAT(elf32-sh)
-INPUT(crt0.o)
-
-#define PLUGINSIZE 0x8000
-
-#ifdef DEBUG
-#define DRAMSIZE 0x1f0000 - PLUGINSIZE
-#define ORIGADDR 0x09010000
-
-#else
-#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE
-#define ORIGADDR 0x09000000
-#endif
-#define ENDADDR  (ORIGADDR + DRAMSIZE)
 
 MEMORY
 {
-   DRAM : ORIGIN = ORIGADDR, LENGTH = DRAMSIZE
+	ROM : ORIGIN = 0x00020000, LENGTH = 0x1E0000
+	SRAM : ORIGIN = 0x0C000000, LENGTH = 0x40000
    IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
 }
-
 SECTIONS
 {
-    .vectors :
+	.bss :
     {
-        *(.resetvectors);
-        *(.vectors);
-        . = ALIGN(0x200);
-        *(.init.text)
-    } > DRAM
+		_edata = .;
+		*(.bss)
+		*(COMMON)
+		_end = .;
+	} > SRAM
 
     .text :
     {
-        *(.text)
         . = ALIGN(0x4);
-    } > DRAM
-
-    .data :
-    {
-        *(.data)
-    } > DRAM
+		*(.vectors);
+		. = ALIGN(0x200);
+		*(.init.text)
+		*(.text)
+	} > ROM
 
     .rodata :
     {
         *(.rodata)
         *(.rodata.str1.4)
         . = ALIGN(0x4);
-    } > DRAM
+	} > ROM
 
-    .stack :
+	.data : AT ( LOADADDR(.romdata) )
     {
-       *(.stack)
-       _stackbegin = .;
-       /* We put the copy of the .iram section here to save space */
-       _iramcopy = .;
-       . += 0x2000;
-       _stackend = .;
-    } > DRAM
+                _datastart = .;
+		*(.data)
+                _dataend = .;
+	} > SRAM
 
-    .bss :
+	.iram : AT ( _iramcopy )
     {
-       _edata = .;
-        *(.bss)
-        *(COMMON)
-       _end = .;
-    } > DRAM
+		_iramstart = .;
+		*(.icode)
+		*(.idata)
+		_iramend = .;
+	} > IRAM
+
+        .romdata :
+        {
+                _datacopy = .;
+                . += SIZEOF(.data);
+		_iramcopy = .;
+		. += SIZEOF(.iram);
+        } > ROM
 
-#ifdef DEBUG
-    .heap :
+	.stack :
     {
-        _poolstart = .;
-        . = 0x20000;
-        _poolend = .;
-    } > DRAM
-#endif
+                _stackbegin = .;
+		*(.stack)
+		. += 0x1000;
+               _stackend = .;
+	} > SRAM
 
     .mp3buf :
     {
         _mp3buffer = .;
-    } > DRAM
+	} > SRAM
 
-    .mp3end ENDADDR:
+	.mp3end 0x0C040000 - 0x300:
     {
         _mp3end = .;
-    } > DRAM
+	} > SRAM
 
-    .plugin ENDADDR:
+	.plugin 0x0C040000:
     {
         _pluginbuf = .;
-    }
-
-    .iram 0xf000000 : AT ( _iramcopy )
-    {
-        _iramstart = .;
-        *(.icode)
-        *(.idata)
-        _iramend = .;
-    } > IRAM
+	} > SRAM
 }
Only in /home/dast/src/rockbox/firmware: backlight.c
diff -rubBP /home/dast/src/rockbox/firmware/bitswap.S ./firmware/bitswap.S
--- /home/dast/src/rockbox/firmware/bitswap.S	Mon Oct 27 08:05:46 2003
+++ ./firmware/bitswap.S	Wed Oct 29 15:12:18 2003
@@ -1,25 +1,6 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: bitswap.S,v 1.4 2003/10/12 15:45:03 hohensoh Exp $
- *
- * Copyright (C) 2002 by Magnus Holmgren
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
     .section    .icode,"ax",@progbits
-    .align      4
     .global     _bitswap
+    .align      4
     .type       _bitswap,@function
 
 /* Registers used:
@@ -48,16 +29,6 @@
     add     #1,r4
     add     #-1,r5
     bra     .init 
-
-    /* The instruction order below is a bit strange, because:
-     * 1) Keeping load/stores on longword boundaries means the instruction
-     *    fetch won't compete with the memory access (because instructions
-     *    are fetched in pairs).
-     * 2) Using the result of a fetch in the next instruction causes a 
-     *    stall (except in certain circumstances).
-     * See the SH-1 programming manual for details.
-     */
-
 .loop:
     mov.w   @r4,r1          /* data to flip */
     add     #-2,r5
diff -rubBP /home/dast/src/rockbox/firmware/buffer.c ./firmware/buffer.c
--- /home/dast/src/rockbox/firmware/buffer.c	Mon Oct 27 08:05:46 2003
+++ ./firmware/buffer.c	Wed Oct 29 15:12:18 2003
@@ -1,27 +1,9 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: buffer.c,v 1.2 2003/10/14 10:18:22 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include "buffer.h"
 
 #ifdef SIMULATOR
 unsigned char mp3buffer[0x100000];
-unsigned char *mp3end = mp3buffer + sizeof(mp3buffer);
+unsigned char mp3end[1];
 #else
 /* defined in linker script */
 extern unsigned char mp3buffer[];
Only in /home/dast/src/rockbox/firmware/common: CVS
diff -rubBP /home/dast/src/rockbox/firmware/common/atoi.c ./firmware/common/atoi.c
--- /home/dast/src/rockbox/firmware/common/atoi.c	Thu Oct 31 08:57:55 2002
+++ ./firmware/common/atoi.c	Wed Oct 29 15:12:21 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: atoi.c,v 1.2 2002/09/30 08:50:00 bagder Exp $
- *
- * Copyright (C) 2002 by Gary Czvitkovicz
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include "ctype.h"
 
 int atoi (const char *str)
diff -rubBP /home/dast/src/rockbox/firmware/common/dir.c ./firmware/common/dir.c
--- /home/dast/src/rockbox/firmware/common/dir.c	Mon Jan 27 16:33:45 2003
+++ ./firmware/common/dir.c	Wed Oct 29 15:12:21 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: dir.c,v 1.15 2003/01/24 10:52:16 matsl Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
@@ -28,6 +10,126 @@
 
 static DIR opendirs[MAX_OPEN_DIRS];
 
+//Broken, do not use!!!
+int createdir(char *pathname)
+{
+    DIR* dir;
+    struct dirent* entry;
+    struct fat_file fatfile;
+    int rc;
+    char *name=strrchr(pathname+1,'/');
+    bool bInRoot=false;
+    
+    if ( name ) {
+        *name = 0;
+        if (pathname[name-pathname]!=0) {
+            //read only memory (#define most likely)
+//            DEBUGF("Read only memory, copying string...\n");
+            char s[MAX_PATH];
+            strncpy(s,pathname,name-pathname); //only copy string of interest
+            s[name-pathname]='\0';
+            dir = opendir((char*)s);
+        } else {
+            dir = opendir((char*)pathname);
+            *name = '/';
+            name++;
+        }
+#ifdef DEBUG
+        if (!dir)
+            DEBUGF("Failed opening dir %s\n",pathname);
+#endif
+    }
+    else {
+        dir = opendir("/");
+#ifdef DEBUG
+        if (!dir)
+            DEBUGF("Failed opening dir\n");
+#endif
+        name = (char*)pathname+1;
+        bInRoot=true;
+    }
+    if (!dir) {
+        errno = EIO;
+        return -4;
+    }
+
+    /* scan dir for name */
+    while ((entry = readdir(dir))) {
+        if ( !strcasecmp(name, entry->d_name) ) {
+            break;
+        }
+    }
+
+    if ( entry ) {
+        DEBUGF("%s:\n   Directory or file of that name exists!\n",pathname);
+        return -5;
+    }
+
+    memset(&fatfile,0,sizeof(fatfile));
+    rc = fat_create_dir(name,
+                        &fatfile,
+                        &(dir->fatdir));
+    if (rc < 0) {
+        DEBUGF("Couldn't create %s in %s (%d)\n",name,pathname,rc);
+        errno = EIO;
+        closedir(dir);
+        return rc * 10 - 6;
+    }
+
+/*    int parent_cluster=dir->startcluster;
+    if (bInRoot)
+        parent_cluster=0;
+
+    char de[DIR_ENTRY_SIZE*2];
+    char *myde=de;
+    memset(&de,0,DIR_ENTRY_SIZE*2);
+    strcpy(&(myde[FATDIR_NAME]),".          ");
+    myde[FATDIR_FSTCLUSLO]=(dir->startcluster)&0xFFFF;
+    myde[FATDIR_FSTCLUSHI]=((dir->startcluster)&0xFFFF0000)>>16;
+
+    myde+=DIR_ENTRY_SIZE;
+    strcpy(&(myde[FATDIR_NAME]),"..         ");
+    myde[FATDIR_FSTCLUSLO]=parent_cluster&0xFFFF;
+    myde[FATDIR_FSTCLUSHI]=(parent_cluster&0xFFFF0000)>>16;
+
+    rc = fat_readwrite(&fatfile, 1, de, true );
+    if (rc < 0) {
+        DEBUGF("Couldn't closewrite directory\n");
+        return rc * 10 - 5;
+    }
+    
+    rc = fat_closewrite(&fatfile, 1, 0,true);
+    if (rc < 0) {
+        DEBUGF("Couldn't write directory\n");
+        return rc * 10 - 7;
+    }
+*/
+    closedir(dir);
+
+#ifdef DEBUG
+    dir = opendir(pathname);
+    if (!dir) {
+        DEBUGF("Failed opening newly created dir\n");
+        return -6;
+    }
+    
+    DEBUGF("Checking newly formed dir...\n");
+
+    struct fat_direntry fatentry;
+    
+    while (fat_getnext(&(dir->fatdir),&fatentry) > 0) {
+        if (fatentry.attr & FAT_ATTR_DIRECTORY) {
+            DEBUGF("Found directory '%s'\n",fatentry.name);
+        }
+    }
+    DEBUGF("End of directory listing.\n");
+    closedir(dir);
+#endif
+    
+    DEBUGF("Directory %s created.\n",name);
+    return 0;
+}
+    
 DIR* opendir(char* name)
 {
     char namecopy[MAX_PATH];
diff -rubBP /home/dast/src/rockbox/firmware/common/disk.c ./firmware/common/disk.c
--- /home/dast/src/rockbox/firmware/common/disk.c	Thu Oct 31 08:57:55 2002
+++ ./firmware/common/disk.c	Wed Oct 29 15:12:21 2003
@@ -1,25 +1,8 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: disk.c,v 1.3 2002/10/10 12:01:57 zagor Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include "ata.h"
 #include "debug.h"
 #include "disk.h"
+#include <string.h>
 
 /* Partition table entry layout:
    -----------------------
@@ -45,8 +28,10 @@
 {
     int i;
     unsigned char sector[512];
+    ata_sectors_t atasector;
 
-    ata_read_sectors(0,1,&sector);
+    memset(&atasector,0,sizeof(atasector));
+    ata_read_sectors(&atasector,1,&sector);
 
     /* check that the boot sector is initialized */
     if ( (sector[510] != 0x55) ||
diff -rubBP /home/dast/src/rockbox/firmware/common/file.c ./firmware/common/file.c
--- /home/dast/src/rockbox/firmware/common/file.c	Mon Dec  8 22:58:38 2003
+++ ./firmware/common/file.c	Wed Oct 29 15:12:22 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: file.c,v 1.51 2003/12/08 21:58:38 bagder Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <string.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -23,6 +5,7 @@
 #include "fat.h"
 #include "dir.h"
 #include "debug.h"
+#define LDEBUGF(...)  //shut up
 
 /*
   These functions provide a roughly POSIX-compatible file IO API.
@@ -52,7 +35,7 @@
 
 static int flush_cache(int fd);
 
-int creat(const char *pathname, mode_t mode)
+int creat(const char *pathname, int mode)
 {
     (void)mode;
     return open(pathname, O_WRONLY|O_CREAT|O_TRUNC);
@@ -102,16 +85,34 @@
     name=strrchr(pathname+1,'/');
     if ( name ) {
         *name = 0;
+        if (pathname[name-pathname]!=0) {
+            //read only memory (#define most likely)
+//            DEBUGF("Read only memory, copying string...\n");
+            char s[MAX_PATH];
+            strncpy(s,pathname,name-pathname); //only copy string of interest
+            s[name-pathname]='\0';
+//            DEBUGF("New Path '%s'\n",s);
+            dir = opendir((char*)s);
+        } else {
+            DEBUGF("Normal string path='%s'\n",pathname);
         dir = opendir((char*)pathname);
         *name = '/';
+        }
         name++;
+#ifdef DEBUG
+        if (!dir)
+            DEBUGF("Failed opening dir %s\n",pathname);
+#endif
     }
     else {
         dir = opendir("/");
+#ifdef DEBUG
+        if (!dir)
+            DEBUGF("Failed opening dir\n");
+#endif
         name = (char*)pathname+1;
     }
     if (!dir) {
-        DEBUGF("Failed opening dir\n");
         errno = EIO;
         file->busy = false;
         return -4;
@@ -223,7 +224,7 @@
         }
 
         /* tie up all loose ends */
-        rc = fat_closewrite(&(file->fatfile), file->size, file->attr);
+        rc = fat_closewrite(&(file->fatfile), file->size, file->attr,false);
         if (rc < 0)
             return rc * 10 - 5;
     }
@@ -307,7 +308,7 @@
     return 0;
 }
 
-int ftruncate(int fd, off_t size)
+int ftruncate(int fd, unsigned int size)
 {
     int rc, sector;
     struct filedesc* file = &openfiles[fd];
@@ -513,22 +514,22 @@
     return nread;
 }
 
-ssize_t write(int fd, const void* buf, size_t count)
+int write(int fd, void* buf, int count)
 {
     if (!openfiles[fd].write) {
         errno = EACCES;
         return -1;
     }
-    return readwrite(fd, (void *)buf, count, true);
+    return readwrite(fd, buf, count, true);
 }
 
-ssize_t read(int fd, void* buf, size_t count)
+int read(int fd, void* buf, int count)
 {
     return readwrite(fd, buf, count, false);
 }
 
 
-off_t lseek(int fd, off_t offset, int whence)
+int lseek(int fd, int offset, int whence)
 {
     int pos;
     int newsector;
Only in /home/dast/src/rockbox/firmware/common: file.c.~1.50.~
diff -rubBP /home/dast/src/rockbox/firmware/common/sprintf.c ./firmware/common/sprintf.c
--- /home/dast/src/rockbox/firmware/common/sprintf.c	Fri Aug 29 13:50:01 2003
+++ ./firmware/common/sprintf.c	Wed Oct 29 15:12:22 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: sprintf.c,v 1.11 2003/05/24 00:19:27 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Gary Czvitkovicz
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /*
  * Minimal printf and snprintf formatting functions
  *
diff -rubBP /home/dast/src/rockbox/firmware/common/strtok.c ./firmware/common/strtok.c
--- /home/dast/src/rockbox/firmware/common/strtok.c	Mon Jan 27 16:33:46 2003
+++ ./firmware/common/strtok.c	Wed Oct 29 15:12:23 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: strtok.c,v 1.2 2003/01/24 10:52:16 matsl Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied. *
- ****************************************************************************/
-
 #include "config.h"
 
 #ifndef HAVE_STRTOK_R
diff -rubBP /home/dast/src/rockbox/firmware/common/timefuncs.c ./firmware/common/timefuncs.c
--- /home/dast/src/rockbox/firmware/common/timefuncs.c	Mon Jan 27 16:33:46 2003
+++ ./firmware/common/timefuncs.c	Wed Oct 29 15:12:23 2003
@@ -1,25 +1,5 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: timefuncs.c,v 1.7 2003/01/27 14:40:12 zagor Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include "config.h"
 
-#include "rtc.h"
 #include "timefuncs.h"
 #include "debug.h"
 
@@ -27,23 +7,6 @@
 
 struct tm *get_time(void)
 {
-#ifdef HAVE_RTC
-    char rtcbuf[8];
-
-    /* We don't need the first byte, but we want the indexes in the
-       buffer to match the data sheet */
-    rtc_read_multiple(1, &rtcbuf[1], 7);
-
-    tm.tm_sec = ((rtcbuf[1] & 0x70) >> 4) * 10 + (rtcbuf[1] & 0x0f);
-    tm.tm_min = ((rtcbuf[2] & 0x70) >> 4) * 10 + (rtcbuf[2] & 0x0f);
-    tm.tm_hour = ((rtcbuf[3] & 0x30) >> 4) * 10 + (rtcbuf[3] & 0x0f);
-    tm.tm_mday = ((rtcbuf[5] & 0x30) >> 4) * 10 + (rtcbuf[5] & 0x0f);
-    tm.tm_mon = ((rtcbuf[6] & 0x10) >> 4) * 10 + (rtcbuf[6] & 0x0f) - 1;
-    tm.tm_year = ((rtcbuf[7] & 0xf0) >> 4) * 10 + (rtcbuf[7] & 0x0f) + 100;
-    tm.tm_wday = rtcbuf[4] & 0x07;
-    tm.tm_yday = 0; /* Not implemented for now */
-    tm.tm_isdst = -1; /* Not implemented for now */
-#else
     tm.tm_sec = 0;
     tm.tm_min = 0;
     tm.tm_hour = 0;
@@ -53,6 +16,5 @@
     tm.tm_wday = 1;
     tm.tm_yday = 0; /* Not implemented for now */
     tm.tm_isdst = -1; /* Not implemented for now */
-#endif
     return &tm;
 }
Only in /home/dast/src/rockbox/firmware: crt0.S
diff -rubBP /home/dast/src/rockbox/firmware/debug.c ./firmware/debug.c
--- /home/dast/src/rockbox/firmware/debug.c	Thu Oct 31 08:57:55 2002
+++ ./firmware/debug.c	Wed Oct 29 15:12:18 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: debug.c,v 1.21 2002/10/20 22:50:55 zagor Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "sh7034.h"
 #include <string.h>
 #include <stdio.h>
@@ -188,6 +170,12 @@
 
 static void debug(char *msg)
 {
+    for (;*msg;++msg) {
+        debug_tx_char(*msg);
+        if (*msg=='\n' && *(msg-1)!='\r' && *(msg+1)!='\r')
+            debug_tx_char('\r');
+    }
+    return;
     debugbuf[0] = 'O';
     
     mem2hex(msg, &debugbuf[1], strlen(msg));
Only in /home/dast/src/rockbox/firmware: descramble.S
Only in /home/dast/src/rockbox/firmware/drivers: CVS
Only in /home/dast/src/rockbox/firmware/drivers: adc.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/ata.c ./firmware/drivers/ata.c
--- /home/dast/src/rockbox/firmware/drivers/ata.c	Thu Dec  4 16:35:39 2003
+++ ./firmware/drivers/ata.c	Wed Oct 29 15:12:23 2003
@@ -1,46 +1,24 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: ata.c,v 1.96 2003/12/03 01:02:23 hohensoh Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 #include "ata.h"
 #include "kernel.h"
 #include "thread.h"
-#include "led.h"
 #include "sh7034.h"
 #include "system.h"
 #include "debug.h"
 #include "panic.h"
-#include "usb.h"
-#include "power.h"
 #include "string.h"
-#include "hwcompat.h"
 
 #define SECTOR_SIZE     512
-#define ATA_DATA        (*((volatile unsigned short*)0x06104100))
-#define ATA_ERROR       (*((volatile unsigned char*)0x06100101))
+#define ATA_DATA        (*((volatile unsigned short*)0x06104000))
+#define ATA_ERROR       (*((volatile unsigned char*)0x06100001))
 #define ATA_FEATURE     ATA_ERROR
-#define ATA_NSECTOR     (*((volatile unsigned char*)0x06100102))
-#define ATA_SECTOR      (*((volatile unsigned char*)0x06100103))
-#define ATA_LCYL        (*((volatile unsigned char*)0x06100104))
-#define ATA_HCYL        (*((volatile unsigned char*)0x06100105))
-#define ATA_SELECT      (*((volatile unsigned char*)0x06100106))
-#define ATA_COMMAND     (*((volatile unsigned char*)0x06100107))
-#define ATA_STATUS      (*((volatile unsigned char*)0x06100107))
+#define ATA_NSECTOR     (*((volatile unsigned char*)0x06100002))
+#define ATA_SECTOR      (*((volatile unsigned char*)0x06100003))
+#define ATA_LCYL        (*((volatile unsigned char*)0x06100004))
+#define ATA_HCYL        (*((volatile unsigned char*)0x06100005))
+#define ATA_SELECT      (*((volatile unsigned char*)0x06100006))
+#define ATA_COMMAND     (*((volatile unsigned char*)0x06100007))
+#define ATA_STATUS      (*((volatile unsigned char*)0x06100007))
 
 #define ATA_CONTROL1    ((volatile unsigned char*)0x06200206)
 #define ATA_CONTROL2    ((volatile unsigned char*)0x06200306)
@@ -71,6 +49,12 @@
 #define CMD_SLEEP                  0xE6
 #define CMD_SECURITY_FREEZE_LOCK   0xF5
 
+//ATA/ATAPI-6 Commands
+#define CMD_READ_SECTORS_EXT       0x24
+#define CMD_READ_MULTIPLE_EXT      0x29
+#define CMD_WRITE_MULTIPLE_EXT     0x39
+#define CMD_WRITE_SECTORS_EXT      0x34
+
 #define Q_SLEEP 0
 
 #define READ_TIMEOUT 5*HZ
@@ -95,7 +79,7 @@
 static bool initialized = false;
 static bool delayed_write = false;
 static unsigned char delayed_sector[SECTOR_SIZE];
-static int delayed_sector_num;
+static ata_sectors_t delayed_sector_num;
 
 static long last_user_activity = -1;
 long last_disk_activity = -1;
@@ -160,10 +144,10 @@
     return (ATA_ALT_STATUS & (STATUS_RDY|STATUS_DRQ)) == STATUS_RDY;
 }    
 
-int ata_read_sectors(unsigned long start,
+int ata_read_sectors(ata_sectors_t *start,
                      int count,
                      void* buf) __attribute__ ((section (".icode")));
-int ata_read_sectors(unsigned long start,
+int ata_read_sectors(ata_sectors_t *start,
                      int incount,
                      void* inbuf)
 {
@@ -178,21 +162,17 @@
     last_disk_activity = current_tick;
     spinup_start = current_tick;
 
-    led(true);
-
     if ( sleeping ) {
         spinup = true;
         if (poweroff) {
             if (ata_power_on()) {
                 mutex_unlock(&ata_mtx);
-                led(false);
                 return -1;
             }
         }
         else {
             if (perform_soft_reset()) {
                 mutex_unlock(&ata_mtx);
-                led(false);
                 return -1;
             }
         }
@@ -204,7 +184,6 @@
     if (!wait_for_rdy())
     {
         mutex_unlock(&ata_mtx);
-        led(false);
         return -2;
     }
 
@@ -215,16 +194,47 @@
         ret = 0;
         last_disk_activity = current_tick;
 
+        if (identify_info[83]&0x400) {  //atapi-6
+            ATA_NSECTOR = 0;
+            ATA_SECTOR  = (start->ata_sectors_s.high) & 0xFF;
+            ATA_LCYL    = ((start->ata_sectors_s.high) >> 8) & 0xFF;
+            ATA_HCYL    = ((start->ata_sectors_s.high) >> 16) & 0xFF;
+            if (!wait_for_rdy()) {
+                ret=-6;
+                goto retry;
+            }
+            ATA_NSECTOR = (unsigned char)count;
+            ATA_SECTOR  = (start->ata_sectors_s.low) & 0xFF;
+            ATA_LCYL    = ((start->ata_sectors_s.low) >> 8) & 0xFF;
+            ATA_HCYL    = ((start->ata_sectors_s.low) >> 16) & 0xFF;
+
+/*	    DEBUGF("Reading %d sectors\n"
+		   " Reading Sector: 0x%x.%x\n"
+		   " Reading LCYL  : 0x%x.%x\n"
+		   " Reading HCYL  : 0x%x.%x\n",
+		   count,
+		   (start->ata_sectors_s.high) & 0xFF,
+		   (start->ata_sectors_s.low) & 0xFF,
+		   ((start->ata_sectors_s.high) >> 8) & 0xFF,
+		   ((start->ata_sectors_s.low) >> 8) & 0xFF,
+		   ((start->ata_sectors_s.high) >> 16) & 0xFF,
+		   ((start->ata_sectors_s.low) >> 16) & 0xFF);*/
+            ATA_SELECT = SELECT_LBA | ata_device;
+            ATA_COMMAND = CMD_READ_MULTIPLE_EXT;
+        } else {
+	    unsigned int sector=start->ata_sectors_s.low;
+	    sector+=((start->ata_sectors_s.high)<<24);
         if ( count == 256 )
             ATA_NSECTOR = 0; /* 0 means 256 sectors */
         else
             ATA_NSECTOR = (unsigned char)count;
 
-        ATA_SECTOR  = start & 0xff;
-        ATA_LCYL    = (start >> 8) & 0xff;
-        ATA_HCYL    = (start >> 16) & 0xff;
-        ATA_SELECT  = ((start >> 24) & 0xf) | SELECT_LBA | ata_device;
+            ATA_SECTOR  = sector & 0xff;
+            ATA_LCYL    = (sector >> 8) & 0xff;
+            ATA_HCYL    = (sector >> 16) & 0xff;
+            ATA_SELECT  = ((sector >> 24) & 0xf) | SELECT_LBA | ata_device;
         ATA_COMMAND = CMD_READ_MULTIPLE;
+        }
 
         /* wait at least 400ns between writing command and reading status */
         asm volatile ("nop");
@@ -300,7 +310,6 @@
         }
         break;
     }
-    led(false);
 
     mutex_unlock(&ata_mtx);
 
@@ -311,7 +320,7 @@
     return ret;
 }
 
-int ata_write_sectors(unsigned long start,
+int ata_write_sectors(ata_sectors_t *start,
                       int count,
                       void* buf)
 {
@@ -319,7 +328,7 @@
     int ret = 0;
     int spinup_start;
 
-    if (start == 0)
+    if (start->sector == 0)
         panicf("Writing on sector 0\n");
 
     mutex_lock(&ata_mtx);
@@ -327,21 +336,17 @@
     last_disk_activity = current_tick;
     spinup_start = current_tick;
 
-    led(true);
-
     if ( sleeping ) {
         spinup = true;
         if (poweroff) {
             if (ata_power_on()) {
                 mutex_unlock(&ata_mtx);
-                led(false);
                 return -1;
             }
         }
         else {
             if (perform_soft_reset()) {
                 mutex_unlock(&ata_mtx);
-                led(false);
                 return -1;
             }
         }
@@ -351,19 +356,38 @@
     if (!wait_for_rdy())
     {
         mutex_unlock(&ata_mtx);
-        led(false);
         return -2;
     }
 
+    if (identify_info[83]&0x400) {  //atapi-6
+        ATA_NSECTOR = 0;
+        ATA_SECTOR  = (start->ata_sectors_s.high) & 0xFF;
+        ATA_LCYL    = ((start->ata_sectors_s.high) >> 8) & 0xFF;
+        ATA_HCYL    = ((start->ata_sectors_s.high) >> 16) & 0xFF;
+        if (!wait_for_rdy()) {
+            mutex_unlock(&ata_mtx);
+            return -6;
+        }
+        ATA_NSECTOR = (unsigned char)count;
+        ATA_SECTOR  = (start->ata_sectors_s.low) & 0xFF;
+        ATA_LCYL    = ((start->ata_sectors_s.low) >> 8) & 0xFF;
+        ATA_HCYL    = ((start->ata_sectors_s.low) >> 16) & 0xFF;
+
+        ATA_SELECT  = SELECT_LBA | ata_device;
+        ATA_COMMAND = CMD_WRITE_SECTORS_EXT;
+    } else {
+	unsigned int sector=start->ata_sectors_s.low;
+	sector+=((start->ata_sectors_s.high)<<24);
     if ( count == 256 )
         ATA_NSECTOR = 0; /* 0 means 256 sectors */
     else
         ATA_NSECTOR = (unsigned char)count;
-    ATA_SECTOR  = start & 0xff;
-    ATA_LCYL    = (start >> 8) & 0xff;
-    ATA_HCYL    = (start >> 16) & 0xff;
-    ATA_SELECT  = ((start >> 24) & 0xf) | SELECT_LBA | ata_device;
+        ATA_SECTOR  = sector & 0xff;
+        ATA_LCYL    = (sector >> 8) & 0xff;
+        ATA_HCYL    = (sector >> 16) & 0xff;
+        ATA_SELECT  = ((sector >> 24) & 0xf) | SELECT_LBA | ata_device;
     ATA_COMMAND = CMD_WRITE_SECTORS;
+    }
 
     for (i=0; i<count; i++) {
         int j;
@@ -397,8 +421,6 @@
     if(!ret && !wait_for_end_of_transfer())
         ret = -4;
 
-    led(false);
-
     mutex_unlock(&ata_mtx);
 
     /* only flush if writing went ok */
@@ -408,19 +430,21 @@
     return ret;
 }
 
-extern void ata_delayed_write(unsigned long sector, void* buf)
+extern void ata_delayed_write(ata_sectors_t *sector, void* buf)
 {
     memcpy(delayed_sector, buf, SECTOR_SIZE);
-    delayed_sector_num = sector;
+    memcpy(&delayed_sector_num,sector,sizeof(ata_sectors_t));
+    if (delayed_sector_num.sector!=sector->sector)
+        panicf("Sector numbers don't match!\n");
     delayed_write = true;
 }
 
 extern void ata_flush(void)
 {
     if ( delayed_write ) {
-        DEBUGF("ata_flush()\n");
+//        DEBUGF("ata_flush()\n");
         delayed_write = false;
-        ata_write_sectors(delayed_sector_num, 1, delayed_sector);
+        ata_write_sectors(&delayed_sector_num, 1, delayed_sector);
     }
 }
 
@@ -428,8 +452,12 @@
 
 static int check_registers(void)
 {
-    if ( ATA_STATUS & STATUS_BSY )
+    if ( ATA_STATUS & STATUS_BSY ) {
+        int i;
+        for (i=0;i<50;++i)
+            DEBUGF("check registers: ATA Busy! (0x%2x)\n",ATA_STATUS);
             return -1;
+    }
 
     ATA_NSECTOR = 0xa5;
     ATA_SECTOR  = 0x5a;
@@ -562,38 +590,10 @@
                 last_sleep = current_tick;
             }
 
-#ifdef HAVE_ATA_POWER_OFF
-            if ( !spinup && sleeping && poweroff_timeout && !poweroff &&
-                 TIME_AFTER( current_tick, last_sleep + poweroff_timeout ))
-            {
-                mutex_lock(&ata_mtx);
-                ide_power_enable(false);
-                mutex_unlock(&ata_mtx);
-                poweroff = true;
-            }
-#endif
-
             sleep(HZ/4);
         }
         queue_wait(&ata_queue, &ev);
         switch ( ev.id ) {
-            case SYS_USB_CONNECTED:
-                if (poweroff) {
-                    mutex_lock(&ata_mtx);
-                    led(true);
-                    ata_power_on();
-                    led(false);
-                    mutex_unlock(&ata_mtx);
-                }
-
-                /* Tell the USB thread that we are safe */
-                DEBUGF("ata_thread got SYS_USB_CONNECTED\n");
-                usb_acknowledge(SYS_USB_CONNECTED_ACK);
-
-                /* Wait until the USB cable is extracted again */
-                usb_wait_for_disconnect(&ata_queue);
-                break;
-
             case Q_SLEEP:
                 last_disk_activity = current_tick - sleep_timeout + (HZ/2);
                 break;
@@ -606,12 +606,13 @@
 {
     int ret;
     
+    DEBUGF("ATA hard reset\r\n");
     /* state HRR0 */
-    and_b(~0x02, &PADRH); /* assert _RESET */
+    PADR &= ~0x0200; /* assert _RESET */
     sleep(1); /* > 25us */
 
     /* state HRR1 */
-    or_b(0x02, &PADRH); /* negate _RESET */
+    PADR |= 0x0200; /* negate _RESET */
     sleep(1); /* > 2ms */
 
     /* state HRR2 */
@@ -663,7 +664,6 @@
 
 static int ata_power_on(void)
 {
-    ide_power_enable(true);
     if( ata_hard_reset() )
         return -1;
 
@@ -683,8 +683,8 @@
     if ( ATA_STATUS & (STATUS_RDY|STATUS_BSY) ) {
         ata_device = 0;
         DEBUGF("Found master harddisk\n");
-    }
-    else {
+        return 0;
+    } else {
         /* slave? */
         ATA_SELECT = SELECT_DEVICE1;
         if ( ATA_STATUS & (STATUS_RDY|STATUS_BSY) ) {
@@ -698,31 +698,31 @@
 }
 
 static int io_address_detect(void)
-{   /* now, use the HW mask instead of probing */
-    if (read_hw_mask() & ATA_ADDRESS_200)
-    {
-        ata_io_address = 0x200; /* For debug purposes only */
-        old_recorder = false;
+{
+    //now use the HW mask instead of probing
+/*    if (read_hw_mask() & ATA_ADDRESS_200) {
+        DEBUGF("CONTROL is at 0x200\n");
+        ata_io_address = 0x200; /* For debug purposes only 
         ata_control = ATA_CONTROL1;
     }
     else
-    {
+    {*/
+        DEBUGF("CONTROL is at 0x300\n");
         ata_io_address = 0x300; /* For debug purposes only */
         old_recorder = true;
         ata_control = ATA_CONTROL2;
-    }
+//    }
 
     return 0;
 }
 
 void ata_enable(bool on)
 {
+    PAIOR |= 0x02;
     if(on)
-        and_b(~0x80, &PADRL); /* enable ATA */
+        PADR &= ~0x02; /* enable ATA */
     else
-        or_b(0x80, &PADRL); /* disable ATA */
-
-    or_b(0x80, &PAIORL);
+        PADR |= 0x02;   /* disable ATA */
 }
 
 static int identify(void)
@@ -781,28 +781,21 @@
 {
     int rc;
     bool coldstart = (PACR2 & 0x4000) != 0; 
-
+//    bool coldstart=true;
     mutex_init(&ata_mtx);
 
-    led(false);
-
     /* Port A setup */
-    or_b(0x02, &PAIORH); /* output for ATA reset */
-    or_b(0x02, &PADRH); /* release ATA reset */
-    PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
+    PAIOR |= 0x0200; /* output for ATA reset */
+    PADR |= 0x0200; /* release ATA reset */
+    PACR2 &= 0xFFFB; /* GPIO function for PA1 (IDE enable) */
 
     sleeping = false;
     ata_enable(true);
 
     if ( !initialized ) {
-        if (!ide_powered()) /* somebody has switched it off */
-        {
-            ide_power_enable(true);
-            sleep(HZ); /* allow voltage to build up */
-        }
-
         if (coldstart)
         {
+            DEBUGF("ata_init: Cold start detected...\r\n");
             /* Reset both master and slave, we don't yet know what's in */
             /* this is safe because non-present devices don't report busy */
             ata_device = 0;
@@ -822,7 +815,7 @@
             return -20 + rc;
 
         /* symptom fix: else check_registers() below may fail */
-        if (coldstart && !wait_for_bsy())
+        if (!wait_for_bsy())
         {   
             return -29;
         }
@@ -841,6 +835,28 @@
         multisectors = identify_info[47] & 0xff;
         DEBUGF("ata: %d sectors per ata request\n",multisectors);
         
+        rc=identify_info[80]&0xFF;
+        if (identify_info[80]&0x40) {
+            DEBUGF("ata: ATA/ATAPI-6 device detected...\n");
+            if (identify_info[83]&0x400) {
+                if (identify_info[86]&0x400) {
+                    DEBUGF("ata: ATA/ATAPI-6 48-bit Addresses supported...\n");
+                    DEBUGF("ata: Maximum 48-bit Address=0x%x%x%x%x\n",
+                           identify_info[100],identify_info[101],
+                           identify_info[102],identify_info[103]);
+                } else {
+                    DEBUGF("ata: Conflicting reports about 48-bit Addressing!\n");
+                }
+            } else {
+                DEBUGF("ata: ATA/ATAPI-6 48-bit Addresses not supported...\n");
+            }
+        } else if (identify_info[80]&0x20) {
+            DEBUGF("ata: ATA/ATAPI-5 device detected...\n");
+        } else if (identify_info[80]&0x20) {
+            DEBUGF("ata: ATA/ATAPI-4 device detected...\n");
+        } else if (identify_info[80]&0x20) {
+            DEBUGF("ata: ATA/ATAPI-3 device detected...\n");
+        }
         queue_init(&ata_queue);
 
         last_disk_activity = current_tick;
diff -rubBP /home/dast/src/rockbox/firmware/drivers/button.c ./firmware/drivers/button.c
--- /home/dast/src/rockbox/firmware/drivers/button.c	Tue Sep 23 08:13:09 2003
+++ ./firmware/drivers/button.c	Mon Nov 24 04:21:26 2003
@@ -1,40 +1,17 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: button.c,v 1.38 2003/09/19 23:20:09 zagor Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-/*
- * Archos Jukebox Recorder button functions
- */
-
 #include <stdlib.h>
 #include "config.h"
 #include "sh7034.h"
 #include "system.h"
 #include "button.h"
 #include "kernel.h"
-#include "backlight.h"
-#include "adc.h"
-#include "serial.h"
-#include "power.h"
+#include "debug.h"
 
 struct event_queue button_queue;
 
 long last_keypress;
 
+static bool mStation;
+
 /* how often we check to see if a button is pressed */
 #define POLL_FREQUENCY    HZ/20
 
@@ -47,12 +24,9 @@
 /* speed repeat finishes at */
 #define REPEAT_INTERVAL_FINISH  2
 
-/* Number of repeated keys before shutting off */
-#define POWEROFF_COUNT 8
+int button_read(void);
 
-static int button_read(void);
-
-static void button_tick(void)
+void button_tick(void)
 {
     static int tick = 0;
     static int count = 0;
@@ -63,14 +37,6 @@
     int diff;
     int btn;
 
-    /* Post events for the remote control */
-    btn = remote_control_rx();
-    if(btn)
-    {
-        queue_post(&button_queue, btn, NULL);
-        backlight_on();
-    }   
-    
     /* only poll every X ticks */
     if ( ++tick >= POLL_FREQUENCY )
     {
@@ -81,18 +48,20 @@
         diff = btn ^ lastbtn;
         if(diff && (btn & diff) == 0)
         {
+//            DEBUGF("Button Release: 0x%x - 0x%x\n",btn,diff);
             queue_post(&button_queue, BUTTON_REL | diff, NULL);
         }
         
+        
         if ( btn )
         {
             /* normal keypress */
             if ( btn != lastbtn )
             {
+//                DEBUGF("Normal Keypress\n");
                 post = true;
                 repeat = false;
                 repeat_speed = REPEAT_INTERVAL_START;
-                
             }
             else /* repeat? */
             {
@@ -101,6 +70,7 @@
                     count--;
                     if (count == 0) {
                         post = true;
+//                        DEBUGF("Repeat Keypress\n");
                         /* yes we have repeat */
                         repeat_speed--;
                         if (repeat_speed < REPEAT_INTERVAL_FINISH)
@@ -109,13 +79,6 @@
 
                         repeat_count++;
                         
-                        /* Shutdown if we have a device which doesn't shut
-                           down easily with the OFF key */
-#ifdef HAVE_POWEROFF_ON_PB5
-                        if(btn == BUTTON_OFF && !charger_inserted() &&
-                            repeat_count > POWEROFF_COUNT)
-                            power_off();
-#endif
                     }
                 }
                 else
@@ -136,7 +99,6 @@
                     queue_post(&button_queue, BUTTON_REPEAT | btn, NULL);
                 else
                     queue_post(&button_queue, btn, NULL);
-                backlight_on();
 
                 last_keypress = current_tick;
             }
@@ -151,7 +113,11 @@
         tick = 0;
     }
         
-    backlight_tick();
+}
+
+int button_add(unsigned int button) {
+    queue_post(&button_queue,button,NULL);
+    return 1;
 }
 
 int button_get(bool block)
@@ -165,167 +131,108 @@
     return BUTTON_NONE;
 }
 
-int button_get_w_tmo(int ticks)
+/* Waits for certain button to be pressed */
+int button_get_flt( bool block, int btns, int ir_btns, int flags )
 {
     struct event ev;
-    queue_wait_w_tmo(&button_queue, &ev, ticks);
-    return (ev.id != SYS_TIMEOUT)? ev.id: BUTTON_NONE;
-}
 
-#ifdef HAVE_RECORDER_KEYPAD
+    ev.id = BUTTON_NONE;
 
-/* AJBR buttons are connected to the CPU as follows:
- *
- * ON and OFF are connected to separate port B input pins.
- *
- * F1, F2, F3, and UP are connected to the AN4 analog input, each through
- * a separate voltage divider.  The voltage on AN4 depends on which button
- * (or none, or a combination) is pressed.
- *
- * DOWN, PLAY, LEFT, and RIGHT are likewise connected to AN5. */
- 
-/* Button analog voltage levels */
-#ifdef HAVE_FMADC
-/* FM Recorder super-special levels */
-#define	LEVEL1		150
-#define	LEVEL2		385
-#define	LEVEL3		545
-#define	LEVEL4		700
-#else
-/* plain bog standard Recorder levels */
-#define	LEVEL1		250
-#define	LEVEL2		500
-#define	LEVEL3		700
-#define	LEVEL4		900
-#endif
-
-/*
- *Initialize buttons
- */
-void button_init()
-{
-#ifndef SIMULATOR
-    /* Set PB4 and PB8 as input pins */
-    PBCR1 &= 0xfffc; /* PB8MD = 00 */
-    PBCR2 &= 0xfcff; /* PB4MD = 00 */
-    PBIOR &= ~(PBDR_BTN_ON|PBDR_BTN_OFF); /* Inputs */
-#endif
-    queue_init(&button_queue);
-    tick_add_task(button_tick);
-}
+    do {
+      if( block ||!queue_empty(&button_queue) ) {
 
-/*
- * Get button pressed from hardware
- */
-static int button_read(void)
-{
-    int btn = BUTTON_NONE;
+	queue_wait(&button_queue, &ev);
 
-    /* Check port B pins for ON and OFF */
-    int data;
+	if( ((ev.id & BUTTON_FLAG_MASK ) & ~flags) == 0 ){
 
-#ifdef HAVE_FMADC
-    /* TODO: use proper defines here, and not the numerics in the
-       function argument */
-    if ( adc_read(3) < 512 )
-        btn |= BUTTON_ON;
-    if ( adc_read(2) > 512 )
-        btn |= BUTTON_OFF;
-#else
-    data = PBDR;
-    if ((data & PBDR_BTN_ON) == 0)
-        btn |= BUTTON_ON;
-    else if ((data & PBDR_BTN_OFF) == 0)
-        btn |= BUTTON_OFF;
-#endif
-
-    /* Check F1-3 and UP */
-    data = adc_read(ADC_BUTTON_ROW1);
-    if (data >= LEVEL4)
-        btn |= BUTTON_F3;
-    else if (data >= LEVEL3)
-        btn |= BUTTON_UP;
-    else if (data >= LEVEL2)
-        btn |= BUTTON_F2;
-    else if (data >= LEVEL1)
-        btn |= BUTTON_F1;
-
-    /* Some units have mushy keypads, so pressing UP also activates
-       the Left/Right buttons. Let's combat that by skipping the AN5
-       checks when UP is pressed. */
-    if(!(btn & BUTTON_UP))
-    {
-        /* Check DOWN, PLAY, LEFT, RIGHT */
-        data = adc_read(ADC_BUTTON_ROW2);
-        if (data >= LEVEL4)
-            btn |= BUTTON_DOWN;
-        else if (data >= LEVEL3) {
-#ifdef HAVE_FMADC
-            btn |= BUTTON_RIGHT;
-#else
-            btn |= BUTTON_PLAY;
-#endif
-        }
-        else if (data >= LEVEL2)
-            btn |= BUTTON_LEFT;
-        else if (data >= LEVEL1) {
-#ifdef HAVE_FMADC
-            btn |= BUTTON_PLAY;
-#else
-            btn |= BUTTON_RIGHT;
-#endif
+	  if( ev.id & BUTTON_IR ) {
+	    if( !(ev.id & ir_btns) )
+	      ev.id = BUTTON_NONE;
+	  }
+	  else if( !(ev.id & btns ) )
+	    ev.id = BUTTON_NONE;
         }
+	else
+	  ev.id = BUTTON_NONE;
     }
+    }
+    while( !(ev.id & BUTTON_MASK) && block );
   
-    return btn;
+    return ev.id;
+}
+
+int button_get_w_tmo(int ticks)
+{
+    struct event ev;
+    queue_wait_w_tmo(&button_queue, &ev, ticks);
+    return (ev.id != SYS_TIMEOUT)? ev.id: BUTTON_NONE;
 }
 
-#elif HAVE_PLAYER_KEYPAD
+int button_get_w_tmo_flt(int ticks, int btns, int ir_btns, int flags )
+{
+  struct event ev;
+  unsigned int timeout = current_tick + ticks;
+  int	ret = BUTTON_NONE;
 
-/* The player has two buttons on port pins:
+  while( TIME_BEFORE( current_tick, timeout ) ) {
+    sleep_thread();
 
-   STOP:  PA11
-   ON:    PA5
+    if( button_queue.read != button_queue.write ){
+      ev = button_queue.events[(button_queue.read++) & QUEUE_LENGTH_MASK];
 
-   The rest are on analog inputs:
+      if( (ev.id&BUTTON_FLAG_MASK) & ~flags )
+	ev.id = BUTTON_NONE;
+      else {
+	if( (flags & BUTTON_IR) && (ev.id & BUTTON_IR) ){
+	  if( !((ev.id&BUTTON_MASK) & ir_btns) )
+	    ev.id = BUTTON_NONE;     
+	}
+	else{
+	  if( !((ev.id&BUTTON_MASK) & btns) )
+	    ev.id = BUTTON_NONE;
+	}
    
-   LEFT:  AN0
-   MENU:  AN1
-   RIGHT: AN2
-   PLAY:  AN3
-*/
+	//If we have a wanted and valid button we return
+	if( ev.id & BUTTON_MASK ){
+	  ret = ev.id;
+	  break;
+	}
+      }			
+    }
+  }
+  wake_up_thread();
+  return ret;
+}
 
 void button_init(void)
 {
     /* set port pins as input */
-    PAIOR &= ~0x820;
+    PAIOR &= ~0x4000;  //PA14 for stop button
+
     queue_init(&button_queue);
     tick_add_task(button_tick);
 
     last_keypress = current_tick;
+    mStation=false; //assume no mStation unless told otherwise...
+}
+
+void button_found_mStation(void)
+{
+    mStation=true;
 }
 
-static int button_read(void)
+int button_read(void)
 {
-    int porta = PADR;
-    int btn = BUTTON_NONE;
+    int btn=BUTTON_NONE;
+    
+    btn|=((~PCDR)&0xFF);
 
-    /* buttons are active low */
-    if(adc_read(0) < 0x180)
-        btn |= BUTTON_LEFT;
-    if(adc_read(1) < 0x180)
-        btn |= BUTTON_MENU;
-    if(adc_read(2) < 0x180)
-        btn |= BUTTON_RIGHT;
-    if(adc_read(3) < 0x180)
-        btn |= BUTTON_PLAY | BUTTON_UP;
-
-    if ( !(porta & 0x20) )
-        btn |= BUTTON_ON;
-    if ( !(porta & 0x800) )
-        btn |= BUTTON_STOP | BUTTON_DOWN;
+    //mStation does not have a stop button and this
+    //floods the button queue with stops if used on
+    //a mStation
+    if (!mStation)
+        btn|=((~(PADR>>6))&0x100);
 
     return btn;
 }
 
-#endif
diff -rubBP /home/dast/src/rockbox/firmware/drivers/dac.c ./firmware/drivers/dac.c
--- /home/dast/src/rockbox/firmware/drivers/dac.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/drivers/dac.c	Tue Dec  2 22:00:23 2003
@@ -1,40 +1,14 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: dac.c,v 1.8 2003/11/03 23:36:36 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "config.h"
 #include "stdbool.h"
 #include "i2c.h"
 #include "debug.h"
 #include "dac.h"
 
-#ifdef HAVE_DAC3550A
-
-static bool line_in_enabled = false;
-static bool dac_enabled = false;
-
-
 int dac_volume(unsigned int left, unsigned int right, bool deemph)
 {
-    int ret = 0;
+    int ret;
     unsigned char buf[3];
 
-    i2c_begin();
-
     if (left > 0x38)
         left = 0x38;
     if (right > 0x38)
@@ -45,11 +19,8 @@
     buf[2] = right & 0x3f;
 
     /* send write command */
-    if (i2c_write(DAC_DEV_WRITE,buf,3))
-    {
-        ret = -1;
-    }
-
+    i2c_begin();
+    ret = i2c_write(DAC_DEV_WRITE,buf,3);
     i2c_end();
     return ret;
 }
@@ -58,60 +29,33 @@
 ** Bit6:  0 = 3V        1 = 5V
 ** Bit5:  0 = normal    1 = low power
 ** Bit4:  0 = AUX2 off  1 = AUX2 on
-** Bit3:  0 = AUX1 off  1 = AUX1 on
+** Bit3:  0 = AUX1 off  1 = AUX2 on
 ** Bit2:  0 = DAC off   1 = DAC on
 ** Bit1:  0 = stereo    1 = mono
 ** Bit0:  0 = normal right amp   1 = inverted right amp
 ******************************************************************/
-/* dac_config is called once to initialize it. we will apply
-   our static settings because of the init flow.
-   dac_init -> dac_line_in -> mpeg_init -> dac_config
-*/
-static int dac_config(void)
+int dac_config(int value)
 {
-    int ret = 0;
+    int ret;
     unsigned char buf[2];
 
-    i2c_begin();
-
     buf[0] = DAC_REG_WRITE | DAC_GCFG;
-    buf[1] = (dac_enabled ? 0x04 : 0) |
-        (line_in_enabled ? 0x08 : 0);
-
-    /* send write command */
-    if (i2c_write(DAC_DEV_WRITE,buf,2))
-    {
-        ret = -1;
-    }
+    buf[1] = value;
 
+    i2c_begin();
+    ret = i2c_write(DAC_DEV_WRITE,buf,2);
     i2c_end();
     return ret;
 }
 
-void dac_enable(bool enable)
-{
-    dac_enabled = enable;
-    dac_config();
-}
-
-void dac_line_in(bool enable)
-{
-    line_in_enabled = enable;
-    dac_config();
-}
-
 void dac_init(void)
 {
     unsigned char buf[2];
 
-    i2c_begin();
-
     buf[0] = DAC_REG_WRITE | DAC_SR_REG;
     buf[1] = 0x07;
 
-    /* send write command */
+    i2c_begin();
     i2c_write(DAC_DEV_WRITE,buf,2);
     i2c_end();
 }
-
-#endif
Only in /home/dast/src/rockbox/firmware/drivers: dac.h
diff -rubBP /home/dast/src/rockbox/firmware/drivers/fat.c ./firmware/drivers/fat.c
--- /home/dast/src/rockbox/firmware/drivers/fat.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/drivers/fat.c	Fri Nov  7 07:55:00 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: fat.c,v 1.80 2003/11/03 00:59:04 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
@@ -28,6 +10,7 @@
 #include "panic.h"
 #include "system.h"
 #include "timefuncs.h"
+#include "kernel.h"
 
 #define BYTES2INT16(array,pos) \
           (array[pos] | (array[pos+1] << 8 ))
@@ -265,9 +248,10 @@
 
 static int cluster2sec(int cluster)
 {
-    int max_cluster = fat_bpb.totalsectors -
+    int max_cluster= fat_bpb.totalsectors -
         fat_bpb.firstdatasector / fat_bpb.bpb_secperclus + 1;
     
+    
     if(cluster > max_cluster)
     {
         DEBUGF( "cluster2sec() - Bad cluster number (%d)\n",
@@ -280,7 +264,7 @@
 
 static int first_sector_of_cluster(int cluster)
 {
-    return (cluster - 2) * fat_bpb.bpb_secperclus + fat_bpb.firstdatasector;
+    return (cluster - 2) * fat_bpb.bpb_secperclus +fat_bpb.firstdatasector;
 }
 
 int fat_startsector(void)
@@ -302,7 +286,9 @@
     int rc;
     int datasec;
     unsigned int i;
+    ata_sectors_t sector;
 
+    memset(&sector,0,sizeof(sector));
     for(i = 0;i < FAT_CACHE_SIZE;i++)
     {
         fat_cache[i].secnum = 8; /* We use a "safe" sector just in case */
@@ -310,8 +296,10 @@
         fat_cache[i].dirty = false;
     }
 
+    sector.ata_sectors_s.low=startsector&0xFFFFFF;
+    sector.ata_sectors_s.high=(startsector&0xFF000000)>>24;
     /* Read the sector */
-    rc = ata_read_sectors(startsector,1,buf);
+    rc = ata_read_sectors(&sector,1,buf);
     if(rc)
     {
         DEBUGF( "fat_mount() - Couldn't read BPB (error code %d)\n", rc);
@@ -393,8 +381,10 @@
 
     fat_bpb.rootdirsector = cluster2sec(fat_bpb.bpb_rootclus);
 
+    sector.ata_sectors_s.low=(startsector+fat_bpb.bpb_fsinfo)&0xFFFFFF;
+    sector.ata_sectors_s.high=((startsector+fat_bpb.bpb_fsinfo)&0xFF000000)>>24;
     /* Read the fsinfo sector */
-    rc = ata_read_sectors(startsector + fat_bpb.bpb_fsinfo, 1, buf);
+    rc = ata_read_sectors(&sector, 1, buf);
     if (rc < 0)
     {
         DEBUGF( "fat_mount() - Couldn't read FSInfo (error code %d)\n", rc);
@@ -418,6 +408,163 @@
     return 0;
 }
 
+int fat_mount_backup(int startsector)
+{
+    unsigned char buf[SECTOR_SIZE];
+    int rc;
+    int datasec;
+    unsigned int i;
+    ata_sectors_t sector;
+    
+    memset(&sector,0,sizeof(sector));
+    for(i = 0;i < FAT_CACHE_SIZE;i++)
+    {
+        fat_cache[i].secnum = 8; /* We use a "safe" sector just in case */
+        fat_cache[i].inuse = false;
+        fat_cache[i].dirty = false;
+    }
+
+    sector.ata_sectors_s.low=(startsector+6)&0xFFFFFF;
+    sector.ata_sectors_s.high=((startsector+6)&0xFF000000)>>24;
+    /* Read the sector */
+    rc = ata_read_sectors(&sector,1,buf);
+    if(rc)
+    {
+        DEBUGF( "fat_mount_backup() - Couldn't read BPB (error code %d)\n", rc);
+        return rc * 10 - 1;
+    }
+
+    memset(&fat_bpb, 0, sizeof(struct bpb));
+    fat_bpb.startsector = startsector;
+    
+    strncpy(fat_bpb.bs_oemname, &buf[BS_OEMNAME], 8);
+    fat_bpb.bs_oemname[8] = 0;
+
+    fat_bpb.bpb_bytspersec = BYTES2INT16(buf,BPB_BYTSPERSEC);
+    fat_bpb.bpb_secperclus = buf[BPB_SECPERCLUS];
+    fat_bpb.bpb_rsvdseccnt = BYTES2INT16(buf,BPB_RSVDSECCNT);
+    fat_bpb.bpb_numfats    = buf[BPB_NUMFATS];
+    fat_bpb.bpb_totsec16   = BYTES2INT16(buf,BPB_TOTSEC16);
+    fat_bpb.bpb_media      = buf[BPB_MEDIA];
+    fat_bpb.bpb_fatsz16    = BYTES2INT16(buf,BPB_FATSZ16);
+    fat_bpb.bpb_fatsz32    = BYTES2INT32(buf,BPB_FATSZ32);
+    fat_bpb.bpb_secpertrk  = BYTES2INT16(buf,BPB_SECPERTRK);
+    fat_bpb.bpb_numheads   = BYTES2INT16(buf,BPB_NUMHEADS);
+    fat_bpb.bpb_hiddsec    = BYTES2INT32(buf,BPB_HIDDSEC);
+    fat_bpb.bpb_totsec32   = BYTES2INT32(buf,BPB_TOTSEC32);
+    fat_bpb.last_word      = BYTES2INT16(buf,BPB_LAST_WORD);
+
+    /* calculate a few commonly used values */
+    if (fat_bpb.bpb_fatsz16 != 0)
+        fat_bpb.fatsize = fat_bpb.bpb_fatsz16;
+    else
+        fat_bpb.fatsize = fat_bpb.bpb_fatsz32;
+
+    if (fat_bpb.bpb_totsec16 != 0)
+        fat_bpb.totalsectors = fat_bpb.bpb_totsec16;
+    else
+        fat_bpb.totalsectors = fat_bpb.bpb_totsec32;
+    fat_bpb.firstdatasector = fat_bpb.bpb_rsvdseccnt +
+        fat_bpb.bpb_numfats * fat_bpb.fatsize;
+
+    /* Determine FAT type */
+    datasec = fat_bpb.totalsectors - fat_bpb.firstdatasector;
+    fat_bpb.dataclusters = datasec / fat_bpb.bpb_secperclus;
+
+#ifdef TEST_FAT
+    /*
+      we are sometimes testing with "illegally small" fat32 images,
+      so we don't use the proper fat32 test case for test code
+    */
+    if ( fat_bpb.bpb_fatsz16 )
+#else
+    if ( fat_bpb.dataclusters < 65525 )
+#endif
+    {
+        DEBUGF("This is not FAT32. Go away!\n");
+        return -2;
+    }
+
+    fat_bpb.bpb_extflags  = BYTES2INT16(buf,BPB_EXTFLAGS);
+    fat_bpb.bpb_fsver     = BYTES2INT16(buf,BPB_FSVER);
+    fat_bpb.bpb_rootclus  = BYTES2INT32(buf,BPB_ROOTCLUS);
+    fat_bpb.bpb_fsinfo    = BYTES2INT16(buf,BPB_FSINFO);
+    fat_bpb.bpb_bkbootsec = BYTES2INT16(buf,BPB_BKBOOTSEC);
+    fat_bpb.bs_drvnum     = buf[BS_32_DRVNUM];
+    fat_bpb.bs_bootsig    = buf[BS_32_BOOTSIG];
+
+    if(fat_bpb.bs_bootsig == 0x29)
+    {
+        fat_bpb.bs_volid = BYTES2INT32(buf,BS_32_VOLID);
+        strncpy(fat_bpb.bs_vollab, &buf[BS_32_VOLLAB], 11);
+        strncpy(fat_bpb.bs_filsystype, &buf[BS_32_FILSYSTYPE], 8);
+    }
+
+    rc = bpb_is_sane();
+    if (rc < 0)
+    {
+        DEBUGF( "fat_mount_backup() - BPB is not sane\n");
+        return rc * 10 - 3;
+    }
+
+    fat_bpb.rootdirsector = cluster2sec(fat_bpb.bpb_rootclus);
+
+    sector.ata_sectors_s.low=(startsector+fat_bpb.bpb_fsinfo)&0xFFFFFF;
+    sector.ata_sectors_s.high=((startsector+fat_bpb.bpb_fsinfo)&0xFF000000)>>24;
+    /* Read the fsinfo sector */
+    rc = ata_read_sectors(&sector, 1, buf);
+    if (rc < 0)
+    {
+        DEBUGF( "fat_mount_backup() - Couldn't read FSInfo (error code %d)\n", rc);
+        return rc * 10 - 4;
+    }
+    fat_bpb.fsinfo.freecount = BYTES2INT32(buf, FSINFO_FREECOUNT);
+    fat_bpb.fsinfo.nextfree = BYTES2INT32(buf, FSINFO_NEXTFREE);
+
+    /* calculate freecount if unset */
+    if ( fat_bpb.fsinfo.freecount == 0xffffffff )
+    {
+        fat_recalc_free();
+    }
+
+    /* rebuild original FAT */
+    memset(&sector,0,sizeof(ata_sectors_t));
+
+    sector.ata_sectors_s.low=(startsector+6)&0xFFFFFF;
+    sector.ata_sectors_s.high=((startsector+6)&0xFF000000)>>24;
+    /* Read the sector */
+    rc = ata_read_sectors(&sector,1,buf);
+    if(rc)
+    {
+        DEBUGF( "fat_mount_backup() - Couldn't read BPB (error code %d)\n", rc);
+        return rc * 10 - 1;
+    }
+
+    sector.ata_sectors_s.low=(startsector)&0xFFFFFF;
+    sector.ata_sectors_s.high=(startsector&0xFF000000)>>24;
+
+    /* Write to the first FAT */
+    rc = ata_write_sectors(&sector, 1, buf);
+    if(rc)
+    {
+        DEBUGF( "fat_mount_backup() - Couldn't write"
+                " sector 0x%x%x (error %d)\n", sector.ata_sectors_s.high,
+                sector.ata_sectors_s.low, rc);
+        return rc * 10 - 5;
+    }
+
+    update_fsinfo();
+
+    LDEBUGF("Using backup FAT...\n");
+    LDEBUGF("Freecount: %d\n",fat_bpb.fsinfo.freecount);
+    LDEBUGF("Nextfree: 0x%x\n",fat_bpb.fsinfo.nextfree);
+    LDEBUGF("Cluster count: 0x%x\n",fat_bpb.dataclusters);
+    LDEBUGF("Sectors per cluster: %d\n",fat_bpb.bpb_secperclus);
+    LDEBUGF("FAT sectors: 0x%x\n",fat_bpb.fatsize);
+
+    return 0;
+}
+
 void fat_recalc_free(void)
 {
     int free = 0;
@@ -494,6 +641,7 @@
     struct fat_cache_entry *fce = &fat_cache[cache_index];
     unsigned char *sectorbuf = &fat_cache_sectors[cache_index][0];
     int rc;
+    ata_sectors_t sector;
 
     /* Delete the cache entry if it isn't the sector we want */
     if(fce->inuse && fce->secnum != secnum)
@@ -501,7 +649,10 @@
         /* Write back if it is dirty */
         if(fce->dirty)
         {
-            rc = ata_write_sectors(fce->secnum+fat_bpb.startsector, 1,
+            memset(&sector,0,sizeof(ata_sectors_t));
+	    sector.ata_sectors_s.low=(fce->secnum+fat_bpb.startsector)&0xFFFFFF;
+	    sector.ata_sectors_s.high=((fce->secnum+fat_bpb.startsector)&0xFF000000)>>24;
+            rc = ata_write_sectors(&sector, 1,
                                    sectorbuf);
             if(rc < 0)
             {
@@ -511,9 +662,10 @@
             }
             if(fat_bpb.bpb_numfats > 1)
             {
+		sector.ata_sectors_s.low=(fce->secnum+fat_bpb.startsector+fat_bpb.fatsize)&0xFFFFFF;
+		sector.ata_sectors_s.high=((fce->secnum+fat_bpb.startsector+fat_bpb.fatsize)&0xFF000000)>>24;
                 /* Write to the second FAT */
-                rc = ata_write_sectors(fce->secnum+fat_bpb.startsector+
-                                       fat_bpb.fatsize, 1, sectorbuf);
+                rc = ata_write_sectors(&sector, 1, sectorbuf);
                 if(rc < 0)
                 {
                     panicf("cache_fat_sector() - Could not write sector %d"
@@ -530,8 +682,10 @@
     /* Load the sector if it is not cached */
     if(!fce->inuse)
     {
-        rc = ata_read_sectors(secnum + fat_bpb.startsector,1,
-                              sectorbuf);
+        memset(&sector,0,sizeof(ata_sectors_t));
+	sector.ata_sectors_s.low=(secnum+fat_bpb.startsector)&0xFFFFFF;
+	sector.ata_sectors_s.high=((secnum+fat_bpb.startsector)&0xFF000000)>>24;
+        rc = ata_read_sectors(&sector,1,sectorbuf);
         if(rc < 0)
         {
             DEBUGF( "cache_fat_sector() - Could not read sector %d"
@@ -567,14 +721,14 @@
                     cluster numbers out of bounds */
                 if ( c < 2 || c > fat_bpb.dataclusters+1 )
                     continue;
-                LDEBUGF("find_free_cluster(%x) == %x\n",startcluster,c);
+//                LDEBUGF("find_free_cluster(%x) == %x\n",startcluster,c);
                 fat_bpb.fsinfo.nextfree = c;
                 return c;
             }
         }
         offset = 0;
     }
-    LDEBUGF("find_free_cluster(%x) == 0\n",startcluster);
+//    LDEBUGF("find_free_cluster(%x) == 0\n",startcluster);
     return 0; /* 0 is an illegal cluster number */
 }
 
@@ -584,7 +738,7 @@
     int offset = entry % CLUSTERS_PER_FAT_SECTOR;
     unsigned int* sec;
 
-    LDEBUGF("update_fat_entry(%x,%x)\n",entry,val);
+//    LDEBUGF("update_fat_entry(%x,%x)\n",entry,val);
 
     if (entry==val)
         panicf("Creating FAT loop: %x,%x\n",entry,val);
@@ -610,8 +764,12 @@
             fat_bpb.fsinfo.freecount++;
     }
 
-    LDEBUGF("update_fat_entry: %d free clusters\n", fat_bpb.fsinfo.freecount);
+//    LDEBUGF("update_fat_entry: %d free clusters\n", fat_bpb.fsinfo.freecount);
 
+#ifdef DEBUG
+    if (sec[offset]>0x0FFFFFFF)
+	    DEBUGF("Sector number being cleaned off, too large!\n");
+#endif
     /* don't change top 4 bits */
     sec[offset] &= SWAB32(0xf0000000);
     sec[offset] |= SWAB32(val & 0x0fffffff);
@@ -653,9 +811,13 @@
     unsigned char fsinfo[SECTOR_SIZE];
     unsigned int* intptr;
     int rc;
+    ata_sectors_t sector;
     
+    memset(&sector,0,sizeof(ata_sectors_t));
+    sector.ata_sectors_s.low=(fat_bpb.startsector + fat_bpb.bpb_fsinfo)&0xFFFFFF;
+    sector.ata_sectors_s.high=((fat_bpb.startsector + fat_bpb.bpb_fsinfo)&0xFF000000)>>24;
     /* update fsinfo */
-    rc = ata_read_sectors(fat_bpb.startsector + fat_bpb.bpb_fsinfo, 1,fsinfo);
+    rc = ata_read_sectors(&sector, 1,fsinfo);
     if (rc < 0)
     {
         DEBUGF( "flush_fat() - Couldn't read FSInfo (error code %d)\n", rc);
@@ -667,7 +829,7 @@
     intptr = (int*)&(fsinfo[FSINFO_NEXTFREE]);
     *intptr = SWAB32(fat_bpb.fsinfo.nextfree);
 
-    rc = ata_write_sectors(fat_bpb.startsector + fat_bpb.bpb_fsinfo,1,fsinfo);
+    rc = ata_write_sectors(&sector,1,fsinfo);
     if (rc < 0)
     {
         DEBUGF( "flush_fat() - Couldn't write FSInfo (error code %d)\n", rc);
@@ -682,35 +844,41 @@
     int i;
     int rc;
     unsigned char *sec;
-    int secnum;
-    LDEBUGF("flush_fat()\n");
+    ata_sectors_t secnum;
+//    LDEBUGF("flush_fat()\n");
 
     for(i = 0;i < FAT_CACHE_SIZE;i++)
     {
         if(fat_cache[i].inuse && fat_cache[i].dirty)
         {
-            secnum = fat_cache[i].secnum + fat_bpb.startsector;
-            LDEBUGF("Flushing FAT sector %x\n", secnum);
+            memset(&secnum,0,sizeof(ata_sectors_t));
+	    secnum.ata_sectors_s.low=(fat_cache[i].secnum+fat_bpb.startsector)&0xFFFFFF;
+	    secnum.ata_sectors_s.high=((fat_cache[i].secnum+fat_bpb.startsector)&0xFF000000)>>24;
+//            LDEBUGF("Flushing FAT sector 0x%x%x\n", secnum.ata_sectors_s.high,
+//                    secnum.ata_sectors_s.low);
             sec = fat_cache_sectors[i];
 
             /* Write to the first FAT */
-            rc = ata_write_sectors(secnum, 1, sec);
+            rc = ata_write_sectors(&secnum, 1, sec);
             if(rc)
             {
                 DEBUGF( "flush_fat() - Couldn't write"
-                        " sector %d (error %d)\n", secnum, rc);
+                        " sector 0x%x%x (error %d)\n", secnum.ata_sectors_s.high,
+                    secnum.ata_sectors_s.low, rc);
                 return rc * 10 - 1;
             }
 
             if(fat_bpb.bpb_numfats > 1 )
             {
+		secnum.ata_sectors_s.low=(fat_cache[i].secnum+fat_bpb.startsector+fat_bpb.fatsize)&0xFFFFFF;
+	        secnum.ata_sectors_s.high=((fat_cache[i].secnum+fat_bpb.startsector+fat_bpb.fatsize)&0xFF000000)>>24;
                 /* Write to the second FAT */
-                rc = ata_write_sectors(secnum + fat_bpb.fatsize, 1, sec);
+                rc = ata_write_sectors(&secnum, 1, sec);
                 if (rc)
                 {
                     DEBUGF( "flush_fat() - Couldn't write"
-                             " sector %d (error %d)\n",
-                            secnum + fat_bpb.fatsize, rc);
+                            " sector 0x%x%x (error %d)\n", secnum.ata_sectors_s.high,
+                            secnum.ata_sectors_s.low, rc);
                     return rc * 10 - 2;
                 }
             }
@@ -725,93 +893,12 @@
     return 0;
 }
 
-static void fat_time(unsigned short* date,
-                     unsigned short* time,
-                     unsigned short* tenth )
-{
-#ifdef HAVE_RTC
-    struct tm* tm = get_time();
-
-    if (date)
-        *date = ((tm->tm_year - 80) << 9) |
-            ((tm->tm_mon + 1) << 5) |
-            tm->tm_mday;
-
-    if (time)
-        *time = (tm->tm_hour << 11) |
-            (tm->tm_min << 5) |
-            (tm->tm_sec >> 1);
-
-    if (tenth)
-        *tenth = (tm->tm_sec & 1) * 100;
-#else
-    /* non-RTC version returns an increment from the supplied time, or a
-     * fixed standard time/date if no time given as input */
-    bool next_day = false;
-    
-    if (time)
-    {
-        if (0 == *time)
-        {
-            /* set to 00:15:00 */
-            *time = (15 << 5);
-        }
-        else
-        {
-            unsigned short mins = (*time >> 5) & 0x003F;
-            unsigned short hours = (*time >> 11) & 0x001F;
-            if ((mins += 10) >= 60)
-            {
-                mins = 0;
-                hours++;
-            }
-            if ((++hours) >= 24)
-            {
-                hours = hours - 24;
-                next_day = true;
-            }
-            *time = (hours << 11) | (mins << 5);
-        }
-    }
-    
-    if (date)
-    {
-        if (0 == *date)
-        {
-            /* set to 1 August 2003 */
-            *date = ((2003 - 1980) << 9) | (8 << 5) | 1;
-        }
-        else
-        {
-            unsigned short day = *date & 0x001F;
-            unsigned short month = (*date >> 5) & 0x000F;
-            unsigned short year = (*date >> 9) & 0x007F;
-            if (next_day)
-            {
-                /* do a very simple day increment - never go above 28 days */
-                if (++day > 28)
-                {
-                    day = 1;
-                    if (++month > 12)
-                    {
-                        month = 1;
-                        year++;
-                    }
-                }
-                *date = (year << 9) | (month << 5) | day;
-            }
-        }
-    }
-    if (tenth)
-        *tenth = 0;
-#endif /* HAVE_RTC */
-}
-
 static int write_long_name(struct fat_file* file,
                            unsigned int firstentry,
                            unsigned int numentries,
                            unsigned char* name,
-                           unsigned char* shortname)
+                           unsigned char* shortname,
+                           bool bdir)
 {
     unsigned char buf[SECTOR_SIZE];
     unsigned char* entry;
@@ -822,8 +909,8 @@
     int nameidx=0, namelen = strlen(name);
     int rc;
 
-    LDEBUGF("write_long_name(file:%x, first:%d, num:%d, name:%s)\n",
-            file->firstcluster, firstentry, numentries, name);
+//    LDEBUGF("write_long_name(file:%x, first:%d, num:%d, name:%s)\n",
+//            file->firstcluster, firstentry, numentries, name);
 
     rc = fat_seek(file, sector);
     if (rc<0)
@@ -911,17 +998,19 @@
             entry[FATDIR_FSTCLUSLO] = 0;
             entry[FATLONG_TYPE] = 0;
             entry[FATLONG_CHKSUM] = chksum;
-            LDEBUGF("Longname entry %d: %.13s\n", idx, name+nameidx);
+//            LDEBUGF("Longname entry %d: %.13s\n", idx, name+nameidx);
         }
         else {
             /* shortname entry */
             unsigned short date=0, time=0, tenth=0;
-            LDEBUGF("Shortname entry: %.13s\n", shortname);
+//            LDEBUGF("Shortname entry: %.13s\n", shortname);
             strncpy(entry + FATDIR_NAME, shortname, 11);
+            if (bdir)
+                entry[FATDIR_ATTR] = FAT_ATTR_DIRECTORY;
+            else
             entry[FATDIR_ATTR] = 0;
             entry[FATDIR_NTRES] = 0;
 
-            fat_time(&date, &time, &tenth);
             entry[FATDIR_CRTTIMETENTH] = tenth;
             *(unsigned short*)(entry + FATDIR_CRTTIME) = SWAB16(time);
             *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time);
@@ -947,7 +1036,8 @@
 
 static int add_dir_entry(struct fat_dir* dir,
                          struct fat_file* file,
-                         char* name)
+                         char* name,
+                         bool bdir)
 {
     unsigned char buf[SECTOR_SIZE];
     unsigned char shortname[16];
@@ -960,8 +1050,8 @@
     int namelen = strlen(name);
     int firstentry;
 
-    LDEBUGF( "add_dir_entry(%s,%x)\n",
-             name, file->firstcluster);
+//    LDEBUGF( "add_dir_entry(%s,%x)\n",
+//             name, file->firstcluster);
 
     /* create dos name */
     rc = create_dos_name(name, shortname);
@@ -994,7 +1084,7 @@
             eof = true;
 
             memset(buf, 0, sizeof buf);
-            LDEBUGF("Adding new sector to dir\n");
+//            LDEBUGF("Adding new sector to dir\n");
             rc = fat_seek(&dir->file, sector);
             if (rc < 0)
                 return rc * 10 - 2;
@@ -1004,7 +1094,7 @@
                 rc = fat_readwrite(&dir->file, 1, buf, true);
                 if (rc < 1)
                     return rc * 10 - 3;
-            } while (dir->file.sectornum < (int)fat_bpb.bpb_secperclus);
+            } while (dir->file.sectornum < (unsigned int)fat_bpb.bpb_secperclus);
         }
         if (rc < 0) {
             DEBUGF( "add_dir_entry() - Couldn't read dir"
@@ -1019,16 +1109,16 @@
             switch (firstbyte) {
             case 0: /* end of dir */
                 entries_found = entries_needed;
-                LDEBUGF("Found last entry %d\n", 
-                        sector * DIR_ENTRIES_PER_SECTOR + i);
+//                LDEBUGF("Found last entry %d\n", 
+//                        sector * DIR_ENTRIES_PER_SECTOR + i);
                 done = true;
                 break;
 
             case 0xe5: /* free entry */
                 entries_found++;
-                LDEBUGF("Found free entry %d (%d/%d)\n",
-                        sector * DIR_ENTRIES_PER_SECTOR + i,
-                        entries_found, entries_needed);
+//                LDEBUGF("Found free entry %d (%d/%d)\n",
+//                        sector * DIR_ENTRIES_PER_SECTOR + i,
+//                        entries_found, entries_needed);
                 break;
 
             default:
@@ -1038,8 +1128,8 @@
                 if (!strncmp(shortname, buf + i * DIR_ENTRY_SIZE, 12)) {
                     /* filename exists already. make a new one */
                     snprintf(shortname+8, 4, "%03X", (unsigned)rand() & 0xfff);
-                    LDEBUGF("Duplicate shortname, changing to %s\n",
-                            shortname);
+//                    LDEBUGF("Duplicate shortname, changing to %s\n",
+//                            shortname);
 
                     /* name has changed, we need to restart search */
                     goto restart;
@@ -1061,11 +1151,11 @@
     }
 
     sector = firstentry / DIR_ENTRIES_PER_SECTOR;
-    LDEBUGF("Adding longname to entry %d in sector %d\n",
-            firstentry, sector);
+//    LDEBUGF("Adding longname to entry %d in sector %d\n",
+//            firstentry, sector);
 
     rc = write_long_name(&dir->file, firstentry, 
-                         entries_needed, name, shortname);
+                         entries_needed, name, shortname,bdir);
     if (rc < 0)
         return rc * 10 - 5;
 
@@ -1073,15 +1163,15 @@
     file->direntry = firstentry + entries_needed - 1;
     file->direntries = entries_needed;
     file->dircluster = dir->file.firstcluster;
-    LDEBUGF("Added new dir entry %d, using %d slots.\n",
-            file->direntry, file->direntries);
+//    LDEBUGF("Added new dir entry %d, using %d slots.\n",
+//            file->direntry, file->direntries);
 
     /* advance the end-of-dir marker? */
     if (last)
     {
         unsigned int lastentry = firstentry + entries_needed;
 
-        LDEBUGF("Updating end-of-dir entry %d\n",lastentry);
+//        LDEBUGF("Updating end-of-dir entry %d\n",lastentry);
 
         if (lastentry % DIR_ENTRIES_PER_SECTOR)
         {
@@ -1108,7 +1198,7 @@
                 if (rc < 1)
                     return rc * 10 - 9;
                 memset(buf, 0, sizeof buf);
-            } while (dir->file.sectornum < (int)fat_bpb.bpb_secperclus);
+            } while (dir->file.sectornum < (unsigned int)fat_bpb.bpb_secperclus);
         }
         else
         {
@@ -1119,7 +1209,7 @@
                 if (rc < 1)
                     return rc * 10 - 9; /* Same error code as above, can't be
                                            more than -9 */
-            } while (dir->file.sectornum < (int)fat_bpb.bpb_secperclus);
+            } while (dir->file.sectornum < (unsigned int)fat_bpb.bpb_secperclus);
         }
     }
 
@@ -1195,8 +1285,8 @@
     struct fat_file dir;
     int rc;
 
-    LDEBUGF("update_file_size(cluster:%x entry:%d size:%d)\n",
-            file->firstcluster, file->direntry, size);
+//    LDEBUGF("update_file_size(cluster:%x entry:%d size:%d)\n",
+//            file->firstcluster, file->direntry, size);
 
     /* create a temporary file handle for the dir holding this file */
     rc = fat_open(file->dircluster, &dir, NULL);
@@ -1225,21 +1315,6 @@
     sizeptr = (int*)(entry + FATDIR_FILESIZE);
     *sizeptr = SWAB32(size);
 
-    {
-#ifdef HAVE_RTC
-        unsigned short time = 0;
-        unsigned short date = 0;
-#else
-        /* get old time to increment from */
-        unsigned short time = SWAB16(*(unsigned short*)(entry + FATDIR_WRTTIME));
-        unsigned short date = SWAB16(*(unsigned short*)(entry + FATDIR_WRTDATE));
-#endif
-        fat_time(&date, &time, NULL);
-        *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time);
-        *(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date);
-        *(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date);
-    }
-
     rc = fat_seek( &dir, sector );
     if (rc < 0)
         return rc * 10 - 4;
@@ -1293,18 +1368,81 @@
         file->direntries = dir->entrycount;
         file->dircluster = dir->file.firstcluster;
     }
-    LDEBUGF("fat_open(%x), entry %d\n",startcluster,file->direntry);
+//    LDEBUGF("fat_open(%x), entry %d\n",startcluster,file->direntry);
     return 0;
 }
 
+
+//Currently broken, do not use! :)
+int fat_create_dir(char* name,
+                    struct fat_file* file,
+                    struct fat_dir* dir)
+{
+    int rc;
+//    unsigned char buf[SECTOR_SIZE];
+    
+    rc = add_dir_entry(dir, file, name,true);
+    if (rc<0) {
+        return rc;
+    }
+    file->firstcluster = 0;
+    file->lastcluster = 0;
+    file->lastsector = 0;
+    file->clusternum = 0;
+    file->sectornum = 0;
+    file->eof = false;
+
+    struct fat_dir newdir;
+
+    memset(&newdir,0,sizeof(newdir));
+    memcpy(&(newdir.file),file,sizeof(struct fat_file));
+
+    struct fat_file dotdir,dotdotdir;
+    memset(&dotdir,0,sizeof(dotdir));
+    memset(&dotdotdir,0,sizeof(dotdotdir));
+    
+    rc = add_dir_entry(&newdir,&dotdir,".",true);
+    if (rc<0) {
+        DEBUGF("unable to create dot dir\n");
+        return rc;
+    }
+
+    rc = add_dir_entry(&newdir,&dotdotdir,"..",true);
+    if (rc<0) {
+        DEBUGF("unable to create dot dot dir\n");
+        return rc;
+    }
+
+    struct fat_direntry de[2];
+    memset(de,0,sizeof(struct fat_direntry)*2);
+    strcpy(de[0].name,".");
+    de[0].firstcluster=sec2cluster(newdir.sector);
+    strcpy(de[1].name,"..");
+    de[1].firstcluster=sec2cluster(dir->sector);
+    
+    rc = fat_open(file->dircluster, &(newdir.file), NULL);
+    if (rc < 0)
+        return rc * 10 - 1;
+
+    int sector = file->direntry / DIR_ENTRIES_PER_SECTOR;
+    rc = fat_seek( &(newdir.file), sector );
+    if (rc<0)
+        return rc * 10 - 2;
+
+    rc = fat_readwrite(&(newdir.file), 1, de, true);
+    if (rc < 1)
+        return rc * 10 - 3;
+    return rc;
+}
+
 int fat_create_file(char* name,
                     struct fat_file* file,
                     struct fat_dir* dir)
 {
     int rc;
 
-    LDEBUGF("fat_create_file(\"%s\",%x,%x)\n",name,file,dir);
-    rc = add_dir_entry(dir, file, name);
+//    LDEBUGF("fat_create_file(\"%s\",%x,%x)\n",name,file,dir);
+    rc = add_dir_entry(dir, file, name,false);
     if (!rc) {
         file->firstcluster = 0;
         file->lastcluster = 0;
@@ -1323,7 +1461,7 @@
     int next;
     int last = file->lastcluster;
 
-    LDEBUGF("fat_truncate(%x, %x)\n", file->firstcluster, last);
+//    LDEBUGF("fat_truncate(%x, %x)\n", file->firstcluster, last);
 
     for ( last = get_next_cluster(last); last; last = next ) {
         next = get_next_cluster(last);
@@ -1335,10 +1473,9 @@
     return 0;
 }
 
-int fat_closewrite(struct fat_file *file, int size, int attr)
+int fat_closewrite(struct fat_file *file, int size, int attr,bool bdir)
 {
-    int rc;
-    LDEBUGF("fat_closewrite(size=%d)\n",size);
+//    LDEBUGF("fat_closewrite(size=%d)\n",size);
 
     if (!size) {
         /* empty file */
@@ -1348,11 +1485,9 @@
         }
     }
 
-    if (file->dircluster) {
-        rc = update_short_entry(file, size, attr);
-        if (rc < 0)
-            return rc * 10 - 1;
-    }
+    if (file->dircluster && !bdir)
+        if (update_short_entry(file, size, attr) < 0)
+            return -1;
 
     flush_fat();
 
@@ -1364,9 +1499,9 @@
         int next;
         for ( next = file->firstcluster; next;
               next = get_next_cluster(next) )
-            LDEBUGF("cluster %d: %x\n", count++, next);
+//            LDEBUGF("cluster %d: %x\n", count++, next);
         len = count * fat_bpb.bpb_secperclus * SECTOR_SIZE;
-        LDEBUGF("File is %d clusters (chainlen=%d, size=%d)\n",
+//        LDEBUGF("File is %d clusters (chainlen=%d, size=%d)\n",
                 count, len, size );
         if ( len > size + fat_bpb.bpb_secperclus * SECTOR_SIZE)
             panicf("Cluster chain is too long\n");
@@ -1401,8 +1536,8 @@
         return rc * 10 - 3;
 
     for (i=0; i < numentries; i++) {
-        LDEBUGF("Clearing dir entry %d (%d/%d)\n",
-                entry, i+1, numentries);
+//        LDEBUGF("Clearing dir entry %d (%d/%d)\n",
+//                entry, i+1, numentries);
         buf[(entry % DIR_ENTRIES_PER_SECTOR) * DIR_ENTRY_SIZE] = 0xe5;
         entry++;
 
@@ -1445,7 +1580,7 @@
     int next, last = file->firstcluster;
     int rc;
 
-    LDEBUGF("fat_remove(%x)\n",last);
+//    LDEBUGF("fat_remove(%x)\n",last);
 
     while ( last ) {
         next = get_next_cluster(last);
@@ -1487,7 +1622,7 @@
         return rc * 10 - 2;
 
     /* create new name */
-    rc = add_dir_entry(&dir, &newfile, newname);
+    rc = add_dir_entry(&dir, &newfile, newname,false);
     if (rc < 0)
         return rc * 10 - 3;
 
@@ -1510,12 +1645,12 @@
 
 static int next_write_cluster(struct fat_file* file,
                               int oldcluster,
-                              int* newsector)
+                              int *newsector)
 {
     int cluster = 0;
     int sector;
 
-    LDEBUGF("next_write_cluster(%x,%x)\n",file->firstcluster, oldcluster);
+//    LDEBUGF("next_write_cluster(%x,%x)\n",file->firstcluster, oldcluster);
 
     if (oldcluster)
         cluster = get_next_cluster(oldcluster);
@@ -1543,28 +1678,33 @@
             return 0;
         }
     }
-    sector = cluster2sec(cluster);
+
+    sector=cluster2sec(cluster);
     if (sector<0)
         return 0;
 
-    *newsector = sector;
+    *newsector=sector;
     return cluster;
 }
 
 static int transfer( unsigned int start, int count, char* buf, bool write )
 {
     int rc;
+    ata_sectors_t sector;
 
-    LDEBUGF("transfer(s=%x, c=%x, %s)\n",start, count, write?"write":"read");
+    memset(&sector,0,sizeof(ata_sectors_t));
+    sector.ata_sectors_s.low=start&0xFFFFFF;
+    sector.ata_sectors_s.high=(start&0xFF000000)>>24;
+//    LDEBUGF("transfer(s=%x, c=%x, %s)\n",start, count, write?"write":"read");
     if (write) {
         if (start < fat_bpb.firstdatasector)
             panicf("Writing before data\n");
-        rc = ata_write_sectors(start, count, buf);
+        rc = ata_write_sectors(&sector, count, buf);
     }
     else
-        rc = ata_read_sectors(start, count, buf);
+        rc = ata_read_sectors(&sector, count, buf);
     if (rc < 0) {
-        DEBUGF( "transfer() - Couldn't %s sector %x"
+        DEBUGF( "transfer() - Couldn't %s sector 0x%x%x"
                 " (error code %d)\n", 
                 write ? "write":"read", start, rc);
         return rc;
@@ -1585,10 +1725,10 @@
     int i;
     int rc;
 
-    LDEBUGF( "fat_readwrite(file:%x,count:0x%x,buf:%x,%s)\n",
-             file->firstcluster,sectorcount,buf,write?"write":"read");
-    LDEBUGF( "fat_readwrite: sec=%x numsec=%d eof=%d\n",
-             sector,numsec, eof?1:0);
+//    LDEBUGF( "fat_readwrite(file:%x,count:0x%x,buf:%x,%s)\n",
+//             file->firstcluster,sectorcount,buf,write?"write":"read");
+//    LDEBUGF( "fat_readwrite: sec=%x numsec=%d eof=%d\n",
+//             sector,numsec, eof?1:0);
 
     if ( eof && !write)
         return 0;
@@ -1638,7 +1778,7 @@
         if ( ((sector != first) && (sector != last+1)) || /* not sequential */
              (last-first+1 == 256) ) { /* max 256 sectors per ata request */
             int count = last - first + 1;
-            rc = transfer( first + fat_bpb.startsector, count, buf, write );
+            rc = transfer( first+fat_bpb.startsector, count, buf, write );
             if (rc < 0)
                 return rc * 10 - 1;
 
@@ -1668,7 +1808,7 @@
     if (eof)
         i--;
 
-    DEBUGF("Sectors written: %d\n", i);
+//    DEBUGF("Sectors written: %d\n", i);
     return i;
 }
 
@@ -1707,8 +1847,8 @@
         sectornum = -1;
     }
 
-    LDEBUGF("fat_seek(%x, %x) == %x, %x, %x\n",
-            file->firstcluster, seeksector, cluster, sector, sectornum);
+//    LDEBUGF("fat_seek(%x, %x) == %x, %x, %x\n",
+//            file->firstcluster, seeksector, cluster, sector, sectornum);
 
     file->lastcluster = cluster;
     file->lastsector = sector;
Only in /home/dast/src/rockbox/firmware/drivers: fmradio.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/i2c.c ./firmware/drivers/i2c.c
--- /home/dast/src/rockbox/firmware/drivers/i2c.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/drivers/i2c.c	Tue Dec  2 22:00:24 2003
@@ -1,50 +1,63 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: i2c.c,v 1.9 2003/11/07 12:15:23 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "lcd.h"
 #include "sh7034.h"
 #include "kernel.h"
 #include "thread.h"
 #include "debug.h"
-#include "system.h"
 
-/*
-**  SDA is PB7
-**  SCL is PB13
-*/
-   
-/* cute little functions, atomic read-modify-write */
-#define SDA_LO     and_b(~0x80, &PBDRL)
-#define SDA_HI     or_b(0x80, &PBDRL)
-#define SDA_INPUT  and_b(~0x80, &PBIORL)
-#define SDA_OUTPUT or_b(0x80, &PBIORL)
-#define SDA     (PBDR & 0x80)
-
-#define SCL_INPUT  and_b(~0x20, &PBIORH)
-#define SCL_OUTPUT or_b(0x20, &PBIORH)
-#define SCL_LO     and_b(~0x20, &PBDRH)
-#define SCL_HI     or_b(0x20, &PBDRH)
-#define SCL     (PBDR & 0x2000)
+#define PB7  0x0080   //I2C Data Write bus (must be 0 to read bus)
+#define PB8  0x0100   //I2C Data Read bus
+#define PB13 0x2000   //I2C Clock
+
+/* cute little functions */
+#define SDA_LO  (PBDR |= PB7)
+#define SDA_HI  (PBDR &= ~PB7)
+//#define SDA_INPUT (PBIOR &= ~PB8)
+//#define SDA_OUTPUT (PBIOR |= PB8)
+#define SDA     (PBDR & PB8)
+
+#define SCL_INPUT (PBIOR &= ~PB13)
+#define SCL_OUTPUT (PBIOR |= PB13)
+#define SCL_LO  (PBDR &= ~PB13)
+#define SCL_HI  (PBDR |= PB13)
+#define SCL     (PBDR & PB13)
 
 /* arbitrary delay loop */
 #define DELAY   do { int _x; for(_x=0;_x<20;_x++);} while (0)
 
 static struct mutex i2c_mtx;
+static void i2c_ack(int bit);
+static int i2c_getack();
+static void i2c_wait(void);
+
+/*
+  i2c Motes:
+
+  -When the bus is free, both line are high.
+  -The Mas supports Fast-mode (400 kbits/s)
+  -The data line must be stable during the HIGH period of the clock
+   The data line can only change when the clock is LOW
+  -Each byte sent has to be followed by a ack bit.
+
+
+Every byte put on the SDA line must be 8-bits long. The
+number of bytes that can be transmitted per transfer is
+unrestricted. Each byte has to be followed by an
+acknowledge bit. Data is transferred with the most
+significant bit (MSB) first. If a slave can't
+receive or transmit another complete byte of data until it
+has performed some other function, for example servicing
+an internal interrupt, it can hold the clock line SCL LOW to
+force the master into a wait state. Data transfer then
+continues when the slave is ready for another byte of data
+and releases clock line SCL.
+
+Usually, a receiver which has been addressed is obliged to
+generate an acknowledge after each byte has been
+received, except when the message starts with a CBUS
+address.
+
+
+*/
 
 void i2c_begin(void)
 {
@@ -56,11 +69,49 @@
     mutex_unlock(&i2c_mtx);
 }
 
-void i2c_start(void)
+static void i2c_wait(void)
+{  
+  SCL_INPUT;
+  while(!SCL)  //Wait for device to release SCL
+    sleep_thread();
+  wake_up_thread();
+  SCL_OUTPUT;
+}
+
+void i2c_init(void)
 {
-    SDA_OUTPUT;
+   int i=0;
+
+   //Init Mutex
+   mutex_init(&i2c_mtx);
+
+   i2c_begin();
+
+   /* make PB13, PB8 & PB7 general I/O */
+   PBCR1 &= ~0x0c03; /* PB13 and PB8 */
+   PBCR2 &= ~0xc000; /* PB7 */
+
+   /* Set the clock line to an output */
+   PBIOR |= PB13;
+
+   PBIOR |= PB7;  //set i2c Write to write
+   PBIOR &= ~PB8; //set i2c Read to read
+
     SDA_HI;
+   SCL_LO;
+
+   for(;i<3;i++)
+     i2c_stop();
+
+   i2c_end();
+}
+
+void i2c_start(void)
+{
+  //In case of a re-start
     SCL_HI;
+  SDA_HI;
+
     SDA_LO;
     DELAY;
     SCL_LO;
@@ -74,170 +125,151 @@
    SDA_HI;
 }
 
-void i2c_init(void)
+static void i2c_ack(int bit)
 {
-   int i;
-
-   /* make PB5, PB7 & PB13 general I/O */
-   PBCR1 &= ~0x0c00; /* PB13 */
-   PBCR2 &= ~0xcc00; /* PB5 abd PB7 */
-
-   /* PB5 is "MAS enable". make it output and high */
-   or_b(0x20, &PBIORL);
-   or_b(0x20, &PBDRL);
+  SCL_LO;
+  //Slave should have released SDA a.k.a. set it HIGH
 
-   /* Set the clock line PB13 to an output */
-    or_b(0x20, &PBIORH);
+  bit?SDA_HI:SDA_LO;
    
-   SDA_OUTPUT;
-   SDA_HI;
+  //Pulse SCL
+  SCL_HI;
    SCL_LO;
-   for (i=0;i<3;i++)
-      i2c_stop();
-}
 
-void i2c_ack(int bit)
-{
-    /* Here's the deal. The MAS is slow, and sometimes needs to wait
-       before it can receive the acknowledge. Therefore it forces the clock
-       low until it is ready. We need to poll the clock line until it goes
-       high before we release the ack. */
-    
-    SCL_LO;      /* Set the clock low */
-    if ( bit )
-    {
+  //Release SDA
         SDA_HI;
-    }
-    else
-    {
-        SDA_LO;
-    }
-    
-    SCL_INPUT;   /* Set the clock to input */
-    while(!SCL)  /* and wait for the MAS to release it */
-        sleep_thread();
-    wake_up_thread();
-
-    DELAY;
-    SCL_OUTPUT;
-    SCL_LO;
 }
 
-int i2c_getack(void)
+static int i2c_getack()
 {
     int ret = 1;
 
-    /* Here's the deal. The MAS is slow, and sometimes needs to wait
-       before it can send the acknowledge. Therefore it forces the clock
-       low until it is ready. We need to poll the clock line until it goes
-       high before we read the ack. */
-
-#ifdef HAVE_I2C_LOW_FIRST
-    SDA_LO;      /* First, discharge the data line */
-#endif
-    SDA_INPUT;   /* And set to input */
-    SCL_INPUT;   /* Set the clock to input */
-    while(!SCL)  /* and wait for the MAS to release it */
+  SDA_HI;
+
+  //SCL_HI;
+  SCL_INPUT;
+
+  while(!SCL)  //Wait for device to release SCL
         sleep_thread();
     wake_up_thread();
     
-    if (SDA)
-        /* ack failed */
+  //Receiver should lower data
+  if(SDA)
         ret = 0;
     
     SCL_OUTPUT;
     SCL_LO;
-    SDA_HI;
-    SDA_OUTPUT;
     return ret;
 }
 
-void i2c_outb(unsigned char byte)
+//OK
+int i2c_outb(unsigned char byte)
 {
    int i;
 
+   SCL_LO;
+
    /* clock out each bit, MSB first */
+
    for ( i=0x80; i; i>>=1 ) {
       if ( i & byte )
-      {
          SDA_HI;
-      }
       else
-      {
          SDA_LO;
-      }
+
       SCL_HI;
+
+     //If this is the first bit, make sure the slave is ready for it
+     if(i==0x80)
+       i2c_wait();
+
       SCL_LO;
    }
 
    SDA_HI;
+   return i2c_getack();
 }
 
-unsigned char i2c_inb(int ack)
+//OK
+unsigned char i2c_inb(bool ack)
 {
    int i;
    unsigned char byte = 0;
 
+  SCL_LO;
    /* clock in each bit, MSB first */
    for ( i=0x80; i; i>>=1 ) {
-#ifdef HAVE_I2C_LOW_FIRST
-       /* Tricky business. Here we discharge the data line by driving it low
-          and then set it to input to see if it stays low or goes high */
-       SDA_LO;      /* First, discharge the data line */
-#endif
-       SDA_INPUT;   /* And set to input */
+    
+    SDA_HI;  //high output from uC enables SDA reading
        SCL_HI;
-       if ( SDA )
+    
+    //If this is the first bit, make sure the slave is ready to send it
+    if(i==0x80)
+      i2c_wait();
+
+    if( SDA )
            byte |= i;
+    
        SCL_LO;
-       SDA_OUTPUT;
    }
    
-   i2c_ack(ack);
-   
+  i2c_ack(ack?0:1);
    return byte;
 }
 
+//Generic i2c write function
+//Will try a second time if first fails
 int i2c_write(int address, unsigned char* buf, int count )
 {
-    int i,x=0;
+  int try = 1;
+  int i, ret;
 
+  do{
+    ret = 0;
     i2c_start();
-    i2c_outb(address & 0xfe);
-    if (i2c_getack())
-    {
-        for (i=0; i<count; i++)
-        {
-            i2c_outb(buf[i]);
-            if (!i2c_getack())
-            {
-                x=-2;
+    if( i2c_outb(address & 0xfe) ){
+      for( i=0; i<count; i++ ){
+	if( !i2c_outb(buf[i]) ){
+	  ret = -2;
                 break;
             }
         }
     }
     else
-    {
-        debugf("i2c_write() - no ack\n");
-        x=-1;
-    }
+      ret = -1;
+  
     i2c_stop();
-    return x;
+  }
+  while( ret && try-- );
+
+  switch(ret){
+  case -1:
+    panicf("i2c_w NoACK 1");
+    break;
+  case -2:
+    panicf("i2c_w NoACK 2");
+  }
+  return ret;
 }
 
+//Generic i2c read function
 int i2c_read(int address, unsigned char* buf, int count )
 {
-    int i,x=0;
+  int i, ret = 0;
     
     i2c_start();
-    i2c_outb(address | 1);
-    if (i2c_getack()) {
-        for (i=0; i<count; i++) {
-            buf[i] = i2c_inb(0);
+  if( i2c_outb(address | 1) ){
+    for( i=0; i<count; i++ )
+      buf[i] = i2c_inb(true);
+  }
+  else{
+    panicf("i2c_r NoACK 1");
+    ret = -1;
         }
-    }
-    else
-        x=-1;
+  
     i2c_stop();
-    return x;
+  return ret;
 }
+
+
+
diff -rubBP /home/dast/src/rockbox/firmware/drivers/lcd-charset.c ./firmware/drivers/lcd-charset.c
--- /home/dast/src/rockbox/firmware/drivers/lcd-charset.c	Thu Jan  1 01:00:00 1970
+++ ./firmware/drivers/lcd-charset.c	Sun Nov 30 18:48:38 2003
@@ -0,0 +1,287 @@
+#include "lcd-charset.h"
+
+/* SPECIAL CHARACTERS HAVE BEEN POSITIONNED AT UNUSED POSITIONS
+
+FULL GRID = 0x7f
+LEFT ARROW = 0x1e
+RIGHT ARROW = 0x1f
+
+*/
+
+unsigned char latin1_to_lcd[256] =
+{
+   UNKNOWN_CHAR,	    /* 0x00 reserved never to be used */
+   UNKNOWN_CHAR,	    /* 0x01 */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+
+   CGRAM0,	    /* 0x01-0x0F reserved */
+   CGRAM1,	    /* 0x01-0x0F reserved */
+   CGRAM2,	    /* 0x01-0x0F reserved */
+   CGRAM3,	    /* 0x01-0x0F reserved */
+   CGRAM4,	    /* 0x01-0x0F reserved */
+   CGRAM5,	    /* 0x01-0x0F reserved */
+   CGRAM6,	    /* 0x01-0x0F reserved */
+   CGRAM7,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   UNKNOWN_CHAR,	    /* 0x01-0x0F reserved */
+   LARROW_LCD, /* 0x1e -> LARROW */
+   RARROW_LCD, /* 0x1f -> RARROW */
+
+   0x20,		    /* 0x20 ..   */
+   0x21,		    /* 0x21 .. ! */
+   0x22,		    /* 0x22 .. " */
+   0x23,		    /* 0x23 .. # */
+   0x24,		    /* 0x24 .. $ */
+   0x25,		    /* 0x25 .. % */
+   0x26,		    /* 0x26 .. & */
+   0x27,		    /* 0x27 .. ' */
+   0x28,		    /* 0x28 .. ( */
+   0x29,		    /* 0x29 .. ) */
+   0x2a,		    /* 0x2a .. * */
+   0x2b,		    /* 0x2b .. + */
+   0x2c,		    /* 0x2c .. , */
+   0x2d,		    /* 0x2d .. - */
+   0x2e,		    /* 0x2e .. . */
+   0x2f,		    /* 0x2f .. / */
+
+   0x30,		    /* 0x30 .. 0 */
+   0x31,		    /* 0x31 .. 1 */
+   0x32,		    /* 0x32 .. 2 */
+   0x33,		    /* 0x33 .. 3 */
+   0x34,		    /* 0x34 .. 4 */
+   0x35,		    /* 0x35 .. 5 */
+   0x36,		    /* 0x36 .. 6 */
+   0x37,		    /* 0x37 .. 7 */
+   0x38,		    /* 0x38 .. 8 */
+   0x39,		    /* 0x39 .. 9 */
+   0x3a,  /* 0x3a .. : */
+   0x3b,  /* 0x3b .. ; */
+   0x3c,  /* 0x3c .. < */
+   0x3d,  /* 0x3d .. = */
+   0x3e,  /* 0x3e .. > */
+   0x3f,  /* 0x3f .. ? */
+
+   0x40,  /* 0x40 .. @ */
+   0x41,  /* 0x41 .. A */
+   0x42,  /* 0x42 .. B */
+   0x43,  /* 0x43 .. C */
+   0x44,  /* 0x44 .. D */
+   0x45,  /* 0x45 .. E */
+   0x46,  /* 0x46 .. F */
+   0x47,  /* 0x47 .. G */
+   0x48,  /* 0x48 .. H */
+   0x49,  /* 0x49 .. I */
+   0x4a,  /* 0x4a .. J */
+   0x4b,  /* 0x4b .. K */
+   0x4c,  /* 0x4c .. L */
+   0x4d,  /* 0x4d .. M */
+   0x4e,  /* 0x4e .. N */
+   0x4f,  /* 0x4f .. O */
+
+   0x50,  /* 0x50 .. P */
+   0x51,  /* 0x51 .. Q */
+   0x52,  /* 0x52 .. R */
+   0x53,  /* 0x53 .. S */
+   0x54,  /* 0x54 .. T */
+   0x55,  /* 0x55 .. U */
+   0x56,  /* 0x56 .. V */
+   0x57,  /* 0x57 .. W */
+   0x58,  /* 0x58 .. X */
+   0x59,  /* 0x59 .. Y */
+   0x5a,  /* 0x5a .. Z */
+   0x5b,  /* 0x5b .. [ */
+   BACKSLASH_LCD,  /* 0x5c .. \ */
+   0x5d,  /* 0x5d .. ] */
+   0x5e,  /* 0x5e .. ^ */
+   0x5f,  /* 0x5f .. _ */
+
+   0x60,  /* 0x60 .. ` */
+   0x61,  /* 0x61 .. a */
+   0x62,  /* 0x62 .. b */
+   0x63,  /* 0x63 .. c */
+   0x64,  /* 0x64 .. d */
+   0x65,  /* 0x65 .. e */
+   0x66,  /* 0x66 .. f */
+   0x67,  /* 0x67 .. g */
+   0x68,  /* 0x68 .. h */
+   0x69,  /* 0x69 .. i */
+   0x6a,  /* 0x6a .. j */
+   0x6b,  /* 0x6b .. k */
+   0x6c,  /* 0x6c .. l */
+   0x6d,  /* 0x6d .. m */
+   0x6e,  /* 0x6e .. n */
+   0x6f,  /* 0x6f .. o */
+
+   0x70,  /* 0x70 .. p */
+   0x71,  /* 0x71 .. q */
+   0x72,  /* 0x72 .. r */
+   0x73,  /* 0x73 .. s */
+   0x74,  /* 0x74 .. t */
+   0x75,  /* 0x75 .. u */
+   0x76,  /* 0x76 .. v */
+   0x77,		    /* 0x77 .. w */
+   0x78,		    /* 0x78 .. x */
+   0x79,		    /* 0x79 .. y */
+   0x7a,		    /* 0x7a .. z */
+   0x7b,		    /* 0x7b .. { */
+   0x7c,		    /* 0x7c .. | */
+   0x7d,		    /* 0x7d .. } */
+   0xed,		    /* 0x7e = TILDE -> 0xed */
+   FULLGRID_LCD,  /* 0x7f -> FULLGRID */
+
+  /* Extented ascii begins here */
+  /* From here on these characters can be replace */ 
+
+   UNKNOWN_CHAR,	    /* 0x80 ..   */
+   UNKNOWN_CHAR,	    /* 0x81 ..   */
+   UNKNOWN_CHAR,	    /* 0x82 ..   */
+   UNKNOWN_CHAR,	    /* 0x83 ..   */
+   UNKNOWN_CHAR,	    /* 0x84 ..   */
+   UNKNOWN_CHAR,	    /* 0x85 ..   */
+   UNKNOWN_CHAR,	    /* 0x86 ..   */
+   UNKNOWN_CHAR,	    /* 0x87 ..   */
+   UNKNOWN_CHAR,	    /* 0x88 ..   */
+   UNKNOWN_CHAR,	    /* 0x89 ..   */
+   UNKNOWN_CHAR,	    /* 0x8a ..   */
+   UNKNOWN_CHAR,	    /* 0x8b ..   */
+   UNKNOWN_CHAR,	    /* 0x8c ..   */
+   UNKNOWN_CHAR,	    /* 0x8d ..   */
+   UNKNOWN_CHAR,	    /* 0x8e ..   */
+   UNKNOWN_CHAR,	    /* 0x8f ..   */
+
+   UNKNOWN_CHAR,	    /* 0x90 ..   */
+   UNKNOWN_CHAR,	    /* 0x91 ..   */
+   UNKNOWN_CHAR,	    /* 0x92 ..   */
+   UNKNOWN_CHAR,	    /* 0x93 ..   */
+   UNKNOWN_CHAR,	    /* 0x94 ..   */
+   UNKNOWN_CHAR,	    /* 0x95 ..   */
+   UNKNOWN_CHAR,	    /* 0x96 ..   */
+   UNKNOWN_CHAR,	    /* 0x97 ..   */
+   UNKNOWN_CHAR,	    /* 0x98 ..   */
+   UNKNOWN_CHAR,	    /* 0x99 ..   */
+   UNKNOWN_CHAR,	    /* 0x9a ..   */
+   UNKNOWN_CHAR,	    /* 0x9b ..   */
+   UNKNOWN_CHAR,	    /* 0x9c ..   */
+   UNKNOWN_CHAR,	    /* 0x9d ..   */
+   UNKNOWN_CHAR,	    /* 0x9e ..   */
+   UNKNOWN_CHAR,	    /* 0x9f ..   */
+
+   UNKNOWN_CHAR,	    /* 0xa0 ..   */
+   0x75,		    /* 0xa1 = INVERTED EXCLAMATION MARK -> 0x75 */
+   0xe5,		    /* 0xa2 = CENT SIGN -> 0xe5 */
+   UNKNOWN_CHAR,	    /* 0xa3 = POUND SIGN -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xa4 = CURRENCY SIGN -> UNKNOWN_CHAR */
+   0x5c,	      	    /* 0xa5 = YEN SIGN -> 0x5c */		
+   0x7c,		    /* 0xa6 = BROKEN BAR -> 0x7c */
+   UNKNOWN_CHAR,	    /* 0xa7 = SECTION SIGN -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xa8 = DIAERESIS -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xa9 = COPYRIGHT SIGN -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xaa = FEMININE ORDINAL -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xab = COPYRIGHT SIGN -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xac = NOT SIGN -> UNKNOWN_CHAR */
+   0x2d,		    /* 0xad = SOFT HYPHEN -> 0x2d */
+   UNKNOWN_CHAR,	    /* 0xae = REGISTERED SIGN -> UNKNOWN_CHAR */
+   UNKNOWN_CHAR,	    /* 0xaf = MACRON -> UNKNOWN_CHAR */
+
+   UNKNOWN_CHAR,	    /* 0xb0 */
+   UNKNOWN_CHAR,	    /* 0xb1 */
+   UNKNOWN_CHAR,	    /* 0xb2 */
+   UNKNOWN_CHAR,	    /* 0xb3 */
+   0x27,		    /* 0xb4 ->0x27 */
+   0xe4,		    /* 0xb5 = MICRO SIGN -> 0xe4 */
+   UNKNOWN_CHAR,	    /* 0xb6 */
+   0xa9,		    /* 0xb7 = MIDDLE DOT -> 0xa9 */
+   UNKNOWN_CHAR,	    /* 0xb8 */
+   UNKNOWN_CHAR,	    /* 0xb9 */
+   UNKNOWN_CHAR,	    /* 0xba */
+   UNKNOWN_CHAR,	    /* 0xbb */
+   UNKNOWN_CHAR,	    /* 0xbc */
+   UNKNOWN_CHAR,	    /* 0xbd */
+   UNKNOWN_CHAR,	    /* 0xbe */
+   UNKNOWN_CHAR,	    /* 0xbf */
+   
+   0x41,		    /* 0xc0 -> 0x41 */
+   0x41,		    /* 0xc1 -> 0x41 */
+   0x41,		    /* 0xc2 -> 0x41 */
+   0x41,		    /* 0xc3 -> 0x41 */
+   0x41,		    /* 0xc4 -> 0x41 */
+   0x41,		    /* 0xc5 -> 0x41 */
+   UNKNOWN_CHAR,	    /* 0xc6 */
+   0x43,		    /* 0xc7 -> 0x43 */
+   0x45,		    /* 0xc8 -> 0x45 */
+   0x45,		    /* 0xc9 -> 0x45 */
+   0x45,		    /* 0xca -> 0x45 */
+   0x45,		    /* 0xcb -> 0x45 */
+   0x49,		    /* 0xcc -> 0x49 */
+   0x49,		    /* 0xcd -> 0x49 */
+   0x49,		    /* 0xce -> 0x49 */
+   0x49,		    /* 0xcf -> 0x49 */
+
+   0x44,		    /* 0xd0 -> 0x44 */
+   0x4e,		    /* 0xd1 -> 0x4e */   
+   0x4f,		    /* 0xd2 -> 0x4f */
+   0x4f,		    /* 0xd3 -> 0x4f */
+   0x4f,		    /* 0xd4 -> 0x4f */
+   0x4f,		    /* 0xd5 -> 0x4f */
+   0x4f,		    /* 0xd6 -> 0x4f */ 
+   0x78,		    /* 0xd7 -> 0x78 */
+   0x30,		    /* 0xd8 -> 0x30 */
+   0x55,		    /* 0xd9 -> 0x55 */
+   0x55,		    /* 0xda -> 0x55 */ 
+   0x55,		    /* 0xdb -> 0x55 */
+   0x55,		    /* 0xdc -> 0x55 */
+   0x59,		    /* 0xdd -> 0x59 */ 
+   UNKNOWN_CHAR,	    /* 0xde */
+   0xe2,		    /* 0xdf -> 0xe2 */
+
+   0x61,		    /* 0xe0 -> 0x61 */
+   0x61,		    /* 0xe1 -> 0x61 */   
+   0x61,		    /* 0xe2 -> 0x61 */
+   0x61,		    /* 0xe3 -> 0x61 */
+   0xe1,		    /* 0xe4 -> 0xe1 */
+   0x61,		    /* 0xe5 -> 0x61 */
+   UNKNOWN_CHAR,	    /* 0xe6 */ 
+   0x63,		    /* 0xe7 -> 0x63 */
+   0x65,		    /* 0xe8 -> 0x65 */
+   0x65,		    /* 0xe9 -> 0x65 */
+   0x65,		    /* 0xea -> 0x65 */ 
+   0x65,		    /* 0xeb -> 0x65 */
+   0x69,		    /* 0xec -> 0x69 */
+   0x69,		    /* 0xed -> 0x69 */ 
+   0x69,	      	    /* 0xee -> 0x69 */
+   0x69,		    /* 0xef -> 0x69 */
+
+   0x6f,		    /* 0xf0 -> 0x6f */
+   0xee,		    /* 0xf1 -> 0xee */   
+   0x6f,		    /* 0xf2 -> 0x6f */
+   0x6f,		    /* 0xf3 -> 0x61 */
+   0x6f,		    /* 0xf4 -> 0x61 */
+   0x61,		    /* 0xf5 -> 0x61 */
+   0xef,		    /* 0xf6 -> 0xef */ 
+   0xfc,		    /* 0xf7 -> 0xfc */
+   0x6f,		    /* 0xf8 -> 0x6f */
+   0x7f,		    /* 0xf9 -> 0x75 */
+   0x75,		    /* 0xfa -> 0x75 */ 
+   0x75,		    /* 0xfb -> 0x75 */
+   0xf5,		    /* 0xfc -> 0xf5 */
+   0x79,		    /* 0xfd -> 0x79 */ 
+   UNKNOWN_CHAR,	    /* 0xfe */
+   0x79		    /* 0xff -> 0x79 */
+};
Only in /home/dast/src/rockbox/firmware/drivers: lcd-player-charset.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/lcd-player.c ./firmware/drivers/lcd-player.c
--- /home/dast/src/rockbox/firmware/drivers/lcd-player.c	Fri Aug 29 13:50:01 2003
+++ ./firmware/drivers/lcd-player.c	Sun Nov 30 18:55:55 2003
@@ -1,25 +1,4 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: lcd-player.c,v 1.34 2003/08/18 05:27:13 matsl Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "config.h"
-#include "hwcompat.h"
-
-#ifdef HAVE_LCD_CHARCELLS
 
 #include "lcd.h"
 #include "kernel.h"
@@ -28,35 +7,19 @@
 #include <stdlib.h>
 #include "file.h"
 #include "debug.h"
+//#define DEBUGF(...)
+//#define LDEBUGF(...)
 #include "system.h"
-#include "font.h"
-#include "lcd-player-charset.h"
+#include "lcd-charset.h"
 
 /*** definitions ***/
 
-#define OLD_LCD_CONTRAST_SET ((char)0xA8)
-#define OLD_LCD_CRAM         ((char)0xB0) /* Characters */
-#define OLD_LCD_PRAM         ((char)0x80) /*  Patterns  */
-#define OLD_LCD_IRAM         ((char)0xE0) /*    Icons   */
-
-#define NEW_LCD_CONTRAST_SET ((char)0x50)
-#define NEW_LCD_CRAM         ((char)0x80) /* Characters */
-#define NEW_LCD_PRAM         ((char)0xC0) /*  Patterns  */
-#define NEW_LCD_IRAM         ((char)0x40) /*    Icons   */
-
-#define LCD_CURSOR(x,y)    ((char)(lcd_cram+((y)*16+(x))))
-#define LCD_ICON(i)        ((char)(lcd_iram+i))
-
-#define SCROLLABLE_LINES 2
+#define SCROLLABLE_LINES 4
 
 #define SCROLL_MODE_OFF   0
 #define SCROLL_MODE_PAUSE 1
 #define SCROLL_MODE_RUN   2
 
-extern unsigned short new_lcd_rocklatin1_to_xlcd[];
-extern unsigned short old_lcd_rocklatin1_to_xlcd[];
-extern unsigned char lcd_player_extended_lcd_to_rocklatin1[];
-extern unsigned char extended_font_player[NO_EXTENDED_LCD_CHARS][8];
 
 /*** generic code ***/
 
@@ -74,15 +37,9 @@
     int jump_scroll_steps;
 };
 
-#define MAX_CURSOR_CHARS 8
 struct cursorinfo {
-    int len;
-    char text[MAX_CURSOR_CHARS];
-    int textpos;
     int y_pos;
     int x_pos;
-    int divider;
-    int downcount;
 } cursor;
 
 static void scroll_thread(void);
@@ -98,227 +55,187 @@
 
 static struct scrollinfo scroll[SCROLLABLE_LINES];
 
-static char extended_chars_mapped[NO_EXTENDED_LCD_CHARS];
-static char extended_pattern_content[8]; /* Which char is mapped in pattern */
-static char extended_pattern_usage[8]; /* Counting number of times used */
-static char pattern_size; /* Last pattern, 3 for old LCD, 7 for new LCD */
-
-static bool new_lcd;
-
-extern unsigned short *lcd_ascii;
-static char lcd_contrast_set;
-static char lcd_cram;
-static char lcd_pram;
-static char lcd_iram;
+static unsigned char *lcd_ascii;
 
-unsigned short buffer_xlcd[11][2];
-unsigned short buffer_lcd_mirror[11][2];
+unsigned short buffer_xlcd[20][4];
+unsigned short buffer_lcd_mirror[20][4];
+static unsigned char cgram_cache[64];
 
 #ifdef SIMULATOR
-unsigned char hardware_buffer_lcd[11][2];
+unsigned char hardware_buffer_lcd[20][4];
 #endif
 #define NO_CHAR -1
 
-static void lcd_free_pat(int map_ch)
+void lcd_cursor(int x, int y)
 {
-    int x, y;
-    unsigned short substitute_char;
-
-    int pat;
-    pat=extended_chars_mapped[map_ch];
-    if (pat!=NO_CHAR) {
-
-        substitute_char=lcd_player_extended_lcd_to_rocklatin1[map_ch];
-
-        for (x=0; x<11; x++) {
-            for (y=0; y<2; y++)  {
-                if (map_ch==lcd_ascii[buffer_xlcd[x][y]]-512) {
-                    buffer_xlcd[x][y]=substitute_char;
-                    buffer_lcd_mirror[x][y]=substitute_char;
-#ifdef SIMULATOR
-                    hardware_buffer_lcd[x][y]=substitute_char;
-#else
-                    lcd_write(true, LCD_CURSOR(x, y));
-                    lcd_write(false, substitute_char);
-#endif
-                }
-            }
-        }
-        extended_chars_mapped[map_ch]=NO_CHAR;
-        extended_pattern_content[pat]=NO_CHAR;
-        extended_pattern_usage[pat]=0;
+    if ((cursor.y_pos==y && cursor.x_pos==x) || x>=20 || y>3 || x<0 || y<0) {
+//        DEBUGF("ignoring request for cursor to %d,%d - currently %d,%d\n",x,y,cursor.x_pos,cursor.y_pos);
+        return;
     }
-#ifdef SIMULATOR
-    lcd_update();
-#endif
-}
 
-static int lcd_get_free_pat(int ch)
-{
-    int pat;
-    int last_pat=0;
-    static int last_used_pat=0;
-    int loop;
-
-    pat=last_used_pat;
-    for (loop=0; loop<=pattern_size; loop++) {
-        pat=(pat+1)&pattern_size; /* Keep 'pat' within limits */
-        if (extended_pattern_usage[pat]==0) {
-            int map_ch=extended_pattern_content[pat];
-            if (map_ch != NO_CHAR) {
-                extended_chars_mapped[map_ch]=NO_CHAR;
-                extended_pattern_content[pat]=NO_CHAR;
-            }
-            last_used_pat=pat;
-            return pat;
-        }
-        if (extended_pattern_content[pat]>extended_pattern_content[last_pat])
-            last_pat=pat;
-    }
-    if (ch<32) { /* Prioritized char */
-        /* Remove last_pat */
-        lcd_free_pat(extended_pattern_content[last_pat]);
-        last_used_pat=last_pat;
-        return last_pat;
-    }
-    return NO_CHAR;
+    char value=0;
+    
+    cursor.y_pos=y;
+    cursor.x_pos=x;
 
+    switch (y) {
+        case 0:
+            value=0x80|x;
+            break;
+        case 1:
+            value=0x80|(x+0x40);
+            break;
+        case 2:
+            value=0x80|(x+0x14);
+            break;
+        case 3:
+            value=0x80|(x+0x54);
+            break;
+    }
+    lcd_write(true,value);
 }
 
 void xlcd_update(void)
 {
     int x, y;
-    for (x=0; x<11; x++) {
-        for (y=0; y<2; y++)  {
-            unsigned short ch=buffer_xlcd[x][y];
-            unsigned char hw_ch=0xff;
-            if (ch==buffer_lcd_mirror[x][y])
-                continue; /* No need to redraw */
-            buffer_lcd_mirror[x][y]=ch;
-            if (ch>=256 && ch<512) {
-                hw_ch=ch-256;
-            } else {
-                int map_ch=lcd_ascii[ch];
-                if (map_ch<512) {
-                    hw_ch=map_ch;
-                }
-                else {
-                    map_ch=map_ch-512;
-                    if (extended_chars_mapped[map_ch]!=NO_CHAR) {
-                        hw_ch=extended_chars_mapped[map_ch];
-                        extended_pattern_usage[hw_ch]++;
-                    }
-                    else {
-                        int pat;
-                        pat=lcd_get_free_pat(map_ch);
-                        if (pat<0) {
-                            DEBUGF("Substitute for %02x (map 0x%02x)"
-                                   " is used.\n", ch, map_ch);
-                            /* Find substitute char */
-                            map_ch=
-                                lcd_player_extended_lcd_to_rocklatin1[map_ch];
-                            hw_ch=lcd_ascii[map_ch];
-                        } else {
-#ifdef DEBUG
-                            if (extended_pattern_usage[pat]!=0) {
-                                DEBUGF("***Pattern %d is not zero!\n", pat);
-                            }
-#endif
-                            extended_chars_mapped[map_ch]=pat;
-                            extended_pattern_content[pat]=map_ch;
-                            extended_pattern_usage[pat]=1;
-                            lcd_define_hw_pattern(pat*8, 
-                                                  extended_font_player[map_ch],
-                                                  8);
-                            hw_ch=pat;
-                        }
-                    }
-                }
-            }
+    for (x=0; x<20; x++) {
+        for (y=0; y<4; y++)  {
+//            unsigned short ch=buffer_xlcd[x][y];
+//            unsigned char hw_ch=0xff;
+//            if (ch==buffer_lcd_mirror[x][y])
+//                continue; /* No need to redraw */
+//            buffer_lcd_mirror[x][y]=ch;
+//            int map_ch=lcd_ascii[ch];
+//            hw_ch=map_ch;
 #ifdef SIMULATOR
             hardware_buffer_lcd[x][y]=hw_ch;
 #else
-            lcd_write(true,LCD_CURSOR(x,y));
-            lcd_write(false, hw_ch);
+//            lcd_cursor(x,y);
+//            lcd_write(false, hw_ch);
 #endif
         }
     }
-    lcd_update();
+//    lcd_update();
 }
 
 bool lcdx_putc(int x, int y, unsigned short ch)
 {
-    int lcd_char;
-    if (buffer_xlcd[x][y]==ch)
-        return false; /* Same char, ignore any update */
-    lcd_char=lcd_ascii[buffer_xlcd[x][y]];
-    if (lcd_char>=512) {
-        /* The removed char is a defined pattern, count down the reference. */
-        extended_pattern_usage[(int)extended_chars_mapped[lcd_char-512]]--;
-#ifdef DEBUG
-        if (extended_pattern_usage[(int)extended_chars_mapped[lcd_char]]<0) {
-            DEBUGF("**** Mapped char %02x is less than 0!\n", lcd_char);
-        }
-#endif
-    }
-
-    buffer_xlcd[x][y]=ch;
+//    if (buffer_xlcd[x][y]==ch)
+//        return false; /* Same char, ignore any update */
 
-    lcd_char=lcd_ascii[ch];
-    if (lcd_char>=256)
-        return true; /* Caller shall call xlcd_update() when done */
+//    buffer_xlcd[x][y]=ch;
 
-    buffer_lcd_mirror[x][y]=lcd_char;
+//    buffer_lcd_mirror[x][y]=lcd_ascii[ch];
 #ifdef SIMULATOR
-    hardware_buffer_lcd[x][y]=lcd_char;
+    hardware_buffer_lcd[x][y]=lcd_ascii[ch];
 #else
-    lcd_write(true, LCD_CURSOR(x, y));
-    lcd_write(false, lcd_char);
+//    DEBUGF("lcdx_putc: Moving cursor to %d,%d\n",x,y);
+    lcd_cursor(x, y);
+//    DEBUGF("lcdx_putc: base 0x%x offset 0x%x\n",old_lcd_neo_to_xlcd,ch);
+//    DEBUGF("lcdx_putc: 0x%x became 0x%x due to conversion\n",ch,lcd_ascii[ch]);
+    lcd_write(false, lcd_ascii[(unsigned char)ch]);
+//    lcd_write(false, ch);
+    cursor.x_pos++;
+    if (cursor.x_pos>=20) {
+        cursor.x_pos=0;
+        cursor.y_pos+=2;
+        if (cursor.y_pos==4) //lcd line order 0,2,1,3
+            cursor.y_pos=1;
+    }
 #endif
     return false;
 }
 
-int lcd_default_contrast(void)
+void lcd_clear_display(void)
 {
-    return 30;
+  lcd_cancel_scroll();
+  lcd_write(true,LCD_CLEAR);
+
+  mdelay(2); //delay for lcd to comply
+  /////////remove delay once busy flag reading completed
+  cursor.x_pos=20;
+  cursor.y_pos=4; //cursor undefined at this point...
 }
 
-void lcd_clear_display(void)
+int lcd_puts_nopad(int x,int y, const unsigned char *string)
 {
-    int i;
-    bool update=false; 
-    DEBUGF("lcd_clear_display()\n");
-    lcd_stop_scroll();
-    cursor.len=0; /* Stop cursor */
-    for (i=0;i<22;i++)
-        update|=lcdx_putc(i%11, i/11, ' ');
-    if (update)
-        xlcd_update();
+  scroll[y].mode = SCROLL_MODE_OFF;
+  lcd_cursor(x, y);
+  for(; x<20 && *string!='\0';string++, x++){
+    lcd_write(false, lcd_ascii[*string]);
+    cursor.x_pos++;
+  }
+  return x;
+}
+
+int lcd_puts_fmt( int x, int y, const unsigned char* string, int flags )
+{
+  int slen,i,tlen = 0;
+
+  scroll[y].mode=SCROLL_MODE_OFF;
+
+  if( flags & FMT_LPADDED ) {
+    lcd_cursor(0, y);
+    for( i=0; i<x && i<20; i++ ){
+      lcd_write( false, ' ' );
+      cursor.x_pos++;
+    }
+    tlen += x;
+  }
+	
+  switch( flags & FMT_ALIGN_MASK ){
+  case FMT_LEFT:
+      tlen += lcd_puts_nopad( x, y, string );
+      break;
+  case FMT_RIGHT:
+    flags &= ~FMT_RPADDED;
+    slen = strlen(string);
+    tlen += lcd_puts_nopad( 20 - slen, y, string );
+    break;
+  case FMT_CENTER:
+    slen= strlen(string);
+    tlen += lcd_puts_nopad( (20 - slen ) >> 1, y, string );
+    break;
+  case FMT_JUSTIFIED:
+    flags &= ~FMT_RPADDED;
+    
+    /* Not coded up yet */
+    break;
+  }
+
+  if( flags & FMT_RPADDED ) {
+    for( i=tlen; i<20; i++ ){
+      lcd_write( false, ' ' );
+      cursor.x_pos++;
+    }
+    tlen = 20;
+  }
+
+  return tlen;
 }
 
 static void lcd_puts_cont_scroll(int x, int y, unsigned char *string)
 {
     bool update=false; 
-    DEBUGF("lcd_puts_cont_scroll(%d, %d, \"", x, y);
+//    DEBUGF("lcd_puts_cont_scroll(%d, %d, \"", x, y);
 
-    for (; *string && x<11; x++)
+    for (; *string && x<20; x++)
     {
 #ifdef DEBUGF
-        if (*string>=32 && *string<128)
-        {
-            DEBUGF("%c", *string);
-        }
-        else
-        {
-            DEBUGF("(0x%02x)", *string);
-        }
+//        if (*string>=32 && *string<128)
+//        {
+//            DEBUGF("%c", *string);
+//        }
+//        else
+//        {
+//            DEBUGF("(0x%02x)", *string);
+//        }
 #endif
-        /* We should check if char is over 256 */
         update|=lcdx_putc(x, y, *(unsigned char*)string++);
     }
-    DEBUGF("\")\n");
+//    DEBUGF("\")\n");
     
-    for (; x<11; x++)
+    for (; x<20; x++)
         update|=lcdx_putc(x, y, ' ');
     if (update)
         xlcd_update();
@@ -323,44 +240,23 @@
     if (update)
         xlcd_update();
 }
+
 void lcd_puts(int x, int y, unsigned char *string)
 {
-    DEBUGF("lcd_puts(%d, %d) -> ", x, y);
+//    DEBUGF("lcd_puts(%d, %d) -> ", x, y);
     scroll[y].mode=SCROLL_MODE_OFF;
     return lcd_puts_cont_scroll(x, y, string);
-}
-
-void lcd_put_cursor(int x, int y, char cursor_char)
-{
-    if (cursor.len == 0) {
-        cursor.text[0]=buffer_xlcd[x][y];
-        cursor.text[1]=cursor_char;
-        cursor.len=2;
-        cursor.textpos=0;
-        cursor.y_pos=y;
-        cursor.x_pos=x;
-        cursor.downcount=0;
-        cursor.divider=4;
-    }
-}
-
-void lcd_remove_cursor(void)
-{
-    if (cursor.len!=0) {
-        bool up;
-        cursor.len=0;
-        up = lcdx_putc(cursor.x_pos, cursor.y_pos, cursor.text[0]);
-#ifdef SIMULATOR
-        if(up)
-            lcd_update();
-#endif
-    }
+//    for (;*string!='\0';++string) {
+//        lcd_cursor(x++, y);
+//        lcd_write(false, *string);
+//        cursor.x_pos++;
+//    }
 }
 
 void lcd_putc(int x, int y, unsigned short ch)
 {
     bool update;
-    DEBUGF("lcd_putc(%d, %d, %d '0x%02x')\n", x, y, ch, ch);
+//    DEBUGF("lcd_putc(%d, %d, %d '0x%02x')\n", x, y, ch, ch);
     if (x<0 || y<0) {
         return;
     }
@@ -370,139 +266,76 @@
         xlcd_update();
 }
 
-unsigned char lcd_get_locked_pattern(void)
-{
-    unsigned char pat=1;
-    while (pat<LAST_RESERVED_CHAR) {
-        if (lcd_ascii[pat]==RESERVED_CHAR) {
-            lcd_ascii[pat]=0x200+pat;
-            return pat;
-        }
-        pat++;
-    }
-    return 0;
-}
-
-void lcd_unlock_pattern(unsigned char pat)
-{
-    lcd_ascii[pat]=RESERVED_CHAR;
-    lcd_free_pat(pat);
-}
-
-void lcd_define_pattern(int pat, char *pattern)
+void lcd_add_char(const char *character,unsigned int location)
 {
     int i;
-    for (i=0; i<7; i++) {
-        extended_font_player[pat][i]=pattern[i];
-    }
-    if (extended_chars_mapped[pat]!=NO_CHAR) {
-        lcd_define_hw_pattern(extended_chars_mapped[pat]*8, pattern, 7);
-    }
-}
 
-#ifndef SIMULATOR
-void lcd_define_hw_pattern (int which,char *pattern,int length)
-{
-    int i;
-    lcd_write(true,lcd_pram | which);
-    for (i=0;i<length;i++)
-        lcd_write(false,pattern[i]);
-}
-
-void lcd_double_height(bool on)
-{
-    if(new_lcd)
-        lcd_write(true,on?9:8);
-}
-
-static char icon_pos[] =
-{
-    0, 0, 0, 0, /* Battery */
-    2, /* USB */
-    3, /* Play */
-    4, /* Record */
-    5, /* Pause */
-    5, /* Audio */
-    6, /* Repeat */
-    7, /* 1 */
-    9,  /* Volume */
-    9,  /* Volume 1 */
-    9,  /* Volume 2 */
-    10, /* Volume 3 */
-    10, /* Volume 4 */
-    10, /* Volume 5 */
-    10, /* Param */
-};
+    // Save character in cache
+    memcpy( &cgram_cache[location<<3], character, 8 );
 
-static char icon_mask[] =
-{
-    0x02, 0x08, 0x04, 0x10, /* Battery */
-    0x04, /* USB */
-    0x10, /* Play */
-    0x10, /* Record */
-    0x02, /* Pause */
-    0x10, /* Audio */
-    0x02, /* Repeat */
-    0x01, /* 1 */
-    0x04, /* Volume */
-    0x02, /* Volume 1 */
-    0x01, /* Volume 2 */
-    0x08, /* Volume 3 */
-    0x04, /* Volume 4 */
-    0x01, /* Volume 5 */
-    0x10, /* Param */
-};
+    location<<=3;    //8 addresses per char
+    lcd_write(true,LCD_SET_CGRAM|location);
+    for (i=0;i<8;++i)
+        lcd_write(false,character[i]);
+    lcd_cursor(0,0);
+}
 
-void lcd_icon(int icon, bool enable)
+void lcd_save_cgram( char* buffer )
 {
-    static unsigned char icon_mirror[11] = {0};
-    int pos, mask;
-
-    pos = icon_pos[icon];
-    mask = icon_mask[icon];
-    
-    lcd_write(true, LCD_ICON(pos));
-    
-    if(enable)
-        icon_mirror[pos] |= mask;
-    else
-        icon_mirror[pos] &= ~mask;
-    
-    lcd_write(false, icon_mirror[pos]);
+  memcpy( buffer, cgram_cache, 64 );
 }
 
-void lcd_set_contrast(int val)
+void lcd_restore_cgram( const char* buffer )
 {
-    lcd_write(true, lcd_contrast_set);
-    lcd_write(false, 31-val);
+  int i;
+  for( i=0; i< 8; i++)
+    lcd_add_char( &buffer[i*8], i );
 }
-#endif /* SIMULATOR */
 
 void lcd_init (void)
 {
-    new_lcd = has_new_lcd();
-    memset(extended_chars_mapped, NO_CHAR, sizeof(extended_chars_mapped));
-    memset(extended_pattern_content, NO_CHAR,sizeof(extended_pattern_content));
-    memset(extended_pattern_usage, 0, sizeof(extended_pattern_usage));
-
-    if(new_lcd) {
-        lcd_ascii = new_lcd_rocklatin1_to_xlcd;
-        lcd_contrast_set = NEW_LCD_CONTRAST_SET;
-        lcd_cram = NEW_LCD_CRAM;
-        lcd_pram = NEW_LCD_PRAM;
-        lcd_iram = NEW_LCD_IRAM;
-        pattern_size=7; /* Last pattern, 3 for old LCD, 7 for new LCD */
-    }
-    else {
-        lcd_ascii = old_lcd_rocklatin1_to_xlcd;
-        lcd_contrast_set = OLD_LCD_CONTRAST_SET;
-        lcd_cram = OLD_LCD_CRAM;
-        lcd_pram = OLD_LCD_PRAM;
-        lcd_iram = OLD_LCD_IRAM;
-        pattern_size=3; /* Last pattern, 3 for old LCD, 7 for new LCD */
-    }
-    
-    lcd_set_contrast(lcd_default_contrast());
+    unsigned char backslash[] = { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00 };
+    unsigned char progress4[] = { 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e };
+    unsigned char progress3[] = { 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c };
+    unsigned char progress2[] = { 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 };
+    unsigned char progress1[] = { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 };
+   
+    PBIOR|=LCD_RW|LCD_RS|LCD_E|LCD_DB7|LCD_DB6|LCD_DB5|LCD_DB4;
+    //need to be able to write those ports...
+    
+    mdelay(50);  //delay > 15ms, 100 to be sure
+ 
+    clearlcdbits();
+
+    PBDR|=(LCD_DB5|LCD_DB4);
+    lcd_pulsee();
+    mdelay(10);
+    lcd_pulsee();
+    mdelay(10);
+    lcd_pulsee();
+    mdelay(10);
+
+    clearlcdbits();
+    PBDR|=LCD_DB5;
+
+    lcd_pulsee();
+    mdelay(10);
+
+    lcd_write(true,LCD_CONFIG);
+    lcd_write(true,LCD_OFFDISP);
+    lcd_write(true,LCD_CLEAR);
+    lcd_write(true,LCD_ENTRYMODE);
+    lcd_write(true,LCD_ONDISP);
+    lcd_ascii = latin1_to_lcd;
+
+    //add backslash char to CGRAM location 0x10
+    lcd_add_char(backslash,0);
+    
+    //Add Progress characters cgram 1-4 
+    lcd_add_char(progress1,1);
+    lcd_add_char(progress2,2);
+    lcd_add_char(progress3,3);
+    lcd_add_char(progress4,4);
 
     create_thread(scroll_thread, scroll_stack,
                   sizeof(scroll_stack), scroll_name);
@@ -523,14 +356,14 @@
     struct scrollinfo* s;
     int i;
 
-    DEBUGF("lcd_puts_scroll(%d, %d, %s)\n", x, y, string);
+//    DEBUGF("lcd_puts_scroll(%d, %d, %s)\n", x, y, string);
 
     s = &scroll[y];
 
     lcd_puts_cont_scroll(x,y,string);
     s->textlen = strlen(string);
 
-    if ( s->textlen > 11-x ) {
+    if ( s->textlen > 20-x ) {
         s->mode = SCROLL_MODE_RUN;
         s->scroll_start_tick = current_tick + scroll_delay;
         s->offset=0;
@@ -539,14 +372,14 @@
         s->direction=+1;
         s->jump_scroll=0;
         s->jump_scroll_steps=0;
-        if (jump_scroll && jump_scroll_delay<(HZ/scroll_speed)*(s->textlen-11+x)) {
-            s->jump_scroll_steps=11-x;
+        if (jump_scroll && jump_scroll_delay<(HZ/scroll_speed)*(s->textlen-20+x)) {
+            s->jump_scroll_steps=20-x;
             s->jump_scroll=jump_scroll;
         }
         strncpy(s->text,string,sizeof s->text);
         s->turn_offset=-1;
-        if (bidir_limit && (s->textlen < ((11-x)*(100+bidir_limit))/100)) {
-            s->turn_offset=s->textlen+x-11;
+        if (bidir_limit && (s->textlen < ((20-x)*(100+bidir_limit))/100)) {
+            s->turn_offset=s->textlen+x-20;
         }
         else {
             for (i=0; i<scroll_spacing &&
@@ -579,6 +412,13 @@
     lcd_update();
 }
 
+void lcd_cancel_scroll(void)
+{
+    int index;
+    for ( index = 0; index < SCROLLABLE_LINES; index++ )
+      scroll[index].mode = SCROLL_MODE_OFF;
+    lcd_update();
+}
 
 void lcd_allow_bidirectional_scrolling(bool on)
 {
@@ -622,7 +462,7 @@
             s = &scroll[index];
             if ( s->mode == SCROLL_MODE_RUN ) {
                 if ( TIME_AFTER(current_tick, s->scroll_start_tick) ) {
-                    char buffer[12];
+                    char buffer[21];
                     int jumping_scroll=s->jump_scroll;
                     update = true;
                     if (s->jump_scroll) {
@@ -680,36 +520,26 @@
 
                     i=0;
                     o=s->offset;
-                    while (i<11) {
+                    while (i<20) {
                         buffer[i++]=s->text[o++];
                         if (o==s->textlen /* || (jump_scroll && buffer[i-1] == ' ') */)
                             break;
                     }
                     o=0;
                     if (s->turn_offset == -1 && !jumping_scroll) {
-                        while (i<11) {
+                        while (i<20) {
                             buffer[i++]=s->text[o++];
                         }
                     } else {
-                        while (i<11) {
+                        while (i<20) {
                             buffer[i++]=' ';
                         }
                     }
-                    buffer[11]=0;
+                    buffer[20]=0;
                     
                     lcd_puts_cont_scroll(s->startx, s->starty, buffer);
                 }
             }
-            if (cursor.len>0) {
-                if (cursor.downcount--<0) {
-                    cursor.downcount=cursor.divider;
-                    cursor.textpos++;
-                    if (cursor.textpos>=cursor.len)
-                        cursor.textpos=0;
-                    update|=lcdx_putc(cursor.x_pos, cursor.y_pos,
-                                      cursor.text[cursor.textpos]);
-                }
-            }
             if (update) {
                 lcd_update();
             }
@@ -718,5 +548,3 @@
         sleep(HZ/scroll_speed);
     }
 }
-
-#endif /* HAVE_LCD_CHARCELLS */
Only in /home/dast/src/rockbox/firmware/drivers: lcd-recorder.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/lcd.c ./firmware/drivers/lcd.c
--- /home/dast/src/rockbox/firmware/drivers/lcd.c	Sun Mar 16 22:36:48 2003
+++ ./firmware/drivers/lcd.c	Sun Nov 30 18:54:26 2003
@@ -1,175 +1,152 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: lcd.c,v 1.101 2003/02/23 19:02:31 zagor Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <stdbool.h>
 #include "system.h"
+#include "lcd.h"
+#include "debug.h"
 
-#define LCDR (PBDR_ADDR+1)
+void mdelay(int t)
+{
+    int i,j;
 
-#ifdef HAVE_LCD_CHARCELLS
-#define LCD_DS  1 /* PB0 = 1 --- 0001 ---  LCD-DS */
-#define LCD_CS  2 /* PB1 = 1 --- 0010 --- /LCD-CS */
-#define LCD_SD  4 /* PB2 = 1 --- 0100 ---  LCD-SD */
-#define LCD_SC  8 /* PB3 = 1 --- 1000 ---  LCD-SC */
-#else
-#define LCD_SD  1 /* PB0 = 1 --- 0001 */
-#define LCD_SC  2 /* PB1 = 1 --- 0010 */
-#define LCD_RS  4 /* PB2 = 1 --- 0100 */
-#define LCD_CS  8 /* PB3 = 1 --- 1000 */
-#define LCD_DS LCD_RS
-#endif
+    for (i=0;i<t;++i)
+        for (j=0;j<6000;j++);  //12Mhz/6000/2clks per loop ~ 1ms ... maybe
+}
 
-/*
- * About /CS,DS,SC,SD
- * ------------------
- *
- * LCD on JBP and JBR uses a SPI protocol to receive orders (SDA and SCK lines)
- *
- * - /CS -> Chip Selection line :
- *            0 : LCD chipset is activated.
- * -  DS -> Data Selection line, latched at the rising edge
- *          of the 8th serial clock (*) :
- *            0 : instruction register,
- *            1 : data register; 
- * -  SC -> Serial Clock line (SDA).
- * -  SD -> Serial Data line (SCK), latched at the rising edge
- *          of each serial clock (*).  
- *
- *    _                                                          _
- * /CS \                                                        /
- *      \______________________________________________________/
- *    _____  ____  ____  ____  ____  ____  ____  ____  ____  _____ 
- *  SD     \/ D7 \/ D6 \/ D5 \/ D4 \/ D3 \/ D2 \/ D1 \/ D0 \/
- *    _____/\____/\____/\____/\____/\____/\____/\____/\____/\_____
- *
- *    _____     _     _     _     _     _     _     _     ________ 
- *  SC     \   * \   * \   * \   * \   * \   * \   * \   *
- *          \_/   \_/   \_/   \_/   \_/   \_/   \_/   \_/
- *    _  _________________________________________________________ 
- *  DS \/                                                  
- *    _/\_________________________________________________________
- *
- */
+void clearlcdbits(void)
+{
+    PBDR&=(~(LCD_E|LCD_RS|LCD_RW|LCD_DB7|LCD_DB6|LCD_DB5|LCD_DB4));
+}
+
+static void lcd_busywait(void)
+{ 
+  int i;
+  for( i=0; i<500; i++);
+  return;
+}
+
+void lcd_pulsee(void)
+{
+  // Pulse E -- Must be 450 ns or 0.450 us minimum
+  // On the SH-1, NOP takes 1 cycle to execute
+  PBDR |= LCD_E;
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  PBDR &= ~LCD_E;
+}
+
+void lcd_write(bool command, unsigned char byte) __attribute__ ((section (".icode")));
+void lcd_write(bool command, unsigned char byte)
+{
+  //Make sure the lcd is not busy
+  lcd_busywait();
+
+  PBDR &= 0xff80;
+  if(!command)
+    PBDR |= LCD_RS;
+
+  //send high nibble
+  PBDR |= ( (byte>>4) & 0x0f);
+  lcd_pulsee();
+
+  PBDR &= 0xffc0;
+  if(!command)
+    PBDR |= LCD_RS;
+
+  //send low nibble
+  PBDR |= (byte & 0x0f);  
+  lcd_pulsee();
+}
+
+/* Not working !!!! 
+
+We always end up reading the PBDR register and not the pins...
+The PBDR does not seem to be changed to the pin values
+
+Possible reasons:
+
+1. We're to dumb to understand how to use PBIOR and PBDR
+2. The lcd high voltage value is to low
+3. The lcd has its RW pin grounded making it write only.
+4. The lcd pins aren't Hi-Z.  They should be using pull-up resitors. 
+   
+
+Conclusion:
+
+Since Neo uses 2 lcds, reading has probably been disabled.
+*/
 
 /*
- * The only way to do logical operations in an atomic way
- * on SH1 is using :
- *
- *   or.b/and.b/tst.b/xor.b #imm,@(r0,gbr)
- *
- * but GCC doesn't generate them at all so some assembly
- * codes are needed here.
- *
- * The Global Base Register gbr is expected to be zero
- * and r0 is the address of one register in the on-chip
- * peripheral module.
- *
- */ 
-
-void lcd_write(bool command, int byte) __attribute__ ((section (".icode")));
-void lcd_write(bool command, int byte)
-{
-    asm("and.b %0, @(r0,gbr)"
-         :
-         : /* %0 */ "I"(~(LCD_CS|LCD_DS|LCD_SD|LCD_SC)),
-           /* %1 */ "z"(LCDR));
-
-    if (command)
-        asm ("shll8 %0\n"
-             "0:      \n\t"
-             "and.b %2,@(r0,gbr)\n\t"
-             "shll  %0\n\t"  
-             "bf    1f\n\t"
-             "or.b  %3,@(r0,gbr)\n"
-             "1:      \n\t"
-             "or.b  %4,@(r0,gbr)\n"
-             "add   #-1,%1\n\t"
-             "cmp/pl %1\n\t"
-             "bt    0b"
-             :
-             : /* %0 */ "r"(((unsigned)byte)<<16),
-             /* %1 */ "r"(8),
-             /* %2 */ "I"(~(LCD_SC|LCD_SD|LCD_DS)),
-             /* %3 */ "I"(LCD_SD),
-             /* %4 */ "I"(LCD_SC),
-             /* %5 */ "z"(LCDR));
-    else
-        asm ("shll8  %0\n"
-             "0:       \n\t"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             "and.b  %2, @(r0,gbr)\n\t"
-             "shll   %0\n\t"  
-             "bf     1f\n\t"
-             "or.b   %3, @(r0,gbr)\n"
-             "1:       \n\t"
-             "or.b   %4, @(r0,gbr)\n"
-             :
-             : /* %0 */ "r"(((unsigned)byte)<<16),
-             /* %1 */ "r"(8),
-             /* %2 */ "I"(~(LCD_SC|LCD_SD)),
-             /* %3 */ "I"(LCD_SD|LCD_DS),
-             /* %4 */ "I"(LCD_SC|LCD_DS),
-             /* %5 */ "z"(LCDR));
-
-    asm("or.b %0, @(r0,gbr)"
-         :
-         : /* %0 */ "I"(LCD_CS|LCD_DS|LCD_SD|LCD_SC),
-           /* %1 */ "z"(LCDR));
+unsigned char lcd_read(bool busy)
+{ 
+  unsigned byte;
+ 
+  //Make sure we don't check the busy flags if were checking the busy flag
+  if( !busy )
+    lcd_busywait();
+
+  //Set the data pins to read mode
+  PBIOR = PBIOR & 0xFFF0;
+  asm volatile ("nop");
+
+  PBDR &= 0xff80;
+  PBDR |= LCD_RW;
+
+  if( !busy )
+    PBDR |= LCD_RS;
+
+  asm volatile ("nop");
+ 
+  PBDR |= LCD_E;
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  
+  byte = (PBDR & 0x0F) << 4;
+
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  PBDR &= ~LCD_E;
+ 
+  PBDR &= 0xff80;
+  PBDR |= LCD_RW;
+  if( !busy )
+    PBDR |= LCD_RS;
+
+  //Wait 500ns
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+
+
+  PBDR |= LCD_E;
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+
+  byte |= (PBDR & 0x0F);
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  asm volatile ("nop");
+  PBDR &= ~LCD_E;
+
+  //Set the data pins back to write mode
+  PBIOR = PBIOR | 0x000F;
+  return byte;
 }
+*/
Only in /home/dast/src/rockbox/firmware/drivers: led.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/mas.c ./firmware/drivers/mas.c
--- /home/dast/src/rockbox/firmware/drivers/mas.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/drivers/mas.c	Fri Dec  5 01:14:45 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mas.c,v 1.15 2003/11/07 12:15:23 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include "stdbool.h"
 #include "config.h"
 #include "sh7034.h"
@@ -23,234 +5,112 @@
 #include "debug.h"
 #include "mas.h"
 #include "kernel.h"
-#include "system.h"
+#include "panic.h"
 
-extern bool old_recorder;
+static int mas_read (unsigned char subaddress, unsigned long* dest, int count );
 
-static int mas_devread(unsigned long *dest, int len);
+struct mas_version_info mas_version;
 
-int mas_default_read(unsigned short *buf)
+void mas_init(void)
 {
-    unsigned char *dest = (unsigned char *)buf;
-    int ret = 0;
-
-    i2c_begin();
-    
-    i2c_start();
-    i2c_outb(MAS_DEV_WRITE);
-    if (i2c_getack()) {
-        i2c_outb(MAS_DATA_READ);
-        if (i2c_getack()) {
-            i2c_start();
-            i2c_outb(MAS_DEV_READ);
-            if (i2c_getack()) {
-                    dest[0] = i2c_inb(0);
-                    dest[1] = i2c_inb(1);
-            }
-            else
-                ret = -3;
-        }
-        else
-            ret = -2;
-    }
-    else
-        ret = -1;
-    
-    i2c_stop();
+  unsigned int i;
+  unsigned long val;
 
-    i2c_end();
-    return ret;
-}
+  PAIOR |= PA8; // Make PA8 output
+  PADR &= ~PA8; //Enable MAS
 
-int mas_run(unsigned short address)
-{
-    int ret = 0;
-    unsigned char buf[3];
-
-    i2c_begin();
+  //Read name and code revision
+  mas_readmem(MAS_BANK_D1, MAS_ADD_NAME, &mas_version.name, 1);
+  mas_readmem(MAS_BANK_D1, MAS_ADD_CODE, &mas_version.code, 1);
+  mas_readmem(MAS_BANK_D1, MAS_ADD_DATE, &mas_version.date, 1);
     
-    buf[0] = MAS_DATA_WRITE;
-    buf[1] = address >> 8;
-    buf[2] = address & 0xff;
-
-    /* send run command */
-    if (i2c_write(MAS_DEV_WRITE,buf,3))
-    {
-        ret = -1;
+  //Read description
+  for( i=0; i<7; i++ ) {
+    mas_readmem(MAS_BANK_D1, MAS_ADD_DESCRIPTION+i, &val, 1);
+    mas_version.description[i*2] = (val & 0xff00) >> 8;
+    mas_version.description[i*2+1] = val & 0x00ff;
     }
+  mas_version.description[14]=0;
 
-    i2c_end();
-    return ret;
-}
+  //Initialize Bit Stream Interface (SDI)
+  PBDR &= ~PB12; //Set SIC LOW
+  mas_writereg( MAS_REG_SDI_INIT, 0x20 ); //Don't ask why. The data sheet doesn't say
+  mas_run(MAS_RUN_NORMAL);
 
-/* note: 'len' is number of 32-bit words, not number of bytes! */
-int mas_readmem(int bank, int addr, unsigned long* dest, int len)
-{
-    int ret = 0;
-    unsigned char buf[7];
+  /* From MAS 3507D-F10:
+  It is highly recommended to set these bits to "0",once
+  after power-on reset, in order to avoid clicking during
+  synchronization and desynchronization to an MPEG
+  bit stream.  */
 
-    i2c_begin();
+  mas_writereg( MAS_REG_LEFTCHANNEL, 0x00 );
+  mas_writereg( MAS_REG_RIGHTCHANNEL, 0x00 );
 
-    buf[0] = MAS_DATA_WRITE;
-    buf[1] = bank?MAS_CMD_READ_D1_MEM:MAS_CMD_READ_D0_MEM;
-    buf[2] = 0x00;
-    buf[3] = (len & 0xff00) >> 8;
-    buf[4] = len & 0xff;
-    buf[5] = (addr & 0xff00) >> 8;
-    buf[6] = addr & 0xff;
 
-    /* send read command */
-    if (i2c_write(MAS_DEV_WRITE,buf,7))
-    {
-        ret = -1;
-    }
+  // We need to set the PLL for a 14.31818 MHz crystal
+  // Notation:
+  // v = r / 524288.0 (-524288 < r < 524287 )
+  // r = v * 524288.0 + 0.5 ( -1.0 <= v < 1.0 )
 
-    ret = mas_devread(dest, len);
+  if( mas_version.code == 0x601 ){
 
-    i2c_end();
-    return ret;
-}
+    //Set PLL Offset for 48k
+    val = 0x5d9d0; 
+    mas_writemem(MAS_BANK_D0, 0x32d, &val, 1);
 
-/* note: 'len' is number of 32-bit words, not number of bytes! */
-int mas_writemem(int bank, int addr, unsigned long* src, int len)
-{
-    int ret = 0;
-    int i, j;
-    unsigned char buf[60];
-    unsigned char* ptr = (unsigned char*)src;
+    //Set PLL Offset for 44k
+    val = 0xceceb;
+    mas_writemem(MAS_BANK_D0, 0x32e, &val, 1);
 
-    i2c_begin();
+    //Set Output Configuration
+    val = 0;
+    mas_writemem(MAS_BANK_D0, 0x32f, &val, 1);
 
-    i=0;
-    buf[i++] = MAS_DATA_WRITE;
-    buf[i++] = bank?MAS_CMD_WRITE_D1_MEM:MAS_CMD_WRITE_D0_MEM;
-    buf[i++] = 0x00;
-    buf[i++] = (len & 0xff00) >> 8;
-    buf[i++] = len & 0xff;
-    buf[i++] = (addr & 0xff00) >> 8;
-    buf[i++] = addr & 0xff;
-
-    j = 0;
-    while(len--) {
-#ifdef HAVE_MAS3587F
-        buf[i++] = 0;
-        buf[i++] = ptr[j+1];
-        buf[i++] = ptr[j+2];
-        buf[i++] = ptr[j+3];
-#else
-        buf[i++] = ptr[j+2];
-        buf[i++] = ptr[j+3];
-        buf[i++] = 0;
-        buf[i++] = ptr[j+1];
-#endif
-        j += 4;
-    }
-    
-    /* send write command */
-    if (i2c_write(MAS_DEV_WRITE,buf,i))
-    {
-        ret = -1;
+    //Update settings
+    mas_run(0x475);
     }
+  else{
+    //Set PLL Offset for 48k
+    val = 0x5d9d0; 
+    mas_writemem(MAS_BANK_D0, 0x36d, &val, 1);
 
-    i2c_end();
-    return ret;
-}
-
-int mas_readreg(int reg)
-{
-    int ret = 0;
-    unsigned char buf[16];
-    unsigned long value;
-
-    i2c_begin();
+    //Set PLL Offset for 44k
+    val = 0xceceb;
+    mas_writemem(MAS_BANK_D0, 0x36e, &val, 1);
 
-    buf[0] = MAS_DATA_WRITE;
-    buf[1] = MAS_CMD_READ_REG | (reg >> 4);
-    buf[2] = (reg & 0x0f) << 4;
+    //Set Output Configuration
+    val = 0;
+    mas_writemem(MAS_BANK_D0, 0x36f, &val, 1);
 
-    /* send read command */
-    if (i2c_write(MAS_DEV_WRITE,buf,3))
-    {
-        ret = -1;
-    }
-    else
-    {
-        if(mas_devread(&value, 1))
-        {
-            ret = -2;
-        }
-        else
-        {
-            ret = value;
-        }
+    //Update settings
+    mas_run(0xfcb);
     }
 
-    i2c_end();
-    return ret;
+  //Set Tone Filter Prescale
+  mas_writereg(MAS_REG_KPRESCALE, 0xe9400);
+
+  //val = 0;
+  //mas_readmem(MAS_BANK_D0, MAS_ADD_PLLOFFSET48, &val, 1);
+  //panicf("0x%x",val);
 }
 
-int mas_writereg(int reg, unsigned int val)
+int mas_default_read(unsigned short *dest)
 {
-    int ret = 0;
-    unsigned char buf[5];
+  int try = 1;
+  int ret;
 
     i2c_begin();
 
-    buf[0] = MAS_DATA_WRITE;
-    buf[1] = MAS_CMD_WRITE_REG | (reg >> 4);
-    buf[2] = ((reg & 0x0f) << 4) | (val & 0x0f);
-    buf[3] = (val >> 12) & 0xff;
-    buf[4] = (val >> 4) & 0xff;
-
-    /* send write command */
-    if (i2c_write(MAS_DEV_WRITE,buf,5))
-    {
-        ret = -1;
-    }
-
-    i2c_end();
-    return ret;
-}
-
-/* note: 'len' is number of 32-bit words, not number of bytes! */
-static int mas_devread(unsigned long *dest, int len)
-{
-    int ret = 0;
-    unsigned char* ptr = (unsigned char*)dest;
-    int i;
-    
-    /* handle read-back */
-    /* Remember, the MAS values are only 20 bits, so we set
-       the upper 12 bits to 0 */
+  do {
+    ret = 0;
     i2c_start();
-    i2c_outb(MAS_DEV_WRITE);
-    if (i2c_getack()) {
-        i2c_outb(MAS_DATA_READ);
-        if (i2c_getack()) {
+    
+    if( i2c_outb(MAS_DEV_WRITE) ){
+      if( i2c_outb(MAS_DATA_READ) ){
             i2c_start();
-            i2c_outb(MAS_DEV_READ);
-            if (i2c_getack()) {
-                for (i=0;len;i++) {
-                    len--;
-#ifdef HAVE_MAS3587F
-                    i2c_inb(0); /* Dummy read */
-                    ptr[i*4+0] = 0;
-                    ptr[i*4+1] = i2c_inb(0) & 0x0f;
-                    ptr[i*4+2] = i2c_inb(0);
-                    if(len)
-                        ptr[i*4+3] = i2c_inb(0);
-                    else
-                        ptr[i*4+3] = i2c_inb(1); /* NAK the last byte */
-#else
-                    ptr[i*4+2] = i2c_inb(0);
-                    ptr[i*4+3] = i2c_inb(0);
-                    ptr[i*4+0] = i2c_inb(0);
-                    if(len)
-                        ptr[i*4+1] = i2c_inb(0);
-                    else
-                        ptr[i*4+1] = i2c_inb(1); /* NAK the last byte */
-#endif
-                }
+	if( i2c_outb(MAS_DEV_READ) ){
+	  *dest = (i2c_inb(true) << 8);
+	  *dest |= i2c_inb(false);  
             }
             else
                 ret = -3;
@@ -262,188 +122,163 @@
         ret = -1;
     
     i2c_stop();
+  }
+  while( ret && try--);
+  
+  i2c_end();
+  
+  switch(ret){
+  case -1:
+    panicf("mas_dr NoACK 1");
+    break;
+  case -2:
+    panicf("mas_dr NoACK 2");
+    break;
+  case -3:
+    panicf("mas_dr NoACK 3");
+  }
 
     return ret;
 }
 
-#ifdef HAVE_MAS3587F
-void mas_reset(void)
+unsigned short mas_framecount(void)
 {
-    or_b(0x01, &PAIORH);
-    
-    if(old_recorder)
-    {
-        /* Older recorder models don't invert the POR signal */
-        or_b(0x01, &PADRH);
-        sleep(HZ/100);
-        and_b(~0x01, &PADRH);
-        sleep(HZ/5);
-    }
-    else
-    {
-        and_b(~0x01, &PADRH);
-        sleep(HZ/100);
-        or_b(0x01, &PADRH);
-        sleep(HZ/5);
-    }
+  unsigned short val;
+  mas_default_read(&val);
+  return val;
 }
 
-int mas_direct_config_read(unsigned char reg)
+static int mas_read (unsigned char subaddress, unsigned long* dest, int count )
 {
+  int i = 0;
     int ret = 0;
-    unsigned char tmp[2];
-    
-    i2c_begin();
 
     i2c_start();
-    i2c_outb(MAS_DEV_WRITE);
-    if (i2c_getack()) {
-        i2c_outb(reg);
-        if (i2c_getack()) {
+  if( i2c_outb(MAS_DEV_WRITE) ){
+    if( i2c_outb(subaddress) ){
             i2c_start();
-            i2c_outb(MAS_DEV_READ);
-            if (i2c_getack()) {
-                tmp[0] = i2c_inb(0);
-                tmp[1] = i2c_inb(1); /* NAK the last byte */
-                ret = (tmp[0] << 8) | tmp[1];
-            }
+      if( i2c_outb(MAS_DEV_READ) ){
+	
+	for( ; i < count;i++ ){
+	  
+	  dest[i] = (i2c_inb(true) << 8);
+	  dest[i] |= i2c_inb(true);  
+	  i2c_inb(true);
+      	  	  
+	  //Last word?
+	  if( i == (count-1))
+	    dest[i] |= ((i2c_inb(false)&0x0f) << 16);
             else
-                ret = -3;
+	    dest[i] |= ((i2c_inb(true)&0x0f) << 16);  
+	}	 
+      }  
         }
         else
-            ret = -2;
+      ret = 2;
     }
     else
-        ret = -1;
+    ret = 1;
     
     i2c_stop();
-
-    i2c_end();
     return ret;
 }
 
-int mas_direct_config_write(unsigned char reg, unsigned int val)
+int mas_run(unsigned short address)
 {
-    int ret = 0;
+  int ret;
     unsigned char buf[3];
 
+  buf[0] = MAS_DATA_WRITE;
+  buf[1] = address >> 8;
+  buf[2] = address & 0xff;
     i2c_begin();
-
-    buf[0] = reg;
-    buf[1] = (val >> 8) & 0xff;
-    buf[2] = val & 0xff;
-
-    /* send write command */
-    if (i2c_write(MAS_DEV_WRITE,buf,3))
-    {
-        ret = -1;
-    }
-
+  ret = i2c_write( MAS_DEV_WRITE, buf, 3 );
     i2c_end();
     return ret;
 }
 
-int mas_codec_writereg(int reg, unsigned int val)
+/* note: 'len' is number of 20 bit words, not number of bytes! */
+int mas_readmem(int bank, int addr, unsigned long* dest, int len)
 {
-    int ret = 0;
-    unsigned char buf[5];
-
-    i2c_begin();
+  int ret;
+  unsigned char buf[7];
 
-    buf[0] = MAS_CODEC_WRITE;
-    buf[1] = (reg >> 8) & 0xff;
-    buf[2] = reg & 0xff;
-    buf[3] = (val >> 8) & 0xff;
-    buf[4] = val & 0xff;
-
-    /* send write command */
-    if (i2c_write(MAS_DEV_WRITE,buf,5))
-    {
-        ret = -1;
-    }
+  buf[0] = MAS_DATA_WRITE;
+  buf[1] = bank?MAS_CMD_READ_D1_MEM:MAS_CMD_READ_D0_MEM;
+  buf[2] = 0x00;
+  buf[3] = (len & 0xff00) >> 8;
+  buf[4] = len & 0xff;
+  buf[5] = (addr & 0xff00) >> 8;
+  buf[6] = addr & 0xff;
     
+  i2c_begin();
+  ret = i2c_write( MAS_DEV_WRITE, buf,7 );
+  if( ret == 0 )
+     ret = mas_read( MAS_DATA_READ, dest, len );
     i2c_end();
     return ret;
 }
 
-int mas_codec_readreg(int reg)
+/* note: 'len' is number of 20 bit words, not number of bytes! */
+int mas_writemem(int bank, int addr, unsigned long* src, int len)
 {
-    int ret = 0;
-    unsigned char buf[16];
-    unsigned char tmp[2];
-
-    i2c_begin();
+  int ret;
+  int i, j;
+  unsigned char buf[60];
 
-    buf[0] = MAS_CODEC_WRITE;
-    buf[1] = (reg >> 8) & 0xff;
-    buf[2] = reg & 0xff;
-
-    /* send read command */
-    if (i2c_write(MAS_DEV_WRITE,buf,3))
-    {
-        ret = -1;
-    }
-    else
-    {
-        i2c_start();
-        i2c_outb(MAS_DEV_WRITE);
-        if (i2c_getack()) {
-            i2c_outb(MAS_CODEC_READ);
-            if (i2c_getack()) {
-                i2c_start();
-                i2c_outb(MAS_DEV_READ);
-                if (i2c_getack()) {
-                    tmp[0] = i2c_inb(0);
-                    tmp[1] = i2c_inb(1); /* NAK the last byte */
-                    ret = (tmp[0] << 8) | tmp[1];
-                }
-                else
-                    ret = -4;
-            }
-            else
-                ret = -3;
-        }
-        else
-            ret = -2;
+  buf[0] = MAS_DATA_WRITE;
+  buf[1] = bank?MAS_CMD_WRITE_D1_MEM:MAS_CMD_WRITE_D0_MEM;
+  buf[2] = 0x00;
+  buf[3] = (len & 0xff00) >> 8;
+  buf[4] = len & 0xff;
+  buf[5] = (addr & 0xff00) >> 8;
+  buf[6] = addr & 0xff;
 
-        i2c_stop();
+  i = 7;
+  for( j=0; j< len; j++ ) {
+    buf[i++] = (src[j] & 0xff00) >> 8;
+    buf[i++] = src[j] & 0xff;
+    buf[i++] = 0x00;
+    buf[i++] = (src[j] & 0x0f0000) >> 16;	
     }
     
+  i2c_begin();
+  ret = i2c_write(MAS_DEV_WRITE,buf,i);
     i2c_end();
     return ret;
 }
 
-unsigned long mas_readver(void)
+int mas_readreg(int reg, unsigned long* dest)
 {
-    int ret = 0;
-    unsigned char buf[16];
-    unsigned long value;
+  int ret;
+  unsigned char buf[3];
+  
+  buf[0] = MAS_DATA_WRITE;
+  buf[1] = MAS_CMD_READ_REG | (reg >> 4);
+  buf[2] = (reg & 0x0f) << 4;
 
     i2c_begin();
+  ret = i2c_write(MAS_DEV_WRITE,buf,3);
+  if(!ret)
+    ret = mas_read(MAS_DATA_READ, dest, 1);
+  i2c_end();
+  return ret;
+}
 
-    buf[0] = MAS_DATA_WRITE;
-    buf[1] = MAS_CMD_READ_IC_VER;
-    buf[2] = 0;
+int mas_writereg(int reg, unsigned long val)
+{
+  int ret;
+  unsigned char buf[5];
 
-    /* send read command */
-    if (i2c_write(MAS_DEV_WRITE,buf,3))
-    {
-        ret = -1;
-    }
-    else
-    {
-        if(mas_devread(&value, 1))
-        {
-            ret = -2;
-        }
-        else
-        {
-            ret = value;
-        }
-    }
+  buf[0] = MAS_DATA_WRITE;
+  buf[1] = MAS_CMD_WRITE_REG | (reg >> 4);
+  buf[2] = ((reg & 0x0f) << 4) | (val & 0x0f);
+  buf[3] = (val >> 12) & 0xff;
+  buf[4] = (val >> 4) & 0xff;
 
+  i2c_begin();
+  ret = i2c_write(MAS_DEV_WRITE,buf,5);
     i2c_end();
     return ret;
 }
 
-#endif
Only in /home/dast/src/rockbox/firmware/drivers: power.c
diff -rubBP /home/dast/src/rockbox/firmware/drivers/remote.c ./firmware/drivers/remote.c
--- /home/dast/src/rockbox/firmware/drivers/remote.c	Thu Jan  1 01:00:00 1970
+++ ./firmware/drivers/remote.c	Tue Dec  2 22:00:24 2003
@@ -0,0 +1,285 @@
+#include <stdbool.h>
+#include "system.h"
+#include "debug.h"
+#include "kernel.h"
+#include "remote.h"
+#include "button.h"
+
+#define IR_POWER            0x2F538C7
+#define IR_SETTING          0x2F5708F
+#define IR_REWIND           0x2F5807F
+#define IR_FFORWARD         0x2F5C03F
+#define IR_PLAY             0x2F540BF
+#define IR_VOLUP            0x2F59867
+#define IR_VOLDN            0x2F5A05F
+#define IR_BROWSE           0x2F548B7
+#define IR_EQ               0x2F57887
+#define IR_MUTE             0x2F5F00F
+#define IR_PROGRAM          0x2F558A7
+#define IR_STOP             0x2F5609F
+#define IR_NONE             0x0
+
+#define NUM_TICKS_BEFORE_STABLE 2
+
+#define REPEAT_MAX  HZ/2    //half a second for a repeat value
+
+/* how long until repeat kicks in */
+#define REPEAT_START      10
+
+/* the speed repeat starts at */
+#define REPEAT_INTERVAL_START   4
+
+/* speed repeat finishes at */
+#define REPEAT_INTERVAL_FINISH  2
+
+#define START_LOW   0x2000
+#define STOP_LOW    0xDF00
+
+#define ONE_JITTER  0x100
+#define ONE_LEVEL   0xC30
+#define ONE_LOW     ONE_LEVEL-ONE_JITTER
+#define ONE_HIGH    ONE_LEVEL+ONE_JITTER
+
+#define ZERO_JITTER 0x30
+#define ZERO_LEVEL  0x600
+#define ZERO_LOW    ZERO_LEVEL-ZERO_JITTER
+#define ZERO_HIGH   ZERO_LEVEL+ZERO_JITTER
+
+unsigned int count=0;
+bool start=false;
+unsigned int counts[40];
+unsigned int repeats=0;
+unsigned int last_button;
+
+// remote_queue is not used
+// ir button are dropped in button_queue
+//struct event_queue remote_queue;
+
+#pragma interrupt
+void IRQ1(void) {
+    if (count<40)
+        counts[count++]=TCNT1;   //store counter value
+#ifdef DEBUG
+    else
+        DEBUGF("Overflow!\n");
+#endif
+}
+
+#pragma interrupt
+void OVI1(void) {
+    TSR1&=0xFB;     //reset overflow
+    TSTR|=0x2;      //restart timer
+}
+
+static void post_button(unsigned int button,bool repeat,bool release) {
+    unsigned int message=IR_BUTTON_NONE;
+    switch(button) {
+        case IR_POWER:
+            message=IR_BUTTON_POWER;
+            break;
+        case IR_SETTING:
+            message=IR_BUTTON_SETTING;
+            break;
+        case IR_REWIND:
+            message=IR_BUTTON_REWIND;
+            break;
+        case IR_FFORWARD:
+            message=IR_BUTTON_FFORWARD;
+            break;
+        case IR_PLAY:
+            message=IR_BUTTON_PLAY;
+            break;
+        case IR_VOLUP:
+            message=IR_BUTTON_VOLUP;
+            break;
+        case IR_VOLDN:
+            message=IR_BUTTON_VOLDN;
+            break;
+        case IR_BROWSE:
+            message=IR_BUTTON_BROWSE;
+            break;
+        case IR_EQ:
+            message=IR_BUTTON_EQ;
+            break;
+        case IR_MUTE:
+            message=IR_BUTTON_MUTE;
+            break;
+        case IR_PROGRAM:
+            message=IR_BUTTON_PROGRAM;
+            break;
+        case IR_STOP:
+            message=IR_BUTTON_STOP;
+            break;
+        case IR_NONE:
+            message=IR_BUTTON_NONE;
+            break;
+    }
+    if (repeat)
+        message|=IR_BUTTON_REPEAT;
+    if (release)
+        message|=BUTTON_REL;
+    DEBUGF("%s Message Posted\n",repeat?"Repeat":"New Press");
+    button_add(message|BUTTON_IR);
+//    queue_post(&remote_queue, message, NULL);    
+}
+
+void remote_tick(void) {
+    static unsigned int tick=0;
+    static unsigned int last_count=0;
+    static unsigned int last_tick=0;
+    static int repeat_speed = REPEAT_INTERVAL_START;
+    static int repeat_count = 0;
+    static bool repeat=false;
+    static bool sent_button=false;
+    static bool looking_for_repeat=false;
+    
+    ++tick;
+
+    if (sent_button) {
+        while (last_tick>tick) { //rollover
+            last_tick++;
+            tick++;   //increment both until last_tick rolls over
+        }
+        if (tick>last_tick+REPEAT_MAX) {
+//            DEBUGF("No more IR repeats\n");
+            post_button(last_button,false,true);
+            last_button=IR_NONE;
+            sent_button=false;
+            looking_for_repeat=false;
+        }
+    }
+    if (count!=last_count) {
+        last_tick=tick;
+        last_count=count;
+    } else {
+        if (count>0) {
+            while (last_tick>tick) { //rollover
+                last_tick++;
+                tick++;   //increment both until last_tick rolls over
+            }
+        }
+        if (count>0 && tick>last_tick+NUM_TICKS_BEFORE_STABLE) {
+            if (count<30 && !looking_for_repeat) {
+                count=0; //noise
+                return;
+            }
+            unsigned int i;
+            unsigned int spans[40];
+            unsigned int number=0;
+            unsigned int bits_seen=0;
+            for (i=0;i<count;++i) {
+                if (i==0)
+                    spans[i]=counts[i];
+                else {
+                    if (counts[i]>counts[i-1])
+                        spans[i]=counts[i]-counts[i-1];
+                    else
+                        spans[i]=0x0FFFF-counts[i-1]+counts[i];
+                }
+                if (spans[i]>STOP_LOW) {
+                    if (bits_seen==32) {
+                        post_button(number,false,false);
+                        looking_for_repeat=true;
+                        sent_button=true;
+                        last_button=number;
+                    }
+                    bits_seen=0;
+                    number=0;
+                } else if (spans[i]>START_LOW) {
+                    if (count<30) { //if start seen with nothing else, repeat
+                        if (repeat) {
+                            repeats--;
+                            if (repeats==0) {
+                                post_button(last_button,true,false);
+                                looking_for_repeat=true;
+                                repeat_speed--;
+                                if (repeat_speed < REPEAT_INTERVAL_FINISH)
+                                    repeat_speed = REPEAT_INTERVAL_FINISH;
+                                repeats = repeat_speed;
+                            }
+                        } else {
+                            if (repeats++>REPEAT_START) {
+                                post_button(last_button,true,false);
+                                sent_button=true;
+                                repeat=true;
+                                repeat_count=0;
+                                repeats=REPEAT_INTERVAL_START;
+                            }
+                        }
+                    } else {
+                        number=0;
+                        bits_seen=0;
+                    }
+                } else if (spans[i]>=ONE_LOW && spans[i]<=ONE_HIGH) {
+                    bits_seen++;
+                    number=(number<<1)|0x1;
+                } else if (spans[i]>=ZERO_LOW && spans[i]<=ZERO_HIGH) {
+                    bits_seen++;
+                    number<<=1;
+                }
+            }
+            if (bits_seen==32) {
+                post_button(number,false,false);
+                looking_for_repeat=true;
+                sent_button=true;
+                last_button=number;
+                bits_seen=0;
+                number=0;
+            }
+            count=last_count=0;            
+        }
+    }
+}
+
+/*int remote_get(bool block)
+{
+    struct event ev;
+
+    if ( block || !queue_empty(&remote_queue) ) {
+        queue_wait(&remote_queue, &ev);
+        return ev.id;
+    }
+    return IR_BUTTON_NONE;
+}*/
+
+void remote_init(void) {
+    //IRQ1 on falling edge
+    ICR|=0x40;
+
+    //PA13 to IRQ1
+    PACR1&=0xF3FF;
+    PACR1|=0x0400;
+
+    //Set Interrupt Priority = 9
+    IPRA&=0xF0FF;
+    IPRA|=0x0900;
+
+    //No Timer Sync
+    TSNC&=0xFD;
+
+    //Channel 1 to Normal
+    TMDR&=0xFD;
+
+    //Internal clock/8
+    //count rising edges
+    //don't clear
+    TCR1=0x3;
+
+    //description here :)
+    TIOR1=0x88;
+
+    //Enable IRQ overflow
+    //Disable IMFB & IMFA
+    TIER1=0xFC;
+
+    //ITU Priority = 6
+    IPRC&=0xFFF0;
+    IPRC|=0x0006;
+
+    //Start Timer 1
+    TSTR|=0x2;
+
+//    queue_init(&remote_queue);
+    tick_add_task(remote_tick);    
+}    
+    
Only in /home/dast/src/rockbox/firmware/drivers: rtc.c
Only in /home/dast/src/rockbox/firmware/drivers: serial.c
Only in /home/dast/src/rockbox/firmware/export: CVS
Only in /home/dast/src/rockbox/firmware/export: adc.h
diff -rubBP /home/dast/src/rockbox/firmware/export/ata.h ./firmware/export/ata.h
--- /home/dast/src/rockbox/firmware/export/ata.h	Tue May 13 11:29:04 2003
+++ ./firmware/export/ata.h	Wed Oct 29 15:12:26 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: ata.h,v 1.2 2003/05/10 01:55:22 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef __ATA_H__
 #define __ATA_H__
 
@@ -32,6 +14,14 @@
    254    Reserved
    255    21 min 15 s
 */
+typedef union {
+    struct {
+        unsigned long low;
+        unsigned long high;
+    } ata_sectors_s;
+    unsigned long sector;
+} ata_sectors_t;
+
 extern void ata_enable(bool on);
 extern void ata_spindown(int seconds);
 extern void ata_poweroff(bool enable);
@@ -41,9 +31,9 @@
 extern int ata_hard_reset(void);
 extern int ata_soft_reset(void);
 extern int ata_init(void);
-extern int ata_read_sectors(unsigned long start, int count, void* buf);
-extern int ata_write_sectors(unsigned long start, int count, void* buf);
-extern void ata_delayed_write(unsigned long sector, void* buf);
+extern int ata_read_sectors(ata_sectors_t *start, int count, void* buf);
+extern int ata_write_sectors(ata_sectors_t *start, int count, void* buf);
+extern void ata_delayed_write(ata_sectors_t *sector, void* buf);
 extern void ata_flush(void);
 extern void ata_spin(void);
 extern unsigned short* ata_get_identify(void);
Only in /home/dast/src/rockbox/firmware/export: backlight.h
diff -rubBP /home/dast/src/rockbox/firmware/export/buffer.h ./firmware/export/buffer.h
--- /home/dast/src/rockbox/firmware/export/buffer.h	Mon Oct 27 08:05:46 2003
+++ ./firmware/export/buffer.h	Wed Oct 29 15:12:26 2003
@@ -1,30 +1,8 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: buffer.h,v 1.2 2003/10/14 10:18:22 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef BUFFER_H
 #define BUFFER_H
 
 /* defined in linker script */
-#ifdef SIMULATOR
-extern unsigned char *mp3end;
-#else
 extern unsigned char mp3end[];
-#endif
 
 extern unsigned char *mp3buf;
 
diff -rubBP /home/dast/src/rockbox/firmware/export/button.h ./firmware/export/button.h
--- /home/dast/src/rockbox/firmware/export/button.h	Fri Apr 25 14:52:54 2003
+++ ./firmware/export/button.h	Sun Nov 30 19:36:10 2003
@@ -1,22 +1,3 @@
-
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: button.h,v 1.2 2003/04/23 09:21:37 zagor Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _BUTTON_H_
 #define _BUTTON_H_
 
@@ -28,45 +9,32 @@
 
 void button_init (void);
 int button_get (bool block);
+int button_get_flt( bool block, int btns, int ir_btns, int flags);
+int button_add(unsigned int button);
+void button_found_mStation(void);
 int button_get_w_tmo(int ticks);
+int button_get_w_tmo_flt(int ticks, int btns, int ir_btns, int flags );
 
 /* Shared button codes */
 #define	BUTTON_NONE		0x0000
-#define	BUTTON_ON		0x0001
-#define	BUTTON_UP		0x0010
-#define	BUTTON_DOWN		0x0020
-#define	BUTTON_LEFT		0x0040
-#define	BUTTON_RIGHT		0x0080
+#define	BUTTON_UP		0x0080
+#define	BUTTON_DOWN		0x0010
+#define	BUTTON_LEFT		0x0001
+#define	BUTTON_RIGHT		0x0002
+
+#define BUTTON_SELECT           0x0040
+#define BUTTON_PROGRAM          0x0020
+#define	BUTTON_MENU		0x0004
+#define	BUTTON_PLAY		0x0008
+#define	BUTTON_STOP		0x0100
 
-/* Button modifiers */
-#define	BUTTON_REMOTE		0x2000
+#define BUTTON_IR               0x2000
 #define	BUTTON_REPEAT		0x4000
 #define	BUTTON_REL		0x8000
 
-/* remote control buttons */
-#define BUTTON_RC_VOL_UP        (0x0008 | BUTTON_REMOTE)
-#define BUTTON_RC_VOL_DOWN      (0x0800 | BUTTON_REMOTE)
-#define BUTTON_RC_PLAY          (BUTTON_UP | BUTTON_REMOTE)
-#define BUTTON_RC_STOP          (BUTTON_DOWN | BUTTON_REMOTE)
-#define BUTTON_RC_LEFT          (BUTTON_LEFT | BUTTON_REMOTE)
-#define BUTTON_RC_RIGHT         (BUTTON_RIGHT| BUTTON_REMOTE)
-
-#ifdef HAVE_RECORDER_KEYPAD
-
-/* Recorder specific button codes */
-#define	BUTTON_OFF		0x0002
-#define	BUTTON_PLAY		0x0004
-#define	BUTTON_F1		0x0100
-#define	BUTTON_F2		0x0200
-#define	BUTTON_F3		0x0400
-
-#elif HAVE_PLAYER_KEYPAD
-
-/* Jukebox 6000 and Studio specific button codes */
-#define	BUTTON_MENU		0x0002
-#define	BUTTON_PLAY		BUTTON_UP
-#define	BUTTON_STOP		BUTTON_DOWN
-
-#endif /* HAVE_PLAYER_KEYPAD */
+#define BUTTON_FLAG_MASK	0xF000
+#define BUTTON_MASK		0x0FFF
+#define BUTTON_ALL		BUTTON_MASK
+#define BUTTON_ALL_FLAGS	BUTTON_FLAG_MASK
 
 #endif
Only in /home/dast/src/rockbox/firmware/export: config-fmrecorder.h
Only in /home/dast/src/rockbox/firmware/export: config-player.h
Only in /home/dast/src/rockbox/firmware/export: config-recorder.h
Only in /home/dast/src/rockbox/firmware/export: config-recorderv2.h
diff -rubBP /home/dast/src/rockbox/firmware/export/config.h ./firmware/export/config.h
--- /home/dast/src/rockbox/firmware/export/config.h	Thu Dec  4 16:35:39 2003
+++ ./firmware/export/config.h	Tue Dec  2 22:00:25 2003
@@ -1,35 +1,16 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: config.h,v 1.4 2003/11/27 21:23:48 bagder Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __CONFIG_H__
 #define __CONFIG_H__
 
-#if defined(ARCHOS_PLAYER)
-#include "config-player.h"
-#elif defined(ARCHOS_RECORDER)
-#include "config-recorder.h"
-#elif defined(ARCHOS_FMRECORDER)
-#include "config-fmrecorder.h"
-#elif defined(ARCHOS_RECORDERV2)
-#include "config-recorderv2.h"
-#else
-/* no known platform */
-#endif
+/* Define this to the CPU frequency */
+#define CPU_FREQ 11059200
+
+/* Length of a cpu cycle */
+#define CPU_CYCLE_MS 0.00009
+#define CPU_CYCLE_US 0.09
+#define CPU_CYCLE_NS 90
+
+/* Define this if you must discharge the data line by driving it low
+   and then set it to input to see if it stays low or goes high */
+//#define HAVE_I2C_LOW_FIRST
 
 #endif
diff -rubBP /home/dast/src/rockbox/firmware/export/debug.h ./firmware/export/debug.h
--- /home/dast/src/rockbox/firmware/export/debug.h	Fri Feb  7 10:41:57 2003
+++ ./firmware/export/debug.h	Wed Oct 29 15:12:26 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: debug.h,v 1.1 2003/02/07 09:41:57 bagder Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef DEBUG_H
 #define DEBUG_H
 
diff -rubBP /home/dast/src/rockbox/firmware/export/disk.h ./firmware/export/disk.h
--- /home/dast/src/rockbox/firmware/export/disk.h	Fri Feb  7 11:15:43 2003
+++ ./firmware/export/disk.h	Wed Oct 29 15:12:26 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: disk.h,v 1.2 2003/02/07 10:07:48 bagder Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _DISK_H_
 #define _DISK_H_
 
diff -rubBP /home/dast/src/rockbox/firmware/export/fat.h ./firmware/export/fat.h
--- /home/dast/src/rockbox/firmware/export/fat.h	Fri Aug 29 13:50:01 2003
+++ ./firmware/export/fat.h	Wed Oct 29 15:12:26 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: fat.h,v 1.2 2003/06/03 18:04:22 hardeeps Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef FAT_H
 #define FAT_H
 
@@ -52,7 +33,7 @@
     int lastcluster;     /* cluster of last access */
     int lastsector;      /* sector of last access */
     int clusternum;      /* current clusternum */
-    int sectornum;       /* sector number in this cluster */
+    unsigned int sectornum;       /* sector number in this cluster */
     unsigned int direntry;   /* short dir entry index from start of dir */
     unsigned int direntries; /* number of dir entries used by this file */
     unsigned int dircluster; /* first cluster of dir */
@@ -63,17 +44,17 @@
 {
     unsigned int entry;
     unsigned int entrycount;
-    int sector;
+    unsigned int sector;
     struct fat_file file;
     unsigned char sectorcache[3][SECTOR_SIZE];
 };
 
 
 extern int fat_mount(int startsector);
+extern int fat_mount_backup(int startsector);
 extern void fat_size(unsigned int* size, unsigned int* free);
 extern void fat_recalc_free(void);
 
-extern int fat_create_dir(unsigned int currdir, char *name);
 extern int fat_startsector(void);
 extern int fat_open(unsigned int cluster,
                     struct fat_file* ent,
@@ -81,9 +62,12 @@
 extern int fat_create_file(char* name, 
                            struct fat_file* ent,
                            struct fat_dir* dir);
+extern int fat_create_dir(char* name, 
+                          struct fat_file* ent,
+                          struct fat_dir* dir);
 extern int fat_readwrite(struct fat_file *ent, int sectorcount, 
                          void* buf, bool write );
-extern int fat_closewrite(struct fat_file *ent, int size, int attr);
+extern int fat_closewrite(struct fat_file *ent, int size, int attr,bool bdir);
 extern int fat_seek(struct fat_file *ent, unsigned int sector );
 extern int fat_remove(struct fat_file *ent);
 extern int fat_truncate(struct fat_file *ent);
Only in /home/dast/src/rockbox/firmware/export: fmradio.h
Only in /home/dast/src/rockbox/firmware/export: font.h
Only in /home/dast/src/rockbox/firmware/export: hwcompat.h
diff -rubBP /home/dast/src/rockbox/firmware/export/i2c.h ./firmware/export/i2c.h
--- /home/dast/src/rockbox/firmware/export/i2c.h	Fri Feb  7 11:07:49 2003
+++ ./firmware/export/i2c.h	Tue Dec  2 22:00:25 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: i2c.h,v 1.1 2003/02/07 10:07:49 bagder Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef I2C_H
 #define I2C_H
 
@@ -24,12 +6,9 @@
 extern void i2c_end(void);
 extern int i2c_write(int device, unsigned char* buf, int count );
 extern int i2c_read(int device, unsigned char* buf, int count );
-extern int i2c_readmem(int device, int address, unsigned char* buf, int count );
-extern void i2c_outb(unsigned char byte);
-extern unsigned char i2c_inb(int ack);
+extern int i2c_outb(unsigned char byte);
+extern unsigned char i2c_inb(bool ack);
 extern void i2c_start(void);
 extern void i2c_stop(void);
-extern void i2c_ack(int bit);
-extern int i2c_getack(void);
 
 #endif
diff -rubBP /home/dast/src/rockbox/firmware/export/id3.h ./firmware/export/id3.h
--- /home/dast/src/rockbox/firmware/export/id3.h	Fri Aug 29 13:50:01 2003
+++ ./firmware/export/id3.h	Mon Nov 24 04:12:48 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: id3.h,v 1.4 2003/06/04 15:09:35 zagor Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef ID3_H
 #define ID3_H
 
@@ -75,5 +57,5 @@
 };
 
 bool mp3info(struct mp3entry *entry, char *filename);
-
+char* gets_id3_version( unsigned char ver );
 #endif
diff -rubBP /home/dast/src/rockbox/firmware/export/kernel.h ./firmware/export/kernel.h
--- /home/dast/src/rockbox/firmware/export/kernel.h	Fri Feb  7 10:41:57 2003
+++ ./firmware/export/kernel.h	Wed Oct 29 15:12:26 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: kernel.h,v 1.1 2003/02/07 09:41:57 bagder Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _KERNEL_H_
 #define _KERNEL_H_
 
@@ -33,11 +15,7 @@
 #define QUEUE_LENGTH_MASK (QUEUE_LENGTH - 1)
 
 /* System defined message ID's */
-#define SYS_USB_CONNECTED         -1
-#define SYS_USB_CONNECTED_ACK     -2
-#define SYS_USB_DISCONNECTED      -3
-#define SYS_USB_DISCONNECTED_ACK  -4
-#define SYS_TIMEOUT               -5
+#define SYS_TIMEOUT               -1
 
 struct event
 {
diff -rubBP /home/dast/src/rockbox/firmware/export/lcd-charset.h ./firmware/export/lcd-charset.h
--- /home/dast/src/rockbox/firmware/export/lcd-charset.h	Thu Jan  1 01:00:00 1970
+++ ./firmware/export/lcd-charset.h	Mon Nov 24 04:16:38 2003
@@ -0,0 +1,46 @@
+#define CGRAM0 0x00
+#define CGRAM1 0x01
+#define CGRAM2 0x02
+#define CGRAM3 0x03
+#define CGRAM4 0x04
+#define CGRAM5 0x05
+#define CGRAM6 0x06
+#define CGRAM7 0x07
+
+#define CGRAM0_CHAR 0x10
+#define CGRAM1_CHAR 0x11
+#define CGRAM2_CHAR 0x12
+#define CGRAM3_CHAR 0x13
+#define CGRAM4_CHAR 0x14
+#define CGRAM5_CHAR 0x15
+#define CGRAM6_CHAR 0x16
+#define CGRAM7_CHAR 0x17
+
+#define RESERVED_CHAR 0xff
+#define NOCHAR_OLD 0x24
+#define UNKNOWN_CHAR 0x3f
+
+#define LARROW_CHAR 0x1e
+#define RARROW_CHAR 0x1f
+#define FULLGRID_CHAR 0x7f
+
+#define BACKSLASH_LCD CGRAM0
+#define RARROW_LCD 0x7e
+#define LARROW_LCD 0x7f
+#define FULLGRID_LCD 0xff
+
+#define PROGRESS1_LCD CGRAM1
+#define PROGRESS2_LCD CGRAM2
+#define PROGRESS3_LCD CGRAM3
+#define PROGRESS4_LCD CGRAM4
+#define PROGRESS5_LCD FULLGRID_LCD
+
+#define PROGRESS1_CHAR CGRAM1_CHAR
+#define PROGRESS2_CHAR CGRAM2_CHAR
+#define PROGRESS3_CHAR CGRAM3_CHAR
+#define PROGRESS4_CHAR CGRAM4_CHAR
+#define PROGRESS5_CHAR FULLGRID_CHAR
+
+
+extern unsigned char latin1_to_lcd[256];
+
Only in /home/dast/src/rockbox/firmware/export: lcd-player-charset.h
diff -rubBP /home/dast/src/rockbox/firmware/export/lcd.h ./firmware/export/lcd.h
--- /home/dast/src/rockbox/firmware/export/lcd.h	Fri Aug 29 13:50:01 2003
+++ ./firmware/export/lcd.h	Sun Nov 30 18:55:27 2003
@@ -1,52 +1,40 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: lcd.h,v 1.6 2003/07/09 23:07:49 zagor Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __LCD_H__
 #define __LCD_H__
 
 #include <stdbool.h>
 #include "sh7034.h"
 #include "config.h"
+#include "lcd-charset.h"
 
 #define STYLE_DEFAULT 0
 #define STYLE_INVERT  1
 
-/* common functions */
+/* Special functions */
 extern void lcd_init(void);
+extern void lcd_write( bool command, unsigned char byte );
+//extern unsigned char lcd_read(bool busy);
+
+/* common functions */
 extern void lcd_clear_display(void);
-extern void lcd_backlight(bool on);
+void lcd_cursor(int x, int y);
 extern void lcd_puts(int x, int y, unsigned char *string);
-extern void lcd_puts_style(int x, int y, unsigned char *string, int style);
 extern void lcd_putc(int x, int y, unsigned short ch);
-
+extern int lcd_puts_fmt( int x, int y, const unsigned char* string, int flags );
+extern void lcd_cancel_scroll(void);
+extern int lcd_puts_nopad( int x, int y, const unsigned char* string );
 extern void lcd_puts_scroll(int x, int y, unsigned char* string );
 extern void lcd_puts_scroll_style(int x, int y, unsigned char* string,
                                   int style);
-extern void lcd_icon(int icon, bool enable);
 extern void lcd_stop_scroll(void);
 extern void lcd_scroll_speed( int speed );
 extern void lcd_scroll_delay( int ms );
-extern void lcd_set_contrast(int val);
-extern void lcd_write( bool command, int byte );
-extern int  lcd_default_contrast(void);
 
-#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP)
+/* CGRAM functions */
+void lcd_add_char(const char *character,unsigned int location);
+void lcd_save_cgram( char* buffer );
+void lcd_restore_cgram( const char* buffer );
+
+#if defined(SIMULATOR)
 extern void lcd_update(void);
 
 /* update a fraction of the screen */
@@ -60,87 +48,78 @@
 #include "sim_icons.h"
 #endif
 
-#ifdef HAVE_LCD_CHARCELLS
-
-/* Icon definitions for lcd_icon() */
-enum
-{
-    ICON_BATTERY = 0,
-    ICON_BATTERY_1,
-    ICON_BATTERY_2,
-    ICON_BATTERY_3,
-    ICON_USB,
-    ICON_PLAY,
-    ICON_RECORD,
-    ICON_PAUSE,
-    ICON_AUDIO,
-    ICON_REPEAT,
-    ICON_1,
-    ICON_VOLUME,
-    ICON_VOLUME_1,
-    ICON_VOLUME_2,
-    ICON_VOLUME_3,
-    ICON_VOLUME_4,
-    ICON_VOLUME_5,
-    ICON_PARAM
-};
-
-extern void lcd_define_hw_pattern (int which,char *pattern,int length);
-extern void lcd_define_pattern (int which,char *pattern);
-extern void lcd_double_height (bool on);
 #define JUMP_SCROLL_ALWAYS 5
 extern void lcd_jump_scroll (int mode); /* 0=off, 1=once, ..., ALWAYS */
 extern void lcd_jump_scroll_delay( int ms );
-unsigned char lcd_get_locked_pattern(void);
-void lcd_unlock_pattern(unsigned char pat);
 void lcd_allow_bidirectional_scrolling(bool on);
 extern void lcd_bidir_scroll(int threshold);
-void lcd_put_cursor(int x, int y, char cursor_char);
-void lcd_remove_cursor(void);
-#endif
 
-#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
-#if defined(HAVE_LCD_CHARCELLS) && defined(SIMULATOR)
-#define LCD_WIDTH       (4*11*6)  /* Display width in pixels */
-#define LCD_HEIGHT      (4*16+2*24) /* 4*char + 2*icons */
-#else
-#define LCD_WIDTH       112   /* Display width in pixels */
-#define LCD_HEIGHT      64    /* Display height in pixels */
-#endif
+//extern unsigned short *old_lcd_neo_to_xlcd;
 
-#define DRAW_PIXEL(x,y) lcd_framebuffer[(x)][(y)/8] |= (1<<((y)&7))
-#define CLEAR_PIXEL(x,y) lcd_framebuffer[(x)][(y)/8] &= ~(1<<((y)&7))
-#define INVERT_PIXEL(x,y) lcd_framebuffer[(x)][(y)/8] ^= (1<<((y)&7))
-
-/*
- * Memory copy of display bitmap
- */
-extern unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8];
-
-extern void lcd_setmargins(int xmargin, int ymargin);
-extern int  lcd_getxmargin(void);
-extern int  lcd_getymargin(void);
-extern void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny,
-			bool clear);
-extern void lcd_clearrect (int x, int y, int nx, int ny);
-extern void lcd_fillrect (int x, int y, int nx, int ny);
-extern void lcd_drawrect (int x, int y, int nx, int ny);
-extern void lcd_invertrect (int x, int y, int nx, int ny);
-extern void lcd_drawline( int x1, int y1, int x2, int y2 );
-extern void lcd_clearline( int x1, int y1, int x2, int y2 );
-extern void lcd_drawpixel(int x, int y);
-extern void lcd_clearpixel(int x, int y);
-extern void lcd_invertpixel(int x, int y);
-extern void lcd_roll(int pixels);
-extern void lcd_set_invert_display(bool yesno);
-extern void lcd_bidir_scroll(int threshold);
-extern void lcd_scroll_step(int pixels);
-extern void lcd_setfont(int font);
-extern void lcd_putsxy(int x, int y, unsigned char *string);
-extern int  lcd_getstringsize(unsigned char *str, int *w, int *h);
-extern int  lcd_getstringsize(unsigned char *str, int *w, int *h);
+extern void clearlcdbits(void);
+void lcd_pulsee(void);
+void mdelay(int t);
+
+#define LCD_DB4       0x01   //PBDR 0
+#define LCD_DB5       0x02   //PBDR 1
+#define LCD_DB6       0x04   //PBDR 2
+#define LCD_DB7       0x08   //PBDR 3
+
+#define LCD_RS        0x10   //PBDR 4
+#define LCD_RW        0x20   //PBDR 5
+#define LCD_E         0x40   //PBDR 6
+
+#define LCD_CONFIG    0x28
+#define LCD_ENTRYMODE 0x06
+
+//Cursor Control Instructions
+#define LCD_OFFCUR    0x0C
+#define LCD_LINECUR   0x0E
+#define LCD_BLINKCUR  0x0D
+#define LCD_COMBNCUR  0x0F
+#define LCD_HOMECUR   0x02
+#define LCD_SHLFCUR   0x10
+#define LCD_SHRTCUR   0x14
+
+//Display Control Instructions
+#define LCD_CLEAR     0x01
+#define LCD_OFFDISP   0x08
+#define LCD_ONDISP    0x0C
+#define LCD_SHLFDISP  0x18
+#define LCD_SHRTDISP  0x1C
+#define LCD_SET_CGRAM 0x40
+
+
+/* First 2 bits used for X positionning */
+#define FMT_LEFT        0
+#define FMT_CENTER      1
+#define FMT_RIGHT       2
+#define FMT_JUSTIFIED   3
+
+#define FMT_ALIGN_MASK	3
+
+#define FMT_LPADDED	4
+#define FMT_RPADDED     8
+
+
+/* NEO LCD INFO
+
+
+The lcd in the NCJ is connected to the cpu via i/o port B.
+This port contains 1 16 bit register PBDR and uses 16 R/W pins.
+PBDR -> pins and pins -> PBDR are controlled by a second register PBIOR
+
+The HD44780 lcd controler is wired using a 4 bit interface. 
 
-#endif /* CHARCELLS / BITMAP */
+Port-Pin	LCD-Pin
+PBDR0		DB4
+PBDR1		DB5
+PBDR2		DB6
+PBDR3		DB7
+PBDR4		RS
+PBDR5		RW
+PBDR6		E
 
+*/
 
 #endif /* __LCD_H__ */
Only in /home/dast/src/rockbox/firmware/export: led.h
diff -rubBP /home/dast/src/rockbox/firmware/export/mas.h ./firmware/export/mas.h
--- /home/dast/src/rockbox/firmware/export/mas.h	Fri Feb  7 11:07:49 2003
+++ ./firmware/export/mas.h	Fri Dec  5 01:14:00 2003
@@ -1,94 +1,78 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mas.h,v 1.1 2003/02/07 10:07:49 bagder Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _MAS_H_
 #define _MAS_H_
 
+/*
+ SH-1	MAS	DESCRIPTION
+
+ PA8	POR	Reset, Active Low
+ PB9	SID	Serial Input Data
+ PB12	SIC	Serial Input Clock
+ PB14	PI19	Demand pin
+*/
+
+#define PA8 0x0100
+#define PB9 0x0200
+#define PB12 0x1000
+#define PB14 0x4000
+
+#define MAS_DEMAND  (PBDR & 0x4000)
+
 #define MAS_BANK_D0 0
 #define MAS_BANK_D1 1
 
 #define MAX_PEAK 0x8000
 
-/*
-	MAS I2C	defs
-*/
-#ifdef HAVE_MAS3587F
-#define MAS_ADR         0x3c
-#define	MAS_DEV_WRITE   (MAS_ADR | 0x00)
-#define	MAS_DEV_READ    (MAS_ADR | 0x01)
-#else
+struct mas_version_info
+{
+  unsigned long name;
+  unsigned long code;
+  unsigned long date;
+  unsigned char description[16];
+};
+
+struct mas_status_data
+{
+  unsigned short framecount;
+  unsigned long mpeg_header;
+  unsigned short crc_error_count;
+  unsigned short anc_bits_count;
+};
+
+extern struct mas_version_info mas_version;
+
+// MAS I2C
+
 #define MAS_ADR         0x3a
-#define	MAS_DEV_WRITE   (MAS_ADR | 0x00)
-#define	MAS_DEV_READ    (MAS_ADR | 0x01)
-#endif
+#define	MAS_DEV_WRITE   0x3a
+#define	MAS_DEV_READ    0x3b
+
+// MAS Subaddresses
 
-/* registers..*/
-#ifdef HAVE_MAS3587F
-#define	MAS_DATA_WRITE  0x68
-#define MAS_DATA_READ   0x69
-#define	MAS_CODEC_WRITE  0x6c
-#define MAS_CODEC_READ   0x6d
-#define	MAS_CONTROL     0x6a
-#define	MAS_DCCF        0x76
-#define	MAS_DCFR        0x77
-#else
 #define	MAS_DATA_WRITE  0x68
 #define MAS_DATA_READ   0x69
 #define	MAS_CONTROL     0x6a
-#endif
 
-/*
- *	MAS register
- */
+// MAS register
+
+#define MAS_REG_SDI_INIT        0x3b
 #define	MAS_REG_DCCF            0x8e
 #define	MAS_REG_MUTE            0xaa
+#define	MAS_REG_LEFTCHANNEL     0xc5
+#define	MAS_REG_RIGHTCHANNEL    0xc6
 #define	MAS_REG_PIODATA         0xc8
-#define	MAS_REG_StartUpConfig   0xe6
+#define	MAS_REG_STARTUPCONFIG   0xe6
 #define	MAS_REG_KPRESCALE       0xe7
 #define	MAS_REG_KBASS           0x6b
 #define	MAS_REG_KTREBLE         0x6f
-#ifdef HAVE_MAS3587F
-#define MAS_REG_KMDB_SWITCH     0x21
-#define MAS_REG_KMDB_STR        0x22
-#define MAS_REG_KMDB_HAR        0x23
-#define MAS_REG_KMDB_FC         0x24
-#define MAS_REG_KLOUDNESS       0x1e
-#define MAS_REG_QPEAK_L         0x0a
-#define MAS_REG_QPEAK_R   	 0x0b
-#define MAS_REG_DQPEAK_L	 0x0c
-#define MAS_REG_DQPEAK_R        0x0d
-#define MAS_REG_KAVC            0x12
-#endif
 
-/*
- * MAS commands
- */
-#ifdef HAVE_MAS3587F
-#define MAS_CMD_READ_ANCILLARY  0x50
-#define MAS_CMD_FAST_PRG_DL     0x60
-#define MAS_CMD_READ_IC_VER     0x70
-#define MAS_CMD_READ_REG        0xa0
-#define MAS_CMD_WRITE_REG       0xb0
-#define MAS_CMD_READ_D0_MEM     0xc0
-#define MAS_CMD_READ_D1_MEM     0xd0
-#define MAS_CMD_WRITE_D0_MEM    0xe0
-#define MAS_CMD_WRITE_D1_MEM    0xf0
-#else
+// MAS Run Commands
+
+#define MAS_RUN_NORMAL		0x0001
+#define MAS_RUN_UPDATE_CONFIG   0x0475
+#define MAS_RUN_OVERRIDE_SU	0x0fcd
+
+// MAS commands
+  
 #define MAS_CMD_READ_ANCILLARY  0x30
 #define MAS_CMD_WRITE_REG       0x90
 #define MAS_CMD_WRITE_D0_MEM    0xa0
@@ -96,19 +80,25 @@
 #define MAS_CMD_READ_REG        0xd0
 #define MAS_CMD_READ_D0_MEM     0xe0
 #define MAS_CMD_READ_D1_MEM     0xf0
-#endif
 
-int mas_default_read(unsigned short *buf);
+// MAS Addresses
+
+#define MAS_ADD_NAME            0x0ff6
+#define MAS_ADD_CODE		0x0ff7
+#define MAS_ADD_DATE		0x0ff8
+#define MAS_ADD_DESCRIPTION	0x0ff9
+
+void mas_init(void);
 int mas_run(unsigned short address);
 int mas_readmem(int bank, int addr, unsigned long* dest, int len);
 int mas_writemem(int bank, int addr, unsigned long* src, int len);
-int mas_readreg(int reg);
-int mas_writereg(int reg, unsigned int val);
-void mas_reset(void);
-int mas_direct_config_read(unsigned char reg);
-int mas_direct_config_write(unsigned char reg, unsigned int val);
-int mas_codec_writereg(int reg, unsigned int val);
-int mas_codec_readreg(int reg);
-unsigned long mas_readver(void);
+int mas_readreg(int reg, unsigned long* dest);
+int mas_writereg(int reg, unsigned long val);
+int mas_default_read(unsigned short *dest);
+
+unsigned short mas_framecount(void);
+
+int mas_readreg_direct(unsigned char reg);
+int mas_writereg_direct(unsigned char reg, unsigned long val);
 
 #endif
diff -rubBP /home/dast/src/rockbox/firmware/export/mp3data.h ./firmware/export/mp3data.h
--- /home/dast/src/rockbox/firmware/export/mp3data.h	Wed Nov 19 07:34:43 2003
+++ ./firmware/export/mp3data.h	Wed Oct 29 15:12:26 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mp3data.h,v 1.5 2003/11/02 11:24:38 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef _MP3DATA_H_
 #define _MP3DATA_H_
 
@@ -56,8 +37,6 @@
 
 
 unsigned long find_next_frame(int fd, int *offset, int max_offset, unsigned long last_header);
-unsigned long mem_find_next_frame(int startpos, int *offset, int max_offset,
-                                  unsigned long last_header);
 int get_mp3file_info(int fd, struct mp3info *info);
 int count_mp3_frames(int fd, int startpos, int filesize,
                      void (*progressfunc)(int));
diff -rubBP /home/dast/src/rockbox/firmware/export/mpeg.h ./firmware/export/mpeg.h
--- /home/dast/src/rockbox/firmware/export/mpeg.h	Wed Nov 19 07:34:43 2003
+++ ./firmware/export/mpeg.h	Tue Dec  2 22:00:26 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mpeg.h,v 1.12 2003/11/02 11:24:38 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _MPEG_H_
 #define _MPEG_H_
 
@@ -59,15 +41,14 @@
         int lowest_watermark_level;
 };
 
-void mpeg_init(int volume, int bass, int treble, int balance,
-               int loudness, int bass_boost, int avc, int channel_config);
+void mpeg_init(int volume, int bass, int treble, int balance, int channel_config);
 void mpeg_play(int offset);
 void mpeg_stop(void);
 void mpeg_pause(void);
 void mpeg_resume(void);
 void mpeg_next(void);
 void mpeg_prev(void);
-void mpeg_ff_rewind(int newtime);
+void mpeg_ff_rewind(int change);
 void mpeg_flush_and_reload_tracks(void);
 void mpeg_sound_set(int setting, int value);
 int mpeg_sound_min(int setting);
@@ -81,15 +62,12 @@
 struct mp3entry* mpeg_current_track(void);
 bool mpeg_has_changed_track(void);
 int mpeg_status(void);
-#if defined(HAVE_MAS3587F) || defined(SIMULATOR)
+#if defined (SIMULATOR)
 void mpeg_set_pitch(int percent);
 void mpeg_init_recording(void);
 void mpeg_init_playback(void);
-void mpeg_record(char *filename);
-void mpeg_new_file(char *filename);
-void mpeg_set_recording_options(int frequency, int quality,
-                                int source, int channel_mode,
-                                bool editable);
+
+
 void mpeg_set_recording_gain(int left, int right, bool use_mic);
 unsigned long mpeg_recorded_time(void);
 unsigned long mpeg_num_recorded_bytes(void);
diff -rubBP /home/dast/src/rockbox/firmware/export/panic.h ./firmware/export/panic.h
--- /home/dast/src/rockbox/firmware/export/panic.h	Fri Feb  7 10:41:57 2003
+++ ./firmware/export/panic.h	Wed Oct 29 15:12:26 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: panic.h,v 1.1 2003/02/07 09:41:57 bagder Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __PANIC_H__
 #define __PANIC_H__
 
Only in /home/dast/src/rockbox/firmware/export: power.h
Only in /home/dast/src/rockbox/firmware/export: powermgmt.h
diff -rubBP /home/dast/src/rockbox/firmware/export/remote.h ./firmware/export/remote.h
--- /home/dast/src/rockbox/firmware/export/remote.h	Thu Jan  1 01:00:00 1970
+++ ./firmware/export/remote.h	Wed Oct 29 15:12:26 2003
@@ -0,0 +1,26 @@
+#ifndef _REMOTE_H_
+#define _REMOTE_H_
+
+#include <stdbool.h>
+#include "config.h"
+
+void remote_init(void);
+int remote_get(bool block);
+
+#define IR_BUTTON_POWER     0x0001
+#define IR_BUTTON_SETTING   0x0002
+#define IR_BUTTON_REWIND    0x0004
+#define IR_BUTTON_FFORWARD  0x0008
+#define IR_BUTTON_PLAY      0x0010
+#define IR_BUTTON_VOLUP     0x0020
+#define IR_BUTTON_VOLDN     0x0040
+#define IR_BUTTON_BROWSE    0x0080
+#define IR_BUTTON_EQ        0x0100
+#define IR_BUTTON_MUTE      0x0200
+#define IR_BUTTON_PROGRAM   0x0400
+#define IR_BUTTON_STOP      0x0800
+#define IR_BUTTON_NONE      0x0000
+
+#define IR_BUTTON_REPEAT    0x1000
+
+#endif
Only in /home/dast/src/rockbox/firmware/export: rolo.h
Only in /home/dast/src/rockbox/firmware/export: rtc.h
Only in /home/dast/src/rockbox/firmware/export: serial.h
diff -rubBP /home/dast/src/rockbox/firmware/export/sh7034.h ./firmware/export/sh7034.h
--- /home/dast/src/rockbox/firmware/export/sh7034.h	Wed Nov 19 07:34:43 2003
+++ ./firmware/export/sh7034.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: sh7034.h,v 1.2 2003/11/06 07:08:22 hohensoh Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __SH7034_H__
 #define __SH7034_H__
 
@@ -37,16 +18,16 @@
 #define SSR1_ADDR       0x05FFFECC
 #define RDR1_ADDR       0x05FFFECD
 
-#define ADDRAH_ADDR     0x05FFFEE0
-#define ADDRAL_ADDR     0x05FFFEE1
-#define ADDRBH_ADDR     0x05FFFEE2
-#define ADDRBL_ADDR     0x05FFFEE3
-#define ADDRCH_ADDR     0x05FFFEE4
-#define ADDRCL_ADDR     0x05FFFEE5
-#define ADDRDH_ADDR     0x05FFFEE6
-#define ADDRDL_ADDR     0x05FFFEE7
-#define ADCSR_ADDR      0x05FFFEE8
-#define ADCR_ADDR       0x05FFFEE9
+//#define ADDRAH_ADDR     0x05FFFEE0
+//#define ADDRAL_ADDR     0x05FFFEE1
+//#define ADDRBH_ADDR     0x05FFFEE2
+//#define ADDRBL_ADDR     0x05FFFEE3
+//#define ADDRCH_ADDR     0x05FFFEE4
+//#define ADDRCL_ADDR     0x05FFFEE5
+//#define ADDRDH_ADDR     0x05FFFEE6
+//#define ADDRDL_ADDR     0x05FFFEE7
+//#define ADCSR_ADDR      0x05FFFEE8
+//#define ADCR_ADDR       0x05FFFEE9
 
 #define TSTR_ADDR       0x05FFFF00
 #define TSNC_ADDR       0x05FFFF01
@@ -153,17 +134,6 @@
 			
 #define CASCR_ADDR      0x05FFFFEE
 
-/* byte halves of the ports */
-#define PADRH_ADDR      0x05FFFFC0
-#define PADRL_ADDR      0x05FFFFC1
-#define PBDRH_ADDR      0x05FFFFC2
-#define PBDRL_ADDR      0x05FFFFC3
-#define PAIORH_ADDR     0x05FFFFC4
-#define PAIORL_ADDR     0x05FFFFC5
-#define PBIORH_ADDR     0x05FFFFC6
-#define PBIORL_ADDR     0x05FFFFC7
-
-
 /* Port B data register bits */
 #define PBDR_LCD_SDA    0x0001 /* LCD serial data */
 #define PBDR_LCD_SCK    0x0002 /* LCD serial clock */
@@ -174,15 +144,15 @@
 #define PBDR_BTN_ON     0x0100 /* On button (active low) */
 
 /* A/D control/status register bits */
-#define ADCSR_CH     0x07   /* Channel/group select */
-#define ADCSR_CKS    0x08   /* Clock select */
-#define ADCSR_SCAN   0x10   /* Scan mode */
-#define ADCSR_ADST   0x20   /* A/D start */
-#define ADCSR_ADIE   0x40   /* A/D interrupt enable */
-#define ADCSR_ADF    0x80   /* A/D end flag */
+//#define ADCSR_CH     0x07   /* Channel/group select */
+//#define ADCSR_CKS    0x08   /* Clock select */
+//#define ADCSR_SCAN   0x10   /* Scan mode */
+//#define ADCSR_ADST   0x20   /* A/D start */
+//#define ADCSR_ADIE   0x40   /* A/D interrupt enable */
+//#define ADCSR_ADF    0x80   /* A/D end flag */
 
 /* A/D control register bits */
-#define ADCR_TRGE    0x80   /* Trigger enable */
+//#define ADCR_TRGE    0x80   /* Trigger enable */
 
 /* register macros for direct access: */
 
@@ -199,20 +169,20 @@
 #define SSR1       (*((volatile unsigned char*)SSR1_ADDR))   
 #define RDR1       (*((volatile unsigned char*)RDR1_ADDR))   
 
-#define ADDRA      (*((volatile unsigned short*)ADDRAH_ADDR)) /* combined */
-#define ADDRAH     (*((volatile unsigned char*)ADDRAH_ADDR)) 
-#define ADDRAL     (*((volatile unsigned char*)ADDRAL_ADDR)) 
-#define ADDRB      (*((volatile unsigned short*)ADDRBH_ADDR)) /* combined */
-#define ADDRBH     (*((volatile unsigned char*)ADDRBH_ADDR)) 
-#define ADDRBL     (*((volatile unsigned char*)ADDRBL_ADDR)) 
-#define ADDRC      (*((volatile unsigned short*)ADDRCH_ADDR)) /* combined */
-#define ADDRCH     (*((volatile unsigned char*)ADDRCH_ADDR)) 
-#define ADDRCL     (*((volatile unsigned char*)ADDRCL_ADDR)) 
-#define ADDRD      (*((volatile unsigned short*)ADDRDH_ADDR)) /* combined */
-#define ADDRDH     (*((volatile unsigned char*)ADDRDH_ADDR)) 
-#define ADDRDL     (*((volatile unsigned char*)ADDRDL_ADDR)) 
-#define ADCSR      (*((volatile unsigned char*)ADCSR_ADDR))  
-#define ADCR       (*((volatile unsigned char*)ADCR_ADDR))   
+//#define ADDRA      (*((volatile unsigned short*)ADDRAH_ADDR)) /* combined */
+//#define ADDRAH     (*((volatile unsigned char*)ADDRAH_ADDR)) 
+//#define ADDRAL     (*((volatile unsigned char*)ADDRAL_ADDR)) 
+//#define ADDRB      (*((volatile unsigned short*)ADDRBH_ADDR)) /* combined */
+//#define ADDRBH     (*((volatile unsigned char*)ADDRBH_ADDR)) 
+//#define ADDRBL     (*((volatile unsigned char*)ADDRBL_ADDR)) 
+//#define ADDRC      (*((volatile unsigned short*)ADDRCH_ADDR)) /* combined */
+//#define ADDRCH     (*((volatile unsigned char*)ADDRCH_ADDR)) 
+//#define ADDRCL     (*((volatile unsigned char*)ADDRCL_ADDR)) 
+//#define ADDRD      (*((volatile unsigned short*)ADDRDH_ADDR)) /* combined */
+//#define ADDRDH     (*((volatile unsigned char*)ADDRDH_ADDR)) 
+//#define ADDRDL     (*((volatile unsigned char*)ADDRDL_ADDR)) 
+//#define ADCSR      (*((volatile unsigned char*)ADCSR_ADDR))  
+//#define ADCR       (*((volatile unsigned char*)ADCR_ADDR))   
 
 #define TSTR       (*((volatile unsigned char*)TSTR_ADDR))   
 #define TSNC       (*((volatile unsigned char*)TSNC_ADDR))   
@@ -321,17 +291,6 @@
 
 #define CASCR      (*((volatile unsigned char*)CASCR_ADDR))  
 
-/* byte halves of the ports */
-#define PADRH      (*((volatile unsigned char*)PADRH_ADDR))  
-#define PADRL      (*((volatile unsigned char*)PADRL_ADDR))  
-#define PBDRH      (*((volatile unsigned char*)PBDRH_ADDR))  
-#define PBDRL      (*((volatile unsigned char*)PBDRL_ADDR))  
-#define PAIORH     (*((volatile unsigned char*)PAIORH_ADDR)) 
-#define PAIORL     (*((volatile unsigned char*)PAIORL_ADDR)) 
-#define PBIORH     (*((volatile unsigned char*)PBIORH_ADDR)) 
-#define PBIORL     (*((volatile unsigned char*)PBIORL_ADDR)) 
-
-
 /***************************************************************************
  * Register bit definitions
  **************************************************************************/
diff -rubBP /home/dast/src/rockbox/firmware/export/system.h ./firmware/export/system.h
--- /home/dast/src/rockbox/firmware/export/system.h	Wed Nov 19 07:34:43 2003
+++ ./firmware/export/system.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: system.h,v 1.2 2003/11/07 12:15:24 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __SYSTEM_H__
 #define __SYSTEM_H__
 
@@ -46,27 +27,135 @@
 #define nop \
   asm volatile ("nop")
 
-#define or_b(mask, address) \
+#define __set_mask_constant(mask,address) \
   asm                                     \
     ("or.b\t%0,@(r0,gbr)"                 \
      :                                    \
      : /* %0 */ "I"((char)(mask)),        \
        /* %1 */ "z"(address-GBR))
 
-#define and_b(mask, address) \
+#define __clear_mask_constant(mask,address) \
   asm                                       \
     ("and.b\t%0,@(r0,gbr)"                  \
      :                                      \
-     : /* %0 */ "I"((char)(mask)),         \
+     : /* %0 */ "I"((char)~(mask)),         \
        /* %1 */ "z"(address-GBR))
 
-#define xor_b(mask, address) \
+#define __toggle_mask_constant(mask,address) \
   asm                                        \
     ("xor.b\t%0,@(r0,gbr)"                   \
      :                                       \
      : /* %0 */ "I"((char)(mask)),           \
        /* %1 */ "z"(address-GBR))
 
+#define __test_mask_constant(mask,address)    \
+  ({                                          \
+    int result;                               \
+    asm                                       \
+      ("tst.b\t%1,@(r0,gbr)\n\tmovt\t%0"      \
+       : "=r"(result)                         \
+       : "I"((char)(mask)),"z"(address-GBR)); \
+    result;                                   \
+  })
+
+#define __set_bit_constant(bit,address) \
+  asm                                   \
+    ("or.b\t%0,@(r0,gbr)"               \
+     :                                  \
+     : /* %0 */ "I"((char)(1<<(bit))),  \
+       /* %1 */ "z"(address-GBR))
+
+#define __clear_bit_constant(bit,address) \
+  asm                                     \
+    ("and.b\t%0,@(r0,gbr)"                \
+     :                                    \
+     : /* %0 */ "I"((char)~(1<<(bit))),   \
+       /* %1 */ "z"(address-GBR))
+
+#define __toggle_bit_constant(bit,address) \
+  asm                                      \
+    ("xor.b\t%0,@(r0,gbr)"                 \
+     :                                     \
+     : /* %0 */ "I"((char)(1<<(bit))),     \
+       /* %1 */ "z"(address-GBR))
+
+#define __test_bit_constant(bit,address)      \
+  ({                                          \
+    int result;                               \
+    asm                                       \
+      ("tst.b\t%1,@(r0,gbr)\n\tmovt\t%0"      \
+       : "=r"(result)                         \
+       : "I"((char)(1<<(bit))),"z"(address-GBR)); \
+    result;                                   \
+  })
+
+#define __set_mask(mask,address)      /* FIXME */
+#define __test_mask(mask,address)   0 /* FIXME */
+#define __clear_mask(mask,address)    /* FIXME */
+#define __toggle_mask(mask,address)   /* FIXME */
+
+#define __set_bit(bit,address)      /* FIXME */
+#define __test_bit(bit,address)   0 /* FIXME */
+#define __clear_bit(bit,address)    /* FIXME */
+#define __toggle_bit(bit,address)   /* FIXME */
+
+#define set_mask(mask,address)          \
+  if (__builtin_constant_p (mask))      \
+    __set_mask_constant (mask,address); \
+  else                                  \
+    __set_mask (mask,address)
+
+#define clear_mask(mask,address)          \
+  if (__builtin_constant_p (mask))        \
+    __clear_mask_constant (mask,address); \
+  else                                    \
+    __clear_mask (mask,address)
+
+#define toggle_mask(mask,address)          \
+  if (__builtin_constant_p (mask))         \
+    __toggle_mask_constant (mask,address); \
+  else                                     \
+    __toggle_mask (mask,address)
+
+#define test_mask(mask,address)              \
+  (                                          \
+    (__builtin_constant_p (mask))            \
+  ? (int)__test_mask_constant (mask,address) \
+  : (int)__test_mask (mask,address)          \
+  )
+
+
+#define set_bit(bit,address)          \
+  if (__builtin_constant_p (bit))     \
+    __set_bit_constant (bit,address); \
+  else                                \
+    __set_bit (bit,address)
+
+#define clear_bit(bit,address)          \
+  if (__builtin_constant_p (bit))       \
+    __clear_bit_constant (bit,address); \
+  else                                  \
+    __clear_bit (bit,address)
+
+#define toggle_bit(bit,address)          \
+  if (__builtin_constant_p (bit))        \
+    __toggle_bit_constant (bit,address); \
+  else                                   \
+    __toggle_bit (bit,address)
+
+#define test_bit(bit,address)              \
+  (                                        \
+    (__builtin_constant_p (bit))           \
+  ? (int)__test_bit_constant (bit,address) \
+  : (int)__test_bit (bit,address)          \
+  )
+
+
+extern char __swap_bit[256];
+
+#define swap_bit(byte) \
+  __swap_bit[byte]
+
 #ifndef SIMULATOR
 
 static inline short SWAB16(short value)
diff -rubBP /home/dast/src/rockbox/firmware/export/thread.h ./firmware/export/thread.h
--- /home/dast/src/rockbox/firmware/export/thread.h	Sun Mar 16 22:36:48 2003
+++ ./firmware/export/thread.h	Wed Oct 29 15:12:27 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: thread.h,v 1.4 2003/03/12 15:30:56 zagor Exp $
- *
- * Copyright (C) 2002 by Ulf Ralberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef THREAD_H
 #define THREAD_H
 
Only in /home/dast/src/rockbox/firmware/export: usb.h
Only in /home/dast/src/rockbox/firmware: font.c
Only in /home/dast/src/rockbox/firmware: fonts
Only in /home/dast/src/rockbox/firmware: hwcompat.c
diff -rubBP /home/dast/src/rockbox/firmware/id3.c ./firmware/id3.c
--- /home/dast/src/rockbox/firmware/id3.c	Mon Oct 27 08:05:46 2003
+++ ./firmware/id3.c	Mon Nov 24 04:02:22 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: id3.c,v 1.81 2003/10/26 12:53:21 learman Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /*
  * Parts of this code has been stolen from the Ample project and was written
  * by David Härdeman. It has since been extended and enhanced pretty much by
@@ -147,28 +128,34 @@
 /* parse numeric value from string */
 static int parseyearnum( struct mp3entry* entry, char* tag, int bufferpos )
 {
+  char temp[8]={0};
+  if( entry->id3version >= ID3_VER_2_4) {
+    //yyyy-MM-ddTHH:mm:ss
+    strncpy(temp,tag, 4 );
+    entry->year = atoi( temp );
+  }
+  else
     entry->year = atoi( tag );
+  
     return bufferpos;
 }
 
-/* parse numeric genre from string, version 2.2 and 2.3 */
+/* parse numeric genre from string */
 static int parsegenre( struct mp3entry* entry, char* tag, int bufferpos )
 {
-    if(entry->id3version >= ID3_VER_2_4) {
-        /* In version 2.4 and up, there are no parentheses, and the genre frame
-           is a list of strings, either numbers or text. */
-
-        /* Is it a number? */
-        if(isdigit(tag[0])) {
-            entry->genre = atoi( tag );
-            entry->genre_string = 0;
+    if (entry->id3version >= ID3_VER_2_4) {
+        //in version 2.4 and up, there are no parentheses
+        //genre frame is a list of strings
+        if (isdigit(tag[0])) {
+            entry->genre = atoi(tag);
+            entry->genre_string=0;
             return tag - entry->id3v2buf;
         } else {
             entry->genre = 0xFF;
             return bufferpos;
         }
     } else {
-        if( tag[0] == '(' && tag[1] != '(' ) {
+        if( tag[0] == '(' && tag[ 1 ] != '(' ) {
             entry->genre = atoi( tag + 1 );
             entry->genre_string = 0;
             return tag - entry->id3v2buf;
@@ -189,6 +176,7 @@
     { "TAL",  3, offsetof(struct mp3entry, album), NULL },
     { "TRK",  3, offsetof(struct mp3entry, track_string), &parsetracknum },
     { "TRCK", 4, offsetof(struct mp3entry, track_string), &parsetracknum },
+    { "TDRC", 4, offsetof(struct mp3entry, year_string), &parseyearnum },
     { "TYER", 4, offsetof(struct mp3entry, year_string), &parseyearnum },
     { "TYE",  3, offsetof(struct mp3entry, year_string), &parseyearnum },
     { "TCON", 4, offsetof(struct mp3entry, genre_string), &parsegenre },
@@ -405,7 +393,6 @@
     entry->title = entry->artist = entry->album = NULL;
 
     global_flags = header[5];
-    
     /* Skip the extended header if it is present */
     if(version >= ID3_VER_2_4) {
         if(global_flags & 0x40) {
@@ -420,7 +407,7 @@
     }
 
     /* Is unsynchronization applied? */
-    if(global_flags & 0x80) {
+    if (global_flags & 0x80) {
         global_unsynch = true;
     }
     
@@ -465,14 +452,14 @@
             return;
 
         unsynch = false;
-        data_length_ind = 0;
+        data_length_ind=0;
 
         if(flags)
         {
             skip = 0;
             
-            if(flags & 0x0040) { /* Grouping identity */
-                lseek(fd, 1, SEEK_CUR); /* Skip 1 byte */
+            if(flags & 0x0040) {/* Grouping identity */
+                lseek(fd,1,SEEK_CUR); //skip 1 byte
                 framelen--;
             }
             
@@ -485,15 +472,15 @@
                 continue;
             }
 
-            if(flags & 0x0002) /* Unsynchronization */
+            if (flags & 0x0002) //Unsynchronization
                 unsynch = true;
 
             if(flags & 0x0001) { /* Data length indicator */
-                if(4 != read(fd, tmp, 4))
+                if (4 != read(fd,tmp,4))
                     return;
 
-                data_length_ind = UNSYNC(tmp[0], tmp[1], tmp[2], tmp[3]);
-                framelen -= 4;
+                data_length_ind=UNSYNC(tmp[0],tmp[1],tmp[2],tmp[3]);
+                framelen-=4;
             }
         }
         
@@ -538,8 +525,8 @@
                 size -= bytesread;
                 *ptag = buffer + bufferpos;
 
-                if(global_unsynch || unsynch)
-                    bytesread = unsynchronize(*ptag, bytesread);
+                if (global_unsynch || unsynch)
+                    bytesread=unsynchronize(*ptag,bytesread);
                 
                 unicode_munge( ptag, &bytesread );
                 tag = *ptag; 
@@ -679,6 +666,23 @@
     return filetime;
 }
 
+char* gets_id3_version( unsigned char ver )
+{
+  switch( ver ){
+  case ID3_VER_1_0:
+    return "1.0";
+  case ID3_VER_1_1:
+    return "1.1";
+  case ID3_VER_2_2:
+    return "2.2";
+  case ID3_VER_2_3:
+    return "2.3";
+  case ID3_VER_2_4:
+    return "2.4";
+  }
+  return 0;
+}
+
 /*
  * Checks all relevant information (such as ID3v1 tag, ID3v2 tag, length etc)
  * about an MP3 file and updates it's entry accordingly.
Only in /home/dast/src/rockbox/firmware/include: CVS
diff -rubBP /home/dast/src/rockbox/firmware/include/atoi.h ./firmware/include/atoi.h
--- /home/dast/src/rockbox/firmware/include/atoi.h	Fri Feb  7 11:13:23 2003
+++ ./firmware/include/atoi.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: atoi.h,v 1.1 2003/02/07 10:13:23 bagder Exp $
- *
- * Copyright (C) 2002 by Felix Arends
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __ATOI_H__ 
 #define __ATOI_H__ 
 
diff -rubBP /home/dast/src/rockbox/firmware/include/dac.h ./firmware/include/dac.h
--- /home/dast/src/rockbox/firmware/include/dac.h	Thu Jan  1 01:00:00 1970
+++ ./firmware/include/dac.h	Sun Nov 30 19:05:40 2003
@@ -0,0 +1,23 @@
+#ifndef _DAC_H_
+#define _DAC_H_
+
+#include "config.h"
+
+/*
+	DAC I2C	defs
+*/
+#define DAC_ADR         0x9a
+#define	DAC_DEV_WRITE   (DAC_ADR | 0x00)
+
+#define	DAC_REG_WRITE   0xc0
+
+/* registers..*/
+#define DAC_SR_REG 0x01
+#define DAC_AVOL   0x02
+#define DAC_GCFG   0x03
+
+extern int dac_volume(unsigned int left, unsigned int right, bool deemph);
+extern int dac_config(int value);
+extern void dac_init(void);
+
+#endif
diff -rubBP /home/dast/src/rockbox/firmware/include/dir.h ./firmware/include/dir.h
--- /home/dast/src/rockbox/firmware/include/dir.h	Sun Mar 16 22:36:48 2003
+++ ./firmware/include/dir.h	Wed Oct 29 15:12:27 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: dir.h,v 1.3 2003/02/26 21:38:01 adiamas Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _DIR_H_
 #define _DIR_H_
 
@@ -70,6 +52,7 @@
 
 #ifndef DIRFUNCTIONS_DEFINED
 
+extern int createdir(char *pathname);
 extern DIR* opendir(char* name);
 extern int closedir(DIR* dir);
 extern int mkdir(char* name);
diff -rubBP /home/dast/src/rockbox/firmware/include/file.h ./firmware/include/file.h
--- /home/dast/src/rockbox/firmware/include/file.h	Tue Dec  9 07:48:10 2003
+++ ./firmware/include/file.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: file.h,v 1.8 2003/12/09 06:48:10 bagder Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef _FILE_H_
 #define _FILE_H_
 
@@ -42,42 +23,8 @@
 #define O_TRUNC  0x10
 #endif
 
-#if !defined(__ssize_t_defined) && !defined(_SSIZE_T_) && !defined(ssize_t)
-#define __ssize_t_defined
-#define _SSIZE_T_
-#define ssize_t ssize_t
-typedef signed long ssize_t;
-#endif
-
-#if !defined(__off_t_defined) && !defined(_OFF_T_) && !defined(off_t)
-#define __off_t_defined
-#define _OFF_T_
-#define off_t off_t
-typedef signed long off_t;
-#endif
-
-#if !defined(__mode_t_defined) && !defined(_MODE_T_) && !defined(mode_t)
-#define __mode_t_defined
-#define _MODE_T_
-#define mode_t mode_t
-typedef unsigned int mode_t;
-#endif
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef unsigned int size_t;
-#endif
-
-typedef int (*open_func)(const char* pathname, int flags);
-typedef ssize_t (*read_func)(int fd, void *buf, size_t count);
-typedef int (*creat_func)(const char *pathname, mode_t mode);
-typedef ssize_t (*write_func)(int fd, const void *buf, size_t count);
-typedef void (*qsort_func)(void *base, size_t nmemb,  size_t size,
-                           int(*_compar)(const void *, const void *));
-
-
 #if defined(__MINGW32__) && defined(SIMULATOR)
-extern int open(const char*, int flags, ...);
+extern int open(const char*, int, ...);
 extern int close(int fd);
 extern int read(int, void*, unsigned int);
 extern long lseek(int, long, int);
@@ -91,13 +38,13 @@
 extern int open(const char* pathname, int flags);
 extern int close(int fd);
 extern int fsync(int fd);
-extern ssize_t read(int fd, void *buf, size_t count);
-extern off_t lseek(int fildes, off_t offset, int whence);
-extern int creat(const char *pathname, mode_t mode);
-extern ssize_t write(int fd, const void *buf, size_t count);
+extern int read(int fd, void* buf, int count);
+extern int lseek(int fd, int offset, int whence);
+extern int creat(const char *pathname, int mode);
+extern int write(int fd, void* buf, int count);
 extern int remove(const char* pathname);
 extern int rename(const char* path, const char* newname);
-extern int ftruncate(int fd, off_t length);
+extern int ftruncate(int fd, unsigned int size);
 extern int filesize(int fd);
 #endif /* SIMULATOR */
 #endif /* __MINGW32__ */
Only in /home/dast/src/rockbox/firmware/include: file.h.~1.7.~
diff -rubBP /home/dast/src/rockbox/firmware/include/sprintf.h ./firmware/include/sprintf.h
--- /home/dast/src/rockbox/firmware/include/sprintf.h	Sun Mar 16 22:36:48 2003
+++ ./firmware/include/sprintf.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: sprintf.h,v 1.2 2003/03/16 19:44:48 bagder Exp $
- *
- * Copyright (C) 2002 by Felix Arends
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef __SPRINTF_H__
 #define __SPRINTF_H__
 
Only in /home/dast/src/rockbox/firmware/include/sys: CVS
diff -rubBP /home/dast/src/rockbox/firmware/include/time.h ./firmware/include/time.h
--- /home/dast/src/rockbox/firmware/include/time.h	Mon Dec  8 17:02:37 2003
+++ ./firmware/include/time.h	Wed Oct 29 15:12:27 2003
@@ -1,12 +1,33 @@
 /*
  * time.h
  * 
- * Struct declaration for dealing with time.
+ * Struct and function declarations for dealing with time.
  */
 
 #ifndef _TIME_H_
 #define _TIME_H_
 
+#include "_ansi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef NULL
+#define	NULL	0
+#endif
+
+#ifndef _CLOCKS_PER_SEC_
+#define _CLOCKS_PER_SEC_ 1000
+#endif
+
+#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
+#define CLK_TCK CLOCKS_PER_SEC
+#define __need_size_t
+#include <stddef.h>
+
+#include <sys/types.h>
+
 struct tm
 {
   int	tm_sec;
@@ -20,5 +41,8 @@
   int	tm_isdst;
 };
 
+#ifdef __cplusplus
+}
+#endif
 #endif /* _TIME_H_ */
 
diff -rubBP /home/dast/src/rockbox/firmware/include/timefuncs.h ./firmware/include/timefuncs.h
--- /home/dast/src/rockbox/firmware/include/timefuncs.h	Fri Feb  7 11:13:23 2003
+++ ./firmware/include/timefuncs.h	Wed Oct 29 15:12:27 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: timefuncs.h,v 1.1 2003/02/07 10:13:23 bagder Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #ifndef _TIMEFUNCS_H_
 #define _TIMEFUNCS_H_
 
diff -rubBP /home/dast/src/rockbox/firmware/kernel.c ./firmware/kernel.c
--- /home/dast/src/rockbox/firmware/kernel.c	Sat Feb 15 00:30:35 2003
+++ ./firmware/kernel.c	Wed Oct 29 15:12:19 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: kernel.c,v 1.20 2003/02/14 09:44:33 zagor Exp $
- *
- * Copyright (C) 2002 by Björn Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdlib.h>
 #include <string.h>
 #include "kernel.h"
Only in /home/dast/src/rockbox/firmware/malloc: CVS
diff -rubBP /home/dast/src/rockbox/firmware/malloc/Makefile ./firmware/malloc/Makefile
--- /home/dast/src/rockbox/firmware/malloc/Makefile	Thu May 16 16:16:48 2002
+++ ./firmware/malloc/Makefile	Wed Oct 29 15:12:28 2003
@@ -1,20 +1,3 @@
-#             __________               __   ___.
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/
-# $Id: Makefile,v 1.2 2002/05/16 14:16:48 bagder Exp $
-#
-# Copyright (C) 2002 by Daniel Stenberg
-#
-# All files in this archive are subject to the GNU General Public License.
-# See the file COPYING in the source tree root for full license agreement.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-
 TARGET = libdmalloc.a
 
 LIBOBJS = dmalloc.o bmalloc.o bysize.o
diff -rubBP /home/dast/src/rockbox/firmware/malloc/bmalloc.c ./firmware/malloc/bmalloc.c
--- /home/dast/src/rockbox/firmware/malloc/bmalloc.c	Thu May 16 16:16:48 2002
+++ ./firmware/malloc/bmalloc.c	Wed Oct 29 15:12:28 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: bmalloc.c,v 1.3 2002/05/16 14:16:48 bagder Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 /*****************************************************************************
  *
  * Big (best-fit) Memory Allocation
diff -rubBP /home/dast/src/rockbox/firmware/malloc/bmalloc.h ./firmware/malloc/bmalloc.h
--- /home/dast/src/rockbox/firmware/malloc/bmalloc.h	Fri May 24 18:20:10 2002
+++ ./firmware/malloc/bmalloc.h	Wed Oct 29 15:12:28 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: bmalloc.h,v 1.2 2002/05/24 16:20:10 zagor Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _BMALLOC_H_
 #define _BMALLOC_H_
 
diff -rubBP /home/dast/src/rockbox/firmware/malloc/bysize.c ./firmware/malloc/bysize.c
--- /home/dast/src/rockbox/firmware/malloc/bysize.c	Thu May 16 16:16:48 2002
+++ ./firmware/malloc/bysize.c	Wed Oct 29 15:12:28 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: bysize.c,v 1.2 2002/05/16 14:16:48 bagder Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 /*****************************************************************************
  *
  * Size-sorted list/tree functions.
diff -rubBP /home/dast/src/rockbox/firmware/malloc/bysize.h ./firmware/malloc/bysize.h
--- /home/dast/src/rockbox/firmware/malloc/bysize.h	Thu May 16 16:16:48 2002
+++ ./firmware/malloc/bysize.h	Wed Oct 29 15:12:28 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: bysize.h,v 1.2 2002/05/16 14:16:48 bagder Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 void bmalloc_remove_chunksize(void *data);
 void bmalloc_insert_bysize(char *data, size_t size);
 char *bmalloc_obtainbysize( size_t size);
diff -rubBP /home/dast/src/rockbox/firmware/malloc/dmalloc.c ./firmware/malloc/dmalloc.c
--- /home/dast/src/rockbox/firmware/malloc/dmalloc.c	Mon Jan 27 16:33:50 2003
+++ ./firmware/malloc/dmalloc.c	Wed Oct 29 15:12:29 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: dmalloc.c,v 1.6 2003/01/24 10:52:13 matsl Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 /*****************************************************************************
  *
  * Dynamic small-blocks Memory Allocation
diff -rubBP /home/dast/src/rockbox/firmware/malloc/dmalloc.h ./firmware/malloc/dmalloc.h
--- /home/dast/src/rockbox/firmware/malloc/dmalloc.h	Fri May 24 18:20:10 2002
+++ ./firmware/malloc/dmalloc.h	Wed Oct 29 15:12:29 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: dmalloc.h,v 1.3 2002/05/24 16:20:10 zagor Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #ifndef _DMALLOC_H_
 #define _DMALLOC_H_
 
diff -rubBP /home/dast/src/rockbox/firmware/mp3data.c ./firmware/mp3data.c
--- /home/dast/src/rockbox/firmware/mp3data.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/mp3data.c	Wed Oct 29 15:12:19 2003
@@ -1,22 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mp3data.c,v 1.19 2003/11/02 11:24:38 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 /*
  * Parts of this code has been stolen from the Ample project and was written
  * by David Härdeman. It has since been extended and enhanced pretty much by
@@ -212,7 +193,7 @@
     return true;
 }
 
-static unsigned long __find_next_frame(int fd, int *offset, int max_offset, unsigned long last_header, int(*getfunc)(int fd, unsigned char *c))
+unsigned long find_next_frame(int fd, int *offset, int max_offset, unsigned long last_header)
 {
     unsigned long header=0;
     unsigned char tmp;
@@ -227,7 +208,7 @@
     /* Fill up header with first 24 bits */
     for(i = 0; i < 3; i++) {
         header <<= 8;
-        if(!getfunc(fd, &tmp))
+        if(!read(fd, &tmp, 1))
             return 0;
         header |= tmp;
         pos++;
@@ -235,7 +216,7 @@
 
     do {
         header <<= 8;
-        if(!getfunc(fd, &tmp))
+        if(!read(fd, &tmp, 1))
             return 0;
         header |= tmp;
         pos++;
@@ -254,16 +235,6 @@
     return header;
 }
 
-static int fileread(int fd, unsigned char *c)
-{
-    return read(fd, c, 1);
-}
-
-unsigned long find_next_frame(int fd, int *offset, int max_offset, unsigned long last_header)
-{
-    return __find_next_frame(fd, offset, max_offset, last_header, fileread);
-}
-
 static int fnf_read_index;
 static int fnf_buf_len;
 
@@ -325,37 +296,44 @@
 unsigned long buf_find_next_frame(int fd, int *offset, int max_offset,
                                   unsigned long last_header)
 {
-    return __find_next_frame(fd, offset, max_offset, last_header, buf_getbyte);
-}
+    unsigned long header=0;
+    unsigned char tmp;
+    int i;
 
-static int mp3buflen;
-static int mem_pos;
-static int mem_cnt;
-static int mem_maxlen;
+    int pos = 0;
 
-static int mem_getbyte(int dummy, unsigned char *c)
-{
-    dummy = dummy;
+    /* We remember the last header we found, to use as a template to see if
+       the header we find has the same frequency, layer etc */
+    last_header &= 0xffff0c00;
     
-    *c = mp3buf[mem_pos++];
-    if(mem_pos >= mp3buflen)
-        mem_pos = 0;
+    /* Fill up header with first 24 bits */
+    for(i = 0; i < 3; i++) {
+        header <<= 8;
+        if(!buf_getbyte(fd, &tmp))
+            return 0;
+        header |= tmp;
+        pos++;
+    }
 
-    if(mem_cnt++ >= mem_maxlen)
+    do {
+        header <<= 8;
+        if(!buf_getbyte(fd, &tmp))
         return 0;
-    else
-        return 1;
-}
+        header |= tmp;
+        pos++;
+        if(max_offset > 0 && pos > max_offset)
+            return 0;
+    } while(!is_mp3frameheader(header) ||
+            (last_header?((header & 0xffff0c00) != last_header):false));
 
-unsigned long mem_find_next_frame(int startpos, int *offset, int max_offset,
-                                  unsigned long last_header)
-{
-    mp3buflen = mp3end - mp3buf;
-    mem_pos = startpos;
-    mem_cnt = 0;
-    mem_maxlen = max_offset;
+    *offset = pos - 4;
 
-    return __find_next_frame(0, offset, max_offset, last_header, mem_getbyte);
+#ifdef DEBUG
+    if(*offset)
+        DEBUGF("Warning: skipping %d bytes of garbage\n", *offset);
+#endif
+    
+    return header;
 }
 
 int get_mp3file_info(int fd, struct mp3info *info)
diff -rubBP /home/dast/src/rockbox/firmware/mpeg.c ./firmware/mpeg.c
--- /home/dast/src/rockbox/firmware/mpeg.c	Tue Dec  9 13:28:39 2003
+++ ./firmware/mpeg.c	Tue Dec  2 22:00:21 2003
@@ -1,24 +1,8 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: mpeg.c,v 1.251 2003/12/09 08:15:22 hardeeps Exp $
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 #include "config.h"
 #include "debug.h"
+//#define DEBUGF(...)   //shut up. :)
+//#define LDEBUGF(...)
 #include "panic.h"
 #include "id3.h"
 #include "mpeg.h"
@@ -34,21 +18,11 @@
 #include "mas.h"
 #include "dac.h"
 #include "system.h"
-#include "usb.h"
 #include "file.h"
-#include "hwcompat.h"
 #endif
 
 extern void bitswap(unsigned char *data, int length);
 
-#ifdef HAVE_MAS3587F
-static void init_recording(void);
-static void init_playback(void);
-static void start_recording(void);
-static void stop_recording(void);
-static int get_unsaved_space(void);
-#endif
-
 #ifndef SIMULATOR
 static int get_unplayed_space(void);
 static int get_playable_space(void);
@@ -66,20 +40,11 @@
 #define MPEG_RECORD 9
 #define MPEG_INIT_RECORDING 10
 #define MPEG_INIT_PLAYBACK 11
-#define MPEG_NEW_FILE    12
 #define MPEG_NEED_DATA    100
 #define MPEG_TRACK_CHANGE 101
 #define MPEG_SAVE_DATA    102
 #define MPEG_STOP_DONE    103
 
-#ifdef HAVE_MAS3587F
-static enum
-{
-    MPEG_DECODER,
-    MPEG_ENCODER
-} mpeg_mode;
-#endif
-
 extern char* playlist_peek(int steps);
 extern bool playlist_check(int steps);
 extern int playlist_next(int steps);
@@ -98,7 +63,6 @@
     "",     /* Channels */
     "dB",   /* Left gain */
     "dB",   /* Right gain */
-    "dB",   /* Mic gain */
 };
 
 static int numdecimals[] =
@@ -113,7 +77,6 @@
     0,    /* Channels */
     1,    /* Left gain */
     1,    /* Right gain */
-    1,    /* Mic gain */
 };
 
 static int minval[] =
@@ -128,19 +91,13 @@
     0,    /* Channels */
     0,    /* Left gain */
     0,    /* Right gain */
-    0,    /* Mic gain */
 };
 
 static int maxval[] =
 {
     100,  /* Volume */
-#ifdef HAVE_MAS3587F
-    24,   /* Bass */
-    24,   /* Treble */
-#else
     30,   /* Bass */
     30,   /* Treble */
-#endif
     50,   /* Balance */
     17,   /* Loudness */
     10,   /* Bass boost */
@@ -148,27 +105,20 @@
     6,    /* Channels */
     15,   /* Left gain */
     15,   /* Right gain */
-    15,   /* Mic gain */
 };
 
 static int defaultval[] =
 {
     70,   /* Volume */
-#ifdef HAVE_MAS3587F
-    12+6, /* Bass */
-    12+6, /* Treble */
-#else
     15+7, /* Bass */
     15+7, /* Treble */
-#endif
     0,    /* Balance */
     0,    /* Loudness */
     0,    /* Bass boost */
     0,    /* AVC */
     0,    /* Channels */
     8,    /* Left gain */
-    8,    /* Right gain */
-    2,    /* Mic gain */
+    2,    /* Right gain */
 };
 
 char *mpeg_sound_unit(int setting)
@@ -341,13 +291,12 @@
 
             /* set time for this percent (divide before multiply to prevent
                overflow on long files. loss of precision is negligible on
-               short files) */
+               short files)*/
             id3->elapsed = i * (id3->length / 100);
 
             /* calculate remainder time */
             plen = (nextpos - relpos) * (id3->filesize / 256);
-            id3->elapsed += (((remainder * 100) / plen) *
-                             (id3->length / 10000));
+            id3->elapsed += (((remainder * 100) / plen) * id3->length) / 10000;
         }
         else {
             /* no TOC exists. set a rough estimate using average bitrate */
@@ -370,10 +319,6 @@
 #else
 static int last_dma_tick = 0;
 
-static unsigned long mas_version_code;
-
-#ifdef HAVE_MAS3507D
-
 static unsigned int bass_table[] =
 {
     0x9e400, /* -15dB */
@@ -463,7 +408,6 @@
     0xe6800, /* 14dB */
     0xe9400  /* 15dB */
 };
-#endif
 
 static struct event_queue mpeg_queue;
 static char mpeg_stack[DEFAULT_STACK_SIZE + 0x1000];
@@ -487,25 +431,9 @@
 static int low_watermark_margin; /* Extra time in seconds for watermark */
 static int lowest_watermark_level; /* Debug value to observe the buffer
                                       usage */
-#ifdef HAVE_MAS3587F
-static bool is_recording; /* We are recording */
-static bool stop_pending;
-unsigned long record_start_time; /* Value of current_tick when recording
-                                    was started */
-static bool saving; /* We are saving the buffer to disk */
-static char recording_filename[MAX_PATH];
-static int rec_frequency_index; /* For create_xing_header() calls */
-static int rec_version_index;   /* For create_xing_header() calls */
-static bool disable_xing_header; /* When splitting files */
-#endif
-
 static int mpeg_file;
 
 /* Synchronization variables */
-#ifdef HAVE_MAS3587F
-static bool init_recording_done;
-static bool init_playback_done;
-#endif
 static bool mpeg_stop_done;
 
 static void recalculate_watermark(int bitrate)
@@ -536,6 +464,17 @@
     }
 }
 
+void mas_debug(void)
+{
+    char s[32];
+    int y=0;
+
+    snprintf(s,sizeof(s),"Last DMA Chunk: %d",last_dma_chunk_size);
+    lcd_puts_scroll(0,y++,s);
+    snprintf(s,sizeof(s),"Low Watermark: %d",lowest_watermark_level);
+    lcd_puts_scroll(0,y++,s);
+}
+
 void mpeg_set_buffer_margin(int seconds)
 {
     low_watermark_margin = seconds;
@@ -565,12 +504,12 @@
     dbgdata->lowest_watermark_level = lowest_watermark_level;
 }
 
-#ifdef HAVE_MAS3507D
 static void mas_poll_start(int interval_in_ms)
 {
     unsigned int count;
 
-    count = (FREQ * interval_in_ms) / 1000 / 8;
+    //The timer is going to be incremented every 8 cycle
+    count = (FREQ * interval_in_ms) / 8000;
 
     if(count > 0xffff)
     {
@@ -579,50 +518,24 @@
         return;
     }
     
-    /* We are using timer 1 */
-    
-    TSTR &= ~0x02; /* Stop the timer */
-    TSNC &= ~0x02; /* No synchronization */
-    TMDR &= ~0x02; /* Operate normally */
-
-    TCNT1 = 0;   /* Start counting at 0 */
-    GRA1 = count;
-    TCR1 = 0x23; /* Clear at GRA match, sysclock/8 */
-
-    /* Enable interrupt on level 5 */
-    IPRC = (IPRC & ~0x000f) | 0x0005;
-    
-    TSR1 &= ~0x02;
-    TIER1 = 0xf9; /* Enable GRA match interrupt */
-
-    TSTR |= 0x02; /* Start timer 1 */
-}
-#else
-static void postpone_dma_tick(void)
-{
-    unsigned int count;
+    /* We are using timer 3 */
 
-    count = FREQ / 1000 / 8;
-
-    /* We are using timer 1 */
-    
-    TSTR &= ~0x02; /* Stop the timer */
-    TSNC &= ~0x02; /* No synchronization */
-    TMDR &= ~0x02; /* Operate normally */
-
-    TCNT1 = 0;   /* Start counting at 0 */
-    GRA1 = count;
-    TCR1 = 0x23; /* Clear at GRA match, sysclock/8 */
+    TSTR &= ~0x08; /* Stop the timer */
+    TSNC &= ~0x08; /* No synchronization */
+    TMDR &= ~0x08; /* Operate normally */
+
+    TCNT3 = 0;   /* Start counting at 0 */
+    GRA3 = count;
+    TCR3 = 0x23; /* Clear at GRA match, sysclock/8 */
 
     /* Enable interrupt on level 5 */
-    IPRC = (IPRC & ~0x000f) | 0x0005;
+    IPRD = (IPRD & ~0x0F00) | 0x0500;
     
-    TSR1 &= ~0x02;
-    TIER1 = 0xf9; /* Enable GRA match interrupt */
+    TSR3 &= ~0x02;
+    TIER3 = 0xf9; /* Enable GRA match interrupt */
 
-    TSTR |= 0x02; /* Start timer 1 */
+    TSTR |= 0x08; /* Start timer 3 */
 }
-#endif
 
 #ifdef DEBUG
 static void dbg_timer_start(void)
@@ -690,16 +603,6 @@
     return space;
 }
 
-#ifdef HAVE_MAS3587F
-static int get_unsaved_space(void)
-{
-    int space = mp3buf_write - mp3buf_read;
-    if (space < 0)
-        space += mp3buflen;
-    return space;
-}
-#endif
-
 static void init_dma(void)
 {
     SAR3 = (unsigned int) mp3buf + mp3buf_read;
@@ -725,66 +628,15 @@
     dma_on = false;
 }
 
-#ifdef HAVE_MAS3587F
-#ifdef DEBUG
-static long timing_info_index = 0;
-static long timing_info[1024];
-#endif
-static bool inverted_pr;
-static unsigned long num_rec_bytes;
-static unsigned long num_recorded_frames;
-
-void drain_dma_buffer(void)
-{
-    if(inverted_pr)
-    {
-        while((*((volatile unsigned char *)PBDR_ADDR) & 0x40))
-        {
-            or_b(0x08, &PADRH);
-            
-            while(*((volatile unsigned char *)PBDR_ADDR) & 0x80);
-                    
-            /* It must take at least 5 cycles before
-               the data is read */
-            asm(" nop\n nop\n nop\n");
-            asm(" nop\n nop\n nop\n");
-            and_b(~0x08, &PADRH);
-
-            while(!(*((volatile unsigned char *)PBDR_ADDR) & 0x80));
-        }
-    }
-    else
-    {
-        while((*((volatile unsigned char *)PBDR_ADDR) & 0x40))
-        {
-            and_b(~0x08, &PADRH);
-            
-            while(*((volatile unsigned char *)PBDR_ADDR) & 0x80);
-            
-            /* It must take at least 5 cycles before
-               the data is read */
-            asm(" nop\n nop\n nop\n");
-            asm(" nop\n nop\n nop\n");
-                    
-            or_b(0x08, &PADRH);
-
-            while(!(*((volatile unsigned char *)PBDR_ADDR) & 0x80));
-        }
-    }
-}
-#endif
-
 static void dma_tick (void) __attribute__ ((section (".icode")));
 static void dma_tick(void)
 {
-#ifdef HAVE_MAS3587F
-    if(mpeg_mode == MPEG_DECODER)
-    {
-#endif
+  unsigned long framelength = 0;
+
         if(playing && !paused)
         {
             /* Start DMA if it is disabled and the DEMAND pin is high */
-            if(!dma_on && (PBDR & 0x4000))
+        if(!dma_on && MAS_DEMAND)
             {
                 if(!(SCR0 & 0x80))
                     start_dma();
@@ -789,97 +641,18 @@
                 if(!(SCR0 & 0x80))
                     start_dma();
             }
+
             id3tags[tag_read_idx]->id3.elapsed +=
                 (current_tick - last_dma_tick) * 1000 / HZ;
-            last_dma_tick = current_tick;
-        }
-#ifdef HAVE_MAS3587F
-    }
-    else
-    {
-        int i;
-        int num_bytes;
-        if(is_recording && (PBDR & 0x4000))
-        {
-#ifdef DEBUG
-            timing_info[timing_info_index++] = current_tick;
-            TCNT2 = 0;
-#endif
-            /* We read as long as EOD is high, but max 30 bytes.
-               This code is optimized, and should probably be
-               written in assembler instead. */
-            if(inverted_pr)
-            {
-                i = 0;
-                while((*((volatile unsigned char *)PBDR_ADDR) & 0x40)
-                      && i < 30)
-                {
-                    or_b(0x08, &PADRH);
-
-                    while(*((volatile unsigned char *)PBDR_ADDR) & 0x80);
-                    
-                    /* It must take at least 5 cycles before
-                       the data is read */
-                    asm(" nop\n nop\n nop\n");
-                    mp3buf[mp3buf_write++] = *(unsigned char *)0x4000000;
-                    
-                    if(mp3buf_write >= mp3buflen)
-                        mp3buf_write = 0;
-
-                    i++;
-                    
-                    and_b(~0x08, &PADRH);
-
-                    /* No wait for /RTW, cause it's not necessary */
-                }
-            }
-            else
-            {
-                i = 0;
-                while((*((volatile unsigned char *)PBDR_ADDR) & 0x40)
-                      && i < 30)
-                {
-                    and_b(~0x08, &PADRH);
-                    
-                    while(*((volatile unsigned char *)PBDR_ADDR) & 0x80);
-                    
-                    /* It must take at least 5 cycles before
-                       the data is read */
-                    asm(" nop\n nop\n nop\n");
-                    mp3buf[mp3buf_write++] = *(unsigned char *)0x4000000;
-                    
-                    if(mp3buf_write >= mp3buflen)
-                        mp3buf_write = 0;
-
-                    i++;
-                    
-                    or_b(0x08, &PADRH);
-
-                    /* No wait for /RTW, cause it's not necessary */
-                }
-            }
-#ifdef DEBUG
-            timing_info[timing_info_index++] = TCNT2 + (i << 16);
-            timing_info_index &= 0x3ff;
-#endif
-
-            num_rec_bytes += i;
-            
-            /* Signal to save the data if we are running out of buffer
-               space */
-            num_bytes = mp3buf_write - mp3buf_read;
-            if(num_bytes < 0)
-                num_bytes += mp3buflen;
-
-            if(mp3buflen - num_bytes < MPEG_RECORDING_LOW_WATER && !saving)
-            {
-                saving = true;
-                queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0);
-                wake_up_thread();
-            }
+/*
+	switch( id3tags[tag_read_idx]->id3.frequency ){
+	case 44100:
+	  framelength = 26;
+	  break;
         }
+	id3tags[tag_read_idx]->id3.elapsed = mas_framecount() * 26;*/
+	last_dma_tick = current_tick;
     }
-#endif
 }
 
 static void reset_mp3_buffer(void)
@@ -982,32 +755,11 @@
     wake_up_thread();
 }
 
-#ifdef HAVE_MAS3587F
-static void demand_irq_enable(bool on)
-{
-    int oldlevel = set_irq_level(15);
-    
-    if(on)
-    {
-        IPRA = (IPRA & 0xfff0) | 0x000b;
-        ICR &= ~0x0010; /* IRQ3 level sensitive */
-    }
-    else
-        IPRA &= 0xfff0;
-
-    set_irq_level(oldlevel);
-}
-#endif
-
 #pragma interrupt
-void IMIA1(void)
+void IMIA3(void)
 {
     dma_tick();
-    TSR1 &= ~0x01;
-#ifdef HAVE_MAS3587F
-    /* Disable interrupt */
-    IPRC &= ~0x000f;
-#endif
+    TSR3 &= ~0x01;
 }
 
 #pragma interrupt
@@ -1016,20 +768,6 @@
     stop_dma();
 }
 
-#ifdef HAVE_MAS3587F
-#pragma interrupt
-void IRQ3(void)
-{
-    /* Begin with setting the IRQ to edge sensitive */
-    ICR |= 0x0010;
-    
-    if(mpeg_mode == MPEG_ENCODER)
-        dma_tick();
-    else
-        postpone_dma_tick();
-}
-#endif
-
 static int add_track_to_tag_list(char *filename)
 {
     struct id3tag *t = NULL;
@@ -1129,9 +867,6 @@
 static void stop_playing(void)
 {
     /* Stop the current stream */
-#ifdef HAVE_MAS3587F
-    demand_irq_enable(false);
-#endif
     playing = false;
     filling = false;
     if(mpeg_file >= 0)
@@ -1156,10 +891,6 @@
 {
     DEBUGF("Track change\n");
 
-#ifdef HAVE_MAS3587F
-    /* Reset the AVC */
-    mpeg_sound_set(SOUND_AVC, -1);
-#endif
     remove_current_tag();
 
     update_playlist();
@@ -1200,7 +931,7 @@
         if((playable_space >= MPEG_PLAY_PENDING_THRESHOLD) ||
            !filling || dma_underrun)
         {
-            DEBUGF("P\n");
+            //DEBUGF("P\n");
             play_pending = false;
             playing = true;
 			
@@ -1209,9 +940,6 @@
             {
                 last_dma_tick = current_tick;
                 start_dma();
-#ifdef HAVE_MAS3587F
-                demand_irq_enable(true);
-#endif
             }
 
             /* Tell ourselves that we need more data */
@@ -1278,16 +1006,6 @@
     int amount_to_read;
     int t1, t2;
     int start_offset;
-#ifdef HAVE_MAS3587F
-    int amount_to_save;
-    int writelen;
-    int framelen;
-    unsigned long saved_header;
-    int startpos;
-    int rc;
-    int offset;
-    int countdown;
-#endif
     
     is_playing = false;
     play_pending = false;
@@ -1296,10 +1014,6 @@
 
     while(1)
     {
-#ifdef HAVE_MAS3587F
-        if(mpeg_mode == MPEG_DECODER)
-        {
-#endif
         yield();
 
         /* Swap if necessary, and don't block on the queue_wait() */
@@ -1309,8 +1023,8 @@
         }
         else
         {
-            DEBUGF("S R:%x W:%x SW:%x\n",
-                   mp3buf_read, mp3buf_write, mp3buf_swapwrite);
+//            DEBUGF("S R:%x W:%x SW:%x\n",
+//                   mp3buf_read, mp3buf_write, mp3buf_swapwrite);
             queue_wait(&mpeg_queue, &ev);
         }
 
@@ -1321,12 +1035,6 @@
             case MPEG_PLAY:
                 DEBUGF("MPEG_PLAY\n");
 
-#ifdef HAVE_FMRADIO
-                /* Silence the A/D input, it may be on because the radio
-                   may be playing */
-                mas_codec_writereg(6, 0x0000);
-#endif
-
                 /* Stop the current stream */
                 play_pending = false;
                 playing = false;
@@ -1553,8 +1262,8 @@
                     else
                     {
                         /* No TOC exists, estimate the new position */
-                        newpos = (id3->filesize / (id3->length / 1000)) *
-                            (newtime / 1000);
+                        newpos = (id3->filesize/(id3->length/1000))
+                            *(newtime/1000);
                     }
                 }
                 else if (id3->bpf && id3->tpf)
@@ -1738,7 +1447,7 @@
                 /* do we have any more buffer space to fill? */
                 if(free_space_left <= MPEG_HIGH_WATER)
                 {
-                    DEBUGF("0\n");
+                    //DEBUGF("0\n");
                     filling = false;
                     ata_sleep();
                     break;
@@ -1753,16 +1462,14 @@
 
                 /* Don't read more than until the end of the buffer */
                 amount_to_read = MIN(mp3buflen - mp3buf_write, amount_to_read);
-#if MEM == 8    
-                amount_to_read = MIN(0x100000, amount_to_read);
-#endif
 
                 /* Read as much mpeg data as we can fit in the buffer */
                 if(mpeg_file >= 0)
                 {
-                    DEBUGF("R\n");
+                    //DEBUGF("R\n");
                     t1 = current_tick;
                     len = read(mpeg_file, mp3buf+mp3buf_write, amount_to_read);
+
                     if(len > 0)
                     {
                         t2 = current_tick;
@@ -1766,8 +1473,8 @@
                     if(len > 0)
                     {
                         t2 = current_tick;
-                        DEBUGF("time: %d\n", t2 - t1);
-                        DEBUGF("R: %x\n", len);
+                        //DEBUGF("time: %d\n", t2 - t1);
+                        //DEBUGF("R: %x\n", len);
 
                         /* Now make sure that we don't feed the MAS with ID3V1
                            data */
@@ -1803,12 +1510,15 @@
                             }
                         }
 
+                        int i;
+                        for (i=0;i<len;++i)
+                            (mp3buf+mp3buf_write)[i]=~((mp3buf+mp3buf_write)[i]);
                         mp3buf_write += len;
                         
                         if(mp3buf_write >= mp3buflen)
                         {
                             mp3buf_write = 0;
-                            DEBUGF("W\n");
+                            //DEBUGF("W\n");
                         }
 
                         /* Tell ourselves that we want more data */
@@ -1843,679 +1553,91 @@
                 track_change();
                 break;
                 
-            case SYS_USB_CONNECTED:
-                is_playing = false;
-                paused = false;
-                stop_playing();
-#ifndef SIMULATOR
-                
-                /* Tell the USB thread that we are safe */
-                DEBUGF("mpeg_thread got SYS_USB_CONNECTED\n");
-                usb_acknowledge(SYS_USB_CONNECTED_ACK);
-
-                /* Wait until the USB cable is extracted again */
-                usb_wait_for_disconnect(&mpeg_queue);
-#endif
-                break;
-                
-#ifdef HAVE_MAS3587F
-            case MPEG_INIT_RECORDING:
-                init_recording();
-                init_recording_done = true;
-                break;
-#endif
             }
-#ifdef HAVE_MAS3587F
         }
-        else
-        {
-            queue_wait(&mpeg_queue, &ev);
-            switch(ev.id)
-            {
-                case MPEG_RECORD:
-                    DEBUGF("Recording...\n");
-                    reset_mp3_buffer();
-
-                    /* Advance the write pointer to make
-                       room for an ID3 tag plus a VBR header */
-                    mp3buf_write = MPEG_RESERVED_HEADER_SPACE;
-                    memset(mp3buf, 0, MPEG_RESERVED_HEADER_SPACE);
-
-                    /* Insert the ID3 header */
-                    memcpy(mp3buf, empty_id3_header, sizeof(empty_id3_header));
+}
 
-                    start_recording();
-                    demand_irq_enable(true);
+static void setup_sci0(void)
+{
+  //Set pin functions
+  //	PB14 (Demand) -> IRQ6
+  //	PB12 (SIC)-> SCK0
+  //	PB9 (SID) ->TxD0
                     
-                    mpeg_file = open(recording_filename, O_WRONLY|O_CREAT);
+  PBCR1 = (PBCR1 & 0x0cff) | 0x1208;
                     
-                    if(mpeg_file < 0)
-                        panicf("recfile: %d", mpeg_file);
+  /* Set PB12 to output */
+  PBIOR |= 0x1000;
 
-                    break;
 
-                case MPEG_STOP:
-                    DEBUGF("MPEG_STOP\n");
-                    demand_irq_enable(false);
-                    stop_recording();
+  // Set up serial port
                     
-                    /* Save the remaining data in the buffer */
-                    stop_pending = true;
-                    queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0);
-                    break;
+  /* Disable serial port */
+  SCR0 = 0x00;
                     
-                case MPEG_STOP_DONE:
-                    DEBUGF("MPEG_STOP_DONE\n");
+  /* Synchronous, no prescale, system clock */
+  SMR0 = 0x80;
                     
-                    if(mpeg_file >= 0)
-                        close(mpeg_file);
+  /* Set baudrate 1Mbit/s */
+  BRR0 = 0x04;
 
-                    if(!disable_xing_header)
-                    {
-                        /* Create the Xing header */
-                        mpeg_file = open(recording_filename, O_RDWR);
-                        if(mpeg_file < 0)
-                            panicf("rec upd: %d (%s)", mpeg_file,
-                                   recording_filename);
-
-                        /* If the number of recorded frames have
-                           reached 0x7ffff, we can no longer trust it */
-                        if(num_recorded_frames == 0x7ffff)
-                            num_recorded_frames = 0;
-                        
-                        /* Read the first MP3 frame from the recorded stream */
-                        lseek(mpeg_file, MPEG_RESERVED_HEADER_SPACE, SEEK_SET);
-                        rc = read(mpeg_file, &saved_header, 4);
-                        if(rc <= 0)
-                        {
-                            close(mpeg_file);
-                            mpeg_file = -1;
-                            mpeg_stop_done = true;
-                            break;
-                        }
+  /* use SCK as serial clock output */
+  SCR0 = 0x01;
                         
-                        framelen = create_xing_header(mpeg_file, 0,
-                                                      num_rec_bytes, mp3buf,
-                                                      num_recorded_frames,
-                                                      saved_header, NULL,
-                                                      false);
+  /* Clear FER and PER */
+  SSR0 &= 0xe7;
                         
-                        lseek(mpeg_file, MPEG_RESERVED_HEADER_SPACE-framelen,
-                              SEEK_SET);
-                        write(mpeg_file, mp3buf, framelen);
-                        close(mpeg_file);
-                    }
-                    mpeg_file = -1;
+  /* Set interrupt ITU2 and SCI0 priority to 0 */
+  IPRD &= 0x0ff0;
                     
-#ifdef DEBUG1
-                    {
-                        int i;
-                        for(i = 0;i < 512;i++)
-                        {
-                            DEBUGF("%d - %d us (%d bytes)\n",
-                                   timing_info[i*2],
-                                   (timing_info[i*2+1] & 0xffff) *
-                                   10000 / 13824,
-                                   timing_info[i*2+1] >> 16);
-                        }
-                    }
-#endif
-                    mpeg_stop_done = true;
-                    break;
+  /* Set PB14 to inputs */
+  PBIOR &= 0xbfff;
 
-                case MPEG_NEW_FILE:
-                    /* Make sure we have at least one complete frame
-                       in the buffer. If we haven't recorded a single
-                       frame within 200ms, the MAS is probably not recording
-                       anything, and we bail out. */
-                    countdown = 20;
-                    amount_to_save = get_unsaved_space();
-                    while(countdown-- && amount_to_save < 1800)
-                    {
-                        sleep(HZ/10);
-                        amount_to_save = get_unsaved_space();
-                    }
+  /* Enable End of DMA interrupt at prio 8 */
+  IPRC = (IPRC & 0xf0ff) | 0x0800;
 
-                    if(amount_to_save >= 1800)
-                    {
-                        /* Now find a frame boundary to split at */
-                        startpos = mp3buf_write - 1800;
-                        if(startpos < 0)
-                            startpos += mp3buflen;
+  /* Enable Tx (only!) */
+  SCR0 |= 0x20;
+}
+#endif /* SIMULATOR */
                         
-                        {
-                            unsigned long tmp[2];
-                            /* Find out how the mp3 header should look like */
-                            mas_readmem(MAS_BANK_D0, 0xfd1, tmp, 2);
-                            saved_header = 0xffe00000 |
-                                ((tmp[0] & 0x7c00) << 6) |
-                                (tmp[1] & 0xffff);
-                            DEBUGF("Header: %08x\n", saved_header);
-                        }
+#ifdef SIMULATOR
+static struct mp3entry taginfo;
+#endif
                         
-                        rc = mem_find_next_frame(startpos, &offset, 1800,
-                                                 saved_header);
-                        if(rc) /* Header found? */
-                        {
-                            /* offset will now contain the number of bytes to
-                               add to startpos to find the frame boundary */
-                            startpos += offset;
-                            if(startpos >= mp3buflen)
-                                startpos -= mp3buflen;
-                        }
-                        else
-                        {
-                            /* No header found. Let's save the whole buffer. */
-                            startpos = mp3buf_write;
-                        }
-                    }
+struct mp3entry* mpeg_current_track()
+{
+#ifdef SIMULATOR
+    return &taginfo;
+#else
+    if(num_tracks_in_memory())
+        return &(id3tags[tag_read_idx]->id3);
                     else
+        return NULL;
+#endif
+}
+
+bool mpeg_has_changed_track(void)
+{
+    if(last_track_counter != current_track_counter)
                     {
-                        /* Too few bytes recorded, timeout */
-                        startpos = mp3buf_write;
+        last_track_counter = current_track_counter;
+        return true;
                     }
+    return false;
+}
                     
-                    amount_to_save = startpos - mp3buf_read;
-                        if(amount_to_save < 0)
-                            amount_to_save += mp3buflen;
+void mpeg_play(int offset)
+{
+#ifdef SIMULATOR
+    char* trackname;
+    int steps=0;
 
-                    /* First save up to the end of the buffer */
-                    writelen = MIN(amount_to_save,
-                                   mp3buflen - mp3buf_read);
+    is_playing = true;
                     
-                    if(writelen)
-                    {
-                        rc = write(mpeg_file, mp3buf + mp3buf_read, writelen);
-                        if(rc < 0)
-                        {
-                            if(errno == ENOSPC)
-                            {
-                                mpeg_errno = MPEGERR_DISK_FULL;
-                                demand_irq_enable(false);
-                                stop_recording();
-                                queue_post(&mpeg_queue, MPEG_STOP_DONE, 0);
-                                break;
-                            }
-                            else
-                            {
-                                panicf("spt wrt: %d", rc);
-                            }
-                        }
-                    }
-
-                    /* Then save the rest */
-                    writelen =  amount_to_save - writelen;
-                    if(writelen)
-                    {
-                        rc = write(mpeg_file, mp3buf, writelen);
-                        if(rc < 0)
-                        {
-                            if(errno == ENOSPC)
-                            {
-                                mpeg_errno = MPEGERR_DISK_FULL;
-                                demand_irq_enable(false);
-                                stop_recording();
-                                queue_post(&mpeg_queue, MPEG_STOP_DONE, 0);
-                                break;
-                            }
-                            else
-                            {
-                                panicf("spt wrt: %d", rc);
-                            }
-                        }
-                    }
-
-                    /* Advance the buffer pointers */
-                    mp3buf_read += amount_to_save;
-                    if(mp3buf_read >= mp3buflen)
-                        mp3buf_read -= mp3buflen;
-
-                    /* Close the current file */
-                    rc = close(mpeg_file);
-                    if(rc < 0)
-                        panicf("spt cls: %d", rc);
-
-                    /* Open the new file */
-                    mpeg_file = open(recording_filename, O_WRONLY|O_CREAT);
-                    if(mpeg_file < 0)
-                        panicf("sptfile: %d", mpeg_file);
-                    break;
-                    
-                case MPEG_SAVE_DATA:
-                    amount_to_save = get_unsaved_space();
-                    
-                    /* If the result is negative, the write index has
-                       wrapped */
-                    if(amount_to_save < 0)
-                    {
-                        amount_to_save += mp3buflen;
-                    }
-                    
-                    DEBUGF("r: %x w: %x\n", mp3buf_read, mp3buf_write);
-                    DEBUGF("ats: %x\n", amount_to_save);
-                    /* Save data only if the buffer is getting full,
-                       or if we should stop recording */
-                    if(amount_to_save)
-                    {
-                        if(mp3buflen -
-                           amount_to_save < MPEG_RECORDING_LOW_WATER ||
-                           stop_pending)
-                        {
-                            /* Only save up to the end of the buffer */
-                            writelen = MIN(amount_to_save,
-                                           mp3buflen - mp3buf_read);
-                            
-                            DEBUGF("wrl: %x\n", writelen);
-                            
-                            rc = write(mpeg_file, mp3buf + mp3buf_read,
-                                       writelen);
-                            
-                            if(rc < 0)
-                            {
-                                if(errno == ENOSPC)
-                                {
-                                    mpeg_errno = MPEGERR_DISK_FULL;
-                                    demand_irq_enable(false);
-                                    stop_recording();
-                                    queue_post(&mpeg_queue, MPEG_STOP_DONE, 0);
-                                    break;
-                                }
-                                else
-                                {
-                                    panicf("rec wrt: %d", rc);
-                                }
-                            }
-                            
-                            mp3buf_read += amount_to_save;
-                            if(mp3buf_read >= mp3buflen)
-                                mp3buf_read = 0;
-                            
-                            rc = fsync(mpeg_file);
-                            if(rc < 0)
-                                panicf("rec fls: %d", rc);
-
-                            queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0);
-                        }
-                        else
-                        {
-                            saving = false;
-                            ata_sleep();
-                        }
-                    }
-                    else
-                    {
-                        /* We have saved all data,
-                           time to stop for real */
-                        if(stop_pending)
-                            queue_post(&mpeg_queue, MPEG_STOP_DONE, 0);
-                        saving = false;
-                        ata_sleep();
-                    }
-                    break;
-                    
-                case MPEG_INIT_PLAYBACK:
-                    init_playback();
-                    init_playback_done = true;
-                    break;
-
-                case SYS_USB_CONNECTED:
-                    is_playing = false;
-                    paused = false;
-                    stop_playing();
-#ifndef SIMULATOR
-                
-                    /* Tell the USB thread that we are safe */
-                    DEBUGF("mpeg_thread got SYS_USB_CONNECTED\n");
-                    usb_acknowledge(SYS_USB_CONNECTED_ACK);
-                    
-                    /* Wait until the USB cable is extracted again */
-                    usb_wait_for_disconnect(&mpeg_queue);
-#endif
-                    break;
-            }
-        }
-#endif
-    }
-}
-
-static void setup_sci0(void)
-{
-    /* PB15 is I/O, PB14 is IRQ6, PB12 is SCK0, PB9 is TxD0 */
-    PBCR1 = (PBCR1 & 0x0cff) | 0x1208;
-    
-    /* Set PB12 to output */
-    or_b(0x10, &PBIORH);
-
-    /* Disable serial port */
-    SCR0 = 0x00;
-
-    /* Synchronous, no prescale */
-    SMR0 = 0x80;
-
-    /* Set baudrate 1Mbit/s */
-    BRR0 = 0x03;
-
-    /* use SCK as serial clock output */
-    SCR0 = 0x01;
-
-    /* Clear FER and PER */
-    SSR0 &= 0xe7;
-
-    /* Set interrupt ITU2 and SCI0 priority to 0 */
-    IPRD &= 0x0ff0;
-
-    /* set PB15 and PB14 to inputs */
-     and_b(~0x80, &PBIORH);
-     and_b(~0x40, &PBIORH);
-
-    /* Enable End of DMA interrupt at prio 8 */
-    IPRC = (IPRC & 0xf0ff) | 0x0800;
-    
-    /* Enable Tx (only!) */
-    SCR0 |= 0x20;
-}
-#endif /* SIMULATOR */
-
-#ifdef SIMULATOR
-static struct mp3entry taginfo;
-#endif
-
-struct mp3entry* mpeg_current_track()
-{
-#ifdef SIMULATOR
-    return &taginfo;
-#else
-    if(num_tracks_in_memory())
-        return &(id3tags[tag_read_idx]->id3);
-    else
-        return NULL;
-#endif
-}
-
-bool mpeg_has_changed_track(void)
-{
-    if(last_track_counter != current_track_counter)
-    {
-        last_track_counter = current_track_counter;
-        return true;
-    }
-    return false;
-}
-
-#ifdef HAVE_MAS3587F
-void mpeg_init_recording(void)
-{
-    init_recording_done = false;
-    queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL);
-
-    while(!init_recording_done)
-        sleep_thread();
-    wake_up_thread();
-}
-
-void mpeg_init_playback(void)
-{
-    init_playback_done = false;
-    queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL);
-
-    while(!init_playback_done)
-        sleep_thread();
-    wake_up_thread();
-}
-
-static void init_recording(void)
-{
-    unsigned long val;
-    int rc;
-
-    stop_playing();
-    is_playing = false;
-    paused = false;
-
-    reset_mp3_buffer();
-    remove_all_tags();
-    
-    if(mpeg_file >= 0)
-        close(mpeg_file);
-    mpeg_file = -1;
-
-    /* Init the recording variables */
-    is_recording = false;
-    
-    mas_reset();
-    
-    /* Enable the audio CODEC and the DSP core, max analog voltage range */
-    rc = mas_direct_config_write(MAS_CONTROL, 0x8c00);
-    if(rc < 0)
-        panicf("mas_ctrl_w: %d", rc);
-
-    /* Stop the current application */
-    val = 0;
-    mas_writemem(MAS_BANK_D0,0x7f6,&val,1);    
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f7, &val, 1);
-    } while(val);
-
-    /* Perform black magic as described by the data sheet */
-    if((mas_version_code & 0xff) == 2)
-    {
-        DEBUGF("Performing MAS black magic for B2 version\n");
-        mas_writereg(0xa3, 0x98);
-        mas_writereg(0x94, 0xfffff);
-        val = 0;
-        mas_writemem(MAS_BANK_D1, 0, &val, 1);
-        mas_writereg(0xa3, 0x90);
-    }
-
-    /* Enable A/D Converters */
-    mas_codec_writereg(0x0, 0xcccd);
-
-    /* Copy left channel to right (mono mode) */
-    mas_codec_writereg(8, 0x8000);
-    
-    /* ADC scale 0%, DSP scale 100%
-       We use the DSP output for monitoring, because it works with all
-       sources including S/PDIF */
-    mas_codec_writereg(6, 0x0000);
-    mas_codec_writereg(7, 0x4000);
-
-    /* No mute */
-    val = 0;
-    mas_writemem(MAS_BANK_D0, 0x7f9, &val, 1);    
-    
-    /* Set Demand mode, no monitoring and validate all settings */
-    val = 0x125;
-    mas_writemem(MAS_BANK_D0, 0x7f1, &val, 1);
-
-    /* Start the encoder application */
-    val = 0x40;
-    mas_writemem(MAS_BANK_D0, 0x7f6, &val, 1);
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f7, &val, 1);
-    } while(!(val & 0x40));
-
-    /* We have started the recording application with monitoring OFF.
-       This is because we want to record at least one frame to fill the DMA
-       buffer, because the silly MAS will not negate EOD until at least one
-       DMA transfer has taken place.
-       Now let's wait for some data to be encoded. */
-    sleep(20);
-    
-    /* Disable IRQ6 */
-    IPRB &= 0xff0f;
-
-    mpeg_mode = MPEG_ENCODER;
-
-    DEBUGF("MAS Recording application started\n");
-}
-
-static void init_playback(void)
-{
-    unsigned long val;
-    int rc;
-
-    stop_dma();
-    
-    mas_reset();
-    
-    /* Enable the audio CODEC and the DSP core, max analog voltage range */
-    rc = mas_direct_config_write(MAS_CONTROL, 0x8c00);
-    if(rc < 0)
-        panicf("mas_ctrl_w: %d", rc);
-
-    /* Stop the current application */
-    val = 0;
-    mas_writemem(MAS_BANK_D0,0x7f6,&val,1);    
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f7, &val, 1);
-    } while(val);
-    
-    /* Enable the D/A Converter */
-    mas_codec_writereg(0x0, 0x0001);
-
-    /* ADC scale 0%, DSP scale 100% */
-    mas_codec_writereg(6, 0x0000);
-    mas_codec_writereg(7, 0x4000);
-
-    /* Disable SDO and SDI */
-    val = 0x0d;
-    mas_writemem(MAS_BANK_D0,0x7f2,&val,1);
-
-    /* Set Demand mode and validate all settings */
-    val = 0x25;
-    mas_writemem(MAS_BANK_D0,0x7f1,&val,1);
-
-    /* Start the Layer2/3 decoder applications */
-    val = 0x0c;
-    mas_writemem(MAS_BANK_D0,0x7f6,&val,1);
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f7, &val, 1);
-    } while((val & 0x0c) != 0x0c);
-
-    mpeg_sound_channel_config(MPEG_SOUND_STEREO);
-
-    mpeg_mode = MPEG_DECODER;
-
-    /* set IRQ6 to edge detect */
-    ICR |= 0x02;
-
-    /* set IRQ6 prio 8 */
-    IPRB = ( IPRB & 0xff0f ) | 0x0080;
-
-    DEBUGF("MAS Decoding application started\n");
-}
-
-void mpeg_record(char *filename)
-{
-    mpeg_errno = 0;
-    
-    strncpy(recording_filename, filename, MAX_PATH - 1);
-    recording_filename[MAX_PATH - 1] = 0;
-    
-    num_rec_bytes = 0;
-    disable_xing_header = false;
-    queue_post(&mpeg_queue, MPEG_RECORD, NULL);
-}
-
-static void start_recording(void)
-{
-    unsigned long val;
-
-    num_recorded_frames = 0;
-    
-    /* Stop monitoring and record for real */
-    mas_readmem(MAS_BANK_D0, 0x7f1, &val, 1);
-    val &= ~(1 << 10);
-    val |= 1;
-    mas_writemem(MAS_BANK_D0, 0x7f1, &val, 1);
-
-    /* Wait until the DSP has accepted the settings */
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f1, &val,1);
-    } while(val & 1);
-
-    sleep(20);
-    
-    /* Store the current time */
-    record_start_time = current_tick;
-
-    is_recording = true;
-    stop_pending = false;
-    saving = false;
-}
-
-static void stop_recording(void)
-{
-    unsigned long val;
-
-    is_recording = false;
-
-    /* Read the number of frames recorded */
-    mas_readmem(MAS_BANK_D0, 0xfd0, &num_recorded_frames, 1);
-    
-    /* Start monitoring */
-    mas_readmem(MAS_BANK_D0, 0x7f1, &val, 1);
-    val |= (1 << 10) | 1;
-    mas_writemem(MAS_BANK_D0, 0x7f1, &val, 1);
-
-    /* Wait until the DSP has accepted the settings */
-    do
-    {
-        mas_readmem(MAS_BANK_D0, 0x7f1, &val,1);
-    } while(val & 1);
-    
-    drain_dma_buffer();
-}
-
-void mpeg_new_file(char *filename)
-{
-    mpeg_errno = 0;
-    
-    strncpy(recording_filename, filename, MAX_PATH - 1);
-    recording_filename[MAX_PATH - 1] = 0;
-
-    disable_xing_header = true;
-
-    /* Store the current time */
-    record_start_time = current_tick;
-
-    queue_post(&mpeg_queue, MPEG_NEW_FILE, NULL);
-}
-
-unsigned long mpeg_recorded_time(void)
-{
-    if(is_recording)
-        return current_tick - record_start_time;
-    else
-        return 0;
-}
-
-unsigned long mpeg_num_recorded_bytes(void)
-{
-    if(is_recording)
-        return num_rec_bytes;
-    else
-        return 0;
-}
-
-#endif
-
-void mpeg_play(int offset)
-{
-#ifdef SIMULATOR
-    char* trackname;
-    int steps=0;
-
-    is_playing = true;
-    
-    do {
-        trackname = playlist_peek( steps );
-        if (!trackname)
+    do {
+        trackname = playlist_peek( steps );
+        if (!trackname)
             break;
         if(mp3info(&taginfo, trackname)) {
             /* bad mp3, move on */
@@ -2614,8 +1736,10 @@
 
     do {
         file = playlist_peek(steps);
-        if(!file)
+        if(!file) {
+            DEBUGF("No file -1 steps in playlist\n");
             break;
+        }
         if(mp3info(&taginfo, file)) {
             steps--;
             continue;
@@ -2656,10 +1780,6 @@
     if(paused)
         ret |= MPEG_STATUS_PAUSE;
     
-#ifdef HAVE_MAS3587F
-    if(is_recording)
-        ret |= MPEG_STATUS_RECORD;
-#endif
 
     if(mpeg_errno)
         ret |= MPEG_STATUS_ERROR;
@@ -2678,7 +1798,6 @@
 }
 
 #ifndef SIMULATOR
-#ifdef HAVE_MAS3507D
 int current_left_volume = 0;  /* all values in tenth of dB */
 int current_right_volume = 0;  /* all values in tenth of dB */
 int current_treble = 0;
@@ -2711,7 +1830,6 @@
 
     dac_volume(tenthdb2reg(l), tenthdb2reg(r), false);
 }
-#endif /* HAVE_MAS3507D */
 #endif /* !SIMULATOR */
 
 void mpeg_sound_set(int setting, int value)
@@ -2719,11 +1837,7 @@
 #ifdef SIMULATOR
     setting = value;
 #else
-#ifdef HAVE_MAS3507D
     int l, r;
-#else
-    int tmp;
-#endif
 
     if(!mpeg_is_initialized)
         return;
@@ -2731,10 +1845,6 @@
     switch(setting)
     {
         case SOUND_VOLUME:
-#ifdef HAVE_MAS3587F
-            tmp = 0x7f00 * value / 100;
-            mas_codec_writereg(0x10, tmp & 0xff00);
-#else
             l = value;
             r = value;
             
@@ -2760,90 +1870,25 @@
             current_right_volume = ( r < 0x08 ? r*30 - 780 : r*15 - 660 );
 
             set_prescaled_volume();
-#endif
             break;
 
         case SOUND_BALANCE:
-#ifdef HAVE_MAS3587F
-            tmp = ((value * 127 / 100) & 0xff) << 8;
-            mas_codec_writereg(0x11, tmp & 0xff00);
-#else
             /* Convert to percent */
             current_balance = value * 2;
-#endif
             break;
 
         case SOUND_BASS:
-#ifdef HAVE_MAS3587F
-            tmp = (((value-12) * 8) & 0xff) << 8;
-            mas_codec_writereg(0x14, tmp & 0xff00);
-#else    
             mas_writereg(MAS_REG_KBASS, bass_table[value]);
             current_bass = (value-15) * 10;
             set_prescaled_volume();
-#endif
             break;
 
         case SOUND_TREBLE:
-#ifdef HAVE_MAS3587F
-            tmp = (((value-12) * 8) & 0xff) << 8;
-            mas_codec_writereg(0x15, tmp & 0xff00);
-#else    
             mas_writereg(MAS_REG_KTREBLE, treble_table[value]);
             current_treble = (value-15) * 10;
             set_prescaled_volume();
-#endif
             break;
             
-#ifdef HAVE_MAS3587F
-        case SOUND_SUPERBASS:
-            if (value) {
-                tmp = MAX(MIN(value * 12, 0x7f), 0);
-                mas_codec_writereg(MAS_REG_KMDB_STR, (tmp & 0xff) << 8);
-                tmp = 0x30; /* MDB_HAR: Space for experiment here */
-                mas_codec_writereg(MAS_REG_KMDB_HAR, (tmp & 0xff) << 8);
-                tmp = 60 / 10; /* calculate MDB_FC, 60hz - experiment here,
-                                  this would depend on the earphones...
-                                  perhaps make it tunable? */
-                mas_codec_writereg(MAS_REG_KMDB_FC, (tmp & 0xff) << 8);
-                tmp = (3 * tmp) / 2; /* calculate MDB_SHAPE */
-                mas_codec_writereg(MAS_REG_KMDB_SWITCH,
-                    ((tmp & 0xff) << 8) /* MDB_SHAPE */
-                    | 2);  /* MDB_SWITCH enable */
-            } else {
-                mas_codec_writereg(MAS_REG_KMDB_STR, 0);
-                mas_codec_writereg(MAS_REG_KMDB_HAR, 0);
-                mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0); /* MDB_SWITCH disable */
-            }
-            break;
-            
-        case SOUND_LOUDNESS:
-            tmp = MAX(MIN(value * 4, 0x44), 0);
-            mas_codec_writereg(MAS_REG_KLOUDNESS, (tmp & 0xff) << 8);
-            break;
-            
-        case SOUND_AVC:
-            switch (value) {
-                case 1: /* 2s */
-                    tmp = (0x2 << 8) | (0x8 << 12);
-                    break;
-                case 2: /* 4s */
-                    tmp = (0x4 << 8) | (0x8 << 12);
-                    break;
-                case 3: /* 8s */
-                    tmp = (0x8 << 8) | (0x8 << 12);
-                    break;
-                case -1: /* turn off and then turn on again to decay quickly */
-                    tmp = mas_codec_readreg(MAS_REG_KAVC);
-                    mas_codec_writereg(MAS_REG_KAVC, 0);
-                    break;
-                default: /* off */
-                    tmp = 0;
-                    break;  
-            }
-            mas_codec_writereg(MAS_REG_KAVC, tmp);
-            break;
-#endif
         case SOUND_CHANNELS:
             mpeg_sound_channel_config(value);
             break;
@@ -2866,39 +1911,13 @@
             break;
         
         case SOUND_BASS:
-#ifdef HAVE_MAS3587F
-            result = value - 12;
-#else
             result = value - 15;
-#endif
             break;
         
         case SOUND_TREBLE:
-#ifdef HAVE_MAS3587F
-            result = value - 12;
-#else
             result = value - 15;
-#endif
-            break;
-
-#ifdef HAVE_MAS3587F
-        case SOUND_LOUDNESS:
-            result = value;
-            break;
-            
-        case SOUND_SUPERBASS:
-            result = value * 10;
             break;
 
-        case SOUND_LEFT_GAIN:
-        case SOUND_RIGHT_GAIN:
-            result = (value - 2) * 15;
-            break;
-
-        case SOUND_MIC_GAIN:
-            result = value * 15 + 210;
-            break;
-#endif
     }
     return result;
 }
@@ -2918,34 +1937,13 @@
             break;
         
         case SOUND_BASS:
-#ifdef HAVE_MAS3587F
-            result = value + 12;
-#else
             result = value + 15;
-#endif
             break;
         
         case SOUND_TREBLE:
-#ifdef HAVE_MAS3587F
-            result = value + 12;
-#else
             result = value + 15;
-#endif
             break;
 
-#ifdef HAVE_MAS3587F
-        case SOUND_SUPERBASS:
-            result = value / 10;
-            break;
-
-        case SOUND_LOUDNESS:
-        case SOUND_AVC:
-        case SOUND_LEFT_GAIN:
-        case SOUND_RIGHT_GAIN:
-        case SOUND_MIC_GAIN:
-            result = value;
-            break;
-#endif
     }
 
     return result;
@@ -3014,112 +2012,12 @@
             break;
     }
 
-#ifdef HAVE_MAS3587F
-    mas_writemem(MAS_BANK_D0, 0x7fc, &val_ll, 1); /* LL */
-    mas_writemem(MAS_BANK_D0, 0x7fd, &val_lr, 1); /* LR */
-    mas_writemem(MAS_BANK_D0, 0x7fe, &val_rl, 1); /* RL */
-    mas_writemem(MAS_BANK_D0, 0x7ff, &val_rr, 1); /* RR */
-#else
     mas_writemem(MAS_BANK_D1, 0x7f8, &val_ll, 1); /* LL */
     mas_writemem(MAS_BANK_D1, 0x7f9, &val_lr, 1); /* LR */
     mas_writemem(MAS_BANK_D1, 0x7fa, &val_rl, 1); /* RL */
     mas_writemem(MAS_BANK_D1, 0x7fb, &val_rr, 1); /* RR */
 #endif
-#endif
-}
-
-#ifdef HAVE_MAS3587F
-/* This function works by telling the decoder that we have another
-   crystal frequency than we actually have. It will adjust its internal
-   parameters and the result is that the audio is played at another pitch.
-
-   The pitch value is in tenths of percent.
-*/
-void mpeg_set_pitch(int pitch)
-{
-    unsigned long val;
-
-    /* invert pitch value */
-    pitch = 1000000/pitch;
-
-    /* Calculate the new (bogus) frequency */
-    val = 18432*pitch/1000;
-    
-    mas_writemem(MAS_BANK_D0,0x7f3,&val,1);
-
-    /* We must tell the MAS that the frequency has changed.
-       This will unfortunately cause a short silence. */
-    val = 0x25;
-    mas_writemem(MAS_BANK_D0,0x7f1,&val,1);
 }
-#endif
-
-#ifdef HAVE_MAS3587F
-void mpeg_set_recording_options(int frequency, int quality,
-                                int source, int channel_mode,
-                                bool editable)
-{
-    bool is_mpeg1;
-    unsigned long val;
-
-    is_mpeg1 = (frequency < 3)?true:false;
-
-    rec_version_index = is_mpeg1?3:2;
-    rec_frequency_index = frequency % 3;
-    
-    val = (quality << 17) |
-        (rec_frequency_index << 10) |
-        ((is_mpeg1?1:0) << 9) |
-        (1 << 8) | /* CRC on */
-        (((channel_mode * 2 + 1) & 3) << 6) |
-        (1 << 5) /* MS-stereo */ |
-        (1 << 2) /* Is an original */;
-    mas_writemem(MAS_BANK_D0, 0x7f0, &val,1);
-
-    DEBUGF("mas_writemem(MAS_BANK_D0, 0x7f0, %x)\n", val);
-
-    val = editable?4:0;
-    mas_writemem(MAS_BANK_D0, 0x7f9, &val,1);
-
-    DEBUGF("mas_writemem(MAS_BANK_D0, 0x7f9, %x)\n", val);
-
-    val = ((!is_recording << 10) | /* Monitoring */
-        ((source < 2)?1:2) << 8) | /* Input select */
-        (1 << 5) | /* SDO strobe invert */
-        ((is_mpeg1?0:1) << 3) |
-        (1 << 2) | /* Inverted SIBC clock signal */
-        1; /* Validate */
-    mas_writemem(MAS_BANK_D0, 0x7f1, &val,1);
-
-    DEBUGF("mas_writemem(MAS_BANK_D0, 0x7f1, %x)\n", val);
-
-    drain_dma_buffer();
-    
-    if(source == 0) /* Mic */
-    {
-        /* Copy left channel to right (mono mode) */
-        mas_codec_writereg(8, 0x8000);
-    }
-    else
-    {
-        /* Stereo input mode */
-        mas_codec_writereg(8, 0);
-    }
-}
-
-/* If use_mic is true, the left gain is used */
-void mpeg_set_recording_gain(int left, int right, bool use_mic)
-{
-    /* Enable both left and right A/D */
-    mas_codec_writereg(0x0,
-                       (left << 12) |
-                       (right << 8) |
-                       (left << 4) |
-                       (use_mic?0x0008:0) | /* Connect left A/D to mic */
-                       0x0007);
-}
-
-#endif
 
 #ifdef SIMULATOR
 static char mpeg_stack[DEFAULT_STACK_SIZE];
@@ -3131,10 +2029,7 @@
         if (is_playing) {
             id3 = mpeg_current_track();
             if (!paused)
-            {
                 id3->elapsed+=1000;
-                id3->offset+=1000;
-            }
             if (id3->elapsed>=id3->length)
                 mpeg_next();
         }
@@ -3143,8 +2038,7 @@
 }
 #endif
 
-void mpeg_init(int volume, int bass, int treble, int balance, int loudness, 
-    int bass_boost, int avc, int channel_config)
+void mpeg_init(int volume, int bass, int treble, int balance, int channel_config)
 {
     mpeg_errno = 0;
     
@@ -3154,31 +2048,13 @@
     create_thread(mpeg_thread, mpeg_stack,
                   sizeof(mpeg_stack), mpeg_thread_name);
 #else
-#ifdef HAVE_MAS3507D
-    unsigned long val;
-    loudness = bass_boost = avc;
-#endif
 
-    setup_sci0();
+    //Init mas
+    mas_init();
 
-#ifdef HAVE_MAS3587F
-    or_b(0x08, &PAIORH); /* output for /PR */
-    init_playback();
-    
-    mas_version_code = mas_readver();
-    DEBUGF("MAS3587 derivate %d, version B%d\n",
-           (mas_version_code & 0xff00) >> 8, mas_version_code & 0xff);
-#endif
+    setup_sci0();
 
-#ifdef HAVE_DAC3550A
     dac_init();
-#endif
-    
-#ifdef HAVE_MAS3507D
-    and_b(~0x20, &PBDRL);
-    sleep(HZ/5);
-    or_b(0x20, &PBDRL);
-    sleep(HZ/5);
     
     /* set IRQ6 to edge detect */
     ICR |= 0x02;
@@ -3186,39 +2062,7 @@
     /* set IRQ6 prio 8 */
     IPRB = ( IPRB & 0xff0f ) | 0x0080;
 
-    mas_readmem(MAS_BANK_D1, 0xff7, &mas_version_code, 1);
-    
-    mas_writereg(0x3b, 0x20); /* Don't ask why. The data sheet doesn't say */
-    mas_run(1);
-    sleep(HZ);
-
-    /* Clear the upper 12 bits of the 32-bit samples */
-    mas_writereg(0xc5, 0);
-    mas_writereg(0xc6, 0);
-    
-    /* We need to set the PLL for a 14.1318MHz crystal */
-    if(mas_version_code == 0x0601) /* Version F10? */
-    {
-        val = 0x5d9d0;
-        mas_writemem(MAS_BANK_D0, 0x32d, &val, 1);
-        val = 0xfffceceb;
-        mas_writemem(MAS_BANK_D0, 0x32e, &val, 1);
-        val = 0x0;
-        mas_writemem(MAS_BANK_D0, 0x32f, &val, 1);
-        mas_run(0x475);
-    }
-    else
-    {
-        val = 0x5d9d0;
-        mas_writemem(MAS_BANK_D0, 0x36d, &val, 1);
-        val = 0xfffceceb;
-        mas_writemem(MAS_BANK_D0, 0x36e, &val, 1);
-        val = 0x0;
-        mas_writemem(MAS_BANK_D0, 0x36f, &val, 1);
-        mas_run(0xfcb);
-    }
     
-#endif
 
     mp3buflen = mp3end - mp3buf;
 
@@ -3226,19 +2070,13 @@
     create_thread(mpeg_thread, mpeg_stack,
                   sizeof(mpeg_stack), mpeg_thread_name);
 
-#ifdef HAVE_MAS3507D
+    //We are going to check for the DEMAND signal every 1ms
     mas_poll_start(1);
 
-    mas_writereg(MAS_REG_KPRESCALE, 0xe9400);
-    dac_enable(true);
+    //Turn DAC On
+    dac_config(0x04);
 
     mpeg_sound_channel_config(channel_config);
-#endif
-
-#ifdef HAVE_MAS3587F
-    ICR &= ~0x0010; /* IRQ3 level sensitive */
-    PACR1 = (PACR1 & 0x3fff) | 0x4000; /* PA15 is IRQ3 */
-#endif
 
     /* Must be done before calling mpeg_sound_set() */
     mpeg_is_initialized = true;
@@ -3248,26 +2086,13 @@
     mpeg_sound_set(SOUND_BALANCE, balance);
     mpeg_sound_set(SOUND_VOLUME, volume);
     
-#ifdef HAVE_MAS3587F
-    mpeg_sound_channel_config(channel_config);
-    mpeg_sound_set(SOUND_LOUDNESS, loudness);
-    mpeg_sound_set(SOUND_SUPERBASS, bass_boost);
-    mpeg_sound_set(SOUND_AVC, avc);
-#endif
 #endif /* !SIMULATOR */
 
     memset(id3tags, sizeof(id3tags), 0);
     memset(_id3tags, sizeof(id3tags), 0);
 
-#ifdef HAVE_MAS3587F
-    if(read_hw_mask() & PR_ACTIVE_HIGH)
-        inverted_pr = true;
-    else
-        inverted_pr = false;
-#endif
-    
 #ifdef DEBUG
-    dbg_timer_start();
-    dbg_cnt2us(0);
+//    dbg_timer_start();
+//    dbg_cnt2us(0);
 #endif
 }
diff -rubBP /home/dast/src/rockbox/firmware/panic.c ./firmware/panic.c
--- /home/dast/src/rockbox/firmware/panic.c	Thu Jan 16 12:17:55 2003
+++ ./firmware/panic.c	Wed Oct 29 15:12:21 2003
@@ -1,36 +1,12 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: panic.c,v 1.14 2002/11/12 09:04:06 zagor Exp $
- *
- * Copyright (C) 2002 by wavey@wavey.org
- *nn
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 #include "panic.h"
 #include "lcd.h"
-#include "font.h"
 #include "debug.h"
-#include "led.h"
 
 static char panic_buf[128];
 
-/*
- * "Dude. This is pretty fucked-up, right here." 
- */
 void panicf( char *fmt, ...)
 {
     va_list ap;
@@ -46,35 +22,14 @@
     vsnprintf( panic_buf, sizeof(panic_buf), fmt, ap );
     va_end( ap );
 
-#ifdef HAVE_LCD_CHARCELLS
-    lcd_double_height(false);
     lcd_puts(0,0,"*PANIC*");
     lcd_puts(0,1,panic_buf);
-#elif defined(HAVE_LCD_BITMAP)
-    lcd_clear_display();
-    lcd_setfont(FONT_SYSFIXED);
-    lcd_puts(0,0,"*PANIC*");
-    {
-        /* wrap panic line */
-        int i, y=1, len = strlen(panic_buf);
-        for (i=0; i<len; i+=18) {
-            unsigned char c = panic_buf[i+18];
-            panic_buf[i+18] = 0;
-            lcd_puts(0,y++,panic_buf+i);
-            panic_buf[i+18] = c;
-        }
-    }
-    lcd_update();
 
-#else
-    /* no LCD */
-#endif
     DEBUGF(panic_buf);
     while (1)
     {
 #ifndef SIMULATOR
         volatile int i;
-        led (state);
         state = state?false:true;
         
         for (i = 0; i < 400000; ++i);
Only in /home/dast/src/rockbox/firmware: powermgmt.c
Only in /home/dast/src/rockbox/firmware: rolo.c
diff -rubBP /home/dast/src/rockbox/firmware/system.c ./firmware/system.c
--- /home/dast/src/rockbox/firmware/system.c	Wed Nov 19 07:34:43 2003
+++ ./firmware/system.c	Wed Oct 29 15:12:21 2003
@@ -1,29 +1,8 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: system.c,v 1.21 2003/10/27 10:30:12 linusnielsen Exp $
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdio.h>
 #include "config.h"
 
 #include "lcd.h"
-#include "font.h"
-#include "led.h"
 #include "system.h"
-#include "rolo.h"
 
 #define default_interrupt(name,number) \
   extern __attribute__((weak,alias("UIE" #number))) void name (void); void UIE##number (void)
@@ -328,9 +307,7 @@
     
     /* clear screen */
     lcd_clear_display ();
-#ifdef HAVE_LCD_BITMAP
-    lcd_setfont(FONT_SYSFIXED);
-#endif
+
     /* output exception */
     n = (n - (unsigned)UIE0 - 4)>>2; /* get exception or interrupt number */
     snprintf(str,sizeof(str),"I%02x:%s",n,irqname[n]);
@@ -338,26 +315,14 @@
     snprintf(str,sizeof(str),"at %08x",pc);
     lcd_puts(0,1,str);
 
-#ifdef HAVE_LCD_BITMAP
-    lcd_update ();
-#endif
 
     while (1)
     {
         volatile int i;
-        led (state);
         state = state?false:true;
         
         for (i = 0; i < 240000; ++i);
 
-        /* try to restart firmware if ON is pressed */
-#ifdef HAVE_LCD_CHARCELLS
-        if (!(PADR & 0x20))
-            rolo_load("/archos.mod");
-#else
-        if (!(PBDR & PBDR_BTN_ON))
-            rolo_load("/ajbrec.ajz");
-#endif
     }
 }
 
@@ -485,17 +450,11 @@
     /* NMI level low, falling edge on all interrupts */
     ICR = 0;
 
-    /* Enable burst mode on DRAM */
-    DCR |= 0x1000;
-
+    PAIOR &= ~0x800;
     /* Activate Warp mode (simultaneous internal and external mem access) */
     BCR |= 0x2000;
-
-    /* Bus state controller initializations. These are only necessary when
-       running from flash. The correct settings for player models are not
-       verified, so we only do this for the recorder. */
-#ifdef HAVE_RECORDING
-    WCR1 = 0x4000; /* Long wait states for CS6 (ATA), short for the rest. */
-    WCR3 = 0x8000; /* WAIT is pulled up, 1 state inserted for CS6 */
-#endif
 }
+
+
+
+
Only in /home/dast/src/rockbox/firmware: test
diff -rubBP /home/dast/src/rockbox/firmware/thread.c ./firmware/thread.c
--- /home/dast/src/rockbox/firmware/thread.c	Sun Mar 16 22:36:48 2003
+++ ./firmware/thread.c	Wed Oct 29 15:12:21 2003
@@ -1,21 +1,3 @@
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
- *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id: thread.c,v 1.27 2003/03/12 15:30:55 zagor Exp $
- *
- * Copyright (C) 2002 by Ulf Ralberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
 #include <stdbool.h>
 #include "thread.h"
 #include "panic.h"
Only in /home/dast/src/rockbox/firmware: usb.c
Only in /home/dast/src/rockbox/firmware: win32.mak
Only in /home/dast/src/rockbox: flash
Only in /home/dast/src/rockbox: gdb
Only in /home/dast/src/rockbox/tools: CVS
Only in /home/dast/src/rockbox/tools: FILES
diff -rubBP /home/dast/src/rockbox/tools/Makefile ./tools/Makefile
--- /home/dast/src/rockbox/tools/Makefile	Tue Sep 23 08:13:09 2003
+++ ./tools/Makefile	Wed Oct 29 15:12:29 2003
@@ -1,32 +1,9 @@
-#             __________               __   ___.
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/
-# $Id: Makefile,v 1.14 2003/09/22 08:13:28 zagor Exp $
-#
-CFLAGS := -O -ansi
+all: add_header sh2d
 
-TARGETS := scramble descramble sh2d bmp2rb convbdf generate_rocklatin
-
-all: $(TARGETS)
-
-scramble: scramble.c
-
-descramble: descramble.c
+add_header: add_header.c add_header.h
+	gcc -o add_header add_header.c
 
 sh2d: sh2d.c
 
-bmp2rb:	bmp2rb.c
-	$(CC) -DAPPLICATION_NAME=\"$@\" -g $+ -o $@
-
-convbdf: convbdf.c
-	$(CC) -g $+ -o $@
-
-generate_rocklatin: generate_rocklatin.c ../firmware/drivers/lcd-player-charset.c 
-	$(CC) -DHAVE_LCD_CHARCELLS -I../firmware/export -g $+ -o $@
-
 clean:
-	rm -f $(TARGETS) $(shell for f in $(TARGETS) ; do echo $$f.exe $$f.o $$f.obj ; done) *.ajf *~
-
+	rm -f add_header add_header.exe sh2d sh2d.o sh2d.obj add_header.o add_header.obj *~
diff -rubBP /home/dast/src/rockbox/tools/add_header.c ./tools/add_header.c
--- /home/dast/src/rockbox/tools/add_header.c	Thu Jan  1 01:00:00 1970
+++ ./tools/add_header.c	Wed Oct 29 15:12:29 2003
@@ -0,0 +1,94 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "add_header.h"
+
+int main (int argc, char** argv)
+{
+    unsigned long length,i,slen;
+    unsigned char *inbuf;//,*outbuf;
+    unsigned short checksum=0;
+    unsigned char *iname = argv[1];
+    unsigned char *oname = argv[2];
+    unsigned char header[17];
+    FILE* file;
+
+    if (argc < 3) {
+       printf("usage: %s <input file> <output file>\n",argv[0]);
+       return -1;
+    }
+
+    /* open file */
+    file = fopen(iname,"rb");
+    if (!file) {
+       perror(iname);
+       return -1;
+    }
+    fseek(file,0,SEEK_END);
+    length = ftell(file);
+    length = (length + 3) & ~3; /* Round up to nearest 4 byte boundary */
+    
+    if (length >= 0x32000) {
+        printf("error: max firmware size is 200KB!\n");
+        fclose(file);
+        return -1;
+    }
+    
+    fseek(file,0,SEEK_SET); 
+    inbuf = malloc(length);
+//    outbuf = malloc(length);
+    if ( !inbuf ) {//|| !outbuf ) {
+       printf("out of memory!\n");
+       return -1;
+    }
+
+    /* read file */
+    i=fread(inbuf,1,length,file);
+    if ( !i ) {
+       perror(iname);
+       return -1;
+    }
+    fclose(file);
+
+    /* calculate checksum */
+    for (i=0;i<length;i++)
+       checksum+=inbuf[i];
+
+    /* make header */
+    memset(header, 0, sizeof(header));
+    strncpy(header,MY_FIRMWARE_TYPE,9);
+    header[9]='\0'; /*shouldn't have to, but to be SURE */
+    header[10]=MY_HEADER_VERSION&0xFF;
+    header[11]=(checksum>>8)&0xFF;
+    header[12]=checksum&0xFF;
+    header[13]=(sizeof(header)>>24)&0xFF;
+    header[14]=(sizeof(header)>>16)&0xFF;
+    header[15]=(sizeof(header)>>8)&0xFF;
+    header[16]=sizeof(header)&0xFF;
+
+    /* write file */
+    file = fopen(oname,"wb");
+    if ( !file ) {
+       perror(oname);
+       return -1;
+    }
+    if ( !fwrite(header,sizeof(header),1,file) ) {
+       perror(oname);
+       return -1;
+    }
+    if ( !fwrite(inbuf,length,1,file) ) {
+       perror(oname);
+       return -1;
+    }
+    fclose(file);
+    
+    free(inbuf);
+//    free(outbuf);
+
+    printf("\r\nHeader Info:\r\n\t"
+           "Header Type:\t\t%s\r\n\t"
+           "Header Version:\t\t%d\r\n\t"
+           "Header Checksum:\t0x%x\r\n\t"
+           "Data Start:\t\t0x%x\r\n\r\n",
+           header,header[10],checksum,sizeof(header));
+    return 0;
+}
diff -rubBP /home/dast/src/rockbox/tools/add_header.h ./tools/add_header.h
--- /home/dast/src/rockbox/tools/add_header.h	Thu Jan  1 01:00:00 1970
+++ ./tools/add_header.h	Wed Oct 29 15:12:29 2003
@@ -0,0 +1,4 @@
+#include <stdio.h>
+
+#define MY_FIRMWARE_TYPE  "OPENNEO35"
+#define MY_HEADER_VERSION 1
Only in /home/dast/src/rockbox/tools: binlang
Only in /home/dast/src/rockbox/tools: bmp2rb
Only in /home/dast/src/rockbox/tools: bmp2rb.c
diff -rubBP /home/dast/src/rockbox/tools/configure ./tools/configure
--- /home/dast/src/rockbox/tools/configure	Wed Nov 26 15:10:21 2003
+++ ./tools/configure	Mon Nov 24 03:48:24 2003
@@ -1,13 +1,6 @@
 #!/bin/sh
-#             __________               __   ___.
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/
-# $Id: configure,v 1.54 2003/11/26 14:10:21 bagder Exp $
-#
 
+# Open Neo configure script
 
 #
 # Begin Function Definitions
@@ -17,107 +10,6 @@
     echo $response
 }
 
-whichsim () {
-
-if [ -z "$simver" ]; then
-
-  ##################################################################
-  # Figure out win32/x11 GUI
-  #
-  echo ""
-  echo "Build (W)in32 or  (X)11 GUI version? (X)"
-
-  option=`input`;
-
-  case $option in
-   [Ww])
-     simver="win32"
-     ;;
-   *)
-     simver="x11"
-     ;;
-   esac
-   echo "Selected $simver simulator"
-fi
-}
-
-
-simul () {
-
- ##################################################################
- # Figure out where the firmware code is!
- #
-
- # a file to check for in the uisimulator root dir
- simfile="$simver/lcd-$simver.c" 
-
- for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
-   if [ -f "$dir/$simfile" ]; then
-     simdir="$dir/$simver"
-     break
-   fi
- done
-
- if [ -z "$simdir" ]; then
-   echo "This script couldn't find your uisimulator/$simver directory. Please enter the"
-   echo "full path to your uisimulator/$simver directory here:"
-
-   simdir=`input`
- fi
-
-sed > Makefile \
- -e "s,@SIMDIR@,${simdir},g" \
- -e "s,@TOOLSDIR@,${toolsdir},g" \
- -e "s,@TARGET@,${target},g" \
- -e "s,@ARCHOS@,${archos},g" \
- -e "s,@DEBUG@,${debug},g" \
- -e "s,@DISPLAY@,${display},g" \
- -e "s,@KEYPAD@,${keypad},g" \
- -e "s,@PWD@,${pwd},g" \
- -e "s,@LANGUAGE@,${language},g" \
- -e "s,@SIMVER@,${simver},g" \
-<<EOF 
-## Automaticly generated. http://rockbox.haxx.se
-
-ARCHOS=@ARCHOS@
-SIMDIR=@SIMDIR@
-TOOLSDIR=@TOOLSDIR@
-DEBUG=@DEBUG@
-TARGET=@TARGET@
-DISPLAY=@DISPLAY@
-KEYPAD=@KEYPAD@
-THISDIR="@PWD@"
-SIMVER=@SIMVER@
-LANGUAGE=@LANGUAGE@
-VERSION=\$(shell date +%y%m%d-%H%M)
-
-.PHONY: 
-
-all: sim
-
-sim:
-	\$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE)
-
-clean:
-	\$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean
-
-tags:
-	@rm -f TAGS
-	make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) tags
-
-EOF
-
-  echo "Created Makefile"
-
-  if [ -d "archos" ]; then
-    echo "sub directory archos already present"
-  else
-    mkdir archos
-    echo "created an archos subdirectory for simulating the hard disk"
-  fi
-
-}
-
 picklang() {
     # figure out which languages that are around
     for file in $appsdir/lang/*.lang; do
@@ -151,12 +43,11 @@
 # Beging Build Script
 #
 
-target=$1
-debug=$2
+debug=$1
 
 if test "$1" = "--help"; then
-  echo "Rockbox configure script."
-  echo "Invoke this in a directory to generate a Makefile to build Rockbox"
+  echo "Open Neo configure script."
+  echo "Invoke this in a directory to generate a Makefile to build the Open Neo Project"
   echo "Do *NOT* run this within the tools directory!"
   exit
 fi
@@ -165,7 +56,7 @@
  # this is a check for a configure script in the current directory, it there
  # is one, try to figure out if it is this one!
 
- if { grep "^#   Jukebox" configure >/dev/null 2>&1 ; } then
+ if { grep "^# Open Neo configure script" configure >/dev/null 2>&1 ; } then
    echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
    echo "It will only cause you pain and grief. Instead do this:"
    echo ""
@@ -179,8 +70,8 @@
  fi
 fi
 
-if [ "$target" = "--help" -o \
-     "$target" = "-h" ]; then
+if [ "$debug" = "--help" -o \
+     "$debug" = "-h" ]; then
   echo "Just invoke the script and answer the questions."
   echo "This script will write a Makefile for you"
   exit
@@ -189,140 +80,86 @@
 # get our current directory
 pwd=`pwd`;
 
-if [ "$target" = "update" ]; then
+if [ "$debug" = "update" ]; then
   update="1"
-  target=""
+  target=$2
   if [ -f Makefile ]; then
     if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then
       echo "Existing generated Makefile found. Getting defaults from it."
-      archos=`grep "^ARCHOS=" Makefile | cut -d= -f2-`
-      target=`grep "^TARGET=" Makefile | cut -d= -f2-`
       debug=`grep "^DEBUG=" Makefile | cut -d= -f2-`
       language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-`
-      memory=`grep "^MEMORYSIZE=" Makefile | cut -d= -f2-`
-
-      if [ "$debug" = "SIMULATOR=1" ]; then
-        simulator="yes"
-        display=`grep "^DISPLAY=" Makefile | cut -d= -f2-`
-        keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-`
-        simver=`grep "^SIMVER=" Makefile | cut -d= -f2-`
-      fi
+      extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-`
     fi
   fi
 else
 
-echo "This script will setup your Rockbox build environment."
-echo "Further docs here: http://rockbox.haxx.se/docs/"
+echo "This script will setup your Open Neo build environment."
+echo "Further docs here: http://www.ssiamerica.com/open/"
 echo ""
 
 fi
 
-if [ -z "$archos" ]; then
-
-##################################################################
-# Figure out target platform
-#
-
-  echo "Enter target platform: (defaults to Recorder)"
-
-  echo "1 - Archos Player/Studio"
-  echo "2 - Archos Recorder"
-  echo "3 - Archos FM Recorder"
-  echo "4 - Archos Recorder v2"
-
-  getit=`input`;
-
-  case $getit in
-
-   1)
-    archos="player"
-    target="-DARCHOS_PLAYER"
-    display="-DHAVE_LCD_CHARCELLS"
-    keypad="-DHAVE_PLAYER_KEYPAD"
-    ;;
+if [ -z "$debug" ]; then
+  ##################################################################
+  # Figure out debug on/off
+  #
+  echo "Build (N)ormal or (D)ebug? (N)"
 
-   3)
-    archos="fmrecorder"
-    target="-DARCHOS_FMRECORDER"
-    display="-DHAVE_LCD_BITMAP"
-    keypad="-DHAVE_RECORDER_KEYPAD"
-    ;;
+  option=`input`;
 
-   4)
-    archos="recorderv2"
-    target="-DARCHOS_RECORDERV2"
-    display="-DHAVE_LCD_BITMAP"
-    keypad="-DHAVE_RECORDER_KEYPAD"
+  case $option in
+    [Dd])
+      debug="DEBUG=1"
+      echo "Debug build selected"
     ;;
-
    *)
-    archos="recorder"
-    target="-DARCHOS_RECORDER"
-    display="-DHAVE_LCD_BITMAP"
-    keypad="-DHAVE_RECORDER_KEYPAD"
+      debug="NODEBUG=1"
+      echo "Normal build selected"
     ;;
 
   esac
-
-  echo "Platform set to $archos"
-
+  echo ""
+  echo ""
 fi
 
-if [ -z "$memory" ]; then
-  size="2"
-  if [ -z "$update" ]; then
-    echo "Enter size of your RAM (in MB): (defaults to 2)"
-    size=`input`;
-  fi
+if [ -z "$target" ]; then
 
-  case $size in
-   8)
-    memory="8"
-    ;;
-   *)
-    memory="2"
-    ;;
+  echo "Enter target platform: (defaults to Neo 35)"
 
-  esac
-  echo "Memory size selected: $memory MB"
-fi
+  echo "1 - Neo 35"
+  echo "2 - mStation (No Stop Button)"
 
-if [ -z "$debug" ]; then
-  ##################################################################
-  # Figure out debug on/off
-  #
-  echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)"
+  getit=`input`;
 
-  option=`input`;
+  case $getit in
 
-  case $option in
-    [Ss])
-      debug="SIMULATOR=1"
-      simulator="yes"
-      echo "Simulator build selected"
-      whichsim
-      ;;
-    [Dd])
-      debug="DEBUG=1"
-      echo "Debug build selected"
+   2)
+    platform="mStation"
+    target="-DMSTATION"
       ;;
+
     *)
-      debug="NODEBUG=1"
-      echo "Normal build selected"
+    platform="Neo 35"
+    target="-DNEO35"
       ;;
 
   esac
+
+  echo "Platform set to $platform"
+  echo ""
+  echo ""
+
 fi
 
 ##################################################################
 # Figure out where the firmware code is!
 #
 
-firmfile="crt0.S" # a file to check for in the firmware root dir
+firmfile="app.lds" # a file to check for in the firmware root dir
 
-for dir in firmware . .. ../firmware ../../firmware; do
+for dir in firmware . .. ../firmware ../../firmware ../openneo/firmware; do
   if [ -f $dir/$firmfile ]; then
-    firmdir=$dir
+    firmdir="`pwd`/$dir"
     break
   fi
 done
@@ -338,11 +175,11 @@
 # Figure out where the apps code is!
 #
 
-appsfile="credits.c" # a file to check for in the apps root dir
+appsfile="main_menu.c" # a file to check for in the apps root dir
 
-for dir in apps . .. ../apps ../../apps $firmdir/apps $firmdir/../apps; do
+for dir in apps . .. ../apps ../../apps ../openneo/apps $firmdir/apps $firmdir/../apps; do
     if [ -f $dir/$appsfile ]; then
-        appsdir=$dir
+        appsdir="`pwd`/$dir"
         break
     fi
 done
@@ -358,32 +195,16 @@
 # Figure out where the tools directory is!
 #
 
-toolsfile="descramble.c" # a file to check for in the tools root dir
+toolsfile="sh2d.c" # a file to check for in the tools root dir
 
-for dir in tools . .. ../tools ../../tools $firmdir/tools $firmdir/../tools; do
+for dir in tools . .. ../tools ../../tools ../openneo/tools $firmdir/tools $firmdir/../tools; do
     if [ -f $dir/$toolsfile ]; then
-        toolsdir="$dir"
+        toolsdir="`pwd`/$dir"
         break
     fi
 done
 
 if [ -z "$toolsdir" ]; then
-  # no file found, check if (some of) the necessary tools are in the PATH
-  # already
-
-  toolsexe="scramble"
-
-  for dir in `echo $PATH | tr ':' ' '`; do
-    if [ -x "$dir/$toolsexe" ]; then
-       echo "found $toolsexe in $dir"
-       toolsdir="$dir"
-       break
-    fi
-  done
-
-fi
-
-if [ -z "$toolsdir" ]; then
     echo "This script couldn't find your tools directory. Please enter the"
     echo "full path to the tools directory here:"
 
@@ -404,45 +225,39 @@
     echo "Language set to $language"
 fi
 
-if [ "yes" = "$simulator" ]; then
-    # we have already dealt with the simulator Makefile separately
-    simul
-    exit
-fi
-
 sed > Makefile \
  -e "s,@FIRMDIR@,${firmdir},g" \
  -e "s,@APPSDIR@,${appsdir},g" \
  -e "s,@TOOLSDIR@,${toolsdir},g" \
- -e "s,@DEBUG@,${debug},g" \
- -e "s,@MEMORY@,${memory},g" \
  -e "s,@TARGET@,${target},g" \
- -e "s,@ARCHOS@,${archos},g" \
+ -e "s,@DEBUG@,${debug},g" \
  -e "s,@LANGUAGE@,${language},g" \
  -e "s,@PWD@,${pwd},g" \
 <<EOF 
-## Automaticly generated. http://rockbox.haxx.se
+## Automaticly generated. http://www.ssiamerica.com/open/
 
 FIRMDIR=@FIRMDIR@
 APPSDIR=@APPSDIR@
 TOOLSDIR=@TOOLSDIR@
 DEBUG=@DEBUG@
-ARCHOS=@ARCHOS@
 TARGET=@TARGET@
 THISDIR="@PWD@"
 LANGUAGE=@LANGUAGE@
-MEMORYSIZE=@MEMORY@
-VERSION=\$(shell date +%y%m%d-%H%M)
+VERSION="\"1.00 Beta-2 RC1\""
+BUILD=\$(shell date +20%y-%m-%d)
 
 .PHONY: firmware apps
 
-all: firmware apps
+all: tools firmware apps
 
 firmware:
-	\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)
+	\$(MAKE) -C \$(FIRMDIR) \$(DEBUG) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) TOOLSDIR=\$(TOOLSDIR)
 
 apps:
-	\$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)
+	\$(MAKE) -C \$(APPSDIR) \$(DEBUG) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) BUILD=\$(BUILD) LANGUAGE=\$(LANGUAGE) TOOLSDIR=\$(TOOLSDIR)
+
+tools:
+	\$(MAKE) -C \$(TOOLSDIR)
 
 clean-firmware:
 	\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean
Only in /home/dast/src/rockbox/tools: convbdf
Only in /home/dast/src/rockbox/tools: convbdf.c
Only in /home/dast/src/rockbox/tools: descramble
Only in /home/dast/src/rockbox/tools: descramble.c
Only in /home/dast/src/rockbox/tools: generate_rocklatin
Only in /home/dast/src/rockbox/tools: generate_rocklatin.c
Only in /home/dast/src/rockbox/tools: release
Only in /home/dast/src/rockbox/tools: rockbox-style.el
Only in /home/dast/src/rockbox/tools: sample.emacs
Only in /home/dast/src/rockbox/tools: scramble
Only in /home/dast/src/rockbox/tools: scramble.c
Only in /home/dast/src/rockbox/tools: sh2d
diff -rubBP /home/dast/src/rockbox/tools/sh2d.c ./tools/sh2d.c
--- /home/dast/src/rockbox/tools/sh2d.c	Thu Mar 28 15:42:40 2002
+++ ./tools/sh2d.c	Wed Oct 29 15:12:29 2003
@@ -4,7 +4,7 @@
  * Public domain
  *
  * Some changes by Björn Stenberg <bjorn@haxx.se>
- * $Id: sh2d.c,v 1.2 2002/03/28 14:42:40 zagor Exp $
+ * $Id: sh2d.c,v 1.1.1.1 2003/10/29 14:12:29 knobby2346 Exp $
  */
 
 
Only in /home/dast/src/rockbox/tools: win32.mak
Only in /home/dast/src/rockbox: uisimulator
Only in /home/dast/src/rockbox: www
