[rott-commits] r249 - trunk/rott

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jun 25 05:56:26 EDT 2009


Author: fabian
Date: 2009-06-25 05:56:26 -0400 (Thu, 25 Jun 2009)
New Revision: 249

Removed:
   trunk/rott/f_scale.asm
   trunk/rott/r_scale.asm
   trunk/rott/rt_dr_a.asm
   trunk/rott/rt_fc_a.asm
   trunk/rott/rt_sc_a.asm
   trunk/rott/rt_vh_a.asm
Log:
Deleted spurious rott/*.asm files. Whoever needs them, they are still in the (<= 1.1) releases.



Deleted: trunk/rott/f_scale.asm
===================================================================
--- trunk/rott/f_scale.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/f_scale.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,162 +0,0 @@
-        .386
-        .MODEL  flat
-
-SCREENROW = 96
-
-;================
-;
-; R_DrawFilmColumn
-;
-;================
-
-SCREENWIDTH = 96
-
-
-.data
-
-loopcount       dd      0
-pixelcount      dd      0
-
-_cin_yl          dd      0
-_cin_yh          dd      0
-_cin_ycenter     dd      0
-_cin_iscale      dd      0
-_cin_texturemid  dd      0
-_cin_source      dd      0
-
-PUBLIC _cin_yl       
-PUBLIC _cin_yh         
-PUBLIC _cin_ycenter    
-PUBLIC _cin_iscale     
-PUBLIC _cin_texturemid 
-PUBLIC _cin_source   
-
-EXTRN   _ylookup:DWORD
-
-.code
-SEGMENT text USE32
-        ALIGN   16
-
-PROC   R_DrawFilmColumn_
-PUBLIC   R_DrawFilmColumn_
-        push    ebp
-        mov     ebp,[_cin_yl]
-        mov     ebx,ebp
-        add     edi,[_ylookup+ebx*4]
-        mov     eax,[_cin_yh]
-        inc     eax
-        sub     eax,ebp                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      done                            ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        mov     ecx,[_cin_iscale]
-
-        mov     eax,[_cin_ycenter]
-        sub     eax,ebp
-        imul    ecx
-        mov     ebp,[_cin_texturemid]
-        sub     ebp,eax
-
-        mov     esi,[_cin_source]
-
-
-        mov     ebx,[_cin_iscale]
-        mov     eax,OFFSET patch1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET patch2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        mov     ecx,ebp                                 ; begin calculating first pixel
-        add     ebp,ebx                                 ; advance frac pointer
-        shr     ecx,16                                      ; finish calculation for first pixel
-        mov     edx,ebp                                 ; begin calculating second pixel
-        add     ebp,ebx                                 ; advance frac pointer
-        shr     edx,16                                      ; finish calculation for second pixel
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     doubleloop                              ; at least two pixels to map
-        jmp     checklast
-
-        ALIGN   16
-doubleloop:
-        mov     ecx,ebp                                 ; begin calculating third pixel
-patch1:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi],al                                ; write first pixel
-        shr     ecx,16                                      ; finish calculation for third pixel
-        mov     edx,ebp                                 ; begin calculating fourth pixel
-patch2:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi+SCREENWIDTH],bl    ; write second pixel
-        shr     edx,16                                      ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                    ; get third pixel
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     bl,[esi+edx]                    ; get fourth pixel
-        dec     [loopcount]                             ; done with loop?
-        jnz     doubleloop
-
-; check for final pixel
-checklast:
-        test    [pixelcount],1
-        jz      done
-        mov     [edi],al                                ; write final pixel
-done:
-        pop     ebp
-        ret
-
-ENDP
-
-
-
-;============================
-;
-; DrawFilmPost
-;
-;
-;============================
-
-IDEAL
-PROC	DrawFilmPost_
-PUBLIC	DrawFilmPost_
-
-;EDI - Destination for post
-;ESI - Source data
-;ECX - Length of post
-
-        mov     ebx,ecx
-        shr     ebx,1
-        jz      dfextra
-dfloop:
-        mov     ax,[esi]
-        mov     [edi],al
-        add     esi,2
-        add     edi,SCREENROW*2
-        mov     [edi-SCREENROW],ah
-        dec     ebx
-        jnz     dfloop
-        MASKFLAG ecx,1
-        jz      dfdone
-dfextra:
-        mov     al,[esi]
-        mov     [edi],al
-dfdone:
-	ret
-
-ENDP
-
-ENDS
-
-
-END
-

Deleted: trunk/rott/r_scale.asm
===================================================================
--- trunk/rott/r_scale.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/r_scale.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,111 +0,0 @@
-        .386
-        .MODEL  flat
-
-;================
-;
-; R_DrawFilmColumn
-;
-;================
-
-SCREENWIDTH = 96               
-
-
-.data  
-loopcount       dd      0
-pixelcount      dd      0
-EXTRN   _dc_yl:DWORD
-EXTRN   _dc_yh:DWORD
-EXTRN   _dc_ycenter:DWORD
-EXTRN   _dc_iscale:DWORD
-EXTRN   _dc_texturemid:DWORD
-EXTRN   _ylookup:DWORD
-EXTRN   _dc_source:DWORD
-
-.code
-SEGMENT text USE32 
-        ALIGN   16
-
-PROC   R_DrawFilmColumn_
-PUBLIC   R_DrawFilmColumn_
-        push    ebp
-        mov     ebp,[_dc_yl]
-        mov     ebx,ebp
-        add     edi,[_ylookup+ebx*4]
-        mov     eax,[_dc_yh]
-        inc     eax
-        sub     eax,ebp                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      done                            ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        mov     ecx,[_dc_iscale]
-
-        mov     eax,[_dc_ycenter]
-        sub     eax,ebp
-        imul    ecx
-        mov     ebp,[_dc_texturemid]
-        sub     ebp,eax
-
-        mov     esi,[_dc_source]
-
-
-        mov     ebx,[_dc_iscale]
-        mov     eax,OFFSET patch1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET patch2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        mov     ecx,ebp                                 ; begin calculating first pixel
-        add     ebp,ebx                                 ; advance frac pointer
-        shr     ecx,16                                      ; finish calculation for first pixel
-        mov     edx,ebp                                 ; begin calculating second pixel
-        add     ebp,ebx                                 ; advance frac pointer
-        shr     edx,16                                      ; finish calculation for second pixel
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     doubleloop                              ; at least two pixels to map
-        jmp     checklast
-
-        ALIGN   16
-doubleloop:
-        mov     ecx,ebp                                 ; begin calculating third pixel
-patch1:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi],al                                ; write first pixel
-        shr     ecx,16                                      ; finish calculation for third pixel
-        mov     edx,ebp                                 ; begin calculating fourth pixel
-patch2:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi+SCREENWIDTH],bl    ; write second pixel
-        shr     edx,16                                      ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                    ; get third pixel
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     bl,[esi+edx]                    ; get fourth pixel
-        dec     [loopcount]                             ; done with loop?
-        jnz     doubleloop
-
-; check for final pixel
-checklast:
-        test    [pixelcount],1
-        jz      done
-        mov     [edi],al                                ; write final pixel
-done:
-        pop     ebp
-        ret
-
-ENDP
-ENDS
-
-
-END
-

Deleted: trunk/rott/rt_dr_a.asm
===================================================================
--- trunk/rott/rt_dr_a.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/rt_dr_a.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,483 +0,0 @@
-.386p
-.model flat
-
- SC_INDEX   =           03C4h
- SC_DATA    =           03C5h
- SC_RESET   =           0
- SC_CLOCK   =           1
- SC_MAPMASK =           2
- CRTC_INDEX =           03D4h
- SCREENBWIDE=           96
- MISC_OUTPUT=           03c2h
- CEILINGCOLOR=          24
- FLOORCOLOR=            32
-
-.DATA
-
-loopcount       dd      0
-pixelcount      dd      0
-EXTRN    _spotvis:BYTE
-EXTRN    _viewwidth:DWORD
-EXTRN    _viewheight:DWORD
-EXTRN    _bufferofs:DWORD
-EXTRN    _fandc:DWORD
-EXTRN    _ylookup:DWORD
-EXTRN    _centery:DWORD
-EXTRN    _shadingtable:DWORD
-EXTRN    _hp_startfrac:DWORD
-EXTRN    _hp_srcstep:DWORD
-
-
-.CODE
-SEGMENT text USE32
-        ALIGN   16
-
-
-PROC   RefreshClear_
-PUBLIC RefreshClear_
-
-   pushad
-   mov     edi,OFFSET _spotvis
-   xor     eax,eax
-   mov     ecx,01000h
-; 128*128
-   rep     stosd
-
-   mov     eax,[_fandc]
-   or      eax,eax
-   jz     cont
-   popad
-   ret
-; clear the screen
-cont:
-   mov     edx,SC_DATA
-   mov     eax,15
-; write through all planes
-   out     dx,al
-   mov     edx,SCREENBWIDE
-   mov     eax,[_viewwidth]
-   shr     eax,2
-   sub     edx,eax
-
-   mov     ebx,eax
-   shr     ebx,1
-   mov     ah,CEILINGCOLOR
-   mov     al,CEILINGCOLOR
-   mov     edi,[_bufferofs]
-   mov     esi,[_centery]
-   cmp     esi,0
-   jle     skiptop
-   cmp     esi,[_viewheight]
-   jle     toploop
-   mov     esi,[_viewheight]
-toploop:
-   mov     ecx,ebx
-   rep     stosw
-   add     edi,edx
-   dec     esi
-   jnz     toploop
-skiptop:
-   mov     al,FLOORCOLOR
-   mov     ah,FLOORCOLOR
-   mov     esi,[_viewheight]
-   sub     esi,[_centery]
-   cmp     esi,0
-   jle     skipbottom
-   cmp     esi,[_viewheight]
-   jle     bottomloop
-   mov     esi,[_viewheight]
-bottomloop:
-   mov     ecx,ebx
-   rep     stosw
-   add     edi,edx
-   dec     esi
-   jnz     bottomloop
-skipbottom:
-   popad
-   ret
-
-ENDP   RefreshClear_
-
-
-
-PROC   SetMode240_
-PUBLIC SetMode240_
-
-   pushad
-   mov   dx,SC_INDEX
-   mov   ax,0604h
-        out   dx,ax                 ; disable chain4 mode
-        mov   ax,0100h
-        out   dx,ax                 ; synchronous reset while setting Misc
-                                    ;  Output for safety, even though clock
-                                    ;  unchanged
-        mov   dx,MISC_OUTPUT
-        mov   al,0e3h
-        out   dx,al                 ; select the dot clock and Horiz
-        mov   dx,SC_INDEX
-        mov   ax,0300h
-        out   dx,ax                ; undo reset (restart sequencer)
-
-
-        mov   dx,CRTC_INDEX       ; reprogram the CRT Controller
-        mov   al,11h              ; VSync End reg contains register write
-        out   dx,al               ; protect bit
-        inc   dx                  ; CRT Controller Data register
-        in    al,dx               ; get current VSync End register setting
-        and   al,07fh             ; remove write protect on various
-        out   dx,al               ; CRTC registers
-        dec   dx                  ; CRT Controller Index
-        cld
-        mov   ax,00d06h
-        out   dx,ax
-        mov   ax,03e07h
-        out   dx,ax
-        mov   ax,04109h
-        out   dx,ax
-        mov   ax,0ea10h
-        out   dx,ax
-        mov   ax,0ac11h
-        out   dx,ax
-        mov   ax,0df12h
-        out   dx,ax
-        mov   ax,00014h
-        out   dx,ax
-        mov   ax,0e715h
-        out   dx,ax
-        mov   ax,00616h
-        out   dx,ax
-        mov   ax,0e317h
-        out   dx,ax
-        mov   ax,0f02h
-        mov   dx,SC_INDEX
-        out   dx,ax
-        mov   edi,0a0000h
-        mov   eax,0
-        mov   ecx,08000h
-        cld
-        rep   stosw
-
-   popad
-   ret
-
-ENDP   SetMode240_
-
-;----------------------------------------------------------------------------
-;
-; DrawPost - Draws an unmasked post centered in the viewport
-;
-;            ecx - height to scale post to
-;            esi - source pointer to proper column (x offsetted)
-;            edi - destination pointer to proper screen column (xoffsetted)
-;
-;----------------------------------------------------------------------------
-
-
-PROC    DrawPost_
-PUBLIC  DrawPost_
-
-; ECX - loop variable (height and counter)
-; EDI - top offset + bufferofs
-; EDX - destination offset
-; EBX - high word contains bottom offset, low word contains source data
-; EBP - fraction
-
-  push ebp
-  SETFLAG ecx,ecx
-  jz    donedraw
-  mov   edx,0
-  mov   eax,32*65536
-  div   ecx
-  mov   edx,eax
-; edx holds fractional step
-  mov   [DWORD PTR patch1],edx
-  mov   ebp,edx
-  shr   ebp,1
-  mov   eax,[_centery]
-  add   edi,[_ylookup+4*eax]
-  mov   edx,edi
-  sub   edi,SCREENBWIDE
-  mov   ebx,[_shadingtable]
-  cmp   ecx,eax
-  jle   heightok
-  mov   ecx,eax
-heightok:        ; height is ok.. < viewheigth
-
-ALIGN 16
-
-drawloop:
-  mov   eax,ebp
-  shr   eax,16
-  mov   ax,[WORD PTR esi+eax*2]
-patch1 equ $+2
-  add   ebp,12345678h
-  mov   bl,al
-  mov   al,[ebx]
-  mov   [edi],al
-  mov   bl,ah
-  sub   edi,SCREENBWIDE
-  mov   ah,[ebx]
-  mov   [edx],ah
-  add   edx,SCREENBWIDE
-  dec   ecx
-  jnz   drawloop
-
-donedraw:
-  pop   ebp
-  ret
-
-ENDP DrawPost_
-
-
-
-;============================
-;
-; DrawHeightPost
-;
-;============================
-
-IDEAL
-        ALIGN 16
-PROC	DrawHeightPost_
-PUBLIC	DrawHeightPost_
-
-;EDI - Destination for post
-;ESI - Source data
-;ECX - Length of post
-;EBX - shadingtable
-;EBX - shadingtable
-
-        push    ebp
-        SETFLAG ecx,ecx
-        jz      donehp
-        mov     [pixelcount],ecx                ; save for final pixel
-        shr     ecx,1                           ; double pixel count
-        mov     [loopcount],ecx
-
-        mov     ebp,[_hp_startfrac]
-        mov     ebx,[_hp_srcstep]
-        mov     eax,OFFSET hp1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET hp2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           shadingtable
-; ebx           shadingtable
-; ecx,edx       scratch
-; esi           source
-; edi           destination
-; ebp           fraction
-
-        mov     ecx,ebp                      ; begin calculating first pixel
-        add     ebp,ebx                      ; advance frac pointer
-        shr     ecx,16                       ; finish calculation for first pixel
-        mov     edx,ebp                      ; begin calculating second pixel
-        and     ecx,63
-        add     ebp,ebx                      ; advance frac pointer
-        shr     edx,16                       ; finish calculation for second pixel
-        mov     eax,[_shadingtable]
-        and     edx,63
-        mov     ebx,eax
-        mov     al,[esi+ecx]                 ; get first pixel
-        mov     bl,[esi+edx]                 ; get second pixel
-        mov     al,[eax]                     ; color translate first pixel
-        mov     bl,[ebx]                     ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     dsloop                       ; at least two pixels to map
-        jmp     last
-
-ALIGN 16
-dsloop:
-        mov     ecx,ebp                      ; begin calculating third pixel
-hp1:
-        add     ebp,12345678h                ; advance frac pointer
-        mov     [edi],al                     ; write first pixel
-        shr     ecx,16                       ; finish calculation for third pixel
-        mov     edx,ebp                      ; begin calculating fourth pixel
-hp2:
-        add     ebp,12345678h                ; advance frac pointer
-        and     ecx,63
-        mov     [edi+SCREENBWIDE],bl         ; write second pixel
-        shr     edx,16                       ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                 ; get third pixel
-        and     edx,63
-        add     edi,SCREENBWIDE*2            ; advance to third pixel destination
-        mov     bl,[esi+edx]                 ; get fourth pixel
-        dec     [loopcount]                  ; done with loop?
-        mov     al,[eax]                     ; color translate third pixel
-        mov     bl,[ebx]                     ; color translate fourth pixel
-        jnz     dsloop
-
-last:                                        ; one more?
-        test    [pixelcount],1
-        jz      donehp
-        mov     [edi],al                     ; write final pixel
-donehp:
-        pop   ebp
-	ret
-
-ENDP
-
-
-;============================
-;
-; DrawMenuPost
-;
-;============================
-
-IDEAL
-        ALIGN 16
-PROC	DrawMenuPost_
-PUBLIC	DrawMenuPost_
-
-;EDI - Destination for post
-;ESI - Source data
-;ECX - Length of post
-;EBX - shadingtable
-;EBX - shadingtable
-
-        push    ebp
-        SETFLAG ecx,ecx
-        jz      mdonehp
-        mov     [pixelcount],ecx                ; save for final pixel
-        shr     ecx,1                           ; double pixel count
-        mov     [loopcount],ecx
-
-        mov     ebp,[_hp_startfrac]
-        mov     ebx,[_hp_srcstep]
-        mov     eax,OFFSET mhp1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET mhp2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           shadingtable
-; ebx           shadingtable
-; ecx,edx       scratch
-; esi           source
-; edi           destination
-; ebp           fraction
-
-        mov     ecx,ebp                      ; begin calculating first pixel
-        add     ebp,ebx                      ; advance frac pointer
-        shr     ecx,16                       ; finish calculation for first pixel
-        mov     edx,ebp                      ; begin calculating second pixel
-        add     ebp,ebx                      ; advance frac pointer
-        shr     edx,16                       ; finish calculation for second pixel
-        mov     al,[esi+ecx]                 ; get first pixel
-        mov     bl,[esi+edx]                 ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     mdsloop                       ; at least two pixels to map
-        jmp     mlast
-
-ALIGN 16
-mdsloop:
-        mov     ecx,ebp                      ; begin calculating third pixel
-mhp1:
-        add     ebp,12345678h                ; advance frac pointer
-        mov     [edi],al                     ; write first pixel
-        shr     ecx,16                       ; finish calculation for third pixel
-        mov     edx,ebp                      ; begin calculating fourth pixel
-mhp2:
-        add     ebp,12345678h                ; advance frac pointer
-        mov     [edi+SCREENBWIDE],bl         ; write second pixel
-        shr     edx,16                       ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                 ; get third pixel
-        add     edi,SCREENBWIDE*2            ; advance to third pixel destination
-        mov     bl,[esi+edx]                 ; get fourth pixel
-        dec     [loopcount]                  ; done with loop?
-        jnz     mdsloop
-
-mlast:                                        ; one more?
-        test    [pixelcount],1
-        jz      mdonehp
-        mov     [edi],al                     ; write final pixel
-mdonehp:
-        pop   ebp
-	ret
-
-ENDP
-
-
-;============================
-;
-; DrawMapPost
-;
-;============================
-
-IDEAL
-        ALIGN 16
-PROC	DrawMapPost_
-PUBLIC	DrawMapPost_
-
-;EDI - Destination for post
-;ESI - Source data
-;ECX - Length of post
-
-        push    ebp
-        SETFLAG ecx,ecx
-        jz      mpdonehp
-        mov     [pixelcount],ecx                ; save for final pixel
-        shr     ecx,1                           ; double pixel count
-        mov     [loopcount],ecx
-
-        mov     ebp,0
-        mov     ebx,[_hp_srcstep]
-
-; ecx,edx       scratch
-; esi           source
-; edi           destination
-; ebp           fraction
-
-        mov     ecx,ebp                      ; begin calculating first pixel
-        add     ebp,ebx                      ; advance frac pointer
-        shr     ecx,16                       ; finish calculation for first pixel
-        mov     edx,ebp                      ; begin calculating second pixel
-        add     ebp,ebx                      ; advance frac pointer
-        shr     edx,16                       ; finish calculation for second pixel
-        mov     al,[esi+ecx]                 ; get first pixel
-        mov     ah,[esi+edx]                 ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     mpdsloop                       ; at least two pixels to map
-        jmp     mplast
-
-ALIGN 16
-mpdsloop:
-        mov     ecx,ebp                      ; begin calculating third pixel
-        add     ebp,ebx                      ; advance frac pointer
-        mov     [edi],al                     ; write first pixel
-        shr     ecx,16                       ; finish calculation for third pixel
-        mov     edx,ebp                      ; begin calculating fourth pixel
-        add     ebp,ebx                      ; advance frac pointer
-        mov     [edi+SCREENBWIDE],ah         ; write second pixel
-        shr     edx,16                       ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                 ; get third pixel
-        add     edi,SCREENBWIDE*2            ; advance to third pixel destination
-        mov     ah,[esi+edx]                 ; get fourth pixel
-        dec     [loopcount]                  ; done with loop?
-        jnz     mpdsloop
-
-mplast:                                        ; one more?
-        test    [pixelcount],1
-        jz      mpdonehp
-        mov     [edi],al                     ; write final pixel
-mpdonehp:
-        pop   ebp
-	ret
-
-ENDP
-
-
-ENDS
-
-END
-
-
-
-
-
-
-
-

Deleted: trunk/rott/rt_fc_a.asm
===================================================================
--- trunk/rott/rt_fc_a.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/rt_fc_a.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,462 +0,0 @@
-; rt_fc_a.ASM
-
-.386P
-.MODEL	flat
-
-SCREENROW = 96
-
-;============================================================================
-
-.DATA
-loopcount       dd      0
-pixelcount      dd      0
-
-EXTRN	_mr_rowofs:DWORD
-EXTRN	_mr_count:DWORD
-EXTRN	_mr_xstep:DWORD
-EXTRN	_mr_ystep:DWORD
-EXTRN	_mr_xfrac:DWORD
-EXTRN	_mr_yfrac:DWORD
-EXTRN	_mr_dest:DWORD
-EXTRN   _shadingtable:DWORD
-
-
-;============================================================================
-
-.CODE
-SEGMENT text USE32
-        ALIGN   16
-
-;============================
-;
-; DrawRow
-;
-;============================
-
-IDEAL
-        ALIGN   16
-PROC	DrawRow_
-PUBLIC	DrawRow_
-
-        push    ebp
-        mov     [pixelcount],ecx                                ; save for final pixel
-        shr     ecx,1                                           ; double pixel count
-        mov     [loopcount],ecx
-;        mov     esi,[_mr_src]
-	mov	ebx,[_mr_ystep]
-        shl     ebx,16
-	mov	eax,[_mr_xstep]
-        mov     bx,ax
-        mov     eax,OFFSET hpatch1+2            ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET hpatch2+2            ; convice tasm to modify code...
-        mov     [eax],ebx
-	mov	ebp,[_mr_yfrac]
-	shl	ebp,16
-	mov	eax,[_mr_xfrac]
-	mov	bp,ax
-;        mov     eax,[_shadingtable]
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        shld    ecx,ebp,23                         ; begin calculating third pixel (y units)
-        shld    ecx,ebp,7                          ; begin calculating third pixel (x units)
-        add     ebp,ebx                                 ; advance frac pointer
-        and     ecx,16383                            ; finish calculation for third pixel
-        shld    edx,ebp,23                         ; begin calculating fourth pixel (y units)
-        shld    edx,ebp,7                          ; begin calculating fourth pixel (x units)
-        add     ebp,ebx                                 ; advance frac pointer
-        and     edx,16383                            ; finish calculation for fourth pixel
-        mov     eax,[_shadingtable]
-        mov     ebx,eax
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-        mov     al,[eax]                                ; color translate first pixel
-        mov     bl,[ebx]                                ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     hdoubleloop                             ; at least two pixels to map
-        jmp     hchecklast
-
-
-        ALIGN   16
-hdoubleloop:
-        shld    ecx,ebp,23                         ; begin calculating third pixel (y units)
-        shld    ecx,ebp,7                          ; begin calculating third pixel (x units)
-hpatch1:
-        add     ebp,12345678h                      ; advance frac pointer
-        mov     [edi],al                           ; write first pixel
-        and     ecx,16383                          ; finish calculation for third pixel
-        shld    edx,ebp,23                         ; begin calculating fourth pixel (y units)
-        shld    edx,ebp,7                          ; begin calculating fourth pixel (x units)
-hpatch2:
-        add     ebp,12345678h                      ; advance frac pointer
-        mov     [edi+1],bl                         ; write second pixel
-        and     edx,16383                          ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                       ; get third pixel
-        add     edi,2                              ; advance to third pixel destination
-        mov     bl,[esi+edx]                       ; get fourth pixel
-        dec     [loopcount]                        ; done with loop?
-        mov     al,[eax]                           ; color translate third pixel
-        mov     bl,[ebx]                           ; color translate fourth pixel
-        jnz     hdoubleloop
-
-; check for final pixel
-hchecklast:
-        test    [pixelcount],1
-        jz      hdone
-        mov     [edi],al                                ; write final pixel
-
-hdone:
-        pop     ebp
-        ret
-
-ENDP
-
-
-
-
-
-
-
-
-;============================
-;
-; DrawRotRow
-;
-;============================
-
-IDEAL
-        ALIGN   16
-PROC	DrawRotRow_
-PUBLIC	DrawRotRow_
-
-        push    ebp
-        mov     [pixelcount],ecx                                ; save for final pixel
-        shr     ecx,1                                           ; double pixel count
-        mov     [loopcount],ecx
-	mov	ebx,[_mr_xstep]
-        mov     edx,OFFSET hrpatch1+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch1a+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch1b+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch1c+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-	mov	ebx,[_mr_ystep]
-        mov     edx,OFFSET hrpatch2+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch2a+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch2b+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET hrpatch2c+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-	mov	ecx,[_mr_yfrac]
-	mov	edx,[_mr_xfrac]
-
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-hrpatch1:
-        add     edx,012345678h          ; increment y fraction
-hrpatch2:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      nok3
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      nok3
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-ok3:
-        mov     bl,[esi+eax]            ; get first pixel
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-hrpatch1a:
-        add     edx,012345678h          ; increment y fraction
-hrpatch2a:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      nok4
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      nok4
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-ok4:
-        mov     bh,[esi+eax]            ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     hrdoubleloop                       ; at least two pixels to map
-        jmp     hrchecklast
-nok3:
-        xor  eax,eax
-        jmp  ok3
-nok4:
-        xor  eax,eax
-        jmp  ok4
-
-        ALIGN   16
-hrdoubleloop:
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-hrpatch1b:
-        add     edx,012345678h          ; increment y fraction
-hrpatch2b:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      nok1
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      nok1
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-ok1:
-        mov     [edi],bl                ; write first pixel
-        mov     ebp,ecx                 ; Move xfrac into x
-        mov     bl,[esi+eax]            ; get third pixel
-
-        mov     eax,edx                 ; Move yfrac into y
-        shr     eax,16                  ; shift yfrac off
-hrpatch1c:
-        add     edx,012345678h          ; increment y fraction
-hrpatch2c:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      nok2
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      nok2
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-ok2:
-        mov     [edi+1],bh                ; write second pixel
-        add     edi,2
-        dec     [loopcount]                     ; done with loop?
-        mov     bh,[esi+eax]            ; get second pixel
-        jnz     hrdoubleloop
-; check for final pixel
-hrchecklast:
-        test    [pixelcount],1
-        jz      hrdone
-        mov     [edi],bl                                ; write final pixel
-
-hrdone:
-        pop     ebp
-        ret
-
-nok1:
-        xor  eax,eax
-        jmp  ok1
-nok2:
-        xor  eax,eax
-        jmp  ok2
-
-
-ENDP
-
-
-
-;============================
-;
-; DrawMaskedRotRow
-;
-;============================
-
-IDEAL
-        ALIGN   16
-PROC  DrawMaskedRotRow_
-PUBLIC   DrawMaskedRotRow_
-
-        push    ebp
-        mov     [pixelcount],ecx                                ; save for final pixel
-        shr     ecx,1                                           ; double pixel count
-        mov     [loopcount],ecx
-	mov	ebx,[_mr_xstep]
-        mov     edx,OFFSET mhrpatch1+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch1a+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch1b+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch1c+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-	mov	ebx,[_mr_ystep]
-        mov     edx,OFFSET mhrpatch2+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch2a+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch2b+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-        mov     edx,OFFSET mhrpatch2c+2            ; convice tasm to modify code...
-        mov     [edx],ebx
-	mov	ecx,[_mr_yfrac]
-	mov	edx,[_mr_xfrac]
-
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-mhrpatch1:
-        add     edx,012345678h          ; increment y fraction
-mhrpatch2:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      mnok3
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      mnok3
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-mok3:
-        mov     bl,[esi+eax]            ; get first pixel
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-mhrpatch1a:
-        add     edx,012345678h          ; increment y fraction
-mhrpatch2a:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      mnok4
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      mnok4
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-mok4:
-        mov     bh,[esi+eax]            ; get second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     mhrdoubleloop                       ; at least two pixels to map
-        jmp     mhrchecklast
-mnok3:
-        xor  eax,eax
-        jmp  mok3
-mnok4:
-        xor  eax,eax
-        jmp  mok4
-
-        ALIGN   16
-mhrdoubleloop:
-        mov     eax,edx                 ; Move yfrac into y
-        mov     ebp,ecx                 ; Move xfrac into x
-        shr     eax,16                  ; shift yfrac off
-mhrpatch1b:
-        add     edx,012345678h          ; increment y fraction
-mhrpatch2b:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      mnok1
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      mnok1
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-mok1:
-        cmp     bl,0ffh
-        je      skip1
-        mov     [edi],bl                ; write first pixel
-skip1:
-        mov     ebp,ecx                 ; Move xfrac into x
-        mov     bl,[esi+eax]            ; get third pixel
-
-        mov     eax,edx                 ; Move yfrac into y
-        shr     eax,16                  ; shift yfrac off
-mhrpatch1c:
-        add     edx,012345678h          ; increment y fraction
-mhrpatch2c:
-        add     ecx,012345678h          ; increment x fraction
-        cmp     eax,255                 ; test bounds of y fraction
-        ja      mnok2
-        shr     ebp,16                  ; shift xfrac off
-        cmp     ebp,511                 ; test bounds of x fraction
-        ja      mnok2
-        shl     ebp,23                  ;
-        shld    eax,ebp,9               ; form composite offset
-mok2:
-        cmp     bh,0ffh
-        je      skip2
-        mov     [edi+1],bh                ; write second pixel
-skip2:
-        add     edi,2
-        dec     [loopcount]                     ; done with loop?
-        mov     bh,[esi+eax]            ; get second pixel
-        jnz     mhrdoubleloop
-; check for final pixel
-mhrchecklast:
-        test    [pixelcount],1
-        jz      mhrdone
-        mov     [edi],bl                                ; write final pixel
-
-mhrdone:
-        pop     ebp
-        ret
-
-mnok1:
-        xor  eax,eax
-        jmp  mok1
-mnok2:
-        xor  eax,eax
-        jmp  mok2
-
-
-ENDP
-
-
-;============================
-;
-; DrawSkyPost
-;
-;
-;============================
-
-IDEAL
-PROC	DrawSkyPost_
-PUBLIC	DrawSkyPost_
-
-;EDI - Destination for post
-;ESI - Source data
-;ECX - Length of post
-
-        mov     ebx,ecx
-        mov     edx,[_shadingtable]
-        shr     ebx,1
-        jz      dsextra
-dsloop:
-        mov     ax,[esi]
-        mov     dl,al
-        mov     al,[edx]                                ; color translate third pixel
-        mov     [edi],al
-        add     esi,2
-        mov     dl,ah
-        add     edi,SCREENROW*2
-        mov     al,[edx]                                ; color translate third pixel
-        mov     [edi-SCREENROW],al
-        dec     ebx
-        jnz     dsloop
-        MASKFLAG ecx,1
-        jz      done
-dsextra:
-        mov     al,[esi]
-        mov     dl,al
-        mov     al,[edx]                                ; color translate third pixel
-        mov     [edi],al
-done:
-	ret
-
-ENDP
-
-
-ENDS
-
-END
-

Deleted: trunk/rott/rt_sc_a.asm
===================================================================
--- trunk/rott/rt_sc_a.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/rt_sc_a.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,421 +0,0 @@
-        .386
-        .MODEL  flat
-
-
-SCREENWIDTH = 96
-
-
-.data
-loopcount       dd      0
-pixelcount      dd      0
-EXTRN   _centery:DWORD
-EXTRN   _centeryclipped:DWORD
-EXTRN   _dc_yl:DWORD
-EXTRN   _dc_yh:DWORD
-EXTRN   _dc_iscale:DWORD
-EXTRN   _dc_texturemid:DWORD
-EXTRN   _ylookup:DWORD
-;EXTRN   _dc_firstsource:DWORD
-EXTRN   _dc_source:DWORD
-EXTRN   _shadingtable:DWORD
-
-.code
-SEGMENT text USE32
-        ALIGN   16
-
-;================
-;
-; R_DrawColumn
-;
-;================
-PROC   R_DrawColumn_
-PUBLIC   R_DrawColumn_
-        push    ebp
-        mov     ebp,[_dc_yl]
-        mov     ebx,ebp
-        add     edi,[_ylookup+ebx*4]
-        mov     eax,[_dc_yh]
-        inc     eax
-        sub     eax,ebp                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      done                            ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        mov     ecx,[_dc_iscale]
-
-        mov     eax,[_centery]
-        sub     eax,ebp
-        imul    ecx
-        mov     ebp,[_dc_texturemid]
-        sub     ebp,eax
-
-        mov     esi,[_dc_source]
-
-
-        mov     ebx,[_dc_iscale]
-        mov     eax,OFFSET patch1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET patch2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        mov     ecx,ebp                         ; begin calculating first pixel
-        add     ebp,ebx                         ; advance frac pointer
-        shr     ecx,16                          ; finish calculation for first pixel
-        mov     edx,ebp                         ; begin calculating second pixel
-        add     ebp,ebx                         ; advance frac pointer
-        shr     edx,16                          ; finish calculation for second pixel
-        mov     eax,[_shadingtable]
-        mov     ebx,eax
-        ;mov     [_dc_firstsource],esi
-        ;add     [_dc_firstsource],ecx
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-        mov     al,[eax]                        ; color translate first pixel
-        mov     bl,[ebx]                        ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     doubleloop                      ; at least two pixels to map
-        jmp     checklast
-
-        ALIGN   16
-doubleloop:
-        mov     ecx,ebp                         ; begin calculating third pixel
-patch1:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi],al                        ; write first pixel
-        shr     ecx,16                          ; finish calculation for third pixel
-        mov     edx,ebp                         ; begin calculating fourth pixel
-patch2:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi+SCREENWIDTH],bl            ; write second pixel
-        shr     edx,16                                      ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                    ; get third pixel
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     bl,[esi+edx]                    ; get fourth pixel
-        dec     [loopcount]                     ; done with loop?
-        mov     al,[eax]                        ; color translate third pixel
-        mov     bl,[ebx]                        ; color translate fourth pixel
-        jnz     doubleloop
-
-; check for final pixel
-checklast:
-        test    [pixelcount],1
-        jz      done
-        mov     [edi],al                        ; write final pixel
-done:
-        pop     ebp
-        ret
-
-ENDP
-
-
-;================
-;
-; R_DrawSolidColumn
-;
-;================
-PROC   R_DrawSolidColumn_
-PUBLIC   R_DrawSolidColumn_
-        mov     ecx,[_dc_yl]
-        mov     eax,ecx
-        add     edi,[_ylookup+eax*4]
-        mov     eax,[_dc_yh]
-        inc     eax
-        sub     eax,ecx                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      soliddone                       ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        test    [pixelcount],0fffffffeh
-        jnz     soliddoubleloop                      ; at least two pixels to map
-        jmp     solidchecklast
-
-        ALIGN   16
-soliddoubleloop:
-        mov     [edi],bl                        ; write first pixel
-        add     edi,SCREENWIDTH                 ; advance to third pixel destination
-        mov     [edi],bl                        ; write second pixel
-        add     edi,SCREENWIDTH                 ; advance to fourth pixel destination
-        dec     [loopcount]                     ; done with loop?
-        jnz     soliddoubleloop
-
-; check for final pixel
-solidchecklast:
-        test    [pixelcount],1
-        jz      soliddone
-        mov     [edi],bl                        ; write final pixel
-soliddone:
-        ret
-
-ENDP
-
-
-;================
-;
-; R_TransColumn
-;
-;================
-PROC   R_TransColumn_
-PUBLIC   R_TransColumn_
-        mov     ebx,[_dc_yl]
-        mov     eax,[_dc_yh]
-        add     edi,[_ylookup+ebx*4]
-        inc     eax
-        sub     eax,ebx                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      tdone                           ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; esi           moving destination pointer
-; edi           moving destination pointer
-
-        mov     eax,[_shadingtable]
-        mov     esi,edi
-        mov     ebx,eax
-        add     esi,SCREENWIDTH
-        mov     al,[BYTE PTR edi]               ; get first pixel
-        mov     bl,[BYTE PTR esi]               ; get second pixel
-        mov     al,[BYTE PTR eax]               ; color translate first pixel
-        mov     bl,[BYTE PTR ebx]               ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     tdoubleloop                     ; at least two pixels to map
-        jmp     tchecklast
-
-        ALIGN   16
-tdoubleloop:
-        mov     [edi],al                        ; write first pixel
-        mov     [esi],bl                        ; write second pixel
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        add     esi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     al,[edi]                        ; get third pixel
-        mov     bl,[esi]                        ; get fourth pixel
-        mov     al,[eax]                        ; color translate third pixel
-        dec     [loopcount]                     ; done with loop?
-        mov     bl,[ebx]                        ; color translate fourth pixel
-        jnz     tdoubleloop
-
-; check for final pixel
-tchecklast:
-        test    [pixelcount],1
-        jz      tdone
-        mov     [edi],al                        ; write final pixel
-tdone:
-        ret
-
-ENDP
-
-
-
-
-
-
-
-
-;================
-;
-; R_DrawClippedColumn
-;
-;================
-PROC   R_DrawClippedColumn_
-PUBLIC   R_DrawClippedColumn_
-        push    ebp
-        mov     ebp,[_dc_yl]
-        mov     ebx,ebp
-        add     edi,[_ylookup+ebx*4]
-        mov     eax,[_dc_yh]
-        inc     eax
-        sub     eax,ebp                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      adone                            ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        mov     ecx,[_dc_iscale]
-
-        mov     eax,[_centeryclipped]
-        sub     eax,ebp
-        imul    ecx
-        mov     ebp,[_dc_texturemid]
-        sub     ebp,eax
-
-        mov     esi,[_dc_source]
-
-
-        mov     ebx,[_dc_iscale]
-        mov     eax,OFFSET apatch1+2            ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET apatch2+2            ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        mov     ecx,ebp                         ; begin calculating first pixel
-        add     ebp,ebx                         ; advance frac pointer
-        shr     ecx,16                          ; finish calculation for first pixel
-        mov     edx,ebp                         ; begin calculating second pixel
-        add     ebp,ebx                         ; advance frac pointer
-        shr     edx,16                          ; finish calculation for second pixel
-        mov     eax,[_shadingtable]
-        mov     ebx,eax
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-        mov     al,[eax]                        ; color translate first pixel
-        mov     bl,[ebx]                        ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     adoubleloop                     ; at least two pixels to map
-        jmp     achecklast
-
-        ALIGN   16
-adoubleloop:
-        mov     ecx,ebp                         ; begin calculating third pixel
-apatch1:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi],al                        ; write first pixel
-        shr     ecx,16                          ; finish calculation for third pixel
-        mov     edx,ebp                         ; begin calculating fourth pixel
-apatch2:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi+SCREENWIDTH],bl            ; write second pixel
-        shr     edx,16                          ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                    ; get third pixel
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     bl,[esi+edx]                    ; get fourth pixel
-        dec     [loopcount]                     ; done with loop?
-        mov     al,[eax]                        ; color translate third pixel
-        mov     bl,[ebx]                        ; color translate fourth pixel
-        jnz     adoubleloop
-
-; check for final pixel
-achecklast:
-        test    [pixelcount],1
-        jz      adone
-        mov     [edi],al                                ; write final pixel
-adone:
-        pop     ebp
-        ret
-
-ENDP
-
-
-;================
-;
-; R_DrawWallColumn
-;
-;================
-PROC     R_DrawWallColumn_
-PUBLIC   R_DrawWallColumn_
-        push    ebp
-        mov     ebp,[_dc_yl]
-        mov     ebx,ebp
-        add     edi,[_ylookup+ebx*4]
-        mov     eax,[_dc_yh]
-;        inc     eax
-        sub     eax,ebp                         ; pixel count
-        mov     [pixelcount],eax                ; save for final pixel
-        js      wcdone                            ; nothing to scale
-        shr     eax,1                           ; double pixel count
-        mov     [loopcount],eax
-
-        mov     ecx,[_dc_iscale]
-
-        mov     eax,[_centery]
-        sub     eax,ebp
-        imul    ecx
-        mov     ebp,[_dc_texturemid]
-        sub     ebp,eax
-        shl     ebp,10
-
-        mov     esi,[_dc_source]
-
-
-        mov     ebx,[_dc_iscale]
-        shl     ebx,10
-        mov     eax,OFFSET wcpatch1+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-        mov     eax,OFFSET wcpatch2+2             ; convice tasm to modify code...
-        mov     [eax],ebx
-
-; eax           aligned colormap
-; ebx           aligned colormap
-; ecx,edx       scratch
-; esi           virtual source
-; edi           moving destination pointer
-; ebp           frac
-
-        mov     ecx,ebp                         ; begin calculating first pixel
-        add     ebp,ebx                         ; advance frac pointer
-        shr     ecx,26                          ; finish calculation for first pixel
-        mov     edx,ebp                         ; begin calculating second pixel
-;        and     ecx,63
-        add     ebp,ebx                         ; advance frac pointer
-        shr     edx,26                          ; finish calculation for second pixel
-        mov     eax,[_shadingtable]
-;        and     edx,63
-        mov     ebx,eax
-        mov     al,[esi+ecx]                    ; get first pixel
-        mov     bl,[esi+edx]                    ; get second pixel
-        mov     al,[eax]                        ; color translate first pixel
-        mov     bl,[ebx]                        ; color translate second pixel
-
-        test    [pixelcount],0fffffffeh
-        jnz     wcdoubleloop                      ; at least two pixels to map
-        jmp     wcchecklast
-
-        ALIGN   16
-wcdoubleloop:
-        mov     ecx,ebp                         ; begin calculating third pixel
-wcpatch1:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi],al                        ; write first pixel
-        shr     ecx,26                          ; finish calculation for third pixel
-        mov     edx,ebp                         ; begin calculating fourth pixel
-;        and     ecx,63
-wcpatch2:
-        add     ebp,12345678h                   ; advance frac pointer
-        mov     [edi+SCREENWIDTH],bl            ; write second pixel
-        shr     edx,26                                      ; finish calculation for fourth pixel
-        mov     al,[esi+ecx]                    ; get third pixel
-;        and     edx,63
-        add     edi,SCREENWIDTH*2               ; advance to third pixel destination
-        mov     bl,[esi+edx]                    ; get fourth pixel
-        dec     [loopcount]                     ; done with loop?
-        mov     al,[eax]                        ; color translate third pixel
-        mov     bl,[ebx]                        ; color translate fourth pixel
-        jnz     wcdoubleloop
-
-; check for final pixel
-wcchecklast:
-        test    [pixelcount],1
-        jz      wcdone
-        mov     [edi],al                        ; write final pixel
-wcdone:
-        pop     ebp
-        ret
-
-ENDP
-
-
-ENDS
-
-
-END
-

Deleted: trunk/rott/rt_vh_a.asm
===================================================================
--- trunk/rott/rt_vh_a.asm	2009-06-12 12:30:39 UTC (rev 248)
+++ trunk/rott/rt_vh_a.asm	2009-06-25 09:56:26 UTC (rev 249)
@@ -1,195 +0,0 @@
-.386p
-.model small
-
-
- SC_INDEX   =  03C4h
- SC_MAPMASK =  2
- GC_INDEX   =  03CEh
- GC_MODE    =  5
-
-
- UPDATEWIDE =  20
- UPDATEHIGH =  13
-
- MaxJoyValue = 5000
-
-.DATA
-
-
-EXTRN _bufferofs        :DWORD
-EXTRN _displayofs       :DWORD
-EXTRN _ylookup          :DWORD
-EXTRN _linewidth        :DWORD
-EXTRN _blockstarts      :DWORD ;offsets from drawofs for each update block
-
-EXTRN _Joy_xb : BYTE
-EXTRN _Joy_yb : BYTE
-EXTRN _Joy_xs : BYTE
-EXTRN _Joy_ys : BYTE
-EXTRN _Joy_x  : WORD
-EXTRN _Joy_y  : WORD
-
-EXTRN _update            :DWORD
-
-
-
-.CODE
-
-ALIGN  4
-
-;=================
-;
-; VH_UpdateScreen
-;
-;=================
-
-PROC   VH_UpdateScreen_
-PUBLIC VH_UpdateScreen_
-
-   pushad
-
-   mov   edx,SC_INDEX
-   mov   eax,SC_MAPMASK+15*256
-
-; write through all planes
-
-   out   dx, ax
-
-   mov   edx, GC_INDEX
-   mov   al, GC_MODE
-   out   dx, al
-
-   inc   dx
-   in    al, dx
-   and   al, 252
-   or    al, 1
-   out   dx, al
-
-   mov   ebx, UPDATEWIDE*UPDATEHIGH-1    ; bx is the tile number
-   mov   edx, [_linewidth]
-
-;
-; see if the tile needs to be copied
-;
-@@checktile:
-   test  [_update+ebx],1
-   jnz   @@copytile
-@@next:
-   dec   ebx
-   jns   @@checktile
-
-;
-; done
-;
-   mov   dx, GC_INDEX+1
-   in    al, dx
-   and   al, NOT 3
-   or    al, 0
-   out   dx, al
-
-
-   popad
-
-   ret
-
-;
-; copy a tile
-;
-@@copytile:
-   mov   [BYTE PTR _update+ebx], 0
-   mov   esi, [_blockstarts+ebx*4]
-   mov   edi, esi
-   add   esi, [_bufferofs]
-   add   edi, [_displayofs]
-
-;   mov   ax, SCREENSEG
-;   mov   ds, ax
-
-REPT  16
-   mov   al, [esi]
-   mov   [edi],   al
-   mov   al, [esi+1]
-   mov   [edi+1], al
-   mov   al, [esi+2]
-   mov   [edi+2], al
-   mov   al, [esi+3]
-   mov   [edi+3], al
-   add   esi, edx
-   add   edi, edx
-ENDM
-
-   jmp   @@next
-
-ENDP VH_UpdateScreen_
-
-
-ALIGN  4
-
-;=================
-;
-; JoyStick_Vals
-;
-;=================
-
-PROC   JoyStick_Vals_
-PUBLIC JoyStick_Vals_
-
-
-; Read the absolute joystick values
-
-   pushf                ; Save some registers
-   push  ebp
-   cli                  ; Make sure an interrupt doesn't screw the timings
-
-   mov   dx, 0201h
-   in    al, dx
-   out   dx, al         ; Clear the resistors
-
-   mov   ah, BYTE PTR [_Joy_xb]   ; Get masks into registers
-   mov   ch, BYTE PTR [_Joy_yb]
-
-   xor   si, si         ; Clear count registers
-   xor   di, di
-   xor   bh, bh         ; Clear high byte of bx for later
-
-   mov   ebp, MaxJoyValue
-
-   @@LOOP:
-   in    al, dx         ; Get bits indicating whether all are finished
-
-   dec   ebp             ; Check bounding register
-   jz    done           ; We have a silly value - abort
-
-   mov   bl, al         ; Duplicate the bits
-   and   bl, ah         ; Mask off useless bits (in [xb])
-   add   si, bx         ; Possibly increment count register
-   mov   cl, bl         ; Save for testing later
-
-   mov   bl, al
-   and   bl, ch         ; [yb]
-   add   di, bx
-
-   add   cl, bl
-   jnz   @@LOOP         ; If both bits were 0, drop out
-
-   done:
-
-   mov   cl, [_Joy_xs]  ; Get the number of bits to shift
-   shr   si, cl         ;  and shift the count that many times
-
-   mov   cl, [_Joy_ys]
-   shr   di, cl
-
-   mov   [_Joy_x], si   ; Store the values into the variables
-   mov   [_Joy_y], di
-
-   pop   ebp
-   popf                 ; Restore the registers
-
-   ret
-
-ENDP   JoyStick_Vals_
-
-
-END
-



More information about the rott-commits mailing list