filename | src/loader.h |
changeset | 26:ad258e3daaa5 |
next | 427:00270806b4cf |
author | nkeynes |
date | Mon Jan 02 14:49:29 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Change LDM in accordance with the second part of 5.4.6 Fix arm_raise_exception to actually work |
view | annotate | diff | log | raw |
1 /**
2 * $Id: loader.h,v 1.1 2005-12-24 08:02:14 nkeynes Exp $
3 *
4 * Interface declarations for the binary loader routines (loader.c, elf.c)
5 *
6 * Copyright (c) 2005 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 #ifndef dreamcast_loader_H
20 #define dreamcast_loader_H 1
22 #include <stdio.h>
23 #include <glib/gtypes.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
29 /**
30 * NULL-terminated list of file extension/name pairs,
31 * supported by the loader
32 */
33 extern char *file_loader_extensions[][2];
35 /**
36 * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at
37 * start of file. IP.BIN is loaded as-is at 8C008000.
38 * This is mainly for testing as it's unlikely anyone would want to do this
39 * for any other reason.
40 * @return TRUE on success, otherwise FALSE and errno
41 */
42 gboolean file_load_bootstrap( gchar *filename );
44 /**
45 * Load a miscellaneous .bin file, as commonly used in demos. No magic
46 * applies, file is loaded as is at 8C010000
47 */
48 gboolean file_load_binary( gchar *filename );
50 /**
51 * Load a "Self Boot Inducer" .sbi file, also commonly used to package
52 * demos. (Actually a ZIP file with a predefined structure
53 */
54 gboolean file_load_sbi( gchar *filename );
56 /**
57 * Load an ELF executable binary file. Origin is file-dependent.
58 */
59 gboolean file_load_elf( gchar *filename );
61 /**
62 * Load any of the above file types, using the appropriate magic to determine
63 * which is actually applicable
64 */
65 gboolean file_load_magic( gchar *filename );
67 #ifdef __cplusplus
68 }
69 #endif
71 #endif /* !dream_loader_H */
.