From 5514a050f4e936f5c333fa1271b11bf5a6a9ea39 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 4 Jan 2015 01:43:23 +0200 Subject: spu: start offload code to TI C64x DSP --- plugins/dfsound/spu_c64x.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/dfsound/spu_c64x.h (limited to 'plugins/dfsound/spu_c64x.h') diff --git a/plugins/dfsound/spu_c64x.h b/plugins/dfsound/spu_c64x.h new file mode 100644 index 0000000..ba2a4c3 --- /dev/null +++ b/plugins/dfsound/spu_c64x.h @@ -0,0 +1,9 @@ + +struct region_mem { + unsigned char spu_ram[512 * 1024]; + int RVB[NSSIZE * 2]; + int SSumLR[NSSIZE * 2]; + SPUCHAN s_chan[24 + 1]; + struct spu_worker worker; +}; + -- cgit v1.2.3 From de4a0279efefdd2e4595c8fc27f1564f4bff9341 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 5 Jan 2015 04:27:03 +0200 Subject: spu: finish offload code to TI C64x DSP rather disappointing result so far, though :( --- plugins/dfsound/spu_c64x.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'plugins/dfsound/spu_c64x.h') diff --git a/plugins/dfsound/spu_c64x.h b/plugins/dfsound/spu_c64x.h index ba2a4c3..d4e73e9 100644 --- a/plugins/dfsound/spu_c64x.h +++ b/plugins/dfsound/spu_c64x.h @@ -1,9 +1,25 @@ +#define COMPONENT_NAME "pcsxr_spu" + +enum { + CCMD_INIT = 0x101, + CCMD_DOIT = 0x102, +}; struct region_mem { unsigned char spu_ram[512 * 1024]; int RVB[NSSIZE * 2]; int SSumLR[NSSIZE * 2]; + int SB[SB_SIZE * 24]; + // careful not to lose ARM writes by DSP overwriting + // with old data when it's writing out neighbor cachelines + int _pad1[128/4 - ((NSSIZE * 4 + SB_SIZE * 24) & (128/4 - 1))]; SPUCHAN s_chan[24 + 1]; + int _pad2[128/4 - ((sizeof(SPUCHAN) * 25 / 4) & (128/4 - 1))]; struct spu_worker worker; + SPUConfig spu_config; + // init/debug + int sizeof_region_mem; + int offsetof_s_chan1; + int offsetof_worker_ram; }; -- cgit v1.2.3 From 3bd31caf9e9f5ddab2bf4fbdb5a129f4972c45f3 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 10 Jan 2015 01:55:24 +0200 Subject: spu: support multiple pending buffers for threaded implementation --- plugins/dfsound/spu_c64x.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/dfsound/spu_c64x.h') diff --git a/plugins/dfsound/spu_c64x.h b/plugins/dfsound/spu_c64x.h index d4e73e9..bb20cc3 100644 --- a/plugins/dfsound/spu_c64x.h +++ b/plugins/dfsound/spu_c64x.h @@ -7,12 +7,10 @@ enum { struct region_mem { unsigned char spu_ram[512 * 1024]; - int RVB[NSSIZE * 2]; - int SSumLR[NSSIZE * 2]; int SB[SB_SIZE * 24]; // careful not to lose ARM writes by DSP overwriting // with old data when it's writing out neighbor cachelines - int _pad1[128/4 - ((NSSIZE * 4 + SB_SIZE * 24) & (128/4 - 1))]; + int _pad1[128/4 - ((SB_SIZE * 24) & (128/4 - 1))]; SPUCHAN s_chan[24 + 1]; int _pad2[128/4 - ((sizeof(SPUCHAN) * 25 / 4) & (128/4 - 1))]; struct spu_worker worker; @@ -20,6 +18,7 @@ struct region_mem { // init/debug int sizeof_region_mem; int offsetof_s_chan1; - int offsetof_worker_ram; + int offsetof_spos_3_20; }; +#define ACTIVE_CNT 3 -- cgit v1.2.3 From 05c7cec77522f04857f655474574469a5e66661d Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 11 Jan 2015 03:35:32 +0200 Subject: spu: put reverb on the thread too and more stuff to work struct --- plugins/dfsound/spu_c64x.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/dfsound/spu_c64x.h') diff --git a/plugins/dfsound/spu_c64x.h b/plugins/dfsound/spu_c64x.h index bb20cc3..8210e63 100644 --- a/plugins/dfsound/spu_c64x.h +++ b/plugins/dfsound/spu_c64x.h @@ -11,8 +11,12 @@ struct region_mem { // careful not to lose ARM writes by DSP overwriting // with old data when it's writing out neighbor cachelines int _pad1[128/4 - ((SB_SIZE * 24) & (128/4 - 1))]; - SPUCHAN s_chan[24 + 1]; - int _pad2[128/4 - ((sizeof(SPUCHAN) * 25 / 4) & (128/4 - 1))]; + struct spu_in { + // these are not to be modified by DSP + SPUCHAN s_chan[24 + 1]; + REVERBInfo rvb; + } in; + int _pad2[128/4 - ((sizeof(struct spu_in) / 4) & (128/4 - 1))]; struct spu_worker worker; SPUConfig spu_config; // init/debug -- cgit v1.2.3