| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Release id #93255 : KickVice
Useful tool that I've been using for a long time now.
However, ran into a problem now where I want to switch to using x64sc.exe for extra accurate emulation, however KickVice only looks for the x64.exe process, resulting in that once I associate .prg with x64sc.exe, Kickvice will spawn a new instance of the emulator for every start.
Maybe x64sc-support could be added as an option? |
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11357 |
just use the remote monitor feature of VICE |
| |
Skate
Registered: Jul 2003 Posts: 494 |
wouldn't renaming x64sc.exe -> x64.exe work? yeah, it's not the cleanest solution but still... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11357 |
you should probably do that in any case :=) |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Skate: Doh! That is a solution so easy that it did not occur to me at all. Thanks! :) |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Well, turns out it wasn't that easy after all. Kickvice seems to find the running instance using some method that doesn't involve the name of the .exe file, because the rename trick didn't work. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
Hmm, maybe he used the full process name / class name or something similar. I just checked my codes to see how i had sent keyboard messages to Vice and found this code below (this function was part of "Kinternational Karate" which you can find at Pouet). It works both with x64.exe and x64sc.exe. Pantaloon might use a similar way if he decides to update KickVice.
private: void SendKeyToVice(BYTE vk, bool extendedKey) {
// find window with "VICE" class name
// and get its window handle
HWND hwnd = FindWindow(L"VICE", nullptr);
if(hwnd != nullptr) { // if any window returned
// set focus to VICE window
SetForegroundWindow(hwnd);
// send key down event for the key
keybd_event(vk,
MapVirtualKey(vk, MAPVK_VK_TO_VSC),
(extendedKey ? KEYEVENTF_EXTENDEDKEY : 0),
0);
// wait for a while
Sleep(keyPressDuration);
// send key up event for the key
keybd_event(vk,
MapVirtualKey(vk, MAPVK_VK_TO_VSC),
(extendedKey ? KEYEVENTF_EXTENDEDKEY : 0) | KEYEVENTF_KEYUP,
0);
}
}
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11357 |
*makes note to randomly change the window name at each startup* |
| |
Skate
Registered: Jul 2003 Posts: 494 |
HWND hwnd = FindWindow(generateRandomString(), nullptr);
Solved. You can't imagine how lucky i am. :D |
| |
chatGPZ
Registered: Dec 2001 Posts: 11357 |
=D |