1.1 --- a/src/sh4/dmac.c Mon Oct 08 12:09:06 2007 +0000
1.2 +++ b/src/sh4/dmac.c Tue Jan 01 04:58:57 2008 +0000
1.5 - * $Id: dmac.c,v 1.3 2007-10-08 12:06:01 nkeynes Exp $
1.6 + * $Id: dmac.c,v 1.4 2007-11-08 11:54:16 nkeynes Exp $
1.8 * SH4 onboard DMA controller (DMAC) peripheral.
1.12 * @return the number of bytes actually transferred.
1.14 -uint32_t DMAC_get_buffer( int channel, unsigned char *buf, uint32_t numBytes )
1.15 +uint32_t DMAC_get_buffer( int channel, sh4ptr_t buf, uint32_t numBytes )
1.17 uint32_t control = DMA_CONTROL(channel);
1.18 uint32_t source, count, run_count, size, i;
1.22 /* Do copy - FIXME: doesn't work when crossing regions */
1.23 - char *region = mem_get_region( source );
1.24 + sh4ptr_t region = mem_get_region( source );
1.25 switch( (control >> 12) & 0x03 ) {
1.27 memcpy( tmp, region, size );
1.29 return run_count * size;
1.32 -uint32_t DMAC_put_buffer( int channel, unsigned char *buf, uint32_t numBytes )
1.33 +uint32_t DMAC_put_buffer( int channel, sh4ptr_t buf, uint32_t numBytes )
1.35 uint32_t control = DMA_CONTROL(channel);
1.36 uint32_t dest, count, run_count, size, i;
1.40 /* Do copy - FIXME: doesn't work when crossing regions */
1.41 - char *region = mem_get_region( dest );
1.42 + sh4ptr_t region = mem_get_region( dest );
1.43 switch( (control >> 12) & 0x03 ) {
1.45 for( i=0; i<run_count; i++ ) {