Revert "seta, x1-010: Fix pitch in downtown"

This reverts commit 76d163530e.
This commit is contained in:
Ian Karlsson 2015-06-10 20:38:21 +02:00
parent 76d163530e
commit 0bbedec8ba
3 changed files with 4 additions and 9 deletions

View File

@ -90,7 +90,6 @@ x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, dev
m_region(*this, DEVICE_SELF),
m_rate(0),
m_adr(0),
m_divider(0),
m_stream(NULL),
m_sound_enable(0),
m_base_clock(0)
@ -213,7 +212,7 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
volL = ((reg->volume>>4)&0xf)*VOL_BASE;
volR = ((reg->volume>>0)&0xf)*VOL_BASE;
smp_offs = m_smp_offset[ch];
freq = reg->frequency>>m_divider;
freq = reg->frequency;
// Meta Fox does write the frequency register, but this is a hack to make it "work" with the current setup
// This is broken for Arbalester (it writes 8), but that'll be fixed later.
if( freq == 0 ) freq = 4;
@ -239,7 +238,7 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
} else { // Wave form
start = (INT8 *)&(m_reg[reg->volume*128+0x1000]);
smp_offs = m_smp_offset[ch];
freq = ((reg->pitch_hi<<8)+reg->frequency)>>m_divider;
freq = (reg->pitch_hi<<8)+reg->frequency;
smp_step = (UINT32)((float)m_base_clock/128.0f/1024.0f/4.0f*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
env = (UINT8 *)&(m_reg[reg->end*128]);

View File

@ -16,8 +16,7 @@ public:
// static configuration
static void set_address(device_t &device, int addr) { downcast<x1_010_device &>(device).m_adr = addr; }
static void set_divider(device_t &device, int div) { downcast<x1_010_device &>(device).m_divider = div; }
DECLARE_READ8_MEMBER ( read );
DECLARE_WRITE8_MEMBER( write );
@ -39,7 +38,6 @@ private:
required_region_ptr<INT8> m_region; // ROM
int m_rate; // Output sampling rate (Hz)
int m_adr; // address
int m_divider; // Frequency divider (used by downtown)
sound_stream * m_stream; // Stream handle
int m_sound_enable; // sound output enable/disable
UINT8 m_reg[0x2000]; // X1-010 Register & wave form area
@ -55,7 +53,6 @@ extern const device_type X1_010;
#define MCFG_X1_010_ADDRESS(_addr) \
x1_010_device::set_address(*device, _addr);
#define MCFG_X1_010_DIVIDER(_div) \
x1_010_device::set_divider(*device, _div);
#endif /* __X1_010_H__ */

View File

@ -7823,7 +7823,6 @@ static MACHINE_CONFIG_START( downtown, seta_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("x1snd", X1_010, 16000000) /* 16 MHz */
MCFG_X1_010_DIVIDER(1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END