Code cleanup

This commit is contained in:
pagefault
2001-06-20 00:17:55 +00:00
parent 5bf46c94ab
commit 2fbcecfb82
2 changed files with 222 additions and 211 deletions

View File

@@ -30,221 +30,232 @@ NEWSYM romdatahere
Stuff db 'ZSNES v?.??? / Freeware, programmed by zsKnight, _Demo_, and Pharos',13,10,0
SECTION .bss
ALIGN32
NEWSYM wramdataa, times 65536 db 0
NEWSYM ram7fa, times 65536 db 0
NEWSYM Inbetweendat, dd 0,0,0,0
NEWSYM opcjmptab, times 256 dd 0
NEWSYM wramdataa, resb 65536
NEWSYM ram7fa, resb 65536
NEWSYM Inbetweendat, resd 4
NEWSYM opcjmptab, resd 256
NEWSYM Bank0datr8 ,times 256 dd 0
NEWSYM Bank0datr16,times 256 dd 0
NEWSYM Bank0datw8 ,times 256 dd 0
NEWSYM Bank0datw16,times 256 dd 0
NEWSYM Bank0datr8 , resd 256
NEWSYM Bank0datr16, resd 256
NEWSYM Bank0datw8 , resd 256
NEWSYM Bank0datw16, resd 256
NEWSYM tableA, times 256 dd 0
NEWSYM tableB, times 256 dd 0
NEWSYM tableC, times 256 dd 0
NEWSYM tableD, times 256 dd 0
NEWSYM tableE, times 256 dd 0
NEWSYM tableF, times 256 dd 0
NEWSYM tableG, times 256 dd 0
NEWSYM tableH, times 256 dd 0
NEWSYM tableA, resd 256
NEWSYM tableB, resd 256
NEWSYM tableC, resd 256
NEWSYM tableD, resd 256
NEWSYM tableE, resd 256
NEWSYM tableF, resd 256
NEWSYM tableG, resd 256
NEWSYM tableH, resd 256
NEWSYM tableAb, times 256 dd 0
NEWSYM tableBb, times 256 dd 0
NEWSYM tableCb, times 256 dd 0
NEWSYM tableDb, times 256 dd 0
NEWSYM tableEb, times 256 dd 0
NEWSYM tableFb, times 256 dd 0
NEWSYM tableGb, times 256 dd 0
NEWSYM tableHb, times 256 dd 0
NEWSYM tableAb, resd 256
NEWSYM tableBb, resd 256
NEWSYM tableCb, resd 256
NEWSYM tableDb, resd 256
NEWSYM tableEb, resd 256
NEWSYM tableFb, resd 256
NEWSYM tableGb, resd 256
NEWSYM tableHb, resd 256
NEWSYM tableAc, times 256 dd 0
NEWSYM tableBc, times 256 dd 0
NEWSYM tableCc, times 256 dd 0
NEWSYM tableDc, times 256 dd 0
NEWSYM tableEc, times 256 dd 0
NEWSYM tableFc, times 256 dd 0
NEWSYM tableGc, times 256 dd 0
NEWSYM tableHc, times 256 dd 0
NEWSYM tableAc, resd 256
NEWSYM tableBc, resd 256
NEWSYM tableCc, resd 256
NEWSYM tableDc, resd 256
NEWSYM tableEc, resd 256
NEWSYM tableFc, resd 256
NEWSYM tableGc, resd 256
NEWSYM tableHc, resd 256
NEWSYM SA1tableA, times 256 dd 0
NEWSYM SA1tableB, times 256 dd 0
NEWSYM SA1tableC, times 256 dd 0
NEWSYM SA1tableD, times 256 dd 0
NEWSYM SA1tableE, times 256 dd 0
NEWSYM SA1tableF, times 256 dd 0
NEWSYM SA1tableG, times 256 dd 0
NEWSYM SA1tableH, times 256 dd 0
NEWSYM SA1tableA, resd 256
NEWSYM SA1tableB, resd 256
NEWSYM SA1tableC, resd 256
NEWSYM SA1tableD, resd 256
NEWSYM SA1tableE, resd 256
NEWSYM SA1tableF, resd 256
NEWSYM SA1tableG, resd 256
NEWSYM SA1tableH, resd 256
NEWSYM tablead, times 256 dd 0
NEWSYM tableadb, times 256 dd 0
NEWSYM tableadc, times 256 dd 0
NEWSYM SA1tablead, times 256 dd 0
NEWSYM tablead, resd 256
NEWSYM tableadb, resd 256
NEWSYM tableadc, resd 256
NEWSYM SA1tablead, resd 256
NEWSYM memtabler8, times 256 dd 0
NEWSYM memtablew8, times 256 dd 0
NEWSYM memtabler16, times 256 dd 0
NEWSYM memtablew16, times 256 dd 0
NEWSYM vidmemch2, times 4096 db 0
NEWSYM vidmemch4, times 4096 db 0
NEWSYM vidmemch8, times 4096 db 0
NEWSYM snesmmap, times 256 dd 0
NEWSYM snesmap2, times 256 dd 0
NEWSYM cachebg1, times 64 db 0
NEWSYM cachebg2, times 64 db 0
NEWSYM cachebg3, times 64 db 0
NEWSYM cachebg4, times 64 db 0
NEWSYM sprlefttot, times 256 db 0
NEWSYM sprleftpr, times 256 db 0
NEWSYM sprleftpr1, times 256 db 0
NEWSYM sprleftpr2, times 256 db 0
NEWSYM sprleftpr3, times 256 db 0
NEWSYM sprpriodata, times 288 db 0
NEWSYM sprprtabc, times 64 db 0
NEWSYM sprprtabu, times 64 db 0
NEWSYM prevpal, times 256 dw 0 ; previous palette buffer
NEWSYM winbgdata, times 288 db 0 ; window buffer for backgrounds
NEWSYM winspdata, times 288 db 0 ; window buffer for sprites
NEWSYM FxTable, times 256 dd 0
NEWSYM FxTableA1, times 256 dd 0
NEWSYM FxTableA2, times 256 dd 0
NEWSYM FxTableA3, times 256 dd 0
NEWSYM FxTableb, times 256 dd 0
NEWSYM FxTablebA1, times 256 dd 0
NEWSYM FxTablebA2, times 256 dd 0
NEWSYM FxTablebA3, times 256 dd 0
NEWSYM FxTablec, times 256 dd 0
NEWSYM FxTablecA1, times 256 dd 0
NEWSYM FxTablecA2, times 256 dd 0
NEWSYM FxTablecA3, times 256 dd 0
NEWSYM FxTabled, times 256 dd 0
NEWSYM FxTabledA1, times 256 dd 0
NEWSYM FxTabledA2, times 256 dd 0
NEWSYM FxTabledA3, times 256 dd 0
NEWSYM SfxMemTable, times 256 dd 0
NEWSYM fxxand, times 256 dd 0
NEWSYM fxbit01, times 256 dd 0
NEWSYM fxbit23, times 256 dd 0
NEWSYM fxbit45, times 256 dd 0
NEWSYM fxbit67, times 256 dd 0
NEWSYM PLOTJmpa, times 64 dd 0
NEWSYM PLOTJmpb, times 64 dd 0
NEWSYM memtabler8, resd 256
NEWSYM memtablew8, resd 256
NEWSYM memtabler16, resd 256
NEWSYM memtablew16, resd 256
NEWSYM vidmemch2, resb 4096
NEWSYM vidmemch4, resb 4096
NEWSYM vidmemch8, resb 4096
NEWSYM snesmmap, resd 256
NEWSYM snesmap2, resd 256
NEWSYM cachebg1, resb 64
NEWSYM cachebg2, resb 64
NEWSYM cachebg3, resb 64
NEWSYM cachebg4, resb 64
NEWSYM sprlefttot, resb 256
NEWSYM sprleftpr, resb 256
NEWSYM sprleftpr1, resb 256
NEWSYM sprleftpr2, resb 256
NEWSYM sprleftpr3, resb 256
NEWSYM sprpriodata, resb 288
NEWSYM sprprtabc, resb 64
NEWSYM sprprtabu, resb 64
NEWSYM prevpal, resw 256 ; previous palette buffer
NEWSYM winbgdata, resb 288 ; window buffer for backgrounds
NEWSYM winspdata, resb 288 ; window buffer for sprites
NEWSYM FxTable, resd 256
NEWSYM FxTableA1, resd 256
NEWSYM FxTableA2, resd 256
NEWSYM FxTableA3, resd 256
NEWSYM FxTableb, resd 256
NEWSYM FxTablebA1, resd 256
NEWSYM FxTablebA2, resd 256
NEWSYM FxTablebA3, resd 256
NEWSYM FxTablec, resd 256
NEWSYM FxTablecA1, resd 256
NEWSYM FxTablecA2, resd 256
NEWSYM FxTablecA3, resd 256
NEWSYM FxTabled, resd 256
NEWSYM FxTabledA1, resd 256
NEWSYM FxTabledA2, resd 256
NEWSYM FxTabledA3, resd 256
NEWSYM SfxMemTable, resd 256
NEWSYM fxxand, resd 256
NEWSYM fxbit01, resd 256
NEWSYM fxbit23, resd 256
NEWSYM fxbit45, resd 256
NEWSYM fxbit67, resd 256
NEWSYM PLOTJmpa, resd 64
NEWSYM PLOTJmpb, resd 64
NEWSYM pal16b, times 256 dd 0
NEWSYM pal16bcl, times 256 dd 0
NEWSYM pal16bclha, times 256 dd 0
NEWSYM pal16bxcl, times 256 dd 0
NEWSYM xtravbuf, times 576 db 0
NEWSYM BG1SXl, times 256 dw 0
NEWSYM BG2SXl, times 256 dw 0
NEWSYM BG3SXl, times 256 dw 0
NEWSYM BG4SXl, times 256 dw 0
NEWSYM BG1SYl, times 256 dw 0
NEWSYM BG2SYl, times 256 dw 0
NEWSYM BG3SYl, times 256 dw 0
NEWSYM BG4SYl, times 256 dw 0
NEWSYM BGMA, times 256 db 0
NEWSYM BGFB, times 256 db 0
NEWSYM BG3PRI, times 256 db 0
NEWSYM BGOPT1, times 256 dw 0
NEWSYM BGOPT2, times 256 dw 0
NEWSYM BGOPT3, times 256 dw 0
NEWSYM BGOPT4, times 256 dw 0
NEWSYM BGPT1, times 256 dw 0
NEWSYM BGPT2, times 256 dw 0
NEWSYM BGPT3, times 256 dw 0
NEWSYM BGPT4, times 256 dw 0
NEWSYM BGPT1X, times 256 dw 0
NEWSYM BGPT2X, times 256 dw 0
NEWSYM BGPT3X, times 256 dw 0
NEWSYM BGPT4X, times 256 dw 0
NEWSYM BGPT1Y, times 256 dw 0
NEWSYM BGPT2Y, times 256 dw 0
NEWSYM BGPT3Y, times 256 dw 0
NEWSYM BGPT4Y, times 256 dw 0
NEWSYM BGMS1, times 1024 dw 0
NEWSYM prdata, times 256 db 0
NEWSYM prdatb, times 256 db 0
NEWSYM prdatc, times 256 db 0
NEWSYM ngpalcon2b, times 20h dd 0
NEWSYM ngpalcon4b, times 20h dd 0
NEWSYM ngpalcon8b, times 20h dd 0
NEWSYM tltype2b, times 4096 db 0
NEWSYM tltype4b, times 2048 db 0
NEWSYM tltype8b, times 1024 db 0
NEWSYM pal16b, resd 256
NEWSYM pal16bcl, resd 256
NEWSYM pal16bclha, resd 256
NEWSYM pal16bxcl, resd 256
NEWSYM xtravbuf, resb 576
NEWSYM BG1SXl, resw 256
NEWSYM BG2SXl, resw 256
NEWSYM BG3SXl, resw 256
NEWSYM BG4SXl, resw 256
NEWSYM BG1SYl, resw 256
NEWSYM BG2SYl, resw 256
NEWSYM BG3SYl, resw 256
NEWSYM BG4SYl, resw 256
NEWSYM BGMA, resb 256
NEWSYM BGFB, resb 256
NEWSYM BG3PRI, resb 256
NEWSYM BGOPT1, resw 256
NEWSYM BGOPT2, resw 256
NEWSYM BGOPT3, resw 256
NEWSYM BGOPT4, resw 256
NEWSYM BGPT1, resw 256
NEWSYM BGPT2, resw 256
NEWSYM BGPT3, resw 256
NEWSYM BGPT4, resw 256
NEWSYM BGPT1X, resw 256
NEWSYM BGPT2X, resw 256
NEWSYM BGPT3X, resw 256
NEWSYM BGPT4X, resw 256
NEWSYM BGPT1Y, resw 256
NEWSYM BGPT2Y, resw 256
NEWSYM BGPT3Y, resw 256
NEWSYM BGPT4Y, resw 256
NEWSYM BGMS1, resw 1024
NEWSYM prdata, resb 256
NEWSYM prdatb, resb 256
NEWSYM prdatc, resb 256
NEWSYM ngpalcon2b, resd 20h
NEWSYM ngpalcon4b, resd 20h
NEWSYM ngpalcon8b, resd 20h
NEWSYM tltype2b, resb 4096
NEWSYM tltype4b, resb 2048
NEWSYM tltype8b, resb 1024
NEWSYM ngptrdat, times 1024 dd 0
NEWSYM ngceax, times 1024 dd 0
NEWSYM ngcedi, times 1024 dd 0
NEWSYM bgtxad, times 1024 dw 0
NEWSYM sprtbng, times 256 dd 0
NEWSYM sprtlng, times 256 db 0
NEWSYM mosszng, times 256 db 0
NEWSYM mosenng, times 256 db 0
NEWSYM ngptrdat, resd 1024
NEWSYM ngceax, resd 1024
NEWSYM ngcedi, resd 1024
NEWSYM bgtxad, resw 1024
NEWSYM sprtbng, resd 256
NEWSYM sprtlng, resb 256
NEWSYM mosszng, resb 256
NEWSYM mosenng, resb 256
SECTION .data
NEWSYM vidmemch2s, times 4096 db 0FFh
NEWSYM vidmemch4s, times 2048 db 0FFh
NEWSYM vidmemch8s, times 1024 db 0FFh
NEWSYM mode7ab, times 256 dd 0
NEWSYM mode7cd, times 256 dd 0
NEWSYM mode7xy, times 256 dd 0
NEWSYM mode7st, times 256 db 0
SECTION .bss
NEWSYM t16x161, times 256 db 0
NEWSYM t16x162, times 256 db 0
NEWSYM t16x163, times 256 db 0
NEWSYM t16x164, times 256 db 0
NEWSYM mode7ab, resd 256
NEWSYM mode7cd, resd 256
NEWSYM mode7xy, resd 256
NEWSYM mode7st, resb 256
NEWSYM intrlng, times 256 db 0
NEWSYM mode7hr, times 256 db 0
NEWSYM t16x161, resb 256
NEWSYM t16x162, resb 256
NEWSYM t16x163, resb 256
NEWSYM t16x164, resb 256
NEWSYM scadsng, times 256 db 0
NEWSYM scadtng, times 256 db 0
NEWSYM intrlng, resb 256
NEWSYM mode7hr, resb 256
NEWSYM scbcong, times 256 dw 0
NEWSYM scadsng, resb 256
NEWSYM scadtng, resb 256
NEWSYM cpalval, times 256 dd 0
NEWSYM cgfxmod, times 256 db 0
NEWSYM scbcong, resw 256
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 winbgbackenval, times 256 db 0
NEWSYM winlogicaval, times 256 dw 0
NEWSYM cpalval, resd 256
NEWSYM cgfxmod, resb 256
NEWSYM winbg1envals, times 256 db 0
NEWSYM winbg2envals, times 256 db 0
NEWSYM winbg3envals, times 256 db 0
NEWSYM winbg4envals, times 256 db 0
NEWSYM winbgobjenvals, times 256 db 0
NEWSYM winbgbackenvals, times 256 db 0
NEWSYM winbg1envalm, times 256 db 0
NEWSYM winbg2envalm, times 256 db 0
NEWSYM winbg3envalm, times 256 db 0
NEWSYM winbg4envalm, times 256 db 0
NEWSYM winbgobjenvalm, times 256 db 0
NEWSYM winbgbackenvalm, times 256 db 0
NEWSYM winboundary, resd 256
NEWSYM winbg1enval, resb 256
NEWSYM winbg2enval, resb 256
NEWSYM winbg3enval, resb 256
NEWSYM winbg4enval, resb 256
NEWSYM winbgobjenval, resb 256
NEWSYM winbgbackenval, resb 256
NEWSYM winlogicaval, resw 256
NEWSYM FillSubScr, times 256 db 0
NEWSYM winbg1envals, resb 256
NEWSYM winbg2envals, resb 256
NEWSYM winbg3envals, resb 256
NEWSYM winbg4envals, resb 256
NEWSYM winbgobjenvals, resb 256
NEWSYM winbgbackenvals, resb 256
NEWSYM winbg1envalm, resb 256
NEWSYM winbg2envalm, resb 256
NEWSYM winbg3envalm, resb 256
NEWSYM winbg4envalm, resb 256
NEWSYM winbgobjenvalm, resb 256
NEWSYM winbgbackenvalm, resb 256
NEWSYM FillSubScr, resb 256
NEWSYM objclineptr, resd 256 ; l1,r1,l2,r2,en,log,ptr
SECTION .data
NEWSYM objclineptr, times 256 dd 0 ; l1,r1,l2,r2,en,log,ptr
NEWSYM objwlrpos , times 256 dd 0FFFFFFFFh
NEWSYM objwen , times 256 dw 0FFFFh ; en,log
NEWSYM SpecialLine, times 256 db 0
SECTION .bss
NEWSYM bgallchange, times 256 db 0
NEWSYM bg1change, times 256 db 0
NEWSYM bg2change, times 256 db 0
NEWSYM bg3change, times 256 db 0
NEWSYM bg4change, times 256 db 0
NEWSYM bgwinchange, times 256 db 0
NEWSYM SpecialLine, resb 256
NEWSYM PrevPicture, times 64*56*2 db 0
NEWSYM bgallchange, resb 256
NEWSYM bg1change, resb 256
NEWSYM bg2change, resb 256
NEWSYM bg3change, resb 256
NEWSYM bg4change, resb 256
NEWSYM bgwinchange, resb 256
NEWSYM PrevPicture, resb 64*56*2
NEWSYM EndMemAsmEnd

View File

@@ -760,18 +760,18 @@ SECTION .text
; Variable section
;*******************************************************
SECTION .data
SECTION .bss
ALIGN32
NEWSYM vrama, times 65536 db 0
NEWSYM mode7tab, times 65536 db 0
NEWSYM srama, times 65536*2 db 0
NEWSYM debugbufa, times 10000 db 0
NEWSYM wramreadptr, dd 0
NEWSYM regptra, times 49152 db 0
NEWSYM wramwriteptr, dd 0
NEWSYM regptwa, times 49152 db 0
NEWSYM vrama, resb 65536
NEWSYM mode7tab, resb 65536
NEWSYM srama, resb 65536*2
NEWSYM debugbufa, resb 10000
NEWSYM wramreadptr, resd 1
NEWSYM regptra, resb 49152
NEWSYM wramwriteptr, resd 1
NEWSYM regptwa, resb 49152
; vcache.asm
@@ -779,31 +779,31 @@ NEWSYM regptwa, times 49152 db 0
; vesa2.asm
NEWSYM fulladdtab, times 65536 dw 0
NEWSYM fulladdtab, resw 65536
; init.asm
NEWSYM echobuf, times 90000 db 0
NEWSYM echobuf, resb 90000
; dspproc.asm
NEWSYM spcRamcmp, times 65536 db 0
NEWSYM VolumeConvTable, times 32768 dw 0
NEWSYM dspWptr, times 256 dd 0
NEWSYM dspRptr, times 256 dd 0
NEWSYM NoiseData, times 32768 db 0
NEWSYM spcRamcmp, resb 65536
NEWSYM VolumeConvTable, resw 32768
NEWSYM dspWptr, resd 256
NEWSYM dspRptr, resd 256
NEWSYM NoiseData, resb 32768
; makevid.asm
; makevid.asm
NEWSYM vcache2ba, times 262144+256 db 0
NEWSYM vcache4ba, times 131072+256 db 0
NEWSYM vcache8ba, times 65536+256 db 0
NEWSYM vcache2ba, resb 262144+256
NEWSYM vcache4ba, resb 131072+256
NEWSYM vcache8ba, resb 65536+256
ZSNESBase dd 0
BlockSize dd 0 ; Set before calling
LinearAddress dd 0 ; Returned by function
BlockHandle dd 0 ; Returned by function
ZSNESAddress dd 0 ; Returned by function
ZSNESBase resd 1
BlockSize resd 1 ; Set before calling
LinearAddress resd 1 ; Returned by function
BlockHandle resd 1 ; Returned by function
ZSNESAddress resd 1 ; Returned by function
SECTION .text