Diff for /np2/i286x/i286x.cpp between versions 1.14 and 1.18

version 1.14, 2004/01/05 05:04:53 version 1.18, 2004/01/29 00:27:29
Line 57  void i286x_initialize(void) { Line 57  void i286x_initialize(void) {
         v30xinit();          v30xinit();
 }  }
   
   void i286x_deinitialize(void) {
   
           if (CPU_EXTMEM) {
                   _MFREE(CPU_EXTMEM);
                   CPU_EXTMEM = NULL;
                   CPU_EXTMEMSIZE = 0;
           }
   }
   
 static void i286x_initreg(void) {  static void i286x_initreg(void) {
   
         I286_CS = 0xf000;          I286_CS = 0xf000;
Line 78  void i286x_shut(void) { Line 87  void i286x_shut(void) {
         i286x_initreg();          i286x_initreg();
 }  }
   
   void i286x_setextsize(UINT32 size) {
   
           if (CPU_EXTMEMSIZE != size) {
                   if (CPU_EXTMEM) {
                           _MFREE(CPU_EXTMEM);
                           CPU_EXTMEM = NULL;
                   }
                   if (size) {
                           CPU_EXTMEM = (BYTE *)_MALLOC(size + 16, "EXTMEM");
                           if (CPU_EXTMEM == NULL) {
                                   size = 0;
                           }
                   }
                   CPU_EXTMEMSIZE = size;
           }
           i286core.e.ems[0] = mem + 0xc0000;
           i286core.e.ems[1] = mem + 0xc4000;
           i286core.e.ems[2] = mem + 0xc8000;
           i286core.e.ems[3] = mem + 0xcc000;
   }
   
   void i286x_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);
           }
           i286core.e.ems[frame] = ptr;
   }
   
   
 LABEL void i286x_resetprefetch(void) {  LABEL void i286x_resetprefetch(void) {
   
Line 400  I286 pop_es(void) {        // 07: pop es Line 447  I286 pop_es(void) {        // 07: pop es
                 __asm {                  __asm {
                                 I286CLOCK(5)                                  I286CLOCK(5)
                                 REGPOP(I286_ES)                                  REGPOP(I286_ES)
                                   movzx   eax, ax
                                 test    I286_MSW, MSW_PE                                  test    I286_MSW, MSW_PE
                                 jne             short pop_es_pe                                  jne             short pop_es_pe
                                 movzx   eax, ax  
                                 shl             eax, 4                                  // make segreg                                  shl             eax, 4                                  // make segreg
 pop_es_base:    mov             ES_BASE, eax  pop_es_base:    mov             ES_BASE, eax
                                 GET_NEXTPRE1                                  GET_NEXTPRE1
Line 613  I286 pop_ss(void) {        // 17: pop ss Line 660  I286 pop_ss(void) {        // 17: pop ss
                 __asm {                  __asm {
                                 I286CLOCK(5)                                  I286CLOCK(5)
                                 REGPOP(I286_SS)                                  REGPOP(I286_SS)
                                   movzx   eax, ax
                                 test    I286_MSW, MSW_PE                                  test    I286_MSW, MSW_PE
                                 jne             short pop_ss_pe                                  jne             short pop_ss_pe
                                 movzx   eax, ax  
                                 shl             eax, 4                                  // make segreg                                  shl             eax, 4                                  // make segreg
 pop_ss_base:    mov             SS_BASE, eax  pop_ss_base:    mov             SS_BASE, eax
                                 mov             SS_FIX, eax                                  mov             SS_FIX, eax
Line 742  I286 pop_ds(void) {        // 1F: pop ds Line 789  I286 pop_ds(void) {        // 1F: pop ds
                 __asm {                  __asm {
                                 I286CLOCK(5)                                  I286CLOCK(5)
                                 REGPOP(I286_DS)                                  REGPOP(I286_DS)
                                   movzx   eax, ax
                                 test    I286_MSW, MSW_PE                                  test    I286_MSW, MSW_PE
                                 jne             short pop_ds_pe                                  jne             short pop_ds_pe
                                 movzx   eax, ax  
                                 shl             eax, 4                                  // make segreg                                  shl             eax, 4                                  // make segreg
 pop_ds_base:    mov             DS_BASE, eax  pop_ds_base:    mov             DS_BASE, eax
                                 mov             DS_FIX, eax                                  mov             DS_FIX, eax
Line 2450  I286 mov_seg_ea(void) {       // 8E: mov Line 2497  I286 mov_seg_ea(void) {       // 8E: mov
                                 call    i286_memoryread_w                                  call    i286_memoryread_w
                 segset:                  segset:
                                 mov             word ptr I286_SEGREG[ebp], ax                                  mov             word ptr I286_SEGREG[ebp], ax
                                   movzx   eax, ax
                                 test    I286_MSW, MSW_PE                                  test    I286_MSW, MSW_PE
                                 jne             short mov_seg_pe                                  jne             short mov_seg_pe
                                 movzx   eax, ax  
                                 shl             eax, 4                                  // make segreg                                  shl             eax, 4                                  // make segreg
 mov_seg_base:   mov             SEG_BASE[ebp*2], eax  mov_seg_base:   mov             SEG_BASE[ebp*2], eax
                                 sub             ebp, 2*2                                  sub             ebp, 2*2
Line 2714  I286 _popf(void) {        // 9D: popf Line 2761  I286 _popf(void) {        // 9D: popf
                                 je              irqcheck                                // fast_intr                                  je              irqcheck                                // fast_intr
                                 test    ah, 2                                  test    ah, 2
                                 je              nextop                                  je              nextop
                                 cmp             pic.ext_irq, 0  
                                 jne             nextop  
                                 mov             al, pic.pi[0].imr                                  mov             al, pic.pi[0].imr
                                 mov             ah, pic.pi[1].imr                                  mov             ah, pic.pi[1].imr
                                 not             ax                                  not             ax
Line 3612  I286 _into(void) {        // CE: into Line 3657  I286 _into(void) {        // CE: into
 I286 _iret(void) {                                                              // CF: iret  I286 _iret(void) {                                                              // CF: iret
   
                 __asm {                  __asm {
                                 call    extirq_pop  
                                 I286CLOCK(31)                                  I286CLOCK(31)
                                 mov             edi, SS_BASE                                  mov             edi, SS_BASE
                                 movzx   ebx, I286_SP                                  movzx   ebx, I286_SP
Line 3642  I286 _iret(void) {        // CF: iret Line 3686  I286 _iret(void) {        // CF: iret
                                 jne             irqcheck                                  jne             irqcheck
                                 test    I286_FLAG, I_FLAG                                  test    I286_FLAG, I_FLAG
                                 je              nextop                                  je              nextop
                                 cmp             pic.ext_irq, 0  
                                 jne             nextop  
                                 mov             al, pic.pi[0].imr                                  mov             al, pic.pi[0].imr
                                 mov             ah, pic.pi[1].imr                                  mov             ah, pic.pi[1].imr
                                 not             ax                                  not             ax
Line 4226  I286 _sti(void) {        // FB: sti Line 4268  I286 _sti(void) {        // FB: sti
                                 setne   I286_TRAP                                  setne   I286_TRAP
   
                                 jne             nextopandexit                   // fast_intr                                  jne             nextopandexit                   // fast_intr
                                 cmp             pic.ext_irq, 0  
                                 jne             jmp_nextop  
                                 mov             al, pic.pi[0].imr                                  mov             al, pic.pi[0].imr
                                 mov             ah, pic.pi[1].imr                                  mov             ah, pic.pi[1].imr
                                 not             ax                                  not             ax

Removed from v.1.14  
changed lines
  Added in v.1.18


RetroPC.NET-CVS <cvs@retropc.net>