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