Arduino library for communicating with Nintendo extension controllers
ExtensionPort
now includes a linked list for all associated controller instances. Users no longer have to write their own connect()
function when using multiple controller types within the same program (see the MultipleTypes example) (#71)getExpectedType()
, which returns the controller type expected by the classExtensionData
is no longer in the global namespace, having been supplanted by ExtensionPort
since 0.7.1_Shared
classes now use the Base
suffix, as they lack the 'shared' properties assembled elsewhereprintDebug
buffers can fit worst-case scenario integers without overflowing (previously caused warnings with SAMD core) (#70)ExtensionPort
and uDrawTablet
keyword highlightingClassicController
class should now work out of the box with most third party Classic Controller variations without any extra user configuration.readRegister
I²C functionClassicController
will now always attempt to initialize in "high resolution" mode.ClassicController
data mode are now verified by reading the updated control data.controllerTypeMatches()
function to check if the connected controller matches the controller class.connect()
no longer performs a control data update. Call update()
before attempting to read controller data.reconnect()
function has been deprecated and removed. Use connect()
instead.isThirdParty
and fixThirdParty
functions for the NES Mini controller have been removed. The NESMiniController
class now supports these mappings automatically as part of the Classic Controller's "high resolution" mode.ExtensionPort
must now call a virtual specificInit()
to finish initialization for certain controllers (Drawsome Tablet, NES Mini, SNES Mini). See the MultipleTypes example for reference.CtrlIndex
has been refactored as IndexMap
for better conformity to the other mapping typenames.ExtensionController
class. These are available as both static and protected member functions, allowing derived controller types to write and read arbitrary data from the controller.specificInit()
function. This is called at the end of a successful connect()
.identifyController()
function has been refactored as decodeIdentity()
to avoid confusion with the class-scoped identifyController()
function.buttonL
/ buttonR
) have been fixed.Big thanks to @nullstalgia for adding support for the drawing tablets, and for introducing me to the "high resolution" mode for the Classic Controller.
User-Facing Changes:
crossfadeSlider()
function now reports an unsigned value (0-15) instead of a signed value (-8-7) to be more consistent with other control functions in the library.This release will break any sketches that use the DJ turntable controller with the crossfadeSlider()
function.
User-Facing Changes:
isKnockoff()
is now isThirdParty()
fixKnockoffData()
is now fixThirdPartyData()
fixThirdPartyData()
can now be forcibly overridden by passing true
as an argument. This will corrupt data for other controllers, so use with caution.getRequestSize()
functionThis release will break any sketches using the NES "knockoff" check and repair functions. You must update those lines to use the new function names in order to fix the errors.
Bugfixes:
Existing code that uses the public I²C reference stored in the class will need to be refactored to include parentheses.
User-Facing Changes:
ExtensionController
has been renamed to ExtensionPort
. If you're using a generic object or multiple controller types in a shared data configuration you will need to rename them.ExtensionPort
has been renamed back to ExtensionController
(pre-0.7.0) and is accessible outside of the namespace for building type-agnostic classes for extension controllers.This will break compatibility with existing programs if you're referencing either of these two classes.
I have reworked the library back-end so that controller classes inherit directly from the communication class using an external (shared) data struct. This should make understanding the library's structure easier, and avoids some of the weird relationships that grew out of the multiple inheritance model.
User-Facing Changes:
connect
, update
, etc.) are now available on shared controller instances!setRequestSize
function when the types change!Data
type definition has been refactored as Shared
. Any sketches built using multiple controller support a la ControllerName::Data
will have to be refactored. See the MultipleTypes
example.ClassicController
class for any project that uses both Mini controllers (NES / SNES) and Classic Controllers.ClassicController
class. You must call fixKnockoffData
after each successful update to make the controllers work properly, in addition to the request size increase. See the NES controller examples.Backend:
ExtensionController
into ExtensionPort
(comms) and ExtensionData
(shared comms data).ExtensionPort
and ExtensionData
.using
statements instead of typedef
.setControlData
function for modifying received register data (e.g. for NES knockoff support).Adds support for 3rd party NES Mini controllers.
Bugfixes: