It's a hack so it probably isn't correct. It does make some games playable that are otherwise very noisy.
Muramasa: loud scratching/hissing in the music at the title screen and throughout the game goes away completely
Xenoblade: removes loud noise from sounds in game (I think adpcm specifically)
(12-21-2010, 08:49 AM)Kein Wrote: [ -> ]You need to apply changes against the source code. Problem is... source code changed too muhc since the patch release, so, you need to know exact revision mylek was working with OR adapt the patch to the current code's state.
Where can I find it?
Mylek something else in your special masked math multi patch did something to eliminate the garbage noise and crackling, which I am still getting by the way with the latest revisions. Test NSMB in an older revision with you're patch applied and then test the latest revision, you should notice noise/crackling that isn't there with your patch applied in an older revision.
(12-25-2010, 08:51 PM)Mylek Wrote: [ -> ]It's a hack so it probably isn't correct. It does make some games playable that are otherwise very noisy.
Muramasa: loud scratching/hissing in the music at the title screen and throughout the game goes away completely
Xenoblade: removes loud noise from sounds in game (I think adpcm specifically)
is your dsp_coef correct?
it should be 4KB and crc32 is D2777C90
Good call. That was exactly my problem. The issues I mentioned were fixed using a correct dsp_coef file with the svn code.
I adapted keisel's addarn to work without tomask and so far this is the best I've been able to reduce it to. It will need 32 bit values internally to handle some of the cases the way it is designed. I will try to do something similar with the subarn next.
Code:
int addarn(int ar, int ix, int wr)
{
int mx = (wr | 1) << 1;
int nar = ar + ix;
int dar = (nar ^ ar ^ ix) & mx;
if (ix >= 0)
{
if (dar > wr)
nar -= (wr + 1);
}
else
{
if ((((nar + wr + 1) ^ nar) & dar) <= wr)
nar += wr + 1;
}
return nar;
}
Mylek, did you see my last post?
(12-29-2010, 03:06 AM)Mylek Wrote: [ -> ]I adapted keisel's addarn to work without tomask and so far this is the best I've been able to reduce it to. It will need 32 bit values internally to handle some of the cases the way it is designed. I will try to do something similar with the subarn next.
Nice work, and a perfect score in my tests:
Code:
tested 7610221, failed 0
Re Xtreme:
I thought your issue might have been addressed by RetroX's post. Here is a version of the mul hack and the special masked math I posted before that should work with the current build if you want to experiment with it.
Got the maskless subarn working along with int/dec.
Code:
static int addarn(int ar, int ix, int wr)
{
int mx = (wr | 1) << 1;
int nar = ar + ix;
int dar = (nar ^ ar ^ ix) & mx;
if (ix >= 0)
{
if (dar > wr) //overflow
nar -= wr + 1;
}
else
{
if ((((nar + wr + 1) ^ nar) & dar) <= wr) //underflow or below min for mask
nar += wr + 1;
}
return nar;
}
static int subarn(int ar, int ix, int wr)
{
int mx = (wr | 1) << 1;
int nar = ar - ix;
int dar = (nar ^ ar ^ ~ix) & mx;
if ((uint)ix > 0xFFFF8000) //(ix < 0 && ix != -0x8000)
{
if (dar > wr) //overflow
nar -= wr + 1;
}
else
{
if ((((nar + wr + 1) ^ nar) & dar) <= wr) //underflow or below min for mask
nar += wr + 1;
}
return nar;
}
static int iar(int ar,int wr)
{
int nar = ar + 1;
if (((nar ^ ar) & ((wr | 1) << 1)) > wr)
nar -= wr + 1;
return nar;
}
static int dar(int ar, int wr)
{
int nar = ar + wr;
if (((nar ^ ar) & ((wr | 1) << 1)) > wr)
nar -= wr + 1;
return nar;
}
oooh, is any of this soon ripe for committing? :>