Removed useless spaces. Removed addrni.asm from Sconstruct and updated the build instructions for the tools.

This commit is contained in:
jbo_85
2005-07-12 14:19:01 +00:00
parent dba28a70f0
commit 707c6f50c2
35 changed files with 3124 additions and 3125 deletions

View File

@@ -144,17 +144,17 @@ SECTION .text
NEWSYM FxOp00 ; STOP stop GSU execution (and maybe generate an IRQ) ; Verified.
FETCHPIPE
mov [SfxPIPE],cl
and dword [SfxSFR],0FFFFh-32 ; Clear Go flag (set to 1 when the GSU is running)
test dword [SfxCFGR],080h ; Check if the interrupt generation is on
and dword[SfxSFR],0FFFFh-32 ; Clear Go flag (set to 1 when the GSU is running)
test dword[SfxCFGR],080h ; Check if the interrupt generation is on
jnz .NoIRQ
or dword [SfxSFR],08000h ; Set IRQ Flag
or dword[SfxSFR],08000h ; Set IRQ Flag
.NoIRQ
CLRFLAGS
inc ebp
mov eax,[NumberOfOpcodes]
add eax,0F0000000h
add [ChangeOps],eax
mov dword [NumberOfOpcodes],1
mov dword[NumberOfOpcodes],1
mov dword[SFXProc],0
xor cl,cl
ret
@@ -170,12 +170,12 @@ NEWSYM FxOp02 ; CACHE reintialize GSU cache
FETCHPIPE
sub eax,[SfxCPB]
and eax,0FFF0h
cmp dword [SfxCBR],eax
cmp dword[SfxCBR],eax
je .SkipUpdate
cmp byte [SfxCacheActive],1
cmp byte[SfxCacheActive],1
je .SkipUpdate
mov dword [SfxCBR],eax
mov dword [SfxCacheActive],1
mov dword[SfxCBR],eax
mov dword[SfxCacheActive],1
call FlushCache
.SkipUpdate
CLRFLAGS
@@ -190,7 +190,7 @@ NEWSYM FxOp03 ; LSR logic shift right ; Verified.
shr ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
ret
@@ -438,10 +438,10 @@ NEWSYM FxOp2E ; WITH set register n as source and destination register
FETCHPIPE
mov esi,SfxR0+14*4
mov edi,SfxR0+14*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp
call [FxTablec+ecx*4]
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
mov esi,SfxR0
mov edi,SfxR0
UpdateR14
@@ -450,7 +450,7 @@ NEWSYM FxOp2F ; WITH set register n as source and destination register
FETCHPIPE
mov esi,SfxR0+15*4
mov edi,SfxR0+15*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp
mov eax,ebp
sub eax,[SfxCPB]
@@ -462,7 +462,7 @@ NEWSYM FxOp2F ; WITH set register n as source and destination register
mov ebp,[SfxCPB]
add ebp,[SfxR15]
.skip
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
mov esi,SfxR0
mov edi,SfxR0
ret
@@ -518,13 +518,13 @@ NEWSYM FxOp3BA1 ; STB RN store byte
STBRN 11
NEWSYM FxOp3C ; LOOP decrement loop counter, and branch on not zero ; V
dec word [SfxR12] ; decrement loop counter
dec word[SfxR12] ; decrement loop counter
FETCHPIPE
mov eax,[SfxR12]
mov [SfxSignZero],eax
or eax,eax
jz .NoBranch
mov eax,dword [SfxR13]
mov eax,dword[SfxR13]
mov ebp,[SfxCPB]
add ebp,eax
CLRFLAGS
@@ -536,7 +536,7 @@ NEWSYM FxOp3C ; LOOP decrement loop counter, and branch on not zero ; V
NEWSYM FxOp3D ; ALT1 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,01h
inc ebp
call [FxTable+ecx*4]
@@ -545,7 +545,7 @@ NEWSYM FxOp3D ; ALT1 set alt1 mode ; Verified.
NEWSYM FxOp3E ; ALT2 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,02h
inc ebp
call [FxTable+ecx*4]
@@ -554,7 +554,7 @@ NEWSYM FxOp3E ; ALT2 set alt1 mode ; Verified.
NEWSYM FxOp3F ; ALT3 set alt3 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,03h
inc ebp
call [FxTable+ecx*4]
@@ -723,7 +723,7 @@ NEWSYM FxOp4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+17],bl
.nodraw4_16
.nodraw
inc word [SfxR1]
inc word[SfxR1]
ret
.colors4
@@ -769,7 +769,7 @@ NEWSYM FxOp4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+1], bl
.nodraw2_4
.noplot_4
inc word [SfxR1]
inc word[SfxR1]
ret
.colors256
@@ -842,7 +842,7 @@ NEWSYM FxOp4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+49],bl
.nodraw8_256
.noplot_256
inc word [SfxR1]
inc word[SfxR1]
ret
SECTION .bss
@@ -1097,7 +1097,7 @@ NEWSYM FxOp4EA1 ; CMODE set plot option register ; V
FETCHPIPE
mov eax,[esi] ; Read Source
inc ebp ; Increase program counter
mov dword [SfxPOR],eax
mov dword[SfxPOR],eax
test byte[SfxPOR],10h
jnz .objmode
@@ -1132,10 +1132,10 @@ NEWSYM FxOp4EA1 ; CMODE set plot option register ; V
or al,bl
mov ebx,[PLOTJmpb+eax*4]
mov eax,[PLOTJmpa+eax*4]
mov dword [FxTable+4Ch*4],eax
mov dword [FxTableb+4Ch*4],eax
mov dword [FxTablec+4Ch*4],eax
mov dword [FxTabled+4Ch*4],ebx
mov dword[FxTable+4Ch*4],eax
mov dword[FxTableb+4Ch*4],eax
mov dword[FxTablec+4Ch*4],eax
mov dword[FxTabled+4Ch*4],ebx
pop ebx
CLRFLAGS
@@ -1480,8 +1480,8 @@ NEWSYM FxOp70 ; MERGE R7 as upper byte, R8 as lower byte (used for texture
; V
xor eax,eax
FETCHPIPE
mov ah,byte [SfxR7+1]
mov al,byte [SfxR8+1]
mov ah,byte[SfxR7+1]
mov al,byte[SfxR8+1]
inc ebp
mov [edi],eax ; Write Destination
mov dword[SfxSignZero],0001h
@@ -1491,17 +1491,17 @@ NEWSYM FxOp70 ; MERGE R7 as upper byte, R8 as lower byte (used for texture
.nozero
test eax,08080h
jz .nosign
or dword [SfxSignZero],80000h
or dword[SfxSignZero],80000h
.nosign
mov dword [SfxOverflow],1
mov dword[SfxOverflow],1
test ax,0c0c0h
jnz .Overflow
mov dword [SfxOverflow],0
mov dword[SfxOverflow],0
.Overflow
mov dword [SfxCarry],1
mov dword[SfxCarry],1
test ax,0e0e0h
jnz .Carry
mov dword [SfxCarry],0
mov dword[SfxCarry],0
.Carry
CLRFLAGS
ret
@@ -1541,7 +1541,7 @@ NEWSYM FxOp7F ; AND RN register & register
sub ebx,[SfxCPB]
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
@@ -1582,7 +1582,7 @@ NEWSYM FxOp7FA1 ; BIC RN register & ~register
xor ebx,0FFFFh
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
@@ -1682,7 +1682,7 @@ NEWSYM FxOp8E ; MULTRN 8 bit to 16 bit signed multiply, register * register
NEWSYM FxOp8F ; MULTRN 8 bit to 16 bit signed multiply, register * register
FETCHPIPE
mov ebx,ebp
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
sub ebx,[SfxCPB]
imul bl
inc ebp
@@ -1725,7 +1725,7 @@ NEWSYM FxOp8EA1 ; UMULRN 8 bit to 16 bit unsigned multiply, register * regist
NEWSYM FxOp8FA1 ; UMULRN 8 bit to 16 bit unsigned multiply, register * register
FETCHPIPE
mov ebx,ebp
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
sub ebx,[SfxCPB]
mul bl
inc ebp
@@ -1824,7 +1824,7 @@ NEWSYM FxOp94 ; LINK#n R11 = R15 + immediate
LINK 4
NEWSYM FxOp95 ; SEX sign extend 8 bit to 16 bit ; V
movsx eax, byte [esi] ; Read Source
movsx eax, byte[esi] ; Read Source
FETCHPIPE
and eax,0FFFFh
inc ebp
@@ -1841,7 +1841,7 @@ NEWSYM FxOp96 ; ASR aritmethic shift right by one ; V
sar ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
ret
@@ -1855,7 +1855,7 @@ NEWSYM FxOp96A1 ; DIV2 aritmethic shift right by one ; V
sar ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
ret
.minusone
@@ -1863,7 +1863,7 @@ NEWSYM FxOp96A1 ; DIV2 aritmethic shift right by one ; V
xor eax,eax
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
ret
@@ -1912,7 +1912,7 @@ NEWSYM FxOp9E ; LOB set upper byte to zero (keep low byte) ; V
inc ebp
mov [edi],eax ; Write Destination
shl eax,8
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
ret
@@ -2026,7 +2026,7 @@ NEWSYM FxOpAEA1 ; LMS rn,(yy) load word from RAM (short address)
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
inc ebp
mov [SfxR0+14*4],bx ; Write data
@@ -2040,7 +2040,7 @@ NEWSYM FxOpAFA1 ; LMS rn,(yy) load word from RAM (short address)
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
and ebx,0FFFFh
mov ebp,[SfxCPB]
@@ -2087,7 +2087,7 @@ NEWSYM FxOpAFA2 ; SMS (yy),rn store word in RAM (short address)
add eax,eax
FETCHPIPE
add eax,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
inc ebp
mov [eax],bx ; Write word to ram
CLRFLAGS
@@ -2138,7 +2138,7 @@ NEWSYM FxOpC0 ; HIB move high-byte to low-byte ; V
mov eax,[esi] ; Read Source
FETCHPIPE
and eax,0FF00h
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
shr eax,8
inc ebp
mov [edi],eax
@@ -2382,10 +2382,10 @@ NEWSYM FxOpDFA2 ; RAMB set current RAM bank ; Verified
FETCHPIPE
dec ebx
and eax,ebx
mov dword [SfxRAMBR],eax
mov dword[SfxRAMBR],eax
shl eax,16
add eax,[sfxramdata]
mov dword [SfxRAMMem],eax
mov dword[SfxRAMMem],eax
CLRFLAGS
inc ebp
ret
@@ -2394,7 +2394,7 @@ NEWSYM FxOpDFA3 ; ROMB set current ROM bank ; Verified
mov eax,[esi] ; Read Source
and eax,07Fh
FETCHPIPE
mov dword [SfxROMBR],eax
mov dword[SfxROMBR],eax
mov eax,[SfxMemTable+eax*4]
mov [SfxCROM],eax
CLRFLAGS
@@ -2575,7 +2575,7 @@ NEWSYM FxOpFEA1 ; LM RN,(XX) load word from RAM
xor eax,1
add ebp,3
mov dh,[eax+ebx]
mov word [SfxR0+14*4],dx ; Store Word
mov word[SfxR0+14*4],dx ; Store Word
UpdateR14
CLRFLAGS
ret
@@ -2675,7 +2675,7 @@ NEWSYM MainLoop
ALIGN16
.LoopAgain
call [FxTable+ecx*4]
dec dword [NumberOfOpcodes]
dec dword[NumberOfOpcodes]
jnz .LoopAgain
.EndLoop
NEWSYM FXEndLoop

View File

@@ -44,9 +44,9 @@
%endmacro
%macro CLRFLAGS 0
;and dword [SfxSFR],0FFFFh-0100h-0200h-1000h ; Clear ALT1,ALT2 and B Flags
;and dword[SfxSFR],0FFFFh-0100h-0200h-1000h ; Clear ALT1,ALT2 and B Flags
; xor ch,ch
; mov dword [SfxB],0 ; Clear B Flag
; mov dword[SfxB],0 ; Clear B Flag
; mov esi,SfxR0
; mov edi,SfxR0
%endmacro
@@ -64,20 +64,20 @@
FETCHPIPE
mov esi,SfxR0+%1*4
mov edi,SfxR0+%1*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp ; Increase program counter
call [FxTablec+ecx*4]
mov esi,SfxR0
mov edi,SfxR0
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
ret
%endmacro
%macro STWRN 1 ; V
mov eax,[SfxR0+%1*4] ; Read register
mov ebx,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
add dword [SfxLastRamAdr],ebx ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
add dword[SfxLastRamAdr],ebx ; Save last ram address
mov edx,[esi] ; Read Source
FETCHPIPE
mov [ebx+eax],dl ; Store Word
@@ -92,9 +92,9 @@
mov eax,[SfxR0+%1*4] ; Read register
FETCHPIPE
add eax,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
mov ebx,[esi] ; Read Source
mov byte [eax],bl ; Store Byte
mov byte[eax],bl ; Store Byte
CLRFLAGS
inc ebp ; Increase program counter
ret
@@ -103,10 +103,10 @@
%macro LDWRN 1 ; V
mov eax,[SfxR0+%1*4] ; Read register
mov ebx,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
FETCHPIPE
mov dl,[ebx+eax] ; Store Word
add dword [SfxLastRamAdr],ebx ; Save last ram address
add dword[SfxLastRamAdr],ebx ; Save last ram address
xor eax,1
and edx,0FFFFh
inc ebp ; Increase program counter
@@ -121,7 +121,7 @@
FETCHPIPE
add eax,[SfxRAMMem]
xor ebx,ebx
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
mov bl,[eax] ; Read Byte
inc ebp ; Increase program counter
mov [edi],ebx ; Store Result
@@ -248,7 +248,7 @@
test bl,01h
jz near .nodither4b
%4
inc word [SfxR1]
inc word[SfxR1]
%1
.nodither4b
%2
@@ -269,7 +269,7 @@
test bl,01h
jz .nodither4b
%4
inc word [SfxR1]
inc word[SfxR1]
%1
.nodither4b
%2
@@ -286,7 +286,7 @@
je near .nodraw
%1 ret, drawpix4b, 5, drawpix4bd, 0Fh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
ret
%endmacro
@@ -301,7 +301,7 @@
je near .nodraw
%1 FXReturn, drawpix4b, 5, drawpix4bd, 0Fh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
FXReturn
%endmacro
@@ -316,7 +316,7 @@
je near .nodraw
%1 ret, drawpix2b, 4, drawpix2bd, 03h
.nodraw
inc word [SfxR1]
inc word[SfxR1]
ret
%endmacro
@@ -331,7 +331,7 @@
je near .nodraw
%1 FXReturn, drawpix2b, 4, drawpix2bd, 03h
.nodraw
inc word [SfxR1]
inc word[SfxR1]
FXReturn
%endmacro
@@ -346,7 +346,7 @@
je near .nodraw
%1 ret, drawpix8b, 6, drawpix8bd, 0FFh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
ret
%endmacro
@@ -361,7 +361,7 @@
je near .nodraw
%1 FXReturn, drawpix8b, 6, drawpix8bd, 0FFh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
FXReturn
%endmacro
@@ -376,7 +376,7 @@
je near .nodraw
%1 ret, drawpix8b, 6, drawpix8bd, 0Fh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
ret
%endmacro
@@ -391,7 +391,7 @@
je near .nodraw
%1 FXReturn, drawpix8b, 6, drawpix8bd, 0Fh
.nodraw
inc word [SfxR1]
inc word[SfxR1]
FXReturn
%endmacro
@@ -516,7 +516,7 @@
FETCHPIPE
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
@@ -529,7 +529,7 @@
FETCHPIPE
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
@@ -540,7 +540,7 @@
FETCHPIPE
and eax,%1
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
@@ -551,15 +551,15 @@
FETCHPIPE
and eax,%1
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
ret
%endmacro
%macro MULTRN 1 ; V
mov al,byte [esi] ; Read Source
mov bl,byte [SfxR0+%1*4] ; Read RN
mov al,byte[esi] ; Read Source
mov bl,byte[SfxR0+%1*4] ; Read RN
FETCHPIPE
imul bl
inc ebp
@@ -571,8 +571,8 @@
%endmacro
%macro UMULTRN 1 ; V
mov al,byte [esi] ; Read Source
mov bl,byte [SfxR0+%1*4] ; Read RN
mov al,byte[esi] ; Read Source
mov bl,byte[SfxR0+%1*4] ; Read RN
FETCHPIPE
mul bl
inc ebp
@@ -584,7 +584,7 @@
%endmacro
%macro MULTIRN 1 ; V
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
mov bl,%1 ; Read RN
FETCHPIPE
imul bl
@@ -597,7 +597,7 @@
%endmacro
%macro UMULTIRN 1 ; V
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
mov bl,%1 ; Read RN
FETCHPIPE
mul bl
@@ -614,7 +614,7 @@
sub eax,[SfxCPB]
add eax,%1
FETCHPIPE
mov word [SfxR11],ax
mov word[SfxR11],ax
CLRFLAGS
inc ebp
ret
@@ -639,7 +639,7 @@
mov [SfxCPB],eax
mov ebp,eax
add ebp,[esi] ; Read RN
mov dword [SfxCacheActive],0
mov dword[SfxCacheActive],0
push ecx
call FxOp02
pop ecx
@@ -663,7 +663,7 @@
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
inc ebp
mov [SfxR0+%1*4],bx ; Write data
@@ -679,7 +679,7 @@
mov cl,[ebp]
add eax,[SfxRAMMem]
mov ebx,[SfxR0+%1*4] ; Read data
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
inc ebp
mov [eax],bx ; Write word to ram
CLRFLAGS
@@ -783,7 +783,7 @@
xor eax,1
add ebp,3
mov dh,[eax+ebx]
mov word [SfxR0+%1*4],dx ; Store Word
mov word[SfxR0+%1*4],dx ; Store Word
CLRFLAGS
ret
%endmacro
@@ -817,7 +817,7 @@
mov eax,[SfxRAMBR]
shl eax,16
add eax,[sfxramdata]
mov dword [SfxRAMMem],eax
mov dword[SfxRAMMem],eax
%endmacro
%macro UnPackEsiEdi 0

View File

@@ -215,7 +215,7 @@ NEWSYM FxOpb1D ; TO RN set register n as destination register
TORNb 13
NEWSYM FxOpb1E ; TO RN set register n as destination register
FETCHPIPE
test dword [SfxB],1
test dword[SfxB],1
jnz .VersionB
mov edi,SfxR0+14*4
inc ebp
@@ -237,7 +237,7 @@ NEWSYM FxOpb1E ; TO RN set register n as destination register
ret
NEWSYM FxOpb1F ; TO RN set register n as destination register
FETCHPIPE
test dword [SfxB],1
test dword[SfxB],1
jnz .VersionB
mov edi,SfxR0+15*4
inc ebp
@@ -260,7 +260,7 @@ NEWSYM FxOpb1F ; TO RN set register n as destination register
NEWSYM FxOpb3D ; ALT1 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,01h
inc ebp
mov eax,ebp
@@ -272,7 +272,7 @@ NEWSYM FxOpb3D ; ALT1 set alt1 mode ; Verified.
NEWSYM FxOpb3E ; ALT2 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,02h
inc ebp
mov eax,ebp
@@ -284,7 +284,7 @@ NEWSYM FxOpb3E ; ALT2 set alt1 mode ; Verified.
NEWSYM FxOpb3F ; ALT3 set alt3 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,03h
inc ebp
mov eax,ebp
@@ -325,7 +325,7 @@ NEWSYM FxOpbBD ; FROM rn set source register
NEWSYM FxOpbBE ; FROM rn set source register
FROMRNb 14
NEWSYM FxOpbBF ; FROM rn set source register
test dword [SfxB],1
test dword[SfxB],1
jnz .VersionB
mov esi,SfxR0+15*4
inc ebp ; Increase program counter
@@ -548,7 +548,7 @@ NEWSYM FxOpc1F ; TO RN set register n as destination register
NEWSYM FxOpc3D ; ALT1 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,01h
inc ebp
call [FxTablec+ecx*4]
@@ -557,7 +557,7 @@ NEWSYM FxOpc3D ; ALT1 set alt1 mode ; Verified.
NEWSYM FxOpc3E ; ALT2 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,02h
inc ebp
call [FxTablec+ecx*4]
@@ -566,7 +566,7 @@ NEWSYM FxOpc3E ; ALT2 set alt1 mode ; Verified.
NEWSYM FxOpc3F ; ALT3 set alt3 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,03h
inc ebp
call [FxTablec+ecx*4]

View File

@@ -28,7 +28,7 @@
%macro TORNb 1 ; V
FETCHPIPE
test dword [SfxB],1
test dword[SfxB],1
jnz .VersionB
mov edi, SfxR0+%1*4
inc ebp ; Increase program counter
@@ -50,7 +50,7 @@
%macro FROMRNb 1 ; V
FETCHPIPE
test dword [SfxB],1
test dword[SfxB],1
jnz .VersionB
mov esi,SfxR0+%1*4
inc ebp ; Increase program counter

View File

@@ -46,17 +46,17 @@ ALIGN32
NEWSYM FxOpd00 ; STOP stop GSU execution (and maybe generate an IRQ) ; Verified.
FETCHPIPE
mov [SfxPIPE],cl
and dword [SfxSFR],0FFFFh-32 ; Clear Go flag (set to 1 when the GSU is running)
test dword [SfxCFGR],080h ; Check if the interrupt generation is on
and dword[SfxSFR],0FFFFh-32 ; Clear Go flag (set to 1 when the GSU is running)
test dword[SfxCFGR],080h ; Check if the interrupt generation is on
jnz .NoIRQ
or dword [SfxSFR],08000h ; Set IRQ Flag
or dword[SfxSFR],08000h ; Set IRQ Flag
.NoIRQ
CLRFLAGS
inc ebp
mov eax,[NumberOfOpcodes]
add eax,0F0000000h
add [ChangeOps],eax
mov dword [NumberOfOpcodes],1
mov dword[NumberOfOpcodes],1
jmp FXEndLoop
FXReturn
@@ -71,12 +71,12 @@ NEWSYM FxOpd02 ; CACHE reintialize GSU cache
FETCHPIPE
sub eax,[SfxCPB]
and eax,0FFF0h
cmp dword [SfxCBR],eax
cmp dword[SfxCBR],eax
je .SkipUpdate
cmp byte [SfxCacheActive],1
cmp byte[SfxCacheActive],1
je .SkipUpdate
mov dword [SfxCBR],eax
mov dword [SfxCacheActive],1
mov dword[SfxCBR],eax
mov dword[SfxCacheActive],1
call FlushCache
.SkipUpdate
CLRFLAGS
@@ -91,7 +91,7 @@ NEWSYM FxOpd03 ; LSR logic shift right ; Verified.
shr ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
FXReturn
@@ -339,10 +339,10 @@ NEWSYM FxOpd2E ; WITH set register n as source and destination register
FETCHPIPE
mov esi,SfxR0+14*4
mov edi,SfxR0+14*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp
call [FxTablec+ecx*4]
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
mov esi,SfxR0
mov edi,SfxR0
UpdateR14
@@ -351,7 +351,7 @@ NEWSYM FxOpd2F ; WITH set register n as source and destination register
FETCHPIPE
mov esi,SfxR0+15*4
mov edi,SfxR0+15*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp
mov eax,ebp
sub eax,[SfxCPB]
@@ -363,7 +363,7 @@ NEWSYM FxOpd2F ; WITH set register n as source and destination register
mov ebp,[SfxCPB]
add ebp,[SfxR15]
.skip
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
mov esi,SfxR0
mov edi,SfxR0
FXReturn
@@ -419,13 +419,13 @@ NEWSYM FxOpd3BA1 ; STB RN store byte
STBRNc 11
NEWSYM FxOpd3C ; LOOP decrement loop counter, and branch on not zero ; V
dec word [SfxR12] ; decrement loop counter
dec word[SfxR12] ; decrement loop counter
FETCHPIPE
mov eax,[SfxR12]
mov [SfxSignZero],eax
or eax,eax
jz .NoBranch
mov eax,dword [SfxR13]
mov eax,dword[SfxR13]
mov ebp,[SfxCPB]
add ebp,eax
CLRFLAGS
@@ -437,7 +437,7 @@ NEWSYM FxOpd3C ; LOOP decrement loop counter, and branch on not zero ; V
NEWSYM FxOpd3D ; ALT1 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,01h
inc ebp
call [FxTable+ecx*4]
@@ -446,7 +446,7 @@ NEWSYM FxOpd3D ; ALT1 set alt1 mode ; Verified.
NEWSYM FxOpd3E ; ALT2 set alt1 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,02h
inc ebp
call [FxTable+ecx*4]
@@ -455,7 +455,7 @@ NEWSYM FxOpd3E ; ALT2 set alt1 mode ; Verified.
NEWSYM FxOpd3F ; ALT3 set alt3 mode ; Verified.
FETCHPIPE
mov dword [SfxB],0
mov dword[SfxB],0
or ch,03h
inc ebp
call [FxTable+ecx*4]
@@ -626,7 +626,7 @@ NEWSYM FxOpd4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+17],bl
.nodraw4_16
.nodraw
inc word [SfxR1]
inc word[SfxR1]
FXReturn
.colors4
@@ -672,7 +672,7 @@ NEWSYM FxOpd4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+1], bl
.nodraw2_4
.noplot_4
inc word [SfxR1]
inc word[SfxR1]
FXReturn
.colors256
@@ -745,7 +745,7 @@ NEWSYM FxOpd4C ; PLOT plot pixel with R1,R2 as x,y and the color register
or byte[eax+49],bl
.nodraw8_256
.noplot_256
inc word [SfxR1]
inc word[SfxR1]
FXReturn
SECTION .bss
@@ -998,7 +998,7 @@ NEWSYM FxOpd4EA1 ; CMODE set plot option register ; V
FETCHPIPE
mov eax,[esi] ; Read Source
inc ebp ; Increase program counter
mov dword [SfxPOR],eax
mov dword[SfxPOR],eax
test byte[SfxPOR],10h
jnz .objmode
@@ -1034,10 +1034,10 @@ NEWSYM FxOpd4EA1 ; CMODE set plot option register ; V
mov ebx,[PLOTJmpb+eax*4]
mov eax,[PLOTJmpa+eax*4]
mov dword [FxTable+4Ch*4],eax
mov dword [FxTableb+4Ch*4],eax
mov dword [FxTablec+4Ch*4],eax
mov dword [FxTabled+4Ch*4],ebx
mov dword[FxTable+4Ch*4],eax
mov dword[FxTableb+4Ch*4],eax
mov dword[FxTablec+4Ch*4],eax
mov dword[FxTabled+4Ch*4],ebx
pop ebx
CLRFLAGS
@@ -1382,8 +1382,8 @@ NEWSYM FxOpd70 ; MERGE R7 as upper byte, R8 as lower byte (used for textur
; V
xor eax,eax
FETCHPIPE
mov ah,byte [SfxR7+1]
mov al,byte [SfxR8+1]
mov ah,byte[SfxR7+1]
mov al,byte[SfxR8+1]
inc ebp
mov [edi],eax ; Write Destination
mov dword[SfxSignZero],0001h
@@ -1393,17 +1393,17 @@ NEWSYM FxOpd70 ; MERGE R7 as upper byte, R8 as lower byte (used for textur
.nozero
test eax,08080h
jz .nosign
or dword [SfxSignZero],80000h
or dword[SfxSignZero],80000h
.nosign
mov dword [SfxOverflow],1
mov dword[SfxOverflow],1
test ax,0c0c0h
jnz .Overflow
mov dword [SfxOverflow],0
mov dword[SfxOverflow],0
.Overflow
mov dword [SfxCarry],1
mov dword[SfxCarry],1
test ax,0e0e0h
jnz .Carry
mov dword [SfxCarry],0
mov dword[SfxCarry],0
.Carry
CLRFLAGS
FXReturn
@@ -1443,7 +1443,7 @@ NEWSYM FxOpd7F ; AND RN register & register
sub ebx,[SfxCPB]
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
@@ -1484,7 +1484,7 @@ NEWSYM FxOpd7FA1 ; BIC RN register & ~register
xor ebx,0FFFFh
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
@@ -1584,7 +1584,7 @@ NEWSYM FxOpd8E ; MULTRNc 8 bit to 16 bit signed multiply, register * regist
NEWSYM FxOpd8F ; MULTRNc 8 bit to 16 bit signed multiply, register * register
FETCHPIPE
mov ebx,ebp
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
sub ebx,[SfxCPB]
imul bl
inc ebp
@@ -1627,7 +1627,7 @@ NEWSYM FxOpd8EA1 ; UMULRN 8 bit to 16 bit unsigned multiply, register * regis
NEWSYM FxOpd8FA1 ; UMULRN 8 bit to 16 bit unsigned multiply, register * register
FETCHPIPE
mov ebx,ebp
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
sub ebx,[SfxCPB]
mul bl
inc ebp
@@ -1726,7 +1726,7 @@ NEWSYM FxOpd94 ; LINKc#n R11 = R15 + immediate
LINKc 4
NEWSYM FxOpd95 ; SEX sign extend 8 bit to 16 bit ; V
movsx eax, byte [esi] ; Read Source
movsx eax, byte[esi] ; Read Source
FETCHPIPE
and eax,0FFFFh
inc ebp
@@ -1743,7 +1743,7 @@ NEWSYM FxOpd96 ; ASR aritmethic shift right by one ; V
sar ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
FXReturn
@@ -1757,7 +1757,7 @@ NEWSYM FxOpd96A1 ; DIV2 aritmethic shift right by one ; V
sar ax,1 ; logic shift right
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
FXReturn
.minusone
@@ -1765,7 +1765,7 @@ NEWSYM FxOpd96A1 ; DIV2 aritmethic shift right by one ; V
xor eax,eax
inc ebp ; Increase program counter
mov [edi],eax ; Write Destination
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
FXReturn
@@ -1814,7 +1814,7 @@ NEWSYM FxOpd9E ; LOB set upper byte to zero (keep low byte) ; V
inc ebp
mov [edi],eax ; Write Destination
shl eax,8
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
CLRFLAGS
FXReturn
@@ -1928,7 +1928,7 @@ NEWSYM FxOpdAEA1 ; LMS rn,(yy) load word from RAM (short address)
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
inc ebp
mov [SfxR0+14*4],bx ; Write data
@@ -1942,7 +1942,7 @@ NEWSYM FxOpdAFA1 ; LMS rn,(yy) load word from RAM (short address)
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
and ebx,0FFFFh
mov ebp,[SfxCPB]
@@ -1989,7 +1989,7 @@ NEWSYM FxOpdAFA2 ; SMS (yy),rn store word in RAM (short address)
add eax,eax
FETCHPIPE
add eax,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
inc ebp
mov [eax],bx ; Write word to ram
CLRFLAGS
@@ -2040,7 +2040,7 @@ NEWSYM FxOpdC0 ; HIB move high-byte to low-byte ; V
mov eax,[esi] ; Read Source
FETCHPIPE
and eax,0FF00h
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
shr eax,8
inc ebp
mov [edi],eax
@@ -2284,10 +2284,10 @@ NEWSYM FxOpdDFA2 ; RAMB set current RAM bank ; Verified
FETCHPIPE
dec ebx
and eax,ebx
mov dword [SfxRAMBR],eax
mov dword[SfxRAMBR],eax
shl eax,16
add eax,[sfxramdata]
mov dword [SfxRAMMem],eax
mov dword[SfxRAMMem],eax
CLRFLAGS
inc ebp
FXReturn
@@ -2296,7 +2296,7 @@ NEWSYM FxOpdDFA3 ; ROMB set current ROM bank ; Verified
mov eax,[esi] ; Read Source
and eax,07Fh
FETCHPIPE
mov dword [SfxROMBR],eax
mov dword[SfxROMBR],eax
mov eax,[SfxMemTable+eax*4]
mov [SfxCROM],eax
CLRFLAGS
@@ -2480,7 +2480,7 @@ NEWSYM FxOpdFEA1 ; LM RN,(XX) load word from RAM
xor eax,1
add ebp,3
mov dh,[eax+ebx]
mov word [SfxR0+14*4],dx ; Store Word
mov word[SfxR0+14*4],dx ; Store Word
UpdateR14
CLRFLAGS
FXReturn

View File

@@ -27,13 +27,13 @@
%macro FXReturn 0
dec dword [NumberOfOpcodes]
dec dword[NumberOfOpcodes]
jmp [FxTabled+ecx*4]
ALIGN32
%endmacro
%macro FXReturn2 0
dec dword [NumberOfOpcodes]
dec dword[NumberOfOpcodes]
js %%endloop
jmp [FxTabled+ecx*4]
%%endloop
@@ -55,20 +55,20 @@
FETCHPIPE
mov esi,SfxR0+%1*4
mov edi,SfxR0+%1*4
mov dword [SfxB],1
mov dword[SfxB],1
inc ebp ; Increase program counter
call [FxTablec+ecx*4]
mov esi,SfxR0
mov edi,SfxR0
mov dword [SfxB],0 ; Clear B Flag
mov dword[SfxB],0 ; Clear B Flag
FXReturn
%endmacro
%macro STWRNc 1 ; V
mov eax,[SfxR0+%1*4] ; Read register
mov ebx,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
add dword [SfxLastRamAdr],ebx ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
add dword[SfxLastRamAdr],ebx ; Save last ram address
mov edx,[esi] ; Read Source
FETCHPIPE
mov [ebx+eax],dl ; Store Word
@@ -83,9 +83,9 @@
mov eax,[SfxR0+%1*4] ; Read register
FETCHPIPE
add eax,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
mov ebx,[esi] ; Read Source
mov byte [eax],bl ; Store Byte
mov byte[eax],bl ; Store Byte
CLRFLAGS
inc ebp ; Increase program counter
FXReturn
@@ -94,10 +94,10 @@
%macro LDWRNc 1 ; V
mov eax,[SfxR0+%1*4] ; Read register
mov ebx,[SfxRAMMem]
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
FETCHPIPE
mov dl,[ebx+eax] ; Store Word
add dword [SfxLastRamAdr],ebx ; Save last ram address
add dword[SfxLastRamAdr],ebx ; Save last ram address
xor eax,1
and edx,0FFFFh
inc ebp ; Increase program counter
@@ -112,7 +112,7 @@
FETCHPIPE
add eax,[SfxRAMMem]
xor ebx,ebx
mov dword [SfxLastRamAdr],eax ; Save last ram address
mov dword[SfxLastRamAdr],eax ; Save last ram address
mov bl,[eax] ; Read Byte
inc ebp ; Increase program counter
mov [edi],ebx ; Store Result
@@ -241,7 +241,7 @@
FETCHPIPE
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
@@ -254,7 +254,7 @@
FETCHPIPE
and eax,ebx
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
@@ -265,7 +265,7 @@
FETCHPIPE
and eax,%1
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
@@ -276,15 +276,15 @@
FETCHPIPE
and eax,%1
inc ebp
mov dword [SfxSignZero],eax
mov dword[SfxSignZero],eax
mov [edi],eax ; Write Destination
CLRFLAGS
FXReturn
%endmacro
%macro MULTRNc 1 ; V
mov al,byte [esi] ; Read Source
mov bl,byte [SfxR0+%1*4] ; Read RN
mov al,byte[esi] ; Read Source
mov bl,byte[SfxR0+%1*4] ; Read RN
FETCHPIPE
imul bl
inc ebp
@@ -296,8 +296,8 @@
%endmacro
%macro UMULTRNc 1 ; V
mov al,byte [esi] ; Read Source
mov bl,byte [SfxR0+%1*4] ; Read RN
mov al,byte[esi] ; Read Source
mov bl,byte[SfxR0+%1*4] ; Read RN
FETCHPIPE
mul bl
inc ebp
@@ -309,7 +309,7 @@
%endmacro
%macro MULTIRNc 1 ; V
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
mov bl,%1 ; Read RN
FETCHPIPE
imul bl
@@ -322,7 +322,7 @@
%endmacro
%macro UMULTIRNc 1 ; V
mov al,byte [esi] ; Read Source
mov al,byte[esi] ; Read Source
mov bl,%1 ; Read RN
FETCHPIPE
mul bl
@@ -339,7 +339,7 @@
sub eax,[SfxCPB]
add eax,%1
FETCHPIPE
mov word [SfxR11],ax
mov word[SfxR11],ax
CLRFLAGS
inc ebp
FXReturn
@@ -364,7 +364,7 @@
mov [SfxCPB],eax
mov ebp,eax
add ebp,[esi] ; Read RN
mov dword [SfxCacheActive],0
mov dword[SfxCacheActive],0
push ecx
call FxOp02
pop ecx
@@ -388,7 +388,7 @@
inc ebp
add eax,[SfxRAMMem]
mov cl,[ebp]
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
mov ebx,[eax] ; Read word from ram
inc ebp
mov [SfxR0+%1*4],bx ; Write data
@@ -404,7 +404,7 @@
mov cl,[ebp]
add eax,[SfxRAMMem]
mov ebx,[SfxR0+%1*4] ; Read data
mov dword [SfxLastRamAdr],eax
mov dword[SfxLastRamAdr],eax
inc ebp
mov [eax],bx ; Write word to ram
CLRFLAGS
@@ -508,7 +508,7 @@
xor eax,1
add ebp,3
mov dh,[eax+ebx]
mov word [SfxR0+%1*4],dx ; Store Word
mov word[SfxR0+%1*4],dx ; Store Word
CLRFLAGS
FXReturn
%endmacro

File diff suppressed because it is too large Load Diff

View File

@@ -1606,7 +1606,7 @@ NEWSYM SA1Reset
mov ebx,snesmmap+%2*4
test al,80h
jz .noupper
cmp byte [NumofBanks],64
cmp byte[NumofBanks],64
jne .BSBigBank
and eax,1
.BSBigBank
@@ -1615,7 +1615,7 @@ NEWSYM SA1Reset
push eax
jmp .yesupper
.noupper
cmp byte [NumofBanks],64
cmp byte[NumofBanks],64
jne .BSBigBank2
and eax,1
.BSBigBank2

View File

@@ -491,7 +491,7 @@ NEWSYM reg301Fw
pop edx
inc word[SfxR15]
or byte[SfxSFR],20h
or dword [SfxSFR],08000h ; Set IRQ Flag
or dword[SfxSFR],08000h ; Set IRQ Flag
mov dword[SFXProc],1
; call StartSFXret
ret
@@ -504,7 +504,7 @@ NEWSYM reg3030w
; Disassemble Flags
test al,20h
jz .noexec
mov dword [NumberOfOpcodes],100
mov dword[NumberOfOpcodes],100
call StartSFX
.noexec
ret
@@ -563,7 +563,7 @@ NEWSYM reg303Cw ; RAMBR (Ram bank register)
mov bl,al
shl ebx,16
add ebx,[sfxramdata]
mov dword [SfxRAMMem],ebx
mov dword[SfxRAMMem],ebx
ret
NEWSYM reg303Dw ; Unused
ret

View File

@@ -40,7 +40,7 @@ NEWSYM setaaccessbankw8
and ecx,0fffh
mov ebx,[setaramdata]
mov [ebx+ecx],al
cmp byte [ebx+021h], 80h
cmp byte[ebx+021h], 80h
jnz .nosetenablew8
pushad
call ST010DoCommand
@@ -74,8 +74,8 @@ NEWSYM setaaccessbankw16
mov [ebx],al
jmp short .nosetenablew16
.nowrapw16
mov word [ebx+ecx],ax
cmp byte [ebx+021h], 80h
mov word[ebx+ecx],ax
cmp byte[ebx+021h], 80h
jnz .nosetenablew16
pushad
call ST010DoCommand