Search
lxdream.org :: lxdream/src/bios.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/bios.c
changeset 1298:d0eb2307b847
prev1107:7b279d10f46f
author nkeynes
date Wed Feb 04 08:38:23 2015 +1000 (4 years ago)
permissions -rw-r--r--
last change Fix assorted compile warnings reported by Clang
file annotate diff log raw
1.1 --- a/src/bios.c Mon May 17 22:01:23 2010 +1000
1.2 +++ b/src/bios.c Wed Feb 04 08:38:23 2015 +1000
1.3 @@ -213,12 +213,12 @@
1.4 * Locate the active config block. FIXME: This isn't completely correct, but it works
1.5 * under at least some circumstances.
1.6 */
1.7 -static char *bios_find_flash_config( sh4addr_t segment, uint32_t length )
1.8 +static sh4ptr_t bios_find_flash_config( sh4addr_t segment, uint32_t length )
1.9 {
1.10 - char *start = mem_get_region(segment);
1.11 - char *p = start + 0x80;
1.12 - char *end = p + length;
1.13 - char *result = NULL;
1.14 + sh4ptr_t start = mem_get_region(segment);
1.15 + sh4ptr_t p = start + 0x80;
1.16 + sh4ptr_t end = p + length;
1.17 + sh4ptr_t result = NULL;
1.18
1.19 if( memcmp( start, FLASH_PARTITION_MAGIC, 16 ) != 0 )
1.20 return NULL; /* Missing magic */
1.21 @@ -236,8 +236,8 @@
1.22 */
1.23 static void bios_sysinfo_vector( uint32_t syscallid )
1.24 {
1.25 - char *flash_segment, *flash_config;
1.26 - char *dest;
1.27 + sh4ptr_t flash_segment, flash_config;
1.28 + sh4ptr_t dest;
1.29 DEBUG( "BIOS SYSINFO: r4 = %08X, r5 = %08X, r6 = %08x, r7= %08X", sh4r.r[4], sh4r.r[5], sh4r.r[6], sh4r.r[7] );
1.30
1.31 switch( sh4r.r[7] ) {
1.32 @@ -269,7 +269,6 @@
1.33
1.34 static void bios_flashrom_vector( uint32_t syscallid )
1.35 {
1.36 - char *dest;
1.37 DEBUG( "BIOS FLASHROM: r4 = %08X, r5 = %08X, r6 = %08x, r7= %08X", sh4r.r[4], sh4r.r[5], sh4r.r[6], sh4r.r[7] );
1.38
1.39 switch( sh4r.r[7] ) {
1.40 @@ -413,7 +412,7 @@
1.41 } else if( iso_file_source_open(file) == 1 ) {
1.42 size_t len;
1.43 if( unscramble ) {
1.44 - char *tmp = g_malloc(st.st_size);
1.45 + unsigned char *tmp = g_malloc(st.st_size);
1.46 len = iso_file_source_read(file, tmp, st.st_size);
1.47 bootprogram_unscramble(buffer, tmp, st.st_size);
1.48 g_free(tmp);
1.49 @@ -453,7 +452,6 @@
1.50 ERROR( "Disc is not bootable" );
1.51 return FALSE;
1.52 }
1.53 - uint32_t lba = track->lba;
1.54 uint32_t sectors = cdrom_disc_get_track_size(disc,track);
1.55 if( sectors < MIN_ISO_SECTORS ) {
1.56 ERROR( "Disc is not bootable" );
.