Fix up sections variables are created in, major code cleanup, remove protection removal. - Round 2

This commit is contained in:
n-a-c-h
2005-01-03 14:27:59 +00:00
parent 75a6fd131a
commit 0677b93b78
15 changed files with 61 additions and 186 deletions

View File

@@ -27,8 +27,6 @@ extern void FxEmu2CAsmStart();
extern void FxEmu2CAsmEnd(); extern void FxEmu2CAsmEnd();
extern void WinIntRFAsmStart(); extern void WinIntRFAsmStart();
extern void WinIntRFAsmEnd(); extern void WinIntRFAsmEnd();
extern void ProcVidAsmStart();
extern void ProcVidAsmEnd();
extern void CfgLoadAsmStart(); extern void CfgLoadAsmStart();
extern void CfgLoadAsmEnd(); extern void CfgLoadAsmEnd();
extern void IrqAsmStart(); extern void IrqAsmStart();
@@ -63,40 +61,22 @@ extern void Vesa12AsmStart();
extern void Vesa12AsmEnd(); extern void Vesa12AsmEnd();
extern void MenuAsmStart(); extern void MenuAsmStart();
extern void MenuAsmEnd(); extern void MenuAsmEnd();
extern void MakeV16BAsmStart();
extern void MakeV16BAsmEnd();
extern void MakeV16TAsmStart(); extern void MakeV16TAsmStart();
extern void MakeV16TAsmEnd(); extern void MakeV16TAsmEnd();
extern void MakeVidAsmStart();
extern void MakeVidAsmEnd();
extern void Mode716AsmStart();
extern void Mode716AsmEnd();
extern void Mode716BAsmStart(); extern void Mode716BAsmStart();
extern void Mode716BAsmEnd(); extern void Mode716BAsmEnd();
extern void Mode716DAsmStart(); extern void Mode716DAsmStart();
extern void Mode716DAsmEnd(); extern void Mode716DAsmEnd();
extern void Mode716EAsmStart(); extern void Mode716EAsmStart();
extern void Mode716EAsmEnd(); extern void Mode716EAsmEnd();
extern void Mode716TAsmStart();
extern void Mode716TAsmEnd();
extern void Mode7AsmStart();
extern void Mode7AsmEnd();
extern void Mode7ExtAsmStart(); extern void Mode7ExtAsmStart();
extern void Mode7ExtAsmEnd(); extern void Mode7ExtAsmEnd();
extern void M716TExtAsmStart();
extern void M716TExtAsmEnd();
extern void TwoxSaiWAsmStart();
extern void TwoxSaiWAsmEnd();
extern void MV16TMSAsmStart(); extern void MV16TMSAsmStart();
extern void MV16TMSAsmEnd(); extern void MV16TMSAsmEnd();
extern void NewG162AsmStart(); extern void NewG162AsmStart();
extern void NewG162AsmEnd(); extern void NewG162AsmEnd();
extern void NewGfx16AsmStart();
extern void NewGfx16AsmEnd();
extern void NewGfx2AsmStart(); extern void NewGfx2AsmStart();
extern void NewGfx2AsmEnd(); extern void NewGfx2AsmEnd();
extern void NewGfxAsmStart();
extern void NewGfxAsmEnd();
extern void VCacheAsmStart(); extern void VCacheAsmStart();
extern void VCacheAsmEnd(); extern void VCacheAsmEnd();
@@ -127,7 +107,6 @@ void UnProtectMemory(void)
MakeCodeWriteable((long) FxEmu2CAsmStart, (long) FxEmu2CAsmEnd - (long) FxEmu2CAsmStart); MakeCodeWriteable((long) FxEmu2CAsmStart, (long) FxEmu2CAsmEnd - (long) FxEmu2CAsmStart);
MakeCodeWriteable((long) WinIntRFAsmStart, (long) WinIntRFAsmEnd - (long) WinIntRFAsmStart); MakeCodeWriteable((long) WinIntRFAsmStart, (long) WinIntRFAsmEnd - (long) WinIntRFAsmStart);
MakeCodeWriteable((long) GuiAsmStart, (long) GuiAsmEnd - (long) GuiAsmStart); MakeCodeWriteable((long) GuiAsmStart, (long) GuiAsmEnd - (long) GuiAsmStart);
MakeCodeWriteable((long) ProcVidAsmStart, (long) ProcVidAsmEnd - (long) ProcVidAsmStart);
MakeCodeWriteable((long) CfgLoadAsmStart, (long) CfgLoadAsmEnd - (long) CfgLoadAsmStart); MakeCodeWriteable((long) CfgLoadAsmStart, (long) CfgLoadAsmEnd - (long) CfgLoadAsmStart);
MakeCodeWriteable((long) IrqAsmStart, (long) IrqAsmEnd - (long) IrqAsmStart); MakeCodeWriteable((long) IrqAsmStart, (long) IrqAsmEnd - (long) IrqAsmStart);
MakeCodeWriteable((long) TableAsmStart, (long) TableAsmEnd - (long) TableAsmStart); MakeCodeWriteable((long) TableAsmStart, (long) TableAsmEnd - (long) TableAsmStart);
@@ -145,23 +124,13 @@ void UnProtectMemory(void)
MakeCodeWriteable((long) GPProAsmStart, (long) GPProAsmEnd - (long) GPProAsmStart); MakeCodeWriteable((long) GPProAsmStart, (long) GPProAsmEnd - (long) GPProAsmStart);
MakeCodeWriteable((long) Vesa12AsmStart, (long) Vesa12AsmEnd - (long) Vesa12AsmStart); MakeCodeWriteable((long) Vesa12AsmStart, (long) Vesa12AsmEnd - (long) Vesa12AsmStart);
MakeCodeWriteable((long) MenuAsmStart, (long) MenuAsmEnd - (long) MenuAsmStart); MakeCodeWriteable((long) MenuAsmStart, (long) MenuAsmEnd - (long) MenuAsmStart);
MakeCodeWriteable((long) MakeV16BAsmStart, (long) MakeV16BAsmEnd - (long) MakeV16BAsmStart);
MakeCodeWriteable((long) MakeV16TAsmStart, (long) MakeV16TAsmEnd - (long) MakeV16TAsmStart); MakeCodeWriteable((long) MakeV16TAsmStart, (long) MakeV16TAsmEnd - (long) MakeV16TAsmStart);
MakeCodeWriteable((long) MakeVidAsmStart, (long) MakeVidAsmEnd - (long) MakeVidAsmStart);
MakeCodeWriteable((long) Mode716AsmStart, (long) Mode716AsmEnd - (long) Mode716AsmStart);
MakeCodeWriteable((long) Mode716BAsmStart, (long) Mode716BAsmEnd - (long) Mode716BAsmStart); MakeCodeWriteable((long) Mode716BAsmStart, (long) Mode716BAsmEnd - (long) Mode716BAsmStart);
MakeCodeWriteable((long) Mode716DAsmStart, (long) Mode716DAsmEnd - (long) Mode716DAsmStart); MakeCodeWriteable((long) Mode716DAsmStart, (long) Mode716DAsmEnd - (long) Mode716DAsmStart);
MakeCodeWriteable((long) Mode716EAsmStart, (long) Mode716EAsmEnd - (long) Mode716EAsmStart); MakeCodeWriteable((long) Mode716EAsmStart, (long) Mode716EAsmEnd - (long) Mode716EAsmStart);
MakeCodeWriteable((long) Mode716TAsmStart, (long) Mode716TAsmEnd - (long) Mode716TAsmStart);
MakeCodeWriteable((long) Mode7AsmStart, (long) Mode7AsmEnd - (long) Mode7AsmStart);
MakeCodeWriteable((long) Mode7ExtAsmStart, (long) Mode7ExtAsmEnd - (long) Mode7ExtAsmStart); MakeCodeWriteable((long) Mode7ExtAsmStart, (long) Mode7ExtAsmEnd - (long) Mode7ExtAsmStart);
MakeCodeWriteable((long) M716TExtAsmStart, (long) M716TExtAsmEnd - (long) M716TExtAsmStart);
MakeCodeWriteable((long) TwoxSaiWAsmStart, (long) TwoxSaiWAsmEnd - (long) TwoxSaiWAsmStart);
MakeCodeWriteable((long) MV16TMSAsmStart, (long) MV16TMSAsmEnd - (long) MV16TMSAsmStart); MakeCodeWriteable((long) MV16TMSAsmStart, (long) MV16TMSAsmEnd - (long) MV16TMSAsmStart);
MakeCodeWriteable((long) NewG162AsmStart, (long) NewG162AsmEnd - (long) NewG162AsmStart); MakeCodeWriteable((long) NewG162AsmStart, (long) NewG162AsmEnd - (long) NewG162AsmStart);
MakeCodeWriteable((long) NewGfx16AsmStart, (long) NewGfx16AsmEnd - (long) NewGfx16AsmStart);
MakeCodeWriteable((long) NewGfx2AsmStart, (long) NewGfx2AsmEnd - (long) NewGfx2AsmStart); MakeCodeWriteable((long) NewGfx2AsmStart, (long) NewGfx2AsmEnd - (long) NewGfx2AsmStart);
MakeCodeWriteable((long) NewGfxAsmStart, (long) NewGfxAsmEnd - (long) NewGfxAsmStart);
MakeCodeWriteable((long) VCacheAsmStart, (long) VCacheAsmEnd - (long) VCacheAsmStart); MakeCodeWriteable((long) VCacheAsmStart, (long) VCacheAsmEnd - (long) VCacheAsmStart);
} }

View File

@@ -2035,7 +2035,7 @@ end1:
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
SECTION .data SECTION .data
;Some constants ;Some constants
colorMask dd 0xF7DEF7DE, 0xF7DEF7DE colorMask dd 0xF7DEF7DE, 0xF7DEF7DE
lowPixelMask dd 0x08210821, 0x08210821 lowPixelMask dd 0x08210821, 0x08210821
@@ -2048,7 +2048,7 @@ TRUE dd 0xffffffff, 0xffffffff
ONE dd 0x00010001, 0x00010001 ONE dd 0x00010001, 0x00010001
SECTION .bss SECTION .bss
ACPixel resb 8 ACPixel resb 8
Mask1 resb 8 Mask1 resb 8
Mask2 resb 8 Mask2 resb 8

View File

@@ -17,7 +17,6 @@
%include "macros.mac" %include "macros.mac"
NEWSYM TwoxSaiWAsmStart
;/*---------------------------------------------------------------------* ;/*---------------------------------------------------------------------*
; * The following (piece of) code, (part of) the 2xSaI engine, * ; * The following (piece of) code, (part of) the 2xSaI engine, *
; * copyright (c) 1999 by Derek Liauw Kie Fa. * ; * copyright (c) 1999 by Derek Liauw Kie Fa. *
@@ -2045,7 +2044,7 @@ end1:
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
SECTION .data SECTION .data
;Some constants ;Some constants
colorMask dd 0xF7DEF7DE, 0xF7DEF7DE colorMask dd 0xF7DEF7DE, 0xF7DEF7DE
lowPixelMask dd 0x08210821, 0x08210821 lowPixelMask dd 0x08210821, 0x08210821
@@ -2058,7 +2057,7 @@ TRUE dd 0xffffffff, 0xffffffff
ONE dd 0x00010001, 0x00010001 ONE dd 0x00010001, 0x00010001
SECTION .bss SECTION .bss
ACPixel resb 8 ACPixel resb 8
Mask1 resb 8 Mask1 resb 8
Mask2 resb 8 Mask2 resb 8
@@ -2081,5 +2080,3 @@ final1a resb 8
final1b resb 8 final1b resb 8
final2a resb 8 final2a resb 8
final2b resb 8 final2b resb 8
NEWSYM TwoxSaiWAsmEnd

View File

@@ -1342,7 +1342,7 @@ end:
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
SECTION .data SECTION .data
;Some constants ;Some constants
colorMask dd 0xF7DEF7DE, 0xF7DEF7DE colorMask dd 0xF7DEF7DE, 0xF7DEF7DE
lowPixelMask dd 0x08210821, 0x08210821 lowPixelMask dd 0x08210821, 0x08210821
@@ -1355,7 +1355,8 @@ TRUE dd 0xffffffff, 0xffffffff
ONE dd 0x00010001, 0x00010001 ONE dd 0x00010001, 0x00010001
SECTION .bss ALIGN = 32 SECTION .bss
ALIGN 32
ACPixel resb 8 ACPixel resb 8
Mask1 resb 8 Mask1 resb 8
Mask2 resb 8 Mask2 resb 8

View File

@@ -2748,18 +2748,6 @@ NEWSYM copyvesa2320x240x16b
pop es pop es
ret ret
;SECTION .bss
;NEWSYM palresvalng, resd 2
;NEWSYM palresvalngb, resd 2
;SECTION .text
;%macro copya320x240 0
; mov [es:edi],dx
;%endmacro
;%macro copyb320x240 0
; mov [es:edi+2],dx
;%endmacro
%endif %endif
SECTION .bss SECTION .bss
@@ -5002,7 +4990,7 @@ MMXInterpolFS:
pop es pop es
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
.interpspad resd 8 .interpspad resd 8
SECTION .text SECTION .text
@@ -5334,7 +5322,7 @@ SECTION .text
pop es pop es
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM InterPtr, resd 1 NEWSYM InterPtr, resd 1
SECTION .text SECTION .text
@@ -5700,10 +5688,6 @@ SECTION .text
; pop es ; pop es
; ret ; ret
; ;
;SECTION .bss
;.scratio resb 1
;.lastrep resb 1
;SECTION .text
NEWSYM copyvesa2512x384x16b NEWSYM copyvesa2512x384x16b
cmp byte[vesa2red10],1 cmp byte[vesa2red10],1

View File

@@ -24,11 +24,6 @@ EXTSYM vesa2_clbit,vram,vrama,winon,xtravbuf,winptrref,scaddset
EXTSYM fulladdtab EXTSYM fulladdtab
EXTSYM cwinptr EXTSYM cwinptr
NEWSYM M716TExtAsmStart
;******************************************************* ;*******************************************************
; Processes & Draws Mode 7 ; Processes & Draws Mode 7
;******************************************************* ;*******************************************************
@@ -670,7 +665,7 @@ NEWSYM M716TExtAsmStart
jnz near .offscrtrc jnz near .offscrtrc
jmp .goon jmp .goon
SECTION .bss ;ALIGN=32 SECTION .bss
.temp resd 1 ; for byte move left .temp resd 1 ; for byte move left
.mode7xpos resd 1 ; x position .mode7xpos resd 1 ; x position
.tempa2 resd 1 ; keep this blank! .tempa2 resd 1 ; keep this blank!
@@ -998,4 +993,4 @@ extbg2sub:
cmp dh,1 cmp dh,1
jne near domosaic16b jne near domosaic16b
ret ret
NEWSYM M716TExtAsmEnd

View File

@@ -51,7 +51,6 @@ EXTSYM ofsmcptr,ofsmady,ofsmadx,yposng,yposngom,flipyposng,flipyposngom
EXTSYM ofsmtptr,ofsmmptr,ofsmcyps,bgtxadd,bg1ptrx,bg1ptry EXTSYM ofsmtptr,ofsmmptr,ofsmcyps,bgtxadd,bg1ptrx,bg1ptry
EXTSYM a16x16xinc,a16x16yinc EXTSYM a16x16xinc,a16x16yinc
NEWSYM MakeV16BAsmStart
%include "video/vidmacro.mac" %include "video/vidmacro.mac"
@@ -970,11 +969,6 @@ NEWSYM setpalette16b
.noveg2 .noveg2
ret ret
;pal16b times 256 dw 0
;pal16bcl times 256 dw 0 ; w/ cl bit
;pal16bclha times 256 dw 0 ; w/ cl bit
;pal16bxcl times 256 dw 0FFFFh ; xored w/ cl bit
NEWSYM setpalallgamma NEWSYM setpalallgamma
xor esi,esi xor esi,esi
mov byte[colleft16b],0 mov byte[colleft16b],0
@@ -3091,4 +3085,3 @@ draw16x1616bwinon:
jne near domosaic16b jne near domosaic16b
ret ret
NEWSYM MakeV16BAsmEnd

View File

@@ -41,8 +41,6 @@ EXTSYM tempoffset,vidmemch2,vidmemch4,vidmemch8
EXTSYM ofsmcptr,ofsmady,ofsmadx,yposng,yposngom,flipyposng,flipyposngom EXTSYM ofsmcptr,ofsmady,ofsmadx,yposng,yposngom,flipyposng,flipyposngom
EXTSYM ofsmtptr,ofsmmptr,ofsmcyps,bgtxadd,bg1ptrx,bg1ptry EXTSYM ofsmtptr,ofsmmptr,ofsmcyps,bgtxadd,bg1ptrx,bg1ptry
NEWSYM MakeVidAsmStart
%include "video/vidmacro.mac" %include "video/vidmacro.mac"
@@ -738,10 +736,6 @@ NEWSYM dualwinxnor
ret ret
SECTION .bss SECTION .bss
;pwinspenab db 0
;pwinsptype dd 0
;winonstype db 0
;dualwinsp db 0
NEWSYM winonsp, resb 1 NEWSYM winonsp, resb 1
SECTION .text SECTION .text
@@ -3607,9 +3601,6 @@ NEWSYM domosaicwin
.doneloop .doneloop
ret ret
;windowdata times 16 db 0
;numwin db 0
NEWSYM dowindow NEWSYM dowindow
mov ebx,windowdata mov ebx,windowdata
mov esi,xtravbuf+16 mov esi,xtravbuf+16
@@ -3671,9 +3662,6 @@ NEWSYM dowindow
xor eax,eax xor eax,eax
ret ret
;xtravbuf times 576 db 0
; bytes to add to match y coordinates
ALIGN32 ALIGN32
SECTION .bss SECTION .bss
@@ -4421,7 +4409,4 @@ NEWSYM temp, resb 1
NEWSYM bshifter, resb 1 NEWSYM bshifter, resb 1
NEWSYM a16x16xinc, resb 1 NEWSYM a16x16xinc, resb 1
NEWSYM a16x16yinc, resb 1 NEWSYM a16x16yinc, resb 1
SECTION .text
NEWSYM MakeVidAsmEnd

View File

@@ -25,8 +25,6 @@ EXTSYM pesimpng
EXTSYM mode7hr EXTSYM mode7hr
EXTSYM BGMA, mode7ab, mode7cd, BG1SYl, BG1SXl, mosenng, mosszng EXTSYM BGMA, mode7ab, mode7cd, BG1SYl, BG1SXl, mosenng, mosszng
NEWSYM Mode7AsmStart
%include "video/mode7.mac" %include "video/mode7.mac"
@@ -73,8 +71,6 @@ NEWSYM Makemode7Table
jnz .nextentry jnz .nextentry
ret ret
;mode7tab times 65536 db 0
; backup mode7X0, mode7Y0, Mode7A, and Mode7B ; backup mode7X0, mode7Y0, Mode7A, and Mode7B
NEWSYM drawmode7 NEWSYM drawmode7
mov esi,[cwinptr] mov esi,[cwinptr]
@@ -827,4 +823,3 @@ NEWSYM processmode7hires
pop esi pop esi
.nogo .nogo
ret ret
NEWSYM Mode7AsmEnd

View File

@@ -24,8 +24,6 @@ EXTSYM pal16b,pal16bcl,pal16bxcl,scaddtype,scrnon,transpbuf,drawmode716b
EXTSYM vesa2_clbit,vram,vrama,winon,xtravbuf,winptrref,scaddset EXTSYM vesa2_clbit,vram,vrama,winon,xtravbuf,winptrref,scaddset
EXTSYM fulladdtab EXTSYM fulladdtab
NEWSYM Mode716TAsmStart
%include "video/mode7.mac" %include "video/mode7.mac"
@@ -363,8 +361,5 @@ NEWSYM drawmode716tb
mov [cwinptr2],esi mov [cwinptr2],esi
mode716tmacro mode7mainsub,mode7mainsubwinon mode716tmacro mode7mainsub,mode7mainsubwinon
SECTION .bss ;ALIGN=32 SECTION .bss
cwinptr2 resd 1 cwinptr2 resd 1
SECTION .text
NEWSYM Mode716TAsmEnd

View File

@@ -47,8 +47,6 @@ EXTSYM winlogicb
EXTSYM ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr EXTSYM ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr
EXTSYM WindowRedraw EXTSYM WindowRedraw
NEWSYM NewGfxAsmStart
%include "video/vidmacro.mac" %include "video/vidmacro.mac"
%include "video/newgfx2.mac" %include "video/newgfx2.mac"
%include "video/newgfx.mac" %include "video/newgfx.mac"
@@ -367,29 +365,22 @@ NEWSYM newengine8b
mov ebx,[interlval] mov ebx,[interlval]
mov [intrlng+eax],ebx mov [intrlng+eax],ebx
; Windowing Stuff ; Windowing Stuff
;NEWSYM winl1, db 0 ; window 1 left position ;NEWSYM winl1, 0 ; window 1 left position
;NEWSYM winr1, db 0 ; window 1 right position ;NEWSYM winr1, 0 ; window 1 right position
;NEWSYM winl2, db 0 ; window 2 left position ;NEWSYM winl2, 0 ; window 2 left position
;NEWSYM winr2, db 0 ; window 2 right position ;NEWSYM winr2, 0 ; window 2 right position
;NEWSYM winbg1en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG1 ;NEWSYM winbg1en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG1
;NEWSYM winbg2en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG2 ;NEWSYM winbg2en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG2
;NEWSYM winbg3en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG3 ;NEWSYM winbg3en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG3
;NEWSYM winbg4en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG4 ;NEWSYM winbg4en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG4
;NEWSYM winobjen, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on sprites ;NEWSYM winobjen, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on sprites
;NEWSYM wincolen, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on backarea ;NEWSYM wincolen, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on backarea
;NEWSYM winlogica, db 0 ; Window logic type for BG1 to 4 ;NEWSYM winlogica, 0 ; Window logic type for BG1 to 4
;NEWSYM winlogicb, db 0 ; Window logic type for Sprites and Backarea ;NEWSYM winlogicb, 0 ; Window logic type for Sprites and Backarea
;NEWSYM winenabm, db 0 ; Window logic enable for main screen ;NEWSYM winenabm, 0 ; Window logic enable for main screen
;NEWSYM winenabs, db 0 ; Window logic enable for sub screen ;NEWSYM winenabs, 0 ; Window logic enable for sub screen
;NEWSYM winboundary, times 256 dd 0
;NEWSYM winbg1enval, times 256 db 0
;NEWSYM winbg2enval, times 256 db 0
;NEWSYM winbg3enval, times 256 db 0
;NEWSYM winbg4enval, times 256 db 0
;NEWSYM winbgobjenval, times 256 db 0
;NEWSYM winlogicaval, times 256 dw 0
mov byte[bgwinchange+eax],0 mov byte[bgwinchange+eax],0
cmp byte[disableeffects],1 cmp byte[disableeffects],1
je near .finishwin je near .finishwin
@@ -492,9 +483,6 @@ NEWSYM newengine8b
jmp .procnotempty jmp .procnotempty
.done .done
pop eax pop eax
;NEWSYM objwlrpos , times 256 dd 0
;NEWSYM objwen , times 256 dw 0 ; en,log
;NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
jmp .skipobjw jmp .skipobjw
.usecurrent .usecurrent
mov ecx,[objclineptr+eax*4] mov ecx,[objclineptr+eax*4]
@@ -890,14 +878,14 @@ NEWSYM BuildWindow
pop edx pop edx
ret ret
SECTION .data ;ALIGN=32 SECTION .data
NEWSYM firstdrawn, db 0 NEWSYM firstdrawn, db 0
NEWSYM bgusedng NEWSYM bgusedng
dd 01010101h,00010101h,00000101h,00000101h,00000101h,00000101h dd 01010101h,00010101h,00000101h,00000101h,00000101h,00000101h
dd 00000001h,00000001h dd 00000001h,00000001h
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM bgcmsung, resd 1 NEWSYM bgcmsung, resd 1
NEWSYM modeused, resd 2 NEWSYM modeused, resd 2
NEWSYM reslbyl, resd 1 NEWSYM reslbyl, resd 1
@@ -914,7 +902,7 @@ NEWSYM ofsmady, resd 1
NEWSYM ofsmadx, resd 1 NEWSYM ofsmadx, resd 1
NEWSYM mosoldtab, resd 15 NEWSYM mosoldtab, resd 15
SECTION .data ;ALIGN=32 SECTION .data
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
@@ -922,7 +910,7 @@ NEWSYM ngwintabled, times 16 dd 0EE00h
NEWSYM valtemp, dd 0EE00h, 0EE00h NEWSYM valtemp, dd 0EE00h, 0EE00h
NEWSYM ngcwinptr, dd ngwintable NEWSYM ngcwinptr, dd ngwintable
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM ngwinen, resd 1 NEWSYM ngwinen, resd 1
NEWSYM ngcwinmode, resd 1 NEWSYM ngcwinmode, resd 1
NEWSYM ngcpixleft, resd 1 NEWSYM ngcpixleft, resd 1
@@ -935,22 +923,22 @@ NEWSYM cbgval, resd 1
NEWSYM ofsmval, resd 1 NEWSYM ofsmval, resd 1
NEWSYM ofsmvalh, resd 1 NEWSYM ofsmvalh, resd 1
SECTION .data ;ALIGN=32 SECTION .data
NEWSYM pwinen, dd 0FFFFh NEWSYM pwinen, dd 0FFFFh
NEWSYM pngwinen, dd 0FFFFh NEWSYM pngwinen, dd 0FFFFh
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM pwinbound, resd 1 NEWSYM pwinbound, resd 1
NEWSYM WinPtrAPos, resd 1 NEWSYM WinPtrAPos, resd 1
NEWSYM WinPtrBPos, resd 1 NEWSYM WinPtrBPos, resd 1
SECTION .data ;ALIGN=32 SECTION .data
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
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM nglogicval, resd 1 NEWSYM nglogicval, resd 1
NEWSYM pnglogicval, resd 1 NEWSYM pnglogicval, resd 1
NEWSYM mosjmptab, resd 15 NEWSYM mosjmptab, resd 15
@@ -1728,7 +1716,7 @@ NEWSYM drawbg4linepr1
drawbglinengpr1 3,1 drawbglinengpr1 3,1
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM bgtxadd, resd 1 NEWSYM bgtxadd, resd 1
NEWSYM bgcyval, resd 1 NEWSYM bgcyval, resd 1
NEWSYM bgcxval, resd 1 NEWSYM bgcxval, resd 1
@@ -2033,9 +2021,6 @@ SECTION .bss
NEWSYM NGNumSpr, resb 1 NEWSYM NGNumSpr, resb 1
SECTION .text SECTION .text
; cmp byte[winbg1enval+eax+4*256],0
; je near .skipobjw
;NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
NEWSYM drawsprngw NEWSYM drawsprngw
mov [NGNumSpr],cl mov [NGNumSpr],cl
mov ecx,[objclineptr+ebx*4] mov ecx,[objclineptr+ebx*4]
@@ -2361,9 +2346,6 @@ NEWSYM preparesprpr
mov dword[sprsingle],1 mov dword[sprsingle],1
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM sprclprio, resd 1 NEWSYM sprclprio, resd 1
NEWSYM sprsingle, resd 1 NEWSYM sprsingle, resd 1
SECTION .text
NEWSYM NewGfxAsmEnd

View File

@@ -1724,7 +1724,6 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2
jz %%nowindowing jz %%nowindowing
push eax push eax
push ebx push ebx
;NEWSYM winlogicaval, times 256 dw 0
mov al,[winlogicaval+ebx*2] mov al,[winlogicaval+ebx*2]
shr al,%1*2 shr al,%1*2
and al,03h and al,03h

View File

@@ -65,8 +65,6 @@ EXTSYM NGNumSpr
EXTSYM fulladdtab EXTSYM fulladdtab
EXTSYM MMXSupport,bgtxadd2 EXTSYM MMXSupport,bgtxadd2
NEWSYM NewGfx16AsmStart
%include "video/vidmacro.mac" %include "video/vidmacro.mac"
%include "video/newgfx16.mac" %include "video/newgfx16.mac"
%include "video/newg162.mac" %include "video/newg162.mac"
@@ -906,29 +904,22 @@ NEWSYM newengine16b
mov byte[bgallchange+eax],1 mov byte[bgallchange+eax],1
.noscads .noscads
; Windowing Stuff ; Windowing Stuff
;NEWSYM winl1, db 0 ; window 1 left position ;NEWSYM winl1, 0 ; window 1 left position
;NEWSYM winr1, db 0 ; window 1 right position ;NEWSYM winr1, 0 ; window 1 right position
;NEWSYM winl2, db 0 ; window 2 left position ;NEWSYM winl2, 0 ; window 2 left position
;NEWSYM winr2, db 0 ; window 2 right position ;NEWSYM winr2, 0 ; window 2 right position
;NEWSYM winbg1en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG1 ;NEWSYM winbg1en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG1
;NEWSYM winbg2en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG2 ;NEWSYM winbg2en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG2
;NEWSYM winbg3en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG3 ;NEWSYM winbg3en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG3
;NEWSYM winbg4en, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG4 ;NEWSYM winbg4en, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on BG4
;NEWSYM winobjen, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on sprites ;NEWSYM winobjen, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on sprites
;NEWSYM wincolen, db 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on backarea ;NEWSYM wincolen, 0 ; Win1 on (IN/OUT) or Win2 on (IN/OUT) on backarea
;NEWSYM winlogica, db 0 ; Window logic type for BG1 to 4 ;NEWSYM winlogica, 0 ; Window logic type for BG1 to 4
;NEWSYM winlogicb, db 0 ; Window logic type for Sprites and Backarea ;NEWSYM winlogicb, 0 ; Window logic type for Sprites and Backarea
;NEWSYM winenabm, db 0 ; Window logic enable for main screen ;NEWSYM winenabm, 0 ; Window logic enable for main screen
;NEWSYM winenabs, db 0 ; Window logic enable for sub screen ;NEWSYM winenabs, 0 ; Window logic enable for sub screen
;NEWSYM winboundary, times 256 dd 0
;NEWSYM winbg1enval, times 256 db 0
;NEWSYM winbg2enval, times 256 db 0
;NEWSYM winbg3enval, times 256 db 0
;NEWSYM winbg4enval, times 256 db 0
;NEWSYM winbgobjenval, times 256 db 0
;NEWSYM winlogicaval, times 256 dw 0
mov byte[bgwinchange+eax],0 mov byte[bgwinchange+eax],0
cmp byte[disableeffects],1 cmp byte[disableeffects],1
je near .finishwin je near .finishwin
@@ -1035,9 +1026,6 @@ NEWSYM newengine16b
jmp .procnotempty jmp .procnotempty
.done .done
pop eax pop eax
;NEWSYM objwlrpos , times 256 dd 0
;NEWSYM objwen , times 256 dw 0 ; en,log
;NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
jmp .skipobjw jmp .skipobjw
.usecurrent .usecurrent
mov ecx,[objclineptr+eax*4] mov ecx,[objclineptr+eax*4]
@@ -2406,7 +2394,6 @@ NEWSYM drawbg4linepr116b
%macro normalwsprng16b 2 %macro normalwsprng16b 2
; cmp byte[winbg1enval+eax+4*256],0 ; cmp byte[winbg1enval+eax+4*256],0
; je near .skipobjw ; je near .skipobjw
;NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
xor eax,eax xor eax,eax
mov [NGNumSpr],cl mov [NGNumSpr],cl
mov ecx,[objclineptr+ebx*4] mov ecx,[objclineptr+ebx*4]

View File

@@ -2068,7 +2068,6 @@ EXTSYM osm2dis
jz %%nowindowing jz %%nowindowing
push eax push eax
push ebx push ebx
;NEWSYM winlogicaval, times 256 dw 0
mov al,[winlogicaval+ebx*2] mov al,[winlogicaval+ebx*2]
shr al,%1*2 shr al,%1*2
and al,03h and al,03h

View File

@@ -69,9 +69,6 @@ EXTSYM HalfTransB,HalfTransC
EXTSYM SB_blank EXTSYM SB_blank
%endif %endif
NEWSYM ProcVidAsmStart
SECTION .bss SECTION .bss
NEWSYM ScreenScale, resb 1 ; If horizontal is scaled or not NEWSYM ScreenScale, resb 1 ; If horizontal is scaled or not
NEWSYM TempDebugV, resw 1 ; Temporary Debugging variable NEWSYM TempDebugV, resw 1 ; Temporary Debugging variable
@@ -1833,7 +1830,7 @@ NEWSYM saveselect
mov byte[ForceNonTransp],0 mov byte[ForceNonTransp],0
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
.allred resw 1 .allred resw 1
.allgrn resw 1 .allgrn resw 1
.allgrnb resw 1 .allgrnb resw 1
@@ -2248,7 +2245,7 @@ NEWSYM testpressed8b
; MakePal Changes the entire palette ; MakePal Changes the entire palette
;******************************************************* ;*******************************************************
; set the brightness with [maxbr] ; set the brightness with [maxbr]
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM cgramback, resw 256 NEWSYM cgramback, resw 256
SECTION .text SECTION .text
@@ -2322,7 +2319,7 @@ NEWSYM dovegrest
popad popad
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
blahblahblah resw 1 blahblahblah resw 1
SECTION .text SECTION .text
@@ -2461,7 +2458,8 @@ NEWSYM makepalb
call dovegrest call dovegrest
.noveg2 .noveg2
ret ret
SECTION .bss ;ALIGN=32
SECTION .bss
NEWSYM tempco0, resw 1 NEWSYM tempco0, resw 1
SECTION .text SECTION .text
@@ -2729,7 +2727,7 @@ NEWSYM showfps
call outputhex call outputhex
ret ret
SECTION .bss ;ALIGN=32 SECTION .bss
NEWSYM spcdebugaddr, resd 1 NEWSYM spcdebugaddr, resd 1
NEWSYM tempoffset, resw 1 NEWSYM tempoffset, resw 1
@@ -3624,7 +3622,7 @@ NEWSYM copyvid
dec dword[MessageOn] dec dword[MessageOn]
.nomsg .nomsg
jmp vidpaste jmp vidpaste
SECTION .bss ;ALIGN=32 SECTION .bss
.sdrawptr resd 1 .sdrawptr resd 1
SECTION .text SECTION .text
@@ -3748,7 +3746,7 @@ NEWSYM vidpaste
jnz .ssloopb jnz .ssloopb
jmp .returnfromdraw jmp .returnfromdraw
SECTION .bss ;ALIGN=32 SECTION .bss
.SSRedCo resw 1 .SSRedCo resw 1
SECTION .text SECTION .text
@@ -3799,7 +3797,3 @@ db 0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,0,0
db 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
SECTION .text
NEWSYM ProcVidAsmEnd