KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
vmu.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 dc/maple/vmu.h
4 Copyright (C) 2000-2002 Jordan DeLong, Megan Potter
5 Copyright (C) 2008 Donald Haase
6 Copyright (C) 2023 Andy Barajas
7 Copyright (C) 2023, 2025 Falco Girgis
8
9*/
10
11/** \file dc/maple/vmu.h
12 \brief Definitions for using the VMU device.
13 \ingroup vmu
14
15 This file provides an API around the various Maple function
16 types (LCD, MEMCARD, CLOCK) provided by the Visual Memory Unit.
17 Each API can also be used independently for devices which aren't
18 VMUs, such as using MEMCARD functionality with a standard memory
19 card that lacks a screen or buzzer.
20
21 \author Jordan DeLong
22 \author Megan Potter
23 \author Donald Haase
24 \author Falco Girgis
25*/
26
27#ifndef __DC_MAPLE_VMU_H
28#define __DC_MAPLE_VMU_H
29
30#include <sys/cdefs.h>
31__BEGIN_DECLS
32
33#include <dc/maple.h>
34#include <kos/regfield.h>
35
36#include <stdint.h>
37#include <time.h>
38
39/** \defgroup vmu Visual Memory Unit
40 \brief VMU/VMS Maple Peripheral API
41 \ingroup peripherals
42
43 The Sega Dreamcast's Visual Memory Unit (VMU)
44 is an 8-Bit gaming device which, when plugged into
45 the controller, communicates with the Dreamcast
46 as a Maple peripheral.
47
48 Visual Memory Unit
49 _________________
50 / \
51 | @ Dreamcast |
52 | ___________ |
53 | | | |
54 | | | |
55 | | | |
56 | | | |
57 Sleep | |___________| | Mode
58 ------|---------\ /--|-------
59 | |¯| * * |
60 /--|-|¯ ¯| /¯\ /¯\_|____
61 / | ¯|_|¯ \_/ \_/ | \
62 | | | | B
63 D-pad \__________|______/
64 |
65 A
66
67 As a Maple peripheral, the VMU implements the
68 following functions:
69 - <b>MEMCARD</b>: Storage device used for saving and
70 loading game files.
71 - <b>LCD</b>: Secondary LCD display on which additional
72 information may be presented to the player.
73 - <b>CLOCK</b>: A device which maintains the current date
74 and time, provides at least one buzzer for
75 playing tones, and also has buttons used
76 for input.
77
78 Each Maple function has a corresponding set of C functions
79 providing a high-level API around its functionality.
80
81*/
82/** \defgroup vmu_settings Settings
83 \brief Customizable configuration data
84 \ingroup vmu
85
86 This module provides a high-level abstraction around various
87 features and settings which can be modified on the VMU. Many
88 of these operations are provided by the Dreamcast's BIOS when
89 a VMU has been formatted.
90*/
91
92/** \brief Get the status of a VMUs extra 41 blocks
93 \ingroup vmu_settings
94
95 This function checks if the extra 41 blocks of a VMU have been
96 enabled.
97
98 \param dev The device to check the status of.
99
100 \retval 1 On success: extra blocks are enabled
101 \retval 0 On success: extra blocks are disabled
102 \retval -1 On failure
103*/
105
106/** \brief Enable the extra 41 blocks of a VMU
107 \ingroup vmu_settings
108
109 This function enables/disables the extra 41 blocks of a specific VMU.
110
111 \warning Enabling the extra blocks of a VMU may render it unusable
112 for a very few commercial games.
113
114 \param dev The device to enable/disable 41 blocks.
115 \param enable Values other than 0 enables. Equal to 0 disables.
116
117 \retval 0 On success
118 \retval -1 On failure
119*/
121
122/** \brief Enable custom color of a VMU
123 \ingroup vmu_settings
124
125 This function enables/disables the custom color of a specific VMU.
126 This color is only displayed in the Dreamcast's file manager.
127
128 \param dev The device to enable/disable custom color.
129 \param enable Values other than 0 enables. Equal to 0 disables.
130
131 \retval 0 On success
132 \retval -1 On failure
133
134 \sa vmu_set_custom_color
135*/
137
138/** \brief Set custom color of a VMU
139 \ingroup vmu_settings
140
141 This function sets the custom color of a specific VMU. This color is only
142 displayed in the Dreamcast's file manager. This function also enables the
143 use of the custom color. Otherwise it wouldn't show up.
144
145 \param dev The device to change the color of.
146 \param red The red component. 0-255
147 \param green The green component. 0-255
148 \param blue The blue component. 0-255
149 \param alpha The alpha component. 0-255; 100-255 Recommended
150
151 \retval 0 On success
152 \retval -1 On failure
153
154 \sa vmu_get_custom_color, vmu_use_custom_color
155*/
156int vmu_set_custom_color(maple_device_t *dev, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
157
158/** \brief Get custom color of a VMU
159 \ingroup vmu_settings
160
161 This function gets the custom color of a specific VMU. This color is only
162 displayed in the Dreamcast's file manager. This function also returns whether
163 the custom color is currently enabled.
164
165 \param dev The device to change the color of.
166 \param red The red component. 0-255
167 \param green The green component. 0-255
168 \param blue The blue component. 0-255
169 \param alpha The alpha component. 0-255; 100-255 Recommended
170
171 \retval 1 On success: custom color is enabled
172 \retval 0 On success: custom color is disabled
173 \retval -1 On failure
174
175 \sa vmu_set_custom_color, vmu_use_custom_color
176*/
177int vmu_get_custom_color(maple_device_t *dev, uint8_t *red, uint8_t *green, uint8_t *blue, uint8_t *alpha);
178
179/** \brief Set icon shape of a VMU
180 \ingroup vmu_settings
181
182 This function sets the icon shape of a specific VMU. The icon shape is a
183 VMU icon that is displayed on the LCD screen while navigating the Dreamcast
184 BIOS menu and is the GUI representation of the VMU in the menu's file manager.
185 The Dreamcast BIOS provides a set of 124 icons to choose from.
186
187 \note
188 When a custom file named "ICONDATA_VMS" is present on a VMU, it overrides this
189 icon by providing custom icons for both the DC BIOS menu and the VMU's LCD screen.
190
191 \param dev The device to change the icon shape of.
192 \param icon_shape One of the values found in \ref bfont_vmu_icon_t.
193
194 \retval 0 On success
195 \retval -1 On failure
196
197 \sa vmu_icons, vmu_get_icon_shape
198*/
199int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape);
200
201/** \brief Get icon shape of a VMU
202 \ingroup vmu_settings
203
204 This function gets the icon shape of a specific VMU. The icon shape is a
205 VMU icon that is displayed on the LCD screen while navigating the Dreamcast
206 BIOS menu and is the GUI representation of the VMU in the menu's file manager.
207 The Dreamcast BIOS provides a set of 124 icons to choose from.
208
209 \note
210 When a custom file named "ICONDATA_VMS" is present on a VMU, it overrides this
211 icon by providing custom icons for both the DC BIOS menu and the VMU's LCD screen.
212
213 \param dev The device to change the icon shape of.
214 \param icon_shape One of the values found in \ref bfont_vmu_icon_t.
215
216 \retval 0 On success
217 \retval -1 On failure
218
219 \sa vmu_icons, vmu_set_icon_shape
220*/
221int vmu_get_icon_shape(maple_device_t *dev, uint8_t *icon_shape);
222
223/** \defgroup maple_lcd LCD Function
224 \brief API for features of the LCD Maple Function
225 \ingroup vmu
226
227 The LCD Maple function is for exposing a secondary LCD screen
228 that gets attached to a controller, which can be used to display
229 additional game information, or information you only want visible
230 to a single player.
231*/
232
233/**
234 \brief Pixel width of a standard VMU screen
235 \ingroup maple_lcd
236*/
237#define VMU_SCREEN_WIDTH 48
238
239/**
240 \brief Pixel height of a standard VMU screen
241 \ingroup maple_lcd
242*/
243#define VMU_SCREEN_HEIGHT 32
244
245/** \brief Display a 1bpp bitmap on a VMU screen.
246 \ingroup maple_lcd
247
248 This function sends a raw bitmap to a VMU to display on its screen. This
249 bitmap is 1bpp, and is 48x32 in size.
250
251 \param dev The device to draw to.
252 \param bitmap The bitmap to show.
253
254 \retval MAPLE_EOK On success.
255 \retval MAPLE_EAGAIN If the command couldn't be sent. Try again later.
256 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
257
258 \sa vmu_draw_lcd_rotated, vmu_draw_lcd_xbm, vmu_set_icon
259*/
260int vmu_draw_lcd(maple_device_t *dev, const void *bitmap);
261
262/** \brief Display a 1bpp bitmap on a VMU screen.
263 \ingroup maple_lcd
264
265 This function sends a raw bitmap to a VMU to display on its screen. This
266 bitmap is 1bpp, and is 48x32 in size. This function is equivalent to
267 vmu_draw_lcd(), but the image is rotated 180° so that the first byte of the
268 bitmap corresponds to the top-left corner, instead of the bottom-right one.
269
270 \warning This function is optimized by an assembly routine which operates
271 on 32 bits at a time. As such, the given bitmap must be 4-byte
272 aligned.
273
274 \param dev The device to draw to.
275 \param bitmap The bitmap to show.
276 \retval MAPLE_EOK On success.
277 \retval MAPLE_EAGAIN If the command couldn't be sent. Try again later.
278 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
279
280 \sa vmu_draw_lcd, vmu_draw_lcd_xbm, vmu_set_icon
281*/
282int vmu_draw_lcd_rotated(maple_device_t *dev, const void *bitmap);
283
284/** \brief Display a Xwindows XBM image on a VMU screen.
285 \ingroup maple_lcd
286
287 This function takes in a Xwindows XBM, converts it to a raw bitmap, and sends
288 it to a VMU to display on its screen. This XBM image is 48x32 in size.
289
290 \param dev The device to draw to.
291 \param vmu_icon The icon to set.
292
293 \retval MAPLE_EOK On success.
294 \retval MAPLE_EAGAIN If the command couldn't be sent. Try again later.
295 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
296
297 \sa vmu_draw_lcd, vmu_set_icon
298*/
299int vmu_draw_lcd_xbm(maple_device_t *dev, const char *vmu_icon);
300
301/** \brief Display a Xwindows XBM on all VMUs.
302 \ingroup maple_lcd
303
304 This function takes in a Xwindows XBM and displays the image on all VMUs.
305
306 \note
307 This is a convenience function for vmu_draw_lcd() to broadcast across all VMUs.
308
309 \todo
310 Prevent this routine from broadcasting to rear VMUs.
311
312 \param vmu_icon The icon to set.
313
314 \sa vmu_draw_lcd_xbm
315*/
316void vmu_set_icon(const char *vmu_icon);
317
318/** \defgroup maple_memcard Memory Card Function
319 \brief API for features of the Memory Card Maple Function
320 \ingroup vmu
321
322 The Memory Card Maple function is for exposing a low-level,
323 block-based API that allows you to read from and write to
324 random blocks within the memory card's filesystem.
325
326 \note
327 A standard memory card has a block size of 512 bytes; however,
328 the block size is a configurable parameter in the "root" block,
329 which can be queried to cover supporting homebrew memory
330 cards with larger block sizes.
331
332 \warning
333 You should never use these functions directly, unless you
334 <i>really</i> know what you're doing, as you can easily corrupt
335 the filesystem by writing incorrect data. Instead, you should
336 favor the high-level filesystem API found in vmufs.h, or just
337 use the native C standard filesystem API within the virtual
338 `/vmu/` root directory to operate on VMU data.
339*/
340
341/** \brief Read a block from a memory card.
342 \ingroup maple_memcard
343
344 This function performs a low-level raw block read from a memory card.
345
346 \param dev The device to read from.
347 \param blocknum The block number to read.
348 \param buffer The buffer to read into (512 bytes).
349
350 \retval MAPLE_EOK On success.
351 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
352 \retval MAPLE_EFAIL On errors other than timeout.
353
354 \sa vmu_block_write
355*/
356int vmu_block_read(maple_device_t *dev, uint16_t blocknum, uint8_t *buffer);
357
358/** \brief Write a block to a memory card.
359 \ingroup maple_memcard
360
361 This function performs a low-level raw block write to a memory card.
362
363 \param dev The device to write to.
364 \param blocknum The block number to write.
365 \param buffer The buffer to write from (512 bytes).
366
367 \retval MAPLE_EOK On success.
368 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
369 \retval MAPLE_EFAIL On errors other than timeout.
370
371 \sa vmu_block_read
372*/
373int vmu_block_write(maple_device_t *dev, uint16_t blocknum, const uint8_t *buffer);
374
375/** \defgroup maple_clock Clock Function
376 \brief API for features of the Clock Maple Function
377 \ingroup vmu
378
379 The Clock Maple function provides a high-level API for the
380 following functionality:
381 - buzzer tone generation
382 - date/time management
383 - input/button status
384*/
385
386/** \name Buzzer
387 \brief Methods for tone generation.
388 @{
389*/
390
391/** \brief Make a VMU beep (low-level).
392 \ingroup maple_clock
393
394 This function sends a raw beep to a VMU, causing the speaker to emit a tone
395 noise.
396
397 \note
398 See http://dcemulation.org/phpBB/viewtopic.php?f=29&t=97048 for the
399 original information about beeping.
400
401 \warning
402 This function is submitting raw, encoded values to the VMU. For a more
403 user-friendly API built around generating simple tones, see vmu_beep_waveform().
404
405 \param dev The device to attempt to beep.
406 \param beep The tone to generate. Byte values are as follows:
407 1. period of square wave 1
408 2. duty cycle of square wave 1
409 3. period of square wave 2 (ignored by
410 standard mono VMUs)
411 4. duty cycle of square wave 2 (ignored by
412 standard mono VMUs)
413
414 \retval MAPLE_EOK On success.
415 \retval MAPLE_EAGAIN If the command couldn't be sent. Try again later.
416 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
417
418 \sa vmu_beep_waveform
419*/
420int vmu_beep_raw(maple_device_t *dev, uint32_t beep);
421
422/** \brief Play VMU Buzzer tone.
423 \ingroup maple_clock
424
425 Sends two different square waves to generate tone(s) on the VMU. Each
426 waveform is configured as shown by the following diagram. On a standard
427 VMU, there is only one piezoelectric buzzer, so waveform 2 is ignored;
428 however, the parameters do support dual-channel stereo in case such a
429 VMU ever does come along.
430
431 Period
432 +---------------------+
433 | |
434 HIGH __________ __________
435 | | | |
436 | | | |
437 |__________| |__________|
438 LOW
439 | |
440 +----------+
441 Duty Cycle
442
443 WAVEFORM
444
445 To stop an active tone, one can simply generate a flat wave, such as by
446 submitting both values as 0s.
447
448 \warning
449 Any submitted waveform which has a duty cycle of greater than or equal to
450 its period will result in an invalid waveform being generated and is
451 going to mute or end the tone.
452
453 \note
454 Note that there are no units given for the waveform, so any 3rd party VMU
455 is free to use any base clock rate, potentially resulting in different
456 frequencies (or tones) being generated for the same parameters on different
457 devices.
458
459 \note
460 On the VMU-side, this tone is generated using the VMU's Timer1 peripheral
461 as a pulse generator, which is then fed into its piezoelectric buzzer. The
462 calculated range of the standard VMU, given its 6MHz CF clock running with a
463 divisor of 6 is driving the Timer1 counter, is approximately 3.9KHz-500Khz;
464 however, due to physical characteristics of the buzzer, not every frequency
465 can be produced at a decent volume, so it's recommended that you test your
466 values, using the KOS example found at `/examples/dreamcast/vmu/beep`.
467
468 \param dev The VMU device to play the tone on
469 \param period1 The period or total interval of the first waveform
470 \param duty_cycle1 The duty cycle or active interval of the first waveform
471 \param period2 The period or total interval of the second waveform
472 (ignored by standard first-party VMUs).
473 \param duty_cycle2 The duty cycle or active interval of the second waveform
474 (ignored by standard first-party VMUs).
475
476 \retval MAPLE_EOK On success.
477 \retval MAPLE_EAGAIN If the command couldn't be sent. Try again later.
478 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
479*/
480int vmu_beep_waveform(maple_device_t *dev, uint8_t period1, uint8_t duty_cycle1, uint8_t period2, uint8_t duty_cycle2);
481
482/** @} */
483
484/** \name Date/Time
485 \brief Methods for managing date and time.
486 @{
487*/
488
489/** \brief Set the date and time on the VMU.
490 \ingroup maple_clock
491
492 This function sets the VMU's date and time values to
493 the given standard C Unix timestamp.
494
495 \param dev The device to write to.
496 \param unix Seconds since Unix epoch
497
498 \retval MAPLE_EOK On success.
499 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
500 \retval MAPLE_EFAIL On errors other than timeout.
501
502 \sa vmu_get_datetime
503*/
504int vmu_set_datetime(maple_device_t *dev, time_t unix);
505
506/** \brief Get the date and time on the VMU.
507 \ingroup maple_clock
508
509 This function gets the VMU's date and time values
510 as a single standard C Unix timestamp.
511
512 \note
513 This is the VMU equivalent of calling `time(unix)`.
514
515 \param dev The device to write to.
516 \param unix Seconds since Unix epoch (set to -1 upon failure)
517
518 \retval MAPLE_EOK On success.
519 \retval MAPLE_ETIMEOUT If the command timed out while blocking.
520 \retval MAPLE_EFAIL On errors other than timeout.
521
522 \sa vmu_set_datetime
523*/
524int vmu_get_datetime(maple_device_t *dev, time_t *unix);
525
526/** @} */
527
528/** \defgroup vmu_buttons VMU Buttons
529 \brief VMU button masks
530 \ingroup maple_clock
531
532 VMU's button state/cond masks, same as capability masks
533
534 \note
535 The MODE and SLEEP button states are not pollable on
536 a standard VMU.
537
538 @{
539*/
540
541#define VMU_DPAD_UP BIT(0) /**< Up Dpad button on the VMU */
542#define VMU_DPAD_DOWN BIT(1) /**< Down Dpad button on the VMU */
543#define VMU_DPAD_LEFT BIT(2) /**< Left Dpad button on the VMU */
544#define VMU_DPAD_RIGHT BIT(3) /**< Right Dpad button on the VMU */
545#define VMU_A BIT(4) /**< 'A' button on the VMU */
546#define VMU_B BIT(5) /**< 'B' button on the VMU */
547#define VMU_MODE BIT(6) /**< Mode button on the VMU */
548#define VMU_SLEEP BIT(7) /**< Sleep button on the VMU */
549
550/** \brief Represents the combined state of all VMU buttons.
551
552 Button states values:
553 - `0`: Released
554 - `1`: Pressed
555
556 \note
557 The Dpad buttons are automatically reoriented for you depending on
558 which direction the VMU is facing in a particular type of controller.
559 */
560typedef union vmu_buttons {
561 uint8_t raw; /**< Combined button state mask */
562 struct {
563 uint8_t dpad_up: 1; /**< Dpad Up button state */
564 uint8_t dpad_down: 1; /**< Dpad Down button state */
565 uint8_t dpad_left: 1; /**< Dpad Left button state */
566 uint8_t dpad_right: 1; /**< Dpad Right button state */
567 uint8_t a: 1; /**< 'A' button state */
568 uint8_t b: 1; /**< 'B' button state */
569 uint8_t mode: 1; /**< Mode button state */
570 uint8_t sleep: 1; /**< Sleep button state */
571 };
573
574/** "Civilized" structure containing VMU's current state.
575
576 \note
577 Don't forget that if you want valid button state information, you must
578 enable polling for it in the driver with vmu_set_buttons_enabled()!
579*/
580typedef struct vmu_state {
581 struct {
582 vmu_buttons_t current; /**< Button states from the current frame */
583 vmu_buttons_t previous; /**< Button states from the previous frame */
584 } buttons; /**< Latest two frames of button state data */
586
587/** @} */
588
589/** \name Input
590 \brief Methods for polling button states.
591 @{
592*/
593
594/** \brief Enable/Disable polling for VMU input
595 \ingroup maple_clock
596
597 This function is used to either enable or disable polling the
598 VMU buttons' states for input each frame.
599
600 \note
601 These buttons are not usually accessible to the player; however,
602 several devices, such as the ASCII pad, the arcade pad, and
603 the Retro Fighters controller leave the VMU partially exposed,
604 so that these buttons remain accessible, allowing them to be used
605 as extended controller inputs.
606
607 \note
608 Polling for VMU input is disabled by default to reduce unnecessary
609 Maple BUS traffic.
610
611 \sa vmu_get_buttons_enabled
612*/
613void vmu_set_buttons_enabled(int enable);
614
615/** \brief Check whether polling for VMU input has been enabled
616 \ingroup maple_clock
617
618 This function is used to check whether per-frame polling of
619 the VMU's button states has been enabled in the driver.
620
621 \note
622 Polling for VMU input is disabled by default to reduce unnecessary
623 Maple BUS traffic.
624
625 \sa vmu_set_buttons_enabled
626*/
628
629/** @} */
630
631/** \cond */
632/* Init / Shutdown -- Managed internally by KOS */
633void vmu_init(void);
634void vmu_shutdown(void);
635/** \endcond */
636
637__END_DECLS
638
639#endif /* __DC_MAPLE_VMU_H */
640
int vmu_get_datetime(maple_device_t *dev, time_t *unix)
Get the date and time on the VMU.
int vmu_beep_raw(maple_device_t *dev, uint32_t beep)
Make a VMU beep (low-level).
int vmu_get_buttons_enabled(void)
Check whether polling for VMU input has been enabled.
int vmu_set_datetime(maple_device_t *dev, time_t unix)
Set the date and time on the VMU.
int vmu_beep_waveform(maple_device_t *dev, uint8_t period1, uint8_t duty_cycle1, uint8_t period2, uint8_t duty_cycle2)
Play VMU Buzzer tone.
void vmu_set_buttons_enabled(int enable)
Enable/Disable polling for VMU input.
int vmu_draw_lcd_rotated(maple_device_t *dev, const void *bitmap)
Display a 1bpp bitmap on a VMU screen.
int vmu_draw_lcd(maple_device_t *dev, const void *bitmap)
Display a 1bpp bitmap on a VMU screen.
int vmu_draw_lcd_xbm(maple_device_t *dev, const char *vmu_icon)
Display a Xwindows XBM image on a VMU screen.
void vmu_set_icon(const char *vmu_icon)
Display a Xwindows XBM on all VMUs.
int vmu_block_write(maple_device_t *dev, uint16_t blocknum, const uint8_t *buffer)
Write a block to a memory card.
int vmu_block_read(maple_device_t *dev, uint16_t blocknum, uint8_t *buffer)
Read a block from a memory card.
int vmu_use_custom_color(maple_device_t *dev, int enable)
Enable custom color of a VMU.
int vmu_set_custom_color(maple_device_t *dev, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
Set custom color of a VMU.
int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape)
Set icon shape of a VMU.
int vmu_toggle_241_blocks(maple_device_t *dev, int enable)
Enable the extra 41 blocks of a VMU.
int vmu_has_241_blocks(maple_device_t *dev)
Get the status of a VMUs extra 41 blocks.
int vmu_get_custom_color(maple_device_t *dev, uint8_t *red, uint8_t *green, uint8_t *blue, uint8_t *alpha)
Get custom color of a VMU.
int vmu_get_icon_shape(maple_device_t *dev, uint8_t *icon_shape)
Get icon shape of a VMU.
Maple Bus driver interface.
Macros to help dealing with register fields.
One maple device.
Definition maple.h:271
"Civilized" structure containing VMU's current state.
Definition vmu.h:580
vmu_buttons_t previous
Button states from the previous frame.
Definition vmu.h:583
vmu_buttons_t current
Button states from the current frame.
Definition vmu.h:582
KOS-implementation of select C11 and POSIX extensions.
Represents the combined state of all VMU buttons.
Definition vmu.h:560
uint8_t mode
Mode button state.
Definition vmu.h:569
uint8_t b
'B' button state
Definition vmu.h:568
uint8_t dpad_down
Dpad Down button state.
Definition vmu.h:564
uint8_t dpad_up
Dpad Up button state.
Definition vmu.h:563
uint8_t a
'A' button state
Definition vmu.h:567
uint8_t raw
Combined button state mask.
Definition vmu.h:561
uint8_t dpad_right
Dpad Right button state.
Definition vmu.h:566
uint8_t dpad_left
Dpad Left button state.
Definition vmu.h:565
uint8_t sleep
Sleep button state.
Definition vmu.h:570