1 | #ifndef _CDVDHDD_H_
|
---|
2 | #define _CDVDHDD_H_
|
---|
3 |
|
---|
4 | #define HDL_IRX 0xD0D0D0D
|
---|
5 |
|
---|
6 | #define HDD_SECTOR_SIZE 512 /* HDD sector size in bytes */
|
---|
7 |
|
---|
8 | /* HD Loader I/O interface */
|
---|
9 |
|
---|
10 | typedef struct hio_type hio_t;
|
---|
11 |
|
---|
12 | typedef int (*hio_probe_t) (const char *path,
|
---|
13 | hio_t **hio);
|
---|
14 |
|
---|
15 | typedef int (*hio_stat_t) (hio_t *hio,
|
---|
16 | u_long *size_in_kb);
|
---|
17 |
|
---|
18 | typedef int (*hio_read_t) (hio_t *hio,
|
---|
19 | u_long start_sector,
|
---|
20 | u_long num_sectors,
|
---|
21 | void *output,
|
---|
22 | u_long *bytes);
|
---|
23 |
|
---|
24 | typedef int (*hio_write_t) (hio_t *hio,
|
---|
25 | u_long start_sector,
|
---|
26 | u_long num_sectors,
|
---|
27 | const void *input,
|
---|
28 | u_long *bytes);
|
---|
29 |
|
---|
30 | typedef int (*hio_flush_t) (hio_t *hio);
|
---|
31 |
|
---|
32 | typedef int (*hio_poweroff_t) (hio_t *hio);
|
---|
33 |
|
---|
34 | typedef int (*hio_close_t) (hio_t *hio);
|
---|
35 |
|
---|
36 | /* return last error text in a memory buffer, that would be freed by calling hio_dispose_error_t */
|
---|
37 | typedef char* (*hio_last_error_t) (hio_t *hio);
|
---|
38 | typedef void (*hio_dispose_error_t) (hio_t *hio,
|
---|
39 | char* error);
|
---|
40 |
|
---|
41 | struct hio_type
|
---|
42 | {
|
---|
43 | hio_stat_t stat;
|
---|
44 | hio_read_t read;
|
---|
45 | hio_write_t write;
|
---|
46 | hio_flush_t flush;
|
---|
47 | hio_close_t close;
|
---|
48 | hio_poweroff_t poweroff;
|
---|
49 | hio_last_error_t last_error;
|
---|
50 | hio_dispose_error_t dispose_error;
|
---|
51 | };
|
---|
52 |
|
---|
53 | typedef struct hio_iop_type
|
---|
54 | {
|
---|
55 | hio_t hio;
|
---|
56 | int unit;
|
---|
57 | size_t size_in_sectors;
|
---|
58 | } hio_iop_t;
|
---|
59 |
|
---|
60 | typedef struct {
|
---|
61 | char Partition_Name [32 + 1];
|
---|
62 | } Rpc_Packet_Send_GetInfo;
|
---|
63 |
|
---|
64 | typedef struct {
|
---|
65 | char OldName[64];
|
---|
66 | char NewName[64];
|
---|
67 | } Rpc_Packet_Send_Rename;
|
---|
68 |
|
---|
69 | typedef struct {
|
---|
70 | char Partition_Name [32 + 1];
|
---|
71 | char Name [64 + 1];
|
---|
72 | char Startup [8 + 1 + 3 + 1];
|
---|
73 | int Is_Dvd;
|
---|
74 | } GameInfo;
|
---|
75 |
|
---|
76 | int HdlGetGameInfo(char *PartName, GameInfo *GameInf);
|
---|
77 | int HdlRenameGame(void *Data);
|
---|
78 |
|
---|
79 | #endif
|
---|