KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Controller Mapping

JVS to Dreamcast controller translation More...

Typedefs

typedef void(* mie_cont_map_fn_t) (const mie_jvs_inputs_t *jvs, cont_state_t *cont)
 JVS inputs to Dreamcast controller mapper.
 

Functions

void mie_set_cont_map (mie_cont_map_fn_t fn)
 Install a custom JVS-to-controller mapper.
 

Detailed Description

JVS to Dreamcast controller translation

During polling the driver fills mie_state_t::cont from native JVS inputs using the active mapper. Pass NULL to mie_set_cont_map() to restore the built-in default layout below.

Default JVS to cont_state_t mapping:

The default mapper skips wheel and pedals when wheel and accel raw values differ by no more than 0x500.

Typedef Documentation

◆ mie_cont_map_fn_t

typedef void(* mie_cont_map_fn_t) (const mie_jvs_inputs_t *jvs, cont_state_t *cont)

JVS inputs to Dreamcast controller mapper.

Installed with mie_set_cont_map(). Receives decoded native JVS state and fills a cont_state_t compatible structure for use with the standard controller API.

Parameters
jvsDecoded JVS input state.
contController state to fill.
See also
mie_set_cont_map

Function Documentation

◆ mie_set_cont_map()

void mie_set_cont_map ( mie_cont_map_fn_t fn)

Install a custom JVS-to-controller mapper.

Replaces the built-in default mapping applied during polling. Pass NULL to restore the default mapper documented in Controller Mapping.

Parameters
fnMapper function, or NULL for the built-in default.
See also
mie_cont_map_fn_t, mie_state_t