mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
redbaron: change nosedive sound to noteslide down instead of noteslide up
This commit is contained in:
parent
1583c99b47
commit
f74f96410f
@ -2,7 +2,7 @@
|
|||||||
// copyright-holders:Miodrag Milanovic
|
// copyright-holders:Miodrag Milanovic
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* scmp.c
|
* scmp.cpp
|
||||||
*
|
*
|
||||||
* National Semiconductor SC/MP CPU emulation
|
* National Semiconductor SC/MP CPU emulation
|
||||||
* (SC/MP = Simple-to-use, Cost-effective MicroProcessor)
|
* (SC/MP = Simple-to-use, Cost-effective MicroProcessor)
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
Atari Red Baron sound hardware
|
Atari Red Baron sound hardware
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
- convert to netlist
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -18,7 +21,6 @@
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "redbaron.h"
|
#include "redbaron.h"
|
||||||
#include "sound/pokey.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -159,7 +161,7 @@ void redbaron_sound_device::sound_stream_update(sound_stream &stream, std::vecto
|
|||||||
/* discharge C32 (0.1u) through R26 (33k) + R27 (15k)
|
/* discharge C32 (0.1u) through R26 (33k) + R27 (15k)
|
||||||
* 0.68 * C32 * (R26 + R27) = 3264us
|
* 0.68 * C32 * (R26 + R27) = 3264us
|
||||||
*/
|
*/
|
||||||
// constexpr int C32_DISCHARGE_TIME = int(32767 / 0.003264);
|
//constexpr int C32_DISCHARGE_TIME = int(32767 / 0.003264);
|
||||||
/* I think this is to short. Is C32 really 1u? */
|
/* I think this is to short. Is C32 really 1u? */
|
||||||
constexpr int C32_DISCHARGE_TIME = int(32767 / 0.03264);
|
constexpr int C32_DISCHARGE_TIME = int(32767 / 0.03264);
|
||||||
m_shot_amp_counter -= C32_DISCHARGE_TIME;
|
m_shot_amp_counter -= C32_DISCHARGE_TIME;
|
||||||
@ -201,7 +203,7 @@ void redbaron_sound_device::sound_stream_update(sound_stream &stream, std::vecto
|
|||||||
* frequency = 1.44 / ((33k + 2*47k) * 0.01u) = 1134Hz
|
* frequency = 1.44 / ((33k + 2*47k) * 0.01u) = 1134Hz
|
||||||
* modulated by squeal_amp
|
* modulated by squeal_amp
|
||||||
*/
|
*/
|
||||||
m_squeal_off_counter -= (1134 + 1134 * m_squeal_amp / 32767) / 3;
|
m_squeal_off_counter -= 2268 - 1134 * m_squeal_amp / 32767;
|
||||||
while( m_squeal_off_counter <= 0 )
|
while( m_squeal_off_counter <= 0 )
|
||||||
{
|
{
|
||||||
m_squeal_off_counter += OUTPUT_RATE;
|
m_squeal_off_counter += OUTPUT_RATE;
|
||||||
@ -219,7 +221,7 @@ void redbaron_sound_device::sound_stream_update(sound_stream &stream, std::vecto
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mix sequal sound at 40% */
|
/* mix squeal sound at 40% */
|
||||||
if( m_squeal_out )
|
if( m_squeal_out )
|
||||||
sum += 32767 * 40 / 100;
|
sum += 32767 * 40 / 100;
|
||||||
|
|
||||||
@ -237,10 +239,3 @@ void redbaron_sound_device::sounds_w(uint8_t data)
|
|||||||
m_channel->update();
|
m_channel->update();
|
||||||
m_latch = data;
|
m_latch = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void redbaron_sound_device::pokey_w(offs_t offset, uint8_t data)
|
|
||||||
{
|
|
||||||
//if( m_latch & 0x20 )
|
|
||||||
//m_pokey->write(offset, data);
|
|
||||||
}
|
|
||||||
|
@ -22,8 +22,6 @@ protected:
|
|||||||
virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
|
virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
[[maybe_unused]] void pokey_w(offs_t offset, uint8_t data);
|
|
||||||
|
|
||||||
std::unique_ptr<int16_t[]> m_vol_lookup;
|
std::unique_ptr<int16_t[]> m_vol_lookup;
|
||||||
|
|
||||||
int16_t m_vol_crash[16];
|
int16_t m_vol_crash[16];
|
||||||
|
Loading…
Reference in New Issue
Block a user