[PC98VID] Fix video driver settings
authorStanislav Motylkov <x86corez@gmail.com>
Thu, 26 May 2022 20:34:12 +0000 (23:34 +0300)
committerStanislav Motylkov <x86corez@gmail.com>
Fri, 27 May 2022 15:56:13 +0000 (18:56 +0300)
- Store settings in non hardware-profile registry key.
- Rename driver file to vgapnp.sys to keep in sync with VBE.
- This makes PC-98 video driver working again.

Addendum to 073a1ea3 and f03750de. CORE-18201 CORE-17977

win32ss/drivers/miniport/pc98vid/CMakeLists.txt
win32ss/drivers/miniport/pc98vid/pc98disp.inf
win32ss/drivers/miniport/pc98vid/pc98vid_reg.inf
win32ss/drivers/miniport/vbe/CMakeLists.txt
win32ss/drivers/miniport/vga_new/CMakeLists.txt

index db0f8ae..b1966da 100644 (file)
@@ -8,8 +8,8 @@ list(APPEND SOURCE
 add_library(pc98vid MODULE ${SOURCE} pc98vid.rc)
 
 set_module_type(pc98vid kernelmodedriver)
-# Actual binary filename is vga.sys
-set_target_properties(pc98vid PROPERTIES OUTPUT_NAME "vga" PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+# Actual binary filename is vgapnp.sys
+set_target_properties(pc98vid PROPERTIES OUTPUT_NAME "vgapnp" PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
 add_pch(pc98vid pc98vid.h SOURCE)
 add_importlibs(pc98vid ntoskrnl videoprt)
 
index 81a8608..d67f988 100644 (file)
@@ -27,7 +27,7 @@ DefaultDestDir = 12
 CopyFiles = pc98vid_CopyFiles.NT
 
 [pc98vid_CopyFiles.NT]
-vga.sys
+vgapnp.sys
 
 [Pc98Vid_Inst.NT.Services]
 AddService = vga, 0x00000002, vga_Service_Inst
@@ -36,7 +36,7 @@ AddService = vga, 0x00000002, vga_Service_Inst
 ServiceType   = 1
 StartType     = 1
 ErrorControl  = 0
-ServiceBinary = %12%\vga.sys
+ServiceBinary = %12%\vgapnp.sys
 LoadOrderGroup = Video
 
 [vga.SoftwareSettings]
index becce43..753dfb8 100644 (file)
@@ -2,9 +2,9 @@
 [AddReg]
 HKLM,"SYSTEM\CurrentControlSet\Services\vga","ErrorControl",0x00010001,0x00000000
 HKLM,"SYSTEM\CurrentControlSet\Services\vga","Group",0x00000000,"Video Save"
-HKLM,"SYSTEM\CurrentControlSet\Services\vga","ImagePath",0x00020000,"system32\drivers\vga.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\vga","ImagePath",0x00020000,"system32\drivers\vgapnp.sys"
 HKLM,"SYSTEM\CurrentControlSet\Services\vga","Start",0x00010001,0x00000004
 HKLM,"SYSTEM\CurrentControlSet\Services\vga","Type",0x00010001,0x00000001
 
-HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vga\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
-HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vga\Device0","VgaCompatible",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Services\vga\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
+HKLM,"SYSTEM\CurrentControlSet\Services\vga\Device0","VgaCompatible",0x00010001,1
index 415c9cc..3b79632 100644 (file)
@@ -9,5 +9,9 @@ set_module_type(vgapnp kernelmodedriver)
 add_importlibs(vgapnp videoprt)
 add_pch(vgapnp vbemp.h SOURCE)
 target_link_libraries(vgapnp libcntpr)
-add_cd_file(TARGET vgapnp DESTINATION reactos/system32/drivers FOR all)
-add_registry_inf(vbemp_reg.inf)
+
+# pc98vid takes place of vga service on PC-98 platform
+if(NOT SARCH STREQUAL "pc98")
+    add_cd_file(TARGET vgapnp DESTINATION reactos/system32/drivers FOR all)
+    add_registry_inf(vbemp_reg.inf)
+endif()
index b0e304b..b278c71 100644 (file)
@@ -15,8 +15,4 @@ target_link_libraries(vga libcntpr)
 set_module_type(vga kernelmodedriver)
 add_importlibs(vga videoprt)
 add_pch(vga vga.h SOURCE)
-
-# pc98vid takes place of vga.sys on PC-98 platform
-if(NOT SARCH STREQUAL "pc98")
-    add_cd_file(TARGET vga DESTINATION reactos/system32/drivers FOR all)
-endif()
+add_cd_file(TARGET vga DESTINATION reactos/system32/drivers FOR all)