Konami PPC updates:

- Fixed sound clocking to match PCB readmes [RetroRepair]
- Labeled inputs in GTI Club [RetroRepair]
- RF5c400 envelope timing based on chip output rate instead of MAME output rate [R. Belmont]
This commit is contained in:
R. Belmont 2013-02-02 21:42:08 +00:00
parent edf6aa3d8e
commit 20ca1aaf5e
8 changed files with 31 additions and 26 deletions

View File

@ -141,7 +141,7 @@ static DEVICE_START( k056800 )
{
k056800_state *k056800 = k056800_get_safe_token(device);
const k056800_interface *intf = k056800_get_interface(device);
attotime timer_period = attotime::from_hz(44100) * 128; // roughly 2.9us
attotime timer_period = attotime::from_hz(device->clock()) * 14700 * 3;
k056800->irq_cb = intf->irq_cb;
@ -198,3 +198,5 @@ void k056800_device::device_reset()
{
DEVICE_RESET_NAME( k056800 )(this);
}

View File

@ -48,8 +48,8 @@ extern const device_type K056800;
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_K056800_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, K056800, 0) \
#define MCFG_K056800_ADD(_tag, _interface, _clock) \
MCFG_DEVICE_ADD(_tag, K056800, _clock) \
MCFG_DEVICE_CONFIG(_interface)

View File

@ -262,7 +262,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
double r;
// attack
r = 1.0 / (ENV_AR_SPEED * device->machine().sample_rate());
r = 1.0 / (ENV_AR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_AR; i++)
{
info->env_ar_table[i] = 1.0;
@ -278,7 +278,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
}
// decay
r = -1.0 / (ENV_DR_SPEED * device->machine().sample_rate());
r = -5.0 / (ENV_DR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_DR; i++)
{
info->env_dr_table[i] = r;
@ -294,7 +294,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
}
// release
r = -1.0 / (ENV_RR_SPEED * device->machine().sample_rate());
r = -5.0 / (ENV_RR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_RR; i++)
{
info->env_rr_table[i] = r;

View File

@ -509,10 +509,10 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gticlub )
PORT_START("IN0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // View switch
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Shift Down
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) // Shift Up
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) // AT/MT switch
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("View switch")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Shift Down")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shift Up")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("AT/MT switch")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8)
PORT_BIT( 0x0b, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -540,16 +540,16 @@ static INPUT_PORTS_START( gticlub )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("AN0") /* mask default type sens delta min max */
PORT_BIT( 0x3ff, 0x200, IPT_PADDLE ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0x3ff, 0x200, IPT_PADDLE ) PORT_NAME("Steering Wheel") PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_START("AN1")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL ) PORT_NAME("Accelerator") PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_START("AN2")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL2 ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL2 ) PORT_NAME("Brake") PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_START("AN3")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL3 ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL3 ) PORT_NAME("Handbrake") PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
INPUT_PORTS_END
@ -722,7 +722,7 @@ static void sound_irq_callback( running_machine &machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
machine.scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(gticlub_state::irq_off),state), line);
machine.scheduler().timer_set(attotime::from_usec(5), timer_expired_delegate(FUNC(gticlub_state::irq_off),state), line);
}
static const k056800_interface gticlub_k056800_interface =
@ -845,11 +845,11 @@ static MACHINE_CONFIG_START( gticlub, gticlub_state )
MCFG_K001604_ADD("k001604_1", gticlub_k001604_intf)
MCFG_K056800_ADD("k056800", gticlub_k056800_interface)
MCFG_K056800_ADD("k056800", gticlub_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("rfsnd", RF5C400, 64000000/4)
MCFG_SOUND_ADD("rfsnd", RF5C400, 33868800/2)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
@ -962,11 +962,11 @@ static MACHINE_CONFIG_START( hangplt, gticlub_state )
MCFG_K001604_ADD("k001604_1", hangplt_k001604_intf_l)
MCFG_K001604_ADD("k001604_2", hangplt_k001604_intf_r)
MCFG_K056800_ADD("k056800", gticlub_k056800_interface)
MCFG_K056800_ADD("k056800", gticlub_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("rfsnd", RF5C400, 64000000/4)
MCFG_SOUND_ADD("rfsnd", RF5C400, 33868800/2)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END

View File

@ -945,7 +945,7 @@ static void sound_irq_callback( running_machine &machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
state->m_sound_irq_timer->adjust(attotime::from_usec(1), line);
state->m_sound_irq_timer->adjust(attotime::from_usec(5), line);
}
static const k056800_interface hornet_k056800_interface =
@ -1023,7 +1023,7 @@ static MACHINE_CONFIG_START( hornet, hornet_state )
MCFG_K037122_ADD("k037122_1", hornet_k037122_intf)
MCFG_K056800_ADD("k056800", hornet_k056800_interface)
MCFG_K056800_ADD("k056800", hornet_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

View File

@ -752,7 +752,7 @@ static MACHINE_CONFIG_START( nwktr, nwktr_state )
MCFG_K001604_ADD("k001604", racingj_k001604_intf)
MCFG_K056800_ADD("k056800", nwktr_k056800_interface)
MCFG_K056800_ADD("k056800", nwktr_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

View File

@ -249,7 +249,7 @@ static MACHINE_CONFIG_START( ultrsprt, ultrsprt_state )
MCFG_PALETTE_LENGTH(8192)
/* sound hardware */
MCFG_K056800_ADD("k056800", ultrsprt_k056800_interface)
MCFG_K056800_ADD("k056800", ultrsprt_k056800_interface, XTAL_18_432MHz)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

View File

@ -189,6 +189,7 @@ public:
int m_ccu_vcth;
int m_ccu_vctl;
optional_shared_ptr<UINT32> m_workram;
emu_timer *m_sound_irq_timer;
UINT32 *m_sharc_dataram;
DECLARE_WRITE32_MEMBER(paletteram32_w);
DECLARE_READ8_MEMBER(sysreg_r);
@ -412,6 +413,8 @@ void zr107_state::machine_start()
/* set conservative DRC options */
ppcdrc_set_options(machine().device("maincpu"), PPCDRC_COMPATIBLE_OPTIONS);
m_sound_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(zr107_state::irq_off),this));
/* configure fast RAM regions for DRC */
ppcdrc_add_fastram(machine().device("maincpu"), 0x00000000, 0x000fffff, FALSE, m_workram);
}
@ -689,7 +692,7 @@ static void sound_irq_callback( running_machine &machine, int irq )
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
machine.device("audiocpu")->execute().set_input_line(line, ASSERT_LINE);
machine.scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(zr107_state::irq_off),state), line);
machine.scheduler().timer_set(attotime::from_usec(5), timer_expired_delegate(FUNC(zr107_state::irq_off),state), line);
}
static const k056800_interface zr107_k056800_interface =
@ -762,7 +765,7 @@ static MACHINE_CONFIG_START( zr107, zr107_state )
MCFG_K056832_ADD("k056832", zr107_k056832_intf)
MCFG_K056800_ADD("k056800", zr107_k056800_interface)
MCFG_K056800_ADD("k056800", zr107_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@ -818,7 +821,7 @@ static MACHINE_CONFIG_START( jetwave, zr107_state )
MCFG_K001604_ADD("k001604", jetwave_k001604_intf)
MCFG_K056800_ADD("k056800", zr107_k056800_interface)
MCFG_K056800_ADD("k056800", zr107_k056800_interface, 64000000/4)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")