OK, I've done another pull request with my somewhat working changes to the dual endstop code.
As noted in the PR, Y is working properly, but for the life of me I can't see why X does not. If I swap pins so the axis are swapped in firmware, the problem just follows the X axis, so it does not seem to be a hardware issue as I don't change anything on the board. I must be missing something in X that I have in Y, but I've looked at all of the inserts several times and can't see any differences.
Also, I've done all the dev in the first byte laststate, not laststate2, because I see the ENDSTOP_Z2_MINMAX_ID done there as well and I figured to reduce the potential troubleshooting, I'd stick with a known working byte. Consequently I moved the X and Y MAX to EXTENDED_ENDSTOPS since they wouldn't be used anyway.
I was also mystified what in my coding was causing it to act as if there were software min endstops acting on all axis, as Z will not go negative at all (since there's no endstop to home) and X and Y won't go back past where they were initialized as well, though it allowed me to home. I pulled a clean copy of Dev and loaded up a config from a working Master, and it still acts like there are software endstops in force. I have no clue why this is and couldn't trace the issue.
I feel really close, but can't figure out these issues, so if you have a chance to check that PR again and make some suggestions about why X won't work but Y does, and why there is this software min going on even on a clean copy, it would be great to get some guidance on that so I can wrap this up and maybe try a couple of other additions.