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 final2a resb 8
final2b resb 8 final2b resb 8
SECTION .text

View File

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

View File

@@ -1354,21 +1354,23 @@ FALSE dd 0x00000000, 0x00000000
TRUE dd 0xffffffff, 0xffffffff TRUE dd 0xffffffff, 0xffffffff
ONE dd 0x00010001, 0x00010001 ONE dd 0x00010001, 0x00010001
ACPixel times 8 db 0
Mask1 times 8 db 0
Mask2 times 8 db 0
I56Pixel times 8 db 0 SECTION .bss ALIGN = 32
I23Pixel times 8 db 0 ACPixel resb 8
Mask26 times 8 db 0 Mask1 resb 8
Mask35 times 8 db 0 Mask2 resb 8
Mask26b times 8 db 0
Mask35b times 8 db 0 I56Pixel resb 8
product1a times 8 db 0 I23Pixel resb 8
product1b times 8 db 0 Mask26 resb 8
product2a times 8 db 0 Mask35 resb 8
product2b times 8 db 0 Mask26b resb 8
final1a times 8 db 0 Mask35b resb 8
final1b times 8 db 0 product1a resb 8
final2a times 8 db 0 product1b resb 8
final2b times 8 db 0 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 jnz near .offscrtrc
jmp .goon jmp .goon
ALIGN32 SECTION .bss ;ALIGN=32
.temp dd 0 ; for byte move left .temp resd 1 ; for byte move left
.mode7xpos dd 0 ; x position .mode7xpos resd 1 ; x position
.tempa2 dd 0 ; keep this blank! .tempa2 resd 1 ; keep this blank!
.mode7xrpos dd 0 ; x position .mode7xrpos resd 1 ; x position
.tempa dd 0 ; keep this blank! .tempa resd 1 ; keep this blank!
.mode7ypos dd 0 ; y position .mode7ypos resd 1 ; y position
.tempb2 dd 0 ; keep this blank! .tempb2 resd 1 ; keep this blank!
.mode7yrpos dd 0 ; y position .mode7yrpos resd 1 ; y position
.tempb dd 0 ; keep this blank! .tempb resd 1 ; keep this blank!
.mode7xadder dd 0 ; number to add for x .mode7xadder resd 1 ; number to add for x
.tempc2 dd 0 ; keep this blank! .tempc2 resd 1 ; keep this blank!
.mode7xadd2 dd 0 ; number to add for x .mode7xadd2 resd 1 ; number to add for x
.tempc dd 0 ; keep this blank! .tempc resd 1 ; keep this blank!
.mode7yadder dd 0 ; number to add for y .mode7yadder resd 1 ; number to add for y
.tempd2 dd 0 ; keep this blank! .tempd2 resd 1 ; keep this blank!
.mode7yadd2 dd 0 ; number to add for y .mode7yadd2 resd 1 ; number to add for y
.tempd dd 0 ; keep this blank! .tempd resd 1 ; keep this blank!
.mode7ptr dd 0 ; pointer value .mode7ptr resd 1 ; pointer value
.mode7xinc dd 0 ; number to add for x .mode7xinc resd 1 ; number to add for x
.mode7yinc dd 0 ; number to add for y .mode7yinc resd 1 ; number to add for y
.mode7xsloc dd 0 ; which screen x .mode7xsloc resd 1 ; which screen x
.mode7ysloc dd 0 ; which screen y .mode7ysloc resd 1 ; which screen y
.mode7xsrl dd 0 ; which relative screen x .mode7xsrl resd 1 ; which relative screen x
.mode7ysrl dd 0 ; which relative screen y .mode7ysrl resd 1 ; which relative screen y
.cxloc dd 0 ; cx location .cxloc resd 1 ; cx location
.cyloc dd 0 ; cy location .cyloc resd 1 ; cy location
SECTION .text
%endmacro %endmacro
;******************************************************* ;*******************************************************

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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