trunk/src/mame/audio/cinemat.c
| r17826 | r17827 | |
| 71 | 71 | * |
| 72 | 72 | *************************************/ |
| 73 | 73 | |
| 74 | | static MACHINE_START( generic ) |
| 74 | static SOUND_START( generic ) |
| 75 | 75 | { |
| 76 | 76 | cinemat_state *state = machine.driver_data<cinemat_state>(); |
| 77 | 77 | /* register for save states */ |
| r17826 | r17827 | |
| 91 | 91 | static void generic_init(running_machine &machine, void (*callback)(running_machine &,UINT8, UINT8)) |
| 92 | 92 | { |
| 93 | 93 | cinemat_state *state = machine.driver_data<cinemat_state>(); |
| 94 | | /* call the standard init */ |
| 95 | | MACHINE_RESET_CALL(cinemat); |
| 96 | 94 | |
| 97 | 95 | /* set the sound handler */ |
| 98 | 96 | state->m_sound_handler = callback; |
| r17826 | r17827 | |
| 181 | 179 | } |
| 182 | 180 | } |
| 183 | 181 | |
| 184 | | static MACHINE_RESET( spacewar ) |
| 182 | static SOUND_RESET( spacewar ) |
| 185 | 183 | { |
| 186 | 184 | generic_init(machine, spacewar_sound_w); |
| 187 | 185 | } |
| 188 | 186 | |
| 189 | 187 | MACHINE_CONFIG_FRAGMENT( spacewar_sound ) |
| 190 | | MCFG_MACHINE_START(generic) |
| 191 | | MCFG_MACHINE_RESET(spacewar) |
| 188 | MCFG_SOUND_START(generic) |
| 189 | MCFG_SOUND_RESET(spacewar) |
| 192 | 190 | |
| 193 | 191 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 194 | 192 | |
| r17826 | r17827 | |
| 236 | 234 | samples->start(2, 2); |
| 237 | 235 | } |
| 238 | 236 | |
| 239 | | static MACHINE_RESET( barrier ) |
| 237 | static SOUND_RESET( barrier ) |
| 240 | 238 | { |
| 241 | 239 | generic_init(machine, barrier_sound_w); |
| 242 | 240 | } |
| 243 | 241 | |
| 244 | 242 | MACHINE_CONFIG_FRAGMENT( barrier_sound ) |
| 245 | | MCFG_MACHINE_START(generic) |
| 246 | | MCFG_MACHINE_RESET(barrier) |
| 243 | MCFG_SOUND_START(generic) |
| 244 | MCFG_SOUND_RESET(barrier) |
| 247 | 245 | |
| 248 | 246 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 249 | 247 | |
| r17826 | r17827 | |
| 297 | 295 | set_led_status(machine, 0, ~sound_val & 0x02); |
| 298 | 296 | } |
| 299 | 297 | |
| 300 | | static MACHINE_RESET( speedfrk ) |
| 298 | static SOUND_RESET( speedfrk ) |
| 301 | 299 | { |
| 302 | 300 | generic_init(machine, speedfrk_sound_w); |
| 303 | 301 | } |
| 304 | 302 | |
| 305 | 303 | MACHINE_CONFIG_FRAGMENT( speedfrk_sound ) |
| 306 | | MCFG_MACHINE_START(generic) |
| 307 | | MCFG_MACHINE_RESET(speedfrk) |
| 304 | MCFG_SOUND_START(generic) |
| 305 | MCFG_SOUND_RESET(speedfrk) |
| 308 | 306 | |
| 309 | 307 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 310 | 308 | |
| r17826 | r17827 | |
| 373 | 371 | samples->stop(3); |
| 374 | 372 | } |
| 375 | 373 | |
| 376 | | static MACHINE_RESET( starhawk ) |
| 374 | static SOUND_RESET( starhawk ) |
| 377 | 375 | { |
| 378 | 376 | generic_init(machine, starhawk_sound_w); |
| 379 | 377 | } |
| 380 | 378 | |
| 381 | 379 | MACHINE_CONFIG_FRAGMENT( starhawk_sound ) |
| 382 | | MCFG_MACHINE_START(generic) |
| 383 | | MCFG_MACHINE_RESET(starhawk) |
| 380 | MCFG_SOUND_START(generic) |
| 381 | MCFG_SOUND_RESET(starhawk) |
| 384 | 382 | |
| 385 | 383 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 386 | 384 | |
| r17826 | r17827 | |
| 443 | 441 | samples->start(5, 5); |
| 444 | 442 | } |
| 445 | 443 | |
| 446 | | static MACHINE_RESET( sundance ) |
| 444 | static SOUND_RESET( sundance ) |
| 447 | 445 | { |
| 448 | 446 | generic_init(machine, sundance_sound_w); |
| 449 | 447 | } |
| 450 | 448 | |
| 451 | 449 | MACHINE_CONFIG_FRAGMENT( sundance_sound ) |
| 452 | | MCFG_MACHINE_START(generic) |
| 453 | | MCFG_MACHINE_RESET(sundance) |
| 450 | MCFG_SOUND_START(generic) |
| 451 | MCFG_SOUND_RESET(sundance) |
| 454 | 452 | |
| 455 | 453 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 456 | 454 | |
| r17826 | r17827 | |
| 533 | 531 | } |
| 534 | 532 | } |
| 535 | 533 | |
| 536 | | static MACHINE_RESET( tailg ) |
| 534 | static SOUND_RESET( tailg ) |
| 537 | 535 | { |
| 538 | 536 | generic_init(machine, tailg_sound_w); |
| 539 | 537 | } |
| 540 | 538 | |
| 541 | 539 | MACHINE_CONFIG_FRAGMENT( tailg_sound ) |
| 542 | | MCFG_MACHINE_START(generic) |
| 543 | | MCFG_MACHINE_RESET(tailg) |
| 540 | MCFG_SOUND_START(generic) |
| 541 | MCFG_SOUND_RESET(tailg) |
| 544 | 542 | |
| 545 | 543 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 546 | 544 | |
| r17826 | r17827 | |
| 602 | 600 | samples->start(4, 4); |
| 603 | 601 | } |
| 604 | 602 | |
| 605 | | static MACHINE_RESET( warrior ) |
| 603 | static SOUND_RESET( warrior ) |
| 606 | 604 | { |
| 607 | 605 | generic_init(machine, warrior_sound_w); |
| 608 | 606 | } |
| 609 | 607 | |
| 610 | 608 | MACHINE_CONFIG_FRAGMENT( warrior_sound ) |
| 611 | | MCFG_MACHINE_START(generic) |
| 612 | | MCFG_MACHINE_RESET(warrior) |
| 609 | MCFG_SOUND_START(generic) |
| 610 | MCFG_SOUND_RESET(warrior) |
| 613 | 611 | |
| 614 | 612 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 615 | 613 | |
| r17826 | r17827 | |
| 698 | 696 | samples->stop(6); |
| 699 | 697 | } |
| 700 | 698 | |
| 701 | | static MACHINE_RESET( armora ) |
| 699 | static SOUND_RESET( armora ) |
| 702 | 700 | { |
| 703 | 701 | generic_init(machine, armora_sound_w); |
| 704 | 702 | } |
| 705 | 703 | |
| 706 | 704 | MACHINE_CONFIG_FRAGMENT( armora_sound ) |
| 707 | | MCFG_MACHINE_START(generic) |
| 708 | | MCFG_MACHINE_RESET(armora) |
| 705 | MCFG_SOUND_START(generic) |
| 706 | MCFG_SOUND_RESET(armora) |
| 709 | 707 | |
| 710 | 708 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 711 | 709 | |
| r17826 | r17827 | |
| 791 | 789 | samples->start(4, 4); |
| 792 | 790 | } |
| 793 | 791 | |
| 794 | | static MACHINE_RESET( ripoff ) |
| 792 | static SOUND_RESET( ripoff ) |
| 795 | 793 | { |
| 796 | 794 | generic_init(machine, ripoff_sound_w); |
| 797 | 795 | } |
| 798 | 796 | |
| 799 | 797 | MACHINE_CONFIG_FRAGMENT( ripoff_sound ) |
| 800 | | MCFG_MACHINE_START(generic) |
| 801 | | MCFG_MACHINE_RESET(ripoff) |
| 798 | MCFG_SOUND_START(generic) |
| 799 | MCFG_SOUND_RESET(ripoff) |
| 802 | 800 | |
| 803 | 801 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 804 | 802 | |
| r17826 | r17827 | |
| 905 | 903 | samples->start(7, 7); |
| 906 | 904 | } |
| 907 | 905 | |
| 908 | | static MACHINE_RESET( starcas ) |
| 906 | static SOUND_RESET( starcas ) |
| 909 | 907 | { |
| 910 | 908 | generic_init(machine, starcas_sound_w); |
| 911 | 909 | } |
| 912 | 910 | |
| 913 | 911 | MACHINE_CONFIG_FRAGMENT( starcas_sound ) |
| 914 | | MCFG_MACHINE_START(generic) |
| 915 | | MCFG_MACHINE_RESET(starcas) |
| 912 | MCFG_SOUND_START(generic) |
| 913 | MCFG_SOUND_RESET(starcas) |
| 916 | 914 | |
| 917 | 915 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 918 | 916 | |
| r17826 | r17827 | |
| 1041 | 1039 | } |
| 1042 | 1040 | } |
| 1043 | 1041 | |
| 1044 | | static MACHINE_RESET( solarq ) |
| 1042 | static SOUND_RESET( solarq ) |
| 1045 | 1043 | { |
| 1046 | 1044 | generic_init(machine, solarq_sound_w); |
| 1047 | 1045 | } |
| 1048 | 1046 | |
| 1049 | 1047 | MACHINE_CONFIG_FRAGMENT( solarq_sound ) |
| 1050 | | MCFG_MACHINE_START(generic) |
| 1051 | | MCFG_MACHINE_RESET(solarq) |
| 1048 | MCFG_SOUND_START(generic) |
| 1049 | MCFG_SOUND_RESET(solarq) |
| 1052 | 1050 | |
| 1053 | 1051 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1054 | 1052 | |
| r17826 | r17827 | |
| 1177 | 1175 | samples->start(11, 11); |
| 1178 | 1176 | } |
| 1179 | 1177 | |
| 1180 | | static MACHINE_RESET( boxingb ) |
| 1178 | static SOUND_RESET( boxingb ) |
| 1181 | 1179 | { |
| 1182 | 1180 | generic_init(machine, boxingb_sound_w); |
| 1183 | 1181 | } |
| 1184 | 1182 | |
| 1185 | 1183 | MACHINE_CONFIG_FRAGMENT( boxingb_sound ) |
| 1186 | | MCFG_MACHINE_START(generic) |
| 1187 | | MCFG_MACHINE_RESET(boxingb) |
| 1184 | MCFG_SOUND_START(generic) |
| 1185 | MCFG_SOUND_RESET(boxingb) |
| 1188 | 1186 | |
| 1189 | 1187 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1190 | 1188 | |
| r17826 | r17827 | |
| 1291 | 1289 | samples->start(7, 7); |
| 1292 | 1290 | } |
| 1293 | 1291 | |
| 1294 | | static MACHINE_RESET( wotw ) |
| 1292 | static SOUND_RESET( wotw ) |
| 1295 | 1293 | { |
| 1296 | 1294 | generic_init(machine, wotw_sound_w); |
| 1297 | 1295 | } |
| 1298 | 1296 | |
| 1299 | 1297 | MACHINE_CONFIG_FRAGMENT( wotw_sound ) |
| 1300 | | MCFG_MACHINE_START(generic) |
| 1301 | | MCFG_MACHINE_RESET(wotw) |
| 1298 | MCFG_SOUND_START(generic) |
| 1299 | MCFG_SOUND_RESET(wotw) |
| 1302 | 1300 | |
| 1303 | 1301 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1304 | 1302 | |
| r17826 | r17827 | |
| 1404 | 1402 | }; |
| 1405 | 1403 | |
| 1406 | 1404 | |
| 1407 | | static MACHINE_RESET( demon_sound ) |
| 1405 | static SOUND_RESET( demon_sound ) |
| 1408 | 1406 | { |
| 1409 | 1407 | cinemat_state *state = machine.driver_data<cinemat_state>(); |
| 1410 | 1408 | /* generic init */ |
| r17826 | r17827 | |
| 1456 | 1454 | |
| 1457 | 1455 | MCFG_Z80CTC_ADD("ctc", 3579545 /* same as "audiocpu" */, demon_z80ctc_interface) |
| 1458 | 1456 | |
| 1459 | | MCFG_MACHINE_START(generic) |
| 1460 | | MCFG_MACHINE_RESET(demon_sound) |
| 1457 | MCFG_SOUND_START(generic) |
| 1458 | MCFG_SOUND_RESET(demon_sound) |
| 1461 | 1459 | |
| 1462 | 1460 | /* sound hardware */ |
| 1463 | 1461 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r17826 | r17827 | |
| 1489 | 1487 | } |
| 1490 | 1488 | |
| 1491 | 1489 | |
| 1492 | | static MACHINE_RESET( qb3_sound ) |
| 1490 | static SOUND_RESET( qb3_sound ) |
| 1493 | 1491 | { |
| 1494 | 1492 | cinemat_state *state = machine.driver_data<cinemat_state>(); |
| 1495 | | MACHINE_RESET_CALL(demon_sound); |
| 1493 | SOUND_RESET_CALL(demon_sound); |
| 1496 | 1494 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x04, 0x04, write8_delegate(FUNC(cinemat_state::qb3_sound_w),state)); |
| 1497 | 1495 | |
| 1498 | 1496 | /* this patch prevents the sound ROM from eating itself when command $0A is sent */ |
| r17826 | r17827 | |
| 1502 | 1500 | |
| 1503 | 1501 | |
| 1504 | 1502 | MACHINE_CONFIG_DERIVED( qb3_sound, demon_sound ) |
| 1505 | | MCFG_MACHINE_RESET(qb3_sound) |
| 1503 | MCFG_SOUND_RESET(qb3_sound) |
| 1506 | 1504 | MACHINE_CONFIG_END |