|
|
| version 1.1, 2003/12/08 00:55:31 | version 1.18, 2005/05/20 13:59:47 |
|---|---|
| Line 12 | Line 12 |
| * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. |
| * 3. The name of the author may not be used to endorse or promote products | |
| * derived from this software without specific prior written permission. | |
| * | * |
| * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| Line 30 | Line 28 |
| #ifndef IA32_CPU_INTERFACE_H__ | #ifndef IA32_CPU_INTERFACE_H__ |
| #define IA32_CPU_INTERFACE_H__ | #define IA32_CPU_INTERFACE_H__ |
| #if 0 // このあたりも compiler.hへ | #ifndef CPUCALL |
| #include "compiler.h" | #define CPUCALL |
| #include <assert.h> | |
| #include <stdarg.h> | |
| #include "memory.h" | |
| #include "nevent.h" | |
| #include "iobridge.h" | |
| #include "bios.h" | |
| #include "cpuio.h" | |
| #include "dmac.h" | |
| #if defined(_DEBUG) | |
| #define ASSERT(v) assert(v) | |
| #define VERBOSE(v) ia32_warning v | |
| #else | |
| #define ASSERT(v) | |
| #define VERBOSE(v) | |
| #endif | |
| #endif | #endif |
| // --> あとで common.hへ | #if !defined(QWORD_CONST) |
| #ifndef INLINE | #define QWORD_CONST(v) v ## ULL |
| #define INLINE | #define SQWORD_CONST(v) v ## LL |
| #endif | #endif |
| #if 1 // これ SINT64/UINT64 を作ること | #define CPU_isEI (CPU_FLAG & I_FLAG) |
| typedef unsigned __int64 QWORD; | #define CPU_isDI (!CPU_isEI) |
| typedef signed __int64 SQWORD; | #define CPU_A20EN(en) CPU_ADRSMASK = (en)?0xffffffff:0x000fffff; |
| #else | |
| typedef unsigned long long QWORD; | #define CPU_INITIALIZE() i386c_initialize() |
| typedef signed long long SQWORD; | #define CPU_DEINITIALIZE() |
| #endif | #define CPU_RESET() ia32reset() |
| #define CPU_CLEARPREFETCH() CPU_PREFETCH_CLEAR() | |
| typedef signed char SBYTE; | #define CPU_INTERRUPT(vect, soft) ia32_interrupt(vect, soft) |
| typedef signed short SWORD; | #define CPU_EXEC() ia32() |
| typedef signed int SDWORD; | #define CPU_EXECV30() ia32() |
| #define CPU_SHUT() ia32shut() | |
| #if 0 | #define CPU_SETEXTSIZE(size) ia32_setextsize((UINT32)(size) << 20) |
| #define I286_AL CPU_AL | #define CPU_SETEMM(frame, addr) ia32_setemm(frame, addr) |
| #define I286_CL CPU_CL | |
| #define I286_DL CPU_DL | #define cpu_memorywrite(a,v) memp_write8(a,v) |
| #define I286_BL CPU_BL | #define cpu_memorywrite_b(a,v) memp_write8(a,v) |
| #define I286_AH CPU_AH | #define cpu_memorywrite_w(a,v) memp_write16(a,v) |
| #define I286_CH CPU_CH | #define cpu_memorywrite_d(a,v) memp_write32(a,v) |
| #define I286_DH CPU_DH | #define cpu_memoryread(a) memp_read8(a) |
| #define I286_BH CPU_BH | #define cpu_memoryread_b(a) memp_read8(a) |
| #define cpu_memoryread_w(a) memp_read16(a) | |
| #define I286_AX CPU_AX | #define cpu_memoryread_d(a) memp_read32(a) |
| #define I286_CX CPU_CX | |
| #define I286_DX CPU_DX | |
| #define I286_BX CPU_BX | |
| #define I286_SP CPU_SP | |
| #define I286_BP CPU_BP | |
| #define I286_SI CPU_SI | |
| #define I286_DI CPU_DI | |
| #define I286_IP CPU_IP | |
| #define I286_EAX CPU_EAX | |
| #define I286_ECX CPU_ECX | |
| #define I286_EDX CPU_EDX | |
| #define I286_EBX CPU_EBX | |
| #define I286_ESP CPU_ESP | |
| #define I286_EBP CPU_EBP | |
| #define I286_ESI CPU_ESI | |
| #define I286_EDI CPU_EDI | |
| #define I286_EIP CPU_EIP | |
| #define I286_ES CPU_ES | |
| #define I286_CS CPU_CS | |
| #define I286_SS CPU_SS | |
| #define I286_DS CPU_DS | |
| #define I286_FS CPU_FS | |
| #define I286_GS CPU_GS | |
| #define I286_EFLAG CPU_EFLAG | |
| #define I286_FLAG CPU_FLAG | |
| #define I286_FLAGL CPU_FLAGL | |
| #define I286_FLAGH CPU_FLAGH | |
| #define I286_TRAP CPU_TRAP | |
| #define I286_INPORT CPU_INPORT | |
| #define I286_OV CPU_OV | |
| #define i286s cpu_stat | |
| #endif | |
| #define CPU_isDI (!(CPU_FLAG & I_FLAG)) | #define cpu_memoryread_region(a,p,l) memp_reads(a,p,l) |
| #define CPU_isEI (CPU_FLAG & I_FLAG) | #define cpu_memorywrite_region(a,p,l) memp_writes(a,p,l) |
| #define CPU_INITIALIZE() i386c_initialize() | void i386c_initialize(void); |
| #define CPU_RESET() ia32reset() | |
| #define CPU_CLEARPREFETCH() | |
| #define CPU_INTERRUPT(a) ia32_interrupt(a) | |
| #define CPU_EXEC() ia32() | |
| #define CPU_EXECV30() ia32() | |
| // #define CPU_WITHTRAP() ia32withtrap() | |
| // #define CPU_WITHDMA() ia32withdma() | |
| // #define CPU_STEP() ia32_step() | |
| void FASTCALL msgbox_str(char *msg); | |
| void FASTCALL msgbox_mem(DWORD no); | |
| void put_cpuinfo(void); | |
| #endif /* IA32_CPU_INTERFACE_H__ */ | #endif /* IA32_CPU_INTERFACE_H__ */ |