Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8708 - Cowon D2: Button definitions for plugins and WPS

Attached to Project: Rockbox
Opened by Andreas Müller (andiator) - Sunday, 09 March 2008, 21:13 GMT+2
Last edited by Rob Purchase (shotofadds) - Sunday, 27 April 2008, 18:35 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Cowon D2: Key/Button definitions/mappings for plugins, WPS and setings menu. Alot of '#define' stuff
   d2-button-mapings.patch (38.5 KiB)
 apps/keymaps/keymap-cowond2.c           |   22 ++++++++++++++++++++--
 apps/plugins/blackjack.c                |   15 +++++++++++++++
 apps/plugins/bounce.c                   |    6 ++++++
 apps/plugins/brickmania.c               |    9 +++++++++
 apps/plugins/calculator.c               |   10 ++++++++++
 apps/plugins/chessbox/chessbox.c        |   15 +++++++++++++++
 apps/plugins/chessbox/chessbox_pgn.c    |   16 ++++++++++++++++
 apps/plugins/chessclock.c               |   10 ++++++++++
 apps/plugins/chip8.c                    |    8 ++++++++
 apps/plugins/chopper.c                  |    6 ++++++
 apps/plugins/cube.c                     |   13 +++++++++++++
 apps/plugins/dict.c                     |    2 ++
 apps/plugins/disktidy.c                 |    3 +++
 apps/plugins/doom/i_video.c             |   10 ++++++++++
 apps/plugins/fire.c                     |    7 +++++++
 apps/plugins/fireworks.c                |    3 +++
 apps/plugins/flipit.c                   |   11 +++++++++++
 apps/plugins/invadrox.c                 |    8 ++++++++
 apps/plugins/jewels.c                   |    8 ++++++++
 apps/plugins/jpeg.c                     |   11 +++++++++++
 apps/plugins/logo.c                     |    7 +++++++
 apps/plugins/mandelbrot.c               |   14 ++++++++++++++
 apps/plugins/matrix.c                   |    5 +++++
 apps/plugins/mazezam.c                  |   12 ++++++++++++
 apps/plugins/midi/midiplay.c            |    9 +++++++++
 apps/plugins/minesweeper.c              |    8 ++++++++
 apps/plugins/mosaique.c                 |    5 +++++
 apps/plugins/mp3_encoder.c              |    5 +++++
 apps/plugins/mpegplayer/mpeg_settings.c |   10 ++++++++++
 apps/plugins/mpegplayer/mpegplayer.c    |    9 +++++++++
 apps/plugins/oscilloscope.c             |   13 +++++++++++++
 apps/plugins/pacbox/pacbox.h            |   12 ++++++++++++
 apps/plugins/plasma.c                   |    6 ++++++
 apps/plugins/pong.c                     |    7 +++++++
 apps/plugins/reversi/reversi-gui.h      |    9 +++++++++
 apps/plugins/rockblox.c                 |   10 ++++++++++
 apps/plugins/rockboy/rockboy.c          |    9 +++++++++
 apps/plugins/rockpaint.c                |   11 +++++++++++
 apps/plugins/sliding_puzzle.c           |    7 +++++++
 apps/plugins/snake.c                    |    6 ++++++
 apps/plugins/snake2.c                   |   12 ++++++++++++
 apps/plugins/snow.c                     |    2 ++
 apps/plugins/sokoban.c                  |   14 ++++++++++++++
 apps/plugins/solitaire.c                |   21 +++++++++++++++++++++
 apps/plugins/spacerocks.c               |   13 +++++++++++++
 apps/plugins/star.c                     |   11 +++++++++++
 apps/plugins/starfield.c                |    7 +++++++
 apps/plugins/stats.c                    |    3 +++
 apps/plugins/stopwatch.c                |    7 +++++++
 apps/plugins/sudoku/sudoku.h            |   10 ++++++++++
 apps/plugins/superdom.c                 |    8 ++++++++
 apps/plugins/viewer.c                   |    9 +++++++++
 apps/plugins/vu_meter.c                 |    9 +++++++++
 apps/plugins/wormlet.c                  |   13 +++++++++++++
 apps/plugins/xobox.c                    |    9 +++++++++
 apps/plugins/zxbox/keymaps.h            |    8 ++++++++
 apps/plugins/zxbox/zxbox_keyb.c         |   11 +++++++++++
 57 files changed, 532 insertions(+), 2 deletions(-)

This task depends upon

Closed by  Rob Purchase (shotofadds)
Sunday, 27 April 2008, 18:35 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Thanks :-)
Comment by Rob Purchase (shotofadds) - Saturday, 19 April 2008, 14:39 GMT+2
I've re-opened this task since many of the button definitions need to be altered to use the "touchscreen area" button macros (see button-target.h) rather than the existing BUTTON_LEFT/RIGHT etc. Eg. BUTTON_UP becomes BUTTON_TOPMIDDLE, BUTTON_RIGHT becomes BUTTON_MIDRIGHT, etc.

The touchscreen button definitions should be defined in a HAVE_TOUCHPAD block (common to the D2 and m:robe500), with the D2-specific section containing only definitions for the physcial buttons (PLUS/MINUS/MENU/POWER).
Comment by Rob Purchase (shotofadds) - Sunday, 20 April 2008, 22:05 GMT+2
I should have mentioned that the current SVN build only supports the touchscreen area buttons (BUTTON_TOPMIDDLE etc) when running in the UI Simulator (mapped to keypad keys 1-9).

The attached patch adds touchpad support to the target build, by adapting JdGordon's existing m:robe500 work. It's far from perfect, for example menu navigation is difficult because it sometimes registers incorrect presses. But it does make plugins such as jewels and brickmania playable ;-)
   d2-touchpad-v1.diff (6.9 KiB)
 firmware/export/config-cowond2.h                     |    1 
 firmware/target/arm/tcc780x/cowond2/button-cowond2.c |  134 ++++++++++++++++++-
 firmware/target/arm/tcc780x/cowond2/button-target.h  |    8 -
 firmware/target/arm/tcc780x/cowond2/power-cowond2.c  |    8 -
 4 files changed, 142 insertions(+), 9 deletions(-)

Comment by Rob Purchase (shotofadds) - Monday, 21 April 2008, 10:08 GMT+2
Sync'd to r17200 by correcting an idiotic typo or two.
   d2-touchpad-v2.diff (7.1 KiB)
 firmware/export/config-cowond2.h                     |    1 
 firmware/target/arm/tcc780x/cowond2/button-cowond2.c |  136 ++++++++++++++++++-
 firmware/target/arm/tcc780x/cowond2/button-target.h  |    8 -
 firmware/target/arm/tcc780x/cowond2/power-cowond2.c  |   10 -
 4 files changed, 145 insertions(+), 10 deletions(-)

Comment by Andreas Müller (andiator) - Wednesday, 23 April 2008, 22:53 GMT+2
So, there a lot of changes. Almost all plugins got a touchpad section. Some have only one button (exit or so) - so I let it the way it was.
Other touchpad-targets have to define a target section anyway, at least an empty one.
The touchpad definitions are overrideable: e.g. #define PLUGIN_EXIT POWER_BUTTON in target section overrides the one in touchpad section (made with #ifndef PLUGIN_EXIT ...)

Added some missing button description/help text for some plugins. Had to change #ifdef/#else logic in plasma.c and starfield.c, hoping not to break other targets.
Changed drivers/button.c, there was an assumption that every target has BUTTON_LEFT/BUTTON_RIGHT --> added a mapping from BUTTON_MIDLEFT to BUTTON_LEFT etc. Is needed for screen flipping.
   d2+touchpad_button_mapping.patch (74.4 KiB)
 apps/plugins/battery_bench.c                        |   16 ++++-
 apps/plugins/blackjack.c                            |   60 +++++++++++++++----
 apps/plugins/bounce.c                               |   25 ++++++--
 apps/plugins/brickmania.c                           |   29 +++++++--
 apps/plugins/calculator.c                           |   35 ++++++++---
 apps/plugins/chessbox/chessbox_pgn.h                |   56 ++++++++++++++----
 apps/plugins/chessclock.c                           |   32 ++++++++--
 apps/plugins/chip8.c                                |   35 +++++++++--
 apps/plugins/chopper.c                              |   18 ++++-
 apps/plugins/cube.c                                 |   46 +++++++++++----
 apps/plugins/doom/i_video.c                         |   38 +++++++++---
 apps/plugins/fireworks.c                            |   12 +++
 apps/plugins/flipit.c                               |   48 ++++++++++++---
 apps/plugins/invadrox.c                             |   17 ++++-
 apps/plugins/jewels.c                               |   43 ++++++++++----
 apps/plugins/jpeg.c                                 |   39 +++++++++---
 apps/plugins/logo.c                                 |   21 +++++-
 apps/plugins/mandelbrot.c                           |   47 +++++++++++----
 apps/plugins/matrix.c                               |   18 ++++-
 apps/plugins/midi/midiplay.c                        |   26 ++++++--
 apps/plugins/minesweeper.c                          |   34 ++++++++---
 apps/plugins/mosaique.c                             |   14 +++-
 apps/plugins/mp3_encoder.c                          |   18 ++++-
 apps/plugins/mpegplayer/mpeg_settings.c             |   34 ++++++++---
 apps/plugins/mpegplayer/mpegplayer.c                |   31 ++++++++--
 apps/plugins/oscilloscope.c                         |   38 +++++++++---
 apps/plugins/pacbox/pacbox.h                        |   37 +++++++++---
 apps/plugins/pegbox.c                               |   57 ++++++++++++++----
 apps/plugins/plasma.c                               |   34 +++++++++--
 apps/plugins/pong.c                                 |   25 ++++++--
 apps/plugins/reversi/reversi-gui.h                  |   28 +++++++--
 apps/plugins/rockblox.c                             |   33 ++++++++--
 apps/plugins/rockboy/rockboy.c                      |   23 +++++--
 apps/plugins/rockpaint.c                            |   37 +++++++++---
 apps/plugins/sliding_puzzle.c                       |   44 ++++++++++++--
 apps/plugins/snake.c                                |   26 ++++++--
 apps/plugins/snake2.c                               |   50 ++++++++++++----
 apps/plugins/sokoban.c                              |   61 +++++++++++++++-----
 apps/plugins/solitaire.c                            |   57 ++++++++++++------
 apps/plugins/spacerocks.c                           |   46 +++++++++++----
 apps/plugins/star.c                                 |   55 +++++++++++++++---
 apps/plugins/starfield.c                            |   42 +++++++++++--
 apps/plugins/stopwatch.c                            |   26 ++++++--
 apps/plugins/sudoku/sudoku.h                        |   33 ++++++++--
 apps/plugins/superdom.c                             |   28 +++++++--
 apps/plugins/viewer.c                               |   29 +++++++--
 apps/plugins/vu_meter.c                             |   35 +++++++++--
 apps/plugins/wormlet.c                              |   41 ++++++++++---
 apps/plugins/xobox.c                                |   26 ++++++--
 apps/plugins/zxbox/keymaps.h                        |   28 +++++++--
 apps/plugins/zxbox/zxbox_keyb.c                     |   27 ++++++--
 firmware/drivers/button.c                           |    7 ++
 firmware/target/arm/tcc780x/cowond2/button-target.h |   10 +--
 53 files changed, 1411 insertions(+), 364 deletions(-)

Comment by Andreas Müller (andiator) - Sunday, 27 April 2008, 13:57 GMT+2
Update for r17254 (New plugin flashlight.c)
   d2+touchpad_button_mapping.patch (75.3 KiB)
 apps/plugins/battery_bench.c                        |   16 ++++-
 apps/plugins/blackjack.c                            |   60 +++++++++++++++----
 apps/plugins/bounce.c                               |   25 ++++++--
 apps/plugins/brickmania.c                           |   29 +++++++--
 apps/plugins/calculator.c                           |   35 ++++++++---
 apps/plugins/chessbox/chessbox_pgn.h                |   56 ++++++++++++++----
 apps/plugins/chessclock.c                           |   32 ++++++++--
 apps/plugins/chip8.c                                |   35 +++++++++--
 apps/plugins/chopper.c                              |   18 ++++-
 apps/plugins/cube.c                                 |   46 +++++++++++----
 apps/plugins/doom/i_video.c                         |   38 +++++++++---
 apps/plugins/fireworks.c                            |   12 +++
 apps/plugins/flashlight.c                           |   17 ++++-
 apps/plugins/flipit.c                               |   48 ++++++++++++---
 apps/plugins/invadrox.c                             |   17 ++++-
 apps/plugins/jewels.c                               |   43 ++++++++++----
 apps/plugins/jpeg.c                                 |   39 +++++++++---
 apps/plugins/logo.c                                 |   21 +++++-
 apps/plugins/mandelbrot.c                           |   47 +++++++++++----
 apps/plugins/matrix.c                               |   18 ++++-
 apps/plugins/midi/midiplay.c                        |   26 ++++++--
 apps/plugins/minesweeper.c                          |   34 ++++++++---
 apps/plugins/mosaique.c                             |   14 +++-
 apps/plugins/mp3_encoder.c                          |   18 ++++-
 apps/plugins/mpegplayer/mpeg_settings.c             |   34 ++++++++---
 apps/plugins/mpegplayer/mpegplayer.c                |   31 ++++++++--
 apps/plugins/oscilloscope.c                         |   38 +++++++++---
 apps/plugins/pacbox/pacbox.h                        |   37 +++++++++---
 apps/plugins/pegbox.c                               |   57 ++++++++++++++----
 apps/plugins/plasma.c                               |   34 +++++++++--
 apps/plugins/pong.c                                 |   25 ++++++--
 apps/plugins/reversi/reversi-gui.h                  |   28 +++++++--
 apps/plugins/rockblox.c                             |   33 ++++++++--
 apps/plugins/rockboy/rockboy.c                      |   23 +++++--
 apps/plugins/rockpaint.c                            |   37 +++++++++---
 apps/plugins/sliding_puzzle.c                       |   44 ++++++++++++--
 apps/plugins/snake.c                                |   26 ++++++--
 apps/plugins/snake2.c                               |   50 ++++++++++++----
 apps/plugins/sokoban.c                              |   61 +++++++++++++++-----
 apps/plugins/solitaire.c                            |   57 ++++++++++++------
 apps/plugins/spacerocks.c                           |   46 +++++++++++----
 apps/plugins/star.c                                 |   55 +++++++++++++++---
 apps/plugins/starfield.c                            |   42 +++++++++++--
 apps/plugins/stopwatch.c                            |   26 ++++++--
 apps/plugins/sudoku/sudoku.h                        |   33 ++++++++--
 apps/plugins/superdom.c                             |   28 +++++++--
 apps/plugins/viewer.c                               |   29 +++++++--
 apps/plugins/vu_meter.c                             |   35 +++++++++--
 apps/plugins/wormlet.c                              |   41 ++++++++++---
 apps/plugins/xobox.c                                |   26 ++++++--
 apps/plugins/zxbox/keymaps.h                        |   28 +++++++--
 apps/plugins/zxbox/zxbox_keyb.c                     |   27 ++++++--
 firmware/drivers/button.c                           |    7 ++
 firmware/target/arm/tcc780x/cowond2/button-target.h |   10 +--
 54 files changed, 1426 insertions(+), 366 deletions(-)

Comment by Andreas Müller (andiator) - Sunday, 27 April 2008, 16:30 GMT+2
Got brickmania working
   d2_tchpd_bttn_mapping_v3.patch (74.5 KiB)
 apps/plugins/battery_bench.c            |   16 +++++++-
 apps/plugins/blackjack.c                |   60 +++++++++++++++++++++++++------
 apps/plugins/bounce.c                   |   25 +++++++++++--
 apps/plugins/brickmania.c               |   26 +++++++++----
 apps/plugins/calculator.c               |   35 +++++++++++++-----
 apps/plugins/chessbox/chessbox_pgn.h    |   56 +++++++++++++++++++++++------
 apps/plugins/chessclock.c               |   33 +++++++++++++----
 apps/plugins/chip8.c                    |   35 +++++++++++++++---
 apps/plugins/chopper.c                  |   18 +++++++--
 apps/plugins/cube.c                     |   47 +++++++++++++++++++-----
 apps/plugins/doom/i_video.c             |   38 +++++++++++++++----
 apps/plugins/fireworks.c                |   12 +++++-
 apps/plugins/flashlight.c               |   17 +++++++-
 apps/plugins/flipit.c                   |   48 ++++++++++++++++++++-----
 apps/plugins/invadrox.c                 |   17 +++++++-
 apps/plugins/jewels.c                   |   43 ++++++++++++++++------
 apps/plugins/jpeg.c                     |   39 +++++++++++++++-----
 apps/plugins/logo.c                     |   22 +++++++++--
 apps/plugins/mandelbrot.c               |   47 ++++++++++++++++++------
 apps/plugins/matrix.c                   |   18 +++++++--
 apps/plugins/midi/midiplay.c            |   26 +++++++++++--
 apps/plugins/minesweeper.c              |   34 ++++++++++++++---
 apps/plugins/mosaique.c                 |   15 ++++++-
 apps/plugins/mp3_encoder.c              |   18 +++++++--
 apps/plugins/mpegplayer/mpeg_settings.c |   34 ++++++++++++++---
 apps/plugins/mpegplayer/mpegplayer.c    |   31 +++++++++++++---
 apps/plugins/oscilloscope.c             |   38 +++++++++++++++----
 apps/plugins/pacbox/pacbox.h            |   37 ++++++++++++++-----
 apps/plugins/pegbox.c                   |   57 +++++++++++++++++++++++------
 apps/plugins/plasma.c                   |   34 ++++++++++++++---
 apps/plugins/pong.c                     |   25 +++++++++++--
 apps/plugins/reversi/reversi-gui.h      |   28 ++++++++++++--
 apps/plugins/rockblox.c                 |   33 ++++++++++++++---
 apps/plugins/rockboy/rockboy.c          |   23 ++++++++----
 apps/plugins/rockpaint.c                |   37 +++++++++++++++----
 apps/plugins/sliding_puzzle.c           |   44 +++++++++++++++++++----
 apps/plugins/snake.c                    |   26 +++++++++++--
 apps/plugins/snake2.c                   |   50 ++++++++++++++++++++------
 apps/plugins/sokoban.c                  |   61 +++++++++++++++++++++++++-------
 apps/plugins/solitaire.c                |   57 ++++++++++++++++++++---------
 apps/plugins/spacerocks.c               |   46 ++++++++++++++++++------
 apps/plugins/star.c                     |   55 ++++++++++++++++++++++++----
 apps/plugins/starfield.c                |   42 ++++++++++++++++++----
 apps/plugins/stopwatch.c                |   26 +++++++++++--
 apps/plugins/sudoku/sudoku.h            |   33 ++++++++++++++---
 apps/plugins/superdom.c                 |   28 +++++++++++---
 apps/plugins/viewer.c                   |   30 +++++++++++++--
 apps/plugins/vu_meter.c                 |   35 ++++++++++++++----
 apps/plugins/wormlet.c                  |   41 ++++++++++++++++-----
 apps/plugins/xobox.c                    |   26 +++++++++++--
 apps/plugins/zxbox/keymaps.h            |   28 +++++++++++---
 apps/plugins/zxbox/zxbox_keyb.c         |   27 ++++++++++----
 firmware/drivers/button.c               |    7 +++
 53 files changed, 1423 insertions(+), 361 deletions(-)

Loading...