Updated graphics engine code

This commit is contained in:
pagefault
2003-03-17 20:38:14 +00:00
parent e6dfe6d652
commit 0de1d941aa
18 changed files with 845 additions and 710 deletions

View File

@@ -2072,5 +2072,4 @@ final1b resb 8
final2a resb 8
final2b resb 8
SECTION .text

View File

@@ -786,7 +786,7 @@ NEWSYM _2xSaISuper2xSaILineW
pop ecx
sub ecx, 4
cmp ecx, 0
jg near .Loop
jg .Loop
; Restore some stuff
popad
@@ -1345,7 +1345,7 @@ NEWSYM _2xSaISuperEagleLineW
pop ecx
sub ecx, 4
cmp ecx, 0
jg near .Loop
jg .Loop
; Restore some stuff
popad
@@ -1954,7 +1954,7 @@ NEWSYM _2xSaILineW
pop ecx
sub ecx, 4
cmp ecx, 0
jg near .Loop
jg .Loop
; Restore some stuff
popad

View File

@@ -1354,21 +1354,23 @@ FALSE dd 0x00000000, 0x00000000
TRUE dd 0xffffffff, 0xffffffff
ONE dd 0x00010001, 0x00010001
ACPixel times 8 db 0
Mask1 times 8 db 0
Mask2 times 8 db 0
I56Pixel times 8 db 0
I23Pixel times 8 db 0
Mask26 times 8 db 0
Mask35 times 8 db 0
Mask26b times 8 db 0
Mask35b times 8 db 0
product1a times 8 db 0
product1b times 8 db 0
product2a times 8 db 0
product2b times 8 db 0
final1a times 8 db 0
final1b times 8 db 0
final2a times 8 db 0
final2b times 8 db 0
SECTION .bss ALIGN = 32
ACPixel resb 8
Mask1 resb 8
Mask2 resb 8
I56Pixel resb 8
I23Pixel resb 8
Mask26 resb 8
Mask35 resb 8
Mask26b resb 8
Mask35b resb 8
product1a resb 8
product1b resb 8
product2a resb 8
product2b resb 8
final1a resb 8
final1b resb 8
final2a resb 8
final2b resb 8

View File

@@ -670,33 +670,34 @@ NEWSYM M716TExtAsmStart
jnz near .offscrtrc
jmp .goon
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dd 0 ; cx location
.cyloc dd 0 ; cy location
SECTION .bss ;ALIGN=32
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resd 1 ; cx location
.cyloc resd 1 ; cy location
SECTION .text
%endmacro
;*******************************************************

View File

@@ -60,11 +60,14 @@ NEWSYM MakeV16BAsmStart
;drawspritesprio
NEWSYM tempstuff, dd 0
SECTION .bss
NEWSYM tempstuff, resd 1
ALIGN16
.stuff dd 0
.stuff2 db 0,0
;ALIGN16
.stuff resd 1
.stuff2 resb 2
SECTION .text
%macro procmode716bextbg 3
xor eax,eax
@@ -886,7 +889,9 @@ NEWSYM setpalall
.noveg2
ret
NEWSYM colleft16b, db 0
SECTION .bss
NEWSYM colleft16b, resb 1
SECTION .text
NEWSYM setpalette16b
cmp byte[gammalevel16b],0
@@ -1858,7 +1863,9 @@ NEWSYM draw8x816b
.nodraw2
ret
NEWSYM tileleft16b, db 0
SECTION .bss
NEWSYM tileleft16b, resb 1
SECTION .text
NEWSYM draw8x816bwinon
mov byte[tileleft16b],33
@@ -2955,8 +2962,10 @@ NEWSYM draw16x1616b
jne near domosaic16b
ret
.yadd dw 0
.yflipadd dw 0
SECTION .bss
.yadd resw 1
.yflipadd resw 1
SECTION .text
draw16x1616bwinon:
mov byte[tileleft16b],33

View File

@@ -989,8 +989,9 @@ NEWSYM drawbackgrndmain16tfix
ALIGN32
NEWSYM transpbuf, times 576+16+288*2 db 0 ; Transparent buffer
SECTION .bss
NEWSYM transpbuf, resb 576+16+288*2 ; Transparent buffer
SECTION .text
NEWSYM drawline16t
cmp byte[bgmode],7
@@ -1397,8 +1398,10 @@ NEWSYM processmode716t2
; Clear Backarea, with 0s
;*******************************************************
NEWSYM prevrgbcol, dd 0
NEWSYM prevrgbpal, dd 0
SECTION .bss
NEWSYM prevrgbcol, resd 1
NEWSYM prevrgbpal, resd 1
SECTION .text
NEWSYM clearback16bts
mov byte[DoTransp],0
@@ -1490,7 +1493,9 @@ NEWSYM clearback16bts
xor eax,eax
ret
mmxtempdat dd 0,0
SECTION .bss
mmxtempdat resd 2
SECTION .text
NEWSYM clearback16bts0b
mov eax,[coladdr]
@@ -1967,7 +1972,9 @@ NEWSYM clearback16bdualrev2
.findraw
ret
NEWSYM DoTransp, db 0
SECTION .bss
NEWSYM DoTransp, resb 1
SECTION .data
;*******************************************************
; Clear Backarea, 16-bit mode w/ transparency
@@ -3185,7 +3192,9 @@ NEWSYM draw8x816ts
ret
ALIGN32
NEWSYM coadder16, dd 0
SECTION .bss
NEWSYM coadder16, resd 1
SECTION .text
NEWSYM draw8x816twinon
mov ebp,transpbuf+32
@@ -4744,8 +4753,10 @@ NEWSYM draw16x1616t
jne near domosaic16b
ret
NEWSYM yadd, dw 0
NEWSYM yflipadd, dw 0
SECTION .bss
NEWSYM yadd, resw 1
NEWSYM yflipadd, resw 1
SECTION .text
NEWSYM draw16x16fulladd
mov byte[tileleft16b],33

View File

@@ -51,8 +51,10 @@ NEWSYM MakeVidAsmStart
;drawspritesprio
NEWSYM bgcoloradder, db 0
NEWSYM res512switch, db 0
SECTION .bss
NEWSYM bgcoloradder, resb 1
NEWSYM res512switch, resb 1
SECTION .text
; mov cl,[bshifter]
;*******************************************************
@@ -175,18 +177,22 @@ NEWSYM res512switch, db 0
call drawmode7extbg2
%endmacro
SECTION .data
NEWSYM MosaicYAdder, dw 0,0,0,1,0,2,1,0,0,4,2,2,3,1,0,7
NEWSYM pwinbgenab, db 0
NEWSYM pwinbgtype, dd 0
NEWSYM winonbtype, db 0
NEWSYM dualwinbg, db 0
NEWSYM pwinspenab, db 0
NEWSYM pwinsptype, dd 0
NEWSYM winonstype, db 0
NEWSYM dualwinsp, db 0
NEWSYM cwinptr, dd winbgdata
NEWSYM dwinptrproc, dd 0
SECTION .bss
NEWSYM pwinbgenab, resb 1
NEWSYM pwinbgtype, resd 1
NEWSYM winonbtype, resb 1
NEWSYM dualwinbg, resb 1
NEWSYM pwinspenab, resb 1
NEWSYM pwinsptype, resd 1
NEWSYM winonstype, resb 1
NEWSYM dualwinsp, resb 1
NEWSYM dwinptrproc, resd 1
SECTION .text
; is this macro even used?
%macro ClearWindowData 0
@@ -731,11 +737,13 @@ NEWSYM dualwinxnor
jnz .loopxor2
ret
SECTION .bss
;pwinspenab db 0
;pwinsptype dd 0
;winonstype db 0
;dualwinsp db 0
NEWSYM winonsp, db 0
NEWSYM winonsp, resb 1
SECTION .text
NEWSYM makewindowsp
mov al,[winobjen]
@@ -890,11 +898,13 @@ NEWSYM makedualwinsp
jmp dualstartprocess
; window logic data
NEWSYM windowdata, times 16 db 0
NEWSYM numwin, db 0
NEWSYM multiwin, db 0
NEWSYM multiclip, db 0
NEWSYM multitype, db 0
SECTION .bss
NEWSYM windowdata, resb 16
NEWSYM numwin, resb 1
NEWSYM multiwin, resb 1
NEWSYM multiclip, resb 1
NEWSYM multitype, resb 1
SECTION .text
; jmp .finishwin
%macro procwindow 1
@@ -1069,7 +1079,9 @@ NEWSYM procspritesmain
.nosprites
ret
NEWSYM curbgnum, db 0
SECTION .bss
NEWSYM curbgnum, resb 1
SECTION .text
NEWSYM drawbackgrndsub
mov esi,[colormodeofs]
@@ -1294,39 +1306,41 @@ NEWSYM procbackgrnd
.noback
ret
NEWSYM nextprimode, db 0
NEWSYM cursprloc, dd 0
NEWSYM curcolor, db 0
NEWSYM curtileptr, dw 0
SECTION .bss
NEWSYM nextprimode, resb 1
NEWSYM cursprloc, resd 1
NEWSYM curcolor, resb 1
NEWSYM curtileptr, resw 1
; esi = pointer to video buffer
; edi = pointer to tile data
; ebx = cached memory
; al = current x position
NEWSYM bg1vbufloc, dd 0
NEWSYM bg2vbufloc, dd 0
NEWSYM bg3vbufloc, dd 0
NEWSYM bg4vbufloc, dd 0
NEWSYM bg1tdatloc, dd 0
NEWSYM bg2tdatloc, dd 0
NEWSYM bg3tdatloc, dd 0
NEWSYM bg4tdatloc, dd 0
NEWSYM bg1tdabloc, dd 0
NEWSYM bg2tdabloc, dd 0
NEWSYM bg3tdabloc, dd 0
NEWSYM bg4tdabloc, dd 0
NEWSYM bg1cachloc, dd 0
NEWSYM bg2cachloc, dd 0
NEWSYM bg3cachloc, dd 0
NEWSYM bg4cachloc, dd 0
NEWSYM bg1yaddval, dd 0
NEWSYM bg2yaddval, dd 0
NEWSYM bg3yaddval, dd 0
NEWSYM bg4yaddval, dd 0
NEWSYM bg1xposloc, dd 0
NEWSYM bg2xposloc, dd 0
NEWSYM bg3xposloc, dd 0
NEWSYM bg4xposloc, dd 0
NEWSYM alreadydrawn, db 0
NEWSYM bg1vbufloc, resd 1
NEWSYM bg2vbufloc, resd 1
NEWSYM bg3vbufloc, resd 1
NEWSYM bg4vbufloc, resd 1
NEWSYM bg1tdatloc, resd 1
NEWSYM bg2tdatloc, resd 1
NEWSYM bg3tdatloc, resd 1
NEWSYM bg4tdatloc, resd 1
NEWSYM bg1tdabloc, resd 1
NEWSYM bg2tdabloc, resd 1
NEWSYM bg3tdabloc, resd 1
NEWSYM bg4tdabloc, resd 1
NEWSYM bg1cachloc, resd 1
NEWSYM bg2cachloc, resd 1
NEWSYM bg3cachloc, resd 1
NEWSYM bg4cachloc, resd 1
NEWSYM bg1yaddval, resd 1
NEWSYM bg2yaddval, resd 1
NEWSYM bg3yaddval, resd 1
NEWSYM bg4yaddval, resd 1
NEWSYM bg1xposloc, resd 1
NEWSYM bg2xposloc, resd 1
NEWSYM bg3xposloc, resd 1
NEWSYM bg4xposloc, resd 1
NEWSYM alreadydrawn, resb 1
SECTION .text
NEWSYM fillwithnothing
push edi
@@ -1340,8 +1354,11 @@ NEWSYM fillwithnothing
pop edi
ret
NEWSYM bg3draw, db 0
NEWSYM maxbr, db 0
SECTION .bss
NEWSYM bg3draw, resb 1
NEWSYM maxbr, resb 1
SECTION .text
NEWSYM blanker
; calculate current video offset
push ebx
@@ -1365,9 +1382,11 @@ NEWSYM blanker
ret
ALIGN32
NEWSYM bg3high2, dd 0
NEWSYM newengen, dd 0
NEWSYM cwinenabm, dd 0
SECTION .bss
NEWSYM bg3high2, resd 1
NEWSYM newengen, resd 1
NEWSYM cwinenabm, resd 1
SECTION .text
NEWSYM drawline
mov al,[winenabs]
@@ -1678,10 +1697,12 @@ NEWSYM priority2
ret
ALIGN32
NEWSYM tempbuffer, times 33 dd 0
NEWSYM currentobjptr, dd 0
NEWSYM curmosaicsz, dd 0
NEWSYM extbgdone, db 0
SECTION .bss
NEWSYM tempbuffer, resd 33
NEWSYM currentobjptr, resd 1
NEWSYM curmosaicsz, resd 1
NEWSYM extbgdone, resb 1
SECTION .text
NEWSYM processmode7
@@ -2415,9 +2436,11 @@ NEWSYM drawspritespriowinon
jnz near .loopobj2
ret
SECTION .data
NEWSYM prfixobjl, db 0
NEWSYM csprbit, db 1
NEWSYM csprprlft, db 0
SECTION .text
;*******************************************************
; Processes & Draws 8x8 tiles in 2, 4, & 8 bit mode
;*******************************************************
@@ -2626,8 +2649,10 @@ NEWSYM proc16x8
; al = current x position
ret
NEWSYM drawn, db 0
NEWSYM curbgpr, db 0 ; 00h = low priority, 20h = high priority
SECTION .bss
NEWSYM drawn, resb 1
NEWSYM curbgpr, resb 1 ; 00h = low priority, 20h = high priority
SECTION .text
%macro drawpixel8b8x8 3
or %1,%1
@@ -2647,7 +2672,9 @@ NEWSYM curbgpr, db 0 ; 00h = low priority, 20h = high priority
%2
%endmacro
NEWSYM winptrref, dd 0
SECTION .bss
NEWSYM winptrref, resd 1
SECTION .text
NEWSYM draw8x8
cmp byte[osm2dis],1
@@ -2917,8 +2944,10 @@ NEWSYM draw8x8winon
jnz near .loopa
ret
NEWSYM alttile, db 0
NEWSYM hirestiledat, times 256 db 0
SECTION .bss
NEWSYM alttile, resb 1
NEWSYM hirestiledat, resb 256
SECTION .text
NEWSYM draw16x8
push eax
@@ -3498,7 +3527,9 @@ NEWSYM draw16x8bwinon
jnz near .loopa
ret
SECTION .data
NEWSYM extraleft, db 0,0,0,1,0,1,2,2,0,2,3,1,2,4,2,1
SECTION .text
NEWSYM domosaic
mov esi,xtravbuf+16
@@ -3645,20 +3676,22 @@ NEWSYM dowindow
ALIGN32
NEWSYM yadder, dd 0
NEWSYM yrevadder, dd 0
NEWSYM tempcach, dd 0 ; points to cached memory
NEWSYM temptile, dd 0 ; points to the secondary video pointer
NEWSYM bgptr, dd 0
NEWSYM bgptrb, dd 0
NEWSYM bgptrc, dd 0
NEWSYM bgptrd, dd 0
NEWSYM bgptrx1, dd 0
NEWSYM bgptrx2, dd 0
NEWSYM curvidoffset, dd 0
NEWSYM winon, dd 0
NEWSYM bgofwptr, dd 0
NEWSYM bgsubby, dd 0
SECTION .bss
NEWSYM yadder, resd 1
NEWSYM yrevadder, resd 1
NEWSYM tempcach, resd 1 ; points to cached memory
NEWSYM temptile, resd 1 ; points to the secondary video pointer
NEWSYM bgptr, resd 1
NEWSYM bgptrb, resd 1
NEWSYM bgptrc, resd 1
NEWSYM bgptrd, resd 1
NEWSYM bgptrx1, resd 1
NEWSYM bgptrx2, resd 1
NEWSYM curvidoffset, resd 1
NEWSYM winon, resd 1
NEWSYM bgofwptr, resd 1
NEWSYM bgsubby, resd 1
SECTION .text
NEWSYM draw8x8offset
@@ -3915,21 +3948,23 @@ NEWSYM draw8x8winonoffset
ALIGN32
NEWSYM offsetmodeptr, dd 0
NEWSYM offsetptra, dd 0
NEWSYM offsetptrb, dd 0
NEWSYM prevtempcache, dd 0
NEWSYM prevoffsetdat, dd 0
NEWSYM offsetenab, dd 0
NEWSYM offsettilel, dd 0
NEWSYM offsetrevval, dd 0
NEWSYM posyscroll, dd 0
NEWSYM offsetmcol, dd 0
NEWSYM offsetmshl, dd 0
NEWSYM offsetmptr, dd 0
NEWSYM offsetmtst, dd 0
NEWSYM offsetmclr, dd 0
NEWSYM offsetcedi, dd 0
SECTION .bss
NEWSYM offsetmodeptr, resd 1
NEWSYM offsetptra, resd 1
NEWSYM offsetptrb, resd 1
NEWSYM prevtempcache, resd 1
NEWSYM prevoffsetdat, resd 1
NEWSYM offsetenab, resd 1
NEWSYM offsettilel, resd 1
NEWSYM offsetrevval, resd 1
NEWSYM posyscroll, resd 1
NEWSYM offsetmcol, resd 1
NEWSYM offsetmshl, resd 1
NEWSYM offsetmptr, resd 1
NEWSYM offsetmtst, resd 1
NEWSYM offsetmclr, resd 1
NEWSYM offsetcedi, resd 1
SECTION .text
;*******************************************************
; Processes & Draws 16x16 tiles in 2, 4, & 8 bit mode
@@ -4238,8 +4273,10 @@ NEWSYM draw16x16
jne near domosaic
ret
.yadd dw 0
.yflipadd dw 0
SECTION .bss
.yadd resw 1
.yflipadd resw 1
SECTION .text
NEWSYM draw16x16winon
.domosaic
@@ -4379,10 +4416,12 @@ NEWSYM draw16x16winon
jnz near .loopa
ret
NEWSYM temp, db 0
NEWSYM bshifter, db 0
NEWSYM a16x16xinc, db 0
NEWSYM a16x16yinc, db 0
SECTION .bss
NEWSYM temp, resb 1
NEWSYM bshifter, resb 1
NEWSYM a16x16xinc, resb 1
NEWSYM a16x16yinc, resb 1
SECTION .text
NEWSYM MakeVidAsmEnd

View File

@@ -143,37 +143,39 @@ NEWSYM drawmode7
Mode7ProcessB Mode7Normal, domosaic, 1
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw
@@ -264,37 +266,39 @@ NEWSYM drawmode7win
Mode7ProcessB Mode7Normal, domosaicng, 1
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw
@@ -383,37 +387,39 @@ NEWSYM drawmode7winB
Mode7ProcessB Mode7Normal, domosaic, 1
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw
@@ -506,38 +512,40 @@ NEWSYM drawmode7winhr
Mode7ProcessBhr Mode7Normal, domosaicng, 1
ALIGN32
.temp dd 0 ; for byte move left
.temp2 dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.temp2 resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
NEWSYM drawmode7winBhr
ProcessBuildWindow 0
@@ -611,48 +619,50 @@ NEWSYM drawmode7winBhr
Mode7ProcessBhr Mode7Normal, domosaic, 1
ALIGN32
.temp dd 0 ; for byte move left
.temp2 dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.temp2 resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
ALIGN32
NEWSYM ngwleft, dd 0 ; for byte move left
NEWSYM ngwleftb, dd 0 ; for byte move left
NEWSYM mode7xpos, dd 0,0 ; x position
NEWSYM mode7ypos, dd 0,0 ; x position
NEWSYM mode7xrpos, dd 0,0 ; x position, relative
NEWSYM mode7yrpos, dd 0,0 ; y position, relative
NEWSYM mode7xadder, dd 0,0 ; number to add for x
NEWSYM mode7yadder, dd 0,0 ; number to add for y
;ALIGN32
NEWSYM ngwleft, resd 1 ; for byte move left
NEWSYM ngwleftb, resd 1 ; for byte move left
NEWSYM mode7xpos, resd 2 ; x position
NEWSYM mode7ypos, resd 2 ; x position
NEWSYM mode7xrpos, resd 2 ; x position, relative
NEWSYM mode7yrpos, resd 2 ; y position, relative
NEWSYM mode7xadder, resd 2 ; number to add for x
NEWSYM mode7yadder, resd 2 ; number to add for y
SECTION .text
NEWSYM ProcessMode7ngwin
mov ecx,[ngcwinptr]

View File

@@ -552,45 +552,47 @@ drawmode7ngextbg216bsnt:
ExtBG2 ExtBGNormalsnt
ALIGN32
mtemp dd 0 ; for byte move left
mmode7xpos dd 0 ; x position
mtempa2 dd 0 ; keep this blank!
mmode7xrpos dd 0 ; x position
mtempa dd 0 ; keep this blank!
mmode7ypos dd 0 ; y position
mtempb2 dd 0 ; keep this blank!
mmode7yrpos dd 0 ; y position
mtempb dd 0 ; keep this blank!
mmode7xadder dd 0 ; number to add for x
mtempc2 dd 0 ; keep this blank!
mmode7xadd2 dd 0 ; number to add for x
mtempc dd 0 ; keep this blank!
mmode7yadder dd 0 ; number to add for y
mtempd2 dd 0 ; keep this blank!
mmode7yadd2 dd 0 ; number to add for y
mtempd dd 0 ; keep this blank!
mmode7ptr dd 0 ; pointer value
mmode7xinc dd 0 ; number to add for x
mmode7xincc dd 0 ; range check for x
mmode7yinc dd 0 ; number to add for y
mmode7xsloc dd 0 ; which screen x
mmode7ysloc dd 0 ; which screen y
mmode7xsrl dd 0 ; which relative screen x
mmode7ysrl dd 0 ; which relative screen y
mcxloc dw 0 ; cx location
mcyloc dw 0 ; cy location
M7HROn dd 0 ; High Resolution On
switchtorep3 dd 0
SECTION .bss
mtemp resd 1 ; for byte move left
mmode7xpos resd 1 ; x position
mtempa2 resd 1 ; keep this blank!
mmode7xrpos resd 1 ; x position
mtempa resd 1 ; keep this blank!
mmode7ypos resd 1 ; y position
mtempb2 resd 1 ; keep this blank!
mmode7yrpos resd 1 ; y position
mtempb resd 1 ; keep this blank!
mmode7xadder resd 1 ; number to add for x
mtempc2 resd 1 ; keep this blank!
mmode7xadd2 resd 1 ; number to add for x
mtempc resd 1 ; keep this blank!
mmode7yadder resd 1 ; number to add for y
mtempd2 resd 1 ; keep this blank!
mmode7yadd2 resd 1 ; number to add for y
mtempd resd 1 ; keep this blank!
mmode7ptr resd 1 ; pointer value
mmode7xinc resd 1 ; number to add for x
mmode7xincc resd 1 ; range check for x
mmode7yinc resd 1 ; number to add for y
mmode7xsloc resd 1 ; which screen x
mmode7ysloc resd 1 ; which screen y
mmode7xsrl resd 1 ; which relative screen x
mmode7ysrl resd 1 ; which relative screen y
mcxloc resw 1 ; cx location
mcyloc resw 1 ; cy location
M7HROn resd 1 ; High Resolution On
switchtorep3 resd 1
m7xaddof dd 0
m7xaddof2 dd 0
m7yaddof dd 0
m7yaddof2 dd 0
pixelsleft dd 0
mm7xaddof dd 0
mm7xaddof2 dd 0
mm7yaddof dd 0
mm7yaddof2 dd 0
m7xaddof resd 1
m7xaddof2 resd 1
m7yaddof resd 1
m7yaddof2 resd 1
pixelsleft resd 1
mm7xaddof resd 1
mm7xaddof2 resd 1
mm7yaddof resd 1
mm7yaddof2 resd 1
SECTION .text
%macro newvaluepred 2
mov dx,word[%1+ebx*4+8]

View File

@@ -139,37 +139,39 @@ NEWSYM drawmode716b
Mode7ProcessB Mode7Normal, domosaic16b, 2
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw

View File

@@ -96,7 +96,9 @@ NEWSYM Gendcolortable
;*******************************************************
; Processes & Draws Mode 7
;*******************************************************
NEWSYM prevbrightdc, db 0
SECTION .bss
NEWSYM prevbrightdc, resb 1
SECTION .text
NEWSYM drawmode7dcolor
mov bl,[vidbright]
cmp bl,[prevbrightdc]
@@ -183,37 +185,39 @@ NEWSYM drawmode7dcolor
Mode7ProcessB Mode7Normal, domosaic16b, 2
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw

View File

@@ -592,33 +592,35 @@ NEWSYM drawmode716extbg
jmp .goon
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dd 0 ; cx location
.cyloc dd 0 ; cy location
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resd 1 ; cx location
.cyloc resd 1 ; cy location
SECTION .text
NEWSYM drawmode716bwinonextbg
@@ -1165,33 +1167,35 @@ NEWSYM drawmode716bwinonextbg
jmp .goon
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dd 0 ; cx location
.cyloc dd 0 ; cy location
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resd 1 ; cx location
.cyloc resd 1 ; cy location
SECTION .text
NEWSYM drawmode716extbg2
mov esi,[cwinptr]

View File

@@ -262,37 +262,39 @@ NEWSYM Mode716TAsmStart
Mode7ProcessB %1, domosaic16b, 2
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win
.domosaicw
@@ -361,6 +363,8 @@ NEWSYM drawmode716tb
mov [cwinptr2],esi
mode716tmacro mode7mainsub,mode7mainsubwinon
cwinptr2 dd 0
SECTION .bss ;ALIGN=32
cwinptr2 resd 1
SECTION .text
NEWSYM Mode716TAsmEnd

View File

@@ -620,33 +620,35 @@ NEWSYM drawmode7extbg
jmp .goon
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
SECTION .text
.drawmode7win
.domosaicw
@@ -1241,37 +1243,39 @@ NEWSYM drawmode7ngextbg
ret
ALIGN32
.temp dd 0 ; for byte move left
.mode7xpos dd 0 ; x position
.tempa2 dd 0 ; keep this blank!
.mode7xrpos dd 0 ; x position
.tempa dd 0 ; keep this blank!
.mode7ypos dd 0 ; y position
.tempb2 dd 0 ; keep this blank!
.mode7yrpos dd 0 ; y position
.tempb dd 0 ; keep this blank!
.mode7xadder dd 0 ; number to add for x
.tempc2 dd 0 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x
.tempc dd 0 ; keep this blank!
.mode7yadder dd 0 ; number to add for y
.tempd2 dd 0 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y
.tempd dd 0 ; keep this blank!
.mode7ptr dd 0 ; pointer value
.mode7xinc dd 0 ; number to add for x
.mode7xincc dd 0 ; range check for x
.mode7yinc dd 0 ; number to add for y
.mode7xsloc dd 0 ; which screen x
.mode7ysloc dd 0 ; which screen y
.mode7xsrl dd 0 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y
.cxloc dw 0 ; cx location
.cyloc dw 0 ; cy location
.m7xaddofa dd 0
.m7xaddof2a dd 0
.m7yaddofa dd 0
.m7yaddof2a dd 0
SECTION .bss
.temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank!
.mode7xrpos resd 1 ; x position
.tempa resd 1 ; keep this blank!
.mode7ypos resd 1 ; y position
.tempb2 resd 1 ; keep this blank!
.mode7yrpos resd 1 ; y position
.tempb resd 1 ; keep this blank!
.mode7xadder resd 1 ; number to add for x
.tempc2 resd 1 ; keep this blank!
.mode7xadd2 resd 1 ; number to add for x
.tempc resd 1 ; keep this blank!
.mode7yadder resd 1 ; number to add for y
.tempd2 resd 1 ; keep this blank!
.mode7yadd2 resd 1 ; number to add for y
.tempd resd 1 ; keep this blank!
.mode7ptr resd 1 ; pointer value
.mode7xinc resd 1 ; number to add for x
.mode7xincc resd 1 ; range check for x
.mode7yinc resd 1 ; number to add for y
.mode7xsloc resd 1 ; which screen x
.mode7ysloc resd 1 ; which screen y
.mode7xsrl resd 1 ; which relative screen x
.mode7ysrl resd 1 ; which relative screen y
.cxloc resw 1 ; cx location
.cyloc resw 1 ; cy location
.m7xaddofa resd 1
.m7xaddof2a resd 1
.m7yaddofa resd 1
.m7yaddof2a resd 1
SECTION .text
.drawmode7win

View File

@@ -77,6 +77,7 @@ NEWSYM NewG162AsmStart
add ecx,[%2]
mov edi,ecx
mov ecx,8
.loop
cacheloopstuff 0
cacheloopstuff 1
@@ -196,6 +197,7 @@ cache8b16b:
%macro drawtile16b 10
mov byte[tleftn],33
%%loop
mov cx,[vrama+eax]
xor ecx,[ng16bprval]

View File

@@ -890,58 +890,74 @@ NEWSYM BuildWindow
pop edx
ret
SECTION .data ;ALIGN=32
NEWSYM firstdrawn, db 0
ALIGN32
NEWSYM bgusedng
dd 01010101h,00010101h,00000101h,00000101h,00000101h,00000101h
dd 00000001h,00000001h
NEWSYM bgcmsung, dd 0
NEWSYM modeused, dd 0,0
NEWSYM reslbyl, dd 0
NEWSYM sprprdrn, dd 0
NEWSYM csprival, dd 0
NEWSYM pesimpng2, dd 0
NEWSYM cfieldad, dd 0
NEWSYM ignor512, dd 0
NEWSYM ofsmcptr, dd 0
NEWSYM ofsmtptr, dd 0
NEWSYM ofsmmptr, dd 0
NEWSYM ofsmcyps, dd 0
NEWSYM ofsmady, dd 0
NEWSYM ofsmadx, dd 0
NEWSYM mosoldtab, times 15 dd 0
SECTION .bss ;ALIGN=32
NEWSYM bgcmsung, resd 1
NEWSYM modeused, resd 2
NEWSYM reslbyl, resd 1
NEWSYM sprprdrn, resd 1
NEWSYM csprival, resd 1
NEWSYM pesimpng2, resd 1
NEWSYM cfieldad, resd 1
NEWSYM ignor512, resd 1
NEWSYM ofsmcptr, resd 1
NEWSYM ofsmtptr, resd 1
NEWSYM ofsmmptr, resd 1
NEWSYM ofsmcyps, resd 1
NEWSYM ofsmady, resd 1
NEWSYM ofsmadx, resd 1
NEWSYM mosoldtab, resd 15
SECTION .data ;ALIGN=32
NEWSYM ngwintable, times 16 dd 0EE00h
NEWSYM ngwintableb, times 16 dd 0EE00h
NEWSYM ngwintablec, times 16 dd 0EE00h
NEWSYM ngwintabled, times 16 dd 0EE00h
NEWSYM valtemp, dd 0EE00h, 0EE00h
NEWSYM ngwinen, dd 0
NEWSYM ngcwinptr, dd ngwintable
NEWSYM ngcwinmode, dd 0
NEWSYM ngcpixleft, dd 0
NEWSYM Mode7BackA, dd 0
NEWSYM Mode7BackC, dd 0
NEWSYM Mode7BackX0, dd 0
NEWSYM Mode7BackSet, dd 0
NEWSYM ngextbg, dd 0
NEWSYM cbgval, dd 0
NEWSYM ofsmval, dd 0
NEWSYM ofsmvalh, dd 0
SECTION .bss ;ALIGN=32
NEWSYM ngwinen, resd 1
NEWSYM ngcwinmode, resd 1
NEWSYM ngcpixleft, resd 1
NEWSYM Mode7BackA, resd 1
NEWSYM Mode7BackC, resd 1
NEWSYM Mode7BackX0, resd 1
NEWSYM Mode7BackSet, resd 1
NEWSYM ngextbg, resd 1
NEWSYM cbgval, resd 1
NEWSYM ofsmval, resd 1
NEWSYM ofsmvalh, resd 1
SECTION .data ;ALIGN=32
NEWSYM pwinen, dd 0FFFFh
NEWSYM pngwinen, dd 0FFFFh
NEWSYM pwinbound, dd 0
NEWSYM WinPtrAPos, dd 0
NEWSYM WinPtrBPos, dd 0
SECTION .bss ;ALIGN=32
NEWSYM pwinbound, resd 1
NEWSYM WinPtrAPos, resd 1
NEWSYM WinPtrBPos, resd 1
SECTION .data ;ALIGN=32
NEWSYM OrLogicTable, db 0,1,1,0
NEWSYM AndLogicTable, db 0,0,1,0
NEWSYM XorLogicTable, db 0,1,0,0
NEWSYM XNorLogicTable, db 1,0,1,0
NEWSYM nglogicval, dd 0
NEWSYM pnglogicval, dd 0
NEWSYM mosjmptab, times 15 dd 0
NEWSYM Mode7HiRes, dd 0
NEWSYM pesimpng, dd 0
NEWSYM bgtxadd2, dd 0
SECTION .bss ;ALIGN=32
NEWSYM nglogicval, resd 1
NEWSYM pnglogicval, resd 1
NEWSYM mosjmptab, resd 15
NEWSYM Mode7HiRes, resd 1
NEWSYM pesimpng, resd 1
NEWSYM bgtxadd2, resd 1
SECTION .text
NEWSYM StartDrawNewGfx
mov byte[WindowRedraw],1
@@ -1712,31 +1728,32 @@ NEWSYM drawbg4linepr1
drawbglinengpr1 3,1
ALIGN32
NEWSYM bgtxadd, dd 0
NEWSYM bgcyval, dd 0
NEWSYM bgcxval, dd 0
NEWSYM tleftn, dd 0
NEWSYM tleftnb, dd 0
NEWSYM bg1totng, dd 0
NEWSYM bg2totng, dd 0
NEWSYM bg3totng, dd 0
NEWSYM bg4totng, dd 0
NEWSYM bg1drwng, dd 0
NEWSYM bg2drwng, dd 0
NEWSYM bg3drwng, dd 0
NEWSYM bg4drwng, dd 0
NEWSYM sprcurng, dd 0
NEWSYM scfbl, dd 0
NEWSYM mode0ads, dd 0
NEWSYM mode0add, dd 0
NEWSYM taddnfy16x16, dd 0
NEWSYM taddfy16x16, dd 0
NEWSYM switch16x16, dd 0
NEWSYM yposng, dd 0
NEWSYM flipyposng, dd 0
NEWSYM yposngom, dd 0
NEWSYM flipyposngom, dd 0
SECTION .bss ;ALIGN=32
NEWSYM bgtxadd, resd 1
NEWSYM bgcyval, resd 1
NEWSYM bgcxval, resd 1
NEWSYM tleftn, resd 1
NEWSYM tleftnb, resd 1
NEWSYM bg1totng, resd 1
NEWSYM bg2totng, resd 1
NEWSYM bg3totng, resd 1
NEWSYM bg4totng, resd 1
NEWSYM bg1drwng, resd 1
NEWSYM bg2drwng, resd 1
NEWSYM bg3drwng, resd 1
NEWSYM bg4drwng, resd 1
NEWSYM sprcurng, resd 1
NEWSYM scfbl, resd 1
NEWSYM mode0ads, resd 1
NEWSYM mode0add, resd 1
NEWSYM taddnfy16x16, resd 1
NEWSYM taddfy16x16, resd 1
NEWSYM switch16x16, resd 1
NEWSYM yposng, resd 1
NEWSYM flipyposng, resd 1
NEWSYM yposngom, resd 1
NEWSYM flipyposngom, resd 1
SECTION .text
NEWSYM drawsprng
cmp byte[winbg1enval+ebx+4*256],0
@@ -2012,7 +2029,9 @@ NEWSYM drawsprngm7h
pop esi
ret
NEWSYM NGNumSpr, db 0
SECTION .bss
NEWSYM NGNumSpr, resb 1
SECTION .text
; cmp byte[winbg1enval+eax+4*256],0
; je near .skipobjw
@@ -2342,8 +2361,9 @@ NEWSYM preparesprpr
mov dword[sprsingle],1
ret
ALIGN32
NEWSYM sprclprio, dd 0
NEWSYM sprsingle, dd 0
SECTION .bss ;ALIGN=32
NEWSYM sprclprio, resd 1
NEWSYM sprsingle, resd 1
SECTION .text
NEWSYM NewGfxAsmEnd

View File

@@ -274,7 +274,9 @@ NEWSYM setpalette16bng
.noveg2
ret
section .data
prevpal2 times 256 dw 0F00Fh
section .text
%macro WinBGCheck 1
mov bl,[winbg1en+%1]
@@ -427,10 +429,12 @@ prevpal2 times 256 dw 0F00Fh
mov [winbg1enval+eax+%1*256],bl
%endmacro
BackAreaAdd dd 0
BackAreaUnFillCol dd 0
BackAreaFillCol dd 0
clinemainsub dd 0
section .bss
BackAreaAdd resd 1
BackAreaUnFillCol resd 1
BackAreaFillCol resd 1
clinemainsub resd 1
section .text
BackAreaFill:
cmp byte[winbg1enval+eax+5*256],0
@@ -1331,45 +1335,47 @@ NEWSYM newengine16b
xor ebx,ebx
ret
ALIGN32
NEWSYM ngwinenval, dd 0
NEWSYM cdrawbuffer, dd 0
NEWSYM draw16bnng, dd 0
NEWSYM scaddsngb, dd 0
NEWSYM scaddtngb, dd 0
NEWSYM scaddtngbx, dd 0
NEWSYM prevbcolng, dd 0
NEWSYM bcolvalng, dd 0
NEWSYM cebppos, dd 0
NEWSYM subscreenonng, dd 0
NEWSYM cdrawmeth, dd 0
NEWSYM cpalptrng, dd 0
NEWSYM prevcoladdrng, dd 0
NEWSYM prevcolvalng, dd 0
NEWSYM cbackofsaddr, dd 0
NEWSYM cbackofsaddrs, dd 0
NEWSYM cbackofsaddrm, dd 0
NEWSYM subscrng, dd 0
NEWSYM ngmsdraw, dd 0
NEWSYM CMainWinScr, dd 0
NEWSYM CSubWinScr, dd 0
NEWSYM Prevcoladdr, dd 0
NEWSYM ColResult, dd 0
NEWSYM CPalPtrng, dd 0
NEWSYM WindowRedraw, dd 0
NEWSYM mostranspval, dd 0
NEWSYM mosclineval, dd 0
NEWSYM startlinet, dd 0
NEWSYM endlinet, dd 0
NEWSYM palchanged, dd 0
section .bss
alignb 32
NEWSYM ngwinenval, resd 1
NEWSYM cdrawbuffer, resd 1
NEWSYM draw16bnng, resd 1
NEWSYM scaddsngb, resd 1
NEWSYM scaddtngb, resd 1
NEWSYM scaddtngbx, resd 1
NEWSYM prevbcolng, resd 1
NEWSYM bcolvalng, resd 1
NEWSYM cebppos, resd 1
NEWSYM subscreenonng, resd 1
NEWSYM cdrawmeth, resd 1
NEWSYM cpalptrng, resd 1
NEWSYM prevcoladdrng, resd 1
NEWSYM prevcolvalng, resd 1
NEWSYM cbackofsaddr, resd 1
NEWSYM cbackofsaddrs, resd 1
NEWSYM cbackofsaddrm, resd 1
NEWSYM subscrng, resd 1
NEWSYM ngmsdraw, resd 1
NEWSYM CMainWinScr, resd 1
NEWSYM CSubWinScr, resd 1
NEWSYM Prevcoladdr, resd 1
NEWSYM ColResult, resd 1
NEWSYM CPalPtrng, resd 1
NEWSYM WindowRedraw, resd 1
NEWSYM mostranspval, resd 1
NEWSYM mosclineval, resd 1
NEWSYM startlinet, resd 1
NEWSYM endlinet, resd 1
NEWSYM palchanged, resd 1
NEWSYM ng16bbgval, dd 0 ; bg # (mov dword[ng16bbgval],%1)
NEWSYM ng16bprval, dd 0 ; 0 = pr0, 2000h = pr1
NEWSYM ng16bbgval, resd 1 ; bg # (mov dword[ng16bbgval],%1)
NEWSYM ng16bprval, resd 1 ; 0 = pr0, 2000h = pr1
NEWSYM mosjmptab16b, times 15 dd 0
NEWSYM mosjmptab16bt, times 15 dd 0
NEWSYM mosjmptab16btms, times 15 dd 0
NEWSYM mosjmptab16bntms, times 15 dd 0
NEWSYM mosjmptab16b, resd 15
NEWSYM mosjmptab16bt, resd 15
NEWSYM mosjmptab16btms, resd 15
NEWSYM mosjmptab16bntms, resd 15
section .text
NEWSYM StartDrawNewGfx16b
push edx
@@ -3027,6 +3033,8 @@ ProcessTransparencies:
dec ecx
jnz .prochalfadd
jmp .faddloopdoneh
.procfulladdnext:
movq [esi-8],mm0
.procfulladd
mov ebx,[esi]
and ebx,eax
@@ -3048,35 +3056,37 @@ ProcessTransparencies:
movq mm0,[esi]
movq mm1,[esi+75036*2]
pand mm0,[UnusedBitXor]
movq mm2,mm0
movq mm4,mm1
movq mm3,mm0
movq mm2,mm0
%if %1>0
psllw mm0,%1
psllw mm1,%1
movq mm3,mm2
%else
movq mm3,mm0
%endif
psllw mm2,%2
paddusw mm0,mm1
pand mm0,[FullBitAnd]
movq mm1,mm4
psllw mm4,%2
add esi,byte 8
%if %1>0
psrlw mm0,%1
%endif
psllw mm2,%2
psllw mm1,%2
paddusw mm2,mm1
pand mm2,[FullBitAnd]
psrlw mm2,%2
paddusw mm2,mm4
psllw mm3,%3
psllw mm4,%3
paddusw mm3,mm4
pand mm2,[FullBitAnd]
psllw mm1,%3
psrlw mm2,%2
paddusw mm3,mm1
por mm0,mm2
pand mm3,[FullBitAnd]
psrlw mm3,%3
por mm0,mm3
por mm0,mm2
movq [esi],mm0
add esi,8
dec ecx
jnz near .procfulladd
jnz near .procfulladdnext
movq [esi],mm0
jmp .faddloopdoneh
.faddlooph
mov ebx,dword[esi]
@@ -3252,56 +3262,62 @@ ProcessTransparencies:
.faddl2
test dword[esi],eax
jnz .faddloopb
.faddl2_2
test dword[esi+4],eax
jnz .faddloopb
add esi,8
dec ecx
jnz .faddl2
jmp .faddloopdone
.faddloopnext
movq [esi-8],mm0
.faddloop
test dword[esi],eax
jz .faddl2
jz .faddl2_2
.faddloopb
movq mm0,[esi]
movq mm1,[esi+75036*2]
movq mm6,mm0
pand mm0,[UnusedBitXor]
movq mm2,mm0
movq mm4,mm1
movq mm3,mm0
movq mm5,mm0
movq mm2,mm0
%if %1>0
psllw mm0,%1
psllw mm1,%1
movq mm3,mm2
movq mm5,mm2
%else
movq mm3,mm0
movq mm5,mm0
%endif
paddusw mm0,mm1
pand mm0,[FullBitAnd]
psllw mm2,%2
movq mm1,mm4
psllw mm4,%2
paddusw mm2,mm4
psllw mm3,%3
pand mm2,[FullBitAnd]
psllw mm1,%3
psrlw mm2,%2
paddusw mm3,mm1
pand mm3,[FullBitAnd]
%if %1>0
psrlw mm0,%1
%endif
psllw mm2,%2
psllw mm1,%2
paddusw mm2,mm1
pand mm2,[FullBitAnd]
psrlw mm2,%2
psllw mm3,%3
psllw mm4,%3
paddusw mm3,mm4
pand mm3,[FullBitAnd]
psrlw mm3,%3
por mm0,mm3
por mm0,mm2
pand mm6,[UnusedBit]
por mm0,mm2
pcmpeqw mm6,[UnusedBit]
por mm0,mm3
pand mm0,mm6
pxor mm6,[UnusedBitXor]
pand mm5,mm6
add esi,byte 8
por mm0,mm5
movq [esi],mm0
add esi,8
dec ecx
jnz near .faddloop
jnz near .faddloopnext
movq [esi-8],mm0
.faddloopdone
pop esi
pop ebx
@@ -3438,6 +3454,7 @@ ProcessTransparenciesMMXargb
; PSRLW - Shirt Right, Logical
; POR
section .data
ALIGN32
NEWSYM UnusedBit, dd 00000000001000000000000000100000b,00000000001000000000000000100000b
NEWSYM HalfTrans, dd 11110111110111101111011111011110b,11110111110111101111011111011110b,0,0
@@ -3450,6 +3467,7 @@ NEWSYM FullBitAnd, dd 0F800F800h,0F800F800h
NEWSYM HalfTransB, dd 00001000010000010000100001000001b,00001000010000010000100001000001b
NEWSYM HalfTransC, dd 11110111100111101111011110011110b,11110111100111101111011110011110b
NEWSYM NGNoTransp, dd 0
section .text
NEWSYM NewGfx16AsmEnd
%macro SCMainA 0

View File

@@ -3426,6 +3426,7 @@ EXTSYM osm2dis
; eax = pointer to beginning of tile area
mov dword[mode0add],0
mov byte[tleftn],33
.loopdn
mov cx,[vrama+eax]
test cx,2000h
@@ -3443,6 +3444,7 @@ EXTSYM osm2dis
mov [ngcedi+%2*1024+ebx*4],edi
; eax = pointer to beginning of tile area
mov byte[tleftn],33
.loopdn2
mov cx,[vrama+eax]
test cx,2000h
@@ -3803,6 +3805,7 @@ EXTSYM osm2dis
jne near .no2bitdn
; eax = pointer to beginning of tile area
mov byte[tleftn],33
.loopdn
mov cx,[vrama+eax]
test cx,2000h
@@ -3813,6 +3816,7 @@ EXTSYM osm2dis
jne near .no8bitdn
; eax = pointer to beginning of tile area
mov byte[tleftn],33
.loopdn2
mov cx,[vrama+eax]
test cx,2000h