com.monkeycoder.monkeynes.hardware
Interface NesController

All Known Implementing Classes:
NesJoypad

public interface NesController

The interface all controller types must implement to be compatible with MonkeyNES.

Originally part of the MonkeyNES project.

Author:
David Stephens

Field Summary
static int TYPE_JOYPAD
           
static int TYPE_NONE
           
 
Method Summary
 void clearStrobe()
          Clears the strobe on this controller.
 int getNextButtonValue()
          Gets the value of the next button.
 int getType()
          Returns the type of this controller.
 String getTypeName()
          Returns the name of this type of controller.
 void resetStrobe()
          Resets the strobe on this controller.
 void setButtonValue(int inButton, int inValue)
          Sets the value of a specific button.
 

Field Detail

TYPE_NONE

public static final int TYPE_NONE
See Also:
Constant Field Values

TYPE_JOYPAD

public static final int TYPE_JOYPAD
See Also:
Constant Field Values
Method Detail

getType

public int getType()
Returns the type of this controller.

Returns:
The type number of this controller.

getTypeName

public String getTypeName()
Returns the name of this type of controller.

Returns:
The name of this type of controller.

setButtonValue

public void setButtonValue(int inButton,
                           int inValue)
Sets the value of a specific button.

Parameters:
inButton - The button whose value is being set.
inValue - The value being set.

resetStrobe

public void resetStrobe()
Resets the strobe on this controller.


clearStrobe

public void clearStrobe()
Clears the strobe on this controller.


getNextButtonValue

public int getNextButtonValue()
Gets the value of the next button.

Returns:
The value of the next button.