Search
lxdream.org :: lxdream/src/bios.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/bios.c
changeset 502:c4ecae2b1b5e
prev430:467519b050f4
next561:533f6b478071
next586:2a3ba82cf243
author nkeynes
date Thu Nov 08 11:54:16 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Add sh4ptr_t type, start converting bare pointer refs to it
file annotate diff log raw
1.1 --- a/src/bios.c Mon Oct 08 12:09:06 2007 +0000
1.2 +++ b/src/bios.c Thu Nov 08 11:54:16 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: bios.c,v 1.4 2007-10-08 12:06:01 nkeynes Exp $
1.6 + * $Id: bios.c,v 1.5 2007-11-08 11:54:16 nkeynes Exp $
1.7 *
1.8 * "Fake" BIOS functions, for operation without the actual BIOS.
1.9 *
1.10 @@ -55,7 +55,7 @@
1.11 typedef struct gdrom_command {
1.12 int status;
1.13 uint32_t cmd_code;
1.14 - char *data;
1.15 + sh4ptr_t data;
1.16 uint32_t result[4];
1.17 } *gdrom_command_t;
1.18
1.19 @@ -86,7 +86,7 @@
1.20 memset( &gdrom_cmd_queue, 0, sizeof(gdrom_cmd_queue) );
1.21 }
1.22
1.23 -uint32_t bios_gdrom_enqueue( uint32_t cmd, char *ptr )
1.24 +uint32_t bios_gdrom_enqueue( uint32_t cmd, sh4ptr_t ptr )
1.25 {
1.26 int i;
1.27 for( i=0; i<COMMAND_QUEUE_LENGTH; i++ ) {
1.28 @@ -151,7 +151,7 @@
1.29 sh4r.r[0] = cmd->status;
1.30 if( cmd->status == GD_CMD_STATUS_ERROR &&
1.31 sh4r.r[5] != 0 ) {
1.32 - mem_copy_to_sh4( sh4r.r[5], (unsigned char *)&cmd->result, sizeof(cmd->result) );
1.33 + mem_copy_to_sh4( sh4r.r[5], (sh4ptr_t)&cmd->result, sizeof(cmd->result) );
1.34 }
1.35 }
1.36 break;
1.37 @@ -163,7 +163,7 @@
1.38 break;
1.39 case 4: /* Drive status */
1.40 if( sh4r.r[4] != 0 ) {
1.41 - mem_copy_to_sh4( sh4r.r[4], (unsigned char *)&bios_gdrom_status,
1.42 + mem_copy_to_sh4( sh4r.r[4], (sh4ptr_t)&bios_gdrom_status,
1.43 sizeof(bios_gdrom_status) );
1.44 }
1.45 sh4r.r[0] = 0;
.