Search
lxdream.org :: lxdream/src/loader.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/loader.c
changeset 180:e6dcf9b65658
prev171:3542185a8cf9
next294:a5beff9b2b85
author nkeynes
date Mon Jan 15 08:30:50 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Commit testyuv WIP
file annotate diff log raw
1.1 --- a/src/loader.c Tue Jun 27 09:34:27 2006 +0000
1.2 +++ b/src/loader.c Mon Jan 15 08:30:50 2007 +0000
1.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 the
1.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 everything
1.12 * correctly
1.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.28
1.29 - file_load_postload( head.e_entry );
1.30 + return file_load_postload( head.e_entry );
1.31 }
.