示例#1
0
/*
========================================================================
main:	This is the main entry point for the VirtualT application.
========================================================================
*/
int main(int argc, char **argv)
{
	if (process_args(argc, argv))	/* Parse command line args */
		return 1;

	setup_working_path(argv);	/* Create a working dir path */
	setup_unix_signals();		/* Setup Unix signal handling */

	// Added by JV for prefs
	init_pref();				/* load user Menu preferences */
	check_installation();		/* Test if install needs to be performed */
	load_setup_preferences();	/* Load user Peripheral setup preferences */
	load_memory_preferences();	/* Load user Memory setup preferences */
	load_remote_preferences();  /* Load user Remote Socket preferences */
	
	/* Perform initialization */
	init_mem();					/* Initialize Memory */
	init_io();					/* Initialize I/O structures */
	init_sound();				/* Initialize Sound system */
	init_display();				/* Initialize the Display */
	init_cpu();					/* Initialize the CPU */
	init_throttle_timer();		/* Initialize the throttle timer */
	init_remote();				/* Initialize the remote control */
	init_lpt();					/* Initialize the printer subsystem */
	init_other_windows();		/* Initialize other windows that were opened (memedit, regs, etc. */
	get_model_time();			/* Load the emulated time for current model */

	/* Perform Emulation */
	emulate();					/* Main emulation loop */

	/* Save RAM contents after emulation */
	save_ram();
	save_model_time();			/* Save the emulated time */

	/* Cleanup */
	deinit_io();				/* Deinitialize I/O */
	deinit_sound();				/* Deinitialize sound */
	deinit_lpt();				/* Deinitialize the printer */
	deinit_throttle_timer();	/* Deinitialize the throttle timer */
	deinit_display();			/* Deinitialze and free the main window */
	free_mem();					/* Free memory used by ReMem and/or Rampac */

	return 0;
}
示例#2
0
文件: main.c 项目: geky/atoc-old
void handle_kill(int err) {
    deinit_display();
    exit(0);
}