SDK Documentation
Confidential & Proprietary
to VM Labs Inc.

Copyright © 1997-2001
VM Labs, Inc.
All Rights Reserved

 

February 23, 2001


Controllers


Controller Jumper Settings

The latest revisions of the NUON BIOS only include support for production NUON game controllers.  The older prototype controllers are no longer supported.  If you do not have any production controllers, please contact your developer account executive.

If you originally used one of the prototype game controllers that required a black interface box between the controller and the NUON development system, then it may be necessary for you to change some jumper settings before you will be able to use a production NUON game controller.

There are three jumpers which require changes.  The picture below shows where to find them.

U26 is a 3-pin header located near the backplane in between the first and second expansion slots.  You need to change this jumper to pins 1 and 2, which are the pins farthest away from the backplane.

J21 and JP23 are both two pins, and there may be no jumper present in the first place.  You need to add a jumper to both positions.

Assuming that everything else about your system is configured properly, then these three jumpers should be all you need to change.  After the change, your system should work properly with production controllers.  It should also still with the older prototype controller, provided that you are using a BIOS version that supports it.  However, it will only work with one or the other at any given time.  Don't connect both types of controller at the same time.

In some systems, if OTHER jumpers have been changed (on purpose or otherwise) then it's possible that additional changes may be required.  If you experience problems, please contact developer support.

 


Determining Controller Properties

It is very, very important that your application examine the properties field of the controller data structure to determine which attributes are available on the current game controller.

Furthermore, it is very important that your application is not hardwired to work with a single combination of controller attributes.  For example, your application generally needs to know how to work with either the D-PAD or the analog stick.  Some controllers will have both, but some controllers, including the pack-in controller that comes with a DVD player, may only have one device or the other.  If your game only works with a D-PAD, then users who have a controller without a D-PAD will be left out, and vice-versa.

In particular, make sure that you:

It's perfectly OK to require that a controller have certain attributes in order to be used with your application.  If your application really wants a gamepad and the user plugs in a mouse, then feel free to throw up a screen that politely explains that the user must use a different controller.

On the other hand, it's a good idea in most cases to make sure that your game can be played with either the D-PAD or an analog joystick.

The most common controller configurations will probably be:


Controller Ports & Controller Data

The BIOS maintains an array of 9 ControllerData elements.  This array is accessible through the global BIOS variable _Controller, which is a pointer to the array of ControllerData structures.

The ControllerData structure is defined in the JOYSTICK.H file.  If you have older source code that needs updating, please note that the structure definition has changed recently to provide more descriptive names for controller data fields.

_Controller[0] refers to data received from the DVD player's infrared remote control.

_Controller[1] refers to the data obtained from the first plug-in controller on the 1st front panel port, or the first slot of a 4-port adapter connected to that port.

_Controller[5] refers to the first controller on the 2nd front panel port, or the first port of a 4-port adapter connected to that port.

Slots 2-4 refer to the remainder of the slots on a 4-port adapter connected to the 1st front panel port.

Slots 6-8 refer to the remainder of the slots on a 4-port adapter connected to the 1st front panel port.

Please see the JOYSTICK.H file and BIOS documentation for detailed information on controller usage.

Also, please take a look at the included sample programs which use the joystick.


Infrared Remote Control

Every effort is being made to ensure that a NUON DVD player's infrared remote control (IRR) is useable as a game controller to some degree.  However, there are unavoidable differences which must be carefully considered.  Please be aware of the following issues:

For games where reaction time is not the biggest factor in game play, it should always be possible to play the game with an IRR.  Every effort should be made to ensure this is the case.  However, for games where the controller gets more of a workout, it's recognized that an IRR may not be practical.  


Replacing The GetJoyData() Macro

If you're using an older SDK which used the GetJoyData() macro, you'll have to change your joystick handling code to use the new ControllerData structure defined in JOYSTICK.H.

Generally, "GetJoyData()" can be replaced with "_Controller[1].buttons", but this only returns button data.

In some cases with older code, you may need to use "_Controller[1].buttons ^ 0xffff" to get the desired results.

To get the analog joystick data it is necessary to use "_Controller[1].d1.xAxis" and "_Controller[1].d2.yAxis".


_Controller = _ControllerData

Some versions of the SDK required that your program manually initialize the controller routine.  

ControllerData *_Controller;

_Controller= _ControllerInitialize();

This initialization is now done automatically for C/C++ programs using the standard startup code.