summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio
diff options
context:
space:
mode:
author David Haywood <mamehaze@gmail.com>2019-06-08 20:02:06 +0100
committer R. Belmont <rb6502@users.noreply.github.com>2019-06-08 15:02:06 -0400
commit695baf724d087edfc467272d360e193401c4f52f (patch)
tree7e36a829cb8ed6287ef36078c63720570033c358 /src/mame/audio
parent42d5ce28e28861bdff11799e774b2ab5f4468aed (diff)
radica / elan eu3a14 - explore more tile mode bits used by rad_hnt3, rad_foot etc. (nw) (#5179)
* rad_hnt3 misc improvements (nw) * better support for alt modes used in rad_hnt3 and rad_foot * tidy/comments (nw) * test note (nw) * actually not a special case (nw) * document other test modes (nw) * palette selection improvements (nw) * switch according to test mode (nw) * improved palette handling for rad_foot (7bpp mode) * ramsize (nw) * exploring the ram based layer (nw) * ram tile layer in hnt3 is 2bpp, hardcode stuff for now until we've found the proper register bits * slight refactor (nw) * some palette fixes (nw) * fix 2bpp tile colours (nw) * rename rad_eu to elan_eu * rework tile pri (nw) * refactor (nw) * note updates (nw) * kludge (nw) * some weird regs notes (nw)
Diffstat (limited to 'src/mame/audio')
-rw-r--r--src/mame/audio/elan_eu3a05.cpp (renamed from src/mame/audio/rad_eu3a05.cpp)58
-rw-r--r--src/mame/audio/elan_eu3a05.h (renamed from src/mame/audio/rad_eu3a05.h)0
2 files changed, 33 insertions, 25 deletions
diff --git a/src/mame/audio/rad_eu3a05.cpp b/src/mame/audio/elan_eu3a05.cpp
index b77e1bdc6a4..84fbd099fc4 100644
--- a/src/mame/audio/rad_eu3a05.cpp
+++ b/src/mame/audio/elan_eu3a05.cpp
@@ -4,9 +4,17 @@
// Format not understood, it is not OKI ADPCM or IMA ADPCM, maybe something more basic?
#include "emu.h"
-#include "rad_eu3a05.h"
+#include "elan_eu3a05.h"
+
+DEFINE_DEVICE_TYPE(RADICA6502_SOUND, radica6502_sound_device, "radica6502sound", "Elan EU3A05 / EU3A14 Sound")
+
+#define LOG_AUDIO (1U << 0)
+
+#define LOG_ALL (LOG_AUDIO)
+
+#define VERBOSE (0)
+#include "logmacro.h"
-DEFINE_DEVICE_TYPE(RADICA6502_SOUND, radica6502_sound_device, "radica6502sound", "Radica 6502 Sound")
radica6502_sound_device::radica6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, RADICA6502_SOUND, tag, owner, clock)
@@ -51,7 +59,7 @@ void radica6502_sound_device::sound_stream_update(sound_stream &stream, stream_s
{
if (!((m_isstopped >> channel) & 1))
{
- //logerror("m_isstopped %02x channel %d is active %08x %06x\n", m_isstopped, channel, m_sound_byte_address[channel], m_sound_current_nib_pos[channel]);
+ //LOGMASKED( LOG_AUDIO, "m_isstopped %02x channel %d is active %08x %06x\n", m_isstopped, channel, m_sound_byte_address[channel], m_sound_current_nib_pos[channel]);
int readoffset = m_sound_byte_address[channel] + (m_sound_current_nib_pos[channel] / 2);
@@ -79,7 +87,7 @@ void radica6502_sound_device::sound_stream_update(sound_stream &stream, stream_s
}
else
{
- //logerror("m_isstopped %02x channel %d is NOT active %08x %06x\n", m_isstopped, channel, m_sound_byte_address[channel], m_sound_current_nib_pos[channel]);
+ //LOGMASKED( LOG_AUDIO, "m_isstopped %02x channel %d is NOT active %08x %06x\n", m_isstopped, channel, m_sound_byte_address[channel], m_sound_current_nib_pos[channel]);
}
}
outpos++;
@@ -93,17 +101,17 @@ void radica6502_sound_device::handle_sound_addr_w(int which, int offset, uint8_t
{
case 0x00:
m_sound_byte_address[which] = (m_sound_byte_address[which] & 0xffff00) | (data<<0);
- logerror("%s: sound_0 (%d) write lo address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) write lo address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
break;
case 0x01:
m_sound_byte_address[which] = (m_sound_byte_address[which] & 0xff00ff) | (data<<8);
- logerror("%s: sound_0 (%d) write md address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) write md address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
break;
case 0x02:
m_sound_byte_address[which] = (m_sound_byte_address[which] & 0x00ffff) | (data<<16);
- logerror("%s: sound_0 (%d) write hi address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) write hi address %02x (real address is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_address[which]);
break;
}
}
@@ -113,15 +121,15 @@ uint8_t radica6502_sound_device::handle_sound_addr_r(int which, int offset)
switch (offset)
{
case 0x00:
- logerror("%s: sound_0 (%d) read lo address\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) read lo address\n", machine().describe_context(), which);
return (m_sound_byte_address[which]>>0) & 0xff;
case 0x01:
- logerror("%s: sound_0 (%d) read mid address\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) read mid address\n", machine().describe_context(), which);
return (m_sound_byte_address[which]>>8) & 0xff;
case 0x02:
- logerror("%s: sound_0 (%d) read hi address\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_0 (%d) read hi address\n", machine().describe_context(), which);
return (m_sound_byte_address[which]>>16) & 0xff;
}
@@ -146,17 +154,17 @@ void radica6502_sound_device::handle_sound_size_w(int which, int offset, uint8_t
{
case 0x00:
m_sound_byte_len[which] = (m_sound_byte_len[which] & 0xffff00) | (data<<0);
- logerror("%s: sound_1 (%d) write lo size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) write lo size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
break;
case 0x01:
m_sound_byte_len[which] = (m_sound_byte_len[which] & 0xff00ff) | (data<<8);
- logerror("%s: sound_1 (%d) write md size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) write md size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
break;
case 0x02:
m_sound_byte_len[which] = (m_sound_byte_len[which] & 0x00ffff) | (data<<16);
- logerror("%s: sound_1 (%d) write hi size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) write hi size %02x (real size is now %08x)\n", machine().describe_context(), which, data, m_sound_byte_len[which]);
break;
}
}
@@ -166,15 +174,15 @@ uint8_t radica6502_sound_device::handle_sound_size_r(int which, int offset)
switch (offset)
{
case 0x00:
- logerror("%s: sound_1 (%d) read lo size\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) read lo size\n", machine().describe_context(), which);
return (m_sound_byte_len[which]>>0) & 0xff;
case 0x01:
- logerror("%s: sound_1 (%d) read mid size\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) read mid size\n", machine().describe_context(), which);
return (m_sound_byte_len[which]>>8) & 0xff;
case 0x02:
- logerror("%s: sound_1 (%d) read hi size\n", machine().describe_context(), which);
+ LOGMASKED( LOG_AUDIO, "%s: sound_1 (%d) read hi size\n", machine().describe_context(), which);
return (m_sound_byte_len[which]>>16) & 0xff;
}
@@ -197,7 +205,7 @@ READ8_MEMBER(radica6502_sound_device::radicasi_sound_trigger_r)
{
m_stream->update();
- logerror("%s: sound read from trigger?\n", machine().describe_context());
+ LOGMASKED( LOG_AUDIO, "%s: sound read from trigger?\n", machine().describe_context());
return m_sound_trigger;
}
@@ -206,7 +214,7 @@ WRITE8_MEMBER(radica6502_sound_device::radicasi_sound_trigger_w)
{
m_stream->update();
- logerror("%s: sound write to trigger? %02x\n", machine().describe_context(), data);
+ LOGMASKED( LOG_AUDIO, "%s: sound write to trigger? %02x\n", machine().describe_context(), data);
m_sound_trigger = data;
for (int i = 0; i < 6; i++)
@@ -218,39 +226,39 @@ WRITE8_MEMBER(radica6502_sound_device::radicasi_sound_trigger_w)
}
if (data & 0xc0)
- logerror(" UNEXPECTED BITS SET");
+ LOGMASKED( LOG_AUDIO, " UNEXPECTED BITS SET");
}
/* this is read/written with the same individual bits for each channel as the trigger
maybe related to interrupts? */
READ8_MEMBER(radica6502_sound_device::radicasi_sound_unk_r)
{
- logerror("%s: radicasi_sound_unk_r\n", machine().describe_context());
+ LOGMASKED( LOG_AUDIO, "%s: radicasi_sound_unk_r\n", machine().describe_context());
// don't think this reads back what was written probably a status of something instead?
return 0x00; //m_sound_unk;
}
WRITE8_MEMBER(radica6502_sound_device::radicasi_sound_unk_w)
{
- logerror("%s: radicasi_sound_unk_w %02x\n", machine().describe_context(), data);
+ LOGMASKED( LOG_AUDIO, "%s: radicasi_sound_unk_w %02x\n", machine().describe_context(), data);
for (int i = 0; i < 6; i++)
{
int bit = (data >> i) & 1;
if (bit)
- logerror("(unknown operation on channel %d)\n", i);
+ LOGMASKED( LOG_AUDIO, "(unknown operation on channel %d)\n", i);
}
m_sound_unk = data;
if (data & 0xc0)
- logerror(" UNEXPECTED BITS SET");
+ LOGMASKED( LOG_AUDIO, " UNEXPECTED BITS SET");
}
void radica6502_sound_device::handle_sound_trigger(int which)
{
- logerror("Triggering operation on channel (%d) with params %08x %08x\n", which, m_sound_byte_address[which], m_sound_byte_len[which]);
+ LOGMASKED( LOG_AUDIO, "Triggering operation on channel (%d) with params %08x %08x\n", which, m_sound_byte_address[which], m_sound_byte_len[which]);
m_sound_current_nib_pos[which] = 0;
m_isstopped &= ~(1 << which);
@@ -261,6 +269,6 @@ READ8_MEMBER(radica6502_sound_device::radicasi_50a8_r)
{
m_stream->update();
- logerror("%s: radicasi_50a8_r\n", machine().describe_context());
+ LOGMASKED( LOG_AUDIO, "%s: radicasi_50a8_r\n", machine().describe_context());
return m_isstopped;
}
diff --git a/src/mame/audio/rad_eu3a05.h b/src/mame/audio/elan_eu3a05.h
index 12c7369ec50..12c7369ec50 100644
--- a/src/mame/audio/rad_eu3a05.h
+++ b/src/mame/audio/elan_eu3a05.h