28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: misc.h,v 1.249 2006/12/30 13:31:01 debug Exp $ |
* $Id: misc.h,v 1.259 2007/06/23 21:04:17 debug Exp $ |
32 |
* |
* |
33 |
* Misc. definitions for gxemul. |
* Misc. definitions for gxemul. |
34 |
*/ |
*/ |
105 |
#endif |
#endif |
106 |
|
|
107 |
|
|
108 |
|
/* tmp dir to use if the TMPDIR environment variable isn't set: */ |
109 |
|
#define DEFAULT_TMP_DIR "/tmp" |
110 |
|
|
111 |
|
|
112 |
struct cpu; |
struct cpu; |
113 |
struct emul; |
struct emul; |
114 |
struct machine; |
struct machine; |
166 |
#define DEBUG_INDENTATION 4 |
#define DEBUG_INDENTATION 4 |
167 |
|
|
168 |
|
|
169 |
|
#ifdef HAVE___FUNCTION__ |
170 |
|
|
171 |
|
#define FAILURE(error_msg) { \ |
172 |
|
char where_msg[400]; \ |
173 |
|
snprintf(where_msg, sizeof(where_msg), \ |
174 |
|
"%s, line %i, function %s().\n", \ |
175 |
|
__FILE__, __LINE__, __FUNCTION__); \ |
176 |
|
fprintf(stderr, "\n%s, in %s\n", error_msg, where_msg); \ |
177 |
|
exit(1); \ |
178 |
|
} |
179 |
|
|
180 |
|
#else |
181 |
|
|
182 |
|
#define FAILURE(error_msg) { \ |
183 |
|
char where_msg[400]; \ |
184 |
|
snprintf(where_msg, sizeof(where_msg), \ |
185 |
|
"%s, line %i\n", __FILE__, __LINE__); \ |
186 |
|
fprintf(stderr, "\n%s, in %s.\n", error_msg, where_msg);\ |
187 |
|
exit(1); \ |
188 |
|
} |
189 |
|
|
190 |
|
#endif /* !HAVE___FUNCTION__ */ |
191 |
|
|
192 |
|
|
193 |
|
#define CHECK_ALLOCATION(ptr) { \ |
194 |
|
if ((ptr) == NULL) \ |
195 |
|
FAILURE("Out of memory"); \ |
196 |
|
} |
197 |
|
|
198 |
|
|
199 |
|
/* bootblock.c: */ |
200 |
|
int load_bootblock(struct machine *m, struct cpu *cpu, |
201 |
|
int *n_loadp, char ***load_namesp); |
202 |
|
|
203 |
|
|
204 |
|
/* bootblock_apple.c: */ |
205 |
|
int apple_load_bootblock(struct machine *m, struct cpu *cpu, |
206 |
|
int disk_id, int disk_type, int *n_loadp, char ***load_namesp); |
207 |
|
|
208 |
|
|
209 |
|
/* bootblock_iso9660.c: */ |
210 |
|
int iso_load_bootblock(struct machine *m, struct cpu *cpu, |
211 |
|
int disk_id, int disk_type, int iso_type, unsigned char *buf, |
212 |
|
int *n_loadp, char ***load_namesp); |
213 |
|
|
214 |
|
|
215 |
/* dec_prom.c: */ |
/* dec_prom.c: */ |
216 |
int decstation_prom_emul(struct cpu *cpu); |
int decstation_prom_emul(struct cpu *cpu); |
217 |
|
|
245 |
size_t mystrlcpy(char *dst, const char *src, size_t size); |
size_t mystrlcpy(char *dst, const char *src, size_t size); |
246 |
size_t mystrlcat(char *dst, const char *src, size_t size); |
size_t mystrlcat(char *dst, const char *src, size_t size); |
247 |
#endif |
#endif |
248 |
|
void print_separator_line(void); |
249 |
|
|
250 |
|
|
251 |
/* pc_bios.c: */ |
/* mvmeprom.c: */ |
252 |
void pc_bios_simple_pmode_setup(struct cpu *cpu); |
void mvmeprom_init(struct machine *machine); |
253 |
void pc_bios_init(struct cpu *cpu); |
int mvmeprom_emul(struct cpu *cpu); |
|
int pc_bios_emul(struct cpu *cpu); |
|
254 |
|
|
255 |
|
|
256 |
/* ps2_bios.c: */ |
/* ps2_bios.c: */ |
257 |
int playstation2_sifbios_emul(struct cpu *cpu); |
int playstation2_sifbios_emul(struct cpu *cpu); |
258 |
|
|
259 |
|
|
260 |
/* useremul.c: */ |
/* sh_ipl_g.c: */ |
261 |
void useremul_setup(struct cpu *, int, char **); |
void sh_ipl_g_emul_init(struct machine *machine); |
262 |
void useremul_syscall(struct cpu *cpu, uint32_t code); |
int sh_ipl_g_emul(struct cpu *); |
|
void useremul_name_to_useremul(struct cpu *, char *name, |
|
|
int *arch, char **machine_name, char **cpu_name); |
|
|
void useremul_list_emuls(void); |
|
|
void useremul_init(void); |
|
263 |
|
|
264 |
|
|
265 |
/* yamon.c: */ |
/* yamon.c: */ |