In the pixel shader you could pass in a 256x256 Texture2D with the pallet colors all lined up horizontally in a row. Then your NES textures would be converted to direct3D Texture2Ds with ever pixel converted to a 0-255 index value. There is a texture format that only uses the red value in D3D9. So the texture would only take up 8bits per pixel, but the data that comes into the shader would be from 0-1.
// Pixel shader might look like this:
float4 mainPS() : COLOR0
{
float4 colorIndex = tex2D(MainTexture, uv);
float4 palletColor = tex2D(PalletTexture, float2(colorIndex.x, 0);
return palletColor;
}
EDIT: A more correct way would be to add in all the blending pallet version you need aligned vertically in the texture and referencing them with your colorIndex's 'alpha' value:
float4 mainPS() : COLOR0
{
float4 colorIndex = tex2D(MainTexture, uv);
float4 palletColor = tex2D(PalletTexture, float2(colorIndex.x, colorIndex.a);
return palletColor;
}
A third way would be to just fake the NES low fade quality by toon shading the alpha color:
float4 mainPS() : COLOR0
{
float4 colorIndex = tex2D(MainTexture, uv);
float4 palletColor = tex2D(PalletTexture, float2(colorIndex.x, 0);
palletColor.a = floor(palletColor.a * fadeQuality) / fadeQuality;
//NOTE: If fadeQuality where to equal say '3' there would be only 3 levels of fade.
return palletColor;
}