// 1 : Windows 32bit
// 2 : Mac OSX 32bit
// 3 : blike for Linux
-
#ifdef _WIN32
#define DRV_OSNUM 0x0001
#endif
// syslib.ose is necessary to work OSECPU
#define SYSLIB_OSE "syslib.ose"
+//
+// Define constant values
+//
-/*
- * The 2nd signature of OSECPU Format(05 e1)
- * It will be changed in OSECPU Rev.2 to "e2" (no adaptation in their binary layers)
- */
+// SIGN1: The 2nd signature of OSECPU Format(05 e1)
+// It will be changed in OSECPU Rev.2 to "e2" (no adaptation in their binary layers)
#define SIGN1 0xe1
#define USE_DEBUGGER 1
#define USE_TEK5 0 //元々は1
+/* JITC mode flags */
+#define JITC_LV_SLOWEST 0 /* デバッグ支援は何でもやる */
+#define JITC_LV_SLOWER 1 /* エラーモジュールはレポートできるが、行番号は分からない、テストは過剰 */
+#define JITC_LV_SAFE 2 /* とにかく止まる、場所は不明、テストは必要最小限 */
+#define JITC_LV_FASTER 4 /* 情報は生成するがチェックをしない */
+#define JITC_LV_FASTEST 5 /* 情報すら生成しない */
+#define JITC_PHASE1 0x0001
+#define JITC_SKIPCHECK 0x0002 /* セキュリティチェックを省略する(高速危険モード) */
+#define JITC_NOSTARTUP 0x0004
+#define JITC_MAXLABELS 4096
+#define PTRCTRLSIZ 4096
+
#define APPSIZ1 1 * 1024 * 1024 /* 1MB for now */
#define JITSIZ1 1 * 1024 * 1024 /* 1MB for now */
#define SJITSIZ1 1 * 1024 * 1024 /* 1MB for now */
#define KEYBUFSIZ 4096
+#define KEY_ENTER '\n'
+#define KEY_ESC 27
+#define KEY_BACKSPACE 8
+#define KEY_TAB 9
+#define KEY_PAGEUP 0x1020
+#define KEY_PAGEDWN 0x1021
+#define KEY_END 0x1022
+#define KEY_HOME 0x1023
+#define KEY_LEFT 0x1024
+#define KEY_UP 0x1025
+#define KEY_RIGHT 0x1026
+#define KEY_DOWN 0x1027
+#define KEY_INS 0x1028
+#define KEY_DEL 0x1029
+
//
// HOSECPU structures
//
int executionLevel;
/* for-junkApi */
- //int argc;
- //const char **argv;
unsigned char *buf0, *buf1, *junkStack, lastConsoleChar, *junkStack1;
HOSECPU_LabelListTag *label;
int mapDi1s[16][16];
};
-
-//
-// Define constant values
-//
-
-#define KEY_ENTER '\n'
-#define KEY_ESC 27
-#define KEY_BACKSPACE 8
-#define KEY_TAB 9
-#define KEY_PAGEUP 0x1020
-#define KEY_PAGEDWN 0x1021
-#define KEY_END 0x1022
-#define KEY_HOME 0x1023
-#define KEY_LEFT 0x1024
-#define KEY_UP 0x1025
-#define KEY_RIGHT 0x1026
-#define KEY_DOWN 0x1027
-#define KEY_INS 0x1028
-#define KEY_DEL 0x1029
-
//
// Grobal values
//
extern int *keybuf, keybuf_r, keybuf_w, keybuf_c;
extern HOSECPU_Device_Window mainWindow;
-//extern int *vram, v_xsiz, v_ysiz;
-//デバッグ用。プログラム中の随所で加算される変数
+// di1_serial: デバッグ用。プログラム中の随所で加算される変数
extern int di1_serial;
//
void devFunc(HOSECPU_RuntimeEnvironment *r); // junkApiを処理する関数
// @jitc.c
-/* JITCのフラグ群 */
-#define JITC_LV_SLOWEST 0 /* デバッグ支援は何でもやる */
-#define JITC_LV_SLOWER 1 /* エラーモジュールはレポートできるが、行番号は分からない、テストは過剰 */
-#define JITC_LV_SAFE 2 /* とにかく止まる、場所は不明、テストは必要最小限 */
-#define JITC_LV_FASTER 4 /* 情報は生成するがチェックをしない */
-#define JITC_LV_FASTEST 5 /* 情報すら生成しない */
-#define JITC_PHASE1 0x0001
-#define JITC_SKIPCHECK 0x0002 /* セキュリティチェックを省略する(高速危険モード) */
-#define JITC_NOSTARTUP 0x0004
-#define JITC_MAXLABELS 4096
-#define PTRCTRLSIZ 4096
int jitc0(unsigned char **qq, unsigned char *q1, const unsigned char *p0, const unsigned char *p1, int level, HOSECPU_LabelListTag *label);
int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *src, const unsigned char *src1, const unsigned char *src0, HOSECPU_LabelListTag *label, int maxLabels, int level, int debugInfo1, int flags);
unsigned char *jitCompCallFunc(unsigned char *dst, void *func);