diff options
Diffstat (limited to 'src/mame/audio/tx1.cpp')
-rw-r--r-- | src/mame/audio/tx1.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mame/audio/tx1.cpp b/src/mame/audio/tx1.cpp index 9a2ce9ff73c..b67bfcf42b5 100644 --- a/src/mame/audio/tx1.cpp +++ b/src/mame/audio/tx1.cpp @@ -7,7 +7,7 @@ ***************************************************************************/ #include "emu.h" -#include "includes/tx1.h" +#include "tx1.h" #include "sound/ay8910.h" #include "video/resnet.h" @@ -21,7 +21,7 @@ /* RC oscillator: 1785Hz */ #define TX1_NOISE_CLOCK (1/(1000.0e-12 * 560000.0)) -#define TX1_PIT_CLOCK (TX1_PIXEL_CLOCK / 16) +#define TX1_PIT_CLOCK (clock() / 16) #define TX1_FRAC 30 #define TX1_SHUNT (250.0) @@ -52,10 +52,10 @@ static const double tx1_engine_gains[16] = }; -DEFINE_DEVICE_TYPE(TX1, tx1_sound_device, "tx1_sound", "TX-1 Custom Sound") +DEFINE_DEVICE_TYPE(TX1_SOUND, tx1_sound_device, "tx1_sound", "TX-1 Custom Sound") tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : tx1_sound_device(mconfig, TX1, tag, owner, clock) + : tx1_sound_device(mconfig, TX1_SOUND, tag, owner, clock) { } @@ -253,9 +253,9 @@ void tx1_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t memset(outputs[1], 0, samples * sizeof(*outputs[1])); /* 8253 outputs for the player/opponent engine sounds. */ - step_0 = m_pit8253.counts[0].val ? (TX1_PIT_CLOCK / m_pit8253.counts[0].val * m_freq_to_step).value() : 0; - step_1 = m_pit8253.counts[1].val ? (TX1_PIT_CLOCK / m_pit8253.counts[1].val * m_freq_to_step).value() : 0; - step_2 = m_pit8253.counts[2].val ? (TX1_PIT_CLOCK / m_pit8253.counts[2].val * m_freq_to_step).value() : 0; + step_0 = m_pit8253.counts[0].val ? (TX1_PIT_CLOCK / m_pit8253.counts[0].val * m_freq_to_step) : 0; + step_1 = m_pit8253.counts[1].val ? (TX1_PIT_CLOCK / m_pit8253.counts[1].val * m_freq_to_step) : 0; + step_2 = m_pit8253.counts[2].val ? (TX1_PIT_CLOCK / m_pit8253.counts[2].val * m_freq_to_step) : 0; //gain_0 = tx1_engine_gains[m_ay_outputa & 0xf]; //gain_1 = tx1_engine_gains[m_ay_outputa >> 4]; @@ -301,7 +301,7 @@ void tx1_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t * *************************************/ -#define BUGGYBOY_PIT_CLOCK (BUGGYBOY_ZCLK / 8) +#define BUGGYBOY_PIT_CLOCK (clock() / 8) #define BUGGYBOY_NOISE_CLOCK (BUGGYBOY_PIT_CLOCK / 4) #define BUGGYBOY_R1 47000.0 @@ -335,10 +335,10 @@ static const double bb_engine_gains[16] = -1.0/(1.0/(BUGGYBOY_R1S + BUGGYBOY_R2S + BUGGYBOY_R3S + BUGGYBOY_R4S) + 1.0/100e3)/100e3, }; -DEFINE_DEVICE_TYPE(BUGGYBOY, buggyboy_sound_device, "buggyboy_sound", "Buggy Boy Custom Sound") +DEFINE_DEVICE_TYPE(BUGGYBOY_SOUND, buggyboy_sound_device, "buggyboy_sound", "Buggy Boy Custom Sound") buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : tx1_sound_device(mconfig, BUGGYBOY, tag, owner, clock) + : tx1_sound_device(mconfig, BUGGYBOY_SOUND, tag, owner, clock) { } @@ -492,8 +492,8 @@ void buggyboy_sound_device::sound_stream_update(sound_stream &stream, stream_sam memset(outputs[1], 0, samples * sizeof(*outputs[1])); /* 8253 outputs for the player/opponent buggy engine sounds. */ - step_0 = m_pit8253.counts[0].val ? (BUGGYBOY_PIT_CLOCK / m_pit8253.counts[0].val * m_freq_to_step).value() : 0; - step_1 = m_pit8253.counts[1].val ? (BUGGYBOY_PIT_CLOCK / m_pit8253.counts[1].val * m_freq_to_step).value() : 0; + step_0 = m_pit8253.counts[0].val ? (BUGGYBOY_PIT_CLOCK / m_pit8253.counts[0].val * m_freq_to_step) : 0; + step_1 = m_pit8253.counts[1].val ? (BUGGYBOY_PIT_CLOCK / m_pit8253.counts[1].val * m_freq_to_step) : 0; if (!strcmp(machine().system().name, "buggyboyjr")) gain0 = BIT(m_ym2_outputb, 3) ? 1.0 : 2.0; @@ -514,7 +514,7 @@ void buggyboy_sound_device::sound_stream_update(sound_stream &stream, stream_sam pit1 = m_eng_voltages[(m_step1 >> 24) & 0xf]; /* Calculate the tyre screech noise source */ - for (i = 0; i < BUGGYBOY_NOISE_CLOCK.value() / machine().sample_rate(); ++i) + for (i = 0; i < BUGGYBOY_NOISE_CLOCK / machine().sample_rate(); ++i) { /* CD4006 is a 4-4-1-4-4-1 shift register */ int p13 = BIT(m_noise_lfsra, 3); |