Change fpu for Elvira. Added isRemovable to drive for dott.cd and alike.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2047
This commit is contained in:
parent
b089c22997
commit
e9df6e56ab
8 changed files with 43 additions and 13 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_system.h,v 1.26 2004-10-20 12:27:18 qbix79 Exp $ */
|
||||
/* $Id: dos_system.h,v 1.27 2004-11-03 23:13:53 qbix79 Exp $ */
|
||||
|
||||
#ifndef DOSSYSTEM_H_
|
||||
#define DOSSYSTEM_H_
|
||||
|
@ -242,6 +242,7 @@ public:
|
|||
virtual void SetDir(const char* path) { strcpy(curdir,path); };
|
||||
virtual void EmptyCache(void) { dirCache.EmptyCache(); };
|
||||
virtual bool isRemote(void)=0;
|
||||
virtual bool isRemovable(void)=0;
|
||||
char * GetInfo(void);
|
||||
char curdir[DOS_PATHLENGTH];
|
||||
char info[256];
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_ioctl.cpp,v 1.20 2004-08-04 09:12:53 qbix79 Exp $ */
|
||||
/* $Id: dos_ioctl.cpp,v 1.21 2004-11-03 23:13:54 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -41,8 +41,9 @@ bool DOS_IOCTL(void) {
|
|||
switch(reg_al) {
|
||||
case 0x00: /* Get Device Information */
|
||||
reg_dx=Files[handle]->GetInformation();
|
||||
reg_ax=reg_dx; //Destroyed officially
|
||||
return true;
|
||||
case 0x06: /* Get Input Status */
|
||||
case 0x06: /* Get Input Status */
|
||||
if (Files[handle]->GetInformation() & 0x8000) { //Check for device
|
||||
reg_al=(Files[handle]->GetInformation() & 0x40) ? 0x0 : 0xff;
|
||||
} else { // FILE
|
||||
|
@ -67,8 +68,11 @@ bool DOS_IOCTL(void) {
|
|||
case 0x08: /* Check if block device removable */
|
||||
drive=reg_bl;if (!drive) drive=dos.current_drive;else drive--;
|
||||
if (Drives[drive]) {
|
||||
if (drive<2) reg_ax=0; /* Drive a,b are removable if mounted */
|
||||
else reg_ax=1;
|
||||
/* Drive a,b are removable if mounted *
|
||||
* So are cdrom drives */
|
||||
if (drive < 2 || Drives[drive]->isRemovable())
|
||||
reg_ax=0;
|
||||
else reg_ax=1;
|
||||
return true;
|
||||
} else {
|
||||
DOS_SetError(DOSERR_INVALID_DRIVE);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_fat.cpp,v 1.5 2004-09-05 14:23:04 qbix79 Exp $ */
|
||||
/* $Id: drive_fat.cpp,v 1.6 2004-11-03 23:13:54 qbix79 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -698,7 +698,8 @@ Bit32u fatDrive::getFirstFreeClust(void) {
|
|||
|
||||
}
|
||||
|
||||
bool fatDrive::isRemote(void) { return false; }
|
||||
bool fatDrive::isRemote(void) { return false; }
|
||||
bool fatDrive::isRemovable(void) { return false; }
|
||||
|
||||
Bit8u fatDrive::GetMediaByte(void) { return loadedDisk->GetBiosType(); }
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_iso.cpp,v 1.3 2004-10-05 21:18:48 qbix79 Exp $ */
|
||||
/* $Id: drive_iso.cpp,v 1.4 2004-11-03 23:13:55 qbix79 Exp $ */
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
|
@ -367,6 +367,11 @@ bool isoDrive::isRemote(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool isoDrive::isRemovable(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool isoDrive :: readSector(Bit8u *buffer, Bit32u sector)
|
||||
{
|
||||
return CDROM_Interface_Image::images[subUnit]->ReadSector(buffer, false, sector);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_local.cpp,v 1.52 2004-10-12 09:42:25 qbix79 Exp $ */
|
||||
/* $Id: drive_local.cpp,v 1.53 2004-11-03 23:13:55 qbix79 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -366,6 +366,10 @@ bool localDrive::isRemote(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool localDrive::isRemovable(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
localDrive::localDrive(const char * startdir,Bit16u _bytes_sector,Bit8u _sectors_cluster,Bit16u _total_clusters,Bit16u _free_clusters,Bit8u _mediaid) {
|
||||
strcpy(basedir,startdir);
|
||||
sprintf(info,"local directory %s",startdir);
|
||||
|
@ -572,3 +576,7 @@ void cdromDrive::SetDir(const char* path)
|
|||
bool cdromDrive::isRemote(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cdromDrive::isRemovable(void) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -236,3 +236,7 @@ Bit8u Virtual_Drive::GetMediaByte(void) {
|
|||
bool Virtual_Drive::isRemote(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Virtual_Drive::isRemovable(void) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drives.h,v 1.24 2004-10-05 19:55:03 qbix79 Exp $ */
|
||||
/* $Id: drives.h,v 1.25 2004-11-03 23:13:55 qbix79 Exp $ */
|
||||
|
||||
#ifndef _DRIVES_H__
|
||||
#define _DRIVES_H__
|
||||
|
@ -49,6 +49,7 @@ public:
|
|||
virtual bool FileStat(const char* name, FileStat_Block * const stat_block);
|
||||
virtual Bit8u GetMediaByte(void);
|
||||
virtual bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
private:
|
||||
char basedir[CROSS_LEN];
|
||||
friend void DOS_Shell::CMD_SUBST(char* args);
|
||||
|
@ -140,6 +141,7 @@ public:
|
|||
virtual bool FileStat(const char* name, FileStat_Block * const stat_block);
|
||||
virtual Bit8u GetMediaByte(void);
|
||||
virtual bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
public:
|
||||
Bit32u getAbsoluteSectFromBytePos(Bit32u startClustNum, Bit32u bytePos);
|
||||
Bit32u getSectorSize(void);
|
||||
|
@ -200,6 +202,7 @@ public:
|
|||
virtual bool FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst=false);
|
||||
virtual void SetDir(const char* path);
|
||||
virtual bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
private:
|
||||
Bit8u subUnit;
|
||||
};
|
||||
|
@ -295,6 +298,7 @@ public:
|
|||
virtual Bit8u GetMediaByte(void);
|
||||
virtual void EmptyCache(void){}
|
||||
virtual bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
bool readSector(Bit8u *buffer, Bit32u sector);
|
||||
private:
|
||||
int readDirEntry(isoDirEntry *de, Bit8u *data);
|
||||
|
@ -326,11 +330,12 @@ public:
|
|||
bool GetFileAttr(char * name,Bit16u * attr);
|
||||
bool Rename(char * oldname,char * newname);
|
||||
bool AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters);
|
||||
bool FileExists(const char* name);
|
||||
bool FileStat(const char* name, FileStat_Block* const stat_block);
|
||||
bool FileExists(const char* name);
|
||||
bool FileStat(const char* name, FileStat_Block* const stat_block);
|
||||
Bit8u GetMediaByte(void);
|
||||
void EmptyCache(void){}
|
||||
bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
private:
|
||||
VFILE_Block * search_file;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: fpu_instructions.h,v 1.24 2004-10-13 19:26:26 qbix79 Exp $ */
|
||||
/* $Id: fpu_instructions.h,v 1.25 2004-11-03 23:13:55 qbix79 Exp $ */
|
||||
|
||||
|
||||
static void FPU_FINIT(void) {
|
||||
|
@ -322,6 +322,8 @@ static void FPU_ST80(PhysPt addr,Bitu reg)
|
|||
Bit64s exp80final= (exp80>>52) - BIAS64 + BIAS80;
|
||||
Bit64s mant80 = fpu.regs[reg].ll&LONGTYPE(0x000fffffffffffff);
|
||||
Bit64s mant80final= (mant80 << 11);
|
||||
// Elvira wants the 8 and tcalc doesn't
|
||||
if(fpu.regs[reg].d != 0) mant80final |= LONGTYPE(0x8000000000000000);
|
||||
test.begin= (static_cast<Bit16s>(sign80)<<15)| static_cast<Bit16s>(exp80final);
|
||||
test.eind.ll=mant80final;
|
||||
mem_writed(addr,test.eind.l.lower);
|
||||
|
|
Loading…
Add table
Reference in a new issue