trunk/src/mame/audio/turbo.c
| r17968 | r17969 | |
| 72 | 72 | WRITE8_DEVICE_HANDLER( turbo_sound_a_w ) |
| 73 | 73 | { |
| 74 | 74 | #if (!DISCRETE_TEST) |
| 75 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 75 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 76 | 76 | #endif |
| 77 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 77 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 78 | 78 | #if (!DISCRETE_TEST) |
| 79 | 79 | UINT8 diff = data ^ state->m_sound_state[0]; |
| 80 | 80 | #endif |
| r17968 | r17969 | |
| 124 | 124 | |
| 125 | 125 | WRITE8_DEVICE_HANDLER( turbo_sound_b_w ) |
| 126 | 126 | { |
| 127 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 128 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 127 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 128 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 129 | 129 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 130 | 130 | state->m_sound_state[1] = data; |
| 131 | 131 | |
| r17968 | r17969 | |
| 147 | 147 | |
| 148 | 148 | WRITE8_DEVICE_HANDLER( turbo_sound_c_w ) |
| 149 | 149 | { |
| 150 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 151 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 150 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 151 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 152 | 152 | |
| 153 | 153 | /* OSEL1-2 */ |
| 154 | 154 | state->m_turbo_osel = (state->m_turbo_osel & 1) | ((data & 3) << 1); |
| r17968 | r17969 | |
| 297 | 297 | |
| 298 | 298 | WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w ) |
| 299 | 299 | { |
| 300 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 300 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 301 | 301 | state->m_sound_state[0] = data; |
| 302 | 302 | |
| 303 | 303 | /* DIS0-3 contained in bits 0-3 */ |
| r17968 | r17969 | |
| 327 | 327 | |
| 328 | 328 | WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ) |
| 329 | 329 | { |
| 330 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 331 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 330 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 331 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 332 | 332 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 333 | 333 | state->m_sound_state[1] = data; |
| 334 | 334 | |
| r17968 | r17969 | |
| 383 | 383 | |
| 384 | 384 | WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w ) |
| 385 | 385 | { |
| 386 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 387 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 386 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 387 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 388 | 388 | UINT8 diff = data ^ state->m_sound_state[2]; |
| 389 | 389 | state->m_sound_state[2] = data; |
| 390 | 390 | |
| r17968 | r17969 | |
| 415 | 415 | samples->set_volume(11, (data & 0x40) ? 0 : 1.0); |
| 416 | 416 | |
| 417 | 417 | /* /GAME START */ |
| 418 | | device->machine().sound().system_mute(data & 0x80); |
| 418 | space.machine().sound().system_mute(data & 0x80); |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | |
| r17968 | r17969 | |
| 507 | 507 | |
| 508 | 508 | WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ) |
| 509 | 509 | { |
| 510 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 511 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 510 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 511 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 512 | 512 | UINT8 diff = data ^ state->m_sound_state[0]; |
| 513 | 513 | state->m_sound_state[0] = data; |
| 514 | 514 | |
| r17968 | r17969 | |
| 533 | 533 | |
| 534 | 534 | WRITE8_DEVICE_HANDLER( buckrog_sound_b_w ) |
| 535 | 535 | { |
| 536 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 537 | | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 536 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 537 | turbo_state *state = space.machine().driver_data<turbo_state>(); |
| 538 | 538 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 539 | 539 | state->m_sound_state[1] = data; |
| 540 | 540 | |
| r17968 | r17969 | |
| 569 | 569 | if ((diff & 0x40) && !(data & 0x40) && samples->playing(5)) samples->stop(5); |
| 570 | 570 | |
| 571 | 571 | /* GAME ON */ |
| 572 | | device->machine().sound().system_enable(data & 0x80); |
| 572 | space.machine().sound().system_enable(data & 0x80); |
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | |
trunk/src/mame/audio/segag80r.c
| r17968 | r17969 | |
| 508 | 508 | |
| 509 | 509 | static WRITE8_DEVICE_HANDLER( sega005_sound_a_w ) |
| 510 | 510 | { |
| 511 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 512 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 511 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 512 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 513 | 513 | UINT8 diff = data ^ state->m_sound_state[0]; |
| 514 | 514 | state->m_sound_state[0] = data; |
| 515 | 515 | |
| r17968 | r17969 | |
| 567 | 567 | |
| 568 | 568 | static WRITE8_DEVICE_HANDLER( sega005_sound_b_w ) |
| 569 | 569 | { |
| 570 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 570 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 571 | 571 | /* |
| 572 | 572 | D6: manual timer clock (0->1) |
| 573 | 573 | D5: 0 = manual timer, 1 = auto timer |
| r17968 | r17969 | |
| 597 | 597 | state->m_sound_addr = (state->m_sound_addr & 0x780) | ((state->m_sound_addr + 1) & 0x07f); |
| 598 | 598 | |
| 599 | 599 | /* update the sound data */ |
| 600 | | sega005_update_sound_data(device->machine()); |
| 600 | sega005_update_sound_data(space.machine()); |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | |
| r17968 | r17969 | |
| 913 | 913 | |
| 914 | 914 | static WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ) |
| 915 | 915 | { |
| 916 | | device_t *tms = device->machine().device("music"); |
| 916 | device_t *tms = space.machine().device("music"); |
| 917 | 917 | int enable_val; |
| 918 | 918 | |
| 919 | 919 | /* Lower four data lines get decoded into 13 control lines */ |
| 920 | 920 | tms36xx_note_w(tms, 0, data & 15); |
| 921 | 921 | |
| 922 | 922 | /* Top four data lines address an 82S123 ROM that enables/disables voices */ |
| 923 | | enable_val = device->machine().root_device().memregion("prom")->base()[(data & 0xF0) >> 4]; |
| 923 | enable_val = space.machine().root_device().memregion("prom")->base()[(data & 0xF0) >> 4]; |
| 924 | 924 | tms3617_enable_w(tms, enable_val >> 2); |
| 925 | 925 | } |
| 926 | 926 | |
| r17968 | r17969 | |
| 934 | 934 | |
| 935 | 935 | static WRITE8_DEVICE_HANDLER( monsterb_sound_b_w ) |
| 936 | 936 | { |
| 937 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 938 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 937 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 938 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 939 | 939 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 940 | 940 | state->m_sound_state[1] = data; |
| 941 | 941 | |
| r17968 | r17969 | |
| 958 | 958 | |
| 959 | 959 | static READ8_DEVICE_HANDLER( n7751_status_r ) |
| 960 | 960 | { |
| 961 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 961 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 962 | 962 | return state->m_n7751_busy << 4; |
| 963 | 963 | } |
| 964 | 964 | |
| 965 | 965 | |
| 966 | 966 | static WRITE8_DEVICE_HANDLER( n7751_command_w ) |
| 967 | 967 | { |
| 968 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 968 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 969 | 969 | /* |
| 970 | 970 | Z80 7751 control port |
| 971 | 971 | |
| r17968 | r17969 | |
| 973 | 973 | D3 = /INT line |
| 974 | 974 | */ |
| 975 | 975 | state->m_n7751_command = data & 0x07; |
| 976 | | device->machine().device("audiocpu")->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); |
| 977 | | device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 976 | space.machine().device("audiocpu")->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); |
| 977 | space.machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | 980 | |
| 981 | 981 | static WRITE8_DEVICE_HANDLER( n7751_rom_control_w ) |
| 982 | 982 | { |
| 983 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 983 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 984 | 984 | /* P4 - address lines 0-3 */ |
| 985 | 985 | /* P5 - address lines 4-7 */ |
| 986 | 986 | /* P6 - address lines 8-11 */ |
| r17968 | r17969 | |
| 1030 | 1030 | |
| 1031 | 1031 | static WRITE8_DEVICE_HANDLER( n7751_p2_w ) |
| 1032 | 1032 | { |
| 1033 | | segag80r_state *state = device->machine().driver_data<segag80r_state>(); |
| 1033 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); |
| 1034 | 1034 | /* write to P2; low 4 bits go to 8243 */ |
| 1035 | 1035 | i8243_p2_w(device, space, offset, data & 0x0f); |
| 1036 | 1036 | |
trunk/src/mame/audio/exidy.c
| r17968 | r17969 | |
| 528 | 528 | { |
| 529 | 529 | exidy_sound_state *state = get_safe_token(device); |
| 530 | 530 | if (state->m_cvsd != NULL) |
| 531 | | device->machine().device("cvsdcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); |
| 531 | space.machine().device("cvsdcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); |
| 532 | 532 | |
| 533 | 533 | if (state->m_tms != NULL) |
| 534 | 534 | { |
| 535 | | logerror("(%f)%s:TMS5220 data write = %02X\n", device->machine().time().as_double(), device->machine().describe_context(), riot6532_porta_out_get(state->m_riot)); |
| 535 | logerror("(%f)%s:TMS5220 data write = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), riot6532_porta_out_get(state->m_riot)); |
| 536 | 536 | tms5220_data_w(state->m_tms, space, 0, data); |
| 537 | 537 | } |
| 538 | 538 | } |
| r17968 | r17969 | |
| 542 | 542 | exidy_sound_state *state = get_safe_token(device); |
| 543 | 543 | if (state->m_tms != NULL) |
| 544 | 544 | { |
| 545 | | logerror("(%f)%s:TMS5220 status read = %02X\n", device->machine().time().as_double(), device->machine().describe_context(), tms5220_status_r(state->m_tms, space, 0)); |
| 545 | logerror("(%f)%s:TMS5220 status read = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), tms5220_status_r(state->m_tms, space, 0)); |
| 546 | 546 | return tms5220_status_r(state->m_tms, space, 0); |
| 547 | 547 | } |
| 548 | 548 | else |
| r17968 | r17969 | |
| 1074 | 1074 | |
| 1075 | 1075 | if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", state->m_maincpu->pcbase(), data); |
| 1076 | 1076 | |
| 1077 | | device->machine().scheduler().synchronize(FUNC(delayed_command_w), data, state->m_pia1); |
| 1077 | space.machine().scheduler().synchronize(FUNC(delayed_command_w), data, state->m_pia1); |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | 1080 | |
| r17968 | r17969 | |
| 1082 | 1082 | { |
| 1083 | 1083 | exidy_sound_state *state = get_safe_token(device); |
| 1084 | 1084 | |
| 1085 | | if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound IRQ clear = %02X\n", device->machine().describe_context(), data); |
| 1085 | if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound IRQ clear = %02X\n", space.machine().describe_context(), data); |
| 1086 | 1086 | |
| 1087 | 1087 | if (!data) state->m_pia1->ca1_w(1); |
| 1088 | 1088 | } |
| r17968 | r17969 | |
| 1092 | 1092 | { |
| 1093 | 1093 | exidy_sound_state *state = get_safe_token(device); |
| 1094 | 1094 | |
| 1095 | | if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound Main ACK W = %02X\n", device->machine().describe_context(), data); |
| 1095 | if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound Main ACK W = %02X\n", space.machine().describe_context(), data); |
| 1096 | 1096 | |
| 1097 | 1097 | if (state->m_victory_sound_response_ack_clk && !data) |
| 1098 | 1098 | state->m_pia1->cb1_w(1); |
trunk/src/mame/audio/zaxxon.c
| r17968 | r17969 | |
| 112 | 112 | |
| 113 | 113 | WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ) |
| 114 | 114 | { |
| 115 | | zaxxon_state *state = device->machine().driver_data<zaxxon_state>(); |
| 116 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 115 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); |
| 116 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 117 | 117 | UINT8 diff = data ^ state->m_sound_state[0]; |
| 118 | 118 | state->m_sound_state[0] = data; |
| 119 | 119 | |
| r17968 | r17969 | |
| 148 | 148 | |
| 149 | 149 | WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ) |
| 150 | 150 | { |
| 151 | | zaxxon_state *state = device->machine().driver_data<zaxxon_state>(); |
| 152 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 151 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); |
| 152 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 153 | 153 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 154 | 154 | state->m_sound_state[1] = data; |
| 155 | 155 | |
| r17968 | r17969 | |
| 166 | 166 | |
| 167 | 167 | WRITE8_DEVICE_HANDLER( zaxxon_sound_c_w ) |
| 168 | 168 | { |
| 169 | | zaxxon_state *state = device->machine().driver_data<zaxxon_state>(); |
| 170 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 169 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); |
| 170 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 171 | 171 | UINT8 diff = data ^ state->m_sound_state[2]; |
| 172 | 172 | state->m_sound_state[2] = data; |
| 173 | 173 | |
| r17968 | r17969 | |
| 223 | 223 | |
| 224 | 224 | WRITE8_DEVICE_HANDLER( congo_sound_b_w ) |
| 225 | 225 | { |
| 226 | | zaxxon_state *state = device->machine().driver_data<zaxxon_state>(); |
| 227 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 226 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); |
| 227 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 228 | 228 | UINT8 diff = data ^ state->m_sound_state[1]; |
| 229 | 229 | state->m_sound_state[1] = data; |
| 230 | 230 | |
| r17968 | r17969 | |
| 237 | 237 | |
| 238 | 238 | WRITE8_DEVICE_HANDLER( congo_sound_c_w ) |
| 239 | 239 | { |
| 240 | | zaxxon_state *state = device->machine().driver_data<zaxxon_state>(); |
| 241 | | samples_device *samples = device->machine().device<samples_device>("samples"); |
| 240 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); |
| 241 | samples_device *samples = space.machine().device<samples_device>("samples"); |
| 242 | 242 | UINT8 diff = data ^ state->m_sound_state[2]; |
| 243 | 243 | state->m_sound_state[2] = data; |
| 244 | 244 | |
trunk/src/mame/audio/mw8080bw.c
| r17968 | r17969 | |
| 338 | 338 | |
| 339 | 339 | /* if (data & 0x10) enable CHEER sound */ |
| 340 | 340 | |
| 341 | | if (tornbase_get_cabinet_type(device->machine()) == TORNBASE_CAB_TYPE_UPRIGHT_OLD) |
| 341 | if (tornbase_get_cabinet_type(space.machine()) == TORNBASE_CAB_TYPE_UPRIGHT_OLD) |
| 342 | 342 | { |
| 343 | 343 | /* if (data & 0x20) enable WHISTLE sound */ |
| 344 | 344 | |
| r17968 | r17969 | |
| 351 | 351 | /* if (data & 0x40) enable WHISTLE sound */ |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | | coin_counter_w(device->machine(), 0, (data >> 7) & 0x01); |
| 354 | coin_counter_w(space.machine(), 0, (data >> 7) & 0x01); |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | |
| r17968 | r17969 | |
| 824 | 824 | { |
| 825 | 825 | /* D0 and D1 are not connected */ |
| 826 | 826 | |
| 827 | | coin_counter_w(device->machine(), 0, (data >> 2) & 0x01); |
| 827 | coin_counter_w(space.machine(), 0, (data >> 2) & 0x01); |
| 828 | 828 | |
| 829 | 829 | discrete_sound_w(device, space, BOOTHILL_GAME_ON_EN, (data >> 3) & 0x01); |
| 830 | 830 | |
| r17968 | r17969 | |
| 1055 | 1055 | |
| 1056 | 1056 | discrete_sound_w(device, space, CHECKMAT_BOOM_EN, (data >> 1) & 0x01); |
| 1057 | 1057 | |
| 1058 | | coin_counter_w(device->machine(), 0, (data >> 2) & 0x01); |
| 1058 | coin_counter_w(space.machine(), 0, (data >> 2) & 0x01); |
| 1059 | 1059 | |
| 1060 | | device->machine().sound().system_enable((data >> 3) & 0x01); |
| 1060 | space.machine().sound().system_enable((data >> 3) & 0x01); |
| 1061 | 1061 | |
| 1062 | 1062 | discrete_sound_w(device, space, CHECKMAT_TONE_DATA_45, (data >> 4) & 0x03); |
| 1063 | 1063 | discrete_sound_w(device, space, CHECKMAT_TONE_DATA_67, (data >> 6) & 0x03); |
| r17968 | r17969 | |
| 1264 | 1264 | { |
| 1265 | 1265 | /* D0 and D1 are not connected */ |
| 1266 | 1266 | |
| 1267 | | coin_counter_w(device->machine(), 0, (data >> 2) & 0x01); |
| 1267 | coin_counter_w(space.machine(), 0, (data >> 2) & 0x01); |
| 1268 | 1268 | |
| 1269 | 1269 | discrete_sound_w(device, space, DESERTGU_GAME_ON_EN, (data >> 3) & 0x01); |
| 1270 | 1270 | |
| r17968 | r17969 | |
| 1280 | 1280 | |
| 1281 | 1281 | WRITE8_DEVICE_HANDLER( desertgu_audio_2_w ) |
| 1282 | 1282 | { |
| 1283 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 1283 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 1284 | 1284 | |
| 1285 | 1285 | discrete_sound_w(device, space, DESERTGU_ROADRUNNER_BEEP_BEEP_EN, (data >> 0) & 0x01); |
| 1286 | 1286 | |
| r17968 | r17969 | |
| 1539 | 1539 | |
| 1540 | 1540 | discrete_sound_w(device, space, DPLAY_GAME_ON_EN, (data >> 4) & 0x01); |
| 1541 | 1541 | |
| 1542 | | coin_counter_w(device->machine(), 0, (data >> 5) & 0x01); |
| 1542 | coin_counter_w(space.machine(), 0, (data >> 5) & 0x01); |
| 1543 | 1543 | |
| 1544 | 1544 | /* D6 and D7 are not connected */ |
| 1545 | 1545 | } |
| r17968 | r17969 | |
| 1948 | 1948 | |
| 1949 | 1949 | WRITE8_DEVICE_HANDLER( clowns_audio_2_w ) |
| 1950 | 1950 | { |
| 1951 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 1951 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 1952 | 1952 | UINT8 rising_bits = data & ~state->m_port_2_last; |
| 1953 | 1953 | |
| 1954 | 1954 | discrete_sound_w(device, space, CLOWNS_POP_BOTTOM_EN, (data >> 0) & 0x01); |
| r17968 | r17969 | |
| 1957 | 1957 | |
| 1958 | 1958 | discrete_sound_w(device, space, CLOWNS_POP_TOP_EN, (data >> 2) & 0x01); |
| 1959 | 1959 | |
| 1960 | | device->machine().sound().system_enable((data >> 3) & 0x01); |
| 1960 | space.machine().sound().system_enable((data >> 3) & 0x01); |
| 1961 | 1961 | |
| 1962 | 1962 | discrete_sound_w(device, space, CLOWNS_SPRINGBOARD_HIT_EN, (data >> 4) & 0x01); |
| 1963 | 1963 | |
| r17968 | r17969 | |
| 2304 | 2304 | |
| 2305 | 2305 | WRITE8_DEVICE_HANDLER( spacwalk_audio_1_w ) |
| 2306 | 2306 | { |
| 2307 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 2307 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 2308 | 2308 | |
| 2309 | | coin_counter_w(device->machine(), 0, (data >> 0) & 0x01); |
| 2309 | coin_counter_w(space.machine(), 0, (data >> 0) & 0x01); |
| 2310 | 2310 | |
| 2311 | 2311 | state->m_clowns_controller_select = (data >> 1) & 0x01; |
| 2312 | 2312 | |
| 2313 | | device->machine().sound().system_enable((data >> 2) & 0x01); |
| 2313 | space.machine().sound().system_enable((data >> 2) & 0x01); |
| 2314 | 2314 | |
| 2315 | 2315 | discrete_sound_w(device, space, SPACWALK_SPACE_SHIP_EN, (data >> 3) & 0x01); |
| 2316 | 2316 | } |
| r17968 | r17969 | |
| 2540 | 2540 | |
| 2541 | 2541 | discrete_sound_w(device, space, SHUFFLE_ROLLOVER_EN, (data >> 1) & 0x01); |
| 2542 | 2542 | |
| 2543 | | device->machine().sound().system_enable((data >> 2) & 0x01); |
| 2543 | space.machine().sound().system_enable((data >> 2) & 0x01); |
| 2544 | 2544 | |
| 2545 | 2545 | discrete_sound_w(device, space, NODE_29, (data >> 3) & 0x07); |
| 2546 | 2546 | |
| r17968 | r17969 | |
| 2556 | 2556 | { |
| 2557 | 2557 | discrete_sound_w(device, space, SHUFFLE_FOUL_EN, (data >> 0) & 0x01); |
| 2558 | 2558 | |
| 2559 | | coin_counter_w(device->machine(), 0, (data >> 1) & 0x01); |
| 2559 | coin_counter_w(space.machine(), 0, (data >> 1) & 0x01); |
| 2560 | 2560 | |
| 2561 | 2561 | /* D2-D7 are not connected */ |
| 2562 | 2562 | } |
| r17968 | r17969 | |
| 2718 | 2718 | { |
| 2719 | 2719 | /* D0, D1 and D7 are not used */ |
| 2720 | 2720 | |
| 2721 | | coin_counter_w(device->machine(), 0, (data >> 2) & 0x01); |
| 2721 | coin_counter_w(space.machine(), 0, (data >> 2) & 0x01); |
| 2722 | 2722 | |
| 2723 | | device->machine().sound().system_enable((data >> 3) & 0x01); |
| 2723 | space.machine().sound().system_enable((data >> 3) & 0x01); |
| 2724 | 2724 | discrete_sound_w(device, space, DOGPATCH_GAME_ON_EN, (data >> 3) & 0x01); |
| 2725 | 2725 | |
| 2726 | 2726 | discrete_sound_w(device, space, DOGPATCH_LEFT_SHOT_EN, (data >> 4) & 0x01); |
| r17968 | r17969 | |
| 3254 | 3254 | |
| 3255 | 3255 | WRITE8_DEVICE_HANDLER( spcenctr_audio_1_w ) |
| 3256 | 3256 | { |
| 3257 | | device->machine().sound().system_enable((data >> 0) & 0x01); |
| 3257 | space.machine().sound().system_enable((data >> 0) & 0x01); |
| 3258 | 3258 | |
| 3259 | 3259 | /* D1 is marked as 'OPTIONAL SWITCH VIDEO FOR COCKTAIL', |
| 3260 | 3260 | but it is never set by the software */ |
| r17968 | r17969 | |
| 3267 | 3267 | |
| 3268 | 3268 | WRITE8_DEVICE_HANDLER( spcenctr_audio_2_w ) |
| 3269 | 3269 | { |
| 3270 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 3270 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 3271 | 3271 | |
| 3272 | 3272 | /* set WIND SOUND FREQ(data & 0x0f) 0, if no wind */ |
| 3273 | 3273 | |
| r17968 | r17969 | |
| 3283 | 3283 | |
| 3284 | 3284 | WRITE8_DEVICE_HANDLER( spcenctr_audio_3_w ) |
| 3285 | 3285 | { |
| 3286 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 3286 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 3287 | 3287 | |
| 3288 | 3288 | /* if (data & 0x01) enable SCREECH (hit the sides) sound */ |
| 3289 | 3289 | |
| r17968 | r17969 | |
| 3465 | 3465 | { |
| 3466 | 3466 | /* D0 - selects controller on the cocktail PCB */ |
| 3467 | 3467 | |
| 3468 | | coin_counter_w(device->machine(), 0, (data >> 1) & 0x01); |
| 3468 | coin_counter_w(space.machine(), 0, (data >> 1) & 0x01); |
| 3469 | 3469 | |
| 3470 | | device->machine().sound().system_enable((data >> 2) & 0x01); |
| 3470 | space.machine().sound().system_enable((data >> 2) & 0x01); |
| 3471 | 3471 | |
| 3472 | 3472 | discrete_sound_w(device, space, BOWLER_FOWL_EN, (data >> 3) & 0x01); |
| 3473 | 3473 | |
| r17968 | r17969 | |
| 4186 | 4186 | |
| 4187 | 4187 | WRITE8_DEVICE_HANDLER( invaders_audio_1_w ) |
| 4188 | 4188 | { |
| 4189 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 4189 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 4190 | 4190 | |
| 4191 | 4191 | sn76477_enable_w(state->m_sn, (~data >> 0) & 0x01); /* saucer sound */ |
| 4192 | 4192 | |
| r17968 | r17969 | |
| 4195 | 4195 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); |
| 4196 | 4196 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); |
| 4197 | 4197 | |
| 4198 | | device->machine().sound().system_enable(data & 0x20); |
| 4198 | space.machine().sound().system_enable(data & 0x20); |
| 4199 | 4199 | |
| 4200 | 4200 | /* D6 and D7 are not connected */ |
| 4201 | 4201 | } |
| r17968 | r17969 | |
| 4203 | 4203 | |
| 4204 | 4204 | WRITE8_DEVICE_HANDLER( invaders_audio_2_w ) |
| 4205 | 4205 | { |
| 4206 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 4206 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 4207 | 4207 | |
| 4208 | 4208 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_FLEET_DATA, 1), data & 0x0f); |
| 4209 | 4209 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 1), data & 0x10); |
| 4210 | 4210 | |
| 4211 | 4211 | /* the flip screen line is only connected on the cocktail PCB */ |
| 4212 | | if (invaders_is_cabinet_cocktail(device->machine())) |
| 4212 | if (invaders_is_cabinet_cocktail(space.machine())) |
| 4213 | 4213 | { |
| 4214 | 4214 | state->m_invaders_flip_screen = (data >> 5) & 0x01; |
| 4215 | 4215 | } |
| r17968 | r17969 | |
| 4819 | 4819 | |
| 4820 | 4820 | WRITE8_DEVICE_HANDLER( invad2ct_audio_1_w ) |
| 4821 | 4821 | { |
| 4822 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 4822 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 4823 | 4823 | |
| 4824 | 4824 | sn76477_enable_w(state->m_sn1, (~data >> 0) & 0x01); /* saucer sound */ |
| 4825 | 4825 | |
| r17968 | r17969 | |
| 4828 | 4828 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); |
| 4829 | 4829 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); |
| 4830 | 4830 | |
| 4831 | | device->machine().sound().system_enable(data & 0x20); |
| 4831 | space.machine().sound().system_enable(data & 0x20); |
| 4832 | 4832 | |
| 4833 | 4833 | /* D6 and D7 are not connected */ |
| 4834 | 4834 | } |
| r17968 | r17969 | |
| 4845 | 4845 | |
| 4846 | 4846 | WRITE8_DEVICE_HANDLER( invad2ct_audio_3_w ) |
| 4847 | 4847 | { |
| 4848 | | mw8080bw_state *state = device->machine().driver_data<mw8080bw_state>(); |
| 4848 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); |
| 4849 | 4849 | |
| 4850 | 4850 | sn76477_enable_w(state->m_sn2, (~data >> 0) & 0x01); /* saucer sound */ |
| 4851 | 4851 | |