Rockbox

Tasklist

FS#11898 - This is a preliminary patch to add keymaps needed for plugin on the android port

Attached to Project: Rockbox
Opened by foolsh (BenjaminBrown) - Friday, 21 January 2011, 18:43 GMT
Task Type Patches
Category Playlists
Status Unconfirmed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Release 3.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This is a preliminary patch to add the key maps needed to compile plugins for the android port. It is mostly complete.

You will need to change plugins="yes" line 2790 of file /tools/configure but this breaks the sdl port.

Most plugins seem to work well some don't, I have not tested all plugins yet but will start as soon I post this.

To Do:
add a section to tools/configure that defines plugins="yes" for the android port and "no" for the sdl port

Testing testing testing

Warning
This patch probably breaks some targets because of logo.c defaulting to a generic keymap which I changed "commented out" and added #error No keymaps defined! so the compiler will not just over look it. Let me know what breaks and I will try to fix it.
This task depends upon

Comment by foolsh (BenjaminBrown) - Friday, 21 January 2011, 18:53 GMT
I forgot about this one.
Apply over the first patch
fixes a missing BUTTON_MAIN issue not sure my fix is the right one
Comment by foolsh (BenjaminBrown) - Friday, 21 January 2011, 19:19 GMT
BTW my target's screen size is 240x340 so rockbox had bitmaps and code ready for me. other targets with "non rockbox standard" screen sizes will have trouble compiling.
Comment by Thomas Martitz (kugel.) - Friday, 21 January 2011, 20:02 GMT
The use of the DPAD isn't going to work well, as more and more devices come without one (see Nexus S).

I'm thinking it makes more sense to work on making the plugins touchscreen aware (not using the grid mode, of course). As this is a lot of work and takes time we can probably do it one by one (perhaps with a seperate SOURCES.android)
Comment by foolsh (BenjaminBrown) - Saturday, 22 January 2011, 04:29 GMT

Some games are more enjoyable with a touch screen. Also some seem unplayable using the touch screen, so it's in my mind its win/win. They will probably always make at least one model with a flip out keyboard. I could not see myself buying one without this feature. And in that case redirecting the keymaps to those targets is halfway done now. Well zxbox could really make use of the extra keys. Besides this patch is intended to just get the darn thing compiled with plugin="yes" enabled. Also if the work being done toward making rockbox screen size independent gets committed most plugins will have to be touched up to compile without error any way.

Anyone have any ideas about logo.c and it's generic keymap?
In button-target.h, any thoughts about BUTTON_MAIN as 0x00000040 because BUTTON_DPAD_CENTER is 0x00000040 as well, would this cause problems?
Comment by foolsh (BenjaminBrown) - Saturday, 22 January 2011, 07:16 GMT
ROLL UP PATCH apply only this patch

Still not sure about logo.c using a default key map instead of giving error
Changed the androids button-target.h to say #define BUTTON_MAIN BUTTON_DPAD_CENTER duh I feel stupid
This patch also adds android key maps to pluginlib_actions.c most plugins us this and even if your android target has no DPAD the menu and back keys behave as you would expect.

You still have to change plugins="yes" line 2790 of file /tools/configure, maybe I'll work this out tonight.
Comment by foolsh (BenjaminBrown) - Saturday, 22 January 2011, 10:20 GMT
Here are some test results, as to which input method works i.e. touchscreen dpad for which plugin
As well as if the back button functions as exit/back
Is it 4 am already?
Comment by Thomas Martitz (kugel.) - Saturday, 22 January 2011, 15:23 GMT
What are the touchscreen tests based on? Hopefully not the grid mode.
Comment by foolsh (BenjaminBrown) - Saturday, 22 January 2011, 16:23 GMT
The touchscreen test are for whatever was there before I got hold of it. The tests were to basically let me see where the state of affairs are concerning which plugin needs what.
This patch is mainly for only the keymaps, you know, so we can press back or menu from a plugin and it performs the appropriate action, and yes play games with dpad for those targets that have one.

I dissected my first patch and separated out patches according to what did what. So here it is to make this final patch work you need to use patches  FS#11899  ,the final patch I'm up loading now, then  FS#11900  and  FS#11901 . Also you still need to change plugins="yes" line 2790 of file /tools/configure before you run configure.

If things look good to the Devs could one commit these changes and I'll get started on fixing some plugins that don't work for the android.
These patches do not enable plugins="yes" so it should not interfere with anybody else's work at the moment.


Comment by foolsh (BenjaminBrown) - Sunday, 23 January 2011, 05:04 GMT
PLUGIN_KEYMAPS_ANDROID_UPDATED.patch
- I fixed my white space, removed personal comments, remapped alot of keys to make them more intuitive, updated the helper text where applicable, and removed lots of *_PRE defines I just didn't need.

button-target.h_ANDROID_DEFINE_BUTTON_MAIN.patch
- just adds a BUTTON_MAIN to /firmware/target/hosted/android/apps/button_target.h. I guess it is from some older unified keymap scheme. rockboy fails to build without it.

With these two patches enabling plugins="yes" line 2790 of file /tools/configure will compile cleanly without error or warning against current svn for the android target.

To Do:
none
Comment by foolsh (BenjaminBrown) - Monday, 24 January 2011, 03:40 GMT
Turns out having a default catch all is sometimes a useful thing.

These patches allow compiling with plugin="yes" on all arbitrary screen sizes from 240x320 and up.
While not explicitly for the android target they are still in line (patch after) with the above patches. If you like I can fix that and resubmit it.
The logic should not interfere with any existing targets but the effected plugins still need some TLC.
note - All targets above 640x480 default to 640x480 bitmaps

3-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-bitmaps-native-SOURCES.patch
4-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bitmaps-mono-SOURCES.patch
5-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bitmaps-native-SOURCES.patch
6-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bubbles.c.patch
7-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-invadrox.c.patch
8-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-rockblox.c.patch
9-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-sudoku-sudoku.c.patch

Todo:
bubbles.c, invadrox.c rockblox.c, sudoku.c need bug tested and fixed up

Comment by foolsh (BenjaminBrown) - Monday, 24 January 2011, 04:09 GMT
Opps wormlet should have been a seperate patch
* add wormlet to to do list
Comment by foolsh (BenjaminBrown) - Monday, 24 January 2011, 12:10 GMT
Better corrected Keymaps patch sans logo.c for now
Comment by foolsh (BenjaminBrown) - Monday, 24 January 2011, 13:55 GMT
crap.. wrong file even this one is clean no work a rounds if you like it please commit and close this FS entry and i'll open a new FS for screen size invariance.
Comment by foolsh (BenjaminBrown) - Wednesday, 26 January 2011, 18:54 GMT
I just checked these are synced with r29143, however I am going to retest the layouts again.
Comment by foolsh (BenjaminBrown) - Wednesday, 26 January 2011, 19:30 GMT
I forgot the file again
Comment by foolsh (BenjaminBrown) - Saturday, 29 January 2011, 19:41 GMT
Due to the way Android handles the interrupt lines for keyUp and keyDown as of API 1.5/6. If you have a DPAD you can use the last patch on FS#11903, sorry for all the comments and patches, and the last one here too, to enable plugin controls.
If a Developer can look at the second to the last one on this page, with the BUTTON_REL work around, so menu, back and track pad can be added to the plugins controls.
Comment by foolsh (BenjaminBrown) - Saturday, 29 January 2011, 19:50 GMT
Opps I meant third from the last.
Comment by foolsh (BenjaminBrown) - Sunday, 30 January 2011, 08:51 GMT
When FS#11903 is closed the last one here I think is correct.
Comment by foolsh (BenjaminBrown) - Thursday, 03 February 2011, 00:22 GMT
Although incomplete for now, It lets us compile with out errors from missing keymaps.
Comment by foolsh (BenjaminBrown) - Thursday, 03 February 2011, 16:24 GMT
I got gingerbread installed on my wifes tilt 2 last night, and testing these keymaps show that, they need lots of work to be up to snuff for all android variants.

Loading...