Cleaned up grinvader's changes, removed some really insane museam worthy code.
This commit is contained in:
@@ -1357,23 +1357,6 @@ NEWSYM endprog
|
||||
mov ebx,SRAMDir
|
||||
call Change_Dir
|
||||
|
||||
; EXTSYM SDD1Array,SDD1Entry,SDD1Sort
|
||||
; call SDD1Sort
|
||||
; jmp .nodecomppack
|
||||
; cmp byte[SDD1Enable],0
|
||||
; jne .yesdecomppack
|
||||
; cmp dword[SDD1Entry],0
|
||||
; je .nodecomppack
|
||||
;.yesdecomppack
|
||||
; mov edx,sdd1fname
|
||||
; call Create_File
|
||||
; mov bx,ax
|
||||
; mov edx,SDD1Array
|
||||
; mov ecx,[SDD1Entry]
|
||||
; call Write_File
|
||||
; call Close_File
|
||||
;.nodecomppack
|
||||
|
||||
cmp byte[sramsavedis],1
|
||||
je .nosram
|
||||
cmp dword[ramsize],0
|
||||
@@ -1489,9 +1472,6 @@ NEWSYM endprog
|
||||
;.nodeinitipx
|
||||
%endif
|
||||
jmp OSExit
|
||||
;SECTION .data
|
||||
;NEWSYM sdd1fname, db 'sdd1dat.dat',0,0
|
||||
;SECTION .text
|
||||
|
||||
NEWSYM interror
|
||||
stim
|
||||
|
||||
@@ -4923,11 +4923,6 @@ NEWSYM SA1RAMaccessbankw16b
|
||||
call SA1RAMaccessbankw8b
|
||||
ret
|
||||
|
||||
SECTION .bss
|
||||
;NEWSYM SDD1Array, resb 65536
|
||||
;NEWSYM SDD1Entry, resd 1
|
||||
;NEWSYM SDD1EntryPtr, resd 1
|
||||
;NEWSYM SDD1IdxXferSize, resd 1
|
||||
SECTION .text
|
||||
|
||||
%macro GetBankLog 1
|
||||
@@ -5036,292 +5031,4 @@ SECTION .bss
|
||||
.tmpbyte resb 1
|
||||
SECTION .text
|
||||
|
||||
|
||||
|
||||
|
||||
; File loading version
|
||||
;NEWSYM oldmemaccessbankr8sdd1
|
||||
; TestSDD1
|
||||
; jmp debugdecompress
|
||||
; call FillArray
|
||||
; mov byte[.found4],0
|
||||
|
||||
; cmp byte[AddrNoIncr],0
|
||||
; je near .failed
|
||||
; cmp dword[Sdd1Mode],2
|
||||
; je near .decompress
|
||||
|
||||
; mov [Sdd1Bank],ebx
|
||||
; mov [Sdd1Addr],ecx
|
||||
; mov [Sdd1NewAddr],ecx
|
||||
; Start Actual Decompressor
|
||||
; mov dword[Sdd1Mode],2
|
||||
; push edx
|
||||
; push eax
|
||||
; push ecx
|
||||
; mov dword[SDD1EntryPtr],0
|
||||
; mov eax,ebx
|
||||
; shl eax,16
|
||||
; mov ax,cx
|
||||
; and eax,0FFFFFh
|
||||
; shl eax,4
|
||||
; GetBankLog cl
|
||||
; or al,cl
|
||||
; cmp dx,8192 ;eax,4f1591h
|
||||
; jbe .nota
|
||||
; mov byte[debstop3],1
|
||||
;.nota
|
||||
; mov ecx,[SPC7110Entries]
|
||||
; mov edx,[spc7110romptr]
|
||||
; or ecx,ecx
|
||||
; jz .notfound
|
||||
;.loop
|
||||
; cmp dword[edx],eax
|
||||
; je .found2
|
||||
; add edx,12
|
||||
; dec ecx
|
||||
; jnz .loop
|
||||
; jmp .notfound
|
||||
;.found2
|
||||
; mov eax,[edx+8]
|
||||
; mov [SDD1IdxXferSize],eax
|
||||
; mov eax,[edx+4]
|
||||
; mov [SDD1EntryPtr],eax
|
||||
; mov byte[.found4],1
|
||||
;.notfound
|
||||
; pop ecx
|
||||
; pop eax
|
||||
; pop edx
|
||||
|
||||
; push eax
|
||||
|
||||
; cmp byte[.found4],1
|
||||
; jne near .logit
|
||||
; cmp edx,[SDD1IdxXferSize]
|
||||
; jbe near .nomore
|
||||
|
||||
;.logit
|
||||
; mov eax,[SDD1Entry]
|
||||
; cmp eax,65536
|
||||
; je near .nomore
|
||||
; push edx
|
||||
; xor edx,edx
|
||||
; or eax,eax
|
||||
; jz .noentries
|
||||
;.trynext
|
||||
; cmp byte[SDD1Array+edx],bl
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+1],ch
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+2],cl
|
||||
; jne .nomatch
|
||||
; jmp .found
|
||||
;.nomatch
|
||||
; add edx,8
|
||||
; cmp edx,eax
|
||||
; jne .trynext
|
||||
;.noentries
|
||||
; pop edx
|
||||
; mov [SDD1Array+eax],bl
|
||||
; mov [SDD1Array+eax+1],ch
|
||||
; mov [SDD1Array+eax+2],cl
|
||||
; mov [SDD1Array+eax+3],dh
|
||||
; mov [SDD1Array+eax+4],dl
|
||||
; push ebx
|
||||
; GetBankLog bl
|
||||
; cmp dword[SDD1EntryPtr],0
|
||||
; je .notthere
|
||||
; or bl,0F0h
|
||||
;.notthere
|
||||
; mov [SDD1Array+eax+7],bl
|
||||
; pop ebx
|
||||
; add dword[SDD1Entry],8
|
||||
;.nomore
|
||||
; pop eax
|
||||
; jmp .decompress
|
||||
;.found
|
||||
; mov eax,edx
|
||||
; pop edx
|
||||
; push ebx
|
||||
; mov ebx,eax
|
||||
; mov al,[SDD1Array+ebx+4]
|
||||
; mov ah,[SDD1Array+ebx+3]
|
||||
; cmp ax,dx
|
||||
; jae .notgreater
|
||||
; mov [SDD1Array+ebx+4],dl
|
||||
; mov [SDD1Array+ebx+3],dh
|
||||
;.notgreater
|
||||
; pop ebx
|
||||
; pop eax
|
||||
|
||||
;.decompress
|
||||
; cmp [Sdd1Bank],ebx
|
||||
; jne .nomoredec
|
||||
; cmp [Sdd1Addr],ecx
|
||||
; je .yesdec
|
||||
;.nomoredec
|
||||
; mov ebx,[snesmmap+ebx*4]
|
||||
; mov al,[ebx+ecx]
|
||||
; push eax
|
||||
; mov eax,memtabler8+0C0h*4
|
||||
; mov ebx,40h
|
||||
;.loopb
|
||||
; mov dword[eax],memaccessbankr8
|
||||
; add eax,4
|
||||
; dec ebx
|
||||
; jnz .loopb
|
||||
; pop eax
|
||||
; xor ebx,ebx
|
||||
; ret
|
||||
;.yesdec
|
||||
; cmp dword[SDD1EntryPtr],0
|
||||
; je .nodecompress
|
||||
; push ebx
|
||||
; mov ebx,[SDD1EntryPtr]
|
||||
; inc dword[SDD1EntryPtr]
|
||||
; mov al,[ebx]
|
||||
; pop ebx
|
||||
; ret
|
||||
;.nodecompress
|
||||
; mov al,0FFh
|
||||
; ret
|
||||
;.failed
|
||||
; push ebx
|
||||
; call .nomoredec
|
||||
; pop ebx
|
||||
; jmp memaccessbankr8
|
||||
; Start Debug Decompressor
|
||||
;SECTION .bss
|
||||
;.found4 resb 1
|
||||
;SECTION .text
|
||||
|
||||
;FillArray:
|
||||
; TestSDD1
|
||||
; push ecx
|
||||
; push eax
|
||||
; mov eax,[SDD1Entry]
|
||||
; cmp eax,65536
|
||||
; je near .nomore
|
||||
; push edx
|
||||
; xor edx,edx
|
||||
; or eax,eax
|
||||
; jz .noentries
|
||||
;.trynext
|
||||
; cmp byte[SDD1Array+edx],bl
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+1],ch
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+2],cl
|
||||
; jne .nomatch
|
||||
; jmp .found
|
||||
;.nomatch
|
||||
; add edx,8
|
||||
; cmp edx,eax
|
||||
; jne .trynext
|
||||
;.noentries
|
||||
; pop edx
|
||||
; mov [SDD1Array+eax],bl
|
||||
; mov [SDD1Array+eax+1],ch
|
||||
; mov [SDD1Array+eax+2],cl
|
||||
; mov [SDD1Array+eax+3],dh
|
||||
; mov [SDD1Array+eax+4],dl
|
||||
; push ebx
|
||||
; GetBankLog bl
|
||||
; mov [SDD1Array+eax+7],bl
|
||||
; pop ebx
|
||||
; add dword[SDD1Entry],8
|
||||
;.nomore
|
||||
; pop eax
|
||||
; jmp .decompress
|
||||
;.found
|
||||
; pop edx
|
||||
; pop eax
|
||||
;.decompress
|
||||
; pop ecx
|
||||
; ret
|
||||
|
||||
|
||||
;debugdecompress:
|
||||
; cmp byte[AddrNoIncr],0
|
||||
; je near .failed
|
||||
; cmp dword[Sdd1Mode],2
|
||||
; je near .decompress
|
||||
; TestSDD1
|
||||
; mov [Sdd1Bank],ebx
|
||||
; mov [Sdd1Addr],ecx
|
||||
; mov [Sdd1NewAddr],ecx
|
||||
; mov dword[Sdd1Mode],2
|
||||
; jmp .decompress ; comment this out to activate array
|
||||
; push eax
|
||||
; mov eax,[SDD1Entry]
|
||||
; cmp eax,65536
|
||||
; je near .nomore
|
||||
; push edx
|
||||
; xor edx,edx
|
||||
; or eax,eax
|
||||
; jz .noentries
|
||||
;.trynext
|
||||
; cmp byte[SDD1Array+edx],bl
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+1],ch
|
||||
; jne .nomatch
|
||||
; cmp byte[SDD1Array+edx+2],cl
|
||||
; jne .nomatch
|
||||
; jmp .found
|
||||
;.nomatch
|
||||
; add edx,8
|
||||
; cmp edx,eax
|
||||
; jne .trynext
|
||||
;.noentries
|
||||
; pop edx
|
||||
; mov [SDD1Array+eax],bl
|
||||
; mov [SDD1Array+eax+1],ch
|
||||
; mov [SDD1Array+eax+2],cl
|
||||
; mov [SDD1Array+eax+3],dh
|
||||
; mov [SDD1Array+eax+4],dl
|
||||
; push ebx
|
||||
; GetBankLog bl
|
||||
; mov [SDD1Array+eax+7],bl
|
||||
; pop ebx
|
||||
; add dword[SDD1Entry],8
|
||||
;.nomore
|
||||
; pop eax
|
||||
; jmp .decompress
|
||||
;.found
|
||||
; pop edx
|
||||
; pop eax
|
||||
;.decompress
|
||||
; cmp [Sdd1Bank],ebx
|
||||
; jne .nomoredec
|
||||
; cmp [Sdd1Addr],ecx
|
||||
; je .yesdec
|
||||
;.nomoredec
|
||||
; mov ebx,[snesmmap+ebx*4]
|
||||
; mov al,[ebx+ecx]
|
||||
; push eax
|
||||
; mov eax,memtabler8+0C0h*4
|
||||
; mov ebx,40h
|
||||
;.loop
|
||||
; mov dword[eax],memaccessbankr8
|
||||
; add eax,4
|
||||
; dec ebx
|
||||
; jnz .loop
|
||||
; pop eax
|
||||
; xor ebx,ebx
|
||||
; ret
|
||||
;.yesdec
|
||||
; push ecx
|
||||
; mov ecx,[Sdd1NewAddr]
|
||||
; mov ebx,[snesmmap+ebx*4]
|
||||
; mov al,[ebx+ecx]
|
||||
; xor ebx,ebx
|
||||
; inc word[Sdd1NewAddr]
|
||||
; pop ecx
|
||||
; ret
|
||||
;.failed
|
||||
; push ebx
|
||||
; call .nomoredec
|
||||
; pop ebx
|
||||
; jmp memaccessbankr8
|
||||
|
||||
NEWSYM MemoryAsmEnd
|
||||
|
||||
Reference in New Issue
Block a user