Arrange stack to restore registers when a child PSP is terminated. Fixes crashes in some demos (Blashphemy by Fatal Justice, Dreamwar by Elfsong, Mystic by Xenogenesis, et al).
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3892
This commit is contained in:
parent
3e5241947c
commit
84bb06ea60
1 changed files with 4 additions and 0 deletions
|
@ -225,6 +225,10 @@ bool DOS_ChildPSP(Bit16u segment, Bit16u size) {
|
|||
psp.SetFCB2(RealMake(parent_psp_seg,0x6c));
|
||||
psp.SetEnvironment(psp_parent.GetEnvironment());
|
||||
psp.SetSize(size);
|
||||
// push registers in case child PSP is terminated
|
||||
SaveRegisters();
|
||||
psp.SetStack(RealMakeSeg(ss,reg_sp));
|
||||
reg_sp+=18;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue