1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/loader.h Tue Jan 16 10:34:46 2007 +0000
1.5 + * $Id: loader.h,v 1.1 2005-12-24 08:02:14 nkeynes Exp $
1.7 + * Interface declarations for the binary loader routines (loader.c, elf.c)
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
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 of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.22 +#ifndef dreamcast_loader_H
1.23 +#define dreamcast_loader_H 1
1.26 +#include <glib/gtypes.h>
1.33 + * NULL-terminated list of file extension/name pairs,
1.34 + * supported by the loader
1.36 +extern char *file_loader_extensions[][2];
1.39 + * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at
1.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 this
1.42 + * for any other reason.
1.43 + * @return TRUE on success, otherwise FALSE and errno
1.45 +gboolean file_load_bootstrap( gchar *filename );
1.48 + * Load a miscellaneous .bin file, as commonly used in demos. No magic
1.49 + * applies, file is loaded as is at 8C010000
1.51 +gboolean file_load_binary( gchar *filename );
1.54 + * Load a "Self Boot Inducer" .sbi file, also commonly used to package
1.55 + * demos. (Actually a ZIP file with a predefined structure
1.57 +gboolean file_load_sbi( gchar *filename );
1.60 + * Load an ELF executable binary file. Origin is file-dependent.
1.62 +gboolean file_load_elf( gchar *filename );
1.65 + * Load any of the above file types, using the appropriate magic to determine
1.66 + * which is actually applicable
1.68 +gboolean file_load_magic( gchar *filename );
1.74 +#endif /* !dream_loader_H */