Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
xep128.h File Reference
#include "xemu/emutools_basicdefs.h"
#include <stdio.h>
#include <SDL_types.h>
#include <SDL_messagebox.h>
#include <limits.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
Include dependency graph for xep128.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VARALIGN   MAXALIGNED
 
#define XEPEXIT(n)   XEMUEXIT(n)
 
#define DIRSEP   DIRSEP_STR
 
#define DATADIR   "/usr/local/lib/xep128"
 
#define DESCRIPTION   "Enterprise-128 Emulator"
 
#define WINDOW_TITLE   "Xep128"
 
#define VERSION   "0.4"
 
#define COPYRIGHT   "(C)2015,2016,2020 LGB Gabor Lenart"
 
#define PROJECT_PAGE   "http://xep128.lgb.hu/"
 
#define CONFIG_USE_LODEPNG
 
#define CONFIG_EXDOS_SUPPORT
 
#define DEFAULT_CPU_CLOCK   4000000
 
#define COMBINED_ROM_FN   "combined.rom"
 
#define SDCARD_IMG_FN   "sdcard.img"
 
#define PRINT_OUT_FN   "@print.out"
 
#define DEFAULT_CONFIG_FILE   "@config"
 
#define DEFAULT_CONFIG_SAMPLE_FILE   "@config-sample"
 
#define ERRSTR()   strerror(errno)
 
#define OSD(...)
 
#define _REPORT_WINDOW_(sdlflag, str, ...)
 
#define INFO_WINDOW(...)   _REPORT_WINDOW_(SDL_MESSAGEBOX_INFORMATION, "INFO", __VA_ARGS__)
 
#define WARNING_WINDOW(...)   _REPORT_WINDOW_(SDL_MESSAGEBOX_WARNING, "WARNING", __VA_ARGS__)
 
#define ERROR_WINDOW(...)   _REPORT_WINDOW_(SDL_MESSAGEBOX_ERROR, "ERROR", __VA_ARGS__)
 
#define FATAL(...)   do { ERROR_WINDOW(__VA_ARGS__); XEPEXIT(1); } while(0)
 
#define CHECK_MALLOC(p)
 
#define QUESTION_WINDOW(items, msg)   _sdl_emu_secured_modal_box_(items, msg)
 
#define ERRSTR()   strerror(errno)
 

Functions

void osd_notification (const char *s)
 
int _sdl_emu_secured_message_box_ (Uint32 sdlflag, const char *msg)
 
int _sdl_emu_secured_modal_box_ (const char *items_in, const char *msg)
 

Variables

FILE * debug_fp
 

Macro Definition Documentation

◆ _REPORT_WINDOW_

#define _REPORT_WINDOW_ (   sdlflag,
  str,
  ... 
)
Value:
do { \
char _buf_for_win_msg_[4096]; \
CHECK_SNPRINTF(snprintf(_buf_for_win_msg_, sizeof _buf_for_win_msg_, __VA_ARGS__), sizeof _buf_for_win_msg_); \
DEBUGPRINT(str ": %s" NL, _buf_for_win_msg_); \
_sdl_emu_secured_message_box_(sdlflag, _buf_for_win_msg_); \
} while(0)

Definition at line 108 of file xep128.h.

◆ CHECK_MALLOC

#define CHECK_MALLOC (   p)
Value:
do { \
if (!p) FATAL("Memory allocation error. Not enough memory?"); \
} while(0)

Definition at line 119 of file xep128.h.

◆ COMBINED_ROM_FN

#define COMBINED_ROM_FN   "combined.rom"

Definition at line 63 of file xep128.h.

◆ CONFIG_EXDOS_SUPPORT

#define CONFIG_EXDOS_SUPPORT

Definition at line 56 of file xep128.h.

◆ CONFIG_USE_LODEPNG

#define CONFIG_USE_LODEPNG

Definition at line 55 of file xep128.h.

◆ COPYRIGHT

#define COPYRIGHT   "(C)2015,2016,2020 LGB Gabor Lenart"

Definition at line 52 of file xep128.h.

◆ DATADIR

#define DATADIR   "/usr/local/lib/xep128"

Definition at line 36 of file xep128.h.

◆ DEFAULT_CONFIG_FILE

#define DEFAULT_CONFIG_FILE   "@config"

Definition at line 66 of file xep128.h.

◆ DEFAULT_CONFIG_SAMPLE_FILE

#define DEFAULT_CONFIG_SAMPLE_FILE   "@config-sample"

Definition at line 67 of file xep128.h.

◆ DEFAULT_CPU_CLOCK

#define DEFAULT_CPU_CLOCK   4000000

Definition at line 61 of file xep128.h.

◆ DESCRIPTION

#define DESCRIPTION   "Enterprise-128 Emulator"

Definition at line 49 of file xep128.h.

◆ DIRSEP

#define DIRSEP   DIRSEP_STR

Definition at line 27 of file xep128.h.

◆ ERROR_WINDOW

#define ERROR_WINDOW (   ...)    _REPORT_WINDOW_(SDL_MESSAGEBOX_ERROR, "ERROR", __VA_ARGS__)

Definition at line 116 of file xep128.h.

◆ ERRSTR [1/2]

#define ERRSTR ( )    strerror(errno)

Definition at line 127 of file xep128.h.

◆ ERRSTR [2/2]

#define ERRSTR ( )    strerror(errno)

Definition at line 127 of file xep128.h.

◆ FATAL

#define FATAL (   ...)    do { ERROR_WINDOW(__VA_ARGS__); XEPEXIT(1); } while(0)

Definition at line 117 of file xep128.h.

◆ INFO_WINDOW

#define INFO_WINDOW (   ...)    _REPORT_WINDOW_(SDL_MESSAGEBOX_INFORMATION, "INFO", __VA_ARGS__)

Definition at line 114 of file xep128.h.

◆ OSD

#define OSD (   ...)
Value:
do { \
char _buf_for_win_msg_[4096]; \
CHECK_SNPRINTF(snprintf(_buf_for_win_msg_, sizeof _buf_for_win_msg_, __VA_ARGS__), sizeof _buf_for_win_msg_); \
DEBUGPRINT("OSD: %s" NL, _buf_for_win_msg_); \
osd_notification(_buf_for_win_msg_); \
} while(0)

Definition at line 100 of file xep128.h.

◆ PRINT_OUT_FN

#define PRINT_OUT_FN   "@print.out"

Definition at line 65 of file xep128.h.

◆ PROJECT_PAGE

#define PROJECT_PAGE   "http://xep128.lgb.hu/"

Definition at line 53 of file xep128.h.

◆ QUESTION_WINDOW

#define QUESTION_WINDOW (   items,
  msg 
)    _sdl_emu_secured_modal_box_(items, msg)

Definition at line 124 of file xep128.h.

◆ SDCARD_IMG_FN

#define SDCARD_IMG_FN   "sdcard.img"

Definition at line 64 of file xep128.h.

◆ VARALIGN

#define VARALIGN   MAXALIGNED

Definition at line 24 of file xep128.h.

◆ VERSION

#define VERSION   "0.4"

Definition at line 51 of file xep128.h.

◆ WARNING_WINDOW

#define WARNING_WINDOW (   ...)    _REPORT_WINDOW_(SDL_MESSAGEBOX_WARNING, "WARNING", __VA_ARGS__)

Definition at line 115 of file xep128.h.

◆ WINDOW_TITLE

#define WINDOW_TITLE   "Xep128"

Definition at line 50 of file xep128.h.

◆ XEPEXIT

#define XEPEXIT (   n)    XEMUEXIT(n)

Definition at line 25 of file xep128.h.

Function Documentation

◆ _sdl_emu_secured_message_box_()

int _sdl_emu_secured_message_box_ ( Uint32  sdlflag,
const char *  msg 
)

Definition at line 448 of file screen.c.

Here is the call graph for this function:

◆ _sdl_emu_secured_modal_box_()

int _sdl_emu_secured_modal_box_ ( const char *  items_in,
const char *  msg 
)

Definition at line 469 of file screen.c.

◆ osd_notification()

void osd_notification ( const char *  s)

Definition at line 136 of file screen.c.

Here is the call graph for this function:

Variable Documentation

◆ debug_fp

FILE* debug_fp

Definition at line 87 of file configuration.c.

NL
#define NL
Definition: fat32.c:37
FATAL
#define FATAL(...)
Definition: xep128.h:117