Diff for /np2/i286x/memory.x86 between versions 1.8 and 1.14

version 1.8, 2004/01/10 17:24:01 version 1.14, 2005/03/18 06:49:17
Line 3 Line 3
 ; ToDo: egc word-boundary  ; ToDo: egc word-boundary
   
 %include 'x86/np2asm.inc'  %include 'x86/np2asm.inc'
   %include '../io/x86/iocore.inc'
   
 section .bss  section .bss
   
         global  _mem          global  _mem
         extern  _i286core          extern  _i286core
         extern  _grcg  
         extern  _extmem  
         extern  _gdcs  
         extern  _tramupdate          extern  _tramupdate
         extern  _vramupdate          extern  _vramupdate
         extern  _cgwindow  
 ;       extern  ___font  
         extern  _vramop          extern  _vramop
   
 _mem    resb    0x200000  _mem    resb    0x200000
Line 84  section .text Line 80  section .text
   
   
 %if USE_EGCASM  %if USE_EGCASM
         extern  _egca_read          extern  egc_read
         extern  _egca_read_w          extern  egc_read_w
         extern  _egca_write          extern  egc_write
         extern  _egca_write_w          extern  egc_write_w
 %else  %else
         extern  @egc_read@4          extern  @memegc_rd8@4
         extern  @egc_read_w@4          extern  @memegc_rd16@4
         extern  @egc_write@8          extern  @memegc_wr8@8
         extern  @egc_write_w@8          extern  @memegc_wr16@8
 %endif  %endif
   
 ; normal memory  ; normal memory
Line 122  wtram_a:   cmp  ecx, 000a3fe0h Line 118  wtram_a:   cmp  ecx, 000a3fe0h
                                         jc              short wtram_m                                          jc              short wtram_m
                                         cmp             ecx, 000a4000h                                          cmp             ecx, 000a4000h
                                         jnc             wcgwindow_s                                          jnc             wcgwindow_s
                                           test    ecx, 2
                                           je              short wtram_m
                                         cmp             byte [_gdcs + gdcs_t.msw_accessable], 0                                          cmp             byte [_gdcs + gdcs_t.msw_accessable], 0
                                         je              short wtram_e                                          je              short wtram_e
 wtram_m:                        shr             ebx, 1  wtram_m:                        shr             ebx, 1
Line 262  grcgtdw_end:  pop  ecx Line 260  grcgtdw_end:  pop  ecx
 ; EGC bridge  ; EGC bridge
                                         align   16                                          align   16
 @egc_wt:                        VRAMTRACE  @egc_wt:                        VRAMTRACE
                                           mov             ebx, [_vramop + vramop_t.grcgwait]
                                           sub             [_i286core + i286core_t.remainclock], ebx
                                         pop             ebx                                          pop             ebx
 %if USE_EGCASM  %if USE_EGCASM
                                         jmp             _egca_write                                          jmp             egc_write
 %else  %else
                                         pushad                                          pushad
                                         call    @egc_write@8                                          call    @memegc_wr8@8
                                         popad                                          popad
                                         ret                                          ret
 %endif  %endif
Line 279  grcgtdw_end:  pop  ecx Line 279  grcgtdw_end:  pop  ecx
                                         and             ecx, 3fffh                                          and             ecx, 3fffh
                                         shr             ebx, 12                                          shr             ebx, 12
                                         and             ebx, byte (3*4)                                          and             ebx, byte (3*4)
                                         add             ecx, [_extmem + extmem_t.pageptr + ebx]                                          add             ecx, [_i286core + i286core_t.ems + ebx]
                                         mov             [EXTMEMORY + ecx], dl                                          mov             [EXTMEMORY + ecx], dl
                                         pop             ecx                                          pop             ecx
                                         pop             ebx                                          pop             ebx
Line 383  grcgtcr_end:  not  al Line 383  grcgtcr_end:  not  al
   
 ; EGC bridge  ; EGC bridge
                                         align   16                                          align   16
 @egc_rd:                        pop             ebx  @egc_rd:                        mov             ebx, [_vramop + vramop_t.grcgwait]
                                           sub             [_i286core + i286core_t.remainclock], ebx
                                           pop             ebx
 %if USE_EGCASM  %if USE_EGCASM
                                         jmp             _egca_read                                          jmp             egc_read
 %else  %else
                                         pushad                                          pushad
                                         call    @egc_read@4                                          call    @memegc_rd8@4
                                         mov             [esp + 28], al                                          mov             [esp + 28], al
                                         popad                                          popad
                                         ret                                          ret
Line 402  grcgtcr_end:  not  al Line 404  grcgtcr_end:  not  al
                                         and             ecx, 3fffh                                          and             ecx, 3fffh
                                         shr             ebx, 12                                          shr             ebx, 12
                                         and             ebx, byte (3*4)                                          and             ebx, byte (3*4)
                                         add             ecx, [_extmem + extmem_t.pageptr + ebx]                                          add             ecx, [_i286core + i286core_t.ems + ebx]
                                         mov             al, [EXTMEMORY + ecx]                                          mov             al, [EXTMEMORY + ecx]
                                         pop             ecx                                          pop             ecx
                                         pop             ebx                                          pop             ebx
Line 454  wtramw_a:   je  short wword_a1fffh Line 456  wtramw_a:   je  short wword_a1fffh
                                         jc              short wtramw_m                                          jc              short wtramw_m
                                         cmp             ecx, 000a3fffh                                          cmp             ecx, 000a3fffh
                                         jnc             wcgwindoww_s                                          jnc             wcgwindoww_s
                                           test    ecx, 2
                                           je              short wtramw_m
                                         cmp             byte [_gdcs + gdcs_t.msw_accessable], 0                                          cmp             byte [_gdcs + gdcs_t.msw_accessable], 0
                                         je              short wtramw_e                                          je              short wtramw_e
 wtramw_m:                       and             ebx, 1fffh  wtramw_m:                       and             ebx, 1fffh
Line 615  grcgwtdw_end:  pop  ecx Line 619  grcgwtdw_end:  pop  ecx
 ; EGC bridge  ; EGC bridge
                                         align   16                                          align   16
 @egcw_wt:                       VRAMTRACE_W  @egcw_wt:                       VRAMTRACE_W
                                           mov             ebx, [_vramop + vramop_t.grcgwait]
                                           sub             [_i286core + i286core_t.remainclock], ebx
                                         pop             ebx                                          pop             ebx
 %if USE_EGCASM  %if USE_EGCASM
                                         jmp             _egca_write_w                                          jmp             egc_write_w
 %else  %else
                                         test    ecx, 1  
                                         jne             short egcw_wtodd  
                                         pushad  
                                         call    @egc_write_w@8  
                                         popad  
                                         ret  
 egcw_wtodd:  
                                         pushad                                          pushad
                                         push    ecx                                          call    @memegc_wr16@8
                                         push    edx  
                                         call    @egc_write@8  
                                         pop             edx  
                                         pop             ecx  
                                         inc             ecx  
                                         shr             edx, 8  
                                         call    @egc_write@8  
                                         popad                                          popad
                                         ret                                          ret
 %endif  %endif
Line 646  egcw_wtodd: Line 638  egcw_wtodd:
                                         and             ecx, 3fffh                                          and             ecx, 3fffh
                                         shr             ebx, 12                                          shr             ebx, 12
                                         and             ebx, byte (3*4)                                          and             ebx, byte (3*4)
                                         add             ecx, [_extmem + extmem_t.pageptr + ebx]                                          add             ecx, [_i286core + i286core_t.ems + ebx]
                                         mov             [EXTMEMORY + ecx], dx                                          mov             [EXTMEMORY + ecx], dx
                                         pop             ecx                                          pop             ecx
                                         pop             ebx                                          pop             ebx
Line 775  grcgwtcr_end:  not  ax Line 767  grcgwtcr_end:  not  ax
   
 ; EGC bridge  ; EGC bridge
                                         align   16                                          align   16
 @egcw_rd:                       pop             ebx  @egcw_rd:                       mov             ebx, [_vramop + vramop_t.grcgwait]
                                         test    ecx, 1                                          sub             [_i286core + i286core_t.remainclock], ebx
                                         jne             short egcw_rdodd                                          pop             ebx
 %if USE_EGCASM  %if USE_EGCASM
                                         jmp             _egca_read_w                                          jmp             egc_read_w
 %else  %else
                                         pushad                                          pushad
                                         call    @egc_read_w@4                                          call    @memegc_rd16@4
                                         mov             [esp + 28], ax                                          mov             [esp + 28], ax
                                         popad                                          popad
                                         ret                                          ret
 %endif  %endif
   
 egcw_rdodd:  
 %if USE_EGCASM  
                                         inc             ecx  
                                         call    _egca_read  
                                         mov             ah, al  
                                         dec             ecx  
                                         jmp             _egca_read  
 %else  
                                         pushad  
                                         push    ecx  
                                         call    @egc_read@4  
                                         pop             ecx  
                                         mov             [esp+28], al  
                                         inc             ecx  
                                         call    @egc_read@4  
                                         mov             [esp+29], al  
                                         popad  
 %endif  
                                         ret  
   
 ; EMM read  ; EMM read
                                         align   16                                          align   16
Line 815  egcw_rdodd: Line 788  egcw_rdodd:
                                         and             ecx, 3fffh                                          and             ecx, 3fffh
                                         shr             ebx, 12                                          shr             ebx, 12
                                         and             ebx, byte (3*4)                                          and             ebx, byte (3*4)
                                         add             ecx, [_extmem + extmem_t.pageptr + ebx]                                          add             ecx, [_i286core + i286core_t.ems + ebx]
                                         mov             ax, [EXTMEMORY + ecx]                                          mov             ax, [EXTMEMORY + ecx]
                                         pop             ecx                                          pop             ecx
                                         pop             ebx                                          pop             ebx
Line 986  section .text Line 959  section .text
                                         align   16                                          align   16
 writeextmem_w:  writeextmem_w:
 %if USE_HIMEM  %if USE_HIMEM
                                         cmp             ecx, 10ffefh                            ; HIMEM                                          cmp             ecx, (USE_HIMEM - 1)
                                         jae             near writehimem_w                                          jae             near writehimem_w
 %endif  %endif
                                         push    ebx                                          push    ebx
Line 1024  writemain_b:  mov  [MAINMEMORY + ecx], d Line 997  writemain_b:  mov  [MAINMEMORY + ecx], d
                                         align   16                                          align   16
 writeextmem_b:  writeextmem_b:
 %if USE_HIMEM  %if USE_HIMEM
                                         cmp             ecx, 10fff0h                            ; HIMEM                                          cmp             ecx, USE_HIMEM
                                         jae             near writehimem                                          jae             near writehimem
 %endif  %endif
                                         push    ebx                                          push    ebx
Line 1041  writeextmem_b: Line 1014  writeextmem_b:
                                         align   16                                          align   16
 readmemory_w:  readmemory_w:
 %if USE_HIMEM  %if USE_HIMEM
                                         cmp             ecx, 10ffefh                            ; HIMEM                                          cmp             ecx, (USE_HIMEM - 1)
                                         jae             near readhimem_w                                          jae             near readhimem_w
 %endif  %endif
                                         push    ebx                                          push    ebx
Line 1076  readmain_b:   mov  al, [MAINMEMORY + ecx Line 1049  readmain_b:   mov  al, [MAINMEMORY + ecx
                                         align   16                                          align   16
 readmemory_b:  readmemory_b:
 %if USE_HIMEM  %if USE_HIMEM
                                         cmp             ecx, 10fff0h                            ; HIMEM                                          cmp             ecx, USE_HIMEM
                                         jae             near readhimem                                          jae             near readhimem
 %endif  %endif
                                         push    ebx                                          push    ebx

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


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