Search
lxdream.org :: lxdream/src/pvr2/pvr2.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.c
changeset 929:fd8cb0c82f5f
prev921:6c0e9a8f5618
next931:430048ea8b71
author nkeynes
date Sat Dec 20 03:01:40 2008 +0000 (11 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change First pass experiment using cached decoding.
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.c Thu Dec 11 21:33:08 2008 +0000
1.2 +++ b/src/pvr2/pvr2.c Sat Dec 20 03:01:40 2008 +0000
1.3 @@ -462,8 +462,9 @@
1.4 * This has to handle every single register individually as they all get masked
1.5 * off differently (and its easier to do it at write time)
1.6 */
1.7 -void mmio_region_PVR2_write( uint32_t reg, uint32_t val )
1.8 +MMIO_REGION_WRITE_FN( PVR2, reg, val )
1.9 {
1.10 + reg &= 0xFFF;
1.11 if( reg >= 0x200 && reg < 0x600 ) { /* Fog table */
1.12 MMIO_WRITE( PVR2, reg, val );
1.13 return;
1.14 @@ -826,6 +827,7 @@
1.15
1.16 MMIO_REGION_READ_FN( PVR2, reg )
1.17 {
1.18 + reg &= 0xFFF;
1.19 switch( reg ) {
1.20 case DISP_SYNCSTAT:
1.21 return pvr2_get_sync_status();
1.22 @@ -836,6 +838,7 @@
1.23
1.24 MMIO_REGION_WRITE_FN( PVR2PAL, reg, val )
1.25 {
1.26 + reg &= 0xFFF;
1.27 MMIO_WRITE( PVR2PAL, reg, val );
1.28 pvr2_state.palette_changed = TRUE;
1.29 }
1.30 @@ -858,12 +861,12 @@
1.31
1.32
1.33
1.34 -int32_t mmio_region_PVR2TA_read( uint32_t reg )
1.35 +MMIO_REGION_READ_FN( PVR2TA, reg )
1.36 {
1.37 return 0xFFFFFFFF;
1.38 }
1.39
1.40 -void mmio_region_PVR2TA_write( uint32_t reg, uint32_t val )
1.41 +MMIO_REGION_WRITE_FN( PVR2TA, reg, val )
1.42 {
1.43 pvr2_ta_write( (unsigned char *)&val, sizeof(uint32_t) );
1.44 }
.