-
Notifications
You must be signed in to change notification settings - Fork 4
/
retroarch_config.sh
441 lines (366 loc) · 22.1 KB
/
retroarch_config.sh
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
#!/bin/sh
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
BLINK='\x1b[5m'
hasRetroArch64=false
FOLDER64=~/storage/shared/Android/data/com.retroarch.aarch64
if [ -d "$FOLDER64" ]; then
hasRetroArch64=true
fi
handheldModel=$(cat ~/dragoonDoriseTools/.device)
useInternalStorage=false
FILE=~/dragoonDoriseTools/.storageInternal
if [ -f "$FILE" ]; then
useInternalStorage=true
storageLocation="shared/roms"
else
useInternalStorage=false
storageLocation="external-1"
fi
snesMode="CLASSIC"
FILE=~/dragoonDoriseTools/.snes87
if [ -f "$FILE" ]; then
snesMode="INTERNAL"
fi
echo -e "Detecting model...${GREEN}$handheldModel${NONE}"
echo -ne "Creating config files & backup old ones..."
echo "### RA config files " &>> ~/storage/shared/pegasus_installer_log.log
mkdir ~/storage/shared/RetroArch/overlays/ &>> ~/storage/shared/pegasus_installer_log.log
rsync -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/common/RetroArch/config/ ~/storage/shared/RetroArch/config/ &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
echo -ne "Installing overlays..."
rsync -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/common/RetroArch/overlays/ ~/storage/shared/RetroArch/overlays/ &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
echo "### RA Hotkeys " &>> ~/storage/shared/pegasus_installer_log.log
raPath="com.retroarch"
if [ $hasRetroArch64 == true ]; then
echo "### RA Hotkeys for RA64" &>> ~/storage/shared/pegasus_installer_log.log
raPath="com.retroarch.aarch64"
fi
echo -ne "Applying hotkeys..."
sed -i 's/config_save_on_exit = "true"/config_save_on_exit = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_enable = "true"/input_overlay_enable = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/menu_show_load_content_animation = "true"/menu_show_load_content_animation = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_autoconfig = "true"/notification_show_autoconfig = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_config_override_load = "true"/notification_show_config_override_load = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_refresh_rate = "true"/notification_show_refresh_rate = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_remap_load = "true"/notification_show_remap_load = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_screenshot = "true"/notification_show_screenshot = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_set_initial_disk = "true"/notification_show_set_initial_disk = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/notification_show_patch_applied = "true"/notification_show_patch_applied = "false"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
#sed -i 's/video_scale_integer = "false"/video_scale_integer = "true"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_menu_toggle_gamepad_combo = "0"/input_menu_toggle_gamepad_combo = "6"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_enable_hotkey_btn = "nul"/input_enable_hotkey_btn = "109"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_exit_emulator_btn = "nul"/input_exit_emulator_btn = "108"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_load_state_btn = "nul"/input_load_state_btn = "102"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_menu_toggle_gamepad_combo = "nul"/input_menu_toggle_gamepad_combo = "6"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_rewind_btn = "nul"/input_rewind_btn = "104"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_save_state_btn = "nul"/input_save_state_btn = "103"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_state_slot_decrease_btn = "nul"/input_state_slot_decrease_btn = "h0down"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_state_slot_increase_btn = "nul"/input_state_slot_increase_btn = "h0up"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_toggle_fast_forward_btn = "nul"/input_toggle_fast_forward_btn = "105"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/menu_driver = "glui"/menu_driver = "ozone"/g' ~/storage/shared/Android/data/${raPath}/files/retroarch.cfg &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
#Cores https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/
#Snes configuration
/bin/bash ~/dragoonDoriseTools/pegasus-android-metadata/snes_config.sh
echo -e "Downloading RetroArch Recommended Cores..."
installCores="true"
echo "### RA Installing cores " &>> ~/storage/shared/pegasus_installer_log.log
if [ $installCores == "true" ]; then
# Do this in a better way!
cd ~/storage/shared/RetroArch/downloads
#find . -name "*.so" -type f -delete
echo -ne "Downloading a5200 (Atari 5200)..."
FILE=~/storage/shared/RetroArch/downloads/opera_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/a5200_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Pro System (Atari 7800)..."
FILE=~/storage/shared/RetroArch/downloads/opera_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/prosystem_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Opera..."
FILE=~/storage/shared/RetroArch/downloads/opera_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/opera_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Intellivision..."
FILE=~/storage/shared/RetroArch/downloads/freeintv_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/freeintv_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Final Burn Alpha..."
FILE=~/storage/shared/RetroArch/downloads/fbalpha2012_neogeo_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/fbalpha2012_neogeo_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Final Burn Neo..."
FILE=~/storage/shared/RetroArch/downloads/fbneo_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/fbneo_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Mame 2010..."
FILE=~/storage/shared/RetroArch/downloads/mame2010_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mame2010_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Mame 2003 Plus..."
FILE=~/storage/shared/RetroArch/downloads/mame2003_plus_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mame2003_plus_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Atari 2600..."
FILE=~/storage/shared/RetroArch/downloads/stella_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/stella_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Atari Lynx..."
FILE=~/storage/shared/RetroArch/downloads/mednafen_lynx_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mednafen_lynx_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading WonderSwan..."
FILE=~/storage/shared/RetroArch/downloads/mednafen_wswan_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mednafen_wswan_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading DooM..."
FILE=~/storage/shared/RetroArch/downloads/prboom_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/prboom_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading DOS..."
FILE=~/storage/shared/RetroArch/downloads/dosbox_pure_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/dosbox_pure_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading PC Engine..."
FILE=~/storage/shared/RetroArch/downloads/mednafen_pce_fast_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mednafen_pce_fast_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading GameBoy..."
FILE=~/storage/shared/RetroArch/downloads/gambatte_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/gambatte_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading GameBoy Advance..."
FILE=~/storage/shared/RetroArch/downloads/mgba_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mgba_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading NES..."
FILE=~/storage/shared/RetroArch/downloads/nestopia_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/nestopia_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading SNES Widescreen..."
FILE=~/storage/shared/RetroArch/downloads/bsnes_hd_beta_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/bsnes_hd_beta_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading SNES..."
FILE=~/storage/shared/RetroArch/downloads/snes9x_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/snes9x_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Genesis & Sega CD & GameGear & Master System..."
FILE=~/storage/shared/RetroArch/downloads/genesis_plus_gx_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/genesis_plus_gx_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Genesis Widescreen..."
FILE=~/storage/shared/RetroArch/downloads/genesis_plus_gx_wide_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/genesis_plus_gx_wide_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Sega32x..."
FILE=~/storage/shared/RetroArch/downloads/picodrive_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/picodrive_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Neo Geo..."
FILE=~/storage/shared/RetroArch/downloads/neocd_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/neocd_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading Neo Geo Pocket..."
FILE=~/storage/shared/RetroArch/downloads/mednafen_ngp_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mednafen_ngp_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading PSX..."
FILE=~/storage/shared/RetroArch/downloads/pcsx_rearmed_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/pcsx_rearmed_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Downloading ScummVM..."
FILE=~/storage/shared/RetroArch/downloads/scummvm_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/scummvm_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
fi
if [[ $handheldModel == "RG552" ]]; then
echo "### RA 552 config " &>> ~/storage/shared/pegasus_installer_log.log
echo -e ""
echo -ne "RG552 Special configuration..."
#Overlay Fixes for 5:3 screens
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Genesis\ Plus\ GX/genesis.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/MAME\ 2003-Plus/mame.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.625000"/input_overlay_scale_landscape = "1.735000"/g' ~/storage/shared/RetroArch/config/Beetle\ NeoPop/ngp.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.625000"/input_overlay_scale_landscape = "1.735000"/g' ~/storage/shared/RetroArch/config/Beetle\ NeoPop/ngpc.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Beetle\ Cygne/wswan.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Beetle\ Cygne/wswanc.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Beetle\ Lynx/lynx.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.680000"/input_overlay_scale_landscape = "1.780000"/g' ~/storage/shared/RetroArch/config/Gambatte/gb.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.685000"/input_overlay_scale_landscape = "1.785000"/g' ~/storage/shared/RetroArch/config/Gambatte/gbc.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.544999"/input_overlay_scale_landscape = "1.645000"/g' ~/storage/shared/RetroArch/config/Genesis\ Plus\ GX/gamegear.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Genesis\ Plus\ GX/genesis.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Nestopia/nes.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Snes9x/snes.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.125000"/g' ~/storage/shared/RetroArch/config/Genesis\ Plus\ GX/mastersystem.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.205000"/g' ~/storage/shared/RetroArch/config/PicoDrive/sega32x.cfg &>> ~/storage/shared/pegasus_installer_log.log
sed -i 's/input_overlay_scale_landscape = "1.060000"/input_overlay_scale_landscape = "1.105000"/g' ~/storage/shared/RetroArch/config/Genesis\ Plus\ GX/segacd.cfg &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
if [[ $handheldModel == "ODIN" ]]; then
echo "### RA Odin config " &>> ~/storage/shared/pegasus_installer_log.log
echo -e ""
echo -e "ODIN Special configuration..."
cd ~/storage/shared/RetroArch/downloads
#Flycast Core
echo -ne "Downloading Flycast..."
FILE=~/storage/shared/RetroArch/downloads/flycast_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/flycast_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
#Yaba Sanshiro Core
echo -ne "Downloading Yaba Sanshiro..."
FILE=~/storage/shared/RetroArch/downloads/flycast_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/yabasanshiro_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
#Mupen Core
echo -ne "Downloading Mupen64 Plus GLE3..."
FILE=~/storage/shared/RetroArch/downloads/mupen64plus_next_gles3_libretro_android.so
if [ -f "$FILE" ]; then
echo -e "${YELLOW}Already Downloaded${NONE}"
else
wget https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/mupen64plus_next_gles3_libretro_android.so.zip &>> ~/storage/shared/pegasus_installer_log.log
echo -e "${GREEN}OK${NONE}"
fi
#Configuration
rsync -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/odin/RetroArch/config/ ~/storage/shared/RetroArch/config/ &>> ~/storage/shared/pegasus_installer_log.log
cp ~/dragoonDoriseTools/pegasus-android-metadata/roms/dreamcast/metadata.pegasus.txt.odin ~/storage/$storageLocation/dreamcast/metadata.pegasus.txt
rm ~/storage/$storageLocation/dreamcast/metadata.pegasus.txt.odin
cp ~/dragoonDoriseTools/pegasus-android-metadata/roms/saturn/metadata.pegasus.txt.odin ~/storage/$storageLocation/saturn/metadata.pegasus.txt
rm ~/storage/$storageLocation/saturn/metadata.pegasus.txt.odin
#find . -name "*.zip" -type f -delete
fi
echo "### RA Unzipping cores " &>> ~/storage/shared/pegasus_installer_log.log
echo -ne "${BOLD}Unzipping${NONE} cores..."
cd ~/storage/shared/RetroArch/downloads
for entry in ~/storage/shared/RetroArch/downloads/*.zip
do
unzip -o $entry &>> ~/storage/shared/pegasus_installer_log.log
done
find . -name "*.zip" -type f -delete
cd ~/dragoonDoriseTools
echo -e "${GREEN}OK${NONE}"
echo -e "Press the ${RED}A button${NONE} to continue"
read pause
#Bezels
/bin/bash ~/dragoonDoriseTools/pegasus-android-metadata/ra_bezels.sh