Rewrote devices so they can be opened/closed/cloned. Fix Turbo pascal 7 saving bug(wd/mirek). Increase number of files to 127. Remove null device from default handles. Proper creation of the initial psp. (not hacked anymore). Quite some files= bugs should be fixed
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2025
This commit is contained in:
parent
3ee0cef43d
commit
3602a06de9
9 changed files with 165 additions and 94 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_system.h,v 1.24 2004-08-04 09:12:50 qbix79 Exp $ */
|
||||
/* $Id: dos_system.h,v 1.25 2004-10-17 14:44:59 qbix79 Exp $ */
|
||||
|
||||
#ifndef DOSSYSTEM_H_
|
||||
#define DOSSYSTEM_H_
|
||||
|
@ -54,6 +54,8 @@ class DOS_DTA;
|
|||
class DOS_File {
|
||||
public:
|
||||
DOS_File():flags(0) { name=0; refCtr = 0; };
|
||||
DOS_File(const DOS_File& orig);
|
||||
DOS_File & operator= (const DOS_File & orig);
|
||||
virtual ~DOS_File(){if(name) delete [] name;};
|
||||
virtual bool Read(Bit8u * data,Bit16u * size)=0;
|
||||
virtual bool Write(Bit8u * data,Bit16u * size)=0;
|
||||
|
@ -81,9 +83,20 @@ public:
|
|||
|
||||
class DOS_Device : public DOS_File {
|
||||
public:
|
||||
/* Some Device Specific Stuff */
|
||||
char * name;
|
||||
Bit8u fhandle;
|
||||
DOS_Device(const DOS_Device& orig):DOS_File(orig) {devnum=orig.devnum; }
|
||||
DOS_Device & operator= (const DOS_Device & orig) {
|
||||
DOS_File::operator=(orig);
|
||||
devnum=orig.devnum;
|
||||
}
|
||||
DOS_Device():DOS_File(),devnum(0){};
|
||||
virtual bool Read(Bit8u * data,Bit16u * size);
|
||||
virtual bool Write(Bit8u * data,Bit16u * size);
|
||||
virtual bool Seek(Bit32u * pos,Bit32u type);
|
||||
virtual bool Close();
|
||||
virtual Bit16u GetInformation(void);
|
||||
void SetDeviceNumber(Bitu num) { devnum=num;}
|
||||
private:
|
||||
Bitu devnum;
|
||||
};
|
||||
|
||||
#define MAX_OPENDIRS 2048
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue