1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# picoarch - a libretro frontend designed for small screens and low power
picoarch uses libpicofe and SDL to create a small frontend to libretro cores. It's designed for small (320x240 2.0-2.4") screen, low-powered devices like the Trimui Model S (PowKiddy A66).
## Running
picoarch can be run by specifying the core library and the content to run:
```
./picoarch /path/to/core_name_libretro.so /path/to/game.gba
```
It does not have a built-in file browser, so both core and content must be specified on the command line.
## Building
The frontend can currently be built for the TrimUI Model S and Linux (useful for testing and debugging).
First, fetch the repo with submodules:
```
git clone --recurse-submodules https://git.crowdedwood.com/picoarch
```
### Linux instructions
To build picoarch itself, you need libSDL 1.2, libpng, and libasound. Different cores may need additional dependencies.
After that, `make` bulids picoarch and all supported cores into this directory.
### TrimUI instructions
To build for TrimUI, you need to set up the [toolchain](https://git.crowdedwood.com/trimui-toolchain/about/) first.
To build generic binaries:
```
make platform=trimui
```
If you want to build for MinUI, you need to install [libmmenu](https://github.com/shauninman/libmmenu) into the toolchain. Then:
```
make platform=trimui MINUI=1
```
`MINUI=1` will change save/config/system paths to match MinUI standards. If you just want to include mmenu, you can run:
```
make platform=trimui MMENU=1
```
### Other build options
To debug:
```
make DEBUG=1
```
To build a specific supported core:
```
make gpsp_libretro.so
```
To clean a core so it will be built again:
```
make clean-gpsp
```
To completely clean the repo (will delete, pull, and patch all core repos from scratch)
```
make force-clean
```
Distribution builds can also be made for gmenunx and MinUI:
```
make platform=trimui dist-gmenu
make platform=trimui MINUI=1 dist-minui
```
These will output a directory structure that can be moved onto the SD card into `pkg/gmenunx` or `pkg/MinUI`.
To build profiles for profile-guided optimization:
```
make PROFILE=GENERATE
```
To apply the generated profiles:
```
make PROFILE=APPLY
```
PGO can lead to major speed improvements with some emulators.
## Notes on cores
In order to make development and testing easier, the Makefile will pull and build supported cores.
A few common changes will need to be made when you add cores, since TrimUI is not a supported libretro platform. picoarch has a `patches/` directory containing needed changes to make cores work well in picoarch. Patches are applied in order after checking out the repository.
Common changes include:
- Adding a `platform=trimui` target to the core Makefile
- Modifying `libretro_core_options.h` to shorten text and change defaults for small screen / low power devices
- Hiding unnecessary core options and forcing different defaults
picoarch also keeps the running core name in a global variable. This can be used for:
- Renaming buttons to match the core's system
- Adding frameskip to make fast-forward faster
- Displaying extra options or hiding unnecessary options
Some features and fixes are also included in `patches` -- it would be best for them to be upstreamed eventually.
|