trunk/src/mame/audio/atarijsa.c
| r17816 | r17817 | |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /* reset the YM2151 if needed */ |
| 301 | | if ((data&1) == 0) devtag_reset(space->machine(), "ymsnd"); |
| 301 | if ((data&1) == 0) space->machine().device("ymsnd")->reset(); |
| 302 | 302 | |
| 303 | 303 | /* coin counters */ |
| 304 | 304 | coin_counter_w(space->machine(), 1, (data >> 5) & 1); |
| r17816 | r17817 | |
| 419 | 419 | */ |
| 420 | 420 | |
| 421 | 421 | /* reset the YM2151 if needed */ |
| 422 | | if ((data&1) == 0) devtag_reset(space->machine(), "ymsnd"); |
| 422 | if ((data&1) == 0) space->machine().device("ymsnd")->reset(); |
| 423 | 423 | |
| 424 | 424 | /* update the bank */ |
| 425 | 425 | memcpy(bank_base, &bank_source_data[0x1000 * ((data >> 6) & 3)], 0x1000); |
| r17816 | r17817 | |
| 544 | 544 | */ |
| 545 | 545 | |
| 546 | 546 | /* reset the YM2151 if needed */ |
| 547 | | if ((data&1) == 0) devtag_reset(space->machine(), "ymsnd"); |
| 547 | if ((data&1) == 0) space->machine().device("ymsnd")->reset(); |
| 548 | 548 | |
| 549 | 549 | /* update the OKI bank */ |
| 550 | 550 | if (oki6295 != NULL) |
| r17816 | r17817 | |
| 678 | 678 | */ |
| 679 | 679 | |
| 680 | 680 | /* reset the YM2151 if needed */ |
| 681 | | if ((data&1) == 0) devtag_reset(space->machine(), "ymsnd"); |
| 681 | if ((data&1) == 0) space->machine().device("ymsnd")->reset(); |
| 682 | 682 | |
| 683 | 683 | /* update the OKI bank */ |
| 684 | 684 | space->machine().root_device().membank("bank12")->set_entry((space->machine().root_device().membank("bank12")->entry() & 2) | ((data >> 1) & 1)); |
trunk/src/mame/machine/amiga.c
| r17816 | r17817 | |
| 266 | 266 | logerror("Executed RESET at PC=%06x\n", space->device().safe_pc()); |
| 267 | 267 | |
| 268 | 268 | /* Initialize the various chips */ |
| 269 | | devtag_reset(device->machine(), "cia_0"); |
| 270 | | devtag_reset(device->machine(), "cia_1"); |
| 269 | device->machine().device("cia_0")->reset(); |
| 270 | device->machine().device("cia_1")->reset(); |
| 271 | 271 | custom_reset(device->machine()); |
| 272 | 272 | autoconfig_reset(device->machine()); |
| 273 | 273 | |
trunk/src/mame/machine/toaplan1.c
| r17816 | r17817 | |
| 314 | 314 | if (ACCESSING_BITS_0_7 && (data == 0)) |
| 315 | 315 | { |
| 316 | 316 | logerror("PC:%04x Resetting Sound CPU and Sound chip (%08x)\n", space.device().safe_pcbase(), data); |
| 317 | | devtag_reset(machine(), "ymsnd"); |
| 317 | machine().device("ymsnd")->reset(); |
| 318 | 318 | device_t *audiocpu = machine().device("audiocpu"); |
| 319 | 319 | if (audiocpu != NULL && audiocpu->type() == Z80) |
| 320 | 320 | audiocpu->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); |
trunk/src/mame/machine/mcr.c
| r17816 | r17817 | |
| 254 | 254 | { |
| 255 | 255 | logerror("ipu_watchdog_reset\n"); |
| 256 | 256 | machine.device("ipu")->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE); |
| 257 | | devtag_reset(machine, "ipu_ctc"); |
| 258 | | devtag_reset(machine, "ipu_pio0"); |
| 259 | | devtag_reset(machine, "ipu_pio1"); |
| 260 | | devtag_reset(machine, "ipu_sio"); |
| 257 | machine.device("ipu_ctc")->reset(); |
| 258 | machine.device("ipu_pio0")->reset(); |
| 259 | machine.device("ipu_pio1")->reset(); |
| 260 | machine.device("ipu_sio")->reset(); |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | |
trunk/src/mame/drivers/zn.c
| r17816 | r17817 | |
| 1520 | 1520 | machine.root_device().membank( "bank1" )->set_base( machine.root_device().memregion( "user2" )->base() ); /* fixed game rom */ |
| 1521 | 1521 | zn_machine_init(machine); |
| 1522 | 1522 | |
| 1523 | | devtag_reset(machine, "ide"); |
| 1523 | machine.device("ide")->reset(); |
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | 1526 | static const ide_config ide_intf = |
| r17816 | r17817 | |
| 2195 | 2195 | if( ( !strcmp( machine.system().name, "jdredd" ) ) || |
| 2196 | 2196 | ( !strcmp( machine.system().name, "jdreddb" ) ) ) |
| 2197 | 2197 | { |
| 2198 | | devtag_reset(machine, "ide"); |
| 2198 | machine.device("ide")->reset(); |
| 2199 | 2199 | } |
| 2200 | 2200 | } |
| 2201 | 2201 | |
trunk/src/mame/drivers/gauntlet.c
| r17816 | r17817 | |
| 214 | 214 | atarigen_sound_reset(machine()); |
| 215 | 215 | if (m_sound_reset_val & 1) |
| 216 | 216 | { |
| 217 | | devtag_reset(machine(), "ymsnd"); |
| 218 | | devtag_reset(machine(), "tms"); |
| 217 | machine().device("ymsnd")->reset(); |
| 218 | machine().device("tms")->reset(); |
| 219 | 219 | tms5220_set_frequency(machine().device("tms"), ATARI_CLOCK_14MHz/2 / 11); |
| 220 | 220 | atarigen_set_ym2151_vol(machine(), 0); |
| 221 | 221 | atarigen_set_pokey_vol(machine(), 0); |
| r17816 | r17817 | |
| 258 | 258 | switch (offset & 7) |
| 259 | 259 | { |
| 260 | 260 | case 0: /* music reset, bit D7, low reset */ |
| 261 | | if (((data>>7)&1) == 0) devtag_reset(machine(), "ymsnd"); |
| 261 | if (((data>>7)&1) == 0) machine().device("ymsnd")->reset(); |
| 262 | 262 | break; |
| 263 | 263 | |
| 264 | 264 | case 1: /* speech write, bit D7, active low */ |
trunk/src/mame/drivers/atarisy2.c
| r17816 | r17817 | |
| 710 | 710 | |
| 711 | 711 | /* a large number of signals are reset when this happens */ |
| 712 | 712 | atarigen_sound_io_reset(machine().device("soundcpu")); |
| 713 | | devtag_reset(machine(), "ymsnd"); |
| 713 | machine().device("ymsnd")->reset(); |
| 714 | 714 | if (m_has_tms5220) |
| 715 | 715 | { |
| 716 | | devtag_reset(machine(), "tms"); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip. |
| 716 | machine().device("tms")->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip. |
| 717 | 717 | } |
| 718 | 718 | mixer_w(space, 0, 0); |
| 719 | 719 | } |
trunk/src/mame/drivers/megatech.c
| r17816 | r17817 | |
| 258 | 258 | machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 259 | 259 | //machine.device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| 260 | 260 | //machine.device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| 261 | | devtag_reset(machine, "ymsnd"); |
| 261 | machine.device("ymsnd")->reset(); |
| 262 | 262 | |
| 263 | 263 | megadriv_stop_scanline_timer(machine);// stop the scanline timer for the genesis vdp... it can be restarted in video eof when needed |
| 264 | 264 | segae_md_sms_stop_scanline_timer();// stop the scanline timer for the sms vdp |
trunk/src/mame/drivers/taitogn.c
| r17816 | r17817 | |
| 403 | 403 | // Check for card reset |
| 404 | 404 | if (!(data & 0x40)) |
| 405 | 405 | { |
| 406 | | devtag_reset(machine, ":card"); |
| 406 | machine.device(":card")->reset(); |
| 407 | 407 | state->m_locked = 0x1ff; |
| 408 | 408 | ide_set_gnet_readlock (machine.device(":card"), 1); |
| 409 | 409 | } |
| r17816 | r17817 | |
| 889 | 889 | state->m_locked = 0x1ff; |
| 890 | 890 | install_handlers(machine, 0); |
| 891 | 891 | state->m_control = 0; |
| 892 | | devtag_reset(machine, ":card"); |
| 892 | machine.device(":card")->reset(); |
| 893 | 893 | ide_set_gnet_readlock(machine.device(":card"), 1); |
| 894 | 894 | |
| 895 | 895 | // halt sound CPU since it has no valid program at start |
trunk/src/emu/device.h
| r17816 | r17817 | |
| 55 | 55 | // macro for specifying a clock derived from an owning device |
| 56 | 56 | #define DERIVED_CLOCK(num, den) (0xff000000 | ((num) << 12) | ((den) << 0)) |
| 57 | 57 | |
| 58 | | // shorthand for accessing devices by machine/type/tag |
| 59 | | #define devtag_reset(mach,tag) (mach).device(tag)->reset() |
| 60 | 58 | |
| 61 | 59 | |
| 62 | | |
| 63 | 60 | //************************************************************************** |
| 64 | 61 | // DEVICE CONFIGURATION MACROS |
| 65 | 62 | //************************************************************************** |
trunk/src/mess/drivers/dectalk.c
| r17816 | r17817 | |
| 331 | 331 | dectalk_x2212_recall(device->machine()); // nvram recall |
| 332 | 332 | state->m_m68k_spcflags_latch = 1; // initial status is speech reset(d0) active and spc int(d6) disabled |
| 333 | 333 | state->m_m68k_tlcflags_latch = 0; // initial status is tone detect int(d6) off, answer phone(d8) off, ring detect int(d14) off |
| 334 | | devtag_reset(device->machine(), "duart68681"); // reset the DUART |
| 334 | device->machine().device("duart68681")->reset(); // reset the DUART |
| 335 | 335 | // stuff that is INDIRECTLY affected by the RESET line |
| 336 | 336 | dectalk_clear_all_fifos(device->machine()); // speech reset clears the fifos, though we have to do it explicitly here since we're not actually in the m68k_spcflags_w function. |
| 337 | 337 | dectalk_semaphore_w(device->machine(), 0); // on the original state->m_dectalk pcb revision, this is a semaphore for the INPUT fifo, later dec hacked on a check for the 3 output fifo chips to see if they're in sync, and set both of these latches if true. |