2 #define _HDLOAD_OSECPU 1
4 // プロジェクトのすべてのファイルで読み込むヘッダ
7 /* Visual Studio で fopen()やsprintf() などの古い関数を使用する時に出る警告を抑止する*/
8 #define _CRT_SECURE_NO_WARNINGS 1
23 struct Ptr { /* 32バイト(=256bit!) */
26 unsigned char *p0, *p1;
29 int flags, dummy; /* read/writeなど */
33 unsigned char *p, *p1;
38 int ireg[64]; /* 32bit整数レジスタ */
39 struct Ptr preg[64]; /* ポインタレジスタ */
41 int debugInfo0, debugInfo1, dmy[2]; /* 2304 */
42 struct PtrCtrl *ptrCtrl; /* 2320 */
43 char winClosed, autoSleep;
48 const unsigned char **argv;
49 unsigned char *buf0, *buf1, *junkStack, lastConsoleChar, *junkStack1;
51 struct LabelTable *label;
53 unsigned char *jitbuf, *jitbuf1;
54 void(*errHndl)(struct Regs *);
59 #define KEY_ENTER '¥n'
61 #define KEY_BACKSPACE 8
63 #define KEY_PAGEUP 0x1020
64 #define KEY_PAGEDWN 0x1021
65 #define KEY_END 0x1022
66 #define KEY_HOME 0x1023
67 #define KEY_LEFT 0x1024
69 #define KEY_RIGHT 0x1026
70 #define KEY_DOWN 0x1027
71 #define KEY_INS 0x1028
72 #define KEY_DEL 0x1029
74 static int *keybuf, keybuf_r, keybuf_w, keybuf_c;
75 static int *vram = NULL, v_xsiz, v_ysiz;
77 //デバッグ用。プログラム中の随所で加算される変数
78 static int di1_serial = 0;
81 void putKeybuf(int i);
85 #include "dependent.h"
92 /* tek.cを移植するのは大変だと思ったので、断念 */
93 #error "tek is not supported. edit switch.h and set USE_TEK5=0"
96 // int tek5Decomp(unsigned char *buf, unsigned char *buf1, unsigned char *tmp);