CaptainLizard wrote:A disassembler sounds awesome and I'll be getting on that especially since I felt like some ROMs I ran seemed to drop inputs (using keyboard as controller).
You're absolutely right. I wasn't really certain at first, but I've grown increasingly self conscious of it... and by self conscious, I mean I've been pissed off about it.
Couldn't sleep, so I fundamentally rearchitectured the entire event loop to fix the timing. One of the hardest parts of an emulator like this is trying to get the timing right. I had the CPU clock cycle timing basically nailed but then the gamepad input pins, serial communications, and screen were not tied to the same clock source. They were essentially running at 30-60fps (or higher) with the GUI, independent of the CPU core. So some of the frames where key presses or releases were being detected were frames when the VMU's CPU was "sleeping" (because it wasn't time for it to update yet), so ultimately the CPU was losing a bunch of interrupts from the input subsystem.
While I was redoing the input polling loop, I went ahead and made sure to treat the keyboard now as a removable device just like the controller, in preparation for running EVMU on the Dreamcast, OUYA, ForgeTV, Raspberry PI, or any other device where the keyboard is optional. I hopefully accounted for a corner case when a controller is removed while the buttons are still held down so the emulator is not stuck with the buttons down when it doesn't receive a button release interrupt on the respective pin.
Everyone please try the emulator again. It made a HUGE fucking difference in responsiveness and playability. It feels like it's 1000x more fluid now
, because the input is tied with the CPU correctly. My bad, it was a major fuckup on my part. This may have even resolved some of the issues with the semi-working serial emulation over TCP, as that was not tied to the system clock either, but either way, I'll have to fix that up sometime after AiGD33.