1 #ifndef __HDD_SUPPORT_H
2 #define __HDD_SUPPORT_H
4 #include "include/iosupport.h"
6 #define PS2PART_IDMAX 32
7 #define HDL_GAME_NAME_MAX 64
10 #define APA_MAGIC 0x00415041 // 'APA\0'
11 #define APA_IDMAX PS2PART_IDMAX
12 #define APA_MAXSUB 64 // Maximum # of sub-partitions
14 #define APA_FLAG_SUB 0x0001
15 #define APA_MBR_VERSION 2
16 #define APA_IOCTL2_GETHEADER 0x6836
17 #define PFS_IOCTL2_GET_INODE 0x7007
21 char partition_name
[PS2PART_IDMAX
+ 1];
22 char name
[HDL_GAME_NAME_MAX
+ 1];
23 char startup
[8 + 1 + 3 + 1];
25 u8 ops2l_compat_flags
;
37 hdl_game_info_t
*games
;
55 u32 magic
; // APA_MAGIC
58 char id
[APA_IDMAX
]; // 16
59 char rpwd
[APA_PASSMAX
]; // 48
60 char fpwd
[APA_PASSMAX
]; // 56
66 ps2time_t created
; // 80
70 u32 pading1
[7]; // 100
71 char pading2
[128]; // 128
97 u32 device_size_in_mb
;
104 // existing partitions
107 apa_partition_t
*parts
;
108 } apa_partition_table_t
;
119 pfs_blockinfo_t inode_block
;
120 pfs_blockinfo_t next_segment
;
121 pfs_blockinfo_t last_segment
;
122 pfs_blockinfo_t unused
;
123 pfs_blockinfo_t data
[114];
145 #include "include/mcemu.h"
147 int active
; /* Activation flag */
148 apa_subs parts
[5]; /* Vmc file Apa partitions */
149 pfs_blockinfo_t blocks
[10]; /* Vmc file Pfs inode */
150 int flags
; /* Card flag */
151 vmc_spec_t specs
; /* Card specifications */
156 u32
hddGetTotalSectors(void);
157 int hddIs48bit(void);
158 int hddSetTransferMode(int type
, int mode
);
159 int hddSetIdleTimeout(int timeout
);
160 int hddGetHDLGamelist(hdl_games_list_t
**game_list
);
161 int hddFreeHDLGamelist(hdl_games_list_t
*game_list
);
162 int hddSetHDLGameInfo(hdl_game_info_t
*ginfo
);
163 int hddDeleteHDLGame(hdl_game_info_t
*ginfo
);
166 item_list_t
* hddGetObject(int initOnly
);
167 void hddLoadModules(void);