Search
lxdream.org :: lxdream/src/sh4/sh4mmio.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4mmio.c
changeset 736:a02d1475ccfd
prev561:533f6b478071
next830:73637b9624e4
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/sh4/sh4mmio.c Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/src/sh4/sh4mmio.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -39,9 +39,9 @@
1.4 uint16_t output = MMIO_READ( BSC, PDTRA );
1.5 uint16_t input_mask = 0, output_mask = 0;
1.6 for( i=0; i<16; i++ ) {
1.7 - int bits = (pctra >> (i<<1)) & 0x03;
1.8 - if( bits == 2 ) input_mask |= (1<<i);
1.9 - else if( bits != 0 ) output_mask |= (1<<i);
1.10 + int bits = (pctra >> (i<<1)) & 0x03;
1.11 + if( bits == 2 ) input_mask |= (1<<i);
1.12 + else if( bits != 0 ) output_mask |= (1<<i);
1.13 }
1.14
1.15 /* ??? */
1.16 @@ -61,9 +61,9 @@
1.17 uint16_t output = MMIO_READ( BSC, PDTRB );
1.18 uint16_t input_mask = 0, output_mask = 0;
1.19 for( i=0; i<4; i++ ) {
1.20 - int bits = (pctrb >> (i<<1)) & 0x03;
1.21 - if( bits == 2 ) input_mask |= (1<<i);
1.22 - else if( bits != 0 ) output_mask |= (1<<i);
1.23 + int bits = (pctrb >> (i<<1)) & 0x03;
1.24 + if( bits == 2 ) input_mask |= (1<<i);
1.25 + else if( bits != 0 ) output_mask |= (1<<i);
1.26 }
1.27
1.28 return ((bsc_input>>16) & input_mask) | output;
1.29 @@ -76,14 +76,14 @@
1.30 {
1.31 int32_t val;
1.32 switch( reg ) {
1.33 - case PDTRA:
1.34 - val = bsc_read_pdtra();
1.35 - break;
1.36 - case PDTRB:
1.37 - val = bsc_read_pdtrb();
1.38 - break;
1.39 - default:
1.40 - val = MMIO_READ( BSC, reg );
1.41 + case PDTRA:
1.42 + val = bsc_read_pdtra();
1.43 + break;
1.44 + case PDTRB:
1.45 + val = bsc_read_pdtrb();
1.46 + break;
1.47 + default:
1.48 + val = MMIO_READ( BSC, reg );
1.49 }
1.50 return val;
1.51 }
.