A setup guide for adding HOTAS controllers to the PCem emulator.
In this guide I'll be showing how a joystick, throttle and rudders pedals were setup for use within PCem and how they were added to Windows 98 running on the emulated machine.
PCem setup
This guide assumes the latest version of PCem is being used, at time of writing this is v17. If you're completely new to setting up PCem or need a refresher, I highly recommend the excellent YouTube tutorial video by PhilsComputerLab, PCem Windows 98 Setup.
Preparation
Assuming you have an emulated machine in PCem running a clean install of Windows 98 then before we begin, you may wish to take a copy of your PCem setup. If anything goes badly wrong you'll have your original setup intact.
I'd suggest taking a new copy of your virtual hard disk (.vhd) image. Then using PCem to take a new copy of the emulated machine. Then you just need to configure your new machine copy to use the new hard disk image copy.
Retro sims
The retro sims we want to play in PCem usually used a maximum of 4 axes (or the 4 most important axes were):
Joystick x-axis
Joystick y-axis
Throttle axis (or z-axis)
Rudder axis (normally an x-rotation axis)
The important part is getting the axes configured in PCem. The buttons assignments aren't as important as we can use profiling software to assign key-presses to controller buttons later.
PCem controller support
PCem supports a number of different controller configurations. The one we'll want to use is a 2 button 2 axis joystick. PCem allows us to configure 2 of these joystick devices and that will give us the 4 axes that we need.
Devices
In this example I'll be using 3 different physical devices, a TM Warthog joystick, a TM Warthog throttle and TFRP rudder pedals. So I'll be configuring 4 axes across 3 different devices.
Creating a virtual controller
If you're not clear on the difference between physical and virtual HOTAS controllers have a look at my earlier guide, Controllers and retro sims part 2: Virtual controllers.
There are 4 axes spread across 3 physical devices but PCem only supports 2 devices so we need to combine those 3 devices to create a single virtual device.
As all my devices come from the same vendor, Thrustmaster, I can use the their TARGET profiling software to create a virtual controller profile. If your controllers are from the same vendor, you can use their profiling software to achieve the same result, e.g. Logitech/Saitek SST Profile Editor. If you have devices from different vendors, then JoyStick Gremlin offers the same facility in a vendor independent way.
In this TARGET screenshot you can see my 3 physical devices and the 4 axes which will form the virtual controller profile. This is my default TARGET profile for flight sims running under PCem. Once configured you'll need to start the profile to create the virtual controller before continuing to the next step.
Adding controllers to PCem
Start the PCem app, select your emulated machine and click the configure button to bring up the config window, click on the joystick button to set joystick options.
You want to set 'Joystick' to Standard 2-button joystick(s) which should make the 'Joystick 1...' and 'Joystick 2...' buttons active.
Click the 'Joystick 1..' button to open the dialog, set the 'Device' to your virtual device (it should be fairly obvious) and set the axes/buttons as shown and click ok. In my case the virtual device was 'Thrustmaster Virtual Game Controller (root)'.
Click the 'Joystick 2..' button to open the dialog, set the 'Device' to your virtual device (again, it should be fairly obvious). Set Axis 0: to 'Axis 2' in the dropdown menu and Axis 1: to 'Axis 3' in the dropdown menu. Buttons should set as shown in the screenshot.
As you can see in the screenshot, I've swapped Axis 2 and 3. In the next step we'll be adding and testing a Windows 98 controller and it's quite common for the 3rd and 4th axis of this controller (throttle & rudder) to require swapping. This was the case in this example and I had to swap the axes of the 2nd Joystick (3rd and 4th axes). Hope that's not too confusing!
So too recap:
Joystick x-axis -> Virtual Controller Axis 0 -> PCem Joystick 1 Axis 0
Joystick y-axis  -> Virtual Controller Axis 1 -> PCem Joystick 1 Axis 1
Throttle axis ->Â Virtual Controller Axis 2 -> Â PCem Joystick 2 Axis 0
Rudder axis ->Â Virtual Controller Axis 3 -> PCem Joystick 2 Axis 1
And if you need to swap the 3rd & 4th axes:
Joystick x-axis -> Virtual Controller Axis 0 -> PCem Joystick 1 Axis 0
Joystick y-axis  -> Virtual Controller Axis 1 -> PCem Joystick 1 Axis 1
Throttle axis ->Â Virtual Controller Axis 3 -> Â PCem Joystick 2 Axis 0
Rudder axis ->Â Virtual Controller Axis 2 -> PCem Joystick 2 Axis 1
Adding a controller to Windows 98
Now it's time to fire up the emulated machine in PCem. Once it's started go to the Control Panel and open Game Controllers. In the Game Controllers window nothing will be listed, so click 'Add'.
In the Add Game Controller Window click 'Custom...'
In the Custom Game Controller window, make sure Special Characteristics is set to 'Is a Joystick', Axes is 4 and Buttons is 4. Leave the Has a point-of-view control unchecked, give it a name and click OK until you return to the Game Controllers window. You should now see your new custom controller.
Open the controller and you should see the test window. The joystick axes should work as should the throttle and rudder axes. It should also become apparent if you need to swap the 3rd and 4th axes. All that remains is to calibrate your controller in Windows 98 and you're good to go!
So to recap again, we've assigned:
Joystick x-axis -> Virtual Controller Axis 0 -> PCem Joystick 1 Axis 0 -> Windows controller axis 0
Joystick y-axis  -> Virtual Controller Axis 1 -> PCem Joystick 1 Axis 1 -> Windows controller axis 1
Throttle axis ->Â Virtual Controller Axis 2 -> Â PCem Joystick 2 Axis 0 -> Windows controller axis 3
Rudder axis ->Â Virtual Controller Axis 3 -> PCem Joystick 2 Axis 1 -> Windows controller axis 4
Issues
Once you stop your virtual profile, PCem will lose the joystick config. So the next time you run your sim you'll have to reconfigure the 2 joystick devices, fortunately PCem seems to remember the axes/button assignments so you'll just have to specify the virtual controller in the Device setting again. No need to re-configure anything in Windows, the custom controller will still be there.
Game specific virtual controller profiles
Now you have the axes working, you can take a copy of the default PCem virtual controller profile to create a game specific one and start to assign game keys to controller buttons!
Finally
This is a quick YouTube video of the NovaLogic sim F-22 Raptor being played through PCem using the joystick, throttle and rudder pedals discussed.
Comments