SceOled: Difference between revisions
Jump to navigation
Jump to search
Devnoname120 (talk | contribs) No edit summary |
Devnoname120 (talk | contribs) (ksce) |
||
Line 72: | Line 72: | ||
== SceOledForDriver == | == SceOledForDriver == | ||
=== | === ksceOledWaitReady === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 80: | Line 80: | ||
|} | |} | ||
<source lang="c">int | <source lang="c">int ksceOledWaitReady();</source> | ||
Waits until the OLED has been initialized. | Waits until the OLED has been initialized. | ||
=== | === ksceOledGetBrightness === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 92: | Line 92: | ||
|} | |} | ||
<source lang="c">int | <source lang="c">int ksceOledGetBrightness();</source> | ||
Get the wide brightness value (<code>0-65536</code>). | Get the wide brightness value (<code>0-65536</code>). | ||
=== | === ksceOledSetBrightness === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 104: | Line 104: | ||
|} | |} | ||
<source lang="c">int | <source lang="c">int ksceOledSetBrightness(unsigned int brightness);</source> | ||
Set the brightness (brightness needs to be in the range <code>0-65536</code>). <code>0</code> means screen turned off, <code>1</code> means screen dimmed (like if you wait for a long time without touching your screen). | Set the brightness (brightness needs to be in the range <code>0-65536</code>). <code>0</code> means screen turned off, <code>1</code> means screen dimmed (like if you wait for a long time without touching your screen). | ||
Line 110: | Line 110: | ||
The brightness has actually 17 different values: 1 special value for <code>brightness=0</code>, and 16 different values for the rest (<code>real_value=brightness/4096</code>). | The brightness has actually 17 different values: 1 special value for <code>brightness=0</code>, and 16 different values for the rest (<code>real_value=brightness/4096</code>). | ||
=== | === ksceOledForDriver_2F0C4B67 === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 118: | Line 118: | ||
|} | |} | ||
<source lang="c">int | <source lang="c">int ksceOledForDriver_2F0C4B67(u8 cmd, void *buffer, int size);</source> | ||
Sends a command to the OLED? | Sends a command to the OLED? | ||
=== | === ksceOledForDriver_E30604CC === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 130: | Line 130: | ||
|} | |} | ||
Dispatches the OLED cmd list (using | Dispatches the OLED cmd list (using ksceOledForDriver_2F0C4B67). | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 23:36, 12 July 2017
Module
Known NIDs
Version | Name | World | Privilege | NID |
---|---|---|---|---|
1.69 | SceOled | Non-secure | Kernel | 0x5410837A |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
1.69 | SceOledForDriver | Non-secure | Kernel | 0x60C7478A |
Types
enum SceOledError { SCE_OLED_ERROR_INVALID_BRIGHTNESS_VALUE = 0x803F0A02, SCE_OLED_ERROR_INVALID_READY_STATUS = 0x803F0A03, SCE_OLED_ERROR_NOT_READY = 0x803F0A04, SCE_OLED_ERROR_INTERNAL = 0x803F0A05 }; enum SceOledStatus { SCE_OLED_STATUS_NOT_READY = 0, SCE_OLED_STATUS_READY = 1, SCE_OLED_STATUS_ERROR = 2 }; struct SceOledCmd { unsigned char cmd, unsigned char size, unsigned char buf[size] }
A cmd_queue
is a contiguous array of SceOledCmd
of different sizes. To get the next SceOledCmd
of a queue, do:
struct SceOledCmd *cur_cmd = ... struct SceOledCmd *next_cmd = &(cur_cmd->buf) + cur_cmd->size; if (next_cmd->cmd == 0 || next_cmd->cmd == 255) {...} // End of queue
Available commands
Cmd | Size | Buf | Description |
---|---|---|---|
178 | 1 | Unknown | Unknown |
249 | 1 or 22 | Unknown, for example <0x01, 0xCFBE9F9F, 0xCBC2C9D7, 0xDEE3E1BB, 0xFAD3D0D6, 0x002FE6ED, 0x2F> (Little-Endian)
|
Change Brightness |
SceOledForDriver
ksceOledWaitReady
Version | NID |
---|---|
3.60 | 0x0CC6BCB4 |
int ksceOledWaitReady();
Waits until the OLED has been initialized.
ksceOledGetBrightness
Version | NID |
---|---|
3.60 | 0x43EF811A |
int ksceOledGetBrightness();
Get the wide brightness value (0-65536
).
ksceOledSetBrightness
Version | NID |
---|---|
3.60 | 0xF9624C47 |
int ksceOledSetBrightness(unsigned int brightness);
Set the brightness (brightness needs to be in the range 0-65536
). 0
means screen turned off, 1
means screen dimmed (like if you wait for a long time without touching your screen).
The brightness has actually 17 different values: 1 special value for brightness=0
, and 16 different values for the rest (real_value=brightness/4096
).
ksceOledForDriver_2F0C4B67
Version | NID |
---|---|
3.60 | 0x2F0C4B67 |
int ksceOledForDriver_2F0C4B67(u8 cmd, void *buffer, int size);
Sends a command to the OLED?
ksceOledForDriver_E30604CC
Version | NID |
---|---|
3.60 | 0xE30604CC |
Dispatches the OLED cmd list (using ksceOledForDriver_2F0C4B67).