makapuf / bitbox

The bitbox console (example, firmwares, doc)
http://bitboxconsole.blogspot.com
89 stars 13 forks source link

second usb input not always working #59

Open lowagner opened 8 years ago

lowagner commented 8 years ago

your latest commit (shuffling init code) made me wonder: if NO_USB is not defined, is it possible to wait a second or two to try and init the second usb? i'm still not getting very consistent 2nd player in bbgunner. i've found i can get better chances (though not perfect) if i disconnect player one, connect player two, start the bitbox, then plug in player 1. snake gets it pretty consistently by keeping both in.

i've tried giving the bitbox a bit more power, and that doesn't seem to help.

also, for debugging and testing other usb devices, would it be possible to have test_usb have a super low level "what i'm seeing from the usb", so we can maybe debug and add other usb devices? (i.e., before we interpret any button press as "left" or "A", just get the usb data chunks...) if this is possible, i can submit a new issue for it...

makapuf commented 8 years ago

USB really needs some love, I feel it's soo unnecessarily complex... for the simple use cases we have. It would be nice starting either to look at another usb stack or simplifying it much (to be able to debug it !) but it's quite hairy and I don't know where to start .. maybe we need to do it piecewise. and, yes, a datadump would be a good starting point.

pulkomandy commented 8 years ago

I usually find http://www.beyondlogic.org/usbnutshell/usb1.shtml quite useful on USB matters. Lots of reading, however.

makapuf commented 8 years ago

sure, it's a great resource which I used for an intro on USB ! It also seems the usb driver has been updated, that would be a start.

2016-04-22 11:12 GMT+02:00 Adrien Destugues notifications@github.com:

I usually find http://www.beyondlogic.org/usbnutshell/usb1.shtml quite useful on USB matters. Lots of reading, however.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/makapuf/bitbox/issues/59#issuecomment-213344517

lowagner commented 7 years ago

still would love to understand why we get plug-and-unplug OK for the first player, but it doesn't really work for player two. i like making multiplayer games for the bitbox, but it's a pain to get it setup so player 2 works! (lots of trial and error, but no consistent behavior...)

makapuf commented 7 years ago

Yes this need some more work.

Le 13 déc. 2016 00:40, "Lucas O. Wagner" notifications@github.com a écrit :

still would love to understand why we get plug-and-unplug OK for the first player, but it doesn't really work for player two. i like making multiplayer games for the bitbox, but it's a pain to get it setup so player 2 works! (lots of trial and error...)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/makapuf/bitbox/issues/59#issuecomment-266589459, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlREbjvpg0GaJhSTYAWTwQ_5tYJu3yWks5rHduAgaJpZM4Hq2W6 .

lowagner commented 7 years ago

as a note, 2nd player works even less well with commit: 513c4bba001212931d3f6c4a8b1e3bfa087dd1eb

this branch reverts that and gets back to about where we were (>50% chance of 2nd player working): https://github.com/lowagner/bitbox/tree/test

makapuf commented 7 years ago

Hi, I tried reverting this commit and have not had much success, ie the success rate is about the same (50%). Do you confirm it's the case with your device ? Also, I updated the test usb to give more details , can you try it and give me the results when working or not ? also, can you try plugging a mouse by example on the second por with test usb and tell me the results also ? thanks

lowagner commented 7 years ago

i seem to get much worse success than 50% with the above commit 513c4bb, and around 50% without it (when commit 513c4bb is reverted); but i will report back soon with the results from test_usb.

makapuf commented 7 years ago

can you send me your binaries ? Maybe there is a mismatch in binary code ?

2017-07-26 15:49 GMT+02:00 Lucas O. Wagner notifications@github.com:

i seem to get much worse success than 50% with the above commit 513c4bb https://github.com/makapuf/bitbox/commit/513c4bba001212931d3f6c4a8b1e3bfa087dd1eb, and around 50% without it (when commit 513c4bb https://github.com/makapuf/bitbox/commit/513c4bba001212931d3f6c4a8b1e3bfa087dd1eb is reverted); but i will report back soon with the results from test_usb.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/makapuf/bitbox/issues/59#issuecomment-318058562, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlREclKB_89WtffDQskmUWvQtVPU1mOks5sR0QHgaJpZM4Hq2W6 .