summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/dsp32/dsp32.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-02-21 11:48:45 +0100
committer ImJezze <jezze@gmx.net>2016-02-21 11:48:45 +0100
commitcc24a339d8c0517259084b5c178d784626ba965c (patch)
tree9868e9687b5802ae0a3733712a3bbeb3bc75c953 /src/devices/cpu/dsp32/dsp32.cpp
parentb5daabda5495dea5c50e17961ecfed2ea8619d76 (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Second attempt
Diffstat (limited to 'src/devices/cpu/dsp32/dsp32.cpp')
-rw-r--r--src/devices/cpu/dsp32/dsp32.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index f060e81d13c..98640f7d1b4 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -452,7 +452,8 @@ inline void dsp32c_device::WBYTE(offs_t addr, UINT8 data)
inline UINT16 dsp32c_device::RWORD(offs_t addr)
{
#if DETECT_MISALIGNED_MEMORY
- if (addr & 1) fprintf(stderr, "Unaligned word read @ %06X, PC=%06X\n", addr, PC);
+ if (!WORD_ALIGNED(addr))
+ osd_printf_error("Unaligned word read @ %06X, PC=%06X\n", addr, PC);
#endif
return m_program->read_word(addr);
}
@@ -460,7 +461,8 @@ inline UINT16 dsp32c_device::RWORD(offs_t addr)
inline UINT32 dsp32c_device::RLONG(offs_t addr)
{
#if DETECT_MISALIGNED_MEMORY
- if (addr & 3) fprintf(stderr, "Unaligned long read @ %06X, PC=%06X\n", addr, PC);
+ if (!DWORD_ALIGNED(addr))
+ osd_printf_error("Unaligned long read @ %06X, PC=%06X\n", addr, PC);
#endif
return m_program->read_dword(addr);
}
@@ -468,7 +470,8 @@ inline UINT32 dsp32c_device::RLONG(offs_t addr)
inline void dsp32c_device::WWORD(offs_t addr, UINT16 data)
{
#if DETECT_MISALIGNED_MEMORY
- if (addr & 1) fprintf(stderr, "Unaligned word write @ %06X, PC=%06X\n", addr, PC);
+ if (!WORD_ALIGNED(addr))
+ osd_printf_error("Unaligned word write @ %06X, PC=%06X\n", addr, PC);
#endif
m_program->write_word(addr, data);
}
@@ -476,7 +479,8 @@ inline void dsp32c_device::WWORD(offs_t addr, UINT16 data)
inline void dsp32c_device::WLONG(offs_t addr, UINT32 data)
{
#if DETECT_MISALIGNED_MEMORY
- if (addr & 3) fprintf(stderr, "Unaligned long write @ %06X, PC=%06X\n", addr, PC);
+ if (!DWORD_ALIGNED(addr))
+ osd_printf_error("Unaligned long write @ %06X, PC=%06X\n", addr, PC);
#endif
m_program->write_dword(addr, data);
}