PDA

View Full Version : How can I get rid of "smoothed" DirectDraw blittin



Mike
11-01-2004, 09:04 PM
Hi

I'm making Chip-8 (old home PC platform which was introduced in end of '70) emulator in Delphi. I have implemented full CPU and sound emulation and emulator runs games like Tetris, Brix and Pong fine. But my problem is DirectDraw's annoying feature of interpolating the blitted surface into blurred mess. Earlier I used windows GDI/TCanvas which was fine, except a bit too slow to keep everything in sync. System has 64x32 resolution monochrome (1-bit) screeen which I am emulating using virtual screen buffer(VRAM: array [0..31,0..63] of Byte) that will be written into locked back buffer which I will blit into primary. The game runs in window so I can't use flipping anyway... and cause the screen is so small I need stretching anyway, but not the smooting with it. Tetris is almost unplayable because the falling particles look like snowflakes instead of tetris blocks.

I tried setting DDBLTFX_ARITHSTRETCHY flag of TDXBLTFX record when I call DirectDrawSurface.Blt(), but it wasn't any help. I also tried using DirectDraw4 instead of DirectDraw version 7, but this problem exists on it too. Even more stranger thing is that I wont get this kind of blurring in Windows 98 (and same version if DirectX), so it seems to be somehow involved with Windows XP.

Harry Hunt
11-01-2004, 10:05 PM
if i remember correctly, that problem doesn't occur if you create your surfaces in system memory, but of course that makes it a lot slower...
You can probably influence it by using Direct3d and its 2d capabilities.