void driver_device::device_start() { // reschedule ourselves to be last for (device_t &test : device_iterator(*this)) if (&test != this && !test.started()) throw device_missing_dependencies(); // call the game-specific init m_system->driver_init(*this); // finish image devices init process machine().image().postdevice_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
int manager_startup(Manager *m) { int r; Machine *machine; Iterator i; assert(m); assert(m->epoll_fd <= 0); m->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (m->epoll_fd < 0) return -errno; /* Connect to the bus */ r = manager_connect_bus(m); if (r < 0) return r; /* Deserialize state */ manager_enumerate_machines(m); /* Remove stale objects before we start them */ manager_gc(m, false); /* And start everything */ HASHMAP_FOREACH(machine, m->machines, i) machine_start(machine, NULL); return 0; }
int main(int argc, char *argv[]) { /* Initialize terminal and start virtual machine */ terminal_init(); machine_start(); return (EXIT_SUCCESS); }
MACHINE_START_MEMBER( nes_state, famitwin ) { // start the base nes stuff machine_start(); // if there is no cart inserted, setup the disk expansion instead if (!m_cartslot->exists()) { setup_disk(m_disk); // replace the famicom disk ROM with the famicom twin one (until we modernize the floppy drive) m_maincpu->space(AS_PROGRAM).install_read_bank(0xe000, 0xffff, "ftbios"); membank("ftbios")->set_base(machine().root_device().memregion("maincpu")->base() + 0xe000); } }
void driver_device::device_start() { // bind our legacy callbacks for (int index = 0; index < ARRAY_LENGTH(m_legacy_callbacks); index++) if (m_legacy_callbacks[index] != NULL) m_callbacks[index] = driver_callback_delegate(m_legacy_callbacks[index], "legacy_callback", &machine()); // reschedule ourselves to be last device_iterator iter(*this); for (device_t *test = iter.first(); test != NULL; test = iter.next()) if (test != this && !test->started()) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != NULL) (*m_system->driver_init)(machine()); // finish image devices init process image_postdevice_init(machine()); // call palette_init if present if (!m_callbacks[CB_PALETTE_INIT].isnull()) m_callbacks[CB_PALETTE_INIT](); else palette_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
MACHINE_START_MEMBER(n64_mess_state,n64dd) { machine_start(); machine().device<n64_periphs>("rcp")->dd_present = true; UINT8 *ipl = memregion("ddipl")->base(); for (int i = 0; i < 0x400000; i += 4) { UINT8 b1 = ipl[i + 0]; UINT8 b2 = ipl[i + 1]; UINT8 b3 = ipl[i + 2]; UINT8 b4 = ipl[i + 3]; ipl[i + 0] = b1; ipl[i + 1] = b2; ipl[i + 2] = b3; ipl[i + 3] = b4; } }
MACHINE_START_MEMBER(n64_mess_state,n64dd) { machine_start(); UINT8 *ipl = memregion("ddipl")->base(); for (int i = 0; i < 0x400000; i += 4) { UINT8 b1 = ipl[i + 0]; UINT8 b2 = ipl[i + 1]; UINT8 b3 = ipl[i + 2]; UINT8 b4 = ipl[i + 3]; ipl[i + 0] = b1; ipl[i + 1] = b2; ipl[i + 2] = b3; ipl[i + 3] = b4; } }
void driver_device::device_start() { // reschedule ourselves to be last device_iterator iter(*this); for (device_t *test = iter.first(); test != nullptr; test = iter.next()) if (test != this && !test->started()) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != nullptr) (*m_system->driver_init)(machine()); // finish image devices init process machine().image().postdevice_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_latch_clear_value)); save_item(NAME(m_latched_value)); save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
void driver_device::device_start() { // reschedule ourselves to be last if (next() != NULL) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != NULL) (*m_system->driver_init)(machine()); // finish image devices init process image_postdevice_init(machine()); // call palette_init if present if (m_palette_init != NULL) (*m_palette_init)(machine(), machine().region("proms")->base()); // start the various pieces driver_start(); machine_start(); sound_start(); video_start(); }
int manager_startup(Manager *m) { Machine *machine; Iterator i; int r; assert(m); /* Connect to the bus */ r = manager_connect_bus(m); if (r < 0) return r; /* Deserialize state */ manager_enumerate_machines(m); /* Remove stale objects before we start them */ manager_gc(m, false); /* And start everything */ HASHMAP_FOREACH(machine, m->machines, i) machine_start(machine, NULL, NULL); return 0; }
MACHINE_START_MEMBER(vicdual_state,frogs_audio) { m_frogs_croak_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vicdual_state::frogs_croak_callback), this)); machine_start(); }
MACHINE_START_MEMBER(yunsun16_state, shocking) { machine_start(); membank("okibank")->configure_entries(0, 0x80000 / 0x20000, memregion("oki")->base(), 0x20000); membank("okibank")->set_entry(0); }
MACHINE_START_MEMBER(fastfred_state,imago) { machine_start(); m_gfxdecode->gfx(1)->set_source(m_imago_sprites); }