summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/megd.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/sound/megd.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/devices/sound/megd.h')
-rw-r--r--src/devices/sound/megd.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/devices/sound/megd.h b/src/devices/sound/megd.h
new file mode 100644
index 00000000000..59a13aa0ea4
--- /dev/null
+++ b/src/devices/sound/megd.h
@@ -0,0 +1,39 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// Yamaha MEG - Multiple effects generator
+//
+// Audio dsp dedicated to effects generation
+//
+// Disassembler
+
+#ifndef DEVICES_SOUND_MEGD_H
+#define DEVICES_SOUND_MEGD_H
+
+#pragma once
+
+class meg_disassembler : public util::disasm_interface
+{
+public:
+ class info {
+ public:
+ virtual u16 fp_r(u16 address) const = 0;
+ virtual u16 offset_r(u16 address) const = 0;
+ };
+
+ meg_disassembler(info *inf = nullptr);
+
+ virtual u32 opcode_alignment() const override;
+ virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+
+private:
+ info *m_info;
+
+ std::string gfp(offs_t address) const;
+ std::string goffset(offs_t address) const;
+
+ static inline u32 b(u64 opc, u32 start, u32 count);
+ static inline void append(std::string &r, std::string e);
+};
+
+#endif