diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-26 09:30:47 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-26 09:30:47 +0000 |
commit | acf55c87ef189fc7cb45432d435eca5fef07c9cb (patch) | |
tree | c5dfcd491f64d22d575724263f1ed9d4592509e5 /src/mame/drivers/viper.c | |
parent | 41c1b2c48dc7b8084639ed8329387b2e8bc0d692 (diff) |
Removed devconv.h and memconv.h just moved used inlines for now (no whatsnew)
Diffstat (limited to 'src/mame/drivers/viper.c')
-rw-r--r-- | src/mame/drivers/viper.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c index 98a98e250d1..5cbe8e77cad 100644 --- a/src/mame/drivers/viper.c +++ b/src/mame/drivers/viper.c @@ -284,7 +284,6 @@ An additional control PCB is used for Mocap Golf for the golf club sensor. It co #include "emu.h" #include "cpu/powerpc/ppc.h" #include "machine/pci.h" -#include "devconv.h" #include "machine/idectrl.h" #include "machine/timekpr.h" #include "video/voodoo.h" @@ -362,6 +361,41 @@ UINT32 viper_state::screen_update_viper(screen_device &screen, bitmap_rgb32 &bit UINT32 m_mpc8240_regs[256/4]; +INLINE UINT64 read64le_with_32le_device_handler(read32_device_func handler, device_t *device, address_space &space, offs_t offset, UINT64 mem_mask) +{ + UINT64 result = 0; + if (ACCESSING_BITS_0_31) + result |= (UINT64)(*handler)(device, space, offset * 2 + 0, mem_mask >> 0) << 0; + if (ACCESSING_BITS_32_63) + result |= (UINT64)(*handler)(device, space, offset * 2 + 1, mem_mask >> 32) << 32; + return result; +} + + +INLINE void write64le_with_32le_device_handler(write32_device_func handler, device_t *device, address_space &space, offs_t offset, UINT64 data, UINT64 mem_mask) +{ + if (ACCESSING_BITS_0_31) + (*handler)(device, space, offset * 2 + 0, data >> 0, mem_mask >> 0); + if (ACCESSING_BITS_32_63) + (*handler)(device, space, offset * 2 + 1, data >> 32, mem_mask >> 32); +} + +INLINE UINT64 read64be_with_32le_device_handler(read32_device_func handler, device_t *device, address_space &space, offs_t offset, UINT64 mem_mask) +{ + UINT64 result; + mem_mask = FLIPENDIAN_INT64(mem_mask); + result = read64le_with_32le_device_handler(handler, device, space, offset, mem_mask); + return FLIPENDIAN_INT64(result); +} + + +INLINE void write64be_with_32le_device_handler(write32_device_func handler, device_t *device, address_space &space, offs_t offset, UINT64 data, UINT64 mem_mask) +{ + data = FLIPENDIAN_INT64(data); + mem_mask = FLIPENDIAN_INT64(mem_mask); + write64le_with_32le_device_handler(handler, device, space, offset, data, mem_mask); +} + /*****************************************************************************/ static UINT32 mpc8240_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) |