Rumble

Technical overview. Some Game Boy Color cartridges, such as the MBC5 rumble cartridge, contain a motor controlled by the cartridge hardware. The game switches that hardware state as part of its normal cartridge accesses.

Using the API. The Rumble object reports whether the current cartridge supports rumble and whether the game currently requests vibration. Read supported and enabled during the emulation loop and forward the state to the application or controller that provides physical feedback.

Rumble Pack API for accessing rumble state of games like Pokémon Pinball.

The rumble pack was an accessory for Game Boy Color that provided vibration feedback. It was controlled through MBC5 cartridge to the rumble motor.

class pyboy.api.rumble.Rumble(mb)[source]

Bases: object

Provides access to the current rumble pack state.

For frame-by-frame access, read the state properties each frame during the emulation loop and store the data as needed.

Example:

>>> rumble_history = []
>>> for _ in range(10):
...     pyboy.tick()
...     rumble_history.append(pyboy.rumble.enabled)
True...
property enabled

Current rumble state.

Returns:

bool

Return type:

True if the rumble motor should be vibrating, False otherwise.

property supported

Whether the current cartridge supports rumble functionality.

Returns:

bool

Return type:

True if the cartridge supports rumble, False otherwise.