filename | src/loader.c |
changeset | 180:e6dcf9b65658 |
prev | 171:3542185a8cf9 |
next | 294:a5beff9b2b85 |
author | nkeynes |
date | Thu Dec 21 10:15:54 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Fix 0x40,0x01 in accordance with test results Add reset flag to fail first packet command (also as per tests) |
file | annotate | diff | log | raw |
1.1 --- a/src/loader.c Tue Jun 27 09:34:27 2006 +00001.2 +++ b/src/loader.c Thu Dec 21 10:15:54 2006 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: loader.c,v 1.13 2006-06-27 09:34:27 nkeynes Exp $1.6 + * $Id: loader.c,v 1.14 2006-07-02 04:59:00 nkeynes Exp $1.7 *1.8 * File loading routines, mostly for loading demos without going through the1.9 * whole procedure of making a CD image for them.1.10 @@ -114,8 +114,12 @@1.11 /* Load in a bootstrap before the binary, to initialize everything1.12 * correctly1.13 */1.14 - mem_load_block( bootstrap_file, BOOTSTRAP_LOAD_ADDR, BOOTSTRAP_SIZE );1.15 - sh4_set_pc( BOOTSTRAP_LOAD_ADDR + 0x300 );1.16 + if( mem_load_block( bootstrap_file, BOOTSTRAP_LOAD_ADDR, BOOTSTRAP_SIZE ) != 0 ) {1.17 + /* Try it without the bootstrap */1.18 + sh4_set_pc( pc );1.19 + } else {1.20 + sh4_set_pc( BOOTSTRAP_LOAD_ADDR + 0x300 );1.21 + }1.22 } else {1.23 sh4_set_pc( pc );1.24 }1.25 @@ -165,5 +169,5 @@1.26 }1.27 }1.29 - file_load_postload( head.e_entry );1.30 + return file_load_postload( head.e_entry );1.31 }
.