TASEmulators / fceux

FCEUX, a NES Emulator
http://fceux.com
GNU General Public License v2.0
1.22k stars 251 forks source link

DirectDraw works very poorly in Windows 11 #541

Open Dwedit opened 2 years ago

Dwedit commented 2 years ago

Describe the bug DirectDraw is a graphics API that used to be fully functional in Windows XP and earlier, but ever since Desktop Composition (DWM) was added into Windows Vista, DirectDraw has been emulated by the operating system, with varying degrees of accuracy.

The quality of DirectDraw emulation has degraded over time. It seems that in Windows 11, you no longer get bilinear filtering when you stretch a rectangle. This is a basic feature of DirectDraw that has been in there since Windows 98, and Microsoft has now thrown it out for Windows 11.

So I would suggest moving from DirectDraw to something else. I have experience working with Direct3D9, and that API is fully supported by both modern and ancient versions of Windows.

Is it okay if I start writing a D3D9 renderer for FCEUX?

Upgrading from DirectDraw7 to Direct3D9 would bring the technology from 1999 to 2002.

IPeluchito commented 2 years ago

YES please!!! this emulator needs a lot more love in the non-Qt version, in any case if the developers don't agree you could create a fork...

eugene-s-nesdev commented 2 years ago

Another good reason for switch to D3D instead of DirectDraw (look at this issues please):

DirectDraw Compat repo: https://github.com/narzoul/DDrawCompat/issues/104 TASEmulators FCEUX repo: https://github.com/TASEmulators/fceux/issues/364

Dwedit commented 2 years ago

I've actually written something before that overrides DirectDraw and redirects its output to a D3D9 Texture DC. But that was for a completely different motive (wanted to run cool pixel shaders on older DDraw games). Also, it doesn't work on FCEUX in its current form.

TheBoxGame commented 2 years ago

Czy ktoś wypuści update do FCEUX 2.6.5

zeromus commented 2 years ago

just smash the directdraw code and replace it with direct3d9. there's no need to keep directdraw around.

Lincolnhsp commented 2 years ago

I've actually written something before that overrides DirectDraw and redirects its output to a D3D9 Texture DC. But that was for a completely different motive (wanted to run cool pixel shaders on older DDraw games). Also, it doesn't work on FCEUX in its current form.

Hello @Dwedit, about shaders you mentioned... just to contribute with some ideas... i´m using FCEUX with MagPie (which is also open source)... there are some interesting results combining both.

Testing shaders over FCEUX is also very easy with Magpie (just editing a JSON with some parameters).

Maybe some idea brought with Magpie could be useful to implement the Direct3d render...

image GRT Geom - Interlaced image

image

CRT Hylian Shader image image

Lanczos Adaptative Shader image

XBRZ 6x Shader image

XBRZ Freescale Shader image

Anime4K Denoise + FSR image

Best regards!

zeromus commented 2 years ago

Best idea from using magpie is to remove all support for upscaling from fceux entirely (at least the windows port) and expect people to use external tool to do it. It adds so much garbage code to an emulator to support all that junk internally

eugene-s-nesdev commented 2 years ago

You can try new DDrawCompat release here: https://github.com/narzoul/DDrawCompat/releases/tag/v0.4.0 This feature-request https://github.com/narzoul/DDrawCompat/issues/104 has been completed

Configuration: https://github.com/narzoul/DDrawCompat/wiki/Configuration#bltfilter

ClusterM commented 1 year ago

Any progress? We really need this feature.