mirror of
https://github.com/h4zesec/OrbisTTY.git
synced 2026-10-06 08:00:15 +02:00
44 lines
1.1 KiB
Markdown
44 lines
1.1 KiB
Markdown
# OrbisTTY
|
|
|
|
OrbisTTY is a simple terminal-style text renderer for **PlayStation 4 homebrew** that provides a `printf`-like interface using **sceVideoOut** and **FreeType** for the OpenOrbis PS4 Toolchain.<br>
|
|
|
|
**Note:** Fonts that were tested with OrbisTTY are stored in **tested-fonts/**<br>
|
|
**Note:** Escape sequences are not supported (\n,\r,...). Every OrbisTTY::orbis_printfln(...) prints a whole line, including the \n. <br>
|
|
|
|
## Features
|
|
|
|
- `printf`-style text output
|
|
- Automatic line scrolling
|
|
- FreeType font rendering
|
|
- Double buffered rendering
|
|
- Lightweight and easy to integrate
|
|
|
|
## Required OpenOrbis libraries to link
|
|
- -lc
|
|
- -lkernel
|
|
- -lc++
|
|
- -lSceVideoOut
|
|
- -lSceFreeType
|
|
- -lSceSysmodule
|
|
|
|
## Example
|
|
|
|
```cpp
|
|
#include "OrbisTTY.h"
|
|
|
|
#define printf(...) OrbisTTY::orbis_printfln(__VA_ARGS__)
|
|
|
|
int main() {
|
|
if (!OrbisTTY::init("/app0/assets/fonts/Inconsolata-Regular.ttf"))
|
|
return 1;
|
|
|
|
for (int i = 0; ; i++)
|
|
printf("Homebrew counter %d", i);
|
|
|
|
return 0;
|
|
}
|
|
```
|
|
|
|
## OpenOrbis PS4 Toolchain
|
|
- https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain
|