|
|
| version 1.7, 2004/01/05 15:47:18 | version 1.11, 2004/01/25 06:26:39 |
|---|---|
| Line 73 const UINT8 iflags[512] = { // Z_FLA | Line 73 const UINT8 iflags[512] = { // Z_FLA |
| // ---- | // ---- |
| void i286a_initialize(void) { | |
| ZeroMemory(&i286acore, sizeof(i286acore)); | |
| } | |
| void i286a_deinitialize(void) { | |
| if (CPU_EXTMEM) { | |
| _MFREE(CPU_EXTMEM); | |
| CPU_EXTMEM = NULL; | |
| CPU_EXTMEMSIZE = 0; | |
| } | |
| } | |
| static void i286a_initreg(void) { | static void i286a_initreg(void) { |
| CPU_CS = 0xf000; | CPU_CS = 0xf000; |
| Line 83 static void i286a_initreg(void) { | Line 97 static void i286a_initreg(void) { |
| void i286a_reset(void) { | void i286a_reset(void) { |
| #if 0 | |
| if (offsetof(I286CORE, m) != 120) { | |
| exit(1); | |
| } | |
| #endif | |
| ZeroMemory(&i286acore.s, sizeof(i286acore.s)); | ZeroMemory(&i286acore.s, sizeof(i286acore.s)); |
| i286a_initreg(); | i286a_initreg(); |
| } | } |
| Line 93 void i286a_shut(void) { | Line 112 void i286a_shut(void) { |
| i286a_initreg(); | i286a_initreg(); |
| } | } |
| void i286a_setextsize(UINT32 size) { | |
| if (CPU_EXTMEMSIZE != size) { | |
| _MFREE(CPU_EXTMEM); | |
| if (size) { | |
| CPU_EXTMEM = (BYTE *)_MALLOC(size + 16, "EXTMEM"); | |
| if (CPU_EXTMEM == NULL) { | |
| size = 0; | |
| } | |
| } | |
| CPU_EXTMEMSIZE = size; | |
| } | |
| i286acore.e.ems[0] = mem + 0xc0000; | |
| i286acore.e.ems[1] = mem + 0xc4000; | |
| i286acore.e.ems[2] = mem + 0xc8000; | |
| i286acore.e.ems[3] = mem + 0xcc000; | |
| } | |
| void i286a_setemm(UINT frame, UINT32 addr) { | |
| BYTE *ptr; | |
| frame &= 3; | |
| if (addr < USE_HIMEM) { | |
| ptr = mem + addr; | |
| } | |
| else if ((addr - 0x100000 + 0x4000) <= CPU_EXTMEMSIZE) { | |
| ptr = CPU_EXTMEM + (addr - 0x100000); | |
| } | |
| else { | |
| ptr = mem + 0xc0000 + (frame << 14); | |
| } | |
| i286acore.e.ems[frame] = ptr; | |
| } | |
| #if 0 // ---- test | #if 0 // ---- test |
| void ea_assert(UINT32 x) { | void ea_assert(UINT32 x) { |