fixed the alternate device mode.
[open-ps2-loader.git] / include / iosupport.h
blob87ede2a03d4cc6b597ad221114e6df035b366870
1 #ifndef __IOSUPPORT_H
2 #define __IOSUPPORT_H
4 #include "include/config.h"
6 #define USB_MODE 0
7 #define ETH_MODE 1
8 #define HDD_MODE 2
9 #define APP_MODE 3
11 #define NO_EXCEPTION 0x00
12 #define UNMOUNT_EXCEPTION 0x01
14 #define COMPAT_MODE_1 0x01
15 #define COMPAT_MODE_2 0x02
16 #define COMPAT_MODE_3 0x04
17 #define COMPAT_MODE_4 0x08
18 #define COMPAT_MODE_5 0x10
19 #define COMPAT_MODE_6 0x20
20 #define COMPAT_MODE_7 0x40
21 #define COMPAT_MODE_8 0x80
23 // minimal inactive frames for cover display, can be pretty low since it means no button is pressed :)
24 #define MENU_MIN_INACTIVE_FRAMES 8
26 typedef struct
28 int mode;
30 int enabled;
32 /// update in progress indicator
33 int uip;
35 /// max inactive frame delay
36 int delay;
38 /// item description
39 char* text;
41 /// item description in localised form (used if value is not negative)
42 int textId;
44 void (*itemInit)(void);
46 /** @return 1 if update is needed, 0 otherwise */
47 int (*itemNeedsUpdate)(void);
49 /** @return game count (0 on error) */
50 int (*itemUpdate)(void);
52 int (*itemGetCount)(void);
54 void* (*itemGet)(int id);
56 char* (*itemGetName)(int id);
58 int (*itemGetNameLength)(int id);
60 char* (*itemGetStartup)(int id);
62 void (*itemDelete)(int id);
64 void (*itemRename)(int id, char* newName);
66 int (*itemGetCompatibility)(int id, int *dmaMode);
68 void (*itemSetCompatibility)(int id, int compatMode, int dmaMode);
70 void (*itemLaunch)(int id);
72 config_set_t* (*itemGetConfig)(int id);
74 int (*itemGetImage)(char* folder, int isRelative, char* value, char* suffix, GSTEXTURE* resultTex, short psm);
76 void (*itemCleanUp)(int exception);
78 #ifdef VMC
79 int (*itemCheckVMC)(char* name, int createSize);
80 #endif
82 int iconId;
83 } item_list_t;
85 #endif