1.1 --- a/src/loader.h Fri Jun 04 09:13:40 2010 +1000
1.2 +++ b/src/loader.h Fri Jan 21 06:40:05 2011 +1000
1.5 extern char *file_loader_extensions[][2];
1.8 - * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at
1.9 - * start of file. IP.BIN is loaded as-is at 8C008000.
1.10 - * This is mainly for testing as it's unlikely anyone would want to do this
1.11 - * for any other reason.
1.12 - * @return TRUE on success, otherwise FALSE and errno
1.14 -gboolean file_load_bootstrap( const gchar *filename );
1.24 +} lxdream_file_type_t;
1.27 - * Load a miscellaneous .bin file, as commonly used in demos. No magic
1.28 - * applies, file is loaded as is at 8C010000
1.29 + * Attempt to identify the given file as one of the above file types
1.31 -gboolean file_load_binary( const gchar *filename );
1.32 +lxdream_file_type_t file_identify( const gchar *filename, int fd, ERROR *err );
1.35 - * Load a "Self Boot Inducer" .sbi file, also commonly used to package
1.36 - * demos. (Actually a ZIP file with a predefined structure
1.37 + * Load any supported file, and return the type of file loaded.
1.38 + * If the file is a disc, the disc is mounted.
1.40 + * @param filename The file to load
1.41 + * @param wrap_exec If true, load executables as disc images. Otherwise load
1.42 + * directly into RAM
1.43 + * @param err Updated with error message on failure.
1.45 -gboolean file_load_sbi( const gchar *filename );
1.46 +lxdream_file_type_t file_load_magic( const gchar *filename, gboolean wrap_exec, ERROR *err );
1.49 - * Load an ELF executable binary file. Origin is file-dependent.
1.50 + * Load an ELF or .bin executable file based on magic.
1.52 -gboolean file_load_elf( const gchar *filename );
1.55 - * Load any of the above file types, using the appropriate magic to determine
1.56 - * which is actually applicable
1.58 -gboolean file_load_magic( const gchar *filename );
1.59 +gboolean file_load_exec( const gchar *filename, ERROR *err );
1.61 cdrom_disc_t cdrom_wrap_magic( cdrom_disc_type_t type, const gchar *filename, ERROR *err );