DSP-4 now usable, but still more fixes to come.
This commit is contained in:
@@ -1175,11 +1175,13 @@ void DSP4_OP09()
|
|||||||
int16 sp_dx, sp_dy;
|
int16 sp_dx, sp_dy;
|
||||||
int16 pixels;
|
int16 pixels;
|
||||||
|
|
||||||
bool8 draw = TRUE;
|
bool8 draw;
|
||||||
|
|
||||||
DSP4.in_count = 2;
|
DSP4.in_count = 2;
|
||||||
DSP4_WAIT(5) resume5 :
|
DSP4_WAIT(5) resume5 :
|
||||||
|
|
||||||
|
draw = TRUE;
|
||||||
|
|
||||||
// opcode termination
|
// opcode termination
|
||||||
raster = DSP4_READ_WORD();
|
raster = DSP4_READ_WORD();
|
||||||
if (raster == -0x8000)
|
if (raster == -0x8000)
|
||||||
@@ -1211,6 +1213,8 @@ void DSP4_OP09()
|
|||||||
DSP4.in_count = 4;
|
DSP4.in_count = 4;
|
||||||
DSP4_WAIT(6) resume6 :
|
DSP4_WAIT(6) resume6 :
|
||||||
|
|
||||||
|
draw = TRUE;
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
// process tile data
|
// process tile data
|
||||||
|
|
||||||
@@ -2047,7 +2051,6 @@ void DSP4_OP11(int16 A, int16 B, int16 C, int16 D, int16 *M)
|
|||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
//Processing Code
|
//Processing Code
|
||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
uint8 dsp4_byte;
|
uint8 dsp4_byte;
|
||||||
uint16 dsp4_address;
|
uint16 dsp4_address;
|
||||||
|
|
||||||
@@ -2138,7 +2141,6 @@ void DSP4SetByte()
|
|||||||
DSP4.out_index = 0;
|
DSP4.out_index = 0;
|
||||||
DSP4.in_index = 0;
|
DSP4.in_index = 0;
|
||||||
|
|
||||||
printf("DSP4 Command: %u\n", DSP4.command);
|
|
||||||
switch (DSP4.command)
|
switch (DSP4.command)
|
||||||
{
|
{
|
||||||
// 16-bit multiplication
|
// 16-bit multiplication
|
||||||
@@ -2147,7 +2149,6 @@ void DSP4SetByte()
|
|||||||
int16 multiplier, multiplicand;
|
int16 multiplier, multiplicand;
|
||||||
int32 product;
|
int32 product;
|
||||||
|
|
||||||
|
|
||||||
multiplier = DSP4_READ_WORD();
|
multiplier = DSP4_READ_WORD();
|
||||||
multiplicand = DSP4_READ_WORD();
|
multiplicand = DSP4_READ_WORD();
|
||||||
|
|
||||||
@@ -2195,8 +2196,7 @@ void DSP4SetByte()
|
|||||||
int16 in3a = DSP4_READ_WORD();
|
int16 in3a = DSP4_READ_WORD();
|
||||||
int16 out1a, out2a, out3a, out4a;
|
int16 out1a, out2a, out3a, out4a;
|
||||||
|
|
||||||
//DSP4_OP0A(in2a, &out2a, &out1a, &out4a, &out3a);
|
DSP4_OP0A(in2a, &out2a, &out1a, &out4a, &out3a);
|
||||||
DSP4_OP0A(in2a, &out1a, &out2a, &out3a, &out4a);
|
|
||||||
|
|
||||||
DSP4_CLEAR_OUT();
|
DSP4_CLEAR_OUT();
|
||||||
DSP4_WRITE_WORD(out1a);
|
DSP4_WRITE_WORD(out1a);
|
||||||
|
|||||||
@@ -21,10 +21,15 @@
|
|||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
EXTSYM dsp4_address,dsp4_byte,DSP4GetByte,DSP4SetByte
|
EXTSYM dsp4_address,dsp4_byte,DSP4GetByte,DSP4SetByte
|
||||||
|
EXTSYM regaccessbankr16,regaccessbankr8,regaccessbankw16,regaccessbankw8
|
||||||
|
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
|
||||||
NEWSYM DSP4Read8b
|
NEWSYM DSP4Read8b
|
||||||
|
test ecx,8000h
|
||||||
|
jnz .dsp4area
|
||||||
|
jmp regaccessbankr8
|
||||||
|
.dsp4area
|
||||||
mov word[dsp4_address],cx
|
mov word[dsp4_address],cx
|
||||||
pushad
|
pushad
|
||||||
call DSP4GetByte
|
call DSP4GetByte
|
||||||
@@ -33,6 +38,10 @@ NEWSYM DSP4Read8b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM DSP4Write8b
|
NEWSYM DSP4Write8b
|
||||||
|
test ecx,8000h
|
||||||
|
jnz .dsp4area
|
||||||
|
jmp regaccessbankw8
|
||||||
|
.dsp4area
|
||||||
mov word[dsp4_address],cx
|
mov word[dsp4_address],cx
|
||||||
mov byte[dsp4_byte],al
|
mov byte[dsp4_byte],al
|
||||||
pushad
|
pushad
|
||||||
@@ -41,6 +50,10 @@ NEWSYM DSP4Write8b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM DSP4Read16b
|
NEWSYM DSP4Read16b
|
||||||
|
test ecx,8000h
|
||||||
|
jnz .dsp4area
|
||||||
|
jmp regaccessbankr16
|
||||||
|
.dsp4area
|
||||||
mov word[dsp4_address],cx
|
mov word[dsp4_address],cx
|
||||||
pushad
|
pushad
|
||||||
call DSP4GetByte
|
call DSP4GetByte
|
||||||
@@ -54,6 +67,10 @@ NEWSYM DSP4Read16b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM DSP4Write16b
|
NEWSYM DSP4Write16b
|
||||||
|
test ecx,8000h
|
||||||
|
jnz .dsp4area
|
||||||
|
jmp regaccessbankw16
|
||||||
|
.dsp4area
|
||||||
mov word[dsp4_address],cx
|
mov word[dsp4_address],cx
|
||||||
mov byte[dsp4_byte],al
|
mov byte[dsp4_byte],al
|
||||||
mov byte[dsp4temp],ah
|
mov byte[dsp4temp],ah
|
||||||
|
|||||||
Reference in New Issue
Block a user