Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
ecm

Homepage E-mail

Düsseldorf, Germany,
20.05.2020, 20:08
 

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

Maybe someone here wants to look into this. Basically, the raw mode switch from Real 86 Mode to Protected Mode crashes in dosemu2. I fixed several bugs in my application already, but the main problem remains. I reported this to the dosemu tracker but they haven't figured it out yet either.

A simpler testcase seems to work fine, though dosemu's built-in debugger does have some (lesser) difficulties with the mode switch.

---
l

ecm

Homepage E-mail

Düsseldorf, Germany,
20.05.2020, 21:08

@ ecm
 

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

A problem that seems to be on dosemu's part was fixed, which allowed me to use their debugger to fix the remaining errors in the application. Refer to that thread for details.

---
l

Japheth

Homepage

Germany (South),
20.05.2020, 23:19

@ ecm
 

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

> 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.

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.

---
MS-DOS forever!

ecm

Homepage E-mail

Düsseldorf, Germany,
20.05.2020, 23:38

@ Japheth
 

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

> > 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

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 192 users online (0 registered, 192 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum