<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">asic.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+7</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">asic.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+2</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr><td><tt><a href="#file3">bios.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+53</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-23</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file4">bootstrap.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+1</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr><td><tt><a href="#file5">dreamcast.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+30</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-7</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file6">dreamcast.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+3</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr><td><tt><a href="#file7">loader.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+1</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file8">main.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+7</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr><td><tt><a href="#file9">syscall.h</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+2</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">566cdeb157ec -> 50e702af9373</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+106</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-35</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >9 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Hook up the fake bios boot
Use fakebios if invoked with -b, or if there's no boot rom loaded
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>asic.c</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/asic.c
+++ lxdream/src/asic.c
@@ -416,6 +416,13 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     MMIO_WRITE( ASIC, SORTDMACTL, 0 );
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gboolean asic_enable_ide_interface( gboolean enable )
+{
+    gboolean oldval = idereg.interface_enabled;
+    idereg.interface_enabled = enable;
+    return oldval;
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > MMIO_REGION_READ_FN( ASIC, reg )
 {
     int32_t val;
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>asic.h</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/asic.h
+++ lxdream/src/asic.h
@@ -218,3 +218,5 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void asic_clear_event( int event );
 
 void asic_g2_write_word( );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+
+gboolean asic_enable_ide_interface( gboolean enable );
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>bios.c</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/bios.c
+++ lxdream/src/bios.c
@@ -3,7 +3,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * 
  * "Fake" BIOS functions, for operation without the actual BIOS.
  *
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- * Copyright (c) 2005 Nathan Keynes.
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ * Copyright (c) 2005<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >-2010</span> Nathan Keynes.
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -19,6 +19,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "dream.h"
 #include "mem.h"
 #include "syscall.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "asic.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "dreamcast.h"
 #include "bootstrap.h"
 #include "sh4/sh4.h"
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -26,51 +27,73 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "drivers/cdrom/isoread.h"
 #include "gdrom/gdrom.h"
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/* Definitions from KOS */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define COMMAND_QUEUE_LENGTH 16
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/* TODO: Check if these are the real ATAPI command codes or not */
-#define GD_CMD_PIOREAD     16
-#define GD_CMD_DMAREAD     17
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define GD_CMD_PIOREAD     16  /* readcd */
+#define GD_CMD_DMAREAD     17  /* readcd */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define GD_CMD_GETTOC      18
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define GD_CMD_GETTOC2     19
-#define GD_CMD_PLAY        20
-#define GD_CMD_PLAY2       21
-#define GD_CMD_PAUSE       22
-#define GD_CMD_RELEASE     23
-#define GD_CMD_INIT        24
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define GD_CMD_GETTOC2     19  /* toc2 */
+#define GD_CMD_PLAY        20  /* playcd */
+#define GD_CMD_PLAY2       21  /* playcd */
+#define GD_CMD_PAUSE       22  /* No params */
+#define GD_CMD_RELEASE     23  /* No params */
+#define GD_CMD_INIT        24  /* No params */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define GD_CMD_SEEK        27
 #define GD_CMD_READ        28
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define GD_CMD_STOP        33
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define GD_CMD_STOP        33  /* No params */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define GD_CMD_GETSCD      34
 #define GD_CMD_GETSES      35
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define GD_CMD_STATUS_NONE 0
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define GD_CMD_STATUS_NONE <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >  </span>0
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define GD_CMD_STATUS_ACTIVE 1
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define GD_CMD_STATUS_DONE 2
-#define GD_CMD_STATUS_ABORT 3
-#define GD_CMD_STATUS_ERROR 4
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define GD_CMD_STATUS_DONE   2
+#define GD_CMD_STATUS_ABORT  3
+#define GD_CMD_STATUS_ERROR  4
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define GD_ERROR_OK          0
 #define GD_ERROR_NO_DISC     2
 #define GD_ERROR_DISC_CHANGE 6
 #define GD_ERROR_SYSTEM      1
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+typedef union gdrom_cmd_params {
+    struct gdrom_toc2_params {
+        uint32_t session;
+        sh4addr_t buffer;
+    } toc2;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-typedef struct gdrom_command {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    struct gdrom_readcd_params {
+        cdrom_lba_t sector;
+        cdrom_count_t count;
+        sh4addr_t buffer;
+        uint32_t unknown;
+    } readcd;
+
+    struct gdrom_playcd_params {
+        cdrom_lba_t start;
+        cdrom_lba_t end;
+        uint32_t repeat;
+    } playcd;
+} *gdrom_cmd_params_t;
+
+
+
+
+typedef struct gdrom_queue_entry {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     int status;
     uint32_t cmd_code;
     sh4ptr_t data;
     uint32_t result[4];
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-} *gdrom_command_t;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+} *gdrom_queue_entry_t;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static struct gdrom_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >command</span> gdrom_cmd_queue[COMMAND_QUEUE_LENGTH];
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static struct gdrom_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >queue_entry</span> gdrom_cmd_queue[COMMAND_QUEUE_LENGTH];
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 static struct bios_gdrom_status {
     uint32_t status;
     uint32_t disk_type;
 } bios_gdrom_status;
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void bios_gdrom_run_command( gdrom_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >command</span>_t cmd )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void bios_gdrom_run_command( gdrom_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >queue_entry</span>_t cmd )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     DEBUG( "BIOS GD command %d", cmd->cmd_code );
     switch( cmd->cmd_code ) {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -114,7 +137,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-gdrom_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >command</span>_t bios_gdrom_get_command( uint32_t id )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gdrom_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >queue_entry</span>_t bios_gdrom_get_command( uint32_t id )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     if( id >= COMMAND_QUEUE_LENGTH ||
             gdrom_cmd_queue[id].status == GD_CMD_STATUS_NONE )
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -128,7 +151,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 void bios_syscall( uint32_t syscallid )
 {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    gdrom_command_t cmd;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    gdrom_queue_entry_t cmd;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
     switch( syscallid ) {
     case 0xB0: /* sysinfo */
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -211,7 +234,11 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     /* Initialize hardware */
     /* Boot disc if present */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    bios_boot_gdrom_disc();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( bios_boot_gdrom_disc() ) {
+        sh4r.pr = sh4r.pc; /* Set the syscall return address to the bootstrap entry */
+    } else {
+        dreamcast_stop();
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 void bios_install( void ) 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -302,6 +329,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             isofs_reader_destroy(iso);
             return FALSE;
         }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        asic_enable_ide_interface(TRUE);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     } else {
         /* Load the binary into a temp buffer */
         unsigned char tmp[program_sectors*2048];
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -312,7 +340,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             return FALSE;
         }
         bootprogram_unscramble(program, tmp, ent->size);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        asic_enable_ide_interface(FALSE);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
     isofs_reader_destroy(iso);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    dreamcast_program_loaded( "", BOOTSTRAP_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >LOAD</span>_ADDR );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    dreamcast_program_loaded( "", BOOTSTRAP_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ENTRY</span>_ADDR );
+    return TRUE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
</pre></div>
<hr /><a name="file4" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>bootstrap.h</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/bootstrap.h
+++ lxdream/src/bootstrap.h
@@ -29,6 +29,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #endif
 
 #define BOOTSTRAP_LOAD_ADDR 0x8C008000
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define BOOTSTRAP_ENTRY_ADDR 0x8c008300
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define BOOTSTRAP_SIZE 32768
 #define BOOTSTRAP_MAGIC "SEGA SEGAKATANA SEGA ENTERPRISES"
 #define BOOTSTRAP_MAGIC_SIZE 32
</pre></div>
<hr /><a name="file5" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>dreamcast.c</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/dreamcast.c
+++ lxdream/src/dreamcast.c
@@ -43,6 +43,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >                STATE_STOPPING, STATE_STOPPED } dreamcast_state_t;
     
 static volatile dreamcast_state_t dreamcast_state = STATE_UNINIT;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static gboolean dreamcast_use_bios = TRUE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > static gboolean dreamcast_has_bios = FALSE;
 static gboolean dreamcast_has_flash = FALSE;
 static gboolean dreamcast_exit_on_stop = FALSE;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -86,7 +87,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * Note currently the locations of the various MMIO pages are hard coded in
  * the MMIO definitions - they should probably be moved here.
  */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void dreamcast_configure( )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void dreamcast_configure( gboolean use_bootrom )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     char *bios_path = lxdream_get_global_config_path_value(CONFIG_BIOS_PATH);
     char *flash_path = lxdream_get_global_config_path_value(CONFIG_FLASH_PATH);
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -108,7 +109,12 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     mem_map_region( NULL,            0x11000000, 16 MB,  MEM_REGION_PVR2VDMA1,    &mem_region_pvr2vdma1, 0, 16 MB, 0 );
     mem_map_region( NULL,            0x13000000, 16 MB,  MEM_REGION_PVR2VDMA2,    &mem_region_pvr2vdma2, 0, 16 MB, 0 );
     
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    dreamcast_has_bios = mem_load_rom( dc_boot_rom, bios_path, 2 MB, 0x89f2b1a1 );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    dreamcast_use_bios = use_bootrom;
+    dreamcast_has_bios = dreamcast_load_bios( bios_path );
+    if( !dreamcast_has_bios ) {
+        dreamcast_load_fakebios();
+    }
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     if( flash_path != NULL && flash_path[0] != '\0' ) {
         mem_load_block( flash_path, 0x00200000, 0x00020000 );
     }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -128,10 +134,28 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 gboolean dreamcast_load_bios( const gchar *filename )
 {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    dreamcast_has_bios = mem_load_rom( dc_boot_rom, filename, 2 MB, 0x89f2b1a1 );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( dreamcast_use_bios ) {
+        dreamcast_has_bios = mem_load_rom( dc_boot_rom, filename, 2 MB, 0x89f2b1a1 );
+    } else {
+        dreamcast_has_bios = FALSE;
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     return dreamcast_has_bios;
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static const char fakebios[] = {
+        0x00, 0xd1, /* movl $+4, r1 */
+        0x2b, 0x41, /* jmp @r1 */
+        0xa0, 0xff, /* .long 0xffffffa0 */
+        0xff, 0xff };
+gboolean dreamcast_load_fakebios( )
+{
+    memset( dc_boot_rom, 0, 2 MB );
+    memcpy( dc_boot_rom, fakebios, sizeof(fakebios) );
+    syscall_add_hook( 0xA0, bios_boot );
+    dreamcast_has_bios = TRUE;
+    return TRUE;
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > gboolean dreamcast_load_flash( const gchar *filename )
 {
     if( filename != NULL && filename[0] != '\0' ) {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -201,9 +225,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     dreamcast_exit_on_stop = flag;
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void dreamcast_init( void )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void dreamcast_init( gboolean use_bootrom )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    dreamcast_configure();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    dreamcast_configure(<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" > use_bootrom </span>);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     dreamcast_state = STATE_STOPPED;
 }
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -326,8 +350,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 gboolean dreamcast_can_run(void)
 {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    return dreamcast_state != STATE_UNINIT &&
-    (dreamcast_has_bios || dreamcast_program_name != NULL);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    return dreamcast_state != STATE_UNINIT;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 /********************************* Save States *****************************/
</pre></div>
<hr /><a name="file6" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>dreamcast.h</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/dreamcast.h
+++ lxdream/src/dreamcast.h
@@ -37,9 +37,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 struct lxdream_config_group; // Forward declaration
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void dreamcast_configure(void);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void dreamcast_configure(gboolean use_bootrom);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void dreamcast_configure_aica_only(void);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void dreamcast_init(void);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void dreamcast_init(gboolean use_bootrom);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void dreamcast_reset(void);
 void dreamcast_run(void);
 void dreamcast_set_run_time( unsigned int seconds, unsigned int nanosecs );
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -86,6 +86,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * allocation and does not need to be freed separately)
  */
 frame_buffer_t dreamcast_load_preview( const gchar *filename );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gboolean dreamcast_load_fakebios();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define SCENE_SAVE_MAGIC "%!-lxDream!Scene"
 #define SCENE_SAVE_VERSION 0x00010000
</pre></div>
<hr /><a name="file7" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>loader.c</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/loader.c
+++ lxdream/src/loader.c
@@ -107,7 +107,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >          * correctly
          */
         if( mem_load_block( bootstrap_file, BOOTSTRAP_LOAD_ADDR, BOOTSTRAP_SIZE ) == 0 ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-            dreamcast_program_loaded( filename, BOOTSTRAP_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >LOAD_ADDR+0x300</span> );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+            dreamcast_program_loaded( filename, BOOTSTRAP_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ENTRY_ADDR</span> );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             g_free(bootstrap_file);
             return;
         }
</pre></div>
<hr /><a name="file8" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>main.c</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/main.c
+++ lxdream/src/main.c
@@ -41,10 +41,11 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "hotkeys.h"
 #include "plugin.h"
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-char *option_list = "a:A:c:dfg:G:hHl:m:npt:T:uvV:x?";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+char *option_list = "a:A:<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >b</span>c:dfg:G:hHl:m:npt:T:uvV:x?";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > struct option longopts[] = {
         { "aica", required_argument, NULL, 'a' },
         { "audio", required_argument, NULL, 'A' },
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        { "biosless", no_argument, NULL, 'b' },
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "config", required_argument, NULL, 'c' },
         { "debugger", no_argument, NULL, 'D' },
         { "fullscreen", no_argument, NULL, 'f' },
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -72,6 +73,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > gboolean use_xlat = TRUE;
 gboolean show_debugger = FALSE;
 gboolean show_fullscreen = FALSE;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gboolean use_bootrom = TRUE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > extern uint32_t sh4_cpu_multiplier;
 
 static void print_version()
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -87,6 +89,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     printf( "Options:\n" );
     printf( "   -a, --aica=PROGFILE    %s\n", _("Run the AICA SPU only, with the supplied program") );
     printf( "   -A, --audio=DRIVER     %s\n", _("Use the specified audio driver (? to list)") );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    printf( "   -b, --biosless         %s\n", _("Run without the BIOS boot rom even if available") );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     printf( "   -c, --config=CONFFILE  %s\n", _("Load configuration from CONFFILE") );
     printf( "   -d, --debugger         %s\n", _("Start in debugger mode") );
     printf( "   -f, --fullscreen       %s\n", _("Start in fullscreen mode") );
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -133,6 +136,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         case 'A': /* Audio driver */
             audio_driver_name = optarg;
             break;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        case 'b': /* No Boot rom */
+            use_bootrom = FALSE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         case 'c': /* Config file */
             lxdream_set_config_filename(optarg);
             break;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -223,7 +228,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     vmulist_init();
 
     if( aica_program == NULL ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        dreamcast_init();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        dreamcast_init(<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >use_bootrom</span>);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     } else {
         dreamcast_configure_aica_only();
         mem_load_block( aica_program, 0x00800000, 2048*1024 );
</pre></div>
<hr /><a name="file9" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>syscall.h</b></big> <small id="info" style="color: #888888;" >566cdeb157ec -> 50e702af9373</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/syscall.h
+++ lxdream/src/syscall.h
@@ -60,6 +60,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 void bios_install( void );
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void bios_boot( uint32_t syscallid );
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Install the DCLoad syscall hack
  */
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>