Reply 320 of 406, by crazii
- Rank
- Oldbie
Baron von Riedesel wrote on 2023-02-24, 14:37:crazii wrote on 2023-02-24, 13:06:I'm more worried about real mode, the context may be hard to get if interrupt happens in VM monitor IDT and routed to HDPMI, I guess. -OK, most real mode games have multiple segments so they usually don't make assumptions about data segments.
Real-mode isn't such a concern , because hdpmi takes care that the real-mode segment registers are restored when the emulated interrupt is launched. However, this is only true if you launch the interrupt with asm("int 7"), not if you launch it with the _dpmi_callrealmode_iret() function ( because in that case you have to provide the segment registers on your own ).
OK, I integrate your commit and now INT 0Dh/0Fh works, and I also added back getting interrupt context vendor api, if context is VM I'll use the call real mode method, if PM, I manually restore the context and then INT, everything works, games have sounds, but MDK still have no keyboard input. I think is a special incompatibility problem.
EDIT: tried MDK without SBEMU, keyboard not working either. tried MDK without HDPMI, keyboard working.
Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD