comparison io.h @ 2027:0f54a898db03

Implement Heartbeat Personal Trainer peripheral and add ROM DB entry for Outback Joey
author Michael Pavone <pavone@retrodev.com>
date Mon, 15 Feb 2021 11:24:06 -0800
parents e7a516f08cec
children 93918a6a8ab7
comparison
equal deleted inserted replaced
2026:aa338eb0eded 2027:0f54a898db03
23 IO_SEGA_MULTI, 23 IO_SEGA_MULTI,
24 IO_EA_MULTI_A, 24 IO_EA_MULTI_A,
25 IO_EA_MULTI_B, 25 IO_EA_MULTI_B,
26 IO_SEGA_PARALLEL, 26 IO_SEGA_PARALLEL,
27 IO_GENERIC, 27 IO_GENERIC,
28 IO_GENERIC_SERIAL 28 IO_GENERIC_SERIAL,
29 IO_HEARTBEAT_TRAINER
29 }; 30 };
30 31
31 typedef struct { 32 typedef struct {
32 union { 33 union {
33 struct { 34 struct {
56 uint8_t write_pos; 57 uint8_t write_pos;
57 uint8_t tr_counter; 58 uint8_t tr_counter;
58 uint8_t mode; 59 uint8_t mode;
59 uint8_t cmd; 60 uint8_t cmd;
60 } keyboard; 61 } keyboard;
62 struct {
63 uint8_t *nv_memory;
64 uint8_t *cur_buffer;
65 uint64_t rtc_base_timestamp;
66 uint8_t rtc_base[5];
67 uint8_t bpm;
68 uint8_t cadence;
69 uint8_t buttons;
70 uint8_t nv_page_size;
71 uint8_t nv_pages;
72 uint8_t param;
73 uint8_t state;
74 uint8_t status;
75 uint8_t device_num;
76 uint8_t cmd;
77 uint8_t remaining_bytes;
78 } heartbeat_trainer;
61 } device; 79 } device;
62 uint8_t output; 80 uint8_t output;
63 uint8_t control; 81 uint8_t control;
64 uint8_t input[3]; 82 uint8_t input[3];
65 uint32_t slow_rise_start[8]; 83 uint32_t slow_rise_start[8];