Try this...
Code:
unsigned int ARGB1555toRGBA8(unsigned short c)
{
const unsigned int a = c&0x8000, r = c&0x7C00, g = c&0x03E0, b = c&0x1F;
const unsigned int rgb = (r << 17) | (g << 14) | (b << 11);
return ((a * 0xFF) >> 15) | rgb | ((rgb >> 5) & 0x07070700);
}
If the source format is really ARGB, then your masking variables are incorrect. Notice how your "a" variable mask has a range of 5 bits when it's supposed to have just 1 bit. Since it's meant to be for the blue component, then that's likely why you're getting a lot of blue. Also, there is no ARGB8 format on 3DS. The alpha portion is on the opposite side, making it RGB8. So, we have to shift each RGB component to the left by 8 bits. Alpha is set to either be on or off, so we multiply by 255 (max value for 8-bit), and shift down, making the resulting value either 255 or 0. Everything else is similar to the original code you pulled from.
Be warned, I did not test this. All I did was use Win10's calculator with the Programmer setting to verify shifting of values to be correct.