From 434f3dd62177edf39de8921d93e54300d0462cb0 Mon Sep 17 00:00:00 2001 From: smf- Date: Fri, 31 Aug 2018 02:26:25 +0100 Subject: vgmplay: Support 32x sound [smf] --- src/mame/drivers/vgmplay.cpp | 386 +++++++++++++++++++++++++++++++++---------- src/mame/layout/vgmplay.lay | 2 +- 2 files changed, 298 insertions(+), 90 deletions(-) diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp index 056940ed3d6..ee54446f5d1 100644 --- a/src/mame/drivers/vgmplay.cpp +++ b/src/mame/drivers/vgmplay.cpp @@ -291,19 +291,13 @@ private: rom_block(offs_t start, offs_t end, std::unique_ptr &&d) : start_address(start), end_address(end), data(std::move(d)) {} }; - enum class LengthMode : uint8_t - { - Ignore = 0x00, - Cmds = 0x01, - MSec = 0x02, - ToEnd = 0x03, - Bytes = 0x0f, - }; - struct stream { + uint8_t byte_depth; + uint32_t position; + emu_timer *timer; // stream control - uint8_t type; + act_led chip_type; uint8_t port; uint8_t reg; // stream data @@ -315,16 +309,13 @@ private: // start stream uint32_t offset; uint32_t length; - LengthMode length_mode; bool loop; bool reverse; - uint32_t position; }; TIMER_CALLBACK_MEMBER(stream_timer_expired); stream m_streams[0xff]; - emu_timer *m_stream_timers[0xff]; void pulse_act_led(act_led led); TIMER_CALLBACK_MEMBER(act_led_expired); @@ -518,7 +509,7 @@ void vgmplay_device::device_start() m_act_led_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vgmplay_device::act_led_expired), this)); for (int i = 0; i < 0xff; i++) - m_stream_timers[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vgmplay_device::stream_timer_expired), this)); + m_streams[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vgmplay_device::stream_timer_expired), this)); save_item(NAME(m_pc)); //save_item(NAME(m_streams)); @@ -538,8 +529,11 @@ void vgmplay_device::device_reset() for (int i = 0; i < 0xff; i++) { - m_streams[i].type = 0xff; - m_stream_timers[i]->adjust(attotime::never); + stream& s(m_streams[i]); + s.chip_type = act_led(0xff); + s.bank = 0xff; + s.frequency = 0; + s.timer->enable(false); } } @@ -643,19 +637,107 @@ uint32_t vgmplay_device::handle_data_block(uint32_t address) m_data_streams[type][start + i] = m_file->read_byte(m_pc + 7 + i); } else if (type < 0x7f) - logerror("ignored compressed stream size %x type %02x\n", size, type); + { + uint8_t cmp_type = m_file->read_byte(m_pc + 0x07); + uint32_t out_size = m_file->read_dword(m_pc + 0x08); + + uint32_t start = m_data_streams[type - 0x40].size(); + m_data_stream_blocks[type - 0x40].push_back(data_block(start, out_size)); + m_data_streams[type - 0x40].resize(start + out_size); + + if (cmp_type == 0) + { + uint8_t bit_dec = m_file->read_byte(m_pc + 0x0c); + uint8_t bit_cmp = m_file->read_byte(m_pc + 0x0d); + uint8_t cmp_sub_type = m_file->read_byte(m_pc + 0x0e); + uint16_t add_val = m_file->read_word(m_pc + 0x0f); + + if (cmp_sub_type == 0x02) + osd_printf_error("unhandled n-bit compressed stream size %x->%x type %02x bit_dec %02x bit_cmp %02x unsupported cmp_sub_type %02x add_val %04x\n", size, out_size, type - 0x40, bit_dec, bit_cmp, cmp_sub_type, add_val); + else + { + int in_pos = 0x11 - 0x07; + int in_shift = 0; + int out_pos = 0; + while (out_pos < out_size && in_pos < size) + { + int in_bits = bit_cmp; + uint16_t in_val = 0; + int out_bits = 0; + + while (in_bits > 0 && in_pos < size) + { + int bits = std::min(in_bits, 8); + uint8_t mask = (1 << bits) - 1; + in_shift += bits; + in_bits -= bits; + + uint16_t val = (m_file->read_byte(m_pc + 0x7 + in_pos) << in_shift >> 8) & mask; + if (in_shift >= 8) + { + in_pos++; + + in_shift -= 8; + if (in_shift > 0) + { + if (in_pos < size) + val |= (m_file->read_byte(m_pc + 0x7 + in_pos) << in_shift >> 8) & mask; + else + break; + } + } + + in_val |= val << out_bits; + out_bits += bits; + } + + if (out_bits == bit_cmp) + { + uint16_t out_val = 0; + + if (cmp_sub_type == 0) + out_val = in_val + add_val; + else if (cmp_sub_type == 1) + out_val = (in_val << (bit_dec - bit_cmp)) + add_val; + else + osd_printf_error("unhandled n-bit compressed stream size %x->%x type %02x bit_dec %02x bit_cmp %02x unsupported cmp_sub_type %02x add_val %04x\n", size, out_size, type - 0x40, bit_dec, bit_cmp, cmp_sub_type, add_val); + + for (int i = 0; i < bit_dec; i += 8) + { + m_data_streams[type - 0x40][start + out_pos] = out_val; + out_pos++; + out_val >>= 8; + } + } + } + + if (out_pos != out_size) + osd_printf_error("invalid n-bit compressed stream %02x in %x/%x out %x/%x\n", type - 0x40, in_pos, size, out_pos, out_size); + } + } + else if (cmp_type == 1) + osd_printf_error("unhandled delta-t compressed stream size %x->%x type %02x\n", size, out_size, type - 0x40); + else + osd_printf_error("unhandled unknown %02x compressed stream size %x->%x type %02x\n", cmp_type, size, out_size, type - 0x40); + } else if (type < 0x80) - logerror("ignored compression table size %x\n", size); + osd_printf_error("unhandled compression table size %x\n", size); else if (type < 0xc0) { - //uint32_t rs = m_file->read_dword(m_pc+7); + uint32_t rom_size = m_file->read_dword(m_pc + 7); uint32_t start = m_file->read_dword(m_pc + 11); - std::unique_ptr block = std::make_unique(size - 8); - for (uint32_t i = 0; iread_byte(m_pc + 15 + i); - m_rom_blocks[second][type - 0x80].emplace_front(start, start + size - 9, std::move(block)); + + uint32_t data_size = start < rom_size ? std::min(size - 8, rom_size - start) : 0; + + if (data_size) + { + std::unique_ptr block = std::make_unique(data_size); + for (uint32_t i = 0; i < data_size; i++) + block[i] = m_file->read_byte(m_pc + 15 + i); + m_rom_blocks[second][type - 0x80].emplace_front(start, start + size - 9, std::move(block)); + } } else if (type <= 0xc2) { @@ -684,7 +766,7 @@ uint32_t vgmplay_device::handle_data_block(uint32_t address) } else { - logerror("ignored ram block size %x type %02x\n", size, type); + osd_printf_error("unhandled ram block size %x type %02x\n", size, type); } return 7 + size; } @@ -701,7 +783,7 @@ uint32_t vgmplay_device::handle_pcm_write(uint32_t address) type &= 0x7f; if (m_data_streams.size() <= type || m_data_streams[type].size() <= src + size) - logerror("ignored pcm ram writes src %x dst %x size %x type %02x\n", src, dst, size, type); + osd_printf_error("invalid pcm ram writes src %x dst %x size %x type %02x\n", src, dst, size, type); else if (type == 0x01 && !second) { for (int i = 0; i < size; i++) @@ -723,32 +805,47 @@ uint32_t vgmplay_device::handle_pcm_write(uint32_t address) m_io->write_byte((second ? A_NES_RAM_1 : A_NES_RAM_0) + dst + i, m_data_streams[type][src + i]); } else - { - logerror("ignored pcm ram writes src %x dst %x size %x type %02x\n", src, dst, size, type); - } + osd_printf_error("unhandled pcm ram writes src %x dst %x size %x type %02x\n", src, dst, size, type); + return 12; } TIMER_CALLBACK_MEMBER(vgmplay_device::stream_timer_expired) { - stream &s = m_streams[param]; + stream& s(m_streams[param]); - uint8_t data = m_data_streams[s.bank][s.offset + s.position]; + uint32_t offset = s.offset; + if (s.reverse) + offset += (s.length - s.position - 1) * s.step_size * s.byte_depth; + else + offset += s.position * s.step_size * s.byte_depth; - switch (s.type) + if (offset + s.byte_depth >= m_data_streams[s.bank].size()) { - case LED_OKIM6258: - m_io->write_byte(A_OKIM6258_0 + s.reg, data); - break; - - default: - logerror("unsupported stream to chip %02x\n", s.type); - break; + osd_printf_error("stream_timer_expired %02x: stream beyond end %u>=%u\n", param, offset, uint32_t(m_data_streams[s.bank].size())); + s.timer->enable(false); + } + else if (s.chip_type == LED_32X_PWM) + m_io16->write_word(A_32X_PWM + (s.reg << 1), ((m_data_streams[s.bank][offset + 1] & 0xf) << 8) | m_data_streams[s.bank][offset]); + else if (s.chip_type == LED_OKIM6258) + m_io->write_byte(A_OKIM6258_0 + s.reg, m_data_streams[s.bank][offset]); + else + { + osd_printf_error("stream_timer_expired %02x: unsupported stream to chip %02x\n", param, s.chip_type); + s.timer->enable(false); } - s.position += s.step_size; + s.position++; if (s.position >= s.length) - m_stream_timers[param]->adjust(attotime::never); + { + if (s.loop) + { + pulse_act_led(s.chip_type); + s.position = 0; + } + else + s.timer->enable(false); + } } void vgmplay_device::execute_run() @@ -967,11 +1064,26 @@ void vgmplay_device::execute_run() case 0x90: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff) + if (id == 0xff) + osd_printf_error("stream control invalid id\n"); + else { - m_streams[id].type = m_file->read_byte(m_pc + 2); - m_streams[id].port = m_file->read_byte(m_pc + 3); - m_streams[id].reg = m_file->read_byte(m_pc + 4); + stream& s(m_streams[id]); + + s.chip_type = act_led(m_file->read_byte(m_pc + 2)); + s.port = m_file->read_byte(m_pc + 3); + s.reg = m_file->read_byte(m_pc + 4); + + if (s.chip_type == LED_32X_PWM) + s.byte_depth = 2; + else + s.byte_depth = 1; + + if (s.timer->enabled()) + { + osd_printf_error("stream %02x control while playing\n", id); + s.timer->enable(false); + } } m_pc += 5; break; @@ -980,11 +1092,33 @@ void vgmplay_device::execute_run() case 0x91: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff) + if (id == 0xff) + osd_printf_error("stream data invalid id\n"); + else { - m_streams[id].bank = m_file->read_byte(m_pc + 2); - m_streams[id].step_size = m_file->read_byte(m_pc + 3); - m_streams[id].step_base = m_file->read_byte(m_pc + 4); + stream& s(m_streams[id]); + + s.bank = m_file->read_byte(m_pc + 2); + s.step_size = m_file->read_byte(m_pc + 3); + s.step_base = m_file->read_byte(m_pc + 4); + + if (s.step_size == 0) + { + osd_printf_error("stream %02x data invalid step size %d\n", id, s.step_size); + s.step_size = 1; + } + + if (s.step_base >= s.step_size) + { + osd_printf_error("stream %02x data step size %d invalid step base %d\n", id, s.step_size, s.step_base); + s.step_base %= s.step_size; + } + + if (s.timer->enabled()) + { + osd_printf_error("stream %02x data while playing\n", id); + s.timer->enable(false); + } } m_pc += 5; break; @@ -993,8 +1127,20 @@ void vgmplay_device::execute_run() case 0x92: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff) - m_streams[id].frequency = m_file->read_dword(m_pc + 2); + if (id == 0xff) + osd_printf_error("stream frequency invalid id\n"); + else + { + stream& s(m_streams[id]); + + s.frequency = m_file->read_dword(m_pc + 2); + + if (s.timer->enabled()) + { + osd_printf_error("stream %02x frequency %d while playing\n", id, s.frequency); + s.timer->enable(false); + } + } m_pc += 6; break; } @@ -1002,21 +1148,50 @@ void vgmplay_device::execute_run() case 0x93: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff) + if (id == 0xff) + osd_printf_error("stream start invalid id\n"); + else if (m_streams[id].chip_type >= LED_COUNT) + osd_printf_error("stream start %02x invalid chip type %02x\n", id, m_streams[id].chip_type); + else { - uint8_t flags = m_file->read_byte(m_pc + 3); - m_streams[id].length_mode = LengthMode(flags & 3); - m_streams[id].reverse = BIT(flags, 4); - m_streams[id].loop = BIT(flags, 7); - m_streams[id].offset = m_file->read_dword(m_pc + 2); - m_streams[id].length = m_file->read_dword(m_pc + 7); - m_streams[id].position = 0; - logerror("unsupported loop stream start\n"); - if (m_streams[id].loop) - logerror("unsupported loop mode\n"); - if (m_streams[id].reverse) - logerror("unsupported reverse mode\n"); - m_stream_timers[id]->adjust(attotime::zero, id, m_streams[id].frequency ? attotime::from_hz(m_streams[id].frequency) : attotime::never); + stream& s(m_streams[id]); + + pulse_act_led(s.chip_type); + + uint32_t offset = m_file->read_dword(m_pc + 2); + uint8_t flags = m_file->read_byte(m_pc + 6); + uint32_t length = m_file->read_dword(m_pc + 7); + + if (s.bank >= m_data_stream_blocks.size()) + osd_printf_error("stream start %02x invalid bank %u>=%u\n", id, s.bank, uint8_t(m_data_stream_blocks.size())); + else if (s.frequency == 0) + osd_printf_error("stream start %02x invalid frequency\n", id); + else + { + if (offset != 0xffffffff) + s.offset = offset + (s.step_base * s.byte_depth); + + s.reverse = BIT(flags, 4); + s.loop = BIT(flags, 7); + + switch (flags & 3) + { + case 0: + break; + case 1: + s.length = length; + break; + case 2: + s.length = (length * 1000) / s.frequency; + break; + case 3: + s.length = (m_data_streams[s.bank].size() - (s.offset - (s.step_base * s.byte_depth))) / (s.step_size * s.byte_depth); + break; + } + + s.position = 0; + s.timer->adjust(attotime::zero, id, attotime::from_hz(s.frequency)); + } } m_pc += 11; break; @@ -1025,11 +1200,12 @@ void vgmplay_device::execute_run() case 0x94: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff) - m_stream_timers[id]->adjust(attotime::never, 0); - else + if (id == 0xff) for (int i = 0; i < 0xff; i++) - m_stream_timers[i]->adjust(attotime::never, 0); + m_streams[id].timer->enable(false); + else + m_streams[id].timer->enable(false); + m_pc += 2; break; } @@ -1037,21 +1213,35 @@ void vgmplay_device::execute_run() case 0x95: { uint8_t id = m_file->read_byte(m_pc + 1); - if (id < 0xff && m_streams[id].type < 0xff && m_data_streams[m_streams[id].bank].size() != 0) + if (id == 0xff) + osd_printf_error("stream start short invalid id\n"); + else if (m_streams[id].chip_type >= LED_COUNT) + osd_printf_error("stream start short %02x invalid chip type %02x\n", id, m_streams[id].chip_type); + else { + stream& s(m_streams[id]); + + pulse_act_led(s.chip_type); + uint8_t block = m_file->read_word(m_pc + 2); uint8_t flags = m_file->read_byte(m_pc + 4); - m_streams[id].loop = BIT(flags, 0); - m_streams[id].reverse = BIT(flags, 4); - m_streams[id].offset = m_data_stream_blocks[m_streams[id].bank][block].start; - m_streams[id].length = m_data_stream_blocks[m_streams[id].bank][block].size; - m_streams[id].length_mode = LengthMode::Bytes; - m_streams[id].position = 0; - if (m_streams[id].loop) - logerror("unsupported loop mode\n"); - if (m_streams[id].reverse) - logerror("unsupported reverse mode\n"); - m_stream_timers[id]->adjust(attotime::zero, id, m_streams[id].frequency ? attotime::from_hz(m_streams[id].frequency) : attotime::never); + + if (s.bank >= m_data_stream_blocks.size()) + osd_printf_error("stream start short %02x invalid bank %u>=%u\n", id, s.bank, uint8_t(m_data_stream_blocks.size())); + else if (block >= m_data_stream_blocks[s.bank].size()) + osd_printf_error("stream start short %02x bank %u invalid block %u>=%u\n", id, s.bank, block, uint8_t(m_data_stream_blocks[s.bank].size())); + else if (s.frequency == 0) + osd_printf_error("stream start %02x invalid frequency\n", id); + else + { + s.loop = BIT(flags, 0); + s.reverse = BIT(flags, 4); + s.offset = m_data_stream_blocks[s.bank][block].start + (s.step_base * s.byte_depth); + s.length = m_data_stream_blocks[s.bank][block].size / (s.step_size * s.byte_depth); + + s.position = 0; + s.timer->adjust(attotime::zero, id, attotime::from_hz(s.frequency)); + } } m_pc += 5; break; @@ -1172,7 +1362,15 @@ void vgmplay_device::execute_run() { pulse_act_led(LED_32X_PWM); uint8_t offset = m_file->read_byte(m_pc + 1); - m_io16->write_word(A_32X_PWM + (offset >> 4), ((offset & 0xf) << 8) | m_file->read_byte(m_pc + 2)); + uint8_t data = m_file->read_byte(m_pc + 2); + + if ((offset & 0xf0) == 0 && data == 0) + { + osd_printf_error("HACK: enable 32x channels\n"); + data |= 6; + } + + m_io16->write_word(A_32X_PWM + ((offset & 0xf0) >> 3), ((offset & 0xf) << 8) | data); m_pc += 3; break; } @@ -1552,7 +1750,7 @@ void vgmplay_device::execute_run() } default: - logerror("unhandled code %02x (%02x %02x %02x %02x)\n", code, m_file->read_byte(m_pc + 1), m_file->read_byte(m_pc + 2), m_file->read_byte(m_pc + 3), m_file->read_byte(m_pc + 4)); + osd_printf_error("unhandled code %02x (%02x %02x %02x %02x)\n", code, m_file->read_byte(m_pc + 1), m_file->read_byte(m_pc + 2), m_file->read_byte(m_pc + 3), m_file->read_byte(m_pc + 4)); if (machine().debug_flags & DEBUG_FLAG_ENABLED) debugger_instruction_hook(m_pc); @@ -1841,7 +2039,7 @@ offs_t vgmplay_disassembler::disassemble(std::ostream &stream, offs_t pc, const return 2 | SUPPORTED; case 0x95: - util::stream_format(stream, "stream start (fast) %02x %02x %02x %02x\n", opcodes.r8(pc + 1), opcodes.r8(pc + 2), opcodes.r8(pc + 3), opcodes.r8(pc + 4)); + util::stream_format(stream, "stream start short %02x %02x %02x %02x\n", opcodes.r8(pc + 1), opcodes.r8(pc + 2), opcodes.r8(pc + 3), opcodes.r8(pc + 4)); return 5 | SUPPORTED; case 0xa0: @@ -2354,8 +2552,10 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) if (r32(0x0c) & 0x80000000) logerror("Warning: file requests an unsupported T6W28"); - m_ym2413[0]->set_unscaled_clock(r32(0x10) & ~0x40000000); - m_ym2413[1]->set_unscaled_clock((r32(0x10) & 0x40000000) ? r32(0x10) & ~0x40000000 : 0); + m_ym2413[0]->set_unscaled_clock(r32(0x10) & ~0xc0000000); + m_ym2413[1]->set_unscaled_clock((r32(0x10) & 0x40000000) ? r32(0x10) & ~0xc0000000 : 0); + if (version >= 0x110 && (r32(0x2c) & 0x80000000)) + logerror("Warning: file requests an unsupported VRC7\n"); m_ym2612[0]->set_unscaled_clock((version >= 0x110 ? r32(0x2c) : r32(0x10)) & ~0xc0000000); m_ym2612[1]->set_unscaled_clock(((version >= 0x110 ? r32(0x2c) : r32(0x10)) & 0x40000000) ? (version >= 0x110 ? r32(0x2c) : r32(0x10)) & ~0xc0000000 : 0); @@ -2399,7 +2599,9 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) m_ymz280b[0]->set_unscaled_clock(version >= 0x151 && header_size >= 0x6c ? r32(0x68) & ~0x40000000 : 0); m_ymz280b[1]->set_unscaled_clock(version >= 0x151 && header_size >= 0x6c && r32(0x68) & 0x40000000 ? r32(0x68) & ~0x40000000 : 0); - m_rf5c164->set_unscaled_clock(version >= 0x151 && header_size >= 0x70 ? r32(0x6c) : 0); + m_rf5c164->set_unscaled_clock(version >= 0x151 && header_size >= 0x70 ? r32(0x6c) & ~0x80000000 : 0); + if (version >= 0x151 && header_size >= 0x70 && (r32(0x6c) & 0x80000000)) + logerror("Warning: file requests an unsupported Cosmic Fantasy Stories HACK\n"); m_sega32x->set_unscaled_clock(version >= 0x151 && header_size >= 0x74 && r32(0x70) ? r32(0x70) : 0); @@ -2468,6 +2670,7 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) // HACK: Some VGMs contain 48,000 instead of 18,432,000 if (version >= 0x161 && header_size >= 0xa4 && (r32(0xa0) & ~0x40000000) == 48000) { + osd_printf_error("HACK: incorrect k054539 clock\n"); m_k054539[0]->set_clock_scale(384); m_k054539[1]->set_clock_scale(384); } @@ -2493,7 +2696,10 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) // HACK: VGMs contain 4,000,000 instead of 60,000,000 if (version >= 0x161 && header_size >= 0xb8 && r32(0xb4) == 4000000) + { + osd_printf_error("HACK: incorrect qsound clock\n"); m_qsound->set_clock_scale(15); + } m_qsound->set_unscaled_clock(version >= 0x161 && header_size >= 0xb8 ? r32(0xb4) : 0); m_scsp[0]->set_unscaled_clock(version >= 0x161 && header_size >= 0xbc ? r32(0xb8) & ~0x40000000 : 0); @@ -2531,8 +2737,10 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) m_x1_010[0]->set_unscaled_clock(version >= 0x171 && header_size >= 0xdc ? r32(0xd8) & ~0x40000000 : 0); m_x1_010[1]->set_unscaled_clock(version >= 0x171 && header_size >= 0xdc && (r32(0xd8) & 0x40000000) ? r32(0xd8) & ~0x40000000 : 0); - m_c352[0]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe0 ? r32(0xdc) & ~0x40000000 : 0); - m_c352[1]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe0 && (r32(0xdc) & 0x40000000) ? r32(0xdc) & ~0x40000000 : 0); + m_c352[0]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe0 ? r32(0xdc) & ~0xc0000000 : 0); + m_c352[1]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe0 && (r32(0xdc) & 0x40000000) ? r32(0xdc) & ~0xc0000000 : 0); + if (version >= 0x171 && header_size >= 0xe0 && r32(0xdc) & 0x80000000) + logerror("Warning: file requests an unsupported disable rear speakers\n"); m_ga20[0]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe4 ? r32(0xe0) & ~0x40000000 : 0); m_ga20[1]->set_unscaled_clock(version >= 0x171 && header_size >= 0xe4 && (r32(0xe0) & 0x40000000) ? r32(0xe0) & ~0x40000000 : 0); @@ -2618,7 +2826,7 @@ template WRITE_LINE_MEMBER(vgmplay_state::upd7759_drq_w) { if (m_upd7759_drq[Chip] && !state) - logerror("upd7759.%d underflow\n", Chip); + osd_printf_error("upd7759.%d underflow\n", Chip); m_upd7759_drq[Chip] = state; diff --git a/src/mame/layout/vgmplay.lay b/src/mame/layout/vgmplay.lay index d79b1a07916..8148b12cb83 100644 --- a/src/mame/layout/vgmplay.lay +++ b/src/mame/layout/vgmplay.lay @@ -69,7 +69,7 @@ - + -- cgit v1.2.3