src/mame/audio/gottlieb.c
| r14746 | r14747 | |
| 4 | 4 | |
| 5 | 5 | Gottlieb 6502-based sound hardware implementations. |
| 6 | 6 | |
| 7 | | Dedicated to Warren Davis, Jeff Lee, Tim Skelly & David Thiel |
| 7 | Dedicated to Warren Davis, Jeff Lee, Tim Skelly & David Thiel |
| 8 | 8 | |
| 9 | 9 | **************************************************************************** |
| 10 | 10 | |
| r14746 | r14747 | |
| 361 | 361 | |
| 362 | 362 | //------------------------------------------------- |
| 363 | 363 | // r6532_portb_w - handle writes to the RIOT's |
| 364 | | // port B |
| 364 | // port B |
| 365 | 365 | //------------------------------------------------- |
| 366 | 366 | |
| 367 | 367 | WRITE8_MEMBER( gottlieb_sound_r1_device::r6532_portb_w ) |
| r14746 | r14747 | |
| 372 | 372 | |
| 373 | 373 | |
| 374 | 374 | //------------------------------------------------- |
| 375 | | // votrax_data_w - write data to the Votrax SC-01 |
| 375 | // votrax_data_w - write data to the Votrax SC-01 |
| 376 | 376 | // speech chip |
| 377 | 377 | //------------------------------------------------- |
| 378 | 378 | |
| r14746 | r14747 | |
| 392 | 392 | |
| 393 | 393 | //------------------------------------------------- |
| 394 | 394 | // speech_clock_dac_w - modify the clock driving |
| 395 | | // the Votrax SC-01 speech chip |
| 395 | // the Votrax SC-01 speech chip |
| 396 | 396 | //------------------------------------------------- |
| 397 | 397 | |
| 398 | 398 | WRITE8_MEMBER( gottlieb_sound_r1_device::speech_clock_dac_w ) |
| r14746 | r14747 | |
| 403 | 403 | if (data != m_last_speech_clock) |
| 404 | 404 | { |
| 405 | 405 | mame_printf_debug("clock = %02X\n", data); |
| 406 | | |
| 406 | |
| 407 | 407 | // totally random guesswork; would like to get real measurements on a board |
| 408 | 408 | if (m_votrax != NULL) |
| 409 | 409 | m_votrax->set_unscaled_clock(600000 + (data - 0xa0) * 10000); |
| r14746 | r14747 | |
| 415 | 415 | |
| 416 | 416 | //------------------------------------------------- |
| 417 | 417 | // votrax_request - map the VOTRAX SC-01 request |
| 418 | | // line to the NMI pin on the sound chip |
| 418 | // line to the NMI pin on the sound chip |
| 419 | 419 | //------------------------------------------------- |
| 420 | 420 | |
| 421 | 421 | WRITE_LINE_MEMBER( gottlieb_sound_r1_device::votrax_request ) |
| r14746 | r14747 | |
| 483 | 483 | |
| 484 | 484 | MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1_with_votrax ) |
| 485 | 485 | MCFG_FRAGMENT_ADD(gottlieb_sound_r1) |
| 486 | | |
| 486 | |
| 487 | 487 | // add the VOTRAX |
| 488 | 488 | MCFG_VOTRAX_SC01_ADD("votrax", 720000, gottlieb_votrax_interface) |
| 489 | 489 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50) |
| r14746 | r14747 | |
| 552 | 552 | //************************************************************************** |
| 553 | 553 | |
| 554 | 554 | //------------------------------------------------- |
| 555 | | // gottlieb_sound_r1_with_votrax_device - |
| 556 | | // constructor |
| 555 | // gottlieb_sound_r1_with_votrax_device - |
| 556 | // constructor |
| 557 | 557 | //------------------------------------------------- |
| 558 | 558 | |
| 559 | 559 | gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r14746 | r14747 | |
| 618 | 618 | |
| 619 | 619 | //------------------------------------------------- |
| 620 | 620 | // static_enable_cobram3_mods - enable changes |
| 621 | | // for cobram3 |
| 621 | // for cobram3 |
| 622 | 622 | //------------------------------------------------- |
| 623 | 623 | |
| 624 | 624 | void gottlieb_sound_r2_device::static_enable_cobram3_mods(device_t &device) |
| r14746 | r14747 | |
| 652 | 652 | |
| 653 | 653 | //------------------------------------------------- |
| 654 | 654 | // nmi_timer_adjust - adjust the NMI timer to |
| 655 | | // fire based on its configured rate |
| 655 | // fire based on its configured rate |
| 656 | 656 | //------------------------------------------------- |
| 657 | 657 | |
| 658 | 658 | inline void gottlieb_sound_r2_device::nmi_timer_adjust() |
| r14746 | r14747 | |
| 664 | 664 | |
| 665 | 665 | //------------------------------------------------- |
| 666 | 666 | // nmi_state_update - update the NMI state based |
| 667 | | // on the timer firing and the enable control |
| 667 | // on the timer firing and the enable control |
| 668 | 668 | //------------------------------------------------- |
| 669 | 669 | |
| 670 | 670 | inline void gottlieb_sound_r2_device::nmi_state_update() |
| r14746 | r14747 | |
| 676 | 676 | |
| 677 | 677 | //------------------------------------------------- |
| 678 | 678 | // speech_data_r - read the input command latch |
| 679 | | // from the audio CPU |
| 679 | // from the audio CPU |
| 680 | 680 | //------------------------------------------------- |
| 681 | 681 | |
| 682 | 682 | READ8_MEMBER( gottlieb_sound_r2_device::audio_data_r ) |
| r14746 | r14747 | |
| 688 | 688 | |
| 689 | 689 | //------------------------------------------------- |
| 690 | 690 | // speech_data_r - read the input command latch |
| 691 | | // from the speech CPU |
| 691 | // from the speech CPU |
| 692 | 692 | //------------------------------------------------- |
| 693 | 693 | |
| 694 | 694 | READ8_MEMBER( gottlieb_sound_r2_device::speech_data_r ) |
| r14746 | r14747 | |
| 700 | 700 | |
| 701 | 701 | //------------------------------------------------- |
| 702 | 702 | // signal_audio_nmi_w - signal an NMI from the |
| 703 | | // speech CPU to the audio CPU |
| 703 | // speech CPU to the audio CPU |
| 704 | 704 | //------------------------------------------------- |
| 705 | 705 | |
| 706 | 706 | WRITE8_MEMBER( gottlieb_sound_r2_device::signal_audio_nmi_w ) |
| r14746 | r14747 | |
| 712 | 712 | |
| 713 | 713 | //------------------------------------------------- |
| 714 | 714 | // nmi_rate_w - adjust the NMI rate on the speech |
| 715 | | // CPU |
| 715 | // CPU |
| 716 | 716 | //------------------------------------------------- |
| 717 | 717 | |
| 718 | 718 | WRITE8_MEMBER( gottlieb_sound_r2_device::nmi_rate_w ) |
| r14746 | r14747 | |
| 723 | 723 | |
| 724 | 724 | |
| 725 | 725 | //------------------------------------------------- |
| 726 | | // speech_drq_custom_r - return the SP0250 |
| 727 | | // request line as an input port bit |
| 726 | // speech_drq_custom_r - return the SP0250 |
| 727 | // request line as an input port bit |
| 728 | 728 | //------------------------------------------------- |
| 729 | 729 | |
| 730 | 730 | CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r ) |
| r14746 | r14747 | |
| 735 | 735 | |
| 736 | 736 | //------------------------------------------------- |
| 737 | 737 | // dac_w - write to one of the two DACs on the |
| 738 | | // board |
| 738 | // board |
| 739 | 739 | //------------------------------------------------- |
| 740 | 740 | |
| 741 | 741 | WRITE8_MEMBER( gottlieb_sound_r2_device::dac_w ) |
| r14746 | r14747 | |
| 748 | 748 | |
| 749 | 749 | |
| 750 | 750 | //------------------------------------------------- |
| 751 | | // speech_control_w - primary audio control |
| 752 | | // register on the speech board |
| 751 | // speech_control_w - primary audio control |
| 752 | // register on the speech board |
| 753 | 753 | //------------------------------------------------- |
| 754 | 754 | |
| 755 | 755 | WRITE8_MEMBER( gottlieb_sound_r2_device::speech_control_w ) |
| r14746 | r14747 | |
| 761 | 761 | nmi_state_update(); |
| 762 | 762 | |
| 763 | 763 | // bit 1 controls a LED on the sound board |
| 764 | | |
| 764 | |
| 765 | 765 | // bits 2-4 control the AY-8913, but act differently between the |
| 766 | 766 | // standard sound board and the modified Cobra Command board |
| 767 | 767 | if (!m_cobram3_mod) |
| r14746 | r14747 | |
| 805 | 805 | |
| 806 | 806 | //------------------------------------------------- |
| 807 | 807 | // psg_latch_w - store an 8-bit value in the PSG |
| 808 | | // latch register |
| 808 | // latch register |
| 809 | 809 | //------------------------------------------------- |
| 810 | 810 | |
| 811 | 811 | WRITE8_MEMBER( gottlieb_sound_r2_device::psg_latch_w ) |
| r14746 | r14747 | |
| 815 | 815 | |
| 816 | 816 | |
| 817 | 817 | //------------------------------------------------- |
| 818 | | // psg_latch_w - store an 8-bit value in the |
| 819 | | // SP0250 latch register |
| 818 | // psg_latch_w - store an 8-bit value in the |
| 819 | // SP0250 latch register |
| 820 | 820 | //------------------------------------------------- |
| 821 | 821 | |
| 822 | 822 | WRITE8_MEMBER( gottlieb_sound_r2_device::sp0250_latch_w ) |
| r14746 | r14747 | |
| 935 | 935 | |
| 936 | 936 | // reset the DACs |
| 937 | 937 | m_dac_data[0] = m_dac_data[1] = 0xff; |
| 938 | | |
| 938 | |
| 939 | 939 | // disable the non-speech CPU for cobram3 |
| 940 | 940 | if (m_cobram3_mod) |
| 941 | 941 | m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| r14746 | r14747 | |
| 967 | 967 | // adjust the NMI timer for the next time |
| 968 | 968 | nmi_timer_adjust(); |
| 969 | 969 | break; |
| 970 | | |
| 970 | |
| 971 | 971 | case TID_NMI_CLEAR: |
| 972 | 972 | // update state |
| 973 | 973 | m_nmi_state = 0; |
| 974 | 974 | nmi_state_update(); |
| 975 | 975 | break; |
| 976 | | |
| 976 | |
| 977 | 977 | case TID_SOUND_LATCH_WRITE: |
| 978 | 978 | // each CPU has its own latch |
| 979 | 979 | m_audiocpu_latch = param; |
src/mame/drivers/bfm_sc1.c
| r14746 | r14747 | |
| 1402 | 1402 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1403 | 1403 | ROM_LOAD( "cash_attraction_b", 0x0000, 0x8000, CRC(79870574) SHA1(89e5db89064a9e24bc37389d78f4defb7d2f479b) ) |
| 1404 | 1404 | ROM_LOAD( "cash_attraction_a", 0x8000, 0x8000, CRC(fab3283c) SHA1(669b425687faad0ebf88c1aaaafa40c446fa2e24) ) |
| 1405 | | |
| 1405 | |
| 1406 | 1406 | ROM_REGION( 0x10000, "altrevs", 0 ) |
| 1407 | 1407 | ROM_LOAD( "957172.40 b std var%.bin", 0x0000, 0x008000, CRC(5e4381f9) SHA1(ae6d64c42ae7ddc2ed0ab5c3b56222090004d88a) ) |
| 1408 | 1408 | ROM_LOAD( "957182.20 var% proto a.bin", 0x0000, 0x008000, CRC(3a2dd72d) SHA1(29d962702095aa0f252210da68a89c557fa9db69) ) |
| r14746 | r14747 | |
| 1466 | 1466 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1467 | 1467 | ROM_LOAD( "cashxpl2.bin", 0x0000, 0x8000, CRC(0199136c) SHA1(bed1df64ecc0d7ef951a59717e219e6fe7ebf99c) ) |
| 1468 | 1468 | ROM_LOAD( "cashxpl1.bin", 0x8000, 0x8000, CRC(0fe62ead) SHA1(bd56a216292e9bf2b7753616a6cd25b37e22095f) ) |
| 1469 | | |
| 1469 | |
| 1470 | 1470 | ROM_REGION( 0x10000, "altrevs", 0 ) // i think some of this is on different hw (SC2?) |
| 1471 | 1471 | ROM_LOAD( "cash_explosion_dat_ac_8_10pnd_20p_a.bin", 0x0000, 0x010000, CRC(1d155799) SHA1(4e76328a4d093d1f9c64c633c3558db2dce4e219) ) |
| 1472 | 1472 | ROM_LOAD( "cash_explosion_dat_ac_var_8pnd_a.bin", 0x0000, 0x010000, CRC(4aa53121) SHA1(cf0510e224de62b837915d39c2fe3559cfe8c85f) ) |
| r14746 | r14747 | |
| 1504 | 1504 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1505 | 1505 | ROM_LOAD( "95717206b std.bin", 0x0000, 0x8000, CRC(2478530f) SHA1(be82a4e36a3c076b9e94fa2364904ca463b6b4ed) ) |
| 1506 | 1506 | ROM_LOAD( "95717205a std.bin", 0x8000, 0x8000, CRC(795bbeea) SHA1(22e0fc9bc3c70e05e51cb98837a9c706eb2ca080) ) |
| 1507 | | |
| 1507 | |
| 1508 | 1508 | ROM_REGION( 0x10000, "altrevs", 0 )//these seem to be halves without a partner, do these share the same b ROM? |
| 1509 | 1509 | ROM_LOAD( "95718205a std ptel.bin", 0x0000, 0x008000, CRC(c88f476c) SHA1(a5d8f12ade77bdb100ece5f2eecec35ae09f3b0e) ) |
| 1510 | 1510 | ROM_LOAD( "95718210a proto var.bin", 0x0000, 0x008000, CRC(0997c4e9) SHA1(1013a12803796d3926cceeb671c7c07cc66d418e) ) |
| r14746 | r14747 | |
| 1571 | 1571 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1572 | 1572 | ROM_LOAD( "club-china-town_std_ac_150pnd_lfj_bss.bin", 0x0000, 0x8000, CRC(d41c6999) SHA1(cc2eb2e74ca3bfa78d74dd08f83acb2fe650e13d) ) |
| 1573 | 1573 | ROM_LOAD( "club-china-town_std_ac_150pnd_lfj_ass.bin", 0x8000, 0x8000, CRC(8c3e69f1) SHA1(cb0cbf7a6039549b969160a162a0cd5511b24cd3) ) |
| 1574 | | |
| 1574 | |
| 1575 | 1575 | sc1_china_sound |
| 1576 | 1576 | ROM_END |
| 1577 | 1577 | |
| r14746 | r14747 | |
| 1679 | 1679 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1680 | 1680 | ROM_LOAD( "club-six-five-special_std_ac_rot_10po_bss.bin", 0x0000, 0x8000, CRC(3371dc55) SHA1(52d75a90933acc7a03821e5c2821df6126c72a6c) ) |
| 1681 | 1681 | ROM_LOAD( "club-six-five-special_std_ac_rot_10po_ass.bin", 0x8000, 0x8000, CRC(cf48ba99) SHA1(5da4321ff349964e903f1bebd3e5ddd0799fc478) ) |
| 1682 | | |
| 1682 | |
| 1683 | 1683 | sc1_cl65_sound_alt |
| 1684 | 1684 | ROM_END |
| 1685 | 1685 | |
| r14746 | r14747 | |
| 1687 | 1687 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1688 | 1688 | ROM_LOAD( "club-six-five-special_std_ac_rot_10po_bss.bin", 0x0000, 0x8000, CRC(3371dc55) SHA1(52d75a90933acc7a03821e5c2821df6126c72a6c) ) |
| 1689 | 1689 | ROM_LOAD( "club-six-five-special_dat_ac_rot_10po_ass.bin", 0x8000, 0x8000, CRC(77ddf81d) SHA1(522d9f84ab6e31586f371548e2f146ac193f06f5) ) |
| 1690 | | |
| 1690 | |
| 1691 | 1691 | sc1_cl65_sound_alt |
| 1692 | 1692 | ROM_END |
| 1693 | 1693 | |
| r14746 | r14747 | |
| 1752 | 1752 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1753 | 1753 | ROM_LOAD( "temptp2", 0x0000, 0x8000, CRC(d165fa87) SHA1(aef8a4af8b6e83ef09dffc8aca305eaf7dd3936b) ) |
| 1754 | 1754 | ROM_LOAD( "temptp1", 0x8000, 0x8000, CRC(6f03648d) SHA1(a6402c94ebf4d570d1d3fb462eb621566c27f307) ) |
| 1755 | | |
| 1755 | |
| 1756 | 1756 | ROM_REGION( 0x40000, "upd", 0 ) |
| 1757 | 1757 | ROM_LOAD( "tempsnd1.bin", 0x00000, 0x10000, CRC(168e2a18) SHA1(db97acf9131b1a54efe1cd375aecae1679bab19e) ) |
| 1758 | 1758 | ROM_LOAD( "tempsnd2.bin", 0x00000, 0x10000, CRC(b717f347) SHA1(189c82318d622f18580a23eed48b17c0c34dedd5) ) |
| r14746 | r14747 | |
| 1859 | 1859 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 1860 | 1860 | ROM_LOAD( "doublechancegame2.bin", 0x0000, 0x008000, CRC(d4f49454) SHA1(53b97f941a4abfeb3e498b4295f98e80bd182b7e) ) |
| 1861 | 1861 | ROM_LOAD( "doublechancegame1.bin", 0x8000, 0x008000, CRC(9e24e0e3) SHA1(fff1fe9219c052750709d13c06148c7926a22910) ) |
| 1862 | | |
| 1862 | |
| 1863 | 1863 | ROM_REGION( 0x40000, "altrevs", 0 )//orphans? |
| 1864 | 1864 | ROM_LOAD( "95717787 10p20p.bin", 0x0000, 0x008000, CRC(69ba126c) SHA1(f59aa5a632d0bc5102c206f986f86b6c7c1352fb) ) |
| 1865 | 1865 | ROM_LOAD( "95717789 10p.bin", 0x0000, 0x008000, CRC(fc338d38) SHA1(65457f2611ffa22ac35f1e7ad10c290c01b9c3ac) ) |
| r14746 | r14747 | |
| 2409 | 2409 | sc1_winst_sound |
| 2410 | 2410 | ROM_END |
| 2411 | 2411 | |
| 2412 | | |
| 2412 | |
| 2413 | 2413 | ROM_START( sc1winstp ) |
| 2414 | 2414 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2415 | 2415 | ROM_LOAD( "95717110 var% b.bin", 0x0000, 0x8000, CRC(1c2ebd26) SHA1(462baa4df7c01d101798df1d90bb5719cdc9647e) ) |
| r14746 | r14747 | |
| 2601 | 2601 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2602 | 2602 | ROM_LOAD( "dsnl1-6.p2", 0x0000, 0x8000, CRC(0eb10c01) SHA1(16456ec1e32bfbd873bdebd6a760041bc9cd8648) ) |
| 2603 | 2603 | ROM_LOAD( "dsnl1-6.p1", 0x8000, 0x8000, CRC(174c4432) SHA1(82519ede8220d3d717ee0ebe57374357afe38949) ) |
| 2604 | | |
| 2604 | |
| 2605 | 2605 | sc1_driv_sound |
| 2606 | 2606 | ROM_END |
| 2607 | | |
| 2607 | |
| 2608 | 2608 | ROM_START( sc1vsd ) |
| 2609 | 2609 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 2610 | 2610 | ROM_LOAD( "supd1-4n.p1", 0x8000, 0x8000, CRC(ad581f7d) SHA1(99b9bf1016cd52467f5c9f6e427305e81033e82f) ) |
| r14746 | r14747 | |
| 2733 | 2733 | ROM_LOAD( "bc6-4_0b.bin", 0x0000, 0x8000, CRC(106265c8) SHA1(6465f7e868c5b04776fee69295a52197abb45ad0) ) |
| 2734 | 2734 | ROM_LOAD( "bc6-4_0a.bin", 0x8000, 0x8000, CRC(750645e7) SHA1(65eee2a00a1914bb8dc989b131eaa39d2881105d) ) |
| 2735 | 2735 | |
| 2736 | | // ROM_REGION( 0x80000, "altrevs", 0 ) |
| 2736 | // ROM_REGION( 0x80000, "altrevs", 0 ) |
| 2737 | 2737 | |
| 2738 | 2738 | ROM_REGION( 0x200000, "upd", ROMREGION_ERASE00 ) |
| 2739 | 2739 | ROM_END |
src/mame/drivers/naomi.c
| r14746 | r14747 | |
| 5524 | 5524 | NAOMI_DEFAULT_EEPROM |
| 5525 | 5525 | |
| 5526 | 5526 | ROM_REGION( 0x10000000, "rom_board", ROMREGION_ERASEFF) |
| 5527 | | ROM_LOAD( "maz1fl1.2d", 0x0000000, 0x0800000, CRC(620cdbb6) SHA1(95e9d0858e1d3060b3c1c41adfff0539185fb03d) ) |
| 5527 | ROM_LOAD( "maz1fl1.2d", 0x0000000, 0x0800000, CRC(620cdbb6) SHA1(95e9d0858e1d3060b3c1c41adfff0539185fb03d) ) |
| 5528 | 5528 | ROM_RELOAD( 0x800000, 0x800000 ) |
| 5529 | | ROM_LOAD( "maz1ma1.4m", 0x1000000, 0x1000000, CRC(68e12189) SHA1(5a434bd0305189620a62c785c5ac2812dae033d6) ) |
| 5530 | | ROM_LOAD( "maz1ma2.4l", 0x2000000, 0x1000000, CRC(c7a05b44) SHA1(dfbeb3be5adfdf3d4f1d330f3654a5532eb28cc2) ) |
| 5531 | | ROM_LOAD( "maz1ma3.4k", 0x3000000, 0x1000000, CRC(48e1a8a5) SHA1(8b0d83c02ab576d90c95aad297c7447326154c0e) ) |
| 5532 | | ROM_LOAD( "maz1ma4.4j", 0x4000000, 0x1000000, CRC(0187cdab) SHA1(aaa9fd208103426eb0eee58ae0a64a191abcd126) ) |
| 5533 | | ROM_LOAD( "maz1ma5.4h", 0x5000000, 0x1000000, CRC(c6885ee7) SHA1(14e7e017438adcbe0136d7d863af95fe65bd15d8) ) |
| 5534 | | ROM_LOAD( "maz1ma6.4f", 0x6000000, 0x1000000, CRC(a6593c36) SHA1(627bf19d960037ea92b673b786a9da7208acd447) ) |
| 5535 | | ROM_LOAD( "maz1ma7.4e", 0x7000000, 0x1000000, CRC(6103ad9c) SHA1(e4abbb5867cae6a9bf9067ab3a091ef7b18fa0cd) ) |
| 5536 | | ROM_LOAD( "maz1ma8.4d", 0x8000000, 0x1000000, CRC(d46c9f40) SHA1(45eec7fa3d4261f12438e841254fa75d572331b3) ) |
| 5529 | ROM_LOAD( "maz1ma1.4m", 0x1000000, 0x1000000, CRC(68e12189) SHA1(5a434bd0305189620a62c785c5ac2812dae033d6) ) |
| 5530 | ROM_LOAD( "maz1ma2.4l", 0x2000000, 0x1000000, CRC(c7a05b44) SHA1(dfbeb3be5adfdf3d4f1d330f3654a5532eb28cc2) ) |
| 5531 | ROM_LOAD( "maz1ma3.4k", 0x3000000, 0x1000000, CRC(48e1a8a5) SHA1(8b0d83c02ab576d90c95aad297c7447326154c0e) ) |
| 5532 | ROM_LOAD( "maz1ma4.4j", 0x4000000, 0x1000000, CRC(0187cdab) SHA1(aaa9fd208103426eb0eee58ae0a64a191abcd126) ) |
| 5533 | ROM_LOAD( "maz1ma5.4h", 0x5000000, 0x1000000, CRC(c6885ee7) SHA1(14e7e017438adcbe0136d7d863af95fe65bd15d8) ) |
| 5534 | ROM_LOAD( "maz1ma6.4f", 0x6000000, 0x1000000, CRC(a6593c36) SHA1(627bf19d960037ea92b673b786a9da7208acd447) ) |
| 5535 | ROM_LOAD( "maz1ma7.4e", 0x7000000, 0x1000000, CRC(6103ad9c) SHA1(e4abbb5867cae6a9bf9067ab3a091ef7b18fa0cd) ) |
| 5536 | ROM_LOAD( "maz1ma8.4d", 0x8000000, 0x1000000, CRC(d46c9f40) SHA1(45eec7fa3d4261f12438e841254fa75d572331b3) ) |
| 5537 | 5537 | |
| 5538 | 5538 | ROM_REGION( 4, "rom_key", 0 ) |
| 5539 | | ROM_LOAD( "maz1-key.bin", 0x000000, 0x000004, CRC(79ebd41a) SHA1(3545dacdeac66b46e8706565f0eca784291040d1) ) |
| 5539 | ROM_LOAD( "maz1-key.bin", 0x000000, 0x000004, CRC(79ebd41a) SHA1(3545dacdeac66b46e8706565f0eca784291040d1) ) |
| 5540 | 5540 | ROM_END |
| 5541 | 5541 | |
| 5542 | 5542 | ROM_START( vtenis2c ) |
| r14746 | r14747 | |
| 7907 | 7907 | /* 25349801 */ GAME( 2000, toukon4, naomi, naomim2, naomi, naomi, ROT0, "Capcom / Namco", "Shin Nihon Pro Wrestling Toukon Retsuden 4 Arcade Edition (TRF1 Ver. A)", GAME_UNEMULATED_PROTECTION|GAME_FLAGS ) |
| 7908 | 7908 | // 25469801 Ninja Assault |
| 7909 | 7909 | /* 25709801 */ GAME( 2001, gunsur2, naomi, naomi, naomi, naomi, ROT0, "Capcom / Namco", "Gun Survivor 2 Biohazard Code: Veronica (BHF1 Ver. A)", GAME_UNEMULATED_PROTECTION|GAME_FLAGS ) |
| 7910 | | /* 25869812 */ GAME( 2002, mazan, naomi, naomim2, naomi, naomi, ROT0, "Capcom / Namco", "Mazan: Flash of the Blade (MAZ1 Ver. A)", GAME_UNEMULATED_PROTECTION|GAME_FLAGS ) |
| 7910 | /* 25869812 */ GAME( 2002, mazan, naomi, naomim2, naomi, naomi, ROT0, "Capcom / Namco", "Mazan: Flash of the Blade (MAZ1 Ver. A)", GAME_UNEMULATED_PROTECTION|GAME_FLAGS ) |
| 7911 | 7911 | |
| 7912 | 7912 | /* GDS-xxxx (Sega GD-ROM games) */ |
| 7913 | 7913 | /* 0001 */ GAME( 2000, confmiss, naomigd, naomigd, hotd2, naomigd, ROT0, "Sega", "Confidential Mission (GDS-0001)", GAME_FLAGS ) |
src/mame/drivers/gottlieb.c
| r14746 | r14747 | |
| 692 | 692 | * Main CPU memory handlers |
| 693 | 693 | * |
| 694 | 694 | *************************************/ |
| 695 | | |
| 695 | |
| 696 | 696 | static WRITE8_HANDLER( gottlieb_sh_w ) |
| 697 | 697 | { |
| 698 | 698 | gottlieb_state *state = space->machine().driver_data<gottlieb_state>(); |
| r14746 | r14747 | |
| 2485 | 2485 | |
| 2486 | 2486 | /* games using rev 1 sound board */ |
| 2487 | 2487 | GAME( 1982, reactor, 0, reactor, reactor, ramtiles, ROT0, "Gottlieb", "Reactor", GAME_IMPERFECT_SOUND ) |
| 2488 | | GAME( 1982, qbert, 0, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert (US set 1)", GAME_IMPERFECT_SOUND ) |
| 2488 | GAME( 1982, qbert, 0, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert (US set 1)", GAME_IMPERFECT_SOUND ) |
| 2489 | 2489 | GAME( 1982, qberta, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert (US set 2)", GAME_IMPERFECT_SOUND ) |
| 2490 | | GAME( 1982, qbertj, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb (Konami license)", "Q*bert (Japan)", GAME_IMPERFECT_SOUND ) |
| 2491 | | GAME( 1982, myqbert, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Mello Yello Q*bert", GAME_IMPERFECT_SOUND ) |
| 2492 | | GAME( 1982, qberttst, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert (early test version)", GAME_IMPERFECT_SOUND ) |
| 2493 | | GAME( 1982, qbtrktst, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert Board Input Test Rom", GAME_IMPERFECT_SOUND ) |
| 2490 | GAME( 1982, qbertj, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb (Konami license)", "Q*bert (Japan)", GAME_IMPERFECT_SOUND ) |
| 2491 | GAME( 1982, myqbert, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Mello Yello Q*bert", GAME_IMPERFECT_SOUND ) |
| 2492 | GAME( 1982, qberttst, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert (early test version)", GAME_IMPERFECT_SOUND ) |
| 2493 | GAME( 1982, qbtrktst, qbert, qbert, qbert, romtiles, ROT270, "Gottlieb", "Q*bert Board Input Test Rom", GAME_IMPERFECT_SOUND ) |
| 2494 | 2494 | GAME( 1982, insector, 0, gottlieb1, insector, romtiles, ROT0, "Gottlieb", "Insector (prototype)", 0 ) |
| 2495 | 2495 | GAME( 1982, tylz, 0, gottlieb1_votrax, tylz, romtiles, ROT0, "Mylstar", "Tylz (prototype)", GAME_IMPERFECT_SOUND ) // modified sound hw? |
| 2496 | 2496 | GAME( 1984, argusg, 0, gottlieb1, argusg, ramtiles, ROT0, "Gottlieb", "Argus (Gottlieb, prototype)" , 0) // aka Guardian / Protector? |
| r14746 | r14747 | |
| 2498 | 2498 | GAME( 1983, mplanetsuk,mplanets, gottlieb1, mplanets, romtiles, ROT270, "Gottlieb (Taitel license)", "Mad Planets (UK)", 0 ) |
| 2499 | 2499 | GAME( 1983, krull, 0, gottlieb1, krull, ramtiles, ROT270, "Gottlieb", "Krull", 0 ) |
| 2500 | 2500 | GAME( 1983, kngtmare, 0, gottlieb1, kngtmare, romtiles, ROT0, "Gottlieb", "Knightmare (prototype)", GAME_NO_SOUND ) |
| 2501 | | GAME( 1983, sqbert, 0, qbert, qbert, romtiles, ROT270, "Mylstar", "Faster, Harder, More Challenging Q*bert (prototype)", GAME_IMPERFECT_SOUND ) |
| 2502 | | GAME( 1983, qbertqub, 0, qbert, qbertqub, romtiles, ROT270, "Mylstar", "Q*bert's Qubes", GAME_IMPERFECT_SOUND ) |
| 2501 | GAME( 1983, sqbert, 0, qbert, qbert, romtiles, ROT270, "Mylstar", "Faster, Harder, More Challenging Q*bert (prototype)", GAME_IMPERFECT_SOUND ) |
| 2502 | GAME( 1983, qbertqub, 0, qbert, qbertqub, romtiles, ROT270, "Mylstar", "Q*bert's Qubes", GAME_IMPERFECT_SOUND ) |
| 2503 | 2503 | GAME( 1984, curvebal, 0, gottlieb1, curvebal, romtiles, ROT270, "Mylstar", "Curve Ball", 0 ) |
| 2504 | 2504 | |
| 2505 | 2505 | /* games using rev 2 sound board */ |
src/emu/sound/votrax.c
| r14746 | r14747 | |
| 95 | 95 | // it is only an approximation |
| 96 | 96 | const double votrax_sc01_device::s_glottal_wave[16] = |
| 97 | 97 | { |
| 98 | | 0, |
| 99 | | 16.0/22.0, |
| 100 | | -22.0/22.0, |
| 101 | | -17.0/22.0, |
| 102 | | -15.0/22.0, |
| 103 | | -10.0/22.0, |
| 104 | | -7.0/22.0, |
| 98 | 0, |
| 99 | 16.0/22.0, |
| 100 | -22.0/22.0, |
| 101 | -17.0/22.0, |
| 102 | -15.0/22.0, |
| 103 | -10.0/22.0, |
| 104 | -7.0/22.0, |
| 105 | 105 | -4.0/22.0, |
| 106 | | 0, |
| 107 | | 0, |
| 108 | | 0, |
| 109 | | 0, |
| 110 | | 0, |
| 111 | | 0, |
| 112 | | 0, |
| 106 | 0, |
| 107 | 0, |
| 108 | 0, |
| 109 | 0, |
| 110 | 0, |
| 111 | 0, |
| 112 | 0, |
| 113 | 113 | 0 |
| 114 | 114 | }; |
| 115 | 115 | |
| r14746 | r14747 | |
| 161 | 161 | // only 6 bits matter |
| 162 | 162 | m_phoneme = data & 0x3f; |
| 163 | 163 | const UINT8 *rom = m_rom + (m_phoneme << 3); |
| 164 | | mame_printf_debug("%s: STROBE %s (F1=%X F2=%X FC=%X F3=%X F2Q=%X VA=%X FA=%X CL=%X CLD=%X VD=%X PAC=%X PH=%02X)\n", |
| 164 | mame_printf_debug("%s: STROBE %s (F1=%X F2=%X FC=%X F3=%X F2Q=%X VA=%X FA=%X CL=%X CLD=%X VD=%X PAC=%X PH=%02X)\n", |
| 165 | 165 | machine().time().as_string(3), s_phoneme_table[m_phoneme], |
| 166 | 166 | rom[0] >> 4, rom[1] >> 4, rom[2] >> 4, rom[3] >> 4, rom[4] >> 4, rom[5] >> 4, rom[6] >> 4, |
| 167 | 167 | rom[3] & 0xf, rom[4] & 0xf, rom[5] & 0xf, rom[6] & 0xf, rom[7]); |
| 168 | | |
| 168 | |
| 169 | 169 | // the STROBE signal resets the phoneme counter |
| 170 | 170 | m_counter_84 = 0xf; |
| 171 | | |
| 171 | |
| 172 | 172 | // not in the schematics, but necessary to fully reset the request latch |
| 173 | 173 | m_latch_92 = 0; |
| 174 | 174 | |
| r14746 | r14747 | |
| 179 | 179 | |
| 180 | 180 | |
| 181 | 181 | //------------------------------------------------- |
| 182 | | // inflection_w - handle a write to the |
| 183 | | // inflection bits |
| 182 | // inflection_w - handle a write to the |
| 183 | // inflection bits |
| 184 | 184 | //------------------------------------------------- |
| 185 | 185 | |
| 186 | 186 | WRITE8_MEMBER( votrax_sc01_device::inflection_w ) |
| r14746 | r14747 | |
| 189 | 189 | data &= 3; |
| 190 | 190 | if (m_inflection == data) |
| 191 | 191 | return; |
| 192 | | |
| 192 | |
| 193 | 193 | // append an inflection marker |
| 194 | 194 | m_stream->update(); |
| 195 | 195 | m_inflection = data; |
| r14746 | r14747 | |
| 202 | 202 | //************************************************************************** |
| 203 | 203 | |
| 204 | 204 | //------------------------------------------------- |
| 205 | | // update_subphoneme_clock_period - re-compute the |
| 206 | | // period of the sub-phoneme clock, as a multiple |
| 205 | // update_subphoneme_clock_period - re-compute the |
| 206 | // period of the sub-phoneme clock, as a multiple |
| 207 | 207 | // of the master clock |
| 208 | 208 | //------------------------------------------------- |
| 209 | 209 | |
| 210 | 210 | void votrax_sc01_device::update_subphoneme_clock_period() |
| 211 | 211 | { |
| 212 | 212 | assert(m_latch_80 < 128); |
| 213 | | |
| 213 | |
| 214 | 214 | /* |
| 215 | | The sub-phoneme timing circuit is based off the switching capacitor |
| 216 | | technique described in the Votrax patent. Replacing the capacitor |
| 217 | | ladder with [Rx] representing the effective resistance, the circuit |
| 218 | | becomes essentially a pair of op-amps: |
| 215 | The sub-phoneme timing circuit is based off the switching capacitor |
| 216 | technique described in the Votrax patent. Replacing the capacitor |
| 217 | ladder with [Rx] representing the effective resistance, the circuit |
| 218 | becomes essentially a pair of op-amps: |
| 219 | 219 | |
| 220 | | VM |
| 221 | | | i1 |
| 222 | | [R1] |
| 223 | | | Vc |
| 224 | | +----------------------+ |
| 225 | | | +---|C1|---+ | |
| 226 | | [R2] | | | |\ |
| 227 | | |Vb i2 | |\ | +--++\ |
| 228 | | +--[Rx]--+----+-\ | | > |
| 229 | | | | >--+-----+-/ |
| 230 | | [R3] +----++/ Vc |/ |
| 231 | | |i3 | |/ |
| 232 | | +--------+ Va |
| 233 | | | |
| 234 | | [R4] |
| 235 | | | |
| 236 | | 0 |
| 220 | VM |
| 221 | | i1 |
| 222 | [R1] |
| 223 | | Vc |
| 224 | +----------------------+ |
| 225 | | +---|C1|---+ | |
| 226 | [R2] | | | |\ |
| 227 | |Vb i2 | |\ | +--++\ |
| 228 | +--[Rx]--+----+-\ | | > |
| 229 | | | >--+-----+-/ |
| 230 | [R3] +----++/ Vc |/ |
| 231 | |i3 | |/ |
| 232 | +--------+ Va |
| 233 | | |
| 234 | [R4] |
| 235 | | |
| 236 | 0 |
| 237 | 237 | |
| 238 | | We have two op-amps, the left used as a standard amplifier, the right |
| 239 | | one as a comparator. The circuit triggers when the two inputs of the |
| 240 | | right op-amp are equal. |
| 238 | We have two op-amps, the left used as a standard amplifier, the right |
| 239 | one as a comparator. The circuit triggers when the two inputs of the |
| 240 | right op-amp are equal. |
| 241 | 241 | |
| 242 | | The left part of the circuit (before C1) is simply a current injector. |
| 243 | | It's all made of resistors, there's no modulated input, so everything |
| 244 | | is going to be constant. If you don't know about op-amps used as |
| 245 | | amplifiers, you just need to know that it forces its two inputs to |
| 246 | | have the same voltage while not sending or providing any current |
| 247 | | through there (only though its output in fact). |
| 242 | The left part of the circuit (before C1) is simply a current injector. |
| 243 | It's all made of resistors, there's no modulated input, so everything |
| 244 | is going to be constant. If you don't know about op-amps used as |
| 245 | amplifiers, you just need to know that it forces its two inputs to |
| 246 | have the same voltage while not sending or providing any current |
| 247 | through there (only though its output in fact). |
| 248 | 248 | |
| 249 | | In the schema, the injected current is i2. Basic equations apply: |
| 250 | | Va = R4.i3 |
| 251 | | Vb = Va + R3.i3 |
| 252 | | Vb = Va + Rx.i2 |
| 253 | | Vc = Vb + R2.i1 |
| 254 | | VM = Vc + R1.i1 |
| 255 | | i1 = i2 + i3 |
| 249 | In the schema, the injected current is i2. Basic equations apply: |
| 250 | Va = R4.i3 |
| 251 | Vb = Va + R3.i3 |
| 252 | Vb = Va + Rx.i2 |
| 253 | Vc = Vb + R2.i1 |
| 254 | VM = Vc + R1.i1 |
| 255 | i1 = i2 + i3 |
| 256 | 256 | |
| 257 | | And the tipping happens when the voltage on the right of C1 reaches |
| 258 | | Vc, so: |
| 259 | | Vc = Va + i2.T/C1 |
| 257 | And the tipping happens when the voltage on the right of C1 reaches |
| 258 | Vc, so: |
| 259 | Vc = Va + i2.T/C1 |
| 260 | 260 | |
| 261 | | (i2 being a constant, the integration is kinda easy) |
| 261 | (i2 being a constant, the integration is kinda easy) |
| 262 | 262 | |
| 263 | | Some maths later: |
| 264 | | R3.i3 = Rx.i2 -> i3 = Rx/R3.i2 |
| 265 | | i1 = (1+Rx/R3).i2 |
| 266 | | Va + (Rx + R2 + R2.Rx/R3).i2 = Va + T/C1.i2 |
| 267 | | T = C1*(Rx*(1+R2/R3) + R2) |
| 263 | Some maths later: |
| 264 | R3.i3 = Rx.i2 -> i3 = Rx/R3.i2 |
| 265 | i1 = (1+Rx/R3).i2 |
| 266 | Va + (Rx + R2 + R2.Rx/R3).i2 = Va + T/C1.i2 |
| 267 | T = C1*(Rx*(1+R2/R3) + R2) |
| 268 | 268 | |
| 269 | | Which isn't, interestingly though not surprisingly, dependant on Vm, |
| 270 | | R1 or R4. And you have to round it to the next multiple of |
| 271 | | 0.2ms+0.1ms due to the clocking on p2 and its offset to p1 (charging |
| 272 | | only happens on p1 active), and add one p1/p2 cycle (0.2ms) for the |
| 273 | | discharge. |
| 269 | Which isn't, interestingly though not surprisingly, dependant on Vm, |
| 270 | R1 or R4. And you have to round it to the next multiple of |
| 271 | 0.2ms+0.1ms due to the clocking on p2 and its offset to p1 (charging |
| 272 | only happens on p1 active), and add one p1/p2 cycle (0.2ms) for the |
| 273 | discharge. |
| 274 | 274 | |
| 275 | | So now you have your base clock, which you have to multiply by 16 to |
| 276 | | get the phoneme length. |
| 275 | So now you have your base clock, which you have to multiply by 16 to |
| 276 | get the phoneme length. |
| 277 | 277 | |
| 278 | | r2 = 9e3 |
| 279 | | r3 = 1e3 |
| 280 | | c1 = 1000e-12 |
| 281 | | rx = 1/(5KHz * cx) |
| 278 | r2 = 9e3 |
| 279 | r3 = 1e3 |
| 280 | c1 = 1000e-12 |
| 281 | rx = 1/(5KHz * cx) |
| 282 | 282 | */ |
| 283 | 283 | |
| 284 | 284 | // determine total capacitance |
| r14746 | r14747 | |
| 290 | 290 | if ((m_latch_80 & 0x10) != 0) cx += 86e-12; |
| 291 | 291 | if ((m_latch_80 & 0x20) != 0) cx += 173e-12; |
| 292 | 292 | if ((m_latch_80 & 0x40) != 0) cx += 345e-12; |
| 293 | | |
| 293 | |
| 294 | 294 | // apply the equation above to determine charging time |
| 295 | 295 | // note that the 5kHz listed above for P1 is for a nominal master |
| 296 | 296 | // clock frequency of 1.28MHz, meaning it is master clock / 128 |
| r14746 | r14747 | |
| 298 | 298 | double p1_frequency = double(m_master_clock_freq) / double(1 << (P_CLOCK_BIT + 2)); |
| 299 | 299 | double rx = 1.0 / (p1_frequency * cx); |
| 300 | 300 | double period = 1000e-12 * (rx * (1.0 + 9e3 / 1e3) + 9e3); |
| 301 | | |
| 301 | |
| 302 | 302 | // convert to master clock cycles and round up |
| 303 | 303 | m_subphoneme_period = UINT32(ceil(period * double(m_master_clock_freq))); |
| 304 | 304 | } |
| r14746 | r14747 | |
| 489 | 489 | double fpeak = sqrt(fabs(k[0]*k[1]-k[2]))/(2*M_PI*k[2]); |
| 490 | 490 | double zc = 2*M_PI*fpeak/tan(M_PI*fpeak/fs); |
| 491 | 491 | |
| 492 | | double m0 = zc*k[0]; |
| 493 | | double m1 = zc*k[1]; |
| 494 | | double m2 = zc*zc*k[2]; |
| 492 | double m0 = zc*k[0]; |
| 493 | double m1 = zc*k[1]; |
| 494 | double m2 = zc*zc*k[2]; |
| 495 | 495 | |
| 496 | 496 | a[0] = 1+m0; |
| 497 | 497 | a[1] = 3+m0; |
| r14746 | r14747 | |
| 578 | 578 | |
| 579 | 579 | // update master clock |
| 580 | 580 | m_master_clock ^= 1; |
| 581 | | |
| 581 | |
| 582 | 582 | // on the falling edge of the master clock, advance the 10-bit counter at 34 |
| 583 | 583 | UINT8 old_latch_72 = m_latch_72; |
| 584 | 584 | if (m_master_clock == 0) |
| r14746 | r14747 | |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | // derive beta 1 clock: |
| 593 | | // set if m_latch_70.0 == 1 |
| 594 | | // reset if m_latch_70.0 == 0 |
| 595 | | // UINT8 old_beta1 = m_beta1; |
| 593 | // set if m_latch_70.0 == 1 |
| 594 | // reset if m_latch_70.0 == 0 |
| 595 | // UINT8 old_beta1 = m_beta1; |
| 596 | 596 | m_beta1 = BIT(m_latch_70, 0); |
| 597 | 597 | |
| 598 | 598 | // derive p2 clock: |
| 599 | | // set if (m_counter_34.P_CLOCK_BIT & clock) == 1 |
| 600 | | // reset if (m_counter_34.P_CLOCK_BIT == 0) |
| 599 | // set if (m_counter_34.P_CLOCK_BIT & clock) == 1 |
| 600 | // reset if (m_counter_34.P_CLOCK_BIT == 0) |
| 601 | 601 | UINT8 old_p2 = m_p2; |
| 602 | 602 | if (BIT(m_counter_34, P_CLOCK_BIT) & m_master_clock) |
| 603 | 603 | m_p2 = 1; |
| 604 | 604 | else if (!BIT(m_counter_34, P_CLOCK_BIT)) |
| 605 | 605 | m_p2 = 0; |
| 606 | | |
| 606 | |
| 607 | 607 | // derive p1 clock: |
| 608 | | // set if (!m_counter_34.P_CLOCK_BIT & clock) == 1 |
| 609 | | // reset if (m_counter_34.P_CLOCK_BIT == 1) |
| 610 | | // UINT8 old_p1 = m_p1; |
| 608 | // set if (!m_counter_34.P_CLOCK_BIT & clock) == 1 |
| 609 | // reset if (m_counter_34.P_CLOCK_BIT == 1) |
| 610 | // UINT8 old_p1 = m_p1; |
| 611 | 611 | if (BIT(~m_counter_34, P_CLOCK_BIT) & m_master_clock) |
| 612 | 612 | m_p1 = 1; |
| 613 | 613 | else if (BIT(m_counter_34, P_CLOCK_BIT)) |
| 614 | 614 | m_p1 = 0; |
| 615 | | |
| 615 | |
| 616 | 616 | // derive phi2 clock: |
| 617 | | // set if (m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 618 | | // reset if (m_counter_34.PHI_CLOCK_BIT == 0) |
| 617 | // set if (m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 618 | // reset if (m_counter_34.PHI_CLOCK_BIT == 0) |
| 619 | 619 | UINT8 old_phi2 = m_phi2; |
| 620 | 620 | if (BIT(m_counter_34, PHI_CLOCK_BIT) & m_master_clock) |
| 621 | 621 | m_phi2 = 1; |
| 622 | 622 | else if (!BIT(m_counter_34, PHI_CLOCK_BIT)) |
| 623 | 623 | m_phi2 = 0; |
| 624 | | |
| 624 | |
| 625 | 625 | // derive phi1 clock: |
| 626 | | // set if (!m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 627 | | // reset if (m_counter_34.PHI_CLOCK_BIT == 1) |
| 626 | // set if (!m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 627 | // reset if (m_counter_34.PHI_CLOCK_BIT == 1) |
| 628 | 628 | UINT8 old_phi1 = m_phi1; |
| 629 | 629 | if (BIT(~m_counter_34, PHI_CLOCK_BIT) & m_master_clock) |
| 630 | 630 | m_phi1 = 1; |
| r14746 | r14747 | |
| 632 | 632 | m_phi1 = 0; |
| 633 | 633 | |
| 634 | 634 | // derive alternate phi2 clock: |
| 635 | | // set if (m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 636 | | // reset if (m_counter_34.PHI_CLOCK_BIT == 0) |
| 635 | // set if (m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 636 | // reset if (m_counter_34.PHI_CLOCK_BIT == 0) |
| 637 | 637 | UINT8 old_phi2_20 = m_phi2_20; |
| 638 | 638 | if (BIT(m_counter_34, PHI_CLOCK_BIT + 2) & m_master_clock) |
| 639 | 639 | m_phi2_20 = 1; |
| 640 | 640 | else if (!BIT(m_counter_34, PHI_CLOCK_BIT + 2)) |
| 641 | 641 | m_phi2_20 = 0; |
| 642 | | |
| 642 | |
| 643 | 643 | // derive alternate phi1 clock: |
| 644 | | // set if (!m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 645 | | // reset if (m_counter_34.PHI_CLOCK_BIT == 1) |
| 646 | | // UINT8 old_phi1_20 = m_phi1_20; |
| 644 | // set if (!m_counter_34.PHI_CLOCK_BIT & clock) == 1 |
| 645 | // reset if (m_counter_34.PHI_CLOCK_BIT == 1) |
| 646 | // UINT8 old_phi1_20 = m_phi1_20; |
| 647 | 647 | if (BIT(~m_counter_34, PHI_CLOCK_BIT + 2) & m_master_clock) |
| 648 | 648 | m_phi1_20 = 1; |
| 649 | 649 | else if (BIT(m_counter_34, PHI_CLOCK_BIT + 2)) |
| 650 | 650 | m_phi1_20 = 0; |
| 651 | 651 | |
| 652 | 652 | // determine rising edges of each clock of interest |
| 653 | | // UINT8 beta1_rising = (old_beta1 ^ m_beta1) & m_beta1; |
| 653 | // UINT8 beta1_rising = (old_beta1 ^ m_beta1) & m_beta1; |
| 654 | 654 | UINT8 p2_rising = (old_p2 ^ m_p2) & m_p2; |
| 655 | | // UINT8 p1_rising = (old_p1 ^ m_p1) & m_p1; |
| 655 | // UINT8 p1_rising = (old_p1 ^ m_p1) & m_p1; |
| 656 | 656 | UINT8 phi2_rising = (old_phi2 ^ m_phi2) & m_phi2; |
| 657 | 657 | UINT8 phi1_rising = (old_phi1 ^ m_phi1) & m_phi1; |
| 658 | 658 | UINT8 phi2_20_rising = (old_phi2_20 ^ m_phi2_20) & m_phi2_20; |
| 659 | | // UINT8 phi1_20_rising = (old_phi1_20 ^ m_phi1_20) & m_phi1_20; |
| 659 | // UINT8 phi1_20_rising = (old_phi1_20 ^ m_phi1_20) & m_phi1_20; |
| 660 | 660 | UINT8 a0_rising = BIT((old_latch_72 ^ m_latch_72) & m_latch_72, 0); |
| 661 | 661 | UINT8 a2_rising = BIT((old_latch_72 ^ m_latch_72) & m_latch_72, 2); |
| 662 | 662 | UINT8 _125k_rising = BIT((old_latch_72 ^ m_latch_72) & m_latch_72, 3); |
| r14746 | r14747 | |
| 673 | 673 | UINT8 old_clock_88 = m_clock_88; |
| 674 | 674 | m_clock_88 = !m_latch_42; //!(m_latch_42 | m_phi1); -- figure 7 seems to be wrong here |
| 675 | 675 | UINT8 clock_88_rising = (old_clock_88 ^ m_clock_88) & m_clock_88; |
| 676 | | |
| 676 | |
| 677 | 677 | // the A/R line holds the counter in reset except during phoneme processing, |
| 678 | 678 | // when it is clocked on the rising edge of the subphoneme timer clock |
| 679 | 679 | if (m_internal_request != CLEAR_LINE) |
| r14746 | r14747 | |
| 683 | 683 | m_counter_84 = (m_counter_84 - 1) & 0x0f; |
| 684 | 684 | mame_printf_debug("counter=%d\n", m_counter_84); |
| 685 | 685 | } |
| 686 | | |
| 686 | |
| 687 | 687 | // clock the zero count latch |
| 688 | 688 | if (p2_rising) |
| 689 | 689 | m_latch_92 = ((m_counter_84 == 0) | (m_latch_92 << 1)) & 3; |
| 690 | | |
| 690 | |
| 691 | 691 | // once both bits are set, the request line goes high |
| 692 | 692 | if (m_latch_92 == 3) |
| 693 | 693 | { |
| r14746 | r14747 | |
| 708 | 708 | UINT8 romdata = m_rom[(m_phoneme << 3) | ((m_counter_34 >> 4) & 7)]; |
| 709 | 709 | |
| 710 | 710 | // update the ROM data; ROM format is (upper nibble/lower nibble) |
| 711 | | // +00 = F1 parameter / 0 |
| 712 | | // +01 = F2 parameter / 0 |
| 713 | | // +02 = FC parameter / 0 |
| 714 | | // +03 = F3 parameter / CL |
| 715 | | // +04 = F2Q Parameter / CLD |
| 716 | | // +05 = VA Parameter / VD |
| 717 | | // +06 = FA Parameter / PAC |
| 718 | | // +07 = Phoneme timing (full 7 bits) |
| 719 | | |
| 711 | // +00 = F1 parameter / 0 |
| 712 | // +01 = F2 parameter / 0 |
| 713 | // +02 = FC parameter / 0 |
| 714 | // +03 = F3 parameter / CL |
| 715 | // +04 = F2Q Parameter / CLD |
| 716 | // +05 = VA Parameter / VD |
| 717 | // +06 = FA Parameter / PAC |
| 718 | // +07 = Phoneme timing (full 7 bits) |
| 719 | |
| 720 | 720 | // latch a new value from ROM on phi2 |
| 721 | 721 | UINT8 a = m_latch_72 & 7; |
| 722 | 722 | UINT8 romdata_swapped; |
| r14746 | r14747 | |
| 728 | 728 | case 3: |
| 729 | 729 | m_srff_132 = m_srff_114 & BIT(~romdata, 3); |
| 730 | 730 | break; |
| 731 | | |
| 731 | |
| 732 | 732 | // update CLD |
| 733 | 733 | case 4: |
| 734 | 734 | romdata_swapped = (BIT(romdata, 0) << 3) | (BIT(romdata, 1) << 2) | (BIT(romdata, 2) << 1) | (BIT(romdata, 3) << 0); |
| 735 | 735 | if (m_counter_84 != 0 && romdata_swapped == (m_counter_84 ^ 0xf)) |
| 736 | 736 | m_srff_114 = 1; |
| 737 | 737 | break; |
| 738 | | |
| 738 | |
| 739 | 739 | // update VD |
| 740 | 740 | case 5: |
| 741 | 741 | romdata_swapped = (BIT(romdata, 0) << 3) | (BIT(romdata, 1) << 2) | (BIT(romdata, 2) << 1) | (BIT(romdata, 3) << 0); |
| 742 | 742 | if (m_counter_84 != 0 && romdata_swapped == (m_counter_84 ^ 0xf)) |
| 743 | 743 | m_srff_112 = 1; |
| 744 | 744 | break; |
| 745 | | |
| 745 | |
| 746 | 746 | // update FF == PAC & (VA | FA) |
| 747 | 747 | case 6: |
| 748 | 748 | m_srff_142 = BIT(romdata, 3); |
| 749 | 749 | break; |
| 750 | | |
| 750 | |
| 751 | 751 | // update PH |
| 752 | 752 | case 7: |
| 753 | 753 | if (m_latch_80 != (romdata & 0x7f)) |
| r14746 | r14747 | |
| 762 | 762 | break; |
| 763 | 763 | } |
| 764 | 764 | } |
| 765 | | |
| 765 | |
| 766 | 766 | //============================================== |
| 767 | 767 | // |
| 768 | 768 | // Glottal circuit (patent figure 6) |
| r14746 | r14747 | |
| 787 | 787 | m_counter_224 = (m_counter_224 + 1) & 0xf; |
| 788 | 788 | } |
| 789 | 789 | } |
| 790 | | |
| 790 | |
| 791 | 791 | // clock remaining glottal counters (220, 222, 236) on rising edge of phi2 |
| 792 | 792 | if (phi2_20_rising) |
| 793 | 793 | { |
| r14746 | r14747 | |
| 800 | 800 | else |
| 801 | 801 | m_counter_220 = (m_counter_220 + 1) & 0xf; |
| 802 | 802 | } |
| 803 | | |
| 803 | |
| 804 | 804 | // counter 222 is always enabled |
| 805 | 805 | if (1) |
| 806 | 806 | { |
| r14746 | r14747 | |
| 810 | 810 | else |
| 811 | 811 | m_counter_222 = (m_counter_222 + 1) & 0xf; |
| 812 | 812 | } |
| 813 | | |
| 813 | |
| 814 | 814 | // counter 236 is always enabled |
| 815 | 815 | if (1) |
| 816 | 816 | { |
| 817 | 817 | m_counter_236 = (m_counter_236 + 1) & 0xf; |
| 818 | | |
| 818 | |
| 819 | 819 | // rising edge of Q1 from counter 236 clocks counter 234 |
| 820 | 820 | if ((m_counter_236 & 0x3) == 0x2) |
| 821 | 821 | { |
| r14746 | r14747 | |
| 825 | 825 | } |
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | | |
| 828 | |
| 829 | 829 | // update FGATE state |
| 830 | 830 | if (counter_220_tc) |
| 831 | 831 | m_fgate = 0; |
| 832 | 832 | if (counter_224_tc) |
| 833 | 833 | m_fgate = 1; |
| 834 | | |
| 834 | |
| 835 | 835 | // apply asynchronous clear to counters 234/236 |
| 836 | 836 | if (counter_220_tc && m_phi1_20) |
| 837 | 837 | m_counter_236 = m_counter_234 = 0; |
| 838 | | |
| 838 | |
| 839 | 839 | // derive glottal circuit output signals |
| 840 | 840 | #if !TEMP_HACKS |
| 841 | 841 | UINT8 old_glottal_sync = m_glottal_sync; |
| 842 | 842 | #endif |
| 843 | 843 | m_glottal_sync = (m_counter_234 == 0); |
| 844 | 844 | glottal_out = s_glottal_wave[m_counter_234]; |
| 845 | | |
| 845 | |
| 846 | 846 | //============================================== |
| 847 | 847 | // |
| 848 | 848 | // Transition circuit (patent figure 3a/3b) |
| 849 | 849 | // |
| 850 | 850 | //============================================== |
| 851 | | |
| 851 | |
| 852 | 852 | // divide 1.25k clock by 2 (lower-left of 46) |
| 853 | 853 | UINT8 old_0625_clock = m_0625_clock; |
| 854 | 854 | if (_125k_rising) |
| 855 | 855 | m_0625_clock = !m_0625_clock; |
| 856 | 856 | UINT8 _0625_rising = (old_0625_clock ^ m_0625_clock) & m_0625_clock; |
| 857 | | |
| 857 | |
| 858 | 858 | // update counter above |
| 859 | 859 | if (_0625_rising) |
| 860 | 860 | { |
| r14746 | r14747 | |
| 863 | 863 | else |
| 864 | 864 | m_counter_46 = (m_counter_46 + 1) & 0xf; |
| 865 | 865 | } |
| 866 | | |
| 866 | |
| 867 | 867 | // and then the latch to the right |
| 868 | 868 | if (a2_rising) |
| 869 | 869 | m_latch_46 = (BIT(m_counter_46, 1) << 0) | |
| r14746 | r14747 | |
| 885 | 885 | if (!(m_srff_142 & !((m_fa == 0) & (m_va == 0))) && (m_latch_46 & 0x3) == 0x3) |
| 886 | 886 | ram_write = 1; |
| 887 | 887 | break; |
| 888 | | |
| 888 | |
| 889 | 889 | case 5: |
| 890 | 890 | if ((m_latch_46 & 0xc) == 0xc && m_srff_112) |
| 891 | 891 | ram_write = 1; |
| 892 | 892 | break; |
| 893 | | |
| 893 | |
| 894 | 894 | case 6: |
| 895 | 895 | if ((m_latch_46 & 0xc) == 0xc && m_srff_114) |
| 896 | 896 | ram_write = 1; |
| 897 | 897 | break; |
| 898 | 898 | } |
| 899 | | |
| 899 | |
| 900 | 900 | // gate on the phi2 clock (OR gate @ 172) |
| 901 | 901 | ram_write &= m_phi2; |
| 902 | | |
| 902 | |
| 903 | 903 | // write the transitioned values to RAM if requested |
| 904 | 904 | // (note we consolidate the serial addition and clocking steps here) |
| 905 | 905 | if (ram_write) |
| r14746 | r14747 | |
| 907 | 907 | UINT8 old = (m_latch_168 << 4) | m_latch_170; |
| 908 | 908 | m_ram[a] = old - (old >> 3) + ((romdata & 0xf0) >> 3); |
| 909 | 909 | } |
| 910 | | |
| 910 | |
| 911 | 911 | // latch some parameter values on rising edge of phi2 |
| 912 | 912 | if (phi2_rising) |
| 913 | 913 | { |
| r14746 | r14747 | |
| 916 | 916 | case 2: |
| 917 | 917 | m_fc = m_latch_168; |
| 918 | 918 | break; |
| 919 | | |
| 919 | |
| 920 | 920 | case 5: |
| 921 | 921 | m_va = m_latch_168; |
| 922 | 922 | break; |
| 923 | | |
| 923 | |
| 924 | 924 | case 6: |
| 925 | 925 | m_fa = m_latch_168; |
| 926 | 926 | break; |
| 927 | 927 | } |
| 928 | 928 | } |
| 929 | | |
| 929 | |
| 930 | 930 | // latch remaining parameter values on rising edge of (phi2 & glottal sync) |
| 931 | 931 | #if TEMP_HACKS |
| 932 | 932 | if (phi2_rising) |
| r14746 | r14747 | |
| 940 | 940 | case 0: |
| 941 | 941 | m_f1 = m_latch_168; |
| 942 | 942 | break; |
| 943 | | |
| 943 | |
| 944 | 944 | case 1: |
| 945 | 945 | m_f2 = (m_latch_168 << 1) | (m_latch_170 >> 3); |
| 946 | 946 | break; |
| 947 | | |
| 947 | |
| 948 | 948 | case 3: |
| 949 | 949 | m_f3 = m_latch_168; |
| 950 | 950 | break; |
| 951 | | |
| 951 | |
| 952 | 952 | case 4: |
| 953 | 953 | m_f2q = m_latch_168; |
| 954 | 954 | break; |
| 955 | 955 | } |
| 956 | | |
| 956 | |
| 957 | 957 | // latch value from RAM on rising edge of phi1 |
| 958 | 958 | if (phi1_rising) |
| 959 | 959 | { |
| r14746 | r14747 | |
| 966 | 966 | // Noise generator circuit (patent figure 8) |
| 967 | 967 | // |
| 968 | 968 | //============================================== |
| 969 | | |
| 969 | |
| 970 | 970 | // nose is clocked by the NOR of /FA and P1 |
| 971 | 971 | UINT8 old_noise_clock = m_noise_clock; |
| 972 | 972 | m_noise_clock = !((m_fa == 0) | m_p1); |
| 973 | 973 | UINT8 noise_clock_rising = (old_noise_clock ^ m_noise_clock) & m_noise_clock; |
| 974 | 974 | UINT8 noise_clock_falling = (old_noise_clock ^ m_noise_clock) & old_noise_clock; |
| 975 | | |
| 975 | |
| 976 | 976 | // falling edge clocks the shift register |
| 977 | 977 | if (noise_clock_falling) |
| 978 | 978 | { |
| r14746 | r14747 | |
| 981 | 981 | // XOR'ed input goes into d4, which shifts in to d2, then d3, then d1 |
| 982 | 982 | // thus the full 18-bit value is effectively |
| 983 | 983 | // |
| 984 | | // d4 = (m_shift_252 >> 0) & 0x1f; |
| 985 | | // d2 = (m_shift_252 >> 5) & 0x1f; |
| 986 | | // d3 = (m_shift_252 >> 10) & 0xf; |
| 987 | | // d1 = (m_shift_252 >> 14) & 0xf; |
| 984 | // d4 = (m_shift_252 >> 0) & 0x1f; |
| 985 | // d2 = (m_shift_252 >> 5) & 0x1f; |
| 986 | // d3 = (m_shift_252 >> 10) & 0xf; |
| 987 | // d1 = (m_shift_252 >> 14) & 0xf; |
| 988 | 988 | // |
| 989 | 989 | // input at the low end is ((d1+4 ^ d2+5) ^ (d4+4 ^ d4+5)) ^ !(counter2 | counter3) |
| 990 | 990 | // output is tapped at d3+4 |
| 991 | 991 | |
| 992 | 992 | UINT32 old_shift = m_shift_252; |
| 993 | 993 | m_shift_252 <<= 1; |
| 994 | | m_shift_252 |= ((BIT(old_shift, 17) ^ BIT(old_shift, 9)) ^ (BIT(old_shift, 3) ^ BIT(old_shift, 4))) ^ |
| 994 | m_shift_252 |= ((BIT(old_shift, 17) ^ BIT(old_shift, 9)) ^ (BIT(old_shift, 3) ^ BIT(old_shift, 4))) ^ |
| 995 | 995 | ((m_counter_250 & 0xc) == 0); |
| 996 | 996 | } |
| 997 | | |
| 997 | |
| 998 | 998 | // rising edge clocks the counter |
| 999 | 999 | if (noise_clock_rising) |
| 1000 | 1000 | { |
| r14746 | r14747 | |
| 1004 | 1004 | else |
| 1005 | 1005 | m_counter_250 = (m_counter_250 + 1) & 0xf; |
| 1006 | 1006 | } |
| 1007 | | |
| 1007 | |
| 1008 | 1008 | // compute final noise out signal |
| 1009 | 1009 | noise_out_digital = !(BIT(m_shift_252, 13) & (m_fgate | (m_va == 0))); |
| 1010 | 1010 | } |
| r14746 | r14747 | |
| 1132 | 1132 | double s4_out = apply_filter(m_s4i_hist, m_s4_hist, a, b); |
| 1133 | 1133 | shift_hist(s4_out, m_s4_hist, 4); |
| 1134 | 1134 | |
| 1135 | | |
| 1135 | |
| 1136 | 1136 | // TODO: apply closure circuit (undocumented) |
| 1137 | | |
| 1137 | |
| 1138 | 1138 | // output the current result |
| 1139 | 1139 | *dest++ = INT16(s4_out * 4000); |
| 1140 | 1140 | } |
| r14746 | r14747 | |
| 1168 | 1168 | m_stream = stream_alloc(0, 1, m_master_clock_freq / 16); |
| 1169 | 1169 | m_phoneme_timer = timer_alloc(); |
| 1170 | 1170 | m_rom = subregion("phoneme")->base(); |
| 1171 | | |
| 1171 | |
| 1172 | 1172 | // reset inputs |
| 1173 | 1173 | m_inflection = 0; |
| 1174 | 1174 | m_phoneme = 0x3f; |
| 1175 | | |
| 1175 | |
| 1176 | 1176 | // reset outputs |
| 1177 | 1177 | m_request_func.resolve(m_request_cb, *this); |
| 1178 | 1178 | m_request_state = ASSERT_LINE; |
| 1179 | 1179 | m_internal_request = ASSERT_LINE; |
| 1180 | | |
| 1180 | |
| 1181 | 1181 | // save inputs |
| 1182 | 1182 | save_item(NAME(m_inflection)); |
| 1183 | 1183 | save_item(NAME(m_phoneme)); |
| 1184 | | |
| 1184 | |
| 1185 | 1185 | // save outputs |
| 1186 | 1186 | save_item(NAME(m_request_state)); |
| 1187 | 1187 | save_item(NAME(m_internal_request)); |
| 1188 | | |
| 1188 | |
| 1189 | 1189 | // save timing circuit |
| 1190 | 1190 | save_item(NAME(m_master_clock_freq)); |
| 1191 | 1191 | save_item(NAME(m_master_clock)); |
| r14746 | r14747 | |
| 1203 | 1203 | save_item(NAME(m_latch_42)); |
| 1204 | 1204 | save_item(NAME(m_counter_84)); |
| 1205 | 1205 | save_item(NAME(m_latch_92)); |
| 1206 | | |
| 1206 | |
| 1207 | 1207 | // save low parameter clocking |
| 1208 | 1208 | save_item(NAME(m_srff_132)); |
| 1209 | 1209 | save_item(NAME(m_srff_114)); |
| 1210 | 1210 | save_item(NAME(m_srff_112)); |
| 1211 | 1211 | save_item(NAME(m_srff_142)); |
| 1212 | 1212 | save_item(NAME(m_latch_80)); |
| 1213 | | |
| 1213 | |
| 1214 | 1214 | // save glottal circuit |
| 1215 | 1215 | save_item(NAME(m_counter_220)); |
| 1216 | 1216 | save_item(NAME(m_counter_222)); |
| r14746 | r14747 | |
| 1234 | 1234 | save_item(NAME(m_f2q)); |
| 1235 | 1235 | save_item(NAME(m_va)); |
| 1236 | 1236 | save_item(NAME(m_fa)); |
| 1237 | | |
| 1237 | |
| 1238 | 1238 | // save noise generator circuit |
| 1239 | 1239 | save_item(NAME(m_noise_clock)); |
| 1240 | 1240 | save_item(NAME(m_shift_252)); |
| r14746 | r14747 | |
| 1263 | 1263 | { |
| 1264 | 1264 | // set the initial state |
| 1265 | 1265 | m_stream->update(); |
| 1266 | | |
| 1266 | |
| 1267 | 1267 | // reset inputs |
| 1268 | 1268 | m_phoneme = 0x3f; |
| 1269 | 1269 | m_request_func(m_internal_request = m_request_state = ASSERT_LINE); |
| 1270 | | |
| 1270 | |
| 1271 | 1271 | // reset timing circuit |
| 1272 | 1272 | m_master_clock = 0; |
| 1273 | 1273 | m_counter_34 = 0; |
| r14746 | r14747 | |
| 1284 | 1284 | m_latch_42 = 0; |
| 1285 | 1285 | m_counter_84 = 0; |
| 1286 | 1286 | m_latch_92 = 0; |
| 1287 | | |
| 1287 | |
| 1288 | 1288 | // reset low parameter clocking |
| 1289 | 1289 | m_srff_132 = 0; |
| 1290 | 1290 | m_srff_114 = 0; |
| r14746 | r14747 | |
| 1292 | 1292 | m_srff_142 = 0; |
| 1293 | 1293 | m_latch_80 = 50; |
| 1294 | 1294 | update_subphoneme_clock_period(); |
| 1295 | | |
| 1295 | |
| 1296 | 1296 | // reset glottal circuit |
| 1297 | 1297 | m_counter_220 = 0; |
| 1298 | 1298 | m_counter_222 = 0; |
| r14746 | r14747 | |
| 1301 | 1301 | m_counter_236 = 0; |
| 1302 | 1302 | m_fgate = 0; |
| 1303 | 1303 | m_glottal_sync = 0; |
| 1304 | | |
| 1304 | |
| 1305 | 1305 | // reset transition circuit |
| 1306 | 1306 | m_0625_clock = 0; |
| 1307 | 1307 | m_counter_46 = 0; |
| r14746 | r14747 | |
| 1316 | 1316 | m_f2q = 0; |
| 1317 | 1317 | m_va = 0; |
| 1318 | 1318 | m_fa = 0; |
| 1319 | | |
| 1319 | |
| 1320 | 1320 | // reset noise circuit |
| 1321 | 1321 | m_noise_clock = 0; |
| 1322 | 1322 | m_shift_252 = 0; |
| r14746 | r14747 | |
| 1339 | 1339 | |
| 1340 | 1340 | //------------------------------------------------- |
| 1341 | 1341 | // device_clock_changed - handle dynamic clock |
| 1342 | | // changes by altering our output frequency |
| 1342 | // changes by altering our output frequency |
| 1343 | 1343 | //------------------------------------------------- |
| 1344 | 1344 | |
| 1345 | 1345 | void votrax_sc01_device::device_clock_changed() |
| r14746 | r14747 | |
| 1354 | 1354 | m_stream->update(); |
| 1355 | 1355 | m_stream->set_sample_rate(newfreq / 16); |
| 1356 | 1356 | } |
| 1357 | | |
| 1357 | |
| 1358 | 1358 | // determine how many clock ticks remained on the phoneme timer |
| 1359 | 1359 | UINT64 remaining = m_phoneme_timer->remaining().as_ticks(m_master_clock_freq); |
| 1360 | | |
| 1360 | |
| 1361 | 1361 | // recompute the master clock |
| 1362 | 1362 | m_master_clock_freq = newfreq; |
| 1363 | 1363 | |
| r14746 | r14747 | |
| 1376 | 1376 | { |
| 1377 | 1377 | // force a stream update |
| 1378 | 1378 | m_stream->update(); |
| 1379 | | |
| 1379 | |
| 1380 | 1380 | // if we're requesting more data, no need for timing |
| 1381 | 1381 | if (m_request_state == ASSERT_LINE) |
| 1382 | 1382 | return; |
| 1383 | | |
| 1383 | |
| 1384 | 1384 | // if we're supposed to have fired, do it now |
| 1385 | 1385 | if (m_internal_request == ASSERT_LINE) |
| 1386 | 1386 | { |
| r14746 | r14747 | |
| 1397 | 1397 | clocks_until_request += m_subphoneme_period - m_subphoneme_count; |
| 1398 | 1398 | clocks_until_request += m_subphoneme_period * (m_counter_84 - 1); |
| 1399 | 1399 | } |
| 1400 | | |
| 1400 | |
| 1401 | 1401 | // plus 1/2 |
| 1402 | 1402 | clocks_until_request = MAX(clocks_until_request, (1 << P_CLOCK_BIT) / 2); |
| 1403 | 1403 | timer.adjust(attotime::from_ticks(clocks_until_request, m_master_clock_freq)); |