mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
OKI MSM9810 : Added sub-table lookups. [Andrew Gardner]
(out of whatsnew.txt) Still plenty to do, but half the games should sound perfect now.
This commit is contained in:
parent
64736f5f19
commit
8e5664b178
@ -40,6 +40,27 @@ const UINT8 okim9810_device::s_volume_table[16] =
|
|||||||
0x04, // -30.0 dB
|
0x04, // -30.0 dB
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// sampling frequency lookup table.
|
||||||
|
const UINT32 okim9810_device::s_sampling_freq_table[16] =
|
||||||
|
{
|
||||||
|
4000,
|
||||||
|
8000,
|
||||||
|
16000,
|
||||||
|
32000,
|
||||||
|
0,
|
||||||
|
6400,
|
||||||
|
12800,
|
||||||
|
25600,
|
||||||
|
0,
|
||||||
|
5300,
|
||||||
|
10600,
|
||||||
|
21200,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
// default address map
|
// default address map
|
||||||
static ADDRESS_MAP_START( okim9810, 0, 8 )
|
static ADDRESS_MAP_START( okim9810, 0, 8 )
|
||||||
AM_RANGE(0x000000, 0xffffff) AM_ROM
|
AM_RANGE(0x000000, 0xffffff) AM_ROM
|
||||||
@ -294,6 +315,20 @@ void okim9810_device::write_command(UINT8 data)
|
|||||||
endAddr |= m_direct->read_raw_byte(base + 6) << 8;
|
endAddr |= m_direct->read_raw_byte(base + 6) << 8;
|
||||||
endAddr |= m_direct->read_raw_byte(base + 7) << 0;
|
endAddr |= m_direct->read_raw_byte(base + 7) << 0;
|
||||||
|
|
||||||
|
// Sub-table
|
||||||
|
if (startFlags & 0x80)
|
||||||
|
{
|
||||||
|
// TODO: Offset (oldStart+0) and (oldStart+4) are currently ignored - can the chaining continue?
|
||||||
|
offs_t oldStart = startAddr;
|
||||||
|
startAddr = m_direct->read_raw_byte(oldStart + 1) << 16;
|
||||||
|
startAddr |= m_direct->read_raw_byte(oldStart + 2) << 8;
|
||||||
|
startAddr |= m_direct->read_raw_byte(oldStart + 3) << 0;
|
||||||
|
|
||||||
|
endAddr = m_direct->read_raw_byte(oldStart + 5) << 16;
|
||||||
|
endAddr |= m_direct->read_raw_byte(oldStart + 6) << 8;
|
||||||
|
endAddr |= m_direct->read_raw_byte(oldStart + 7) << 0;
|
||||||
|
}
|
||||||
|
|
||||||
mame_printf_verbose("FADR channel %d phrase offset %02x => ", channel, m_TMP_register);
|
mame_printf_verbose("FADR channel %d phrase offset %02x => ", channel, m_TMP_register);
|
||||||
mame_printf_verbose("\tstartFlags(%02x) startAddr(%06x) endFlags(%02x) endAddr(%06x) bytes(%d)\n", startFlags, startAddr, endFlags, endAddr, endAddr-startAddr);
|
mame_printf_verbose("\tstartFlags(%02x) startAddr(%06x) endFlags(%02x) endAddr(%06x) bytes(%d)\n", startFlags, startAddr, endFlags, endAddr, endAddr-startAddr);
|
||||||
m_voice[channel].m_sample = 0;
|
m_voice[channel].m_sample = 0;
|
||||||
|
@ -33,6 +33,20 @@ enum
|
|||||||
OKIM9810_NONLINEAR8_PLAYBACK = 3
|
OKIM9810_NONLINEAR8_PLAYBACK = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
OKIM9810_SECONDARY_FILTER = 0,
|
||||||
|
OKIM9810_PRIMARY_FILTER = 1,
|
||||||
|
OKIM9810_NO_FILTER = 2,
|
||||||
|
OKIM9810_NO_FILTER2 = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
OKIM9810_OUTPUT_TO_DIRECT_DAC = 0,
|
||||||
|
OKIM9810_OUTPUT_TO_VOLTAGE_FOLLOWER = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// INTERFACE CONFIGURATION MACROS
|
// INTERFACE CONFIGURATION MACROS
|
||||||
@ -144,6 +158,7 @@ protected:
|
|||||||
okim_voice m_voice[OKIM9810_VOICES];
|
okim_voice m_voice[OKIM9810_VOICES];
|
||||||
|
|
||||||
static const UINT8 s_volume_table[16];
|
static const UINT8 s_volume_table[16];
|
||||||
|
static const UINT32 s_sampling_freq_table[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user