Im giving a try to Blargg's "nes_ntsc.c" to have a correct pal in my emu.
First i can get image. What i do is to have a buffer of
My "multiplexer" put NES pixels there and i create an D3D9 offscreen surface of
Now NES_NTSC_OUT_WIDTH(256) gives me a value grater than 256. Then when it my emu finish putting pixels i call:
Width = 256, Height = 240.
Anyway to mantain PAR should i stretchblt() to a 292 x 240 surface and apply a Scale2x to make the image better?
The second big question is: how do you do to implement pal emu in your emus? With the above approach my emu doesn't pass full_palette.nes.
And the third is. I remember that someone throws me a link were it was well explain Scale2x algorithm. I have to re-make it and what it says on the net doesn't help too much.
Thxs.
First i can get image. What i do is to have a buffer of
Code:
unsigned char nes_frame[256 * 240]
.My "multiplexer" put NES pixels there and i create an D3D9 offscreen surface of
Code:
g_d3d_hr = d3ddev->CreateOffscreenPlainSurface(NES_NTSC_OUT_WIDTH(256), 240, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &d3d_screen, 0);
Now NES_NTSC_OUT_WIDTH(256) gives me a value grater than 256. Then when it my emu finish putting pixels i call:
Code:
nes_ntsc_blit(ntsc_ntsc, nes_frame, ntsc_image.row_width, 0, NES_NTSC_OUT_WIDTH(ntsc_image.width),
ntsc_image.height, g_screen_data, d3d_lock_rect.Pitch);
ntsc_image.height, g_screen_data, d3d_lock_rect.Pitch);
Width = 256, Height = 240.
Anyway to mantain PAR should i stretchblt() to a 292 x 240 surface and apply a Scale2x to make the image better?
The second big question is: how do you do to implement pal emu in your emus? With the above approach my emu doesn't pass full_palette.nes.
And the third is. I remember that someone throws me a link were it was well explain Scale2x algorithm. I have to re-make it and what it says on the net doesn't help too much.
Thxs.