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