1 #ifndef INCLUDE_sQt5fY5eUJn5tKV0IBTDxK0zqQutTqTp
2 #define INCLUDE_sQt5fY5eUJn5tKV0IBTDxK0zqQutTqTp 1
7 #define err(f, ...) g_fprintf(2, PFX f, ##__VA_ARGS__)
8 #define log(f, ...) g_fprintf(1, PFX f, ##__VA_ARGS__)
17 void do_entry(unsigned long entry, void *stack_frame, int stack_frame_cnt, void *exitf);
22 void (*open_cb)(int fd);
24 extern struct dev_fd_t emu_interesting_fds[];
29 // note: __FD_SETSIZE is 1024, fd_set stuff will crash if made larger
35 FAKEDEV_MMUHACK, // 1005
43 void do_patches(void *ptr, unsigned int size);
47 void emu_init(void *map_bottom);
48 void emu_call_handle_op(struct op_context *op_ctx);
49 long emu_do_mmap(unsigned int length, int prot, int flags, int fd, unsigned int offset);
50 long emu_do_munmap(void *addr, unsigned int length);
51 long emu_do_ioctl(int fd, int request, void *argp);
52 long emu_do_read(int fd, void *buf, int count);
53 void *emu_do_fopen(const char *path, const char *mode);
54 int emu_do_system(const char *command);
55 long emu_do_execve(const char *filename, char *const argv[], char *const envp[]);
56 const char *emu_wrap_path(const char *path);
57 void emu_wrap_path_free(const char *w_path, const char *old_path);
60 int host_read_btns(void);
61 int host_read_ts(int *pressed, int *x1024, int *y1024);
62 void host_forced_exit(int status);
64 enum { GP2X_UP = 0, GP2X_LEFT = 2, GP2X_DOWN = 4, GP2X_RIGHT = 6,
65 GP2X_START = 8, GP2X_SELECT = 9, GP2X_L = 10, GP2X_R = 11,
66 GP2X_A = 12, GP2X_B = 13, GP2X_X = 14, GP2X_Y = 15,
67 GP2X_VOL_UP = 16, GP2X_VOL_DOWN = 17, GP2X_PUSH = 18 };
69 extern char *bin_path;
72 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
74 #endif /* INCLUDE_sQt5fY5eUJn5tKV0IBTDxK0zqQutTqTp */