/* * Early initialization of emulator, parsing of command-line options, * and loading of config files, etc. * * TODO: Need better cohesion! Break this sucker up! */ static int do_preinit_machine (int argc, char **argv) { if (! graphics_setup ()) { exit (1); } if (restart_config[0]) { #ifdef FILESYS free_mountinfo (currprefs.mountinfo); #endif default_prefs (&currprefs, 0); fix_options (); } #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef FILESYS rtarea_init (); hardfile_install (); #endif if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; uae_inithrtimer (); machdep_init (); if (! audio_setup ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } inputdevice_init (); return 1; }
static void real_main2 (int argc, char **argv) { #if defined (NATMEM_OFFSET) && defined( _WIN32 ) && !defined( NO_WIN32_EXCEPTION_HANDLER ) extern int EvalException ( LPEXCEPTION_POINTERS blah, int n_except ); __try #endif { if (! graphics_setup ()) { exit (1); } if (restart_config[0]) { #ifdef FILESYS free_mountinfo (currprefs.mountinfo); currprefs.mountinfo = alloc_mountinfo (); #endif default_prefs (&currprefs, 0); fix_options (); } #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef FILESYS rtarea_init (); hardfile_install (); #endif if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; uae_inithrtimer (); sleep_test (); machdep_init (); if (! setup_sound ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (restart_program == 2) no_gui = 1; else if (restart_program == 3) no_gui = 0; if (! no_gui) { int err = gui_init (); struct uaedev_mount_info *mi = currprefs.mountinfo; currprefs = changed_prefs; currprefs.mountinfo = mi; if (err == -1) { write_log ("Failed to initialize the GUI\n"); if (restart_program == 3) { restart_program = 0; return; } } else if (err == -2) { restart_program = 0; return; } } restart_program = 0; #ifdef JIT if (!(( currprefs.cpu_level >= 2 ) && ( currprefs.address_space_24 == 0 ) && ( currprefs.cachesize ))) canbang = 0; #endif #ifdef _WIN32 logging_init(); /* Yes, we call this twice - the first case handles when the user has loaded a config using the cmd-line. This case handles loads through the GUI. */ #endif fix_options (); changed_prefs = currprefs; #ifdef SAVESTATE savestate_init (); #endif #ifdef SCSIEMU scsidev_install (); #endif #ifdef AUTOCONFIG /* Install resident module to get 8MB chipmem, if requested */ rtarea_setup (); #endif keybuf_init (); /* Must come after init_joystick */ #ifdef AUTOCONFIG expansion_init (); #endif memory_init (); memory_reset (); #ifdef FILESYS filesys_install (); #endif #ifdef AUTOCONFIG bsdlib_install (); emulib_install (); uaeexe_install (); native2amiga_install (); #endif if (custom_init ()) { /* Must come after memory_init */ #ifdef SERIAL_PORT serial_init (); #endif DISK_init (); reset_frame_rate_hack (); init_m68k(); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init ()) { #ifdef DEBUGGER setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); #endif #ifdef WIN32 #ifdef FILESYS filesys_init (); /* New function, to do 'add_filesys_unit()' calls at start-up */ #endif #endif if (sound_available && currprefs.produce_sound > 1 && ! init_audio ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } start_program (); } } } #if defined (NATMEM_OFFSET) && defined( _WIN32 ) && !defined( NO_WIN32_EXCEPTION_HANDLER ) __except( EvalException( GetExceptionInformation(), GetExceptionCode() ) ) { // EvalException does the good stuff... } #endif }
void main(void) { int key, v, h; int oldv=0,oldh=0; int x1,y1,x2,y2; int x; turnon(); graphics_setup(); setcolor(c7); initrat(&rat); key = checkinput(); h=rat.horiz; v=rat.verti; oldh=h; oldv=v; r1=0.0; r2=0.0; r3=0.0; msz=-150; newpos(); while(!(key==ESC)) { key = checkinput(); h = rat.horiz; v = rat.verti; if(oldh!=h) { if(oldh<h) { if(r1+0.1>6.28319) r1=0.0; else r1+=0.1; } else { if(r1-0.1<0.0) r1=6.28319; else r1-=0.1; } newpos(); } if(oldv!=v) { if(oldv>v) { if(r3+0.1>6.28319) r3=0.0; else r3+=0.1; } else { if(r3-0.1<0.0) r3=6.28319; else r3-=0.1; } newpos(); } resetrat(&rat); h=rat.horiz; v=rat.verti; oldh=h; oldv=v; switch(key) { case UP: msz+=10; newpos(); break; case DOWN: msz-=10; newpos(); break; case LEFT: if(r2+0.1>6.28319) r2=0.0; else r2+=0.1; newpos(); break; case RIGHT: if(r2-0.1<0.0) r2=6.28319; else r2-=0.1; newpos(); break; /* case PGUP: hand[0]=x; hand[1]=y-17; hand[2]=x; hand[3]=y+8; hand[4]=x-10; hand[5]=y-12; hand[6]=x; hand[7]=y; hand[8]=x+10; hand[9]=y-12; hand[10]=x; hand[11]=y; drawhand(h,v,oldh,oldv); break; case PGDN: hand[0]=x; hand[1]=y-17; hand[2]=x; hand[3]=y+8; hand[4]=x-10; hand[5]=y-12; hand[6]=x; hand[7]=y; hand[8]=x+10; hand[9]=y-12; hand[10]=x; hand[11]=y; drawhand(h,v,oldh,oldv); break; */ } } ratoff(); turnoff(); quit_pgm(); }
static int real_main2 (int argc, TCHAR **argv) { #ifdef USE_SDL int result = (SDL_Init (SDL_INIT_TIMER | SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE) == 0); if (result) atexit (SDL_Quit); #endif set_config_changed (); if (restart_config[0]) { default_prefs (&currprefs, 0); fixup_prefs (&currprefs); } if (! graphics_setup ()) { write_log (_T("Graphics Setup Failed\n")); exit (1); } if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; // uae_inithrtimer (); if (!machdep_init ()) { write_log (_T("Machine Init Failed.\n")); restart_program = 0; return -1; } if (console_emulation) { consolehook_config (&currprefs); fixup_prefs (&currprefs); } if (! setup_sound ()) { write_log (_T("Sound driver unavailable: Sound output disabled\n")); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (restart_program == 2) no_gui = 1; else if (restart_program == 3) no_gui = 0; restart_program = 0; if (! no_gui && currprefs.start_gui) { int err = gui_init (); currprefs = changed_prefs; set_config_changed (); if (err == -1) { write_log (_T("Failed to initialize the GUI\n")); return -1; } else if (err == -2) { return 1; } } memset (&gui_data, 0, sizeof gui_data); gui_data.cd = -1; gui_data.hd = -1; gui_data.md = -1; #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef PICASSO96 picasso_reset (); #endif fixup_prefs (&currprefs); #ifdef RETROPLATFORM rp_fixup_options (&currprefs); #endif changed_prefs = currprefs; target_run (); /* force sound settings change */ currprefs.produce_sound = 0; savestate_init (); keybuf_init (); /* Must come after init_joystick */ memory_hardreset (2); memory_reset (); #ifdef AUTOCONFIG native2amiga_install (); #endif custom_init (); /* Must come after memory_init */ #ifdef SERIAL_PORT serial_init (); #endif DISK_init (); reset_frame_rate_hack (); init_m68k (); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init ()) { #ifdef DEBUGGER setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); #endif if (!init_audio ()) { if (sound_available && currprefs.produce_sound > 1) { write_log (_T("Sound driver unavailable: Sound output disabled\n")); } currprefs.produce_sound = 0; } start_program (); } return 0; }
void real_main (int argc, char **argv) { #ifdef USE_SDL SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK #if !defined(NO_SOUND) && !defined(GP2X) | SDL_INIT_AUDIO #endif ); #endif getcwd(launchDir,250); /* PocketUAE prefs */ default_prefs_uae (&currprefs); default_prefs(); #ifdef GP2X gp2x_init(argc, argv); #endif // Set everthing to default and clear HD settings SetDefaultMenuSettings(1); loadconfig (1); if (! graphics_setup ()) { exit (1); } rtarea_init (); hardfile_install(); if (! setup_sound ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); produce_sound = 0; } init_joystick (); int err = gui_init (); if (err == -1) { write_log ("Failed to initialize the GUI\n"); } else if (err == -2) { exit (0); } if (sound_available && produce_sound > 1 && ! init_audio ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); produce_sound = 0; } /* Install resident module to get 8MB chipmem, if requested */ rtarea_setup (); keybuf_init (); /* Must come after init_joystick */ #ifdef USE_AUTOCONFIG expansion_init (); #endif memory_init (); filesys_install (); native2amiga_install (); custom_init (); /* Must come after memory_init */ DISK_init (); m68k_init(0); gui_update (); #ifdef GP2X switch_to_hw_sdl(1); #endif { start_program (); } leave_program (); }
static int real_main2 (int argc, TCHAR **argv) { #ifdef USE_SDL SDL_Init (SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE); #endif set_config_changed (); if (restart_config[0]) { default_prefs (&currprefs, true, 0); fixup_prefs (&currprefs, true); } if (! graphics_setup ()) { exit (1); } #ifdef NATMEM_OFFSET //preinit_shm (); #endif if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; if (!machdep_init ()) { restart_program = 0; return -1; } if (console_emulation) { consolehook_config (&currprefs); fixup_prefs (&currprefs, true); } if (! setup_sound ()) { write_log (_T("Sound driver unavailable: Sound output disabled\n")); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (restart_program == 2) no_gui = 1; else if (restart_program == 3) no_gui = 0; restart_program = 0; if (! no_gui) { int err = gui_init (); currprefs = changed_prefs; set_config_changed (); if (err == -1) { write_log (_T("Failed to initialize the GUI\n")); return -1; } else if (err == -2) { return 1; } } memset (&gui_data, 0, sizeof gui_data); gui_data.cd = -1; gui_data.hd = -1; gui_data.md = (currprefs.cs_cd32nvram || currprefs.cs_cdtvram) ? 0 : -1; logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded a config using the cmd-line. This case handles loads through the GUI. */ #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef WITH_LUA uae_lua_init (); #endif #ifdef PICASSO96 picasso_reset (); #endif #if 0 #ifdef JIT if (!(currprefs.cpu_model >= 68020 && currprefs.address_space_24 == 0 && currprefs.cachesize)) canbang = 0; #endif #endif fixup_prefs (&currprefs, true); #ifdef RETROPLATFORM rp_fixup_options (&currprefs); #endif changed_prefs = currprefs; target_run (); /* force sound settings change */ currprefs.produce_sound = 0; savestate_init (); keybuf_init (); /* Must come after init_joystick */ memory_hardreset (2); memory_reset (); #ifdef AUTOCONFIG native2amiga_install (); #endif custom_init (); /* Must come after memory_init */ #ifdef SERIAL_PORT serial_init (); #endif DISK_init (); #ifdef WITH_PPC uae_ppc_reset(true); #endif reset_frame_rate_hack (); init_m68k (); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init (true)) { setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); if (!init_audio ()) { if (sound_available && currprefs.produce_sound > 1) { write_log (_T("Sound driver unavailable: Sound output disabled\n")); } currprefs.produce_sound = 0; } start_program (); } return 0; }
static int real_main2 (int argc, TCHAR **argv) { #ifdef USE_SDL SDL_Init (SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE); #endif config_changed = 1; if (restart_config[0]) { default_prefs (&currprefs, 0); fixup_prefs (&currprefs); } if (! graphics_setup ()) { exit (1); } #ifdef NATMEM_OFFSET preinit_shm (); #endif if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; if (!machdep_init ()) { restart_program = 0; return -1; } if (console_emulation) { consolehook_config (&currprefs); fixup_prefs (&currprefs); } if (! setup_sound ()) { write_log (L"Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (restart_program == 2) no_gui = 1; else if (restart_program == 3) no_gui = 0; restart_program = 0; if (! no_gui) { int err = gui_init (); currprefs = changed_prefs; config_changed = 1; if (err == -1) { write_log (L"Failed to initialize the GUI\n"); return -1; } else if (err == -2) { return 1; } } logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded a config using the cmd-line. This case handles loads through the GUI. */ #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef JIT if (!(currprefs.cpu_model >= 68020 && currprefs.address_space_24 == 0 && currprefs.cachesize)) canbang = 0; #endif fixup_prefs (&currprefs); changed_prefs = currprefs; target_run (); /* force sound settings change */ currprefs.produce_sound = 0; #ifdef AUTOCONFIG rtarea_setup (); #endif #ifdef FILESYS rtarea_init (); uaeres_install (); hardfile_install (); #endif savestate_init (); #ifdef SCSIEMU scsi_reset (); scsidev_install (); #endif #ifdef SANA2 netdev_install (); #endif #ifdef UAESERIAL uaeserialdev_install (); #endif keybuf_init (); /* Must come after init_joystick */ #ifdef AUTOCONFIG expansion_init (); #endif #ifdef FILESYS filesys_install (); #endif memory_init (); memory_reset (); #ifdef AUTOCONFIG #if defined (BSDSOCKET) bsdlib_install (); #endif emulib_install (); uaeexe_install (); native2amiga_install (); #endif custom_init (); /* Must come after memory_init */ #ifdef SERIAL_PORT serial_init (); #endif DISK_init (); reset_frame_rate_hack (); init_m68k (); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init ()) { setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); if (!init_audio ()) { if (sound_available && currprefs.produce_sound > 1) { write_log (L"Sound driver unavailable: Sound output disabled\n"); } currprefs.produce_sound = 0; } start_program (); } return 0; }
void real_main (int argc, char **argv) { int numb; char pattern[100]; char txt[100]; #ifdef USE_SDL SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK #if !defined(NO_SOUND) && !defined(GP2X) | SDL_INIT_AUDIO #endif ); #endif // Initialize timebase g_uae_epoch = read_processor_time(); syncbase = 1000000; // Microseconds //------------------------------------------ //just safe the game conf file for later use //------------------------------------------ if (argc > 1) { if (strlen(argv[1]) < 255) { strcpy(uae4all_game_conf_file0, argv[1]); strcpy(uae4all_game_conf_file1, argv[1]); strcpy(uae4all_game_conf_file2, argv[1]); strcpy(uae4all_game_conf_file3, argv[1]); strcpy(uae4all_game_conf_file4, argv[1]); strcpy(uae4all_game_conf_file5, argv[1]); strcpy(uae4all_game_conf_file6, argv[1]); strcpy(uae4all_game_conf_file7, argv[1]); getNumber(uae4all_game_conf_file0, "disk 1 of %", &numb); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file1, pattern, '2'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file2, pattern, '3'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file3, pattern, '4'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file4, pattern, '5'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file5, pattern, '6'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file6, pattern, '7'); strcpy(pattern, "disk %"); sprintf(txt, " of %d", numb); strcat(pattern, txt); replaceNumber(uae4all_game_conf_file7, pattern, '8'); } } getcwd(launchDir,250); /* PocketUAE prefs */ default_prefs_uae (&currprefs); default_prefs(); #ifdef GP2X gp2x_init(argc, argv); #endif // Set everthing to default and clear HD settings SetDefaultMenuSettings(1); loadconfig (1); if (! graphics_setup ()) { exit (1); } rtarea_init (); hardfile_install(); if (! setup_sound ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); produce_sound = 0; } init_joystick (); int err = gui_init (); if (err == -1) { write_log ("Failed to initialize the GUI\n"); } else if (err == -2) { exit (0); } if (sound_available && produce_sound > 1 && ! init_audio ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); produce_sound = 0; } /* Install resident module to get 8MB chipmem, if requested */ rtarea_setup (); keybuf_init (); /* Must come after init_joystick */ #ifdef USE_AUTOCONFIG expansion_init (); #endif memory_init (); filesys_install (); native2amiga_install (); custom_init (); /* Must come after memory_init */ DISK_init (); m68k_init(0); gui_update (); #ifdef GP2X switch_to_hw_sdl(1); #endif { start_program (); } leave_program (); }
static int real_main2 (int argc, TCHAR **argv) { #if (defined (_WIN32) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER) extern int EvalException (LPEXCEPTION_POINTERS blah, int n_except); __try #endif { #ifdef USE_SDL int result = (SDL_Init (SDL_INIT_TIMER | SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE) == 0); if (result) atexit (SDL_Quit); #endif config_changed = 1; if (restart_config[0]) { default_prefs (&currprefs, 0); fixup_prefs (&currprefs); } if (! graphics_setup ()) { write_log ("Graphics Setup Failed\n"); exit (1); } #ifdef NATMEM_OFFSET preinit_shm (); #endif if (restart_config[0]) parse_cmdline_and_init_file (argc, argv); else currprefs = changed_prefs; uae_inithrtimer (); if (!machdep_init ()) { write_log ("Machine Init Failed.\n"); restart_program = 0; return -1; } if (console_emulation) { consolehook_config (&currprefs); fixup_prefs (&currprefs); } if (! setup_sound ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (restart_program == 2) no_gui = 1; else if (restart_program == 3) no_gui = 0; restart_program = 0; if (! no_gui) { int err = gui_init (); currprefs = changed_prefs; config_changed = 1; if (err == -1) { write_log ("Failed to initialize the GUI\n"); return -1; } else if (err == -2) { return 1; } } #ifdef NATMEM_OFFSET init_shm (); #endif #ifdef JIT if (!(currprefs.cpu_model >= 68020 && currprefs.address_space_24 == 0 && currprefs.cachesize)) canbang = 0; #endif fixup_prefs (&currprefs); changed_prefs = currprefs; target_run (); /* force sound settings change */ currprefs.produce_sound = 0; #ifdef AUTOCONFIG /* Install resident module to get 8MB chipmem, if requested */ rtarea_setup (); #endif #ifdef FILESYS rtarea_init (); uaeres_install (); hardfile_install (); #endif savestate_init (); #ifdef SCSIEMU scsi_reset (); scsidev_install (); #endif #ifdef SANA2 netdev_install (); #endif #ifdef UAESERIAL uaeserialdev_install (); #endif keybuf_init (); /* Must come after init_joystick */ #ifdef AUTOCONFIG expansion_init (); #endif #ifdef FILESYS filesys_install (); #endif target_startup_sequence (&currprefs); memory_init (); memory_reset (); #ifdef AUTOCONFIG #if defined (BSDSOCKET) bsdlib_install (); #endif emulib_install (); uaeexe_install (); native2amiga_install (); #endif custom_init (); /* Must come after memory_init */ #ifdef SERIAL_PORT serial_init (); #endif DISK_init (); reset_frame_rate_hack (); init_m68k (); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init ()) { #ifdef DEBUGGER setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); #endif if (!init_audio ()) { if (sound_available && currprefs.produce_sound > 1) { write_log ("Sound driver unavailable: Sound output disabled\n"); } currprefs.produce_sound = 0; } start_program (); } } #if (defined (_WIN32) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER) #ifdef JIT __except( EvalException( GetExceptionInformation(), GetExceptionCode() ) ) #else __except (DummyException (GetExceptionInformation (), GetExceptionCode ())) #endif { // EvalException does the good stuff... } #endif return 0; }
void real_main (int argc, char **argv) { FILE *hf; #ifdef USE_SDL SDL_Init (SDL_INIT_EVERYTHING | SDL_INIT_NOPARACHUTE); #endif default_prefs (&currprefs); #ifdef SYSTEM_CFGDIR scan_configs (SYSTEM_CFGDIR); #endif /* Can be overriden in graphics_setup, although there's not much of a point. Fullscreen modes are filled in by graphics_setup. */ gfx_windowed_modes = default_windowed_modes; n_windowed_modes = sizeof default_windowed_modes / sizeof *default_windowed_modes; if (! graphics_setup ()) { exit (1); } rtarea_init (); hardfile_install (); scsidev_install (); parse_cmdline_and_init_file (argc, argv); machdep_init (); init_gtod (); if (! setup_sound ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } inputdevice_init (); changed_prefs = currprefs; no_gui = ! currprefs.start_gui; if (! no_gui) { int err = gui_init (1); currprefs = changed_prefs; if (err == -1) { write_log ("Failed to initialize the GUI\n"); } else if (err == -2) { exit (0); } } if (sound_available && currprefs.produce_sound > 1 && ! init_audio ()) { write_log ("Sound driver unavailable: Sound output disabled\n"); currprefs.produce_sound = 0; } fixup_prefs (&currprefs); changed_prefs = currprefs; #ifdef SYSTEM_ROMDIR scan_roms (SYSTEM_ROMDIR, ROMLOC_SYSTEM); #endif scan_roms (currprefs.path_rom, ROMLOC_USER); /* Install resident module to get 8MB chipmem, if requested */ rtarea_setup (); keybuf_init (); /* Must come after init_joystick */ expansion_init (); memory_init (); filesys_install (); bsdlib_install (); emulib_install (); uaeexe_install (); native2amiga_install (); custom_init (); /* Must come after memory_init */ serial_init (); DISK_init (); reset_frame_rate_hack (); init_m68k(); /* must come after reset_frame_rate_hack (); */ gui_update (); if (graphics_init ()) { reset_drawing (); setup_brkhandler (); if (currprefs.start_debugger && debuggable ()) activate_debugger (); start_program (); } leave_program (); }