Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  gigabeat screen rotation patch
« previous next »
  • Print
Pages: 1 [2] 3

Author Topic: gigabeat screen rotation patch  (Read 14561 times)

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #15 on: April 26, 2007, 07:47:31 PM »
Success! I've got myself a screen rotating gigabeat  :D. Now on to patching, I have to use week old source code though because of the improvements to the gigabeats, any suggestions on the patches I should use, I don't know of any that are special for the gigabeat.
Here's what I'm using so far:
-Scrolling margins                             -random album database
-Album Art                                        - playlist viewer titles
-(BMP resize if/when it gets synced)   - switch playlist/sound settings in WPS context menu  
-one click to insert                             -spider solitaire
-plugin backlight
Logged

Offline Nate!

  • Member
  • *
  • Posts: 235
Re: gigabeat screen rotation patch
« Reply #16 on: April 26, 2007, 08:57:50 PM »
Sweet!  Congrats on your success.  

Are you talking about which patches to use for one of your famous builds?

I personally am pretty simple.  I only use the Album Art and Scrolling Margins patch.  Now I can include the Rotate patch.  

Mad Cow has a build with a bunch of stuff in it.

Thanks for taking the time out to work on this.  Sincerely!
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #17 on: April 26, 2007, 10:38:55 PM »
Sounds good! Maybe you could also add prompt-rtc, which prompts you to set the RTC at startup if it's reset. Maybe pong-multi-pulse a stardict too?

I can't compile a build right now, and maybe for a while as the network card on my compiling computer just decided to die. :( I'd rather have somebody else make a good build rather than me, I'm getting tired of waiting for all of the patches to be synced at the same time.
« Last Edit: April 26, 2007, 10:41:51 PM by Mad Cow »
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #18 on: April 27, 2007, 09:29:19 AM »
Mad Cow, I will be trying to include those patches from your build, I took a read of the tracker pages, and they sound pretty cool. A pong demo that thumps along with my techno will be sweet, and I didn't know stardict can get you wikipedia on your player. And yea the RTC thing helps for the gigabeats because we can turn the power off.
Any other patches I should know about? I do search the tracker often but there's ones that I miss.
Logged

Offline mannequin

  • Member
  • *
  • Posts: 31
Re: gigabeat screen rotation patch
« Reply #19 on: April 27, 2007, 11:21:08 AM »
evilg123, thats great, congrats!

i'd love to add 2 more patches:

New dict plugin: http://www.rockbox.org/tracker/task/6697
MOD player codec: http://www.rockbox.org/tracker/task/5241

both are synced to the current svn.
Logged

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #20 on: April 27, 2007, 03:20:47 PM »
I've uploaded the builds: http://forums.rockbox.org/index.php?topic=10163.0
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #21 on: May 03, 2007, 05:11:54 PM »
You need to first define button mappings, which means you need to find the GPIO data for the UP button, the rest seems pretty self-explanatory. I'm trying it out right now.

EDIT: It oads the rotated binary by default, which is really strange. This is the whole loading part of the bootlaoder:
Code: [Select]
    if (BUTTON_UP) {
         printf("Loading Landscape Mode");
loadbuffer = (unsigned char*) 0x100;
    buffer_size = (unsigned char*)0x400000 - loadbuffer;

    rc=load_firmware(loadbuffer, "/.rockbox_1/rockbox_1.gigabeat", buffer_size);
   
if (rc == EOK)
    {
        kernel_entry = (void*) loadbuffer;
        rc = kernel_entry();
}
         
    } else {
printf("Loading Portrait Mode");
    loadbuffer = (unsigned char*) 0x100;
    buffer_size = (unsigned char*)0x400000 - loadbuffer;

    rc = load_firmware(loadbuffer, "/.rockbox/rockbox.gigabeat", buffer_size);


    if (rc == EOK)
    {
        kernel_entry = (void*) loadbuffer;
        rc = kernel_entry();
    }
}
}


Why does does it not work?
« Last Edit: May 03, 2007, 07:42:34 PM by Mad Cow »
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #22 on: May 03, 2007, 07:38:33 PM »
gcc tells me that the in function whatever 'button_was_held' is uninitialized.
however, I don't know what this means other than something is wrong, but not critical.
To get the exact error, just try to build a bootloader, it makes the .dat but it just loads as usual.
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #23 on: May 03, 2007, 07:42:11 PM »
Quote from: evilg123 on May 03, 2007, 07:38:33 PM
gcc tells me that the in function whatever 'button_was_held' is uninitialized.
however, I don't know what this means other than something is wrong, but not critical.
To get the exact error, just try to build a bootloader, it makes the .dat but it just loads as usual.

There's no "button_was_held" function in the bootloader. You have to define the UP button manually and use that. That's what I did, but it loads the rotated build no matter what, even after some help on IRC.

EDIT: I modified you code a bit, it loads the normal rockbox fine, but only loads the rotated buld halfway before going back to normal. I'll try to fix it later today.

Never mind, it automatically loads to rotated build no matter what, I had the path wrong.
« Last Edit: May 03, 2007, 07:55:21 PM by Mad Cow »
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #24 on: May 03, 2007, 07:55:37 PM »
Cool, glad to hear you are making some progress and getting help on IRC, thanks for your interest in this :D
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #25 on: May 03, 2007, 07:59:44 PM »
Quote from: evilg123 on May 03, 2007, 07:55:37 PM
Cool, glad to hear you are making some progress and getting help on IRC, thanks for your interest in this :D

Well I'm done for today, this thing is really annoying. I don't know C, so I'm pretty much guessing where everything goes.
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: gigabeat screen rotation patch
« Reply #26 on: May 03, 2007, 08:10:54 PM »
don't worry, I am about the same knowledge level when it comes to this stuff. I really should learn C now that I'm done school.
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #27 on: May 03, 2007, 11:59:45 PM »
From looking at code examples, I see no reason why this doesn't work. ???
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: gigabeat screen rotation patch
« Reply #28 on: May 10, 2007, 12:14:03 PM »
GOT IT! ;D

It was the button recognition code that was at fault, not the loading code. Because of this, it loads landscape mode with a press anywhere on the touchpad. It's a bad hack, but it works for now. This bootloader looks for both ".gigabeat" files in their respective folders ".rockbox" and ".rockbox_1"
Download Here

Here's the diff in case anybody is interested:
Code: [Select]
Index: bootloader/gigabeat.c
===================================================================
--- bootloader/gigabeat.c (revision 13369)
+++ bootloader/gigabeat.c (working copy)
@@ -112,13 +112,27 @@
     {
         error(EDISK,rc);
     }
+
+    if(button_read_device()) {
+         printf("Loading Landscape Mode");
+ loadbuffer = (unsigned char*) 0x100;
+    buffer_size = (unsigned char*)0x400000 - loadbuffer;
+
+    rc=load_firmware(loadbuffer, "/.rockbox_1/rockbox_1.gigabeat", buffer_size);
+    
+ if (rc == EOK)
+    {
+        kernel_entry = (void*) loadbuffer;
+        rc = kernel_entry();
+ }
+        
+    } else
+    printf("Loading Portrait Mode");
 
-    printf("Loading firmware");
-
     loadbuffer = (unsigned char*) 0x100;
     buffer_size = (unsigned char*)0x400000 - loadbuffer;
 
-    rc = load_firmware(loadbuffer, BOOTFILE, buffer_size);
+    rc = load_firmware(loadbuffer, "/.rockbox/rockbox.gigabeat", buffer_size);
     if(rc < 0)
         error(EBOOTFILE, rc);
 
@@ -128,4 +142,3 @@
         rc = kernel_entry();
     }
 }
-
« Last Edit: May 10, 2007, 03:51:00 PM by Mad Cow »
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline Nate!

  • Member
  • *
  • Posts: 235
Re: gigabeat screen rotation patch
« Reply #29 on: May 10, 2007, 12:19:00 PM »
Haven't tried it yet, but SWEET!  Thanks for your work!  And again, thanks to MadCow and EvilG for reviving this effort.

*** EDIT ***
Just tried your bootloader:
* patched, and loaded patched build.  
 Â  * I have .rockbox and .rockbox_1 directories.  
 Â  * Made sure I copied the fonts directory over to the .rockbox_1 dir.
* Powered down.
* Turned the battery off and on
* Powered on.
*Hit/held the up "button."

I received some print out of text that I can't really see because it flashes too quickly.  I believe it looks like the info you get when you don't have the bootloader correctly installed or something.  Is there anyway to capture that message?

After error, it loads in portrait mode.  Everything works fine in portrait mode.
« Last Edit: May 10, 2007, 01:50:58 PM by Nate! »
Logged

  • Print
Pages: 1 [2] 3
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  gigabeat screen rotation patch
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.086 seconds with 15 queries.