Previous 15994 Revisions Next

r4284 Thursday 19th February, 2009 at 01:59:30 UTC by Nathan Woods
Fixed some 0.129u4 regressions
[src/mess/drivers]nc.c x68k.c
[src/mess/machine]a7800.c apple2gs.c atarifdc.c bbc.c gb.c geneve.c mockngbd.c msx.c msx_slot.c nes_mmc.c odyssey2.c orion.c sms.c spectrum.c thomson.c ti99_4x.c
[src/mess/video]arcadia.c

src/mess/video/arcadia.c
r4283r4284
418418         arcadia_video.ypos=255-data+YPOS;
419419         break;
420420      case 0xfd:
421         arcadia_soundport_w(devtag_get_device(space->machine, SOUND_ARCADIA, "custom"), offset&3, data);
421         arcadia_soundport_w(devtag_get_device(space->machine, SOUND, "custom"), offset&3, data);
422422         arcadia_video.multicolor=data&0x80;
423423         break;
424424      case 0xfe:
425         arcadia_soundport_w(devtag_get_device(space->machine, SOUND_ARCADIA, "custom"), offset&3, data);
425         arcadia_soundport_w(devtag_get_device(space->machine, SOUND, "custom"), offset&3, data);
426426         arcadia_video.shift=(data>>5);
427427         break;
428428      case 0xf0: case 0xf2: case 0xf4: case 0xf6:
src/mess/machine/mockngbd.c
r4283r4284
144144
145145WRITE8_DEVICE_HANDLER(mockingboard_w)
146146{
147   const device_config *ay8910_1 = devtag_get_device(device->machine, SOUND_AY8913, "ay8910.1");
148   const device_config *ay8910_2 = devtag_get_device(device->machine, SOUND_AY8913, "ay8910.2");
147   const device_config *ay8910_1 = devtag_get_device(device->machine, SOUND, "ay8910.1");
148   const device_config *ay8910_2 = devtag_get_device(device->machine, SOUND, "ay8910.2");
149149   mockingboard_token *token = get_token(device);
150150
151151   if (LOG_MOCKINGBOARD)
src/mess/machine/msx_slot.c
r4283r4284
341341      return 0xff;
342342   }
343343   else {
344      return k051649_waveform_r (devtag_get_device(space->machine, SOUND_K051649, "k051649"), offset & 0x7f);
344      return k051649_waveform_r (devtag_get_device(space->machine, SOUND, "k051649"), offset & 0x7f);
345345   }
346346}
347347
r4283r4284
394394      }
395395   }
396396   else if (state->cart.scc.active && addr >= 0x9800 && addr < 0xa000) {
397      const device_config *k051649 = devtag_get_device(space->machine, SOUND_K051649, "k051649");
397      const device_config *k051649 = devtag_get_device(space->machine, SOUND, "k051649");
398398      int offset = addr & 0xff;
399399
400400      if (offset < 0x80) {
r4283r4284
19991999   reg = offset & 0xff;
20002000
20012001   if (reg < 0x80) {
2002      return k051649_waveform_r (devtag_get_device(space->machine, SOUND_K051649, "k051649"), reg);
2002      return k051649_waveform_r (devtag_get_device(space->machine, SOUND, "k051649"), reg);
20032003   }
20042004   else if (reg < 0xa0) {
20052005      /* nothing */
20062006   }
20072007   else if (reg < 0xc0) {
20082008      /* read wave 5 */
2009      return k051649_waveform_r (devtag_get_device(space->machine, SOUND_K051649, "k051649"), 0x80 + (reg & 0x1f));
2009      return k051649_waveform_r (devtag_get_device(space->machine, SOUND, "k051649"), 0x80 + (reg & 0x1f));
20102010   }
20112011#if 0
20122012   else if (reg < 0xe0) {
r4283r4284
20292029   reg = offset & 0xff;
20302030
20312031   if (reg < 0xa0) {
2032      return k051649_waveform_r (devtag_get_device(space->machine, SOUND_K051649, "k051649"), reg);
2032      return k051649_waveform_r (devtag_get_device(space->machine, SOUND, "k051649"), reg);
20332033   }
20342034#if 0
20352035   else if (reg >= 0xc0 && reg < 0xe0) {
r4283r4284
21172117         }
21182118      }
21192119      else if (addr >= 0x9800 && state->cart.sccp.scc_active) {
2120         const device_config *k051649 = devtag_get_device(space->machine, SOUND_K051649, "k051649");
2120         const device_config *k051649 = devtag_get_device(space->machine, SOUND, "k051649");
21212121         int offset = addr & 0xff;
21222122
21232123         if (offset < 0x80) {
r4283r4284
21582158         }
21592159      }
21602160      else if (addr >= 0xb800 && state->cart.sccp.sccp_active) {
2161         const device_config *k051649 = devtag_get_device(space->machine, SOUND_K051649, "k051649");
2161         const device_config *k051649 = devtag_get_device(space->machine, SOUND, "k051649");
21622162         int offset = addr & 0xff;
21632163
21642164         if (offset < 0xa0) {
src/mess/machine/gb.c
r4283r4284
273273         break;
274274   }
275275
276   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x16, 0x00 );       /* Initialize sound hardware */
276   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x16, 0x00 );       /* Initialize sound hardware */
277277
278278   /* Allocate the serial timer, and disable it */
279279   gb_serial_timer = timer_alloc(machine,  gb_serial_timer_proc , NULL);
r4283r4284
317317   memset( sgb_tile_data, 0, 0x2000 );
318318
319319   /* Initialize the Sound Registers */
320   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x16,0xF0);   /* F0 for SGB */
321   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x15,0xF3);
322   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x14,0x77);
320   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x16,0xF0);   /* F0 for SGB */
321   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x15,0xF3);
322   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x14,0x77);
323323
324324   sgb_window_mask = 0;
325325   memset( sgb_pal_map, 0, sizeof(sgb_pal_map) );
r4283r4284
349349   gb_init_regs(machine);
350350
351351   /* Initialize the Sound registers */
352   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x16,0x80);
353   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x15,0xF3);
354   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x14,0x77);
352   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x16,0x80);
353   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x15,0xF3);
354   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x14,0x77);
355355
356356   /* Enable BIOS rom if we have one */
357357   memory_set_bankptr(machine, 5, ROMMap[ROMBank00] ? ROMMap[ROMBank00] : gb_dummy_rom_bank );
r4283r4284
371371   gb_init_regs(machine);
372372
373373   /* Initialize the Sound registers */
374   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x16, 0x80);
375   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x15, 0xF3);
376   gb_sound_w(devtag_get_device(machine, SOUND_GAMEBOY, "custom"), 0x14, 0x77);
374   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x16, 0x80);
375   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x15, 0xF3);
376   gb_sound_w(devtag_get_device(machine, SOUND, "custom"), 0x14, 0x77);
377377
378378   memory_set_bankptr(machine, 5, ROMMap[ROMBank00] ? ROMMap[ROMBank00] : gb_dummy_rom_bank );
379379   memory_set_bankptr(machine, 10, ROMMap[ROMBank00] ? ROMMap[ROMBank00] + 0x0100 : gb_dummy_rom_bank + 0x0100);
r4283r4284
19881988
19891989WRITE8_HANDLER( megaduck_sound_w1 )
19901990{
1991   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), megaduck_sound_offsets[offset], data );
1991   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), megaduck_sound_offsets[offset], data );
19921992}
19931993
19941994READ8_HANDLER( megaduck_sound_r1 )
19951995{
1996   return gb_sound_r( devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), megaduck_sound_offsets[offset] );
1996   return gb_sound_r( devtag_get_device(space->machine, SOUND, "custom"), megaduck_sound_offsets[offset] );
19971997}
19981998
19991999WRITE8_HANDLER( megaduck_sound_w2 )
20002000{
20012001   switch(offset) {
2002      case 0x00:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x10, data );   break;
2003      case 0x01:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x12, data );   break;
2004      case 0x02:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x11, data );   break;
2005      case 0x03:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x13, data );   break;
2006      case 0x04:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x14, data );   break;
2007      case 0x05:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x16, data );   break;
2008      case 0x06:   gb_sound_w(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x15, data );   break;
2002      case 0x00:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x10, data );   break;
2003      case 0x01:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x12, data );   break;
2004      case 0x02:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x11, data );   break;
2005      case 0x03:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x13, data );   break;
2006      case 0x04:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x14, data );   break;
2007      case 0x05:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x16, data );   break;
2008      case 0x06:   gb_sound_w(devtag_get_device(space->machine, SOUND, "custom"), 0x15, data );   break;
20092009      case 0x07:
20102010      case 0x08:
20112011      case 0x09:
r4283r4284
20212021
20222022READ8_HANDLER( megaduck_sound_r2 )
20232023{
2024   return gb_sound_r(devtag_get_device(space->machine, SOUND_GAMEBOY, "custom"), 0x10 + megaduck_sound_offsets[offset]);
2024   return gb_sound_r(devtag_get_device(space->machine, SOUND, "custom"), 0x10 + megaduck_sound_offsets[offset]);
20252025}
20262026
20272027WRITE8_HANDLER( megaduck_rom_bank_select_type1 )
src/mess/machine/thomson.c
r4283r4284
10481048
10491049static void to7_game_sound_update ( running_machine *machine )
10501050{
1051   dac_data_w( devtag_get_device(machine, SOUND_DAC, "dac"), to7_game_mute ? 0 : (to7_game_sound << 2) );
1051   dac_data_w( devtag_get_device(machine, SOUND, "dac"), to7_game_mute ? 0 : (to7_game_sound << 2) );
10521052}
10531053
10541054
src/mess/machine/spectrum.c
r4283r4284
748748
749749      if ((z80_type == SPECTRUM_Z80_SNAPSHOT_128K) || ((z80_type == SPECTRUM_Z80_SNAPSHOT_TS2068) && !strcmp(machine->gamedrv->name,"ts2068")))
750750      {
751         const device_config *ay8912 = devtag_get_device(machine, SOUND_AY8912, "ay8912");
751         const device_config *ay8912 = devtag_get_device(machine, SOUND, "ay8912");
752752
753753         /* Only set up sound registers for 128K machine or TS2068! */
754754         for (i = 0; i < 16; i++)
src/mess/machine/orion.c
r4283r4284
587587      case 0x2b : return orion128_romdisk_r(space,3);
588588   }
589589   if (offset == 0xFFFD) {
590      return ay8910_r (devtag_get_device(space->machine, SOUND_AY8912, "ay8912"), 0);
590      return ay8910_r (devtag_get_device(space->machine, SOUND, "ay8912"), 0);
591591   }
592592   return 0xff;
593593}
594594
595595WRITE8_HANDLER ( orionpro_io_w ) {
596   device_config *fdc = (device_config*)devtag_get_device(space->machine, WD1793, "wd1793");
596   const device_config *fdc = devtag_get_device(space->machine, WD1793, "wd1793");
597597     
598598   switch (offset & 0xff) {     
599599      case 0x04 : orionpro_ram0_segment = data; orionpro_bank_switch(space->machine); break;     
src/mess/machine/a7800.c
r4283r4284
127127   /* pokey cartridge */
128128   if (a7800_cart_type & 0x01)
129129   {
130      const device_config *pokey = devtag_get_device(machine, SOUND_POKEY, "pokey");
130      const device_config *pokey = devtag_get_device(machine, SOUND, "pokey");
131131      memory_install_read8_device_handler(space, pokey, 0x4000, 0x7FFF, 0, 0, pokey_r);
132132      memory_install_write8_device_handler(space, pokey, 0x4000, 0x7FFF, 0, 0, pokey_w);
133133   }
r4283r4284
350350      }
351351      else if(a7800_cart_type & 0x01)
352352      {
353         const device_config *pokey = devtag_get_device(space->machine, SOUND_POKEY, "pokey");
353         const device_config *pokey = devtag_get_device(space->machine, SOUND, "pokey");
354354         pokey_w(pokey, offset, data);
355355      }
356356      else
r4283r4284
454454      }
455455      break;
456456   }
457   tia_sound_w(devtag_get_device(space->machine, SOUND_TIA, "tia"), offset, data);
457   tia_sound_w(devtag_get_device(space->machine, SOUND, "tia"), offset, data);
458458   ROM[offset] = data;
459459}
src/mess/machine/sms.c
r4283r4284
309309{
310310   if ( HAS_FM )
311311   {
312      const device_config *ym = devtag_get_device(space->machine, SOUND_YM2413, "ym2413");
312      const device_config *ym = devtag_get_device(space->machine, SOUND, "ym2413");
313313      ym2413_w(ym, 0, (data & 0x3F));
314314   }
315315}
r4283r4284
318318{
319319   if ( HAS_FM )
320320   {
321      const device_config *ym = devtag_get_device(space->machine, SOUND_YM2413, "ym2413");
321      const device_config *ym = devtag_get_device(space->machine, SOUND, "ym2413");
322322      logerror("data_port_0_w %x %x\n", offset, data);
323323      ym2413_w(ym, 1, data);
324324   }
src/mess/machine/odyssey2.c
r4283r4284
8686      if ( offset & 0x80 ) {
8787         if ( data & 0x20 ) {
8888            logerror("voice write %02X, data = %02X (p1 = %02X)\n", offset, data, p1 );
89            sp0256_ALD_w( devtag_get_device(space->machine, SOUND_SP0256, "sp0256_speech"), 0, offset & 0x7F );
89            sp0256_ALD_w( devtag_get_device(space->machine, SOUND, "sp0256_speech"), 0, offset & 0x7F );
9090         } else {
9191            /* TODO: Reset sp0256 in this case */
9292         }
src/mess/machine/apple2gs.c
r4283r4284
861861         }
862862         else
863863         {
864            const device_config *es5503 = devtag_get_device(space->machine, SOUND_ES5503, "es5503");
864            const device_config *es5503 = devtag_get_device(space->machine, SOUND, "es5503");
865865            sndglu_dummy_read = es5503_r(es5503, sndglu_addr);
866866         }
867867
r4283r4284
901901         }
902902         else
903903         {
904            const device_config *es5503 = devtag_get_device(space->machine, SOUND_ES5503, "es5503");
904            const device_config *es5503 = devtag_get_device(space->machine, SOUND, "es5503");
905905            es5503_w(es5503, sndglu_addr, data);
906906         }
907907
src/mess/machine/msx.c
r4283r4284
568568{
569569   if (msx1.opll_active)
570570   {
571      const device_config *ym = devtag_get_device(space->machine, SOUND_YM2413, "ym2413");
571      const device_config *ym = devtag_get_device(space->machine, SOUND, "ym2413");
572572
573573      if (offset == 1)
574574         ym2413_w (ym, 1, data);
src/mess/machine/nes_mmc.c
r4283r4284
895895   /* Send $5000-$5015 to the sound chip */
896896   if ((offset >= 0xf00) && (offset <= 0xf15))
897897   {
898      nes_psg_w (devtag_get_device(space->machine, SOUND_NES, "nessound"), offset & 0x1f, data);
898      nes_psg_w (devtag_get_device(space->machine, SOUND, "nessound"), offset & 0x1f, data);
899899      return;
900900   }
901901
src/mess/machine/geneve.c
r4283r4284
319319{
320320   cpu_adjust_icount(space->machine->cpu[0],-8);      /* this is just a minimum, it can be more */
321321
322   return tms5220_status_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), offset);
322   return tms5220_status_r(devtag_get_device(space->machine, SOUND, "tms5220"), offset);
323323}
324324
325325#if 0
326326
327327static void speech_kludge_callback(int dummy)
328328{
329   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")))
329   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND, "tms5220")))
330330   {
331331      /* Weirdly enough, we are always seeing some problems even though
332332      everything is working fine. */
r4283r4284
350350   there are 15 bytes in FIFO.  It should be 16.  Of course, if it were the
351351   case, we would need to store the value on the bus, which would be more
352352   complex. */
353   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")))
353   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND, "tms5220")))
354354   {
355      attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")));
355      attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND, "tms5220")));
356356      int cycles_to_ready = ceil(cpu_attotime_to_clocks(space->machine->cpu[0], time_to_ready));
357357
358358      logerror("time to ready: %f -> %d\n", attotime_to_double(time_to_ready), (int) cycles_to_ready);
r4283r4284
362362   }
363363#endif
364364
365   tms5220_data_w(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), offset, data);
365   tms5220_data_w(devtag_get_device(space->machine, SOUND, "tms5220"), offset, data);
366366}
367367
368368READ8_HANDLER ( geneve_r )
r4283r4284
663663            return*/
664664
665665         case 0xf120:
666            sn76496_w(devtag_get_device(space->machine, SOUND_SN76489, "sn76496"), 0, data);
666            sn76496_w(devtag_get_device(space->machine, SOUND, "sn76496"), 0, data);
667667            break;
668668
669669         case 0xf130:
r4283r4284
747747         {
748748         case 1:
749749            /* sound write */
750            sn76496_w(devtag_get_device(space->machine, SOUND_SN76489, "sn76496"), 0, data);
750            sn76496_w(devtag_get_device(space->machine, SOUND, "sn76496"), 0, data);
751751            return;
752752
753753         case 3:
src/mess/machine/ti99_4x.c
r4283r4284
10821082{
10831083   cpu_adjust_icount(space->machine->cpu[0],-4);
10841084
1085   sn76496_w(devtag_get_device(space->machine, SOUND_SN76489, "sn76496"), offset, (data >> 8) & 0xff);
1085   sn76496_w(devtag_get_device(space->machine, SOUND, "sn76496"), offset, (data >> 8) & 0xff);
10861086}
10871087
10881088/*
r4283r4284
11711171{
11721172   cpu_adjust_icount(space->machine->cpu[0],-(18+3));      /* this is just a minimum, it can be more */
11731173
1174   return ((int) tms5220_status_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), offset)) << 8;
1174   return ((int) tms5220_status_r(devtag_get_device(space->machine, SOUND, "tms5220"), offset)) << 8;
11751175}
11761176
11771177#if 0
r4283r4284
12021202   there are 15 bytes in FIFO.  It should be 16.  Of course, if it were the
12031203   case, we would need to store the value on the bus, which would be more
12041204   complex. */
1205   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")))
1205   if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND, "tms5220")))
12061206   {
1207      attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")));
1207      attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND, "tms5220")));
12081208      int cycles_to_ready = cpu_attotime_to_clocks(space->machine->cpu[0], time_to_ready);
12091209
12101210      logerror("time to ready: %f -> %d\n", attotime_to_double(time_to_ready), (int) cycles_to_ready);
r4283r4284
12141214   }
12151215#endif
12161216
1217   tms5220_data_w(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), offset, (data >> 8) & 0xff);
1217   tms5220_data_w(devtag_get_device(space->machine, SOUND, "tms5220"), offset, (data >> 8) & 0xff);
12181218}
12191219
12201220/*
r4283r4284
13941394            if (! (offset & 1))
13951395            {
13961396               cpu_adjust_icount(space->machine->cpu[0],-16*4);      /* this is just a minimum, it can be more */
1397               reply = tms5220_status_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), 0);
1397               reply = tms5220_status_r(devtag_get_device(space->machine, SOUND, "tms5220"), 0);
13981398            }
13991399            break;
14001400
r4283r4284
15051505         case 1:
15061506            /* sound write + RAM */
15071507            if (offset < 0x8410)
1508               sn76496_w(devtag_get_device(space->machine, SOUND_SN76489, "sn76496"), offset, data);
1508               sn76496_w(devtag_get_device(space->machine, SOUND, "sn76496"), offset, data);
15091509            else
15101510               sRAM_ptr_8[offset & 0x1fff] = data;
15111511            break;
r4283r4284
15631563               there are 15 bytes in FIFO.  It should be 16.  Of course, if it were the
15641564               case, we would need to store the value on the bus, which would be more
15651565               complex. */
1566               if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")))
1566               if (! tms5220_ready_r(devtag_get_device(space->machine, SOUND, "tms5220")))
15671567               {
1568                  attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220")));
1568                  attotime time_to_ready = double_to_attotime(tms5220_time_to_ready(devtag_get_device(space->machine, SOUND, "tms5220")));
15691569                  double d = ceil(cpu_attotime_to_clocks(space->machine->cpu[0], time_to_ready));
15701570                  int cycles_to_ready = ((int) (d + 3)) & ~3;
15711571
r4283r4284
15761576                  timer_set(space->machine, attotime_zero, NULL, 0, /*speech_kludge_callback*/NULL);
15771577               }
15781578
1579               tms5220_data_w(devtag_get_device(space->machine, SOUND_TMS5220, "tms5220"), offset, data);
1579               tms5220_data_w(devtag_get_device(space->machine, SOUND, "tms5220"), offset, data);
15801580            }
15811581            break;
15821582
src/mess/machine/atarifdc.c
r4283r4284
670670
671671   if (atari_fdc.serin_count)
672672   {
673      const device_config *pokey = devtag_get_device(space->machine, SOUND_POKEY, "pokey");
673      const device_config *pokey = devtag_get_device(space->machine, SOUND, "pokey");
674674
675675      data = atari_fdc.serin_buff[atari_fdc.serin_offs];
676676      ser_delay = 2 * 40;
src/mess/machine/bbc.c
r4283r4284
927927   if (b0_sound==0)
928928   {
929929       //logerror("Doing an unsafe write to the sound chip %d \n",data);
930      sn76496_w(devtag_get_device(device->machine, SOUND_SN76489, "sn76489"), 0,via_system_porta);
930      sn76496_w(devtag_get_device(device->machine, SOUND, "sn76489"), 0,via_system_porta);
931931   }
932932   if (b3_keyboard==0)
933933   {
r4283r4284
10231023      case 0:
10241024         if (b0_sound==1) {
10251025            b0_sound=0;
1026            sn76496_w(devtag_get_device(space->machine, SOUND_SN76489, "sn76489"), 0, via_system_porta);
1026            sn76496_w(devtag_get_device(space->machine, SOUND, "sn76489"), 0, via_system_porta);
10271027         }
10281028         break;
10291029      case 1:
src/mess/drivers/nc.c
r4283r4284
725725   frequency = (int)(1000000.0f/((float)((period & 0x07fff)<<1) * 1.6276f));
726726
727727   /* set state */
728   beep_set_state(devtag_get_device(machine, SOUND_BEEP, beep_device), on);
728   beep_set_state(devtag_get_device(machine, SOUND, beep_device), on);
729729   /* set frequency */
730   beep_set_frequency(devtag_get_device(machine, SOUND_BEEP, beep_device), frequency);
730   beep_set_frequency(devtag_get_device(machine, SOUND, beep_device), frequency);
731731}
732732
733733static WRITE8_HANDLER(nc_sound_w)
src/mess/drivers/x68k.c
r4283r4284
884884   {
885885   case 0x00:
886886   case 0x01:
887      ym2151_w(devtag_get_device(space->machine, SOUND_YM2151, "ym2151"), offset, data);
887      ym2151_w(devtag_get_device(space->machine, SOUND, "ym2151"), offset, data);
888888      break;
889889   }
890890}
r4283r4284
892892static READ16_HANDLER( x68k_fm_r )
893893{
894894   if(offset == 0x01)
895      return ym2151_r(devtag_get_device(space->machine, SOUND_YM2151, "ym2151"), 0);
895      return ym2151_r(devtag_get_device(space->machine, SOUND, "ym2151"), 0);
896896
897897   return 0xff;
898898}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team