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
''')
cpusrc = Split('''
cpu/addrni.asm
cpu/dma.asm
cpu/dsp.asm
cpu/dspproc.asm

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

View File

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

View File

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

View File

@@ -2954,8 +2954,8 @@ SECTION .text
mov dword[BRRPlace0+%1*8],10000000h
mov dword[Voice0Prev0+%1*4],0
mov dword[Voice0Prev1+%1*4],0
mov byte [Voice0End+%1],0
mov byte [Voice0Loop+%1],0
mov byte[Voice0End+%1],0
mov byte[Voice0Loop+%1],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+18*4],0
@@ -3064,8 +3064,8 @@ NEWSYM Voice7Start
mov dword[BRRPlace0+%1*8],10000000h
mov dword[Voice0Prev0+%1*4],0
mov dword[Voice0Prev1+%1*4],0
mov byte [Voice0End+%1],0
mov byte [Voice0Loop+%1],0
mov byte[Voice0End+%1],0
mov byte[Voice0Loop+%1],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+18*4],0

View File

@@ -1765,10 +1765,10 @@ NEWSYM UpdatePORSCMR
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 eax
pop ebx
ret
@@ -1794,14 +1794,14 @@ NEWSYM UpdateSCBRCOLR
ret
NEWSYM UpdateCLSR
mov dword [NumberOfOpcodes2],350 ; 0FFFFFFFh;350
mov dword[NumberOfOpcodes2],350 ; 0FFFFFFFh;350
test byte[SfxCLSR],01h
jz .nohighsfx
mov dword [NumberOfOpcodes2],700 ;700
mov dword[NumberOfOpcodes2],700 ;700
.nohighsfx
cmp byte[SFXCounter],1
je .noyi
mov dword [NumberOfOpcodes2],0FFFFFFFh
mov dword[NumberOfOpcodes2],0FFFFFFFh
.noyi
ret
@@ -1858,14 +1858,14 @@ NEWSYM StartSFXdebug
test al,08h
jz .noaccess
.noram
mov dword [NumberOfOpcodes],350 ; 0FFFFFFFh;350
mov dword[NumberOfOpcodes],350 ; 0FFFFFFFh;350
test byte[SfxCLSR],01h
jz .nohighsfx
mov dword [NumberOfOpcodes],700 ;700
mov dword[NumberOfOpcodes],700 ;700
.nohighsfx
cmp byte[SFXCounter],1
jne .noyi
mov dword [NumberOfOpcodes],0FFFFFFFFh
mov dword[NumberOfOpcodes],0FFFFFFFFh
.noyi
; call SFXDebugLoop
.noaccess
@@ -1914,10 +1914,10 @@ NEWSYM StartSFXdebugb
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
mov ebx,[SfxSCBR]
shl ebx,10
@@ -1947,14 +1947,14 @@ NEWSYM StartSFXdebugb
test al,08h
jz .noaccess
.noram
mov dword [NumberOfOpcodes],400 ;678
mov dword[NumberOfOpcodes],400 ;678
test byte[SfxCLSR],01h
jz .nohighsfx
mov dword [NumberOfOpcodes],800 ;678*2
mov dword[NumberOfOpcodes],800 ;678*2
.nohighsfx
cmp byte[SFXCounter],1
jne .noyi
mov dword [NumberOfOpcodes],0FFFFFFFh
mov dword[NumberOfOpcodes],0FFFFFFFh
.noyi
call MainLoop
.noaccess
@@ -1982,12 +1982,12 @@ NEWSYM StartSFXret
test al,08h
jz .noaccess
.noram
mov dword [NumberOfOpcodes],400 ;678
mov dword[NumberOfOpcodes],400 ;678
test byte[SfxCLSR],01h
jz .nohighsfx
mov dword [NumberOfOpcodes],800 ;678*2
mov dword[NumberOfOpcodes],800 ;678*2
.nohighsfx
mov dword [NumberOfOpcodes],0FFFFFFFFh
mov dword[NumberOfOpcodes],0FFFFFFFFh
call MainLoop
.noaccess
popad

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1163,14 +1163,14 @@ NEWSYM init65816
call headerhack
popad
mov byte [spcRam+0F4h],0
mov byte [spcRam+0F5h],0
mov byte [spcRam+0F6h],0
mov byte [spcRam+0F7h],0
mov byte [reg1read],0
mov byte [reg2read],0
mov byte [reg3read],0
mov byte [reg4read],0
mov byte[spcRam+0F4h],0
mov byte[spcRam+0F5h],0
mov byte[spcRam+0F6h],0
mov byte[spcRam+0F7h],0
mov byte[reg1read],0
mov byte[reg2read],0
mov byte[reg3read],0
mov byte[reg4read],0
mov dword[cycpbl],0
mov dword[spcnumread],0
mov dword[spchalted],-1
@@ -1182,7 +1182,7 @@ NEWSYM init65816
mov word[resolutn],224
mov byte[vidbright],0
mov byte[forceblnk],0
mov byte [spcP],0
mov byte[spcP],0
mov byte[timeron],0
mov byte[JoyAPos],0
mov byte[JoyBPos],0
@@ -2156,7 +2156,7 @@ NEWSYM PatchIPS
mov byte[eax+4],0
push eax
%ifdef __UNIXSDL__
cmp byte [ZipSupport], 1
cmp byte[ZipSupport], 1
je .nochangedir
mov ebx,LoadDir
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_y],480
mov byte[vesa2_bits],16
mov dword [vesa2_bits],16
mov dword [vesa2_rpos],11
mov dword [vesa2_gpos],5
mov dword [vesa2_bpos],0
mov dword[vesa2_bits],16
mov dword[vesa2_rpos],11
mov dword[vesa2_gpos],5
mov dword[vesa2_bpos],0
mov byte[vesa2red10],0
mov byte[vesa2_rposng],11
mov byte[vesa2_gposng],5
@@ -707,7 +707,7 @@ NEWSYM converta, dd 0
SECTION .text
NEWSYM DrawScreen ; In-game screen render w/ triple buffer check
cmp dword [converta],1
cmp dword[converta],1
jne near .skipconv
pushad
mov dword[UnusedBit], 10000000000000001000000000000000b

View File

@@ -13,7 +13,7 @@ Extra EXTSYMs:
g++ -Wall -O3 -o extraext.exe extraext.cpp fileutil.o strutil.o
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:
g++ -Wall -O3 -o srccount.exe srccount.cpp fileutil.o

View File

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

View File

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

View File

@@ -74,7 +74,7 @@ NEWSYM ClearWin32
NEWSYM DrawWin256x224x16
pushad
cmp byte [MMXSupport],0
cmp byte[MMXSupport],0
je .noMMX
mov esi, [ScreenPtr]
mov edi, [SurfBufD]
@@ -186,7 +186,7 @@ NEWSYM DrawWin256x224x32
NEWSYM DrawWin320x240x16
pushad
cmp byte [MMXSupport],0
cmp byte[MMXSupport],0
je near .noMMX
xor eax,eax
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_y],480
mov byte[vesa2_bits],16
mov dword [vesa2_bits],16
mov dword [vesa2_rpos],11
mov dword [vesa2_gpos],5
mov dword [vesa2_bpos],0
mov dword[vesa2_bits],16
mov dword[vesa2_rpos],11
mov dword[vesa2_gpos],5
mov dword[vesa2_bpos],0
mov byte[vesa2red10],0
mov byte[vesa2_rposng],11
mov byte[vesa2_gposng],5
@@ -885,7 +885,7 @@ NEWSYM converta, dd 0
SECTION .text
NEWSYM DrawScreen ; In-game screen render w/ triple buffer check
cmp dword [converta],1
cmp dword[converta],1
jne near .skipconv
pushad
mov dword[UnusedBit], 10000000000000001000000000000000b