|
|
| version 1.18, 2003/12/26 02:02:09 | version 1.20, 2004/01/05 05:04:53 |
|---|---|
| Line 145 void i286c_initialize(void) { | Line 145 void i286c_initialize(void) { |
| v30cinit(); | v30cinit(); |
| } | } |
| void i286c_reset(void) { | static void i286c_initreg(void) { |
| ZeroMemory(&I286_STAT, sizeof(I286_STAT)); | |
| I286_CS = 0xf000; | I286_CS = 0xf000; |
| CS_BASE = 0xf0000; | CS_BASE = 0xf0000; |
| I286_IP = 0xfff0; | I286_IP = 0xfff0; |
| I286_ADRSMASK = 0xfffff; | i286core.s.adrsmask = 0xfffff; |
| } | } |
| void i286c_shut(void) { | void i286c_reset(void) { |
| I286_MSW = 0; | |
| I286_ES = 0; | ZeroMemory(&I286_STAT, sizeof(I286_STAT)); |
| I286_CS = 0xf000; | i286c_initreg(); |
| I286_SS = 0; | } |
| I286_DS = 0; | |
| ES_BASE = 0; | void i286c_shut(void) { |
| CS_BASE = 0xf0000; | |
| SS_BASE = 0; | |
| DS_BASE = 0; | |
| SS_FIX = 0; | |
| DS_FIX = 0; | |
| I286_IP = 0xfff0; | ZeroMemory(&i286core.s, offsetof(I286STAT, cpu_type)); |
| I286_ADRSMASK = 0xfffff; | i286c_initreg(); |
| } | } |
| void CPUCALL i286c_intnum(UINT vect, REG16 IP) { | void CPUCALL i286c_intnum(UINT vect, REG16 IP) { |
| Line 272 UINT32 i286c_selector(UINT sel) { | Line 263 UINT32 i286c_selector(UINT sel) { |
| addr = (dtr->base24 << 16) + dtr->base + (sel & (~7)); | addr = (dtr->base24 << 16) + dtr->base + (sel & (~7)); |
| ret = i286_memoryread_w(addr+2); | ret = i286_memoryread_w(addr+2); |
| ret += i286_memoryread(addr+4) << 16; | ret += i286_memoryread(addr+4) << 16; |
| TRACEOUT(("PE - select %.4x %.8x", sel, ret)); | TRACEOUT(("selector idx=%x %s rpl=%d - real addr = %.6x", |
| (sel >> 3), (sel & 4)?"LDT":"GDT", sel & 3, ret)); | |
| return(ret); | return(ret); |
| } | } |