filename | src/loader.h |
changeset | 1109:700c5ab26a63 |
prev | 1108:305ef2082079 |
next | 1296:30ecee61f811 |
author | nkeynes |
date | Fri Sep 10 08:48:34 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Run the eventq at the end of the time-slice rather than the beginning, so that it runs for the correct period of time when the time-slice finishes early |
file | annotate | diff | log | raw |
1.1 --- a/src/loader.h Fri Jun 04 09:13:40 2010 +10001.2 +++ b/src/loader.h Fri Sep 10 08:48:34 2010 +10001.3 @@ -34,37 +34,37 @@1.4 */1.5 extern char *file_loader_extensions[][2];1.7 -/**1.8 - * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at1.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 this1.11 - * for any other reason.1.12 - * @return TRUE on success, otherwise FALSE and errno1.13 - */1.14 -gboolean file_load_bootstrap( const gchar *filename );1.15 +typedef enum {1.16 + FILE_ERROR,1.17 + FILE_BINARY,1.18 + FILE_ELF,1.19 + FILE_ISO,1.20 + FILE_DISC,1.21 + FILE_ZIP,1.22 + FILE_SAVE_STATE,1.23 + FILE_UNKNOWN,1.24 +} lxdream_file_type_t;1.26 /**1.27 - * Load a miscellaneous .bin file, as commonly used in demos. No magic1.28 - * applies, file is loaded as is at 8C0100001.29 + * Attempt to identify the given file as one of the above file types1.30 */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.34 /**1.35 - * Load a "Self Boot Inducer" .sbi file, also commonly used to package1.36 - * demos. (Actually a ZIP file with a predefined structure1.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.39 + *1.40 + * @param filename The file to load1.41 + * @param wrap_exec If true, load executables as disc images. Otherwise load1.42 + * directly into RAM1.43 + * @param err Updated with error message on failure.1.44 */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.48 /**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.51 */1.52 -gboolean file_load_elf( const gchar *filename );1.53 -1.54 -/**1.55 - * Load any of the above file types, using the appropriate magic to determine1.56 - * which is actually applicable1.57 - */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 );
.