src/mess/machine/gamepock.c
| r4293 | r4294 | |
| 218 | 218 | /* This is called whenever the T0 pin switches state */ |
| 219 | 219 | int gamepock_io_callback( const device_config *device, int ioline, int state ) |
| 220 | 220 | { |
| 221 | const device_config *speaker = devtag_get_device(device->machine, SOUND, "speaker"); |
| 221 | 222 | if ( ioline == UPD7810_TO ) |
| 222 | 223 | { |
| 223 | | speaker_level_w(0, state & 1 ); |
| 224 | speaker_level_w(speaker, state & 1 ); |
| 224 | 225 | } |
| 225 | 226 | return 0; |
| 226 | 227 | } |
src/mess/machine/kc.c
| r4293 | r4294 | |
| 1381 | 1381 | |
| 1382 | 1382 | WRITE8_HANDLER ( kc85_4_pio_data_w ) |
| 1383 | 1383 | { |
| 1384 | const device_config *speaker = devtag_get_device(space->machine, SOUND, "speaker"); |
| 1384 | 1385 | kc85_pio_data[offset] = data; |
| 1385 | 1386 | z80pio_d_w(kc85_z80pio, offset, data); |
| 1386 | 1387 | |
| r4293 | r4294 | |
| 1409 | 1410 | |
| 1410 | 1411 | /* this might not be correct, the range might |
| 1411 | 1412 | be logarithmic and not linear! */ |
| 1412 | | speaker_level_w(0, (speaker_level<<4)); |
| 1413 | speaker_level_w(speaker, (speaker_level<<4)); |
| 1413 | 1414 | } |
| 1414 | 1415 | break; |
| 1415 | 1416 | } |
| r4293 | r4294 | |
| 1627 | 1628 | |
| 1628 | 1629 | WRITE8_HANDLER ( kc85_3_pio_data_w ) |
| 1629 | 1630 | { |
| 1630 | | kc85_pio_data[offset] = data; |
| 1631 | | z80pio_d_w(kc85_z80pio, offset, data); |
| 1631 | const device_config *speaker = devtag_get_device(space->machine, SOUND, "speaker"); |
| 1632 | kc85_pio_data[offset] = data; |
| 1633 | z80pio_d_w(kc85_z80pio, offset, data); |
| 1632 | 1634 | |
| 1633 | | switch (offset) |
| 1634 | | { |
| 1635 | switch (offset) |
| 1636 | { |
| 1635 | 1637 | |
| 1636 | 1638 | case 0: |
| 1637 | 1639 | { |
| r4293 | r4294 | |
| 1654 | 1656 | |
| 1655 | 1657 | /* this might not be correct, the range might |
| 1656 | 1658 | be logarithmic and not linear! */ |
| 1657 | | speaker_level_w(0, (speaker_level<<4)); |
| 1659 | speaker_level_w(speaker, (speaker_level<<4)); |
| 1658 | 1660 | } |
| 1659 | 1661 | break; |
| 1660 | | } |
| 1662 | } |
| 1661 | 1663 | } |
| 1662 | 1664 | |
| 1663 | 1665 | |