Use record size of 128 if it is 0 in the FCB when calling INT 21 AH=23 (fixes bug #433).
Set record size to 128 if it is 0 in the FCB when calling any FCB read/write function (ripsaw). Fixes for acad 10: - Add missing reference counting when the file is already open when calling FCB_Open, so that acad which uses FCBs and normal handles on the same file works better. - Remove FCBs being added to the PSP filetable and rewrite most functions to support this change. This way acad won't run out of temporary (fcb) files when low on memory. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3962
This commit is contained in:
parent
26dd1635b5
commit
59805112d9
3 changed files with 72 additions and 60 deletions
|
@ -110,19 +110,19 @@ enum { HAND_NONE=0,HAND_FILE,HAND_DEVICE};
|
|||
|
||||
/* Routines for File Class */
|
||||
void DOS_SetupFiles (void);
|
||||
bool DOS_ReadFile(Bit16u handle,Bit8u * data,Bit16u * amount);
|
||||
bool DOS_WriteFile(Bit16u handle,Bit8u * data,Bit16u * amount);
|
||||
bool DOS_SeekFile(Bit16u handle,Bit32u * pos,Bit32u type);
|
||||
bool DOS_CloseFile(Bit16u handle);
|
||||
bool DOS_ReadFile(Bit16u handle,Bit8u * data,Bit16u * amount, bool fcb = false);
|
||||
bool DOS_WriteFile(Bit16u handle,Bit8u * data,Bit16u * amount,bool fcb = false);
|
||||
bool DOS_SeekFile(Bit16u handle,Bit32u * pos,Bit32u type,bool fcb = false);
|
||||
bool DOS_CloseFile(Bit16u handle,bool fcb = false);
|
||||
bool DOS_FlushFile(Bit16u handle);
|
||||
bool DOS_DuplicateEntry(Bit16u entry,Bit16u * newentry);
|
||||
bool DOS_ForceDuplicateEntry(Bit16u entry,Bit16u newentry);
|
||||
bool DOS_GetFileDate(Bit16u entry, Bit16u* otime, Bit16u* odate);
|
||||
|
||||
/* Routines for Drive Class */
|
||||
bool DOS_OpenFile(char const * name,Bit8u flags,Bit16u * entry);
|
||||
bool DOS_OpenFile(char const * name,Bit8u flags,Bit16u * entry,bool fcb = false);
|
||||
bool DOS_OpenFileExtended(char const * name, Bit16u flags, Bit16u createAttr, Bit16u action, Bit16u *entry, Bit16u* status);
|
||||
bool DOS_CreateFile(char const * name,Bit16u attribute,Bit16u * entry);
|
||||
bool DOS_CreateFile(char const * name,Bit16u attribute,Bit16u * entry, bool fcb = false);
|
||||
bool DOS_UnlinkFile(char const * const name);
|
||||
bool DOS_FindFirst(char *search,Bit16u attr,bool fcb_findfirst=false);
|
||||
bool DOS_FindNext(void);
|
||||
|
@ -501,6 +501,7 @@ public:
|
|||
void GetRecord(Bit16u & _cur_block,Bit8u & _cur_rec);
|
||||
void SetRecord(Bit16u _cur_block,Bit8u _cur_rec);
|
||||
void GetSeqData(Bit8u & _fhandle,Bit16u & _rec_size);
|
||||
void SetSeqData(Bit8u _fhandle,Bit16u _rec_size);
|
||||
void GetRandom(Bit32u & _random);
|
||||
void SetRandom(Bit32u _random);
|
||||
Bit8u GetDrive(void);
|
||||
|
@ -529,6 +530,8 @@ private:
|
|||
Bit8u sft_entries;
|
||||
Bit8u share_attributes;
|
||||
Bit8u extra_info;
|
||||
/* Maybe swap file_handle and sft_entries now that fcbs
|
||||
* aren't stored in the psp filetable anymore */
|
||||
Bit8u file_handle;
|
||||
Bit8u reserved[4];
|
||||
/* end */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue