Previous 199869 Revisions Next

r18492 Friday 12th October, 2012 at 17:00:38 UTC by hap
(re)added support for optional qbert knocker sound sample
[src/mame/audio]gottlieb.c
[src/mame/drivers]gottlieb.c
[src/mame/includes]gottlieb.h

trunk/src/mame/includes/gottlieb.h
r18491r18492
239239        m_laserdisc(*this, "laserdisc"),
240240        m_r1_sound(*this, "r1sound"),
241241        m_r2_sound(*this, "r2sound"),
242        m_knocker_sample(*this, "knocker"),
242243        m_videoram(*this, "videoram"),
243244        m_charram(*this, "charram"),
244245        m_spriteram(*this, "spriteram")
r18491r18492
249250   optional_device<pioneer_pr8210_device> m_laserdisc;
250251   optional_device<gottlieb_sound_r1_device> m_r1_sound;
251252   optional_device<gottlieb_sound_r2_device> m_r2_sound;
253   optional_device<samples_device> m_knocker_sample;
252254
253255   required_shared_ptr<UINT8> m_videoram;
254256   required_shared_ptr<UINT8> m_charram;
255257   required_shared_ptr<UINT8> m_spriteram;
256258
259   UINT8 m_knocker_prev;
257260   UINT8 m_joystick_select;
258261   UINT8 m_track[2];
259262   emu_timer *m_laserdisc_bit_timer;
r18491r18492
277280   tilemap_t *m_bg_tilemap;
278281   double m_weights[4];
279282
283   void qbert_knocker(UINT8 knock);
284   
280285   DECLARE_WRITE8_MEMBER(gottlieb_analog_reset_w);
281286   DECLARE_WRITE8_MEMBER(general_output_w);
282287   DECLARE_WRITE8_MEMBER(reactor_output_w);
283288   DECLARE_WRITE8_MEMBER(stooges_output_w);
284289   DECLARE_WRITE8_MEMBER(qbertqub_output_w);
290   DECLARE_WRITE8_MEMBER(qbert_output_w);
285291   DECLARE_READ8_MEMBER(laserdisc_status_r);
286292   DECLARE_WRITE8_MEMBER(laserdisc_select_w);
287293   DECLARE_WRITE8_MEMBER(laserdisc_command_w);
r18491r18492
298304   DECLARE_DRIVER_INIT(vidvince);
299305   DECLARE_DRIVER_INIT(ramtiles);
300306   DECLARE_DRIVER_INIT(stooges);
307   DECLARE_DRIVER_INIT(qbert);
301308   DECLARE_DRIVER_INIT(qbertqub);
302309   TILE_GET_INFO_MEMBER(get_bg_tile_info);
303310   TILE_GET_INFO_MEMBER(get_screwloo_bg_tile_info);
r18491r18492
313320   TIMER_CALLBACK_MEMBER(nmi_clear);
314321};
315322
316/*----------- defined in video/gottlieb.c -----------*/
323/*----------- defined in audio/gottlieb.c -----------*/
317324
325MACHINE_CONFIG_EXTERN( qbert_knocker );
326
318327#if USE_FAKE_VOTRAX
319328MACHINE_CONFIG_EXTERN( reactor_samples );
320329MACHINE_CONFIG_EXTERN( qbert_samples );
trunk/src/mame/drivers/gottlieb.c
r18491r18492
313313   else
314314      gottlieb_laserdisc_video_control_w(space, offset, data);
315315
316   /* bit 4 controls the coin meter */
316   /* bit 4 normally controls the coin meter */
317317   coin_counter_w(machine(), 0, data & 0x10);
318318
319   /* bit 5 controls the knocker */
320   output_set_value("knocker0", (data >> 5) & 1);
321
319   /* bit 5 doesn't have a generic function */
322320   /* bit 6 controls "COIN1"; it appears that no games used this */
323
324321   /* bit 7 controls the optional coin lockout; it appears that no games used this */
325322}
326323
r18491r18492
334331   set_led_status(machine(), 2, data & 0x80);
335332}
336333
334WRITE8_MEMBER(gottlieb_state::qbert_output_w)
335{
336   general_output_w(space, offset, data & ~0x20);
337
338   // bit 5 controls the knocker
339   qbert_knocker(data >> 5 & 1);
340}
341
337342WRITE8_MEMBER(gottlieb_state::qbertqub_output_w)
338343{
339344   // coincounter is on bit 5 instead
r18491r18492
17661771   MCFG_CPU_PROGRAM_MAP(reactor_map)
17671772
17681773   MCFG_DEVICE_REMOVE("nvram")
1774
1775   /* sound hardware */
17691776   MCFG_FRAGMENT_ADD(reactor_samples)
17701777MACHINE_CONFIG_END
17711778
17721779
17731780static MACHINE_CONFIG_DERIVED( qbert, gottlieb1 )
1781
1782   /* sound hardware */
1783   MCFG_FRAGMENT_ADD(qbert_knocker)
17741784   MCFG_FRAGMENT_ADD(qbert_samples)
17751785MACHINE_CONFIG_END
17761786
17771787
17781788static MACHINE_CONFIG_DERIVED( tylz, gottlieb1 )
1789
1790   /* sound hardware */
17791791   MCFG_FRAGMENT_ADD(qbert_samples)
17801792MACHINE_CONFIG_END
17811793
r18491r18492
18001812
18011813
18021814static MACHINE_CONFIG_DERIVED( qbert, gottlieb1_votrax )
1815
1816   /* sound hardware */
1817   MCFG_FRAGMENT_ADD(qbert_knocker)
18031818MACHINE_CONFIG_END
18041819
18051820
r18491r18492
24412456}
24422457
24432458
2459DRIVER_INIT_MEMBER(gottlieb_state,qbert)
2460{
2461   DRIVER_INIT_CALL(romtiles);
2462   machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::qbert_output_w),this));
2463}
2464
2465
24442466DRIVER_INIT_MEMBER(gottlieb_state,qbertqub)
24452467{
24462468   DRIVER_INIT_CALL(romtiles);
r18491r18492
24782500
24792501/* games using rev 1 sound board */
24802502GAME( 1982, reactor,   0,        reactor,   reactor,  gottlieb_state, ramtiles, ROT0,   "Gottlieb", "Reactor", GAME_IMPERFECT_SOUND )
2481GAME( 1982, qbert,     0,        qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb", "Q*bert (US set 1)", GAME_IMPERFECT_SOUND )
2482GAME( 1982, qberta,    qbert,    qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb", "Q*bert (US set 2)", GAME_IMPERFECT_SOUND )
2483GAME( 1982, qbertj,    qbert,    qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb (Konami license)", "Q*bert (Japan)", GAME_IMPERFECT_SOUND )
2484GAME( 1982, myqbert,   qbert,    qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb", "Mello Yello Q*bert", GAME_IMPERFECT_SOUND )
2485GAME( 1982, qberttst,  qbert,    qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb", "Q*bert (early test version)", GAME_IMPERFECT_SOUND )
2486GAME( 1982, qbtrktst,  qbert,    qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Gottlieb", "Q*bert Board Input Test Rom", GAME_IMPERFECT_SOUND )
2503GAME( 1982, qbert,     0,        qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb", "Q*bert (US set 1)", GAME_IMPERFECT_SOUND )
2504GAME( 1982, qberta,    qbert,    qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb", "Q*bert (US set 2)", GAME_IMPERFECT_SOUND )
2505GAME( 1982, qbertj,    qbert,    qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb (Konami license)", "Q*bert (Japan)", GAME_IMPERFECT_SOUND )
2506GAME( 1982, myqbert,   qbert,    qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb", "Mello Yello Q*bert", GAME_IMPERFECT_SOUND )
2507GAME( 1982, qberttst,  qbert,    qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb", "Q*bert (early test version)", GAME_IMPERFECT_SOUND )
2508GAME( 1982, qbtrktst,  qbert,    qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Gottlieb", "Q*bert Board Input Test Rom", GAME_IMPERFECT_SOUND )
24872509GAME( 1982, insector,  0,        gottlieb1, insector, gottlieb_state, romtiles, ROT0,   "Gottlieb", "Insector (prototype)", 0 )
24882510GAME( 1982, tylz,      0,        tylz,      tylz,     gottlieb_state, romtiles, ROT0,   "Mylstar",  "Tylz (prototype)", GAME_IMPERFECT_SOUND ) // modified sound hw?
24892511GAME( 1984, argusg,    0,        gottlieb1, argusg,   gottlieb_state, ramtiles, ROT0,   "Gottlieb", "Argus (Gottlieb, prototype)" , 0) // aka Guardian / Protector?
r18491r18492
24912513GAME( 1983, mplanetsuk,mplanets, gottlieb1, mplanets, gottlieb_state, romtiles, ROT270, "Gottlieb (Taitel license)", "Mad Planets (UK)", 0 )
24922514GAME( 1983, krull,     0,        gottlieb1, krull,    gottlieb_state, ramtiles, ROT270, "Gottlieb", "Krull", 0 )
24932515GAME( 1983, kngtmare,  0,        gottlieb1, kngtmare, gottlieb_state, romtiles, ROT0,   "Gottlieb", "Knightmare (prototype)", GAME_NO_SOUND )
2494GAME( 1983, sqbert,    0,        qbert,     qbert,    gottlieb_state, romtiles, ROT270, "Mylstar", "Faster, Harder, More Challenging Q*bert (prototype)", GAME_IMPERFECT_SOUND )
2516GAME( 1983, sqbert,    0,        qbert,     qbert,    gottlieb_state, qbert,    ROT270, "Mylstar", "Faster, Harder, More Challenging Q*bert (prototype)", GAME_IMPERFECT_SOUND )
24952517GAME( 1983, qbertqub,  0,        qbert,     qbertqub, gottlieb_state, qbertqub, ROT270, "Mylstar", "Q*bert's Qubes", GAME_IMPERFECT_SOUND )
24962518GAME( 1984, curvebal,  0,        gottlieb1, curvebal, gottlieb_state, romtiles, ROT270, "Mylstar", "Curve Ball", 0 )
24972519
trunk/src/mame/audio/gottlieb.c
r18491r18492
206206   "fx_39j", /* "45000" */
207207   "fx_39k", /* "50000" */
208208   "fx_39l", /* "55000" */
209     0   /* end of array */
209   0   /* end of array */
210210};
211211
212212static const char *const qbert_sample_names[] =
r18491r18492
256256   "fx_23", /* O1 with varying voice clock */
257257   "fx_28",
258258   "fx_36",
259   "knocker",
260259   0   /* end of array */
261260};
262261
r18491r18492
287286
288287
289288//**************************************************************************
289//  QBERT MECHANICAL KNOCKER
290//**************************************************************************
291
292//-------------------------------------------------
293//  qbert cabinets have a mechanical knocker near the floor,
294//  MAME simulates this with a sample.
295//  (like all MAME samples, it is optional. If you actually have
296//   a real kicker/knocker, hook it up via output "knocker0")
297//-------------------------------------------------
298
299void gottlieb_state::qbert_knocker(UINT8 knock)
300{
301   output_set_value("knocker0", knock);
302   
303   // start sound on rising edge
304   if (knock & ~m_knocker_prev)
305      m_knocker_sample->start(0, 0);
306   m_knocker_prev = knock;
307}
308
309static const char *const qbert_knocker_names[] =
310{
311   "*qbert",
312   "knocker",
313   0   /* end of array */
314};
315
316static const samples_interface qbert_knocker_interface =
317{
318   1,   /* one channel */
319   qbert_knocker_names
320};
321
322MACHINE_CONFIG_FRAGMENT( qbert_knocker )
323   MCFG_SAMPLES_ADD("knocker", qbert_knocker_interface)
324   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
325MACHINE_CONFIG_END
326
327
328
329//**************************************************************************
290330//  REV 1 SOUND BOARD: 6502 + DAC
291331//**************************************************************************
292332

Previous 199869 Revisions Next


© 1997-2024 The MAME Team