What gamepad are you using? I might need to add some additional polling checks for to accomodate for different gamepads. I will be using the latest version of jInput in the new version of Z64K so hopefully a lot more gamepads will be supported without additional configuration required by the end user.
I just had a look at Z64K's gamepad code and found suspect code that might be preventing diagonal direction being detected on some gamepads. I haven't tested with my gamepads because I don't have them handy but in theory the changes I did should work and not break anything. Grateful if you can test with the attached version of Z64K with your gamepad before I upload to website.
I just test with my gamepad and I had issues with the previous version I attached to this thread as well. I found the bug and have fixed it and replaced the attachement above with the fixed version. My gamepad works fine including diagonal with both POV and AXIS options of the gamepad. It has always been fine with my gamepads even before I applied the minor update.
In the new version of Z64K I'm currently working on I will be including the gamepad UI tester included with jInput so hopefully it will be much easier to configure and diagnose potential issues with the vast amount of gamepads available.
I just tested your 40col VDC with my gamepad and diagonal works perfectly. I keep this on my list to look into for Xbox One controller.
On a side note I just updated the attachment above again to remove the extra pixel in 40 column bitmap mode. Your program runs much closer to what I see on real hardware in Z64K now. I will release that change to the actual website once I do a little bit more research on that extra pixel. It looks very cool what you're working on.