2013-07-06 04:37:13 +00:00
|
|
|
/*
|
2015-10-22 05:13:26 +00:00
|
|
|
* Apple // emulator for *ix
|
|
|
|
*
|
|
|
|
* This software package is subject to the GNU General Public License
|
|
|
|
* version 3 or later (your choice) as published by the Free Software
|
|
|
|
* Foundation.
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
* Copyright 1994 Alexander Jean-Claude Bottema
|
|
|
|
* Copyright 1995 Stephen Lee
|
|
|
|
* Copyright 1997, 1998 Aaron Culliney
|
|
|
|
* Copyright 1998, 1999, 2000 Michael Deutschmann
|
2015-10-22 05:13:26 +00:00
|
|
|
* Copyright 2013-2015 Aaron Culliney
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-09-11 07:00:04 +00:00
|
|
|
#ifndef _MISC_H_
|
|
|
|
#define _MISC_H_
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2015-09-11 07:00:04 +00:00
|
|
|
// top installation directory
|
2015-02-23 19:19:41 +00:00
|
|
|
extern const char *data_dir;
|
|
|
|
|
2015-09-11 07:00:04 +00:00
|
|
|
// global ref to CLI args
|
|
|
|
extern char **argv;
|
|
|
|
extern int argc;
|
2013-07-06 04:37:13 +00:00
|
|
|
|
2015-09-11 07:00:04 +00:00
|
|
|
// start emulator (CPU, audio, and video)
|
|
|
|
void emulator_start(void);
|
2013-07-06 04:37:13 +00:00
|
|
|
|
2015-09-11 07:00:04 +00:00
|
|
|
// shutdown emulator in preparation for app exit
|
|
|
|
void emulator_shutdown(void);
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2015-09-26 22:20:54 +00:00
|
|
|
//
|
|
|
|
// Crash handling ...
|
|
|
|
//
|
|
|
|
|
|
|
|
typedef struct CrashHandler_s {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize crash handler (if available)
|
|
|
|
*/
|
|
|
|
void (*init)(const char *dumpDir);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown crash handler (if available)
|
|
|
|
*/
|
|
|
|
void (*shutdown)(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Processes a crash dump (assuming this is a non-crashing contest).
|
|
|
|
* Returns success value. On failure, the outputFile may contain the reason processing failed
|
|
|
|
*/
|
|
|
|
bool (*processCrash)(const char *crash, const char *symbolsPath, const FILE *outputFile);
|
|
|
|
|
|
|
|
} CrashHandler_s;
|
|
|
|
|
|
|
|
extern CrashHandler_s *crashHandler;
|
2015-09-19 18:47:36 +00:00
|
|
|
|
2013-06-11 07:08:15 +00:00
|
|
|
#endif
|