Author Topic: ODK project set up: initial issues  (Read 28111 times)

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #15 on: January 13, 2013, 05:10:12 PM »
All these flaky controller bugs today.. phantom signals, etc.  Before you publish an RC, what compile settings do you change?  Can't think of any other differences btween what I build and the RCs...
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #16 on: January 13, 2013, 06:13:43 PM »
Ok, one more thing.  Just pushed an update to LazyProvider and AxisProvider.  Try setting LazyProvider.REMOVE_BIAS and AxisProvider.NORMALIZE to false.

The harder you try to make something compatible the more you make it universally incompatible.... sigh.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #17 on: January 14, 2013, 08:56:11 PM »
Try setting LazyProvider.REMOVE_BIAS and AxisProvider.NORMALIZE to false.

Awesome!  That did the trick.  Going to test my modified controllers next  ;D
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #18 on: January 14, 2013, 09:04:18 PM »
The axis on the modified controllers is a little weird.  Seems like if I push the stick to 100% in any direction, then Mario stops, but if it is anywhere in between (i.e. >0% but <100%) then it operates fine.  Do you think that would be caused by the axis provider normalize setting at false, or likely something else?
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #19 on: January 14, 2013, 09:13:57 PM »
What's it showing in the diagnostics screen?  There you will see the raw unadulterated signals without any of the extra processing used in-game.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #20 on: January 14, 2013, 09:19:25 PM »
Haha, Robbie discovered the OUYA and is playing Zelda.  I'll have to wait for him to go to bed to pull up the diagnostics.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #21 on: January 14, 2013, 09:20:00 PM »
Try setting LazyProvider.REMOVE_BIAS and AxisProvider.NORMALIZE to false.

Awesome!  That did the trick.  Going to test my modified controllers next  ;D

Great!  Just be sure not to publish those flags yet.  Basically fixing one controller ruins another...  The dreaded solution of adding a bunch of options to enable/disable controller-specific hacks may have to be made.  It wouldn't be too bad until you realize you have to apply them on a controller-by-controller basis.

Edit: sounds good.  Have fun... 
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #22 on: January 14, 2013, 09:32:21 PM »
In case you didn't see one of my posts somewhere, you'll probably need to enable controller sharing (bottom of input menu) if two N64 controllers are hooked to a single USB adapter.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #23 on: January 14, 2013, 10:39:32 PM »
I haven't run that test yet (for the modified controllers, the micro controller chip controls just one N64 controller .. wow how many times can you use the word control in a sentence?)  I do want to test the few remaining adapters I have though to see how they do.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #24 on: January 15, 2013, 06:42:47 AM »
What's it showing in the diagnostics screen?  There you will see the raw unadulterated signals without any of the extra processing used in-game.

All controls are stable, with the following ranges when pressing the analog stick or c-buttons:

Code: [Select]
AXIS_X: [-1.0, 0.827...]  (Stick left-right)
AXIS_Y: [-1.0, 1.0]  (Stick up-down)
AXIS_Z: [-0.749..., 0.756...]  (C up-down)
AXIS_RX: [0.756..., -0.749]  (C left-right.. opposite sign)
AXIS_HAT_X: 0.0
AXIS_HAT_Y: 0.0

Of course I have to turn off the OUYA controller to see the diagnostics, due to the constant flashing input from it.  I had a thought that I am going to try later.  Could be that there is something going on with having controls mapped to multiple buttons.  I'll need to fix the input mapping interface into a navigable list so that I can disable the OUYA touchpad (in the current interface, input from the touchpad makes it impossible to unmapping controls)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #25 on: January 15, 2013, 07:34:56 AM »
I take it AXIS_HAT_X and _Y map to the d-pad?

Curious that they map the c buttons to an axis.  Mapping to an axis forces up and down to be mutually exclusive (and same for left right).  Which is the desired behavior for a d-pad.  Not sure about the c-pad though.  Don't know if there are any games which require both C-up and C-down to be pressed simultaneously, but if so then there won't be a solution.  Unless the c-pad is also sending key events...

Also curious is that the c-pad is reporting AXIS_RX_MIN to be a positive number and AXIS_RX_MAX to be negative.  Not sure if it will have any practical significance to us, but it seems like an interface bug on their part.

Do any of the buttons/stick listed above also send keycodes?  Like when analog stick reaches +/- 1 does it also send a keystroke?
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: ODK project set up: initial issues
« Reply #26 on: January 15, 2013, 07:44:40 AM »
No keystrokes.  You're probably right about the d-pad, I'll check later (was pretty late when Robbie fell asleep last night)  I'm also curious to hook up one of the unmodified adapters to see how it handles two controllers.  I was surprised there weren't more axes listed, but could be because of the modifications.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #27 on: January 15, 2013, 07:50:11 AM »
Regarding the mapping screen navigation via d-pad:  One solution as you've already said is to make an alternative mapping screen layout.  I could probably whip something up this week.  It might not take much more than providing an alternative layout xml file.

Regarding the inability to unmap: One option might be to somehow disable listening to the OUYA touchpad when the mapping dialog pops up.  Not sure if that will be possible.  We could add more info to the diagnostics utility, to identify something about the touch signals that differentiates them from the stick signals.  Another option might be to add some extra widgets to the main mapping screen to handle unmapping.

Looking farther out, with all the controller customization issues, it might make sense to make the mapping process its own activity.  That would give us more freedom in the design of all these screens.  Hmmm now I got myself thinking... Maybe I'll start an experimental branch after we're back in the market and test some ideas...
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #28 on: January 15, 2013, 12:36:27 PM »
Great!  Just be sure not to publish those flags yet.  Basically fixing one controller ruins another...  The dreaded solution of adding a bunch of options to enable/disable controller-specific hacks may have to be made.  It wouldn't be too bad until you realize you have to apply them on a controller-by-controller basis.

Just occurred to me as I sit here eating lunch.  I could add another menu item in the input menu, call it "Controller-specific hacks" or something. that would open a subscreen and I could just have a bunch of options like

Xbox360 controller     (checkbox)
Remove bias in the analog triggers

Legacy Logitech controller   (checkbox)
Normalizes analog range of motion

OUYA controller     (checkbox)
Does this and that

...

It would require some maintenance as more controller quirks are discovered, but at least we wouldn't have the potential to break one controller to fix another.  The default behavior would be normalized=false, unbias=false which would be most intuitive to users, then if they run into problems they could look into the hack section to solve the quirk.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: ODK project set up: initial issues
« Reply #29 on: January 15, 2013, 12:41:14 PM »
Still not sure what's going on with the OUYA controller.  The jumpy values thing really seems like a hardware error.  A functional controller shouldn't be sending such large non-zero values when at rest, and especially shouldn't have that much noise at rest.  Not sure what we can do to address it.  Does OUYA specify an alternative API for reading controller data?  Maybe their controller has special needs that can't be addressed through vanilla Android.

Edit: Just visited the ODK documentation website and saw this disclaimer

Quote
Controllers - The method used to associate a player with a specific game controller is a work in progress. The controller LEDs do not yet indicate the player number

Maybe they didn't fully do their homework  ???
« Last Edit: January 15, 2013, 12:46:52 PM by littleguy »
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version