mii_emu/src/mii_analog.h
Michel Pollet d53b0bceff Added joystick support
It is limited for now, hard coded to mine. Still need some sort of way
to specify which button to map to the emulated joytick. Same with the
axis, currently default to 0,1

Signed-off-by: Michel Pollet <buserror@gmail.com>
2023-10-28 16:59:08 +01:00

34 lines
464 B
C

/*
* mii_analog.h
*
* Copyright (C) 2023 Michel Pollet <buserror@gmail.com>
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include "mii_types.h"
typedef struct mii_analog_t {
struct {
uint8_t value;
mii_cycles_t decay;
} v[4];
} mii_analog_t;
struct mii_t;
void
mii_analog_init(
struct mii_t *mii,
mii_analog_t * analog );
void
mii_analog_access(
mii_t *mii,
mii_analog_t * analog,
uint16_t addr,
uint8_t * byte,
bool write);