dosemu2 / dosemu2

Run DOS programs under linux:
http://dosemu2.github.io/dosemu2/
GNU General Public License v2.0
568 stars 59 forks source link

kms: syndicate game stalls on mouse move #1625

Open stsp opened 2 years ago

stsp commented 2 years ago

Under kms console, there is a problem with syndicate game. In the menus, mouse works fine. But once in a campaign, mouse moves freezes the entire game (unfreezes when mouse is idle). Mouse cursor is drawn by the game, not by int33 driver. And it redraws quite slowly. This may mean some mutex contention in rendering code.

stsp commented 2 years ago

Per-pixel updates in planar mode 0x12 causes slowdown because of instremu. So may be related to #463

stsp commented 2 years ago

No, not the same as #463 According to https://github.com/dosemu2/dosemu2/issues/463#issuecomment-332674438 in #463 instremu exits on unimplemented instructions. But here it doesn't exit, and actually accompanies the entire mouse update cycle.

stsp commented 2 years ago

Which probably means there is no fix here but to use JITting...

stsp commented 2 years ago

One thing I can think of, is for instremu/cpuemu to batch the vga write calls (when there are no read calls), and submit the batches to another thread. Whether this will help or not, depends on many factors. But worth a try.

stsp commented 2 years ago

Whether this will help or not, depends on many factors.

It won't help because these games do logical ops on a video memory. As a result, there are always reads. So writes cannot be batched. :(