dsp lle: coef is really 0x800 words
dspspy: fill the whole iram! crazy thing, normally likes len%4=0, however to fill the whole iram you use 8191 instead of 8192... :s git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4011 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
81ee1d1b10
commit
45feea42c2
|
@ -54,7 +54,7 @@ static bool LoadRom(const char *fname, int size_in_words, u16 *rom)
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
|
||||||
// Byteswap the rom.
|
// Byteswap the rom.
|
||||||
for (int i = 0; i < DSP_IROM_SIZE; i++)
|
for (int i = 0; i < size_in_words; i++)
|
||||||
rom[i] = Common::swap16(rom[i]);
|
rom[i] = Common::swap16(rom[i]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
#define DSP_DRAM_SIZE 0x1000
|
#define DSP_DRAM_SIZE 0x1000
|
||||||
#define DSP_DRAM_MASK 0x0fff
|
#define DSP_DRAM_MASK 0x0fff
|
||||||
|
|
||||||
#define DSP_COEF_BYTE_SIZE 0x2000
|
#define DSP_COEF_BYTE_SIZE 0x1000
|
||||||
#define DSP_COEF_SIZE 0x1000
|
#define DSP_COEF_SIZE 0x800
|
||||||
#define DSP_COEF_MASK 0x0fff
|
#define DSP_COEF_MASK 0x7ff
|
||||||
|
|
||||||
#define DSP_RESET_VECTOR 0x8000
|
#define DSP_RESET_VECTOR 0x8000
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@ void IDSP::SendTask(void *addr, u16 iram_addr, u16 len, u16 start)
|
||||||
{
|
{
|
||||||
// addr main ram addr 4byte aligned (1 Gekko word)
|
// addr main ram addr 4byte aligned (1 Gekko word)
|
||||||
// iram_addr dsp addr 4byte aligned (2 DSP words)
|
// iram_addr dsp addr 4byte aligned (2 DSP words)
|
||||||
// len block length in bytes multiple of 4
|
// len block length in bytes multiple of 4 (wtf? if you want to fill whole iram, you need 8191)
|
||||||
|
// (8191 % 4 = 3) wtffff
|
||||||
// start dsp iram entry point
|
// start dsp iram entry point
|
||||||
while (CheckMailTo());
|
while (CheckMailTo());
|
||||||
SendMailTo(0x80F3A001);
|
SendMailTo(0x80F3A001);
|
||||||
|
|
|
@ -328,10 +328,8 @@ void handle_dsp_mail(void)
|
||||||
// Then send the code.
|
// Then send the code.
|
||||||
DCFlushRange((void *)dsp_code[curUcode], 0x2000);
|
DCFlushRange((void *)dsp_code[curUcode], 0x2000);
|
||||||
// DMA ucode to iram base, entry point is just after exception vectors...0x10
|
// DMA ucode to iram base, entry point is just after exception vectors...0x10
|
||||||
// (shuffle2) 5256 is the highest I could get the dma block length to on my wii - still needs to be looked into
|
// NOTE: for any ucode made by dsptool, the block length will be 8191
|
||||||
// for the tstaxh test, 5256 only yields up to step 325. There are 532 send_backs in the ucode, and it takes up
|
real_dsp.SendTask((void *)MEM_VIRTUAL_TO_PHYSICAL(dsp_code[curUcode]), 0, sizeof(dsp_code[curUcode])-1, 0x10);
|
||||||
// almost all of the iram.
|
|
||||||
real_dsp.SendTask((void *)MEM_VIRTUAL_TO_PHYSICAL(dsp_code[curUcode]), 0, 5256, 0x10);
|
|
||||||
|
|
||||||
runningUcode = curUcode + 1;
|
runningUcode = curUcode + 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue