The build scripts commonly available only produce a .a file for Wii/Switch/etc. However, the Wii version expects a .dol file, and the Switch version expects a .nro file (I assume other systems have their own as well). How do I convert the outputted file to the format expected by RetroArch? I can’t seem to find anything on this process.
You have to compile RetroArch and statically link against the core library (the *.a file).
And how do I do that?
The libretro-super scripts exist to automate the process, but you move the *.a file into the RetroArch source tree and name it ‘libretro.a’ and then invoke Makefile.griffin platform=wii
(IIRC)
Yeah, I get a ton of errors when I try that:
Microsoft Windows [Version 10.0.18362.418]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\Jacob>cd C:\Users\Jacob\Desktop\RetroArch-master
C:\Users\Jacob\Desktop\RetroArch-master>make -f Makefile.griffin platform=wii
C:/devkitPro/devkitPPC/bin/powerpc-eabi-gcc -DINTERNAL_LIBOGC -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int -Wall -std=gnu99 -DHW_RVL -mrvl -DGEKKO -mcpu=750 -meabi -mhard-float -DMSB_FIRST -I. -IC:/devkitPro/libogc/include -Iwii/libogc/include -I./libretro-common/include -Ideps -Ideps/stb -DHAVE_SOCKET_LEGACY -DHAVE_WIIUSB_HID -DHAVE_HID -DBIG_STACK -DHAVE_RJPEG -DHAVE_RARCH_EXEC -DHAVE_ZLIB -I./libretro-common/include/compat/zlib -DHAVE_RPNG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_RUNAHEAD -DHAVE_7ZIP -DHAVE_AUDIOMIXER -DHAVE_OVERLAY -DRARCH_CONSOLE -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_THREADS -DHAVE_RSOUND -O3 -c -ogriffin/griffin.o griffin/griffin.c
In file included from griffin/griffin.c:463:
griffin/../gfx/drivers/gx_gfx.c: In function 'init_vtx':
griffin/../gfx/drivers/gx_gfx.c:693:23: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
DCFlushRange(g_tex.data, (g_tex.width *
~~~~~~~~~~~~~~
g_tex.height * video->rgb32) ? 4 : 2);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from griffin/griffin.c:633:
griffin/../input/drivers_joypad/gx_joypad.c: In function 'gx_joypad_init':
griffin/../input/drivers_joypad/gx_joypad.c:581:25: warning: passing argument 1 of 'SYS_SetResetCallback' from incompatible pointer type [-Wincompatible-pointer-types]
SYS_SetResetCallback(reset_cb);
^~~~~~~~
In file included from C:/devkitPro/libogc/include/gccore.h:62,
from griffin/../wii/libogc/libfat/common.h:47,
from griffin/../wii/libogc/libfat/cache.c:39,
from griffin/griffin.c:79:
C:/devkitPro/libogc/include/ogc/system.h:325:50: note: expected 'resetcallback' {aka 'void (*)(unsigned int, void *)'} but argument is of type 'void (*)(void)'
resetcallback SYS_SetResetCallback(resetcallback cb);
~~~~~~~~~~~~~~^~
In file included from griffin/../libretro-common/rthreads/rthreads.c:50,
from griffin/griffin.c:1165:
griffin/../libretro-common/rthreads/gx_pthread.h: At top level:
griffin/../libretro-common/rthreads/gx_pthread.h:87:15: error: conflicting types for 'pthread_mutexattr_t'
typedef void* pthread_mutexattr_t;
^~~~~~~~~~~~~~~~~~~
In file included from c:\devkitpro\devkitppc\powerpc-eabi\include\sys\types.h:239,
from c:\devkitpro\devkitppc\powerpc-eabi\include\stdio.h:61,
from griffin/../verbosity.c:30,
from griffin/griffin.c:36:
c:\devkitpro\devkitppc\powerpc-eabi\include\sys\_pthreadtypes.h:169:3: note: previous declaration of 'pthread_mutexattr_t' was here
} pthread_mutexattr_t;
^~~~~~~~~~~~~~~~~~~
In file included from griffin/../libretro-common/rthreads/rthreads.c:50,
from griffin/griffin.c:1165:
griffin/../libretro-common/rthreads/gx_pthread.h:88:13: error: conflicting types for 'pthread_attr_t'
typedef int pthread_attr_t;
^~~~~~~~~~~~~~
In file included from c:\devkitpro\devkitppc\powerpc-eabi\include\sys\types.h:239,
from c:\devkitpro\devkitppc\powerpc-eabi\include\stdio.h:61,
from griffin/../verbosity.c:30,
from griffin/griffin.c:36:
c:\devkitpro\devkitppc\powerpc-eabi\include\sys\_pthreadtypes.h:75:3: note: previous declaration of 'pthread_attr_t' was here
} pthread_attr_t;
^~~~~~~~~~~~~~
In file included from griffin/../libretro-common/rthreads/rthreads.c:50,
from griffin/griffin.c:1165:
griffin/../libretro-common/rthreads/gx_pthread.h:90:16: error: conflicting types for 'pthread_condattr_t'
typedef OSCond pthread_condattr_t;
^~~~~~~~~~~~~~~~~~
In file included from c:\devkitpro\devkitppc\powerpc-eabi\include\sys\types.h:239,
from c:\devkitpro\devkitppc\powerpc-eabi\include\stdio.h:61,
from griffin/../verbosity.c:30,
from griffin/griffin.c:36:
c:\devkitpro\devkitppc\powerpc-eabi\include\sys\_pthreadtypes.h:186:3: note: previous declaration of 'pthread_condattr_t' was here
} pthread_condattr_t; /* a condition attribute object */
^~~~~~~~~~~~~~~~~~
In file included from griffin/griffin.c:1240:
griffin/../menu/menu_setting.c:2094:13: warning: 'config_bool_alt' defined but not used [-Wunused-function]
static void config_bool_alt(
^~~~~~~~~~~~~~~
In file included from griffin/griffin.c:1090:
griffin/../retroarch.c:1336:13: warning: 'retroarch_set_runtime_shader_preset' defined but not used [-Wunused-function]
static void retroarch_set_runtime_shader_preset(const char *arg) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from griffin/../verbosity.c:65,
from griffin/griffin.c:36:
griffin/../config.def.h:438:13: warning: 'quick_menu_show_download_thumbnails' defined but not used [-Wunused-variable]
static bool quick_menu_show_download_thumbnails = true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile.griffin:1065: griffin/griffin.o] Error 1
C:\Users\Jacob\Desktop\RetroArch-master>
Okay, now what?
$ ./dist-cores.sh wii
make: Entering directory '/home/Jacob/Desktop/RetroArch-master'
rm -f retroarch-salamander_wii.dol
rm -f retroarch-salamander_wii.elf
rm -f frontend/frontend_salamander.o frontend/frontend_driver.o frontend/drivers/platform_gx.o frontend/drivers/platform_wii.o frontend/drivers/platform_null.o libretro-common/file/file_path.o libretro-common/hash/rhash.o libretro-common/string/stdstring.o libretro-common/lists/string_list.o libretro-common/lists/dir_list.o libretro-common/streams/file_stream.o libretro-common/vfs/vfs_implementation.o libretro-common/file/retro_dirent.o libretro-common/encodings/encoding_utf.o libretro-common/compat/compat_strl.o libretro-common/compat/compat_strcasestr.o libretro-common/compat/fopen_utf8.o libretro-common/file/config_file.o file_path_str.o verbosity.o wii/app_booter/app_booter.binobj wii/libogc/libfat/cache.o wii/libogc/libfat/directory.o wii/libogc/libfat/disc.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/filetime.o wii/libogc/libfat/libfat.o wii/libogc/libfat/lock.o wii/libogc/libfat/partition.o
make -C wii/app_booter clean
make[1]: Entering directory '/home/Jacob/Desktop/RetroArch-master/wii/app_booter'
rm -f app_booter.bin
rm -f app_booter.elf
rm -f crt0.o main.o ../../libretro-common/crt/string.o
make[1]: Leaving directory '/home/Jacob/Desktop/RetroArch-master/wii/app_booter'
make: Leaving directory '/home/Jacob/Desktop/RetroArch-master'
make: Entering directory '/home/Jacob/Desktop/RetroArch-master'
rm -f retroarch_wii.dol
rm -f retroarch_wii.elf
rm -f griffin/griffin.o wii/app_booter/app_booter.binobj
make -C wii/app_booter clean
make[1]: Entering directory '/home/Jacob/Desktop/RetroArch-master/wii/app_booter'
rm -f app_booter.bin
rm -f app_booter.elf
rm -f crt0.o main.o ../../libretro-common/crt/string.o
make[1]: Leaving directory '/home/Jacob/Desktop/RetroArch-master/wii/app_booter'
make: Leaving directory '/home/Jacob/Desktop/RetroArch-master'
make: Entering directory '/home/Jacob/Desktop/RetroArch-master'
C:/devkitPro/devkitPPC/bin/powerpc-eabi-gcc -Wall -std=gnu99 -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Iwii/libogc/include -std=gnu99 -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_RARCH_EXEC -DGEKKO -Wno-char-subscripts -O3 -c -o frontend/frontend_salamander.o frontend/frontend_salamander.c
make: *** [Makefile.wii.salamander:124: frontend/frontend_salamander.o] Error 1
make: Leaving directory '/home/Jacob/Desktop/RetroArch-master'