summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/iopspu.cpp25
-rw-r--r--src/devices/sound/iopspu.h24
2 files changed, 27 insertions, 22 deletions
diff --git a/src/devices/sound/iopspu.cpp b/src/devices/sound/iopspu.cpp
index 9701fc85be4..88ace1df633 100644
--- a/src/devices/sound/iopspu.cpp
+++ b/src/devices/sound/iopspu.cpp
@@ -9,6 +9,7 @@
*
*/
+#include "emu.h"
#include "iopspu.h"
DEFINE_DEVICE_TYPE(SONYIOP_SPU, iop_spu_device, "iopspu", "PlayStation 2 IOP SPU")
@@ -21,6 +22,10 @@ iop_spu_device::iop_spu_device(const machine_config &mconfig, const char *tag, d
{
}
+iop_spu_device::~iop_spu_device()
+{
+}
+
void iop_spu_device::device_start()
{
m_ram = std::make_unique<uint16_t[]>(2 * 1024 * 1024); // ?
@@ -139,15 +144,15 @@ uint16_t iop_spu_device::reg_read(int bank, uint32_t offset, uint16_t mem_mask)
logerror("%s %d: read: Unknown 0x19a (%04x & %04x)\n", machine().describe_context(), bank, ret, mem_mask);
break;
- case 0x1a8:
- ret = (uint16_t)(core.m_start_port_addr >> 16);
+ case 0x1a8:
+ ret = (uint16_t)(core.m_start_port_addr >> 16);
logerror("%s %d: read: PORT_ADDR_HI: %04x & %04x\n", machine().describe_context(), bank, ret, mem_mask);
- break;
+ break;
- case 0x1aa:
- ret = (uint16_t)core.m_start_port_addr;
+ case 0x1aa:
+ ret = (uint16_t)core.m_start_port_addr;
logerror("%s %d: read: PORT_ADDR_LO: %04x & %04x\n", machine().describe_context(), bank, ret, mem_mask);
- break;
+ break;
case 0x1b0:
ret = core.m_autodma_ctrl;
@@ -196,19 +201,19 @@ void iop_spu_device::reg_write(int bank, uint32_t offset, uint16_t data, uint16_
core.m_unknown_0x19a = data;
break;
- case 0x1a8:
+ case 0x1a8:
logerror("%s %d: write: PORT_ADDR_HI: %04x & %04x\n", machine().describe_context(), bank, data, mem_mask);
core.m_start_port_addr &= ~0x000f0000;
core.m_start_port_addr |= ((uint32_t)data << 16) & 0x000f0000;
core.m_curr_port_addr = core.m_start_port_addr;
- break;
+ break;
- case 0x1aa:
+ case 0x1aa:
logerror("%s %d: write: PORT_ADDR_LO: %04x & %04x\n", machine().describe_context(), bank, data, mem_mask);
core.m_start_port_addr &= ~0x0000ffff;
core.m_start_port_addr |= data;
core.m_curr_port_addr = core.m_start_port_addr;
- break;
+ break;
case 0x1b0:
logerror("%s %d: write: Auto DMA control: %04x & %04x\n", machine().describe_context(), bank, data, mem_mask);
diff --git a/src/devices/sound/iopspu.h b/src/devices/sound/iopspu.h
index 41176cf7738..44e26a68066 100644
--- a/src/devices/sound/iopspu.h
+++ b/src/devices/sound/iopspu.h
@@ -9,12 +9,11 @@
*
*/
-#ifndef DEVICES_MACHINE_IOPSPU_H
-#define DEVICES_MACHINE_IOPSPU_H
+#ifndef MAME_MACHINE_IOPSPU_H
+#define MAME_MACHINE_IOPSPU_H
#pragma once
-#include "emu.h"
#include "cpu/mips/r3000.h"
#include "machine/iopintc.h"
@@ -22,14 +21,15 @@ class iop_spu_device : public device_t, public device_sound_interface
{
public:
template <typename T, typename U>
- iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&iop_tag, U &&intc_tag)
- : iop_spu_device(mconfig, tag, owner, clock)
- {
+ iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&iop_tag, U &&intc_tag)
+ : iop_spu_device(mconfig, tag, owner, clock)
+ {
m_iop.set_tag(std::forward<T>(iop_tag));
m_intc.set_tag(std::forward<U>(intc_tag));
}
- iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ virtual ~iop_spu_device() override;
DECLARE_READ16_MEMBER(read);
DECLARE_WRITE16_MEMBER(write);
@@ -44,8 +44,8 @@ public:
void dma_done(int bank);
protected:
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
@@ -57,8 +57,8 @@ protected:
enum
{
- STATUS_DMA_DONE = (1 << 7),
- STATUS_DMA_ACTIVE = (1 << 10)
+ STATUS_DMA_DONE = (1 << 7),
+ STATUS_DMA_ACTIVE = (1 << 10)
};
class voice_t
@@ -98,4 +98,4 @@ protected:
DECLARE_DEVICE_TYPE(SONYIOP_SPU, iop_spu_device)
-#endif // DEVICES_MACHINE_IOPSPU_H \ No newline at end of file
+#endif // MAME_MACHINE_IOPSPU_H