|
|
| version 1.14, 2004/03/07 23:04:50 | version 1.17, 2005/05/13 06:19:48 |
|---|---|
| Line 66 static void fetch_if4dos(void) { | Line 66 static void fetch_if4dos(void) { |
| REG16 seg; | REG16 seg; |
| IF4DOS if4dos; | IF4DOS if4dos; |
| off = i286_memoryread_w(IF4DOSPTR_ADDR); | off = MEML_READ16(IF4DOSPTR_SEG, IF4DOSPTR_OFF + 0); |
| seg = i286_memoryread_w(IF4DOSPTR_ADDR + 2); | seg = MEML_READ16(IF4DOSPTR_SEG, IF4DOSPTR_OFF + 2); |
| MEML_READSTR(seg, off, &if4dos, sizeof(if4dos)); | MEML_READSTR(seg, off, &if4dos, sizeof(if4dos)); |
| hostdrv.stat.drive_no = if4dos.drive_no; | hostdrv.stat.drive_no = if4dos.drive_no; |
| hostdrv.stat.dosver_major = if4dos.dosver_major; | hostdrv.stat.dosver_major = if4dos.dosver_major; |
| Line 242 static void init_sft(SFTREC sft) { | Line 242 static void init_sft(SFTREC sft) { |
| else { | else { |
| sft->open_mode[0] &= 0x0f; | sft->open_mode[0] &= 0x0f; |
| } | } |
| sft->dev_info_word[0] = (BYTE)(0x40 | hostdrv.stat.drive_no); | sft->dev_info_word[0] = (UINT8)(0x40 | hostdrv.stat.drive_no); |
| sft->dev_info_word[1] = 0x80; | sft->dev_info_word[1] = 0x80; |
| STOREINTELDWORD(sft->dev_drvr_ptr, 0); | STOREINTELDWORD(sft->dev_drvr_ptr, 0); |
| STOREINTELDWORD(sft->file_pos, 0); | STOREINTELDWORD(sft->file_pos, 0); |
| Line 343 static BOOL read_data(UINT num, UINT32 p | Line 343 static BOOL read_data(UINT num, UINT32 p |
| HDRVFILE hdf; | HDRVFILE hdf; |
| FILEH fh; | FILEH fh; |
| BYTE work[1024]; | UINT8 work[1024]; |
| UINT r; | UINT r; |
| hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); | hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); |
| Line 370 static BOOL write_data(UINT num, UINT32 | Line 370 static BOOL write_data(UINT num, UINT32 |
| HDRVFILE hdf; | HDRVFILE hdf; |
| FILEH fh; | FILEH fh; |
| BYTE work[1024]; | UINT8 work[1024]; |
| UINT r; | UINT r; |
| hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); | hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); |
| Line 1294 void hostdrv_intr(const void *arg1, long | Line 1294 void hostdrv_intr(const void *arg1, long |
| TRACEOUT(("hostdrv: AL=%.2x", intrst.r.b.al)); | TRACEOUT(("hostdrv: AL=%.2x", intrst.r.b.al)); |
| if ((intrst.r.b.al >= sizeof(intr_func) / sizeof(HDINTRFN)) || | if ((intrst.r.b.al >= NELEMENTS(intr_func)) || |
| (intr_func[intrst.r.b.al] == NULL)) { | (intr_func[intrst.r.b.al] == NULL)) { |
| return; | return; |
| } | } |
| Line 1319 typedef struct { | Line 1319 typedef struct { |
| static BOOL fhdl_wr(void *vpItem, void *vpArg) { | static BOOL fhdl_wr(void *vpItem, void *vpArg) { |
| char *p; | OEMCHAR *p; |
| UINT len; | UINT len; |
| p = ((HDRVFILE)vpItem)->path; | p = ((HDRVFILE)vpItem)->path; |
| len = strlen(p); | len = OEMSTRLEN(p); |
| statflag_write((STFLAGH)vpArg, &len, sizeof(len)); | statflag_write((STFLAGH)vpArg, &len, sizeof(len)); |
| if (len) { | if (len) { |
| if (len < MAX_PATH) { | if (len < MAX_PATH) { |
| ZeroMemory(p + len, MAX_PATH - len); | ZeroMemory(p + len, (MAX_PATH - len) * sizeof(OEMCHAR)); |
| } | } |
| statflag_write((STFLAGH)vpArg, vpItem, sizeof(_HDRVFILE)); | statflag_write((STFLAGH)vpArg, vpItem, sizeof(_HDRVFILE)); |
| } | } |
| Line 1336 static BOOL fhdl_wr(void *vpItem, void * | Line 1336 static BOOL fhdl_wr(void *vpItem, void * |
| static BOOL flist_wr(void *vpItem, void *vpArg) { | static BOOL flist_wr(void *vpItem, void *vpArg) { |
| char *p; | OEMCHAR *p; |
| int len; | int len; |
| p = ((HDRVLST)vpItem)->realname; | p = ((HDRVLST)vpItem)->realname; |
| len = strlen(p); | len = OEMSTRLEN(p); |
| if (len < MAX_PATH) { | if (len < MAX_PATH) { |
| ZeroMemory(p + len, MAX_PATH - len); | ZeroMemory(p + len, (MAX_PATH - len) * sizeof(OEMCHAR)); |
| } | } |
| statflag_write((STFLAGH)vpArg, vpItem, sizeof(_HDRVLST)); | statflag_write((STFLAGH)vpArg, vpItem, sizeof(_HDRVLST)); |
| return(FALSE); | return(FALSE); |