KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
rumble.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <kos/init.h>
#include <dc/maple.h>
#include <dc/maple/controller.h>
#include <dc/maple/purupuru.h>
#include <plx/font.h>

Functions

 KOS_INIT_FLAGS (INIT_DEFAULT)
 
void print_rumble_fields (purupuru_effect_t fields)
 
void wait_for_dev_attach (maple_device_t **dev_ptr, unsigned int func)
 
static void word2hexbytes (uint32_t word, uint8_t *bytes)
 
int main (int argc, char *argv[])
 

Variables

plx_fcxt_t * cxt
 
static const purupuru_effect_t rumble_stop = {.motor = 1}
 
static size_t catalog_index = 0
 
static const baked_pattern_t catalog []
 

Function Documentation

◆ KOS_INIT_FLAGS()

KOS_INIT_FLAGS ( INIT_DEFAULT )

◆ main()

◆ print_rumble_fields()

◆ wait_for_dev_attach()

◆ word2hexbytes()

static void word2hexbytes ( uint32_t word,
uint8_t * bytes )
inlinestatic

Referenced by main().

Variable Documentation

◆ catalog

const baked_pattern_t catalog[]
static
Initial value:
= {
{.effect = {.cont = false, .motor = 1, .fpow = 7, .freq = 26, .inc = 1}, .description = "Basic Thud (simple .5s jolt)"},
{.effect = {.cont = true, .motor = 1, .fpow = 1, .freq = 7, .inc = 49}, .description = "Car Idle (69 Mustang)"},
{.effect = {.cont = false, .motor = 1, .fpow = 7, .conv = true, .freq = 21, .inc = 38}, .description = "Car Idle (VW beetle)"},
{.effect = {.cont = false, .motor = 1, .fpow = 7, .conv = true, .freq = 57, .inc = 51}, .description = "Eathquake (Vibrate, and fade out)"},
{.effect = {.cont = true, .motor = 1, .fpow = 1, .freq = 40, .inc = 5}, .description = "Helicopter"},
{.effect = {.cont = false, .motor = 1, .fpow = 2, .freq = 7, .inc = 0}, .description = "Ship's Thrust (as in AAC)"},
}

Referenced by main().

◆ catalog_index

size_t catalog_index = 0
static

Referenced by main().

◆ cxt

plx_fcxt_t* cxt

Referenced by main(), and wait_for_dev_attach().

◆ rumble_stop

const purupuru_effect_t rumble_stop = {.motor = 1}
static

Referenced by main().