dos changes c2woody
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1689
This commit is contained in:
parent
410b9f72d2
commit
e05d508f81
6 changed files with 72 additions and 14 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos.cpp,v 1.66 2004-02-18 13:02:55 qbix79 Exp $ */
|
||||
/* $Id: dos.cpp,v 1.67 2004-02-28 16:35:14 qbix79 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -764,6 +764,10 @@ static Bitu DOS_21Handler(void) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 0x5f: /* Network redirection */
|
||||
reg_ax=0x0001; //Failing it
|
||||
CALLBACK_SCF(true);
|
||||
break;
|
||||
case 0x60: /* Canonicalize filename or path */
|
||||
MEM_StrCopy(SegPhys(ds)+reg_si,name1,DOSNAMEBUF);
|
||||
if (DOS_Canonicalize(name1,name2)) {
|
||||
|
@ -872,7 +876,6 @@ static Bitu DOS_21Handler(void) {
|
|||
case 0x32: /* Get drive parameter block for specific drive */
|
||||
case 0x5c: /* FLOCK File region locking */
|
||||
case 0x5e: /* More Network Functions */
|
||||
case 0x5f: /* And Even More Network Functions */
|
||||
default:
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Unhandled call %02X al=%02X. Set al to default of 0",reg_ah,reg_al);
|
||||
reg_al=0x00; /* default value */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_classes.cpp,v 1.34 2004-02-03 14:54:36 finsterr Exp $ */
|
||||
/* $Id: dos_classes.cpp,v 1.35 2004-02-28 16:35:14 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -64,11 +64,36 @@ void DOS_InfoBlock::SetLocation(Bit16u segment)
|
|||
pt=PhysMake(seg,0);
|
||||
/* Clear the initual Block */
|
||||
for(Bitu i=0;i<sizeof(sDIB);i++) mem_writeb(pt+i,0xff);
|
||||
|
||||
sSave(sDIB,activeCon,RealMake(0x54,0));
|
||||
|
||||
sSave(sDIB,regCXfrom5e,(Bit16u)0);
|
||||
sSave(sDIB,countLRUcache,(Bit16u)0);
|
||||
sSave(sDIB,countLRUopens,(Bit16u)0);
|
||||
|
||||
sSave(sDIB,protFCBs,(Bit16u)0);
|
||||
sSave(sDIB,specialCodeSeg,(Bit16u)0);
|
||||
sSave(sDIB,joindedDrives,(Bit8u)0);
|
||||
sSave(sDIB,lastdrive,(Bit8u)0x18);
|
||||
|
||||
sSave(sDIB,setverPtr,(Bit32u)0);
|
||||
|
||||
sSave(sDIB,a20FixOfs,(Bit16u)0);
|
||||
sSave(sDIB,pspLastIfHMA,(Bit16u)0);
|
||||
sSave(sDIB,blockDevices,(Bit8u)0);
|
||||
|
||||
sSave(sDIB,bootDrive,(Bit8u)0);
|
||||
sSave(sDIB,useDwordMov,(Bit8u)1);
|
||||
sSave(sDIB,extendedSize,(Bit16u)0x4000); // >16mb
|
||||
|
||||
sSave(sDIB,sharingCount,(Bit16u)0);
|
||||
sSave(sDIB,sharingDelay,(Bit16u)0);
|
||||
|
||||
}
|
||||
|
||||
void DOS_InfoBlock::SetFirstMCB(Bit16u _firstmcb)
|
||||
{
|
||||
sSave(sDIB,firstMCB,RealMake(_firstmcb,0));
|
||||
sSave(sDIB,firstMCB,_firstmcb); //c2woody
|
||||
}
|
||||
|
||||
void DOS_InfoBlock::SetfirstFileTable(RealPt _first_table){
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id */
|
||||
/* $Id: dos_execute.cpp,v 1.35 2004-02-28 16:35:14 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -298,6 +298,9 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) {
|
|||
else memsize=maxsize;
|
||||
if (!DOS_AllocateMemory(&pspseg,&memsize)) E_Exit("DOS:Exec error in memory");
|
||||
loadseg=pspseg+16;
|
||||
if ((!iscom) & (head.minmemory == 0) & (head.maxmemory == 0))
|
||||
loadseg = (0x9fed0 - imagesize)/16; //c2woody
|
||||
|
||||
} else loadseg=block.overlay.loadseg;
|
||||
/* Load the executable */
|
||||
Bit8u * loadbuf=(Bit8u *)new Bit8u[0x10000];
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_ioctl.cpp,v 1.18 2004-01-10 14:03:34 qbix79 Exp $ */
|
||||
/* $Id: dos_ioctl.cpp,v 1.19 2004-02-28 16:35:14 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -97,6 +97,10 @@ bool DOS_IOCTL(void) {
|
|||
mem_writew(ptr+2,drive>=2); // nonremovable ?
|
||||
mem_writew(ptr+4,0x0000); // num of cylinders
|
||||
mem_writeb(ptr+6,0x00); // media type (00=other type)
|
||||
// drive parameter block following
|
||||
mem_writeb(ptr+7,drive); // drive
|
||||
mem_writeb(ptr+8,0x00); // unit number
|
||||
mem_writed(ptr+0x1f,0xffffffff); // next parameter block
|
||||
break;
|
||||
default :
|
||||
LOG(LOG_IOCTL,LOG_ERROR)("DOS:IOCTL Call 0D:%2X Drive %2X unhandled",reg_cl,drive);
|
||||
|
|
|
@ -57,6 +57,9 @@ void DOS_SetupTables(void) {
|
|||
mem_writeb(Real2Phys(dos.tables.indosflag),0);
|
||||
/* Create the DOS Info Block */
|
||||
dos_infoblock.SetLocation(DOS_GetMemory(1+(sizeof(DOS_InfoBlock::sDIB)/16)));
|
||||
// dos_infoblock.SetLocation(0x4e); //c2woody
|
||||
/* The above lines might be switched around when working on certain programs */
|
||||
|
||||
/* Create a fake SFT, so programs think there are 100 file handles */
|
||||
seg=DOS_GetMemory(1);
|
||||
real_writed(seg,0,0xffffffff); //Last File Table
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue