mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
ymf278b: Eliminate clock macro (nw)
This commit is contained in:
parent
9ccb40c9b5
commit
fe45060a33
@ -42,7 +42,7 @@ void msx_cart_moonsound_device::device_add_mconfig(machine_config &config)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
YMF278B(config, m_ymf278b, YMF278B_STD_CLOCK);
|
||||
YMF278B(config, m_ymf278b, 33.8688_MHz_XTAL);
|
||||
m_ymf278b->set_addrmap(0, &msx_cart_moonsound_device::ymf278b_map);
|
||||
m_ymf278b->irq_handler().set(FUNC(msx_cart_moonsound_device::irq_w));
|
||||
m_ymf278b->add_route(0, "lspeaker", 0.50);
|
||||
|
@ -511,9 +511,7 @@ void ymf278b_device::C_w(uint8_t reg, uint8_t data)
|
||||
|
||||
// status register LD bit is on for approx 300us
|
||||
m_status_ld = 1;
|
||||
period = attotime::from_usec(300);
|
||||
if (m_clock != YMF278B_STD_CLOCK)
|
||||
period = (period * m_clock) / YMF278B_STD_CLOCK;
|
||||
period = clocks_to_attotime(10);
|
||||
m_timer_ld->adjust(period);
|
||||
|
||||
// retrigger if key is on
|
||||
|
@ -6,8 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#define YMF278B_STD_CLOCK (33868800) /* standard clock for OPL4 */
|
||||
|
||||
class ymf278b_device : public device_t, public device_sound_interface, public device_rom_interface
|
||||
{
|
||||
public:
|
||||
|
@ -553,7 +553,7 @@ void fuuki32_state::fuuki32(machine_config &config)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", YMF278B_STD_CLOCK)); // 33.8688MHz
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", 33.8688_MHz_XTAL));
|
||||
ymf.irq_handler().set_inputline("soundcpu", 0);
|
||||
ymf.add_route(0, "lspeaker", 0.50);
|
||||
ymf.add_route(1, "rspeaker", 0.50);
|
||||
|
@ -3101,7 +3101,7 @@ void metro_state::msgogo(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", YMF278B_STD_CLOCK));
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", 33.8688_MHz_XTAL));
|
||||
ymf.set_addrmap(0, &metro_state::ymf278_map);
|
||||
ymf.irq_handler().set_inputline("maincpu", 2);
|
||||
ymf.add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
@ -1179,7 +1179,7 @@ void psikyo_state::s1945(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", YMF278B_STD_CLOCK));
|
||||
ymf278b_device &ymf(YMF278B(config, "ymf", 33.8688_MHz_XTAL));
|
||||
ymf.irq_handler().set_inputline("audiocpu", 0);
|
||||
ymf.add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user