D3D error bug report

I know it’s a crappy graphics card, but nevertheless it should work with Retroarch. Intel GMA video driver. Works fine with directX 9 games. I tried copying d3d9x_43.dll, but does still not work. Here is the log: RetroArch CMD: Q:/RetroArch/0.98/retroarch.exe Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/Aero the Acro-Bat 2 (Europe).md -c Q:\RetroArch\0.98b2\retroarch.cfg -v -S Q:/RetroArch/Savestates/Aero the Acro-Bat 2 (Europe).state

RetroArch: Opening file: “Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/Aero the Acro-Bat 2 (Europe).md” === Build ======================================= Compiler: MinGW (4.7.1) 64-bit Built: Nov 8 2012

RetroArch: [CPUID]: Vendor: GenuineIntel RetroArch: [CPUID]: SSE: 1 RetroArch: [CPUID]: SSE2: 1 RetroArch: [CPUID]: AVX: 0 === Config === video_driver = “d3d9” audio_driver = “dsound” video_fullscreen = “true” video_windowed_fullscreen = “false” video_disable_composition = “true” video_aspect_ratio_auto = “true” libretro_path = “Q:/RetroArch/0.98/libretro-git-genplus-x86_64.dll” stdin_cmd_enable = “true” system_directory = “Q:/RetroArch/Bios/” screenshot_directory = “Q:/RetroArch/Screenshot/” === Config end === RetroArch: Loading dynamic libretro from: “Q:/RetroArch/0.98/libretro-git-genplus-x86_64.dll” RetroArch: Version of libretro API: 1 RetroArch: Compiled against API: 1 RetroArch: Environ PERFORMANCE_LEVEL: 1. RetroArch: Environ SET_PIXEL_FORMAT: RGB565. Frontend supports RGB565 - will use that instead of XRGB1555. RetroArch: ROM loading skipped. Implementation will load it on its own. RetroArch: Environ SYSTEM_DIRECTORY: “Q:/RetroArch/Bios/”. Sega CD EU BRAM should be located at: Q:/RetroArch/Bios/\scd_E.brm Sega CD US BRAM should be located at: Q:/RetroArch/Bios/\scd_U.brm Sega CD JP BRAM should be located at: Q:/RetroArch/Bios/\scd_J.brm Sega CD EU BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_E.bin Sega CD US BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_U.bin Sega CD JP BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_J.bin Master System EU BIOS should be located at: Q:/RetroArch/Bios/\bios_E.sms Master System US BIOS should be located at: Q:/RetroArch/Bios/\bios_U.sms Master System JP BIOS should be located at: Q:/RetroArch/Bios/\bios_J.sms Game Gear BIOS should be located at: Q:/RetroArch/Bios/\bios.gg S&K upmem ROM should be located at: Q:/RetroArch/Bios/\sk2chip.bin S&K ROM should be located at: Q:/RetroArch/Bios/\sk.bin Game Genie ROM should be located at: Q:/RetroArch/Bios/\ggenie.bin Action Replay ROM should be located at: Q:/RetroArch/Bios/\areplay.bin BRAM file is located at: Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/cart.brm INFORMATION - Loading 2097152 bytes … RetroArch: Timings deviate too much. Will not adjust. (Display = 59.95 Hz, Game = 49.70 Hz) RetroArch: Set audio input rate to: 44100.00 Hz. RetroArch: Adjusting aspect ratio to 1.43 RetroArch: Video @ fullscreen RetroArch: Setting multimedia scheduling for DWM. RetroArch: [D3D9]: Monitor size: 1680x1050. RetroArch [ERROR] :: [D3D9]: Failed to init D3D9 (Failed to init device). RetroArch [ERROR] :: Cannot open video driver … Exiting … RetroArch [ERROR] :: Fatal error received in: “init_video_input()”

RetroArch [ERROR] :: [D3D9]: Failed to init D3D9 (Failed to init device).

This error message is caused by the very first call to D3D9 failing, device creation. If even that fails, there’s not much I can do.

For reference:


   if (FAILED(g_pD3D->CreateDevice(
               Monitor::cur_mon_id,
               D3DDEVTYPE_HAL,
               hWnd,
               D3DCREATE_HARDWARE_VERTEXPROCESSING,
               &d3dpp,
               &dev)))
   {
      throw std::runtime_error("Failed to init device");
   }

You could change it to catch and report the HRESULT code that it fails with.

Pushed: https://github.com/Themaister/RetroArch/commit/18551b58e78269a019a799e753ae80ba932d34c4

Nice! Have to set up à build environment.

I just compiled Retroarch from scratch and get the same error. Failed to init device, code: 0x8876086c. Hope this helps.

RetroArch CMD: D:/RetroArch/retroarch.exe D:/Roms/Sega Megadrive/3 Ninjas Kick Back (USA).md -c D:\RetroArch\retroarch.cfg -v

RetroArch: Opening file: “D:/Roms/Sega Megadrive/3 Ninjas Kick Back (USA).md” === Build ======================================= Compiler: MinGW (4.6.3) 64-bit Built: Dec 15 2012

RetroArch: [CPUID]: Vendor: GenuineIntel RetroArch: [CPUID]: SSE: 1 RetroArch: [CPUID]: SSE2: 1 RetroArch: [CPUID]: AVX: 0 === Config === video_driver = “d3d9” audio_driver = “dsound” libretro_path = “D:/RetroArch/libretro-git-genplus-x86_64.dll” video_post_filter_record = “false” video_gpu_record = “false” phoenix_last_rom = “D:/Roms/Sega Megadrive/3 Ninjas Kick Back (USA).zip” stdin_cmd_enable = “true” system_directory = “D:/Roms/Sega Megadrive/” === Config end === RetroArch: Loading dynamic libretro from: “D:/RetroArch/libretro-git-genplus-x86_64.dll” RetroArch: Version of libretro API: 1 RetroArch: Compiled against API: 1 RetroArch: Environ PERFORMANCE_LEVEL: 1. RetroArch: Environ SET_PIXEL_FORMAT: RGB565. Frontend supports RGB565 - will use that instead of XRGB1555. RetroArch: ROM loading skipped. Implementation will load it on its own. RetroArch: Environ SYSTEM_DIRECTORY: “D:/Roms/Sega Megadrive/”. Sega CD EU BRAM should be located at: D:/Roms/Sega Megadrive/\scd_E.brm Sega CD US BRAM should be located at: D:/Roms/Sega Megadrive/\scd_U.brm Sega CD JP BRAM should be located at: D:/Roms/Sega Megadrive/\scd_J.brm Sega CD EU BIOS should be located at: D:/Roms/Sega Megadrive/\bios_CD_E.bin Sega CD US BIOS should be located at: D:/Roms/Sega Megadrive/\bios_CD_U.bin Sega CD JP BIOS should be located at: D:/Roms/Sega Megadrive/\bios_CD_J.bin Master System EU BIOS should be located at: D:/Roms/Sega Megadrive/\bios_E.sms Master System US BIOS should be located at: D:/Roms/Sega Megadrive/\bios_U.sms Master System JP BIOS should be located at: D:/Roms/Sega Megadrive/\bios_J.sms Game Gear BIOS should be located at: D:/Roms/Sega Megadrive/\bios.gg S&K upmem ROM should be located at: D:/Roms/Sega Megadrive/\sk2chip.bin S&K ROM should be located at: D:/Roms/Sega Megadrive/\sk.bin Game Genie ROM should be located at: D:/Roms/Sega Megadrive/\ggenie.bin Action Replay ROM should be located at: D:/Roms/Sega Megadrive/\areplay.bin BRAM file is located at: D:/Roms/Sega Megadrive/cart.brm INFORMATION - Loading 2097152 bytes … RetroArch: Set audio input rate to: 44120.06 Hz. RetroArch: Adjusting aspect ratio to 1.43 RetroArch: Video @ 960x672 RetroArch: Setting multimedia scheduling for DWM. RetroArch: [D3D9]: Monitor size: 1680x1050. RetroArch [ERROR] :: [D3D9]: Failed to init D3D9 (Failed to init device, code: 0x8876086c). RetroArch [ERROR] :: Cannot open video driver … Exiting … RetroArch [ERROR] :: Fatal error received in: “init_video_input()”

Do you get this error when launching in both windowed and fullscreen?

Yes, works with opengl though. Filed a bug report through github