filename | src/loader.h |
changeset | 736:a02d1475ccfd |
prev | 561:533f6b478071 |
next | 1108:305ef2082079 |
author | nkeynes |
date | Sat Dec 27 02:59:35 2008 +0000 (15 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | Replace fpscr_mask/fpscr flags in xlat_cache_block with a single xlat_sh4_mode, which tracks the field of the same name in sh4r - actually a little faster this way. Now depends on SR.MD, FPSCR.PR and FPSCR.SZ (although it doesn't benefit from the SR flag yet). Also fixed the failure to check the flags in the common case (code address returned by previous block) which took away the performance benefits, but oh well. |
file | annotate | diff | log | raw |
nkeynes@26 | 1 | /** |
nkeynes@561 | 2 | * $Id$ |
nkeynes@26 | 3 | * |
nkeynes@26 | 4 | * Interface declarations for the binary loader routines (loader.c, elf.c) |
nkeynes@26 | 5 | * |
nkeynes@26 | 6 | * Copyright (c) 2005 Nathan Keynes. |
nkeynes@26 | 7 | * |
nkeynes@26 | 8 | * This program is free software; you can redistribute it and/or modify |
nkeynes@26 | 9 | * it under the terms of the GNU General Public License as published by |
nkeynes@26 | 10 | * the Free Software Foundation; either version 2 of the License, or |
nkeynes@26 | 11 | * (at your option) any later version. |
nkeynes@26 | 12 | * |
nkeynes@26 | 13 | * This program is distributed in the hope that it will be useful, |
nkeynes@26 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
nkeynes@26 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nkeynes@26 | 16 | * GNU General Public License for more details. |
nkeynes@26 | 17 | */ |
nkeynes@26 | 18 | |
nkeynes@736 | 19 | #ifndef lxdream_loader_H |
nkeynes@736 | 20 | #define lxdream_loader_H 1 |
nkeynes@26 | 21 | |
nkeynes@26 | 22 | #include <stdio.h> |
nkeynes@26 | 23 | #include <glib/gtypes.h> |
nkeynes@26 | 24 | |
nkeynes@26 | 25 | #ifdef __cplusplus |
nkeynes@26 | 26 | extern "C" { |
nkeynes@26 | 27 | #endif |
nkeynes@26 | 28 | |
nkeynes@26 | 29 | /** |
nkeynes@26 | 30 | * NULL-terminated list of file extension/name pairs, |
nkeynes@26 | 31 | * supported by the loader |
nkeynes@26 | 32 | */ |
nkeynes@26 | 33 | extern char *file_loader_extensions[][2]; |
nkeynes@26 | 34 | |
nkeynes@26 | 35 | /** |
nkeynes@26 | 36 | * Load the CD bootstrap, aka IP.BIN. Identified by "SEGA SEGAKATANA" at |
nkeynes@26 | 37 | * start of file. IP.BIN is loaded as-is at 8C008000. |
nkeynes@26 | 38 | * This is mainly for testing as it's unlikely anyone would want to do this |
nkeynes@26 | 39 | * for any other reason. |
nkeynes@26 | 40 | * @return TRUE on success, otherwise FALSE and errno |
nkeynes@26 | 41 | */ |
nkeynes@427 | 42 | gboolean file_load_bootstrap( const gchar *filename ); |
nkeynes@26 | 43 | |
nkeynes@26 | 44 | /** |
nkeynes@26 | 45 | * Load a miscellaneous .bin file, as commonly used in demos. No magic |
nkeynes@26 | 46 | * applies, file is loaded as is at 8C010000 |
nkeynes@26 | 47 | */ |
nkeynes@427 | 48 | gboolean file_load_binary( const gchar *filename ); |
nkeynes@26 | 49 | |
nkeynes@26 | 50 | /** |
nkeynes@26 | 51 | * Load a "Self Boot Inducer" .sbi file, also commonly used to package |
nkeynes@26 | 52 | * demos. (Actually a ZIP file with a predefined structure |
nkeynes@26 | 53 | */ |
nkeynes@427 | 54 | gboolean file_load_sbi( const gchar *filename ); |
nkeynes@26 | 55 | |
nkeynes@26 | 56 | /** |
nkeynes@26 | 57 | * Load an ELF executable binary file. Origin is file-dependent. |
nkeynes@26 | 58 | */ |
nkeynes@427 | 59 | gboolean file_load_elf( const gchar *filename ); |
nkeynes@26 | 60 | |
nkeynes@26 | 61 | /** |
nkeynes@26 | 62 | * Load any of the above file types, using the appropriate magic to determine |
nkeynes@26 | 63 | * which is actually applicable |
nkeynes@26 | 64 | */ |
nkeynes@427 | 65 | gboolean file_load_magic( const gchar *filename ); |
nkeynes@26 | 66 | |
nkeynes@26 | 67 | #ifdef __cplusplus |
nkeynes@26 | 68 | } |
nkeynes@26 | 69 | #endif |
nkeynes@26 | 70 | |
nkeynes@736 | 71 | #endif /* !lxdream_loader_H */ |
nkeynes@26 | 72 |
.