Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

A problem using raw mode switch from R86M to PM in dosemu (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 20.05.2020, 23:38

> > Basically, the raw mode switch
> > from Real 86 Mode to Protected Mode crashes in dosemu2.
>
> Tool DPMI.EXE has cmdline option -r, which measures mode switching times,
> including raw mode switches (protected-mode -> real-mode ->
> protected-mode). It runs with DOSEMU2, no crash - although a bit slow.

My fixed debugger works on an unpatched dosemu now too. I guess that the error was only in dosdebug (dosemu's integrated debugger), which lost control of the application on the R86M to PM mode switch. Two of the dosemu commits combined fix that.

The problem was a combination of factors for me. Without dosdebug, my own application code crashed, but dosemu worked exactly as it should. With dosdebug trying to step through the mode switch failed, which always made it crash some way. (Possibly always due to my own errors, or just randomly from dosdebug's errors.)

> However, some of my test cases written for HDPMI won't run with DOSEMU2.
> Generally, DOSEMU2 has problems if raw-mode switches are combined with
> real-mode callbacks.

In my dpmipsp test case I do call into a 86 mode function, which calls a callback into protected mode. And the debugger, when entered in 86 mode and able to switch, does perform a 86 mode to protected mode back to 86 mode raw mode switch sequence. (The "debuggable" DDebugX build does even more modeswitching in the same direction if running in 86 mode, to set and reset its protected mode handlers.) It seems to work, though perhaps it should not.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22752 Postings in 2119 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum