Index: apps/main.c
===================================================================
--- apps/main.c	(revision 12898)
+++ apps/main.c	(working copy)
@@ -324,11 +324,8 @@
 #endif
     font_init();
     
-#if !defined(TOSHIBA_GIGABEAT_F) || defined(SIMULATOR)
     show_logo();
-#else
-    sleep(1);  /* Weird.  We crash w/o this tiny delay. */
-#endif    
+
     lang_init();
 
 #ifdef DEBUG
Index: bootloader/gigabeat.c
===================================================================
--- bootloader/gigabeat.c	(revision 12898)
+++ bootloader/gigabeat.c	(working copy)
@@ -60,6 +60,8 @@
     GPBCON &= 0x2FFCFF;
     GPBDAT |= 1<<5;
     GPBDAT |= 1<<6;
+    
+    while(1);
 }
 
 
@@ -113,74 +115,88 @@
     return(0);
 }
 
-char buf[256];
-
 void display_instructions(void)
 {
-    lcd_setfont(FONT_SYSFIXED);
     printf("Hold MENU when booting for rescue mode.");
     printf("  \"VOL+\" button to restore original kernel");
     printf("  \"A\" button to load original firmware");
     printf("");
-    printf("FRAME %x TTB %x", FRAME, TTB_BASE);
 }
 
 void * main(void)
 {
     int i;
+    int btn;
+    char buf[256];
     struct partinfo* pinfo;
     unsigned short* identify_info;
     unsigned char* loadbuffer;
     int buffer_size;
-    bool load_original = false;
     int rc;
     int(*kernel_entry)(void);
 
-    bool show_bootsplash = true;
+    btn = button_read_device();
 
-    if(GPGDAT & 2)
-        show_bootsplash = false;
+    lcd_init();
 
-    if(!show_bootsplash) {
-        lcd_init();
-        display_instructions();
-        sleep(2*HZ);
-    }
-    if(GPGDAT & 2) {
-        lcd_init();
+    /* Show verbose debug messages if any button is pressed */
+    if(btn)
+        verbose = true;
+
+
+    lcd_setfont(FONT_SYSFIXED);
+        
+    display_instructions();
+
+    /* Start USB mode if Menu is pressed */
+    if(btn & BUTTON_MENU) {
         printf("Entering rescue mode..");
         go_usb_mode();
-        while(1);
     }
-    if(GPGDAT & 0x10) {
-        lcd_init();
-        load_original = true;
-        printf("Loading original firmware...");
-    }
 
     i = ata_init();
     i = disk_mount_all();
-    if(!show_bootsplash) {
-        printf("disk_mount_all: %d", i);
-    }
-    if(show_bootsplash) {
+    printf("disk_mount_all: %d", i);
+
+    if(!verbose)
+    {
         int fd = open("/bootsplash.raw", O_RDONLY);
-        if(fd < 0)  {
-            show_bootsplash = false;
-            lcd_init();
-            display_instructions();
-        }
-        else {
+        if(fd >= 0)  {
             read(fd, lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT*2);
             close(fd);
             lcd_update();
-            lcd_init();
         }
-    } 
-    /* hold VOL+ to enter rescue mode to copy old image */
-    /* needs to be after ata_init and disk_mount_all    */
-    if(GPGDAT & 4) {
+    }
 
+    identify_info = ata_get_identify();
+    for(i=0; i < 20; i++)
+        ((unsigned short*)buf)[i]=htobe16(identify_info[i+27]);
+    buf[40]=0;
+
+    /* kill trailing space */
+    for(i=39; i && buf[i]==' '; i--)
+        buf[i] = 0;
+
+    printf("Model");
+    printf(buf);
+
+    for(i=0; i < 4; i++)
+        ((unsigned short*)buf)[i]=htobe16(identify_info[i+23]);
+
+    buf[8]=0;
+
+    printf("Firmware");
+    printf(buf);
+
+    pinfo = disk_partinfo(0);
+    printf("Partition 0: 0x%02x %ld MB", pinfo->type, pinfo->size / 2048);
+
+    /* Load the Original Firmware if A is pressed */
+    if (btn & BUTTON_A)
+    {
+        printf("Loading original firmware not supported.");
+        error(0, 0);
+    } else if (btn & BUTTON_VOL_UP) {
         /* Try to restore the original kernel/bootloader if a copy is found */
         printf("Restoring FWIMG01.DAT...");
 
@@ -192,90 +208,30 @@
 
         printf("Now power cycle to boot original");
         while(1);
-    }
+    } else {
+        map_memory();
+        printf("Loading Rockbox...");
 
-    if(!show_bootsplash) {
-        identify_info = ata_get_identify();
-
-        for(i=0; i < 20; i++)
-            ((unsigned short*)buf)[i]=htobe16(identify_info[i+27]);
-
-        buf[40]=0;
-
-        /* kill trailing space */
-        for(i=39; i && buf[i]==' '; i--)
-            buf[i] = 0;
-
-        printf("Model");
-        printf(buf);
-
-        for(i=0; i < 4; i++)
-            ((unsigned short*)buf)[i]=htobe16(identify_info[i+23]);
-
-        buf[8]=0;
-
-        printf("Firmware");
-        printf(buf);
-
-        pinfo = disk_partinfo(0);
-        printf("Partition 0: 0x%02x %ld MB", pinfo->type, pinfo->size / 2048);
-    }
-    /* Load original firmware */
-    if(load_original) {
-        loadbuffer = (unsigned char*)0x30008000;
-        buffer_size =(unsigned char*)0x31000000 - loadbuffer;
-        rc = load_raw_firmware(loadbuffer, "/rockbox.gigabeat", buffer_size);
+        loadbuffer = (unsigned char*) 0x100;
+        buffer_size = (unsigned char*)0x400000 - loadbuffer;
+        
+        rc = load_raw_firmware(loadbuffer, "/.rockbox/" BOOTFILE, buffer_size);
         if(rc < EOK) {
-            printf("Error!");
-            printf("Failed to load original firmware:");
-            printf(strerror(rc));
-            printf("Loading rockbox");
-            sleep(2*HZ);
-            goto load_rockbox;
+            rc = load_raw_firmware(loadbuffer, "/" BOOTFILE, buffer_size);      
         }
-
-        printf("Loaded: %d", rc);
-        sleep(2*HZ);
-
-        (*((int*)0x7000000)) = 333;
-        rc = *((int*)0x7000000+0x8000000);
-        printf("Bank0 mem test: %d", rc);
-        sleep(3*HZ);
-
-        printf("Woops, should not return from firmware!");
-        goto usb;
-    }
-
-load_rockbox:
-    map_memory();
-    if(!show_bootsplash) {
-        printf("Loading Rockbox...");
-    }
-
-    loadbuffer = (unsigned char*) 0x100;
-    buffer_size = (unsigned char*)0x400000 - loadbuffer;
-    rc = load_raw_firmware(loadbuffer, "/.rockbox/rockbox.gigabeat", buffer_size);
-    if(rc < EOK) {
-        rc = load_raw_firmware(loadbuffer, "/rockbox.gigabeat", buffer_size);      
-    }
-    if(rc < EOK) {
-        printf("Error!");
-        printf("Can't load rockbox.gigabeat:");
-        printf(strerror(rc));
-    } else {
-        if(!show_bootsplash) {
+        
+        if(rc < EOK) {
+            printf("Error!");
+            printf("Can't load rockbox.gigabeat:");
+            error(EBOOTFILE, rc);
+        
+        } else {
             printf("Rockbox loaded.");
+            kernel_entry = (void*)loadbuffer;
+            rc = kernel_entry();
+        
         }
-        kernel_entry = (void*) loadbuffer;
-        rc = kernel_entry();
-        printf("Woops, should not return from firmware: %d", rc);
-        goto usb;
     }
-usb:
-    /* now wait in USB mode so the bootloader can be updated */
-    go_usb_mode();
-    while(1);
 
     return((void *)0);
 }
-
Index: bootloader/common.c
===================================================================
--- bootloader/common.c	(revision 12898)
+++ bootloader/common.c	(working copy)
@@ -31,7 +31,7 @@
 /* TODO: Other bootloaders need to be adjusted to set this variable to true
    on a button press - currently only the ipod, H10 and Sansa versions do. */
 #if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \
-    defined(SANSA_E200)
+    defined(SANSA_E200) || defined(GIGABEAT_F)
 bool verbose = false;
 #else
 bool verbose = true;
