diff options
author | Aaron Giles <aaron@aarongiles.com> | 2021-06-01 09:54:44 -0700 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2021-06-01 09:54:44 -0700 |
commit | 973373e712369e52e30bed4a590f9c00a10952f5 (patch) | |
tree | 6c4d85a013e2071bfebe175b860b6494d35cb12a | |
parent | f7fe9d2fd8cfd971c5a46bfedce6079fb092472d (diff) |
ymfm: Sync with upstream:
* Fix panning calculations in OPL4 (YMF278B)
* Make OPQ reverb less ridiculous
-rw-r--r-- | 3rdparty/ymfm/buildall.cpp | 114 | ||||
-rw-r--r-- | 3rdparty/ymfm/examples/vgmrender/vgmrender.cpp | 7 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_misc.cpp | 175 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_misc.h | 94 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_opn.cpp | 154 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_opn.h | 53 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_opq.cpp | 2 | ||||
-rw-r--r-- | 3rdparty/ymfm/src/ymfm_pcm.cpp | 6 | ||||
-rw-r--r-- | scripts/src/3rdparty.lua | 2 | ||||
-rw-r--r-- | src/devices/sound/ymopl.h | 6 | ||||
-rw-r--r-- | src/devices/sound/ymopz.h | 6 |
11 files changed, 399 insertions, 220 deletions
diff --git a/3rdparty/ymfm/buildall.cpp b/3rdparty/ymfm/buildall.cpp new file mode 100644 index 00000000000..40bd75e2864 --- /dev/null +++ b/3rdparty/ymfm/buildall.cpp @@ -0,0 +1,114 @@ +// +// Simple program that touches all the existing cores to help ensure +// that everything builds cleanly. +// +// Compile with: +// +// g++ --std=c++14 -I../../src buildall.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_opq.cpp ../../src/ymfm_opz.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o buildall.exe +// +// or: +// +// clang --std=c++14 -I../../src buildall.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_opq.cpp ../../src/ymfm_opz.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o buildall.exe +// +// or: +// +// cl -I..\..\src buildall.cpp ..\..\src\ymfm_misc.cpp ..\..\src\ymfm_opl.cpp ..\..\src\ymfm_opm.cpp ..\..\src\ymfm_opn.cpp ..\..\src\ymfm_opq.cpp ..\..\src\ymfm_opz.cpp ..\..\src\ymfm_adpcm.cpp ..\..\src\ymfm_pcm.cpp ..\..\src\ymfm_ssg.cpp /Od /Zi /std:c++14 /EHsc +// + +#include <vector> + +#include "ymfm_misc.h" +#include "ymfm_opl.h" +#include "ymfm_opm.h" +#include "ymfm_opn.h" +#include "ymfm_opq.h" +#include "ymfm_opz.h" + + +//------------------------------------------------- +// main - program entry point +//------------------------------------------------- + +template<typename ChipType> +class chip_wrapper : public ymfm::ymfm_interface +{ +public: + chip_wrapper() : + m_chip(*this) + { + // reset + m_chip.reset(); + + // save/restore + std::vector<uint8_t> buffer; + { + ymfm::ymfm_saved_state saver(buffer, true); + m_chip.save_restore(saver); + } + { + ymfm::ymfm_saved_state restorer(buffer, false); + m_chip.save_restore(restorer); + } + + // dummy read/write + m_chip.read(0); + m_chip.write(0, 0); + + // generate + typename ChipType::output_data output[20]; + m_chip.generate(&output[0], ymfm::array_size(output)); + } + +private: + ChipType m_chip; +}; + + +//------------------------------------------------- +// main - program entry point +//------------------------------------------------- + +int main(int argc, char *argv[]) +{ + // just keep adding chip variants here as they are implemented + + // ymfm_misc.h: + chip_wrapper<ymfm::ym2149> test2149; + + // ymfm_opl.h: + chip_wrapper<ymfm::ym3526> test3526; + chip_wrapper<ymfm::y8950> test8950; + chip_wrapper<ymfm::ym3812> test3812; + chip_wrapper<ymfm::ymf262> test262; + chip_wrapper<ymfm::ymf289b> test289b; + chip_wrapper<ymfm::ymf278b> test278b; + chip_wrapper<ymfm::ym2413> test2413; + chip_wrapper<ymfm::ym2423> test2423; + chip_wrapper<ymfm::ymf281> test281; + chip_wrapper<ymfm::ds1001> test1001; + + // ymfm_opm.h: + chip_wrapper<ymfm::ym2151> test2151; + chip_wrapper<ymfm::ym2164> test2164; + + // ymfm_opn.h: + chip_wrapper<ymfm::ym2203> test2203; + chip_wrapper<ymfm::ym2608> test2608; + chip_wrapper<ymfm::ymf288> test288; + chip_wrapper<ymfm::ym2610> test2610; + chip_wrapper<ymfm::ym2610b> test2610b; + chip_wrapper<ymfm::ym2612> test2612; + chip_wrapper<ymfm::ym3438> test3438; + chip_wrapper<ymfm::ymf276> test276; + + // ymfm_opq.h: + chip_wrapper<ymfm::ym3806> test3806; + chip_wrapper<ymfm::ym3533> test3533; + + // ymfm_opz.h: + chip_wrapper<ymfm::ym2414> test2414; + + printf("Done\n"); + + return 0; +} diff --git a/3rdparty/ymfm/examples/vgmrender/vgmrender.cpp b/3rdparty/ymfm/examples/vgmrender/vgmrender.cpp index 7f99c5abb8d..fd99d432ae4 100644 --- a/3rdparty/ymfm/examples/vgmrender/vgmrender.cpp +++ b/3rdparty/ymfm/examples/vgmrender/vgmrender.cpp @@ -5,15 +5,15 @@ // // Compile with: // -// g++ --std=c++14 -I../../src vgmrender.cpp em_inflate.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o vgmrender.exe +// g++ --std=c++14 -I../../src vgmrender.cpp em_inflate.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o vgmrender.exe // // or: // -// clang --std=c++14 -I../../src vgmrender.cpp em_inflate.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o vgmrender.exe +// clang --std=c++14 -I../../src vgmrender.cpp em_inflate.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o vgmrender.exe // // or: // -// cl -I..\..\src vgmrender.cpp em_inflate.cpp ..\..\src\ymfm_opl.cpp ..\..\src\ymfm_opm.cpp ..\..\src\ymfm_opn.cpp ..\..\src\ymfm_adpcm.cpp ..\..\src\ymfm_pcm.cpp ..\..\src\ymfm_ssg.cpp /Od /Zi /std:c++14 /EHsc +// cl -I..\..\src vgmrender.cpp em_inflate.cpp ..\..\src\ymfm_misc.cpp ..\..\src\ymfm_opl.cpp ..\..\src\ymfm_opm.cpp ..\..\src\ymfm_opn.cpp ..\..\src\ymfm_adpcm.cpp ..\..\src\ymfm_pcm.cpp ..\..\src\ymfm_ssg.cpp /Od /Zi /std:c++14 /EHsc // #define _CRT_SECURE_NO_WARNINGS @@ -26,6 +26,7 @@ #include <string> #include "em_inflate.h" +#include "ymfm_misc.h" #include "ymfm_opl.h" #include "ymfm_opm.h" #include "ymfm_opn.h" diff --git a/3rdparty/ymfm/src/ymfm_misc.cpp b/3rdparty/ymfm/src/ymfm_misc.cpp new file mode 100644 index 00000000000..fd0575f55fb --- /dev/null +++ b/3rdparty/ymfm/src/ymfm_misc.cpp @@ -0,0 +1,175 @@ +// BSD 3-Clause License +// +// Copyright (c) 2021, Aaron Giles +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "ymfm_misc.h" + +namespace ymfm +{ + +//********************************************************* +// YM2149 +//********************************************************* + +//------------------------------------------------- +// ym2149 - constructor +//------------------------------------------------- + +ym2149::ym2149(ymfm_interface &intf) : + m_address(0), + m_ssg(intf) +{ +} + + +//------------------------------------------------- +// reset - reset the system +//------------------------------------------------- + +void ym2149::reset() +{ + // reset the engines + m_ssg.reset(); +} + + +//------------------------------------------------- +// save_restore - save or restore the data +//------------------------------------------------- + +void ym2149::save_restore(ymfm_saved_state &state) +{ + state.save_restore(m_address); + m_ssg.save_restore(state); +} + + +//------------------------------------------------- +// read_data - read the data register +//------------------------------------------------- + +uint8_t ym2149::read_data() +{ + return m_ssg.read(m_address & 0x0f); +} + + +//------------------------------------------------- +// read - handle a read from the device +//------------------------------------------------- + +uint8_t ym2149::read(uint32_t offset) +{ + uint8_t result = 0xff; + switch (offset & 3) // BC2,BC1 + { + case 0: // inactive + break; + + case 1: // address + break; + + case 2: // inactive + break; + + case 3: // read + result = read_data(); + break; + } + return result; +} + + +//------------------------------------------------- +// write_address - handle a write to the address +// register +//------------------------------------------------- + +void ym2149::write_address(uint8_t data) +{ + // just set the address + m_address = data; +} + + +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- + +void ym2149::write_data(uint8_t data) +{ + m_ssg.write(m_address & 0x0f, data); +} + + +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- + +void ym2149::write(uint32_t offset, uint8_t data) +{ + switch (offset & 3) // BC2,BC1 + { + case 0: // address + write_address(data); + break; + + case 1: // inactive + break; + + case 2: // write + write_data(data); + break; + + case 3: // address + write_address(data); + break; + } +} + + +//------------------------------------------------- +// generate - generate samples of SSG sound +//------------------------------------------------- + +void ym2149::generate(output_data *output, uint32_t numsamples) +{ + for (uint32_t samp = 0; samp < numsamples; samp++, output++) + { + // clock the SSG + m_ssg.clock(); + + // YM2149 keeps the three SSG outputs independent + m_ssg.output(*output); + } +} + +} diff --git a/3rdparty/ymfm/src/ymfm_misc.h b/3rdparty/ymfm/src/ymfm_misc.h new file mode 100644 index 00000000000..0c3e2fa2310 --- /dev/null +++ b/3rdparty/ymfm/src/ymfm_misc.h @@ -0,0 +1,94 @@ +// BSD 3-Clause License +// +// Copyright (c) 2021, Aaron Giles +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef YMFM_MISC_H +#define YMFM_MISC_H + +#pragma once + +#include "ymfm.h" +#include "ymfm_adpcm.h" +#include "ymfm_ssg.h" + +namespace ymfm +{ + +//********************************************************* +// SSG IMPLEMENTATION CLASSES +//********************************************************* + +// ======================> ym2149 + +// ym2149 is just an SSG with no FM part, but we expose FM-like parts so that it +// integrates smoothly with everything else; they just don't do anything +class ym2149 +{ +public: + static constexpr uint32_t OUTPUTS = ssg_engine::OUTPUTS; + static constexpr uint32_t SSG_OUTPUTS = ssg_engine::OUTPUTS; + using output_data = ymfm_output<OUTPUTS>; + + // constructor + ym2149(ymfm_interface &intf); + + // configuration + void ssg_override(ssg_override &intf) { m_ssg.override(intf); } + + // reset + void reset(); + + // save/restore + void save_restore(ymfm_saved_state &state); + + // pass-through helpers + uint32_t sample_rate(uint32_t input_clock) const { return input_clock / ssg_engine::CLOCK_DIVIDER / 8; } + + // read access + uint8_t read_data(); + uint8_t read(uint32_t offset); + + // write access + void write_address(uint8_t data); + void write_data(uint8_t data); + void write(uint32_t offset, uint8_t data); + + // generate one sample of sound + void generate(output_data *output, uint32_t numsamples = 1); + +protected: + // internal state + uint8_t m_address; // address register + ssg_engine m_ssg; // SSG engine +}; + +} + + +#endif // YMFM_MISC_H diff --git a/3rdparty/ymfm/src/ymfm_opn.cpp b/3rdparty/ymfm/src/ymfm_opn.cpp index ed410a119ba..f4b88a09584 100644 --- a/3rdparty/ymfm/src/ymfm_opn.cpp +++ b/3rdparty/ymfm/src/ymfm_opn.cpp @@ -671,160 +671,6 @@ void ssg_resampler<OutputType, FirstOutput, MixTo1>::resample_nop(OutputType *ou //********************************************************* -// YM2149 -//********************************************************* - -//------------------------------------------------- -// ym2149 - constructor -//------------------------------------------------- - -ym2149::ym2149(ymfm_interface &intf) : - m_address(0), - m_ssg(intf) -{ -} - - -//------------------------------------------------- -// reset - reset the system -//------------------------------------------------- - -void ym2149::reset() -{ - // reset the engines - m_ssg.reset(); -} - - -//------------------------------------------------- -// save_restore - save or restore the data -//------------------------------------------------- - -void ym2149::save_restore(ymfm_saved_state &state) -{ - state.save_restore(m_address); - m_ssg.save_restore(state); -} - - -//------------------------------------------------- -// read_data - read the data register -//------------------------------------------------- - -uint8_t ym2149::read_data() -{ - return m_ssg.read(m_address & 0x0f); -} - - -//------------------------------------------------- -// read - handle a read from the device -//------------------------------------------------- - -uint8_t ym2149::read(uint32_t offset) -{ - uint8_t result = 0xff; - switch (offset & 3) // BC2,BC1 - { - case 0: // inactive - break; - - case 1: // address - break; - - case 2: // inactive - break; - - case 3: // read - result = read_data(); - break; - } - return result; -} - - -//------------------------------------------------- -// write_address - handle a write to the address -// register -//------------------------------------------------- - -void ym2149::write_address(uint8_t data) -{ - // just set the address - m_address = data; -} - - -//------------------------------------------------- -// write - handle a write to the register -// interface -//------------------------------------------------- - -void ym2149::write_data(uint8_t data) -{ - m_ssg.write(m_address & 0x0f, data); -} - - -//------------------------------------------------- -// write - handle a write to the register -// interface -//------------------------------------------------- - -void ym2149::write(uint32_t offset, uint8_t data) -{ - switch (offset & 3) // BC2,BC1 - { - case 0: // address - write_address(data); - break; - - case 1: // inactive - break; - - case 2: // write - write_data(data); - break; - - case 3: // address - write_address(data); - break; - } -} - - -//------------------------------------------------- -// generate - generate one sample of FM sound -//------------------------------------------------- - -void ym2149::generate(output_data *output, uint32_t numsamples) -{ - // no FM output, just clear - for (uint32_t samp = 0; samp < numsamples; samp++, output++) - output->clear(); -} - - -//------------------------------------------------- -// generate_ssg - generate one sample of SSG -// sound -//------------------------------------------------- - -void ym2149::generate_ssg(output_data_ssg *output, uint32_t numsamples) -{ - for (uint32_t samp = 0; samp < numsamples; samp++, output++) - { - // clock the SSG - m_ssg.clock(); - - // YM2149 keeps the three SSG outputs independent - m_ssg.output(*output); - } -} - - - -//********************************************************* // YM2203 //********************************************************* diff --git a/3rdparty/ymfm/src/ymfm_opn.h b/3rdparty/ymfm/src/ymfm_opn.h index 31fd895ee7b..5fb3497b278 100644 --- a/3rdparty/ymfm/src/ymfm_opn.h +++ b/3rdparty/ymfm/src/ymfm_opn.h @@ -257,59 +257,6 @@ using opna_registers = opn_registers_base<true>; //********************************************************* -// SSG IMPLEMENTATION CLASSES -//********************************************************* - -// ======================> ym2149 - -// ym2149 is just an SSG with no FM part, but we expose FM-like parts so that it -// integrates smoothly with everything else; they just don't do anything -class ym2149 -{ -public: - static constexpr uint32_t OUTPUTS = ssg_engine::OUTPUTS; - static constexpr uint32_t SSG_OUTPUTS = ssg_engine::OUTPUTS; - using output_data = ymfm_output<OUTPUTS>; - using output_data_ssg = ymfm_output<SSG_OUTPUTS>; - - // constructor - ym2149(ymfm_interface &intf); - - // configuration - void ssg_override(ssg_override &intf) { m_ssg.override(intf); } - - // reset - void reset(); - - // save/restore - void save_restore(ymfm_saved_state &state); - - // pass-through helpers - uint32_t sample_rate(uint32_t input_clock) const { return input_clock / ssg_engine::CLOCK_DIVIDER / 8; } - uint32_t sample_rate_ssg(uint32_t input_clock) const { return input_clock / ssg_engine::CLOCK_DIVIDER; } - - // read access - uint8_t read_data(); - uint8_t read(uint32_t offset); - - // write access - void write_address(uint8_t data); - void write_data(uint8_t data); - void write(uint32_t offset, uint8_t data); - - // generate one sample of sound - void generate(output_data *output, uint32_t numsamples = 1); - void generate_ssg(output_data_ssg *output, uint32_t numsamples = 1); - -protected: - // internal state - uint8_t m_address; // address register - ssg_engine m_ssg; // SSG engine -}; - - - -//********************************************************* // OPN IMPLEMENTATION CLASSES //********************************************************* diff --git a/3rdparty/ymfm/src/ymfm_opq.cpp b/3rdparty/ymfm/src/ymfm_opq.cpp index 493fae26592..59e99db0a81 100644 --- a/3rdparty/ymfm/src/ymfm_opq.cpp +++ b/3rdparty/ymfm/src/ymfm_opq.cpp @@ -284,7 +284,7 @@ void opq_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata cache.eg_rate[EG_DECAY] = effective_rate(op_decay_rate(opoffs) * 2, ksrval); cache.eg_rate[EG_SUSTAIN] = effective_rate(op_sustain_rate(opoffs) * 2, ksrval); cache.eg_rate[EG_RELEASE] = effective_rate(op_release_rate(opoffs) * 4 + 2, ksrval); - cache.eg_rate[EG_REVERB] = (ch_reverb(choffs) != 0) ? 5 : cache.eg_rate[EG_RELEASE]; + cache.eg_rate[EG_REVERB] = (ch_reverb(choffs) != 0) ? 5*4 : cache.eg_rate[EG_RELEASE]; cache.eg_shift = 0; } diff --git a/3rdparty/ymfm/src/ymfm_pcm.cpp b/3rdparty/ymfm/src/ymfm_pcm.cpp index c8c3e2b5218..3acd59e2a4d 100644 --- a/3rdparty/ymfm/src/ymfm_pcm.cpp +++ b/3rdparty/ymfm/src/ymfm_pcm.cpp @@ -81,16 +81,16 @@ void pcm_registers::cache_channel_data(uint32_t choffs, pcm_cache &cache) int32_t panpot = int8_t(ch_panpot(choffs) << 4) >> 4; if (panpot >= 0) { - cache.pan_left = (panpot == 7) ? 96 : 3 * panpot; + cache.pan_left = (panpot == 7) ? 0x3ff : 0x20 * panpot; cache.pan_right = 0; } else if (panpot >= -7) { cache.pan_left = 0; - cache.pan_right = (panpot == -7) ? 96 : -3 * panpot; + cache.pan_right = (panpot == -7) ? 0x3ff : -0x20 * panpot; } else - cache.pan_left = cache.pan_right = 96; + cache.pan_left = cache.pan_right = 0x3ff; // determine the LFO stepping value; this how much to add to a running // x.18 value for the LFO; steps were derived from frequencies in the diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 6da826ea0d5..f7aa6280533 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -2273,6 +2273,8 @@ project "ymfm" MAME_DIR .. "3rdparty/ymfm/src/ymfm_adpcm.h", MAME_DIR .. "3rdparty/ymfm/src/ymfm_fm.h", MAME_DIR .. "3rdparty/ymfm/src/ymfm_fm.ipp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_misc.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_misc.h", MAME_DIR .. "3rdparty/ymfm/src/ymfm_opl.cpp", MAME_DIR .. "3rdparty/ymfm/src/ymfm_opl.h", MAME_DIR .. "3rdparty/ymfm/src/ymfm_opm.cpp", diff --git a/src/devices/sound/ymopl.h b/src/devices/sound/ymopl.h index 4ec8f605023..07ae7ead5cb 100644 --- a/src/devices/sound/ymopl.h +++ b/src/devices/sound/ymopl.h @@ -1,8 +1,8 @@ // license:BSD-3-Clause // copyright-holders:Aaron Giles -#ifndef MAME_SOUND_YM3526_H -#define MAME_SOUND_YM3526_H +#ifndef MAME_SOUND_YMOPL_H +#define MAME_SOUND_YMOPL_H #pragma once @@ -205,4 +205,4 @@ protected: required_region_ptr<u8> m_internal; // internal memory region }; -#endif // MAME_SOUND_YM3526_H +#endif // MAME_SOUND_YMOPL_H diff --git a/src/devices/sound/ymopz.h b/src/devices/sound/ymopz.h index daa3b70c7b9..133da4160f4 100644 --- a/src/devices/sound/ymopz.h +++ b/src/devices/sound/ymopz.h @@ -1,8 +1,8 @@ // license:BSD-3-Clause // copyright-holders:Aaron Giles -#ifndef MAME_SOUND_YM2414_H -#define MAME_SOUND_YM2414_H +#ifndef MAME_SOUND_YMOPZ_H +#define MAME_SOUND_YMOPZ_H #pragma once @@ -26,4 +26,4 @@ public: auto port_write_handler() { return io_write_handler(); } }; -#endif // MAME_SOUND_YM2414_H +#endif // MAME_SOUND_YMOPZ_H |