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

@@ -52,7 +52,6 @@ netsrc = Split('''
net/ztcp.c net/ztcp.c
''') ''')
cpusrc = Split(''' cpusrc = Split('''
cpu/addrni.asm
cpu/dma.asm cpu/dma.asm
cpu/dsp.asm cpu/dsp.asm
cpu/dspproc.asm cpu/dspproc.asm

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -1164,11 +1164,11 @@ NEWSYM ewj2hack, dd 0
section .text section .text
NEWSYM hdmatype2indirect NEWSYM hdmatype2indirect
cmp dword [ewj2hack],1 cmp dword[ewj2hack],1
jne near .notend jne near .notend
cmp byte [esi+1],40h ; Writing to spc cmp byte[esi+1],40h ; Writing to spc
jne near .notend jne near .notend
cmp byte [esi+10],0DAh ; first transfer cmp byte[esi+10],0DAh ; first transfer
jne near .notend jne near .notend
; EWJ2 HACK ; EWJ2 HACK
; int 3h ; int 3h
@@ -1181,7 +1181,7 @@ NEWSYM hdmatype2indirect
xor ecx,ecx xor ecx,ecx
xor edx,edx xor edx,edx
mov ax,word[spcRam+021h] ; load dest offset mov ax,word[spcRam+021h] ; load dest offset
mov dword [.dest],spcRam mov dword[.dest],spcRam
add [.dest],eax add [.dest],eax
mov dl,byte[esi+10] ; number of bytes to transfer mov dl,byte[esi+10] ; number of bytes to transfer
sub dl,80h sub dl,80h
@@ -1193,7 +1193,7 @@ NEWSYM hdmatype2indirect
inc word[esi+5] inc word[esi+5]
call dword near [memtabler8+ebx*4] call dword near [memtabler8+ebx*4]
mov ebx,[.dest] mov ebx,[.dest]
mov byte [ebx],al mov byte[ebx],al
inc ebx inc ebx
mov [.dest],ebx mov [.dest],ebx
xor ebx,ebx xor ebx,ebx
@@ -1203,7 +1203,7 @@ NEWSYM hdmatype2indirect
inc word[esi+5] inc word[esi+5]
call dword near [memtabler8+ebx*4] call dword near [memtabler8+ebx*4]
mov ebx,[.dest] mov ebx,[.dest]
mov byte [ebx],al mov byte[ebx],al
inc ebx inc ebx
mov [.dest],ebx mov [.dest],ebx
dec edx dec edx

View File

@@ -1094,11 +1094,11 @@ NEWSYM RDSPRegFF ;
push eax push eax
push ebx push ebx
push edx push edx
test byte [DSPMem+07h+%1*10h],80h test byte[DSPMem+07h+%1*10h],80h
jz near %%Direct jz near %%Direct
test byte [DSPMem+07h+%1*10h],40h test byte[DSPMem+07h+%1*10h],40h
jnz near %%Increase jnz near %%Increase
test byte [DSPMem+07h+%1*10h],20h test byte[DSPMem+07h+%1*10h],20h
jz %%LinearDec jz %%LinearDec
xor eax,eax xor eax,eax
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
@@ -1115,11 +1115,11 @@ NEWSYM RDSPRegFF ;
mov byte[GainDecBendDataDat+%1],127 mov byte[GainDecBendDataDat+%1],127
div ebx div ebx
neg eax neg eax
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],7 mov byte[Voice0State+%1],7
ret ret
%%LinearDec %%LinearDec
xor eax,eax xor eax,eax
@@ -1132,14 +1132,14 @@ NEWSYM RDSPRegFF ;
mov eax,127*65536 mov eax,127*65536
div ebx div ebx
neg eax neg eax
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],5 mov byte[Voice0State+%1],5
ret ret
%%Increase %%Increase
test byte [DSPMem+07h+%1*10h],20h test byte[DSPMem+07h+%1*10h],20h
jz %%LinearInc jz %%LinearInc
xor eax,eax xor eax,eax
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
@@ -1150,7 +1150,7 @@ NEWSYM RDSPRegFF ;
xor edx,edx xor edx,edx
mov eax,127*65536 mov eax,127*65536
div ebx div ebx
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
mov ebx,[Voice0Time+%1*4] mov ebx,[Voice0Time+%1*4]
mov eax,ebx mov eax,ebx
shr eax,2 shr eax,2
@@ -1160,7 +1160,7 @@ NEWSYM RDSPRegFF ;
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],6 mov byte[Voice0State+%1],6
ret ret
%%LinearInc %%LinearInc
xor eax,eax xor eax,eax
@@ -1172,23 +1172,23 @@ NEWSYM RDSPRegFF ;
xor edx,edx xor edx,edx
mov eax,127*65536 mov eax,127*65536
div ebx div ebx
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],3 mov byte[Voice0State+%1],3
ret ret
%%Direct %%Direct
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
and al,7Fh and al,7Fh
mov dword[Voice0EnvInc+%1*4],0 mov dword[Voice0EnvInc+%1*4],0
mov byte [Voice0EnvInc+%1*4+2],al mov byte[Voice0EnvInc+%1*4+2],al
mov dword [Voice0Time+%1*4],0FFFFFFFFh mov dword[Voice0Time+%1*4],0FFFFFFFFh
mov dword [Voice0IncNumber+%1*4],0 mov dword[Voice0IncNumber+%1*4],0
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],4 mov byte[Voice0State+%1],4
ret ret
%endmacro %endmacro
@@ -1196,11 +1196,11 @@ NEWSYM RDSPRegFF ;
push eax push eax
push ebx push ebx
push edx push edx
test byte [DSPMem+07h+%1*10h],80h test byte[DSPMem+07h+%1*10h],80h
jz near %%Direct jz near %%Direct
test byte [DSPMem+07h+%1*10h],40h test byte[DSPMem+07h+%1*10h],40h
jnz near %%Increase jnz near %%Increase
test byte [DSPMem+07h+%1*10h],20h test byte[DSPMem+07h+%1*10h],20h
jz %%LinearDec jz %%LinearDec
xor eax,eax xor eax,eax
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
@@ -1230,7 +1230,7 @@ NEWSYM RDSPRegFF ;
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],7 mov byte[Voice0State+%1],7
ret ret
%%LinearDec %%LinearDec
xor eax,eax xor eax,eax
@@ -1244,14 +1244,14 @@ NEWSYM RDSPRegFF ;
shl eax,16 shl eax,16
div ebx div ebx
neg eax neg eax
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],5 mov byte[Voice0State+%1],5
ret ret
%%Increase %%Increase
test byte [DSPMem+07h+%1*10h],20h test byte[DSPMem+07h+%1*10h],20h
jz %%LinearInc jz %%LinearInc
xor eax,eax xor eax,eax
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
@@ -1269,7 +1269,7 @@ NEWSYM RDSPRegFF ;
xor al,127 xor al,127
shl eax,16 shl eax,16
div ebx div ebx
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
mov ebx,[Voice0Time+%1*4] mov ebx,[Voice0Time+%1*4]
mov eax,ebx mov eax,ebx
shr eax,2 shr eax,2
@@ -1279,7 +1279,7 @@ NEWSYM RDSPRegFF ;
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],6 mov byte[Voice0State+%1],6
ret ret
%%LinearInc %%LinearInc
xor eax,eax xor eax,eax
@@ -1298,23 +1298,23 @@ NEWSYM RDSPRegFF ;
xor al,127 xor al,127
shl eax,16 shl eax,16
div ebx div ebx
mov dword [Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],3 mov byte[Voice0State+%1],3
ret ret
%%Direct %%Direct
mov al,[DSPMem+07h+%1*10h] mov al,[DSPMem+07h+%1*10h]
and al,7Fh and al,7Fh
mov dword[Voice0EnvInc+%1*4],0 mov dword[Voice0EnvInc+%1*4],0
mov byte [Voice0EnvInc+%1*4+2],al mov byte[Voice0EnvInc+%1*4+2],al
mov dword [Voice0Time+%1*4],0FFFFFFFFh mov dword[Voice0Time+%1*4],0FFFFFFFFh
mov dword [Voice0IncNumber+%1*4],0 mov dword[Voice0IncNumber+%1*4],0
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],4 mov byte[Voice0State+%1],4
ret ret
%%end %%end
pop edx pop edx
@@ -1400,7 +1400,7 @@ NEWSYM RDSPRegFF ;
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],9 mov byte[Voice0State+%1],9
ret ret
%%decayover %%decayover
sub edx,ebx sub edx,ebx
@@ -1439,7 +1439,7 @@ NEWSYM RDSPRegFF ;
pop edx pop edx
pop ebx pop ebx
pop eax pop eax
mov byte [Voice0State+%1],7 mov byte[Voice0State+%1],7
ret ret
%endmacro %endmacro
@@ -1475,7 +1475,7 @@ NEWSYM RDSPRegFF ;
ret ret
.gain2 .gain2
mov [DSPMem+05h+%1*10h],al mov [DSPMem+05h+%1*10h],al
cmp byte [Voice0State+%1],210 cmp byte[Voice0State+%1],210
jne %%noendofsamp2 jne %%noendofsamp2
push eax push eax
push ebx push ebx
@@ -1523,7 +1523,7 @@ NEWSYM RDSPRegFF ;
mov [DSPMem+07h+%1*10h],al mov [DSPMem+07h+%1*10h],al
ret ret
.gain .gain
cmp byte [Voice0State+%1],210 cmp byte[Voice0State+%1],210
jne %%noendofsamp jne %%noendofsamp
push eax push eax
push ebx push ebx
@@ -1831,45 +1831,45 @@ NEWSYM WDSPReg3C ; Voice 3
ret ret
NEWSYM WDSPReg3D ; Voice 3 NEWSYM WDSPReg3D ; Voice 3
mov byte [Voice0Noise],0 mov byte[Voice0Noise],0
mov byte [Voice1Noise],0 mov byte[Voice1Noise],0
mov byte [Voice2Noise],0 mov byte[Voice2Noise],0
mov byte [Voice3Noise],0 mov byte[Voice3Noise],0
mov byte [Voice4Noise],0 mov byte[Voice4Noise],0
mov byte [Voice5Noise],0 mov byte[Voice5Noise],0
mov byte [Voice6Noise],0 mov byte[Voice6Noise],0
mov byte [Voice7Noise],0 mov byte[Voice7Noise],0
test al,1 test al,1
jz .TestVoice1 jz .TestVoice1
mov byte [Voice0Noise],1 mov byte[Voice0Noise],1
.TestVoice1 .TestVoice1
test al,2 test al,2
jz .TestVoice2 jz .TestVoice2
mov byte [Voice1Noise],1 mov byte[Voice1Noise],1
.TestVoice2 .TestVoice2
test al,4 test al,4
jz .TestVoice3 jz .TestVoice3
mov byte [Voice2Noise],1 mov byte[Voice2Noise],1
.TestVoice3 .TestVoice3
test al,8 test al,8
jz .TestVoice4 jz .TestVoice4
mov byte [Voice3Noise],1 mov byte[Voice3Noise],1
.TestVoice4 .TestVoice4
test al,16 test al,16
jz .TestVoice5 jz .TestVoice5
mov byte [Voice4Noise],1 mov byte[Voice4Noise],1
.TestVoice5 .TestVoice5
test al,32 test al,32
jz .TestVoice6 jz .TestVoice6
mov byte [Voice5Noise],1 mov byte[Voice5Noise],1
.TestVoice6 .TestVoice6
test al,64 test al,64
jz .TestVoice7 jz .TestVoice7
mov byte [Voice6Noise],1 mov byte[Voice6Noise],1
.TestVoice7 .TestVoice7
test al,128 test al,128
jz .TestVoice8 jz .TestVoice8
mov byte [Voice7Noise],1 mov byte[Voice7Noise],1
.TestVoice8 .TestVoice8
mov [DSPMem+03Dh],al mov [DSPMem+03Dh],al
ret ret
@@ -1940,11 +1940,11 @@ NEWSYM WDSPReg4C ; Key On
xor bl,0FFh xor bl,0FFh
and bl,al and bl,al
xor byte [DSPMem+05Ch],0FFh xor byte[DSPMem+05Ch],0FFh
jnz .notzero jnz .notzero
and bl,[DSPMem+05Ch] and bl,[DSPMem+05Ch]
.notzero .notzero
xor byte [DSPMem+05Ch],0FFh xor byte[DSPMem+05Ch],0FFh
or byte[KeyOnStA],bl or byte[KeyOnStA],bl
pop ebx pop ebx
@@ -1955,7 +1955,7 @@ NEWSYM WDSPReg4C ; Key On
mov [DSPMem+04Ch],al mov [DSPMem+04Ch],al
push eax push eax
xor al,0FFh xor al,0FFh
and byte [DSPMem+07Ch],al and byte[DSPMem+07Ch],al
pop eax pop eax
ret ret
@@ -2089,9 +2089,9 @@ NEWSYM WDSPReg5B ; Voice 5
shr eax,8 shr eax,8
neg eax neg eax
mov dword[Voice0IncNumber+%1*4],eax mov dword[Voice0IncNumber+%1*4],eax
mov byte [Voice0State+%1],200 mov byte[Voice0State+%1],200
mov byte [DSPMem+08h+%1*10h],0 mov byte[DSPMem+08h+%1*10h],0
or byte [DSPMem+7Ch],1 << %1 or byte[DSPMem+7Ch],1 << %1
pop ebx pop ebx
pop edx pop edx
pop eax pop eax
@@ -2205,7 +2205,7 @@ NEWSYM WDSPReg6B ; Voice 6
NEWSYM WDSPReg6C ; Voice 6 NEWSYM WDSPReg6C ; Voice 6
mov [DSPMem+06Ch],al mov [DSPMem+06Ch],al
and byte [DSPMem+06Ch],7Fh and byte[DSPMem+06Ch],7Fh
test al,0C0h test al,0C0h
jz .NoRes2 jz .NoRes2
mov byte[Voice0Status],0 mov byte[Voice0Status],0
@@ -2224,7 +2224,7 @@ NEWSYM WDSPReg6C ; Voice 6
and eax,1Fh and eax,1Fh
xor edx,edx xor edx,edx
mov eax,[NoiseSpeeds+eax*4] mov eax,[NoiseSpeeds+eax*4]
Mul dword [dspPAdj] Mul dword[dspPAdj]
ShrD EAX, EDX, 17 ShrD EAX, EDX, 17
mov [NoiseInc],eax mov [NoiseInc],eax
pop edx pop edx
@@ -2298,7 +2298,7 @@ NEWSYM WDSPReg7B ; Voice 7
ret ret
NEWSYM WDSPReg7C ; ENDX NEWSYM WDSPReg7C ; ENDX
mov byte [DSPMem+07Ch],0 mov byte[DSPMem+07Ch],0
ret ret
NEWSYM WDSPReg7D ; Echo Delay NEWSYM WDSPReg7D ; Echo Delay

View File

@@ -2954,8 +2954,8 @@ SECTION .text
mov dword[BRRPlace0+%1*8],10000000h mov dword[BRRPlace0+%1*8],10000000h
mov dword[Voice0Prev0+%1*4],0 mov dword[Voice0Prev0+%1*4],0
mov dword[Voice0Prev1+%1*4],0 mov dword[Voice0Prev1+%1*4],0
mov byte [Voice0End+%1],0 mov byte[Voice0End+%1],0
mov byte [Voice0Loop+%1],0 mov byte[Voice0Loop+%1],0
mov dword[PSampleBuf+%1*24*4+16*4],0 mov dword[PSampleBuf+%1*24*4+16*4],0
mov dword[PSampleBuf+%1*24*4+17*4],0 mov dword[PSampleBuf+%1*24*4+17*4],0
mov dword[PSampleBuf+%1*24*4+18*4],0 mov dword[PSampleBuf+%1*24*4+18*4],0
@@ -3064,8 +3064,8 @@ NEWSYM Voice7Start
mov dword[BRRPlace0+%1*8],10000000h mov dword[BRRPlace0+%1*8],10000000h
mov dword[Voice0Prev0+%1*4],0 mov dword[Voice0Prev0+%1*4],0
mov dword[Voice0Prev1+%1*4],0 mov dword[Voice0Prev1+%1*4],0
mov byte [Voice0End+%1],0 mov byte[Voice0End+%1],0
mov byte [Voice0Loop+%1],0 mov byte[Voice0Loop+%1],0
mov dword[PSampleBuf+%1*24*4+16*4],0 mov dword[PSampleBuf+%1*24*4+16*4],0
mov dword[PSampleBuf+%1*24*4+17*4],0 mov dword[PSampleBuf+%1*24*4+17*4],0
mov dword[PSampleBuf+%1*24*4+18*4],0 mov dword[PSampleBuf+%1*24*4+18*4],0

View File

@@ -1765,10 +1765,10 @@ NEWSYM UpdatePORSCMR
or al,bl or al,bl
mov ebx,[PLOTJmpb+eax*4] mov ebx,[PLOTJmpb+eax*4]
mov eax,[PLOTJmpa+eax*4] mov eax,[PLOTJmpa+eax*4]
mov dword [FxTable+4Ch*4],eax mov dword[FxTable+4Ch*4],eax
mov dword [FxTableb+4Ch*4],eax mov dword[FxTableb+4Ch*4],eax
mov dword [FxTablec+4Ch*4],eax mov dword[FxTablec+4Ch*4],eax
mov dword [FxTabled+4Ch*4],ebx mov dword[FxTabled+4Ch*4],ebx
pop eax pop eax
pop ebx pop ebx
ret ret
@@ -1794,14 +1794,14 @@ NEWSYM UpdateSCBRCOLR
ret ret
NEWSYM UpdateCLSR NEWSYM UpdateCLSR
mov dword [NumberOfOpcodes2],350 ; 0FFFFFFFh;350 mov dword[NumberOfOpcodes2],350 ; 0FFFFFFFh;350
test byte[SfxCLSR],01h test byte[SfxCLSR],01h
jz .nohighsfx jz .nohighsfx
mov dword [NumberOfOpcodes2],700 ;700 mov dword[NumberOfOpcodes2],700 ;700
.nohighsfx .nohighsfx
cmp byte[SFXCounter],1 cmp byte[SFXCounter],1
je .noyi je .noyi
mov dword [NumberOfOpcodes2],0FFFFFFFh mov dword[NumberOfOpcodes2],0FFFFFFFh
.noyi .noyi
ret ret
@@ -1858,14 +1858,14 @@ NEWSYM StartSFXdebug
test al,08h test al,08h
jz .noaccess jz .noaccess
.noram .noram
mov dword [NumberOfOpcodes],350 ; 0FFFFFFFh;350 mov dword[NumberOfOpcodes],350 ; 0FFFFFFFh;350
test byte[SfxCLSR],01h test byte[SfxCLSR],01h
jz .nohighsfx jz .nohighsfx
mov dword [NumberOfOpcodes],700 ;700 mov dword[NumberOfOpcodes],700 ;700
.nohighsfx .nohighsfx
cmp byte[SFXCounter],1 cmp byte[SFXCounter],1
jne .noyi jne .noyi
mov dword [NumberOfOpcodes],0FFFFFFFFh mov dword[NumberOfOpcodes],0FFFFFFFFh
.noyi .noyi
; call SFXDebugLoop ; call SFXDebugLoop
.noaccess .noaccess
@@ -1914,10 +1914,10 @@ NEWSYM StartSFXdebugb
or al,bl or al,bl
mov ebx,[PLOTJmpb+eax*4] mov ebx,[PLOTJmpb+eax*4]
mov eax,[PLOTJmpa+eax*4] mov eax,[PLOTJmpa+eax*4]
mov dword [FxTable+4Ch*4],eax mov dword[FxTable+4Ch*4],eax
mov dword [FxTableb+4Ch*4],eax mov dword[FxTableb+4Ch*4],eax
mov dword [FxTablec+4Ch*4],eax mov dword[FxTablec+4Ch*4],eax
mov dword [FxTabled+4Ch*4],ebx mov dword[FxTabled+4Ch*4],ebx
mov ebx,[SfxSCBR] mov ebx,[SfxSCBR]
shl ebx,10 shl ebx,10
@@ -1947,14 +1947,14 @@ NEWSYM StartSFXdebugb
test al,08h test al,08h
jz .noaccess jz .noaccess
.noram .noram
mov dword [NumberOfOpcodes],400 ;678 mov dword[NumberOfOpcodes],400 ;678
test byte[SfxCLSR],01h test byte[SfxCLSR],01h
jz .nohighsfx jz .nohighsfx
mov dword [NumberOfOpcodes],800 ;678*2 mov dword[NumberOfOpcodes],800 ;678*2
.nohighsfx .nohighsfx
cmp byte[SFXCounter],1 cmp byte[SFXCounter],1
jne .noyi jne .noyi
mov dword [NumberOfOpcodes],0FFFFFFFh mov dword[NumberOfOpcodes],0FFFFFFFh
.noyi .noyi
call MainLoop call MainLoop
.noaccess .noaccess
@@ -1982,12 +1982,12 @@ NEWSYM StartSFXret
test al,08h test al,08h
jz .noaccess jz .noaccess
.noram .noram
mov dword [NumberOfOpcodes],400 ;678 mov dword[NumberOfOpcodes],400 ;678
test byte[SfxCLSR],01h test byte[SfxCLSR],01h
jz .nohighsfx jz .nohighsfx
mov dword [NumberOfOpcodes],800 ;678*2 mov dword[NumberOfOpcodes],800 ;678*2
.nohighsfx .nohighsfx
mov dword [NumberOfOpcodes],0FFFFFFFFh mov dword[NumberOfOpcodes],0FFFFFFFFh
call MainLoop call MainLoop
.noaccess .noaccess
popad popad

File diff suppressed because it is too large Load Diff

View File

@@ -80,7 +80,7 @@
xor eax,eax xor eax,eax
add ebx,[spcRamDP] add ebx,[spcRamDP]
inc ebp inc ebp
mov ax, word [ebx] mov ax, word[ebx]
mov ebx,eax mov ebx,eax
add ebx,spcRam add ebx,spcRam
ReadByte ReadByte

View File

@@ -32,7 +32,7 @@
inc ebp inc ebp
ret ret
.branch .branch
movsx ebx,byte [ebp] movsx ebx,byte[ebp]
inc ebp inc ebp
add ebp,ebx add ebp,ebx
ret ret
@@ -44,10 +44,10 @@
sub ebx,spcRam sub ebx,spcRam
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],bh mov [spcRam+eax],bh
dec byte [spcS] dec byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],bl mov [spcRam+eax],bl
dec byte [spcS] dec byte[spcS]
mov bx,[spcextraram+%1] mov bx,[spcextraram+%1]
test byte[spcRam+0F1h],80h test byte[spcRam+0F1h],80h
jnz %%finished jnz %%finished
@@ -94,7 +94,7 @@
add ebp,2 add ebp,2
ret ret
.dp0jump .dp0jump
movsx ebx,byte [ebp+1] movsx ebx,byte[ebp+1]
add ebp,ebx add ebp,ebx
add ebp,2 add ebp,2
ret ret
@@ -110,7 +110,7 @@
add ebp,2 add ebp,2
ret ret
.dp0jump .dp0jump
movsx ebx,byte [ebp+1] movsx ebx,byte[ebp+1]
add ebp,ebx add ebp,ebx
add ebp,2 add ebp,2
ret ret
@@ -118,7 +118,7 @@
; OR A, instruction ; OR A, instruction
%macro SPC_OR_A 0 %macro SPC_OR_A 0
or byte [spcA], al or byte[spcA], al
mov al,[spcA] mov al,[spcA]
mov [spcNZ],al mov [spcNZ],al
ret ret
@@ -126,7 +126,7 @@
; AND A, instruction ; AND A, instruction
%macro SPC_AND_A 0 %macro SPC_AND_A 0
and byte [spcA], al and byte[spcA], al
mov al,[spcA] mov al,[spcA]
mov [spcNZ],al mov [spcNZ],al
ret ret
@@ -134,7 +134,7 @@
; EOR A, instruction ; EOR A, instruction
%macro SPC_EOR_A 0 %macro SPC_EOR_A 0
xor byte [spcA], al xor byte[spcA], al
mov al,[spcA] mov al,[spcA]
mov [spcNZ],al mov [spcNZ],al
ret ret
@@ -142,7 +142,7 @@
; CMP A, instruction ; CMP A, instruction
%macro SPC_CMP_A 0 %macro SPC_CMP_A 0
cmp byte [spcA], al cmp byte[spcA], al
cmc cmc
SPCSetFlagnzc SPCSetFlagnzc
%endmacro %endmacro
@@ -150,7 +150,7 @@
%macro SPC_ADC_A 0 %macro SPC_ADC_A 0
mov cl,[spcP] mov cl,[spcP]
shr cl,1 shr cl,1
adc byte [spcA], al adc byte[spcA], al
SPCSetFlagnvhzc SPCSetFlagnvhzc
%endmacro %endmacro
@@ -158,13 +158,13 @@
mov cl,[spcP] mov cl,[spcP]
xor cl,1 xor cl,1
shr cl,1 shr cl,1
sbb byte [spcA], al sbb byte[spcA], al
cmc cmc
SPCSetFlagnvhzc SPCSetFlagnvhzc
%endmacro %endmacro
%macro SPC_MOV_A 0 %macro SPC_MOV_A 0
mov byte [spcA], al mov byte[spcA], al
mov [spcNZ],al mov [spcNZ],al
ret ret
%endmacro %endmacro

View File

@@ -36,12 +36,12 @@ NEWSYM read_gpp
cmp al,0 cmp al,0
jne GPP_L14 jne GPP_L14
mov byte [clock_mask],0x10 mov byte[clock_mask],0x10
mov byte [data_mask],0x20 mov byte[data_mask],0x20
jmp GPP_L15 jmp GPP_L15
GPP_L14: GPP_L14:
mov byte [clock_mask],0x40 mov byte[clock_mask],0x40
mov byte [data_mask],0x80 mov byte[data_mask],0x80
GPP_L15: GPP_L15:
@@ -78,10 +78,10 @@ GPP_L1:
test [data_mask],al test [data_mask],al
jz GPP_L3 jz GPP_L3
mov byte [sample+edi],1 mov byte[sample+edi],1
jmp GPP_L12 jmp GPP_L12
GPP_L3: GPP_L3:
mov byte [sample+edi],0 mov byte[sample+edi],0
GPP_L12: GPP_L12:
inc edi inc edi
@@ -98,7 +98,7 @@ GPP_L13:
xor ecx,ecx xor ecx,ecx
mov esi,1 mov esi,1
GPP_L7: GPP_L7:
cmp byte [sample+esi],1 cmp byte[sample+esi],1
jg GPP_ERR jg GPP_ERR
jne GPP_L6 jne GPP_L6
inc ecx inc ecx

View File

@@ -104,7 +104,7 @@ NEWSYM GetCoords
inc dword[JoyY] inc dword[JoyY]
dec ecx dec ecx
jnz .loopa jnz .loopa
mov byte [JoyExists], 0 mov byte[JoyExists], 0
mov dword[JoyX],0 mov dword[JoyX],0
mov dword[JoyY],0 mov dword[JoyY],0
jmp .End jmp .End
@@ -118,7 +118,7 @@ NEWSYM GetCoords
nop nop
dec ecx dec ecx
jnz .YAxis jnz .YAxis
mov byte [JoyExists], 0 mov byte[JoyExists], 0
mov dword[JoyX],0 mov dword[JoyX],0
mov dword[JoyY],0 mov dword[JoyY],0
.YAxisOk .YAxisOk
@@ -133,7 +133,7 @@ NEWSYM GetCoords
nop nop
dec ecx dec ecx
jnz .XAxis jnz .XAxis
mov byte [JoyExists], 0 mov byte[JoyExists], 0
mov dword[JoyX],0 mov dword[JoyX],0
mov dword[JoyY],0 mov dword[JoyY],0
.XAxisOk .XAxisOk
@@ -178,10 +178,10 @@ NEWSYM GetCoords3
jz .nomore jz .nomore
dec ecx dec ecx
jnz .loopa jnz .loopa
mov byte [JoyExists], 0 mov byte[JoyExists], 0
mov dword[JoyX],0 mov dword[JoyX],0
mov dword[JoyY],0 mov dword[JoyY],0
mov byte [JoyExists2], 0 mov byte[JoyExists2], 0
mov dword[JoyX2],0 mov dword[JoyX2],0
mov dword[JoyY2],0 mov dword[JoyY2],0
.nomore .nomore

View File

@@ -362,7 +362,7 @@ NEWSYM handlersbseg
dec ecx dec ecx
jnz .loopbm jnz .loopbm
.sbend .sbend
xor byte [SBswitch],1 xor byte[SBswitch],1
; move the good data at spcRam+0f3h ; move the good data at spcRam+0f3h
xor eax,eax xor eax,eax
@@ -428,7 +428,7 @@ NEWSYM stopsbsound
dec ecx dec ecx
jnz .loopb jnz .loopb
.sbend .sbend
xor byte [SBswitch],1 xor byte[SBswitch],1
; acknowledge SB for IRQing ; acknowledge SB for IRQing
mov dx,[SBPort] mov dx,[SBPort]
@@ -467,7 +467,7 @@ NEWSYM SBHandler16
push es push es
inc dword[sbhandexec] inc dword[sbhandexec]
cmp byte [vibracard], 1 cmp byte[vibracard], 1
je .donotcallcmdapos je .donotcallcmdapos
call GetCDMAPos call GetCDMAPos
.donotcallcmdapos .donotcallcmdapos
@@ -568,7 +568,7 @@ NEWSYM SBHandler16
dec ecx dec ecx
jnz .loopbm jnz .loopbm
.sbend .sbend
xor byte [SBswitch],1 xor byte[SBswitch],1
; acknowledge SB for IRQing ; acknowledge SB for IRQing
mov dx,[SBPort] mov dx,[SBPort]
@@ -643,7 +643,7 @@ NEWSYM stopsbsound16
dec ecx dec ecx
jnz .loopb jnz .loopb
.sbend .sbend
xor byte [SBswitch],1 xor byte[SBswitch],1
; acknowledge SB for IRQing ; acknowledge SB for IRQing
mov dx,[SBPort] mov dx,[SBPort]
@@ -694,18 +694,18 @@ NEWSYM InitSB
add ax,ax add ax,ax
mov [BufferSizeW],ax mov [BufferSizeW],ax
mov byte [SBswitch],0 mov byte[SBswitch],0
; Allocate pointer ; Allocate pointer
; Set up SB ; Set up SB
call SB_dsp_reset call SB_dsp_reset
; code added by peter santing ; code added by peter santing
cmp byte [vibracard], 1 cmp byte[vibracard], 1
je near .vibrafix2 je near .vibrafix2
cmp byte [SBHDMA],0 cmp byte[SBHDMA],0
je .no16bit je .no16bit
cmp byte [SBHDMA],4 cmp byte[SBHDMA],4
jb near .init16bitlowhdma jb near .init16bitlowhdma
jmp .init16bit jmp .init16bit
.no16bit .no16bit
@@ -737,7 +737,7 @@ NEWSYM InitSB
jbe .okay jbe .okay
mov eax,2 mov eax,2
.okay .okay
mov al,byte [SoundSpeedt+eax] mov al,byte[SoundSpeedt+eax]
call SB_dsp_write call SB_dsp_write
; Set Stereo ; Set Stereo
mov dx, [SBPort] mov dx, [SBPort]
@@ -751,14 +751,14 @@ NEWSYM InitSB
jmp .donestereo jmp .donestereo
.nostereo8b .nostereo8b
mov eax,[SoundQuality] mov eax,[SoundQuality]
mov al,byte [SoundSpeeds+eax] mov al,byte[SoundSpeeds+eax]
call SB_dsp_write call SB_dsp_write
.donestereo .donestereo
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je .highmode je .highmode
mov eax,[SoundQuality] mov eax,[SoundQuality]
cmp byte [SoundSpeeds+eax],211 cmp byte[SoundSpeeds+eax],211
ja .highmode ja .highmode
mov byte[.Versionnum],1 mov byte[.Versionnum],1
.highmode .highmode
@@ -839,7 +839,7 @@ SECTION .text
.vibrafix2 .vibrafix2
; notify user that we're in ViBRA16x mode.. ; notify user that we're in ViBRA16x mode..
push eax push eax
mov dword [Msgptr], vibmsg mov dword[Msgptr], vibmsg
mov eax, [MsgCount] mov eax, [MsgCount]
mov [MessageOn], eax mov [MessageOn], eax
pop eax pop eax
@@ -891,12 +891,12 @@ SECTION .text
call SB_dsp_write call SB_dsp_write
push ecx push ecx
mov ecx,[SoundQuality] mov ecx,[SoundQuality]
mov al,byte [SBToSPCSpeeds2+ecx*4+1] mov al,byte[SBToSPCSpeeds2+ecx*4+1]
pop ecx pop ecx
call SB_dsp_write call SB_dsp_write
push ecx push ecx
mov ecx,[SoundQuality] mov ecx,[SoundQuality]
mov al,byte [SBToSPCSpeeds2+ecx*4] mov al,byte[SBToSPCSpeeds2+ecx*4]
pop ecx pop ecx
call SB_dsp_write call SB_dsp_write
@@ -938,7 +938,7 @@ SECTION .text
push ecx push ecx
mov ecx,[SoundQuality] mov ecx,[SoundQuality]
mov al,byte [SoundSpeeds+ecx] mov al,byte[SoundSpeeds+ecx]
pop ecx pop ecx
call SB_dsp_write call SB_dsp_write
@@ -1055,12 +1055,12 @@ SECTION .text
call SB_dsp_write call SB_dsp_write
push ecx push ecx
mov ecx,[SoundQuality] mov ecx,[SoundQuality]
mov al,byte [SBToSPCSpeeds2+ecx*4+1] mov al,byte[SBToSPCSpeeds2+ecx*4+1]
pop ecx pop ecx
call SB_dsp_write call SB_dsp_write
push ecx push ecx
mov ecx,[SoundQuality] mov ecx,[SoundQuality]
mov al,byte [SBToSPCSpeeds2+ecx*4] mov al,byte[SBToSPCSpeeds2+ecx*4]
pop ecx pop ecx
call SB_dsp_write call SB_dsp_write
@@ -1405,38 +1405,38 @@ NEWSYM getblaster
; **** capability of the ViBRA16X line of creative **** ; **** capability of the ViBRA16X line of creative ****
; **** instead of playing 8-bit MONOURAL sound **** ; **** instead of playing 8-bit MONOURAL sound ****
; ****************************************************** ; ******************************************************
; cmp byte [SBHDMA], 0 ; cmp byte[SBHDMA], 0
; jne .vibradma0 ; jne .vibradma0
; mov byte [SBDMAPage], 87h ; mov byte[SBDMAPage], 87h
; mov byte [vibracard], 1 ; set ViBRA16X mode ; mov byte[vibracard], 1 ; set ViBRA16X mode
.vibradma0 .vibradma0
cmp byte [SBHDMA], 1 cmp byte[SBHDMA], 1
jne .vibradma1 jne .vibradma1
mov byte [SBDMAPage], 83h mov byte[SBDMAPage], 83h
mov byte [vibracard], 1 ; set ViBRA16X mode mov byte[vibracard], 1 ; set ViBRA16X mode
.vibradma1 .vibradma1
cmp byte [SBHDMA], 2 cmp byte[SBHDMA], 2
jne .vibradma2 jne .vibradma2
mov byte [SBDMAPage], 81h mov byte[SBDMAPage], 81h
mov byte [vibracard], 1 ; set ViBRA16X mode mov byte[vibracard], 1 ; set ViBRA16X mode
.vibradma2 .vibradma2
cmp byte [SBHDMA], 3 cmp byte[SBHDMA], 3
jne .vibradma3 jne .vibradma3
mov byte [SBDMAPage], 82h mov byte[SBDMAPage], 82h
mov byte [vibracard], 1 ; set ViBRA16X mode mov byte[vibracard], 1 ; set ViBRA16X mode
.vibradma3 .vibradma3
cmp byte [vibracard], 1 cmp byte[vibracard], 1
jne .vibrafix jne .vibrafix
push ax push ax
mov al, [SBHDMA] mov al, [SBHDMA]
mov [SBDMA], al mov [SBDMA], al
pop ax pop ax
.vibrafix .vibrafix
cmp byte [SBHDMA],4 cmp byte[SBHDMA],4
jae .hdma jae .hdma
; vibra implementation (make sure that zSNES doesn't go back ; vibra implementation (make sure that zSNES doesn't go back
; to eight-bit-mode mono) ; to eight-bit-mode mono)
mov byte [SBHDMA],0 mov byte[SBHDMA],0
cmp byte[vibracard], 1 cmp byte[vibracard], 1
jne .hdma jne .hdma
push edx push edx

View File

@@ -142,7 +142,7 @@ SWModeCheck:
jmp short SMWError jmp short SMWError
ModeA1: ModeA1:
cmp dword [_SWCount],3 cmp dword[_SWCount],3
je near ModeB3 je near ModeB3
xor ebp,ebp xor ebp,ebp
call DoModeA call DoModeA
@@ -190,15 +190,15 @@ DoModeB:
mov ecx,5 mov ecx,5
add ebp,bDump add ebp,bDump
ModeBLoop: ModeBLoop:
test byte [ebp],00100000b test byte[ebp],00100000b
jnz $+4 jnz $+4
or ebx,eax or ebx,eax
shl eax,1 shl eax,1
test byte [ebp],01000000b test byte[ebp],01000000b
jnz $+4 jnz $+4
or ebx,eax or ebx,eax
shl eax,1 shl eax,1
test byte [ebp],10000000b test byte[ebp],10000000b
jnz $+4 jnz $+4
or ebx,eax or ebx,eax
shl eax,1 shl eax,1
@@ -213,7 +213,7 @@ DoModeA:
mov ecx,15 mov ecx,15
add ebp,bDump add ebp,bDump
ModeALoop: ModeALoop:
test byte [ebp],00100000b test byte[ebp],00100000b
jnz $+4 jnz $+4
or ebx,eax or ebx,eax
shl eax,1 shl eax,1

View File

@@ -214,7 +214,7 @@ readSideWinder:
jmp SMWDone jmp SMWDone
ModeA1: ModeA1:
cmp dword [SWCount],3 cmp dword[SWCount],3
je near ModeB3 je near ModeB3
xor ebp,ebp xor ebp,ebp
call DoModeA call DoModeA

View File

@@ -237,7 +237,7 @@ GUIloadfilename:
mov byte[NextLineCache],0 mov byte[NextLineCache],0
mov byte[curexecstate],1 mov byte[curexecstate],1
mov byte [romloadskip],1 mov byte[romloadskip],1
; load file ; load file
call loadfileGUI call loadfileGUI
cmp byte[ZipSupport],2 cmp byte[ZipSupport],2

View File

@@ -1163,14 +1163,14 @@ NEWSYM init65816
call headerhack call headerhack
popad popad
mov byte [spcRam+0F4h],0 mov byte[spcRam+0F4h],0
mov byte [spcRam+0F5h],0 mov byte[spcRam+0F5h],0
mov byte [spcRam+0F6h],0 mov byte[spcRam+0F6h],0
mov byte [spcRam+0F7h],0 mov byte[spcRam+0F7h],0
mov byte [reg1read],0 mov byte[reg1read],0
mov byte [reg2read],0 mov byte[reg2read],0
mov byte [reg3read],0 mov byte[reg3read],0
mov byte [reg4read],0 mov byte[reg4read],0
mov dword[cycpbl],0 mov dword[cycpbl],0
mov dword[spcnumread],0 mov dword[spcnumread],0
mov dword[spchalted],-1 mov dword[spchalted],-1
@@ -1182,7 +1182,7 @@ NEWSYM init65816
mov word[resolutn],224 mov word[resolutn],224
mov byte[vidbright],0 mov byte[vidbright],0
mov byte[forceblnk],0 mov byte[forceblnk],0
mov byte [spcP],0 mov byte[spcP],0
mov byte[timeron],0 mov byte[timeron],0
mov byte[JoyAPos],0 mov byte[JoyAPos],0
mov byte[JoyBPos],0 mov byte[JoyBPos],0
@@ -2156,7 +2156,7 @@ NEWSYM PatchIPS
mov byte[eax+4],0 mov byte[eax+4],0
push eax push eax
%ifdef __UNIXSDL__ %ifdef __UNIXSDL__
cmp byte [ZipSupport], 1 cmp byte[ZipSupport], 1
je .nochangedir je .nochangedir
mov ebx,LoadDir mov ebx,LoadDir
call Change_Dir call Change_Dir

View File

@@ -652,10 +652,10 @@ NEWSYM initvideo ; Returns 1 in videotroub if trouble occurs
mov word[vesa2_x],512 mov word[vesa2_x],512
mov word[vesa2_y],480 mov word[vesa2_y],480
mov byte[vesa2_bits],16 mov byte[vesa2_bits],16
mov dword [vesa2_bits],16 mov dword[vesa2_bits],16
mov dword [vesa2_rpos],11 mov dword[vesa2_rpos],11
mov dword [vesa2_gpos],5 mov dword[vesa2_gpos],5
mov dword [vesa2_bpos],0 mov dword[vesa2_bpos],0
mov byte[vesa2red10],0 mov byte[vesa2red10],0
mov byte[vesa2_rposng],11 mov byte[vesa2_rposng],11
mov byte[vesa2_gposng],5 mov byte[vesa2_gposng],5
@@ -707,7 +707,7 @@ NEWSYM converta, dd 0
SECTION .text SECTION .text
NEWSYM DrawScreen ; In-game screen render w/ triple buffer check NEWSYM DrawScreen ; In-game screen render w/ triple buffer check
cmp dword [converta],1 cmp dword[converta],1
jne near .skipconv jne near .skipconv
pushad pushad
mov dword[UnusedBit], 10000000000000001000000000000000b mov dword[UnusedBit], 10000000000000001000000000000000b

View File

@@ -13,7 +13,7 @@ Extra EXTSYMs:
g++ -Wall -O3 -o extraext.exe extraext.cpp fileutil.o strutil.o g++ -Wall -O3 -o extraext.exe extraext.cpp fileutil.o strutil.o
Section Tester: Section Tester:
g++ -Wall -O3 -o sec-test.exe sec-test.cpp fileutil.o g++ -Wall -O3 -o sec-test.exe sec-test.cpp fileutil.o strutil.o
Source Counter: Source Counter:
g++ -Wall -O3 -o srccount.exe srccount.cpp fileutil.o g++ -Wall -O3 -o srccount.exe srccount.cpp fileutil.o

View File

@@ -893,8 +893,8 @@ NEWSYM ClearBGFPUCopy
.TopOfLoop .TopOfLoop
FLDZ FLDZ
FLDZ FLDZ
FISTP QWORD [EDI] FISTP QWORD[EDI]
FISTP QWORD [EDI+8] FISTP QWORD[EDI+8]
ADD EDI,16 ADD EDI,16
DEC ECX DEC ECX
JNZ .TopOfLoop JNZ .TopOfLoop

View File

@@ -65,10 +65,10 @@ SECTION .text
%endmacro %endmacro
%macro FPUStuff 1 %macro FPUStuff 1
FILD QWORD [ESI+%1*16] FILD QWORD[ESI+%1*16]
FILD QWORD [ESI+8+%1*16] FILD QWORD[ESI+8+%1*16]
FISTP QWORD [ES:EDI+8+%1*16] FISTP QWORD[ES:EDI+8+%1*16]
FISTP QWORD [ES:EDI+%1*16] FISTP QWORD[ES:EDI+%1*16]
%endmacro %endmacro
%MACRO CopyFPU 0 %MACRO CopyFPU 0
@@ -87,11 +87,11 @@ NEWSYM FPUZero
mov [.Zero2],eax mov [.Zero2],eax
mov [.Zero2+4],eax mov [.Zero2+4],eax
.TopOfLoop .TopOfLoop
FILD QWORD [.Zero] FILD QWORD[.Zero]
FILD QWORD [.Zero2] FILD QWORD[.Zero2]
FXCH FXCH
FISTP QWORD [EDI] FISTP QWORD[EDI]
FISTP QWORD [EDI+8] FISTP QWORD[EDI+8]
ADD EDI,16 ADD EDI,16
DEC ECX DEC ECX
JNZ .TopOfLoop JNZ .TopOfLoop
@@ -99,8 +99,8 @@ NEWSYM FPUZero
fld1 fld1
fsub st0,st0 fsub st0,st0
.TopOfLoop .TopOfLoop
fst qword [edi] fst qword[edi]
fst qword [edi+8] fst qword[edi+8]
add edi,16 add edi,16
dec ecx dec ecx
jnz .TopOfLoop jnz .TopOfLoop

View File

@@ -74,7 +74,7 @@ NEWSYM ClearWin32
NEWSYM DrawWin256x224x16 NEWSYM DrawWin256x224x16
pushad pushad
cmp byte [MMXSupport],0 cmp byte[MMXSupport],0
je .noMMX je .noMMX
mov esi, [ScreenPtr] mov esi, [ScreenPtr]
mov edi, [SurfBufD] mov edi, [SurfBufD]
@@ -186,7 +186,7 @@ NEWSYM DrawWin256x224x32
NEWSYM DrawWin320x240x16 NEWSYM DrawWin320x240x16
pushad pushad
cmp byte [MMXSupport],0 cmp byte[MMXSupport],0
je near .noMMX je near .noMMX
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx

View File

@@ -832,10 +832,10 @@ NEWSYM initvideo ; Returns 1 in videotroub if trouble occurs
mov word[vesa2_x],512 mov word[vesa2_x],512
mov word[vesa2_y],480 mov word[vesa2_y],480
mov byte[vesa2_bits],16 mov byte[vesa2_bits],16
mov dword [vesa2_bits],16 mov dword[vesa2_bits],16
mov dword [vesa2_rpos],11 mov dword[vesa2_rpos],11
mov dword [vesa2_gpos],5 mov dword[vesa2_gpos],5
mov dword [vesa2_bpos],0 mov dword[vesa2_bpos],0
mov byte[vesa2red10],0 mov byte[vesa2red10],0
mov byte[vesa2_rposng],11 mov byte[vesa2_rposng],11
mov byte[vesa2_gposng],5 mov byte[vesa2_gposng],5
@@ -885,7 +885,7 @@ NEWSYM converta, dd 0
SECTION .text SECTION .text
NEWSYM DrawScreen ; In-game screen render w/ triple buffer check NEWSYM DrawScreen ; In-game screen render w/ triple buffer check
cmp dword [converta],1 cmp dword[converta],1
jne near .skipconv jne near .skipconv
pushad pushad
mov dword[UnusedBit], 10000000000000001000000000000000b mov dword[UnusedBit], 10000000000000001000000000000000b