filename | src/loader.h |
changeset | 26:ad258e3daaa5 |
next | 427:00270806b4cf |
author | nkeynes |
date | Thu Jun 15 10:25:45 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Add P4 I/O tracing Add ability to set I/O trace by region address |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/loader.h Thu Jun 15 10:25:45 2006 +00001.3 @@ -0,0 +1,72 @@1.4 +/**1.5 + * $Id: loader.h,v 1.1 2005-12-24 08:02:14 nkeynes Exp $1.6 + *1.7 + * Interface declarations for the binary loader routines (loader.c, elf.c)1.8 + *1.9 + * Copyright (c) 2005 Nathan Keynes.1.10 + *1.11 + * This program is free software; you can redistribute it and/or modify1.12 + * it under the terms of the GNU General Public License as published by1.13 + * the Free Software Foundation; either version 2 of the License, or1.14 + * (at your option) any later version.1.15 + *1.16 + * This program is distributed in the hope that it will be useful,1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.19 + * GNU General Public License for more details.1.20 + */1.21 +1.22 +#ifndef dreamcast_loader_H1.23 +#define dreamcast_loader_H 11.24 +1.25 +#include <stdio.h>1.26 +#include <glib/gtypes.h>1.27 +1.28 +#ifdef __cplusplus1.29 +extern "C" {1.30 +#endif1.31 +1.32 +/**1.33 + * NULL-terminated list of file extension/name pairs,1.34 + * supported by the loader1.35 + */1.36 +extern char *file_loader_extensions[][2];1.37 +1.38 +/**1.39 + * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at1.40 + * start of file. IP.BIN is loaded as-is at 8C008000.1.41 + * This is mainly for testing as it's unlikely anyone would want to do this1.42 + * for any other reason.1.43 + * @return TRUE on success, otherwise FALSE and errno1.44 + */1.45 +gboolean file_load_bootstrap( gchar *filename );1.46 +1.47 +/**1.48 + * Load a miscellaneous .bin file, as commonly used in demos. No magic1.49 + * applies, file is loaded as is at 8C0100001.50 + */1.51 +gboolean file_load_binary( gchar *filename );1.52 +1.53 +/**1.54 + * Load a "Self Boot Inducer" .sbi file, also commonly used to package1.55 + * demos. (Actually a ZIP file with a predefined structure1.56 + */1.57 +gboolean file_load_sbi( gchar *filename );1.58 +1.59 +/**1.60 + * Load an ELF executable binary file. Origin is file-dependent.1.61 + */1.62 +gboolean file_load_elf( gchar *filename );1.63 +1.64 +/**1.65 + * Load any of the above file types, using the appropriate magic to determine1.66 + * which is actually applicable1.67 + */1.68 +gboolean file_load_magic( gchar *filename );1.69 +1.70 +#ifdef __cplusplus1.71 +}1.72 +#endif1.73 +1.74 +#endif /* !dream_loader_H */1.75 +
.