Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Harvey ! (Registered 2024-11-25) You are not logged in - nap
CSDb User Forums


Forums > CSDb Entries > Release id #93255 : KickVice
2016-06-25 22:27
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?
2016-06-25 22:36
chatGPZ

Registered: Dec 2001
Posts: 11357
just use the remote monitor feature of VICE
2016-06-26 03:40
Skate

Registered: Jul 2003
Posts: 494
wouldn't renaming x64sc.exe -> x64.exe work? yeah, it's not the cleanest solution but still...
2016-06-26 17:50
chatGPZ

Registered: Dec 2001
Posts: 11357
you should probably do that in any case :=)
2016-06-27 18:38
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! :)
2016-06-28 22:44
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.
2016-06-29 02:07
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);
		}
	}
2016-06-29 02:47
chatGPZ

Registered: Dec 2001
Posts: 11357
*makes note to randomly change the window name at each startup*
2016-06-29 03:10
Skate

Registered: Jul 2003
Posts: 494
HWND hwnd = FindWindow(generateRandomString(), nullptr);


Solved. You can't imagine how lucky i am. :D
2016-06-29 16:31
chatGPZ

Registered: Dec 2001
Posts: 11357
=D
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fresh
Yogibear/Protovision
CA$H/TRiAD
Brataccas/HF
sebalozlepsi
GuyGavin/HF
Guests online: 116
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Comaland 100%  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.047 sec.