- Code: Select all
else if(addr<0x700)
v=SCSP->RINGBUF[(addr-0x600)/2];
return v;
RINGBUF is 64 elements
But (0x700-0x600) / 2 = 128
Array out of bounds by 2x ?
Something static code analysis picked up
else if(addr<0x700)
v=SCSP->RINGBUF[(addr-0x600)/2];
return v;
#ifdef USEDSP
//SCSPDSP_SetSample(&SCSPs[0].DSP,/*sample>>5*/(sample*LPANTABLE[(Enc|0xE0)&0xFFE0])>>(SHIFT+3)/*>>SHIFT*/,ISEL(slot),IMXL(slot));
SCSPDSP_SetSample(&SCSPs[0].DSP,/*sample>>5*/(sample*LPANTABLE[Enc | 0xE0]) >> (SHIFT + 3)/*>>SHIFT*/, ISEL(slot), IMXL(slot));
#endif
Spindizzi wrote:Hi,
I don't know if this can point you in the right direction
May be I found a solution to correct vf3 music in 2 players stage related here
https://www.supermodel3.com/Forum/viewtopic.php?f=2&t=1306
line 1807 SCSP.cpp
- Code: Select all
#ifdef USEDSP
//SCSPDSP_SetSample(&SCSPs[0].DSP,/*sample>>5*/(sample*LPANTABLE[(Enc|0xE0)&0xFFE0])>>(SHIFT+3)/*>>SHIFT*/,ISEL(slot),IMXL(slot));
SCSPDSP_SetSample(&SCSPs[0].DSP,/*sample>>5*/(sample*LPANTABLE[Enc | 0xE0]) >> (SHIFT + 3)/*>>SHIFT*/, ISEL(slot), IMXL(slot));
#endif
I Hope is doesn't break something else because I can't understand the purpose of the mask 0xffe0. Is this correct another sound in other game ?
Notice : If I remove the OR 0xe0, these is no more motor sound in sr2
For test only
The exe x32-x64(svn514) include this sound patch for vf3 and also the sr2 music patch. I've added a save state for vf3 just before the music bug
https://www.dropbox.com/s/0vhoxbrf1bbf8o6/Supermodel-vf3-test.rar?raw=1
++
Users browsing this forum: No registered users and 1 guest