1.1 --- a/src/loader.c Tue Mar 14 11:44:29 2006 +0000
1.2 +++ b/src/loader.c Wed Mar 15 13:17:40 2006 +0000
1.5 - * $Id: loader.c,v 1.11 2006-03-14 11:44:29 nkeynes Exp $
1.6 + * $Id: loader.c,v 1.12 2006-03-15 13:17:40 nkeynes Exp $
1.8 * File loading routines, mostly for loading demos without going through the
1.9 * whole procedure of making a CD image for them.
1.14 -int file_load_binary( const gchar *filename ) {
1.15 - /* Load the binary itself */
1.16 - mem_load_block( filename, BINARY_LOAD_ADDR, -1 );
1.17 +int file_load_postload( int pc )
1.19 if( bootstrap_file != NULL ) {
1.20 /* Load in a bootstrap before the binary, to initialize everything
1.22 @@ -117,10 +116,19 @@
1.23 mem_load_block( bootstrap_file, BOOTSTRAP_LOAD_ADDR, BOOTSTRAP_SIZE );
1.24 sh4_set_pc( BOOTSTRAP_LOAD_ADDR + 0x300 );
1.26 - sh4_set_pc( BINARY_LOAD_ADDR );
1.35 +int file_load_binary( const gchar *filename )
1.37 + /* Load the binary itself */
1.38 + mem_load_block( filename, BINARY_LOAD_ADDR, -1 );
1.39 + file_load_postload( BINARY_LOAD_ADDR );
1.42 int file_load_elf_fd( int fd )
1.44 INFO( "Loaded %d bytes to %08X", phdr.p_filesz, phdr.p_vaddr );
1.48 - sh4_set_pc( head.e_entry );
1.53 + file_load_postload( head.e_entry );