2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
25#include "../types/evmu_peripheral.h"
26#include <gimbal/meta/signals/gimbal_signal.h>
29
30
31
32#define EVMU_LCD_TYPE (GBL_TYPEID
(EvmuLcd))
33#define EVMU_LCD(self) (GBL_CAST(EvmuLcd, self))
38#define EVMU_LCD_NAME "lcd"
41
42
43
44#define EVMU_LCD_PIXEL_WIDTH 48
45#define EVMU_LCD_PIXEL_HEIGHT 32
46#define EVMU_LCD_ICON_COUNT 4
50
51
52
53#define EVMU_LCD_GHOSTING_FRAMES 100
54#define EVMU_LCD_SCREEN_REFRESH_DIVISOR 199
57#define GBL_SELF_TYPE EvmuLcd
61GBL_FORWARD_DECLARE_STRUCT(EvmuLcd);
87
88
89
90
91
92
93
94
95
96
97
98
99
100GBL_CLASS_DERIVE(EvmuLcd, EvmuPeripheral)
101 EVMU_RESULT (*pFnRefreshScreen)(GBL_SELF);
105
106
107
108
109
110
111
112
113
127 (ghostingEnabled, GBL_GENERIC, (READ, WRITE),
GBL_BOOL_TYPE),
134 (screenRefresh, (GBL_INSTANCE_TYPE, pReceiver)),
135 (screenToggle, (GBL_INSTANCE_TYPE, pReceiver), (GBL_BOOL_TYPE, enabled)),
136 (iconsChange, (GBL_INSTANCE_TYPE, pReceiver), (GBL_FLAGS_TYPE, flags))
144
145
146
147
160
161
162
163
173
174
175
176
187
188
189
190
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
@ EVMU_XRAM_BANK_LCD_BOTTOM
Bottom (1) Bank.
@ EVMU_XRAM_BANK_ICON
Icon (2) Bank.
@ EVMU_XRAM_BANK_LCD_TOP
Top (0) Bank.
@ EVMU_LCD_REFRESH_166HZ
166Hz Refresh rate
@ EVMU_LCD_REFRESH_83HZ
83Hz Refresh rate
@ EVMU_LCD_ICON_FLASH
Flash Icon (!)
@ EVMU_LCD_ICON_CLOCK
Clock Icon (Analog Clock)
@ EVMU_LCD_ICON_GAME
Game Icon (Card)
@ EVMU_LCD_ICON_FILE
File Icon (Notepad)
@ EVMU_LCD_ICONS_ALL
All Icons.
@ EVMU_LCD_ICONS_NONE
No Icon.
GblType EvmuLcd_type(void)
Returns the GblType UUID associated with EvmuLcd.
uint64_t EvmuTicks
Represents a delta time in milliseconds.
#define GBL_PROPERTIES(object,...)
EvmuLcd screen and framebuffer peripheral.
EVMU_LCD_REFRESH_RATE EvmuLcd_refreshRate(const EvmuLcd *pSelf)
Returns the refresh rate configuration for how frequently the display updates.
EvmuTicks EvmuLcd_refreshRateTicks(const EvmuLcd *pSelf)
Returns the refresh rate / update time of the LCD screen in milliseconds.
uint32_t invertColors
Swap black and white pixel values.
uint32_t filterEnabled
Enable linear filtering.
GblBool EvmuLcd_refreshEnabled(const EvmuLcd *pSelf)
Returns GBL_TRUE if screen refreshing is currently enabled for the display, GBL_FALSE otherwise.
GblBool EvmuLcd_pixel(const EvmuLcd *pSelf, size_t row, size_t col)
Returns the raw pixel value for the given screen coordinate, GBL_TRUE being black and GBL_FALSE being...
void EvmuLcd_setPixel(EvmuLcd *pSelf, size_t row, size_t col, GblBool enabled)
Sets the raw pixel value for the given screen coordinate, with enabled signifying a black pixel.
void EvmuLcd_setScreenEnabled(EvmuLcd *pSelf, GblBool enabled)
Enables or disables the VMU's LCD display, depending on the value of enabled.
EVMU_LCD_ICONS EvmuLcd_icons(const EvmuLcd *pSelf)
Returns a value containing the bitmasks of all of the enabled icons OR'd together.
uint32_t ghostingEnabled
Emulate pixel ghosting/fade effect.
void EvmuLcd_setRefreshRate(EvmuLcd *pSelf, EVMU_LCD_REFRESH_RATE rate)
Sets the refresh rate of the LCD screen to the given rate value.
void EvmuLcd_setIcons(EvmuLcd *pSelf, EVMU_LCD_ICONS icons)
Sets the active icons to the mask given by icons, which has individual icon masks OR'd together.
uint32_t screenChanged
User-driven toggle for knowing when to redraw.
size_t screenRefreshDivisor
How many hardware refreshes before software refresh.
uint8_t EvmuLcd_decoratedPixel(const EvmuLcd *pSelf, size_t row, size_t col)
Retrieves the decorated pixel value for the given screen coordinate, with all effects enabled.
void EvmuLcd_setRefreshEnabled(EvmuLcd *pSelf, GblBool enabled)
Enables or disables automatic screen refreshing for the display, depending on the value of enabled.
GblBool EvmuLcd_screenEnabled(const EvmuLcd *pSelf)
Returns GBL_TRUE if the display is enabled/powered, GBL_FALSE otherwise.
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)