mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / modules / mcemu / ioman_add.h
blobbef613436a5cabd7c7f1ff97417c103b217971b1
1 #ifndef _IOMAN_ADD_H_
2 #define _IOMAN_ADD_H_
4 #define IOP_DT_FSEXT 0x10000000
6 typedef struct _iop_ext_device {
7 const char *name;
8 unsigned int type;
9 unsigned int version; /* Not so sure about this one. */
10 const char *desc;
11 struct _iop_ext_device_ops *ops;
12 } iop_ext_device_t;
14 typedef struct {
15 /*00*/ unsigned int mode;
16 /*04*/ unsigned int attr;
17 /*08*/ unsigned int size;
18 /*0c*/ unsigned char ctime[8];
19 /*14*/ unsigned char atime[8];
20 /*1c*/ unsigned char mtime[8];
21 /*24*/ unsigned int hisize;
22 /*28*/ unsigned int private_0; /* Number of subs (main) / subpart number (sub) */
23 /*2c*/ unsigned int private_1;
24 /*30*/ unsigned int private_2;
25 /*34*/ unsigned int private_3;
26 /*38*/ unsigned int private_4;
27 /*3c*/ unsigned int private_5; /* Sector start. */
28 } iox_stat_t;
30 typedef struct {
31 iox_stat_t stat;
32 char name[256];
33 unsigned int unknown;
34 } iox_dirent_t;
36 typedef struct _iop_ext_device_ops {
37 int (*init)(iop_device_t *);
38 int (*deinit)(iop_device_t *);
39 int (*format)(iop_file_t *);
40 int (*open)(iop_file_t *, const char *, int);
41 int (*close)(iop_file_t *);
42 int (*read)(iop_file_t *, void *, int);
43 int (*write)(iop_file_t *, void *, int);
44 int (*lseek)(iop_file_t *, unsigned long, int);
45 int (*ioctl)(iop_file_t *, unsigned long, void *);
46 int (*remove)(iop_file_t *, const char *);
47 int (*mkdir)(iop_file_t *, const char *);
48 int (*rmdir)(iop_file_t *, const char *);
49 int (*dopen)(iop_file_t *, const char *);
50 int (*dclose)(iop_file_t *);
51 int (*dread)(iop_file_t *, iox_dirent_t *);
52 int (*getstat)(iop_file_t *, const char *, iox_stat_t *);
53 int (*chstat)(iop_file_t *, const char *, iox_stat_t *, unsigned int);
54 /* Extended ops start here. */
55 int (*rename)(iop_file_t *, const char *, const char *);
56 int (*chdir)(iop_file_t *, const char *);
57 int (*sync)(iop_file_t *, const char *, int);
58 int (*mount)(iop_file_t *, const char *, const char *, int, void *, unsigned int);
59 int (*umount)(iop_file_t *, const char *);
60 long long (*lseek64)(iop_file_t *, long long, int);
61 int (*devctl)(iop_file_t *, const char *, int, void *, unsigned int, void *, unsigned int);
62 int (*symlink)(iop_file_t *, const char *, const char *);
63 int (*readlink)(iop_file_t *, const char *, char *, unsigned int);
64 int (*ioctl2)(iop_file_t *, int, void *, unsigned int, void *, unsigned int);
66 } iop_ext_device_ops_t;
68 #endif