First post, by william_p
Hello,
I need to change the way dosbox remember the "Big" bit of the code segment between switchs from protected mode and real mode.
So I ask where should I look to change this behavior (in the source code) and test with my test cases which doesn't work in dosbox currently ?
Some precisions :
Currently, in dosbox, the code segment becomes 16 bits each time we go to real mode from protected mode, without any condition.
Some programs do this :
- prepare a gdt with code selector in 32 bits mode (big bit set)
- jump to protected mode
- load the gdt
- load the selector into cs
- jump back to real mode, without reloading cs. (the cached hidden bits of the segment register remain the same)
In this case, the cpu must remain in 32 bits mode (for code). even if the cpu is back in real mode.
I know this because I coded , long time ago, a "dos extender" which used this trick to run 32 bits code in real mode (even faster than 32 bits protected mode). This extender was used into some demo my group made, and I would like to see it with dosbox...
So where is the best code location to change this ? Or what documentation should I read, where?