[Mega2560.r3] digital pins not reading input

I'm setting up a project making use of a spare Mega, trying to read inputs on digital pins 22-45 (they're conveniently collocated for 24 wires). I've compiled and uploaded my firmware and using platformIO's device monitoring I am only seeing any activity on pins 22-29.

I have used the same lead and button in every socket to rule out any hardware errors on that side. I cannot find anything which suggests that (out of the box) pins 30+ should behave any differently to 22-29, especially when I have no jumpers on any pins. I'm not uploading a diagram at this point as I'm testing with a single button moving between sockets, directly wired with nothing in between.

My code is available here - you can safely ignore anything about mode/orientation, its the simple readButtons that isn't working correctly.

Installation & Troubleshooting
For problems with Arduino itself, NOT your project

But how am I supposed to know that this isn’t a problem with the arduino itself if it is literally about the digital pins not reading inputs? Please suggest where this would be better suited.

Start here

I did read this before I posted. I decided that this was the most suitable place because it was about why the board itself would read inputs from pins 22-29 but not any higher than input 29. My inclusion of the code was supposed to suggest that I had not treated any of the pins any differently.

If I gave the wrong impression that I am looking for any guidance on whether my project is feasible, code suggestions or the sort then I apologise. What I am seeking is information regarding the board itself and the problem as posted. If this still isn't the ideal place for that content then could you please suggest which other topic is more suited?

Nevermind, this was indeed a software issue. It should've clicked when it was only the first 8 inputs reading (uint8_t for the variable managing the button presses).

Please delete thread.