Open radare opened 7 years ago
A gamepad API would be great
we can add some APIs in RCons to wrap the input, this way it will be possible to write a Core plugin that uses SDL to read the buttons pressed by a gamepad and convert them into input keycodes for RCons. This will allow us to use r2 with a gamepad. from my experience, the dingoo console maps the buttons as keys of the keyboard. but maybe thats just a hack from the linux driver who made the port :P
also wrapping the input for rcons will allow us automate visual mode
On 20 Jan 2017, at 09:45, condret notifications@github.com wrote:
A gamepad API would be great
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/6497#issuecomment-274011796, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lmbe6BWKOJ2sgeFfeN3JPVvJsqpgks5rUHQOgaJpZM4LhxJs.
Why SDL? most gamepads are available trough /dev/input/* char devices...
in linux.. but there are more OS than just linux in this world :P
what a shame....
some sandboxed environments forbid access to devices directly too :P
On 20 Jan 2017, at 12:43, Jaime Peñalba notifications@github.com wrote:
what a shame....
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/6497#issuecomment-274053523, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lg66iLtymZLqp5TIdTHGD7Is9o-wks5rUJ3pgaJpZM4LhxJs.
I'm against this. There are devices where you want to run r2 that doesn't have any "input" at all, actually, but I don't think we should try to get the input from those devices as well. On some devs you probably just need to be able to run r2/gdbserver or something and then get the real analysis/debug work done elsewhere, IMHO.
This issue has been moved from radareorg/radare2 to radareorg/ideas as we are trying to clean our backlog and this issue has probably been created a long while ago. This is an effort to help contributors understand what are the actionable items they can work on, prioritize issues better and help users find active/duplicated issues more easily. If this is not an enhancement/improvement/general idea but a bug, feel free to ask for re-transfer to main repo. Thanks for your understanding and contribution with this issue.
i did a demo and wrote a plugin available via r2pm to introduce this visual mode that works with the gamepad. the ui is not SDL, just text in the console framebuffer. So this is something we can ignore to be implemented in core's r2 because it's wip, marginal usage and fun. bear in mind that there's people out there making music with gameboys. And in some situations it is handy to move around the disassembly or hexdump or patch some stuff on devices that don't have a keyboard as input, that can save a lot of time of building+transferring+testing, r2agent or gdbserver is not always possible because of no network or so.
I would like to be able to have external r2 plugins built into the static build of r2 at some point, so it wont be needed to drop .so here and there to get stuff done on embeddeds.
As long as we want to use and run r2 everywhere, it is important to support gamepad as input to interact with it. This is.. a special visual mode that can be fully used with 2 buttons and a up/down/left/right arrows.