Search
lxdream.org :: lxdream/src/bios.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/bios.c
changeset 102:844a3f2a76ff
prev87:11208d725b61
next422:61a0598e07ff
author nkeynes
date Mon Mar 13 12:38:39 2006 +0000 (13 years ago)
permissions -rw-r--r--
last change Refactor bios into more generic syscall structure. Add initial hooks for
dc-load functions
file annotate diff log raw
1.1 --- a/src/bios.c Sun Jan 22 22:40:53 2006 +0000
1.2 +++ b/src/bios.c Mon Mar 13 12:38:39 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: bios.c,v 1.1 2006-01-22 22:40:53 nkeynes Exp $
1.6 + * $Id: bios.c,v 1.2 2006-03-13 12:38:34 nkeynes Exp $
1.7 *
1.8 * "Fake" BIOS functions, for operation without the actual BIOS.
1.9 *
1.10 @@ -18,7 +18,7 @@
1.11
1.12 #include "dream.h"
1.13 #include "mem.h"
1.14 -#include "bios.h"
1.15 +#include "syscall.h"
1.16 #include "sh4/sh4core.h"
1.17
1.18 #define COMMAND_QUEUE_LENGTH 16
1.19 @@ -117,16 +117,6 @@
1.20 return &gdrom_cmd_queue[id];
1.21 }
1.22
1.23 -void bios_install( void )
1.24 -{
1.25 - bios_gdrom_init();
1.26 - sh4_write_long( 0x8C0000B0, 0xFFFFFFB0 );
1.27 - sh4_write_long( 0x8C0000B4, 0xFFFFFFB4 );
1.28 - sh4_write_long( 0x8C0000B8, 0xFFFFFFB8 );
1.29 - sh4_write_long( 0x8C0000BC, 0xFFFFFFBC );
1.30 - sh4_write_long( 0x8C0000E0, 0xFFFFFFE0 );
1.31 -}
1.32 -
1.33 /**
1.34 * Syscall list courtesy of Marcus Comstedt
1.35 */
1.36 @@ -211,3 +201,13 @@
1.37 }
1.38 }
1.39 }
1.40 +
1.41 +void bios_install( void )
1.42 +{
1.43 + bios_gdrom_init();
1.44 + syscall_add_hook_vector( 0xB0, 0x8C0000B0, bios_syscall );
1.45 + syscall_add_hook_vector( 0xB4, 0x8C0000B4, bios_syscall );
1.46 + syscall_add_hook_vector( 0xB8, 0x8C0000B8, bios_syscall );
1.47 + syscall_add_hook_vector( 0xBC, 0x8C0000BC, bios_syscall );
1.48 + syscall_add_hook_vector( 0xE0, 0x8C0000E0, bios_syscall );
1.49 +}
.