Rockbox Development > Starting Development and Compiling
gigabeat screen rotation patch
Mad Cow:
--- 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
--- End quote ---
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.
lights0ut:
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.
Mad Cow:
From looking at code examples, I see no reason why this doesn't work. ???
Mad Cow:
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: ---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();
}
}
-
--- End code ---
Nate!:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version