Is there any way to force MM7 with grayface's to not use the integrated intel card?

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
Dziurkacz
Leprechaun
Leprechaun
Posts: 3
Joined: 29 Jun 2019

Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby Dziurkacz » Jun 29 2019, 12:27

Hi Heroes!

I have a gaming laptop. It has 2 graphics cards: one integrated, the other a high-performance. How do I tell MM7 (grayface installed) to use the high-performance card? There is no option to choose it in mm7 setup, and selecting it in nVidia control panel doesn't help - my laptop works very loud when running the game in hardware 3d.

Image
Last edited by Dziurkacz on Jun 29 2019, 12:27, edited 1 time in total.


Dziurkacz
Leprechaun
Leprechaun
Posts: 3
Joined: 29 Jun 2019

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby Dziurkacz » Jun 29 2019, 14:38

It did not, but I did not know about this either, so thanks for that :)

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Jul 2 2019, 13:31

Did you try compatibility options?
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Dziurkacz
Leprechaun
Leprechaun
Posts: 3
Joined: 29 Jun 2019

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby Dziurkacz » Jul 2 2019, 18:58

Yes, all up to Windows 7.

NickMJ
Leprechaun
Leprechaun
Posts: 1
Joined: 26 Nov 2021

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby NickMJ » Dec 9 2021, 13:51

I have exactly the same issue. Did anyone manage to fix it?

User avatar
Pol
Admin
Admin
Posts: 9806
Joined: 29 Nov 2005
Location: IN SOMNIS VERITAS
Contact:

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby Pol » Dec 10 2021, 9:02

Some notebooks can switch graphic cards right in bios. If you have nVidia you can use Optimus Manager. There's help from Asus. Which mentions also AMD.

The point is hidden, in GPU power manager. Where Intel should be still the most savvy. The same can be configured in Windows, at least in theory. (You need to see two GPU here.)

Otherwise this is not handled very by Windows neither I'm aware of any other GPU application. Where it's necessary, it's usually handled by app itself. These are Pro Apps though.
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 12 2021, 10:12

Although you can force a program to use a specified GPU in the "Graphics settings" in Windows, for which you can read the tutorial in the articles Anubis and Pol mentioned: https://pureinfotech.com/set-gpu-app-windows-10/ https://mashtips.com/windows-11-default-gpu-for-apps/

You can't force mm8.exe to use your dedicated GPU if your computer has dual GPU. You can only select the integreted GPU in MM8Setup.Exe.

You can select the "High Performance" (dedicated GPU) option for mm8.exe and MM8Setup.Exe in the "Graphics settings", but mm8.exe will not use your dedicated GPU but the integreted one that is selected in MM8Setup.Exe. I can confirm this with Nvidia Optimus State Viewer, a tool to see if your dedicated GPU is being used. "Graphics settings" can force chrome.exe and other programs to use the dedicated GPU, but not mm8.exe.

I wonder if this problem occurs in all dual-GPU PCs, or just some of them.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 12 2021, 12:07

I don't know if it could work after user find the item in Registry and change the value. mm8setup.exe has no option to switch to dedicated GPU, but sometimes a hidden option in GUI is still settable in Registry and can be effective.

By the way it occurs to me that for ArcoMage HD, users including GrayFace who found it slow could force browser to use dedicated GPU if possible. Chrome uses integrated GPU if it is not forced. [Tutorial / solutions] What to do if the game is slow? In fact Anyone could force browser to use the dedicated GPU if it's generally slow browsing web pages.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 13 2021, 13:09

tomchen1989 wrote: Dec 12 2021, 12:07 I don't know if it could work after user find the item in Registry and change the value. mm8setup.exe has no option to switch to dedicated GPU, but sometimes a hidden option in GUI is still settable in Registry and can be effective.
It's "D3D Device" in [HKEY_LOCAL_MACHINE\SOFTWARE\New World Computing\Might and Magic VII\1.0] or [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\New World Computing\Might and Magic VII\1.0]. Setting it to 1 might help.
tomchen1989 wrote: Dec 12 2021, 12:07 By the way it occurs to me that for ArcoMage HD, users including GrayFace who found it slow could force browser to use dedicated GPU if possible. Chrome uses integrated GPU if it is not forced. [Tutorial / solutions] What to do if the game is slow? In fact Anyone could force browser to use the dedicated GPU if it's generally slow browsing web pages.
No, it's the animations settings in CSS that are the problem. Plus all the delays, e.g. after AI gets the card, before making the move. It was very slow when I reported it, now it's much better, but still slower than in game and that doesn't feel right.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 14 2021, 21:24

Set that to 0/1/2 in Registry and it's still not working.

---

I expect dedicated GPU can boost CSS anim performance, although it's not guaranteed. With Nvidia Optimus State Viewer I can see dedicated GPU switches on and off during the game, but it's not sure if chrome uses GPU for CSS anim or for other processes.

I'll add a "Reduce effect" option

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 15 2021, 8:24

tomchen1989 wrote: Dec 14 2021, 21:24 Set that to 0/1/2 in Registry and it's still not working.
Did setting it to 2 cause a crash?
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 15 2021, 9:59

GrayFace wrote: Dec 15 2021, 8:24 Did setting it to 2 cause a crash?
Yeah it got a buffer error before the 3DO video, resulting exit of the program

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 15 2021, 20:22

I think I'll make a test version for you to run to see what's the problem.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 15 2021, 23:34

Okay, first install MMExtension and set it "D3D Device" to 1 in the registry for MM8 (HKEY_LOCAL_MACHINE\SOFTWARE\New World Computing\Might and Magic Day of the Destroyer\1.0).
Then save this script as Scripts\General\test.lua:

Code: Select all

mem.nop(0x49AFCD)
mem.nop(0x49DCCE)
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 16 2021, 9:36

I did that and it showed:

Scripts/Core/RSMem.lua:2032: attempt to perform arithmetic on local 'n' (a nil value)

stack traceback:
Scripts/Core/RSMem.lua:2032: in function 'nop'
C:\game\mmmerge-2021-07-05_zh_CN\Scripts\General\test.lua:1: in function 'dofile'
Scripts\Core\main.lua:501: in function 'dofile'
Scripts\Core\main.lua:521: in main chunk

arguments of 'nop':
p = 4829133
n = nil

local variables of 'nop':
(*temporary) = 4829133
(*temporary) = "mem.nop(0x49AFCD) mem.nop(0x49DCCE)"
(*temporary) = (function: 0x03bd5840)
(*temporary) = nil
(*temporary) = nil
(*temporary) = "mem.nop(0x49AFCD) mem.nop(0x49DCCE)"
(*temporary) = "attempt to perform arithmetic on local 'n' (a nil value)"

upvalues of 'nop':
IgnoreCount = 1
u1 = (table: 0x03c6a630)
Last edited by tomchen1989 on Dec 16 2021, 12:53, edited 1 time in total.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 16 2021, 16:06

Yes, I wrote Pol when I encountered it. He has fixed it in chSilver and will fix it in other styles.

I forgot old MMExt doesn't auto-calculate size. Here you go:
mem.nop(0x49AFCD, 2)
mem.nop(0x49DCCE, 2)
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 16 2021, 18:05

OK I did what you said. The game still doesn't use my NVIDIA GPU according to Nvidia Optimus State Viewer. And the NVIDIA GPU still doesn't show up in MM8Setup.Exe.

My integrated intel card seems good enough to render the game without slowing it down, so the fact I'm unable to use NVIDIA GPU does not bother me. I don't know if it's bad on OP or other users' computers. OP said "my laptop works very loud when running the game in hardware 3d", but perhaps it'll be louder if OP switches to dedicated GPU? If the game is not slow with integrated card, it's just the laptop is "loud", then I think it's not a big problem.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1633
Joined: 29 Nov 2005

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby GrayFace » Dec 18 2021, 8:03

Here's a new one:

Code: Select all

mem.nop(0x49AFCD, 2)
mem.nop(0x49DCCE, 2)

local devRec

mem.autohook(0x49ABDC, function(d)
	local guid, pDesc, pName, dev, devHEL, rec = d:getparams(0, 6)
	print('(Enum)DEVICE:', mem.string(pName))
	print('Description:', mem.string(pDesc))
	print('Flags:', mem.i4[dev + 4])
	print('pDDrawGUID:', mem.u4[mem.u4[rec + 4] + 32])
	local p = mem.u4[rec]
	if devRec and p ~= devRec then
		print'changed devRec!'
	end
	devRec = p
end)

function ListDevices()
	for i = 0, 3 do
		local p = devRec + i*0x28
		local on = mem.i4[p] ~= 0
		if on then
			print('(List)DEVICE', i)
			print('Name:', mem.string(mem.i4[p + 4]))
			print('Description:', mem.string(mem.i4[p + 8]))
			print('pDDrawGUID:', mem.i4[p + 0x20])
		else
			print('(List)No device:', i)
		end
	end
end
After running the game press Ctrl+F1, write ListDevices() there and press Ctrl+Enter.
Then post (or send me) contents of MMExtensionLog.txt
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
tomchen1989
Pixie
Pixie
Posts: 136
Joined: 21 Jun 2008
Location: Europe / China

Re: Is there any way to force MM7 with grayface's to not use the integrated intel card?

Unread postby tomchen1989 » Dec 18 2021, 10:57

Code: Select all

Loading user settings from MMMergeSettings.lua
Cannot load user settings: MMMergeSettings.lua: No such file or directory
Can't remove MMMergeLog.2.txt: No such file or directory
Can't rename MMMergeLog.1.txt: No such file or directory
Can't rename MMMergeLog.txt: No such file or directory
(Enum)DEVICE:	RGB Emulation
Description:	Microsoft Direct3D RGB Software Emulation
Flags:	0
pDDrawGUID:	0
(Enum)DEVICE:	Direct3D HAL
Description:	Microsoft Direct3D Hardware acceleration through Direct3D HAL
Flags:	483
pDDrawGUID:	0
(List)DEVICE	0
Name:	Direct3D HAL
Description:	Microsoft Direct3D Hardware acceleration through Direct3D HAL
pDDrawGUID:	0
(List)No device:	1
(List)DEVICE	2
Name:	RGB Emulation
Description:	Microsoft Direct3D RGB Software Emulation
pDDrawGUID:	0
(List)No device:	3


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 13 guests