|
|
| version 1.1, 2003/12/08 00:55:31 | version 1.4, 2003/12/11 15:02:16 |
|---|---|
| Line 17 | Line 17 |
| #define VRAM_G 0x0b8000 | #define VRAM_G 0x0b8000 |
| #define VRAM_E 0x0e0000 | #define VRAM_E 0x0e0000 |
| #define VRAM_POS(a) ((a) & (VRAM_STEP | 0x7fff)) | #define VRAMADDRMASKEX(a) ((a) & (VRAM_STEP | 0x7fff)) |
| #define VRAM0_B VRAM_B | #define VRAM0_B VRAM_B |
| #define VRAM0_R VRAM_R | #define VRAM0_R VRAM_R |
| Line 31 | Line 31 |
| #define FONT_ADRS 0x110000 | #define FONT_ADRS 0x110000 |
| #define ITF_ADRS 0x1f8000 | #define ITF_ADRS 0x1f8000 |
| #if defined(CPU386) | #if defined(CPUCORE_IA32) |
| #if 0 | #if 0 |
| #define LOWMEM 0x100000 | #define LOWMEM 0x100000 |
| #else | #else |
| #define LOWMEM 0x10fff0 | #define LOWMEM 0x10fff0 |
| #endif | #endif |
| #endif /* CPU386 */ | #endif /* CPUCORE_IA32 */ |
| #if defined(BYTESEX_LITTLE) | #if defined(BYTESEX_LITTLE) |
| Line 91 REG8 MEMCALL __i286_memoryread(UINT32 ad | Line 91 REG8 MEMCALL __i286_memoryread(UINT32 ad |
| REG16 MEMCALL __i286_memoryread_w(UINT32 address); | REG16 MEMCALL __i286_memoryread_w(UINT32 address); |
| UINT32 MEMCALL __i286_memoryread_d(UINT32 address); | UINT32 MEMCALL __i286_memoryread_d(UINT32 address); |
| #ifndef CPU386 | #ifndef CPUCORE_IA32 |
| #define i286_memorywrite(a,v) __i286_memorywrite(a,v) | #define i286_memorywrite(a,v) __i286_memorywrite(a,v) |
| #define i286_memorywrite_w(a,v) __i286_memorywrite_w(a,v) | #define i286_memorywrite_w(a,v) __i286_memorywrite_w(a,v) |
| #define i286_memorywrite_d(a,v) __i286_memorywrite_d(a,v) | #define i286_memorywrite_d(a,v) __i286_memorywrite_d(a,v) |
| #define i286_memoryread(a) __i286_memoryread(a) | #define i286_memoryread(a) __i286_memoryread(a) |
| #define i286_memoryread_w(a) __i286_memoryread_w(a) | #define i286_memoryread_w(a) __i286_memoryread_w(a) |
| #define i286_memoryread_d(a) __i286_memoryread_d(a) | #define i286_memoryread_d(a) __i286_memoryread_d(a) |
| #else /* CPU386 */ | #else /* CPUCORE_IA32 */ |
| void MEMCALL cpu_memorywrite(DWORD address, BYTE value); | void MEMCALL cpu_memorywrite(DWORD address, BYTE value); |
| void MEMCALL cpu_memorywrite_w(DWORD address, WORD value); | void MEMCALL cpu_memorywrite_w(DWORD address, WORD value); |
| void MEMCALL cpu_memorywrite_d(DWORD address, DWORD value); | void MEMCALL cpu_memorywrite_d(DWORD address, DWORD value); |
| Line 111 DWORD MEMCALL cpu_memoryread_d(DWORD add | Line 111 DWORD MEMCALL cpu_memoryread_d(DWORD add |
| #define i286_memoryread(a) cpu_memoryread(a) | #define i286_memoryread(a) cpu_memoryread(a) |
| #define i286_memoryread_w(a) cpu_memoryread_w(a) | #define i286_memoryread_w(a) cpu_memoryread_w(a) |
| #define i286_memoryread_d(a) cpu_memoryread_d(a) | #define i286_memoryread_d(a) cpu_memoryread_d(a) |
| #endif | #endif /* !CPUCORE_IA32 */ |
| #ifdef NP2_MEMORY_ASM | #ifdef NP2_MEMORY_ASM |
| BYTE MEMCALL i286_membyte_read(WORD seg, WORD off); | BYTE MEMCALL i286_membyte_read(WORD seg, WORD off); |
| Line 139 void MEMCALL i286_memx_write(UINT32 addr | Line 139 void MEMCALL i286_memx_write(UINT32 addr |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |
| #endif | #endif |
| // とりあえず | |
| #define GETDWORD(a) (((UINT32)(a)[0]) | \ | |
| ((UINT32)(a)[1] << 8) | \ | |
| ((UINT32)(a)[2] << 16) | \ | |
| ((UINT32)(a)[3] << 24)) | |
| #define GETWORD(a) (((UINT16)(a)[0]) | ((UINT16)(a)[1] << 8)) | |
| #define SETDWORD(a, b) *((a)+0) = (BYTE)((b)); \ | |
| *((a)+1) = (BYTE)((b)>>8); \ | |
| *((a)+2) = (BYTE)((b)>>16); \ | |
| *((a)+3) = (BYTE)((b)>>24) | |
| #define SETWORD(a, b) *((a)+0) = (BYTE)((b)); \ | |
| *((a)+1) = (BYTE)((b)>>8) | |