diff --git a/zsnes/src/chips/dsp1proc.asm b/zsnes/src/chips/dsp1proc.asm index fc7bdf03..6eb88d05 100644 --- a/zsnes/src/chips/dsp1proc.asm +++ b/zsnes/src/chips/dsp1proc.asm @@ -22,6 +22,7 @@ EXTSYM DSPOp0A,Op0AA,Op0AB,Op0AC,Op0AD,Op0AVS,DSPOp10 EXTSYM debstop EXTSYM DSPOp00,Op00Multiplicand,Op00Multiplier EXTSYM Op00Result +;EXTSYM DSPOp10,Op10a,Op10b,Op10A,Op10B EXTSYM DSPOp04,Op04Angle,Op04Cos,Op04Radius,Op04Sin EXTSYM DSPOp28,Op28R,Op28X,Op28Y,Op28Z EXTSYM DSPOp0C,Op0CA,Op0CX1,Op0CX2,Op0CY1,Op0CY2 @@ -73,6 +74,7 @@ NEWSYM DSP1Read8b3F mov al,80h ret + NEWSYM DSP1Read16b3F test ecx,8000h jnz .dsp1area @@ -82,7 +84,7 @@ NEWSYM DSP1Read16b3F jae .doC000 cmp byte[DSP1RLeft],0 jne .movestuff - xor ax,ax + mov ax,0FFFFh ret .doC000 mov ax,08000h @@ -142,7 +144,7 @@ NEWSYM DSP1Read16b jae .do7000 cmp byte[DSP1RLeft],0 jne .movestuff - xor ax,ax + mov ax,0FFFFh ret .do7000 mov ax,8000h @@ -332,7 +334,6 @@ DSP1_00: ; 16-bit multiply EXTSYM Op10Exponent, Op10ExponentR EXTSYM Op10Coefficient, Op10CoefficientR - DSP1_10: ; Inverse push eax mov ax,[DSP1VARS] @@ -367,7 +368,6 @@ DSP1_04: ; Trigonometric mov byte[DSP1RLeft],2 pop eax ret - DSP1_08: ; Vector Size push eax mov ax,[DSP1VARS] @@ -386,7 +386,6 @@ DSP1_08: ; Vector Size mov byte[DSP1RLeft],2 pop eax ret - DSP1_18: ; Vector Size Comparison push eax mov ax,[DSP1VARS] @@ -424,6 +423,7 @@ DSP1_28: ; Vector Absolute Value pop eax ret + DSP1_0C: ; Coordinate Rotation or byte[DSPDet],08h push eax @@ -443,7 +443,6 @@ DSP1_0C: ; Coordinate Rotation mov byte[DSP1RLeft],2 pop eax ret - DSP1_1C: ; 3D Coordinate Rotation push eax mov ax,[DSP1VARS] @@ -471,6 +470,7 @@ DSP1_1C: ; 3D Coordinate Rotation pop eax ret + DSP1_02: ; Vector Size or byte[DSPDet],10h push eax @@ -561,7 +561,6 @@ DSP1_0A: ; Raster Data Calculation via DMA mov byte[DSP1RLeft],4 pop eax ret - DSP1_06: ; Object Projection Calculation or byte[DSPDet],40h push eax @@ -601,7 +600,6 @@ DSP1_06: ; Object Projection Calculation mov [eax+11],bx pop ebx add dword[dsp1ptr],13 - DSP1_0E: ; Coordinate Calculation of a point onscreen push eax mov ax,[DSP1VARS] @@ -618,7 +616,6 @@ DSP1_0E: ; Coordinate Calculation of a point onscreen mov byte[DSP1RLeft],2 pop eax ret - DSP1_01: ; Set Attitude Matrix A push eax mov ax,[DSP1VARS] @@ -634,7 +631,6 @@ DSP1_01: ; Set Attitude Matrix A popad pop eax ret - DSP1_11: ; Set Attitude Matrix B push eax mov ax,[DSP1VARS] @@ -650,7 +646,6 @@ DSP1_11: ; Set Attitude Matrix B popad pop eax ret - DSP1_21: ; Set Attitude Matrix C push eax mov ax,[DSP1VARS] @@ -666,7 +661,6 @@ DSP1_21: ; Set Attitude Matrix C popad pop eax ret - DSP1_0D: ; Convert from global to object coords Matrix A push eax mov ax,[DSP1VARS] @@ -687,7 +681,6 @@ DSP1_0D: ; Convert from global to object coords Matrix A mov byte[DSP1RLeft],3 pop eax ret - DSP1_1D: ; Convert from global to object coords Matrix B push eax mov ax,[DSP1VARS] @@ -708,7 +701,6 @@ DSP1_1D: ; Convert from global to object coords Matrix B mov byte[DSP1RLeft],3 pop eax ret - DSP1_2D: ; Convert from global to object coords Matrix C push eax mov ax,[DSP1VARS] @@ -729,7 +721,6 @@ DSP1_2D: ; Convert from global to object coords Matrix C mov byte[DSP1RLeft],3 pop eax ret - DSP1_03: ; Convert from object to global coords Matrix A push eax mov ax,[DSP1VARS] @@ -750,7 +741,6 @@ DSP1_03: ; Convert from object to global coords Matrix A mov byte[DSP1RLeft],3 pop eax ret - DSP1_13: ; Convert from object to global coords Matrix B push eax mov ax,[DSP1VARS] @@ -771,7 +761,6 @@ DSP1_13: ; Convert from object to global coords Matrix B mov byte[DSP1RLeft],3 pop eax ret - DSP1_23: ; Convert from object to global coords Matrix C push eax mov ax,[DSP1VARS] @@ -792,7 +781,6 @@ DSP1_23: ; Convert from object to global coords Matrix C mov byte[DSP1RLeft],3 pop eax ret - DSP1_0B: ; Calculation of inner product Matrix A push eax mov ax,[DSP1VARS] @@ -809,7 +797,6 @@ DSP1_0B: ; Calculation of inner product Matrix A mov byte[DSP1RLeft],1 pop eax ret - DSP1_1B: ; Calculation of inner product Matrix B push eax mov ax,[DSP1VARS] @@ -826,7 +813,6 @@ DSP1_1B: ; Calculation of inner product Matrix B mov byte[DSP1RLeft],1 pop eax ret - DSP1_2B: ; Calculation of inner product Matrix C push eax mov ax,[DSP1VARS] @@ -843,7 +829,6 @@ DSP1_2B: ; Calculation of inner product Matrix C mov byte[DSP1RLeft],1 pop eax ret - DSP1_14: ; 3D angle rotation push eax mov ax,[DSP1VARS]