First post, by dosboxer
Hi all
I've recently discovered DosBox (0.73) for myself and I fall in love
Very nice system, the only thing I"m missing is, well, yes - SoftIce for DOS
I've tried to use the latest DOS version of SI - v2.8
Of course it does not run, so I'd like to put here my investigation.
SI Doc says you have two ways to run it
1) from config.sys - not possible as (AFAIK) no such a section in .conf file
2) from command prompt - just run S-ICE.EXE
the 2nd case closes DosBox without any prompt at all. This forum search lead just to some general ideas that SI uses debug regs DRx that are not supported by DosBox core. OK, if it'd be so, sice shall tell me about this fact, not just crash the whole system!?
Then I've asked myself - what is the reason of sice crash? here are the items done in order to investigate the root reason
a) logs - I've inspected dosbox.log file (that I've asked to create from dosbox-0.73.conf by adding new section as follows:
[log]
logfile=c:\dosbox73.log
Nothing interesting at all
b) inspecting of stdout.txt, stderr.txt files in DosBox installed dir - nothing interesting as well.
c) OK, simple ways are out, time to use some debugger in order to track the issue down. I knew that DosBox could be built as a debug and heavy debug binary, but I'm (still) not familiar with its native debugger, so I've used old good tool named avputil.com (came from old DOS times antivirus named AVP for DOS). It is very small & handy tool to do some RE in DOS
So, using it, I've found what drive DosBox crazy - after executing this command it silently closes itself (crashing):
41B6:0971 MOV CR0, EAX ; EAX content before executing = 0001h
CRx register is so called Control Register.
A control register is a processor register which changes or controls the general behavior of a CPU or other digital device.
OK, CR0 register:
CR0 - contains system control flags that control operating mode and states of the processor.
CR0: |PG|----RESERVED----|ET|TS|EM|MP|PE|
PE: Bit 0. The Protected Environment flag. This flag puts the system into protected mode when set.
In our case we are programming CR0 to have 1, ie - putting CPU into prot. mode that lead to crash.
My questions are:
0) does DosBox supports emulation of CRx regs (or in other words - does it support emulation of protected env. mode)?
1) is it a well-known issue with reprogramming CR0 from applicaiton
2) what could be done in order to support emulation of CR0 reprogramming
3) does someone know other apps/games/tools that work in DosBox and which are using CR0 reg
4) what else could I collect from my PC(info, files, etc) in order to proceed with investigation of the issue?
P.S. I've put core=normal key as it is usually recommended for debugging