Open greyrogue opened 5 years ago
Thanks for the information and sorry for the awfully long time to respond to you. I will take a look at this. It sounds like you have been running this design - I assume that you have a Pepino board?
Actually, I'm the person who ported it to MiSTer. You can see the fork here (specifically, the hack I threw in for STCR to fix this issue in Ms Pac-Man): https://github.com/MiSTer-devel/TI-99_4A_MiSTer/commit/5b7f52458d7f82ea7c12948ffbfed886c413a834#diff-7d4250f65cb816b666c46bae62498069 I'm not sure if this is how you'd prefer to fix it (maybe the flags should be coming from the ALU?). It looks like I'm actually a few versions behind your latest changes, as I don't have your pipelining code. I did add instruction cycle timing to the version in MiSTer, with an option for Turbo mode (which ignores the added waits). This allows semi-accurate timing for running games with Turbo off, and maximum speed with Turbo on. If anything looks useful, feel free to use it here.
Thanks for your comment @greyrogue I can't believe I forgot to answer you a long time ago. I had a bit of a pause working on the FPGA design, but lately I've been hard at work on a Verilog version of the system. At any rate, thanks a lot for the bug fix, I think I did incorporate the fix a long time ago already.
I saw the fix (and copied it to MiSTer) of LDCR. I don't see the change for STCR, though. It's difficult for automated test ROMs to find it, because it requires external changes to test thoroughly (e.g. keyboard/joystick input). It can be tested with Ms Pac Man: even in turbo mode (no CPU instruction wait states), all 4 directional controls still work with the MiSTer change above.
Thanks for the response, I will take a look at that.
It looks like the LDCR and STCR opcodes are supposed to update the Higher than, Greater than, Zero and Carry flags, if I'm reading the documentation correctly. I hacked something for STCR and it fixes the broken controls in Ms Pac-Man.