1
0
Fork 0

use 16bit for mediaid-field (Pinball 3D/VCR installer workaround);

create new PSP function should copy command line (Kings Quest AGI -cga switch)


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2339
This commit is contained in:
Sebastian Strohhäcker 2005-10-07 15:16:58 +00:00
parent 511687f8f1
commit a77e5b6d36
4 changed files with 14 additions and 11 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_execute.cpp,v 1.49 2005-09-19 08:25:38 c2woody Exp $ */
/* $Id: dos_execute.cpp,v 1.50 2005-10-07 15:16:58 c2woody Exp $ */
#include <string.h>
#include <ctype.h>
@ -185,8 +185,11 @@ static bool MakeEnv(char * name,Bit16u * segment) {
bool DOS_NewPSP(Bit16u segment, Bit16u size) {
DOS_PSP psp(segment);
psp.MakeNew(size);
DOS_PSP psp_parent(psp.GetParent());
Bit16u parent_psp_seg=psp.GetParent();
DOS_PSP psp_parent(parent_psp_seg);
psp.CopyFileTable(&psp_parent,false);
// copy command line as well (Kings Quest AGI -cga switch)
psp.SetCommandTail(RealMake(parent_psp_seg,0x80));
return true;
};

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_files.cpp,v 1.69 2005-09-11 13:09:45 qbix79 Exp $ */
/* $Id: dos_files.cpp,v 1.70 2005-10-07 15:16:58 c2woody Exp $ */
#include <string.h>
#include <stdlib.h>
@ -1014,7 +1014,7 @@ bool DOS_GetAllocationInfo(Bit8u drive,Bit16u * _bytes_sector,Bit8u * _sectors_c
Bit16u _free_clusters;
Drives[drive]->AllocationInfo(_bytes_sector,_sectors_cluster,_total_clusters,&_free_clusters);
SegSet16(ds,RealSeg(dos.tables.mediaid));
reg_bx=RealOff(dos.tables.mediaid+drive);
reg_bx=RealOff(dos.tables.mediaid+drive*2);
return true;
}

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_programs.cpp,v 1.44 2005-09-29 08:48:39 qbix79 Exp $ */
/* $Id: dos_programs.cpp,v 1.45 2005-10-07 15:16:58 c2woody Exp $ */
#include <stdlib.h>
#include <string.h>
@ -203,7 +203,7 @@ public:
if (!newdrive) E_Exit("DOS:Can't create drive");
Drives[drive-'A']=newdrive;
/* Set the correct media byte in the table */
mem_writeb(Real2Phys(dos.tables.mediaid)+drive-'A',newdrive->GetMediaByte());
mem_writeb(Real2Phys(dos.tables.mediaid)+(drive-'A')*2,newdrive->GetMediaByte());
WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),drive,newdrive->GetInfo());
/* check if volume label is given and don't allow it to updated in the future */
if (cmd->FindString("-label",label,true)) newdrive->dirCache.SetLabel(label.c_str(),false);
@ -725,7 +725,7 @@ public:
if (!newdrive) WriteOut(MSG_Get("PROGRAM_IMGMOUNT_CANT_CREATE"));
Drives[drive-'A']=newdrive;
// Set the correct media byte in the table
mem_writeb(Real2Phys(dos.tables.mediaid)+drive-'A',mediaid);
mem_writeb(Real2Phys(dos.tables.mediaid)+(drive-'A')*2,mediaid);
WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),drive,temp_line.c_str());
if(((fatDrive *)newdrive)->loadedDisk->hardDrive) {
if(imageDiskList[2] == NULL) {
@ -751,7 +751,7 @@ public:
if (!newdrive) WriteOut(MSG_Get("PROGRAM_IMGMOUNT_CANT_CREATE"));
Drives[drive-'A']=newdrive;
// Set the correct media byte in the table
mem_writeb(Real2Phys(dos.tables.mediaid)+drive-'A',mediaid);
mem_writeb(Real2Phys(dos.tables.mediaid)+(drive-'A')*2,mediaid);
WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"),drive,temp_line.c_str());
} else if (fstype=="none") {
if(imageDiskList[drive] != NULL) delete imageDiskList[drive];

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_tables.cpp,v 1.20 2005-08-08 13:33:46 c2woody Exp $ */
/* $Id: dos_tables.cpp,v 1.21 2005-10-07 15:16:58 c2woody Exp $ */
#include "dosbox.h"
#include "mem.h"
@ -75,10 +75,10 @@ static Bit8u country_info[0x22] = {
void DOS_SetupTables(void) {
dos_memseg=0xd000;
Bit16u seg,seg2;Bitu i;
dos.tables.mediaid=RealMake(DOS_GetMemory(2),0);
dos.tables.mediaid=RealMake(DOS_GetMemory(4),0);
dos.tables.tempdta=RealMake(DOS_GetMemory(4),0);
dos.tables.tempdta_fcbdelete=RealMake(DOS_GetMemory(4),0);
for (i=0;i<DOS_DRIVES;i++) mem_writeb(Real2Phys(dos.tables.mediaid)+i,0);
for (i=0;i<DOS_DRIVES;i++) mem_writew(Real2Phys(dos.tables.mediaid)+i*2,0);
/* Create the DOS Info Block */
dos_infoblock.SetLocation(DOS_INFOBLOCK_SEG); //c2woody