katie-snow / Ultimarc-linux

Library and command line utilities
GNU General Public License v2.0
96 stars 22 forks source link

Disable shift function #58

Open idevsoftware opened 6 years ago

idevsoftware commented 6 years ago

Hi, I can't disable the shift button function. I followed @katie-snow instructions from here but they don't seem to work. Setting the shift key to an empty string doesn't work ([INFO] (ipacseries.c:992) Unable to decipher pin ''.), as neither setting it as null (won't validate: [ERROR] (ultimarc.c:58) Configuration is 'IPAC2'. [Not validated].). I tried overriding all of the assigned shift commands and replacing them with an empty string but hitting 1pstart and 2pstart at the same time always triiggers esc(I have a dedicated button assigned via pin for esc). Board is I-PAC2 2015.

idevsoftware commented 6 years ago

Update: I was wrong when I said that overriding all of the assigned shift commands and replacing them with an empty string but hitting 1pstart and 2pstart at the same time always triiggers esc. I had emptied virtually all of the shift codes except for the 2pstart button, which I later did and that prevented the running emulator from quitting. But the underlying issue still persists, I can't get rid of having the 1pstart button set as a shift key. I even tried (unsuccessfully) assigning it to an unused pin on my board, so I can't effectively disable this functionality.

katie-snow commented 6 years ago

Could you add your configuration file, please. I will look into this soon.

idevsoftware commented 6 years ago

Hi @katie-snow, thanks for your response. Sure thing, file attached here. It's a pretty standard configuration, with the shift macros set to empty for all of the buttons (which now prevents the running emulator from exiting when hitting both start buttons at the same time) but the shift key remapped to the button used for pause. This doesn't work - the board insists on having the 1p start button as the shift key.

idevsoftware commented 6 years ago

so while playing around I discovered something else: I assigned the shift function to the 1a pin (which defaults to the P key) and it works as expected, but the 1start never gets overridden (so right now I have two shift buttons: 1start and 1a). I'm starting to think this is a firmware limitation. Any ideas/comments?

katie-snow commented 6 years ago

Here is what I am seeing with my 2015 IPAC2 board. I am not seeing two shift keys when I program the board. When I set another key say 1a shift function I do see that I can't seem to get the 1start button to output its shift select and will stop the other keys from outputting their functions until I repress the 1a button.

This maybe a board/firmware issue but you will need to contact Andy. Sorry I couldn't be more help and that I was so slow in responding.

idevsoftware commented 6 years ago

Hi @katie-snow, thanks for taking the time and getting back to me. I am seeing exactly what you are describing, and I also suspect it's a firmware issue. I'll try to ask Andy and will keep you updated.

OzFalcon commented 3 years ago

Any updates on this or is this issue closed?

katie-snow commented 2 years ago

I have no other updates. @idevsoftware do you have any updates?

OzFalcon commented 2 years ago

I'll give it a test out with the latest firmware (1.55c). @idevsoftware you never mentioned which firmware you were using.

OzFalcon commented 2 years ago

From what I can gather, Looking at the source & log message.

[INFO] (ipacseries.c:992) Unable to decipher pin ''.

Is a result of NO pin being assigned as the shifter. And the position of the pin is NOT updated by the following code

// access table with lkey and bid to get the location to place data in barray idx = keyLookupTable[bid][lkey]; barray[idx + shiftPosAdjTable[bid]] = 0x41;

At least I think this is what's happening. So the log message is not indicating some sort of problem as one might interpret it as. ie. The board still updates, But has not had the shift added to the update data.

OzFalcon commented 2 years ago

Post 2015 IPAC2 boards support multiple shifter pins though umtool config has only one assignment. And as idevsoftware experienced, umtool flash triggers p1start as a shifter button in addition to what is (or is not) assigned as 1/2 shift key.

OzFalcon commented 2 years ago

Going for low hanging fixes I looked for any other instances of barray being set to 0x41.

fgrep -R "0x41" src/libs/ipacseries.c: retval = 0x41; src/libs/ipacseries.c: retval = 0x41; src/libs/ipacseries.c: barray[idx + shiftPosAdjTable[bid]] = 0x41; src/libs/ipac.c: memset (&barray[151], 0x41, 1);

This last one being in the setup data to send to board.

src/libs/ipac.c: / memset (&barray[151], 0x41, 1); /

This also seems to match the barray idx+shiftPosAdjTable value. And removing that assignment seems to fix the current issue.

OzFalcon commented 2 years ago

And I'll make some minor changes to the log output to help clarify status.

OzFalcon commented 2 years ago

Here is what I am seeing with my 2015 IPAC2 board. I am not seeing two shift keys when I program the board. When I set another key say 1a shift function I do see that I can't seem to get the 1start button to output its shift select and will stop the other keys from outputting their functions until I repress the 1a button.

Using v1.49 firmware I can only reproduce the start1 button not outputting it's shifted key if both 1a AND 1start are assigned as shifter buttons. ie. If any of the keys are assigned as a shifter button then it's own shifted value is not available (Only it's primary value).

and will stop the other keys from outputting their functions until I repress the 1a button.

I did not encounter any shifter buttons getting stuck or inhibiting other keys function. What firmware was the 2015 ipac2 that this occured on?

OzFalcon commented 2 years ago

Regarding fix #82 Pending test with firmware v1.21 (Single Mode) Pending test with firmware v1.32 (Single Mode) Pending test with firmware v1.39 (Mixed Mode) Pending test with firmware v1.49 (Single Mode) Pending test with firmware v1.55 (Multi Mode)

OzFalcon commented 2 years ago

Testing has uncovered another problem I think may be a firmware bug which needs it's own bug report regarding the "Expansion Interface".

OzFalcon commented 2 years ago

Test Log -=-=-=-= Keytest utility "xev". Warning: umtool enables the "Expansion interface" by default. Summary: There appears to be a problem with the "Expansion interface".

Tested with firmware v1.21 (Single Mode)

Bug (default.json): P1B1 (crtl l), P1B2 (alt l), P1B4 (shift l) not working.
 When these buttons are pressed, No coresponding key is returned.

The following ocures WITH THE EXPANSION INTERFACE ENABLED.

Bug (default.json): Shifted P1B1 repeats until another valid key is pressed.
 Appears to be the same as firmware v1.49 bug.

Bug (general): ipac2 randomly resets when keys are pressed.

Pending test with firmware v1.32 (Single Mode) Pending test with firmware v1.39 (Mixed Mode)

Tested with firmware v1.49 (Single Mode)

The following ocures WITH THE EXPANSION INTERFACE ENABLED.

Bug (default.json): Shifted P1B1 repeats until another valid key is pressed.
 When shifter is pressed (1start) and P1B1 is pressed
 then shifted P1B1 (5) repeats until another valid key is pressed.
 [Shifter may be released now while repeating]
    if P1B1 is pressed again then an incorrect transition appears
    and while pressed returns keycode but different state (Resulting in "")

Bug (ReproBug.json): Reproduction of Bug...
Note: It doesn't matter which button the shifter is assigned
      to or what it's primary or shifted keys are defined as.
 When shifter is pressed and ANY button with a primary defined as:
    ctrl l
    ctrl r
    shift l
    shift r
    alt l
    alt r
    win l
    win menu
then the shifted button value repeats until another valid key is pressed.
There could be more but that's all I have checked.

Pending test with firmware v1.55 (Multi Mode)

OzFalcon commented 2 years ago

This bug (Disable shift function) can now be closed. While the "Expansion interface" is disabled everything seems to be working as expected.