Implemented opcode 0F in DSP-1 emulation

This commit is contained in:
pagefault
2003-02-23 16:55:35 +00:00
parent 9d3f348fc7
commit 2bec9767a1
2 changed files with 31 additions and 1 deletions

View File

@@ -1440,5 +1440,21 @@ void DSPOp1C()
Log_Message("OP1C Apply Matrix CX:%d CY:%d CZ",Op1CXAR,Op1CYAR,Op1CZAR); Log_Message("OP1C Apply Matrix CX:%d CY:%d CZ",Op1CXAR,Op1CYAR,Op1CZAR);
#endif #endif
} }
#endif #endif
// Op 0F = Test DSP1 RAM
// Returns 0x0000 if RAM checks OK
unsigned short Op0FRamsize;
unsigned short Op0FPass;
void DSPOp0F()
{
// We use our PC's RAM, not DSP1 RAM but we need to pass the RAM check
Op0FPass = 0x0000;
return;
#ifdef DebugDSP1
Log_Message("OP0F RAM Test Pass:%d", Op0FPass);
#endif
}

View File

@@ -23,6 +23,7 @@ EXTSYM debstop
EXTSYM DSPOp00,Op00Multiplicand,Op00Multiplier EXTSYM DSPOp00,Op00Multiplicand,Op00Multiplier
EXTSYM Op00Result EXTSYM Op00Result
;EXTSYM DSPOp10,Op10a,Op10b,Op10A,Op10B ;EXTSYM DSPOp10,Op10a,Op10b,Op10A,Op10B
EXTSYM DSPOp0F,Op0FPass
EXTSYM DSPOp04,Op04Angle,Op04Cos,Op04Radius,Op04Sin EXTSYM DSPOp04,Op04Angle,Op04Cos,Op04Radius,Op04Sin
EXTSYM DSPOp28,Op28R,Op28X,Op28Y,Op28Z EXTSYM DSPOp28,Op28R,Op28X,Op28Y,Op28Z
EXTSYM DSPOp0C,Op0CA,Op0CX1,Op0CX2,Op0CY1,Op0CY2 EXTSYM DSPOp0C,Op0CA,Op0CX1,Op0CX2,Op0CY1,Op0CY2
@@ -245,6 +246,7 @@ NEWSYM DSP1Write8b
DSP1WriteInit 1Bh, 3 ; Calculation of inner product Matrix B DSP1WriteInit 1Bh, 3 ; Calculation of inner product Matrix B
DSP1WriteInit 2Bh, 3 ; Calculation of inner product Matrix C DSP1WriteInit 2Bh, 3 ; Calculation of inner product Matrix C
DSP1WriteInit 14h, 6 ; 3D angle rotation DSP1WriteInit 14h, 6 ; 3D angle rotation
DSP1WriteInit 0Fh, 1 ; DSP RAM Check
ret ret
%macro DSP1WriteProc 2 %macro DSP1WriteProc 2
@@ -300,6 +302,7 @@ NEWSYM DSP1Write16b
DSP1WriteProc 1Bh, DSP1_1B ; Calculation of inner product Matrix B DSP1WriteProc 1Bh, DSP1_1B ; Calculation of inner product Matrix B
DSP1WriteProc 2Bh, DSP1_2B ; Calculation of inner product Matrix C DSP1WriteProc 2Bh, DSP1_2B ; Calculation of inner product Matrix C
DSP1WriteProc 14h, DSP1_14 ; 3D angle rotation DSP1WriteProc 14h, DSP1_14 ; 3D angle rotation
DSP1WriteProc 0Fh, DSP1_0F ; DSP RAM Check
ret ret
NEWSYM DSP1COp, db 0 NEWSYM DSP1COp, db 0
@@ -681,6 +684,17 @@ DSP1_0D: ; Convert from global to object coords Matrix A
mov byte[DSP1RLeft],3 mov byte[DSP1RLeft],3
pop eax pop eax
ret ret
DSP1_0F: ; DSP RAM Test
push eax
mov ax,[DSP1VARS]
pushad
call DSPOp0F
popad
mov ax,[Op0FPass]
mov word[DSP1RET],ax
mov byte[DSP1RLeft],1
pop eax
ret
DSP1_1D: ; Convert from global to object coords Matrix B DSP1_1D: ; Convert from global to object coords Matrix B
push eax push eax
mov ax,[DSP1VARS] mov ax,[DSP1VARS]