Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Yes on June 12, 2009, 05:44:20 PM

Title: How would I modify the source for Pacbox?
Post by: Yes on June 12, 2009, 05:44:20 PM
When I run Pacbox the game screen is turned 90 degrees clockwise.  Unfortunately, the controls aren't - they stay oriented for the right side up screen.  I'd like to edit the source of Pacbox so the controls are adjusted for the way I need to hold my Fuze for the screen to be right side up.  How would I do this?  I guess what I need first is the source for Pacbox.  I downloaded the source for Rockbox but I couldn't find it in there.  Could anyone link me to that?

Once I have the source I think I should be able to figure out how to change the buttons.  And then would I have to compile all of Rockbox again, or could I just replace the standard Pacbox with my version?

Thanks!
Title: Re: How would I modify the source for Pacbox?
Post by: froggyman on June 12, 2009, 05:53:32 PM
Well the pacbox source is located at ./apps/plugins/pacbox/

You may also want to consider seeing http://www.rockbox.org/twiki/bin/view/Main/DocsIndex#For_Developers for compiling.

And you should consider posting a .patch of your changes to the FlySpray so others can benifit from from your key-map changes. If it is liked it may even get committed. :)

I think you will have to just make the custom build and install it completely, but I am unsure about this.
Title: Re: How would I modify the source for Pacbox?
Post by: Yes on June 12, 2009, 07:06:03 PM
Alright, I must have been looking at the wrong source cause the one I had didn't have that folder.  I downloaded the most recent build and found what I need.

I think I've figured out what I need to change to change the buttons.  Now I've got to figure out how to recompile it, and then reinstall Rockbox.  And if that works then I'll work on making a patch.

I'll post back if I run into any problems.  Thanks!  ;D

e: I'd like to test this before I put it back on my Fuze, is there anyway I can use the Pacbox ROMs in the simulator?

e2: I just tried compiling it, and when I ran make I got the error /usr/bin/arm-elf-ld: this linker was not configured to use sysroots.  I'm running Arch Linux, if that matters.  Does anyone know whats up?  I suspect it's because my arm-elf-gcc is 4.3.3, not the recommended 4.0.3.  What can I do to get around this?

e3: I've realized that when I run rockboxdev.sh, it asks for the processor type.  I've been saying ARM since it says thats what Sansa is, but doesn't the Fuze use an AMS processor?  How would that change what I do?

e4: Now I'm thinking it's a problem with my export line in .bashrc.  I'm not exactly sure what that's supposed to do, could anyone explain it to me?  My line is 'export PATH=$PATH:/usr/local/arm-elf/bin'.  Does that look right?
Title: Re: How would I modify the source for Pacbox?
Post by: funman on June 23, 2009, 07:23:36 AM
All plugins should work in the simulator

To avoid problems you should use rockboxdev.sh like you say.

The Sansa Fuze and other Sansa AMS are based on a AMS SoC (http://en.wikipedia.org/wiki/System-on-a-chip), this SoC itself is based on an ARM cpu ^^

Yes your PATH look right. PATH is used to find executable programs, so if your program (arm-elf-gcc) isn't in a standard location like /usr, bash won't find it.

To be sure, check what
Code: [Select]
which arm-elf-gcc reports