P3IO emu bugfix, fixes ddrhook1 crashing on startup #274

Merged
icex2 merged 2 commits from p3io-emu-bugfix into master 2023-11-30 22:33:36 +03:00
2 Commits
Author SHA1 Message Date
icex2 5d2b76f6a0 fix(p3ioemu): Incorrect dispatching of unknown p3io commands
Using ddrhook1, this caused DDR X to crash on startup when the
P3io client sends the currently unknown command 2B. Handling it
with the incorrect p3io command struct, any following reading
attempts from the P3IO by the game fail.

Handle the 2B case explicitly with a generic response that worked
previously before the restructuring of the code. Apply the same
to any further unknown commands with improved logging warning
about this.
2023-11-28 15:33:58 +01:00
icex2 f3c834ce20 fix(p3io): Off-by-one error on assert
Buffers are allowed to have the exact size as the max defined
P3IO buffer size. Cutting it short by one byte causes this
to fail incorrectly when using the pure raw buffer structure
2023-11-28 15:33:58 +01:00