retro-go
retro-go copied to clipboard
Improve SDL compilation instructions
I see retro-go has an "sdl2" target that would presumably allow running it on a regular, x86/64 desktop computer, I think...
But I can't find documentation on how to do it, in components/retro-go/targets/sdl2/docs/README.md or BUILDING.md
I apt-get installed libsdl2-dev and ran:
./rg_tool.py --target sdl2 build
But immediately it complains about:
IDF_PATH is not defined. Are you running inside esp-idf environment?
And with IDF_PATH set as usual, of course ESP_PLATFORM is set and then it tries to compile all sorts of non-desktop things.
So I was wondering if some more instructions could be added about this, or provided here, or just some clarification that "this is not supported anymore" if that's the case.
SDL2 target is only for myself, for debugging and profiling, hence the no documentation. It works but it must be built manually (gcc/tcc/clang supported) and launching a game must be done by editing the config and I think the display patches are missing from master right now.
It will never be a prime target but I agree that it would be nice to eventually make it easy to build the SDL2 version. It would make it simpler for people to tinker.
We can keep this issue open as a reminder!
Ah yes, that makes sense, thanks!
I would love to also be able to do some debugging and profiling ;-)
Not to push, but as a first step, I made this list of what's needed:
- hints on how you compile it: which command do you use, some script maybe?
- editing the config to launch the game: sounds easy, but an example file or diff will help
- display patches: would it be possible to just push them out on a branch for now?
I've pushed to a temp branch, though it no longer works very well due to changes since I last used it. But it should build!
https://github.com/ducalex/retro-go/commit/7cd4a38c600d29f42f03cbac407b1caa09a69be9
The build scripts builds the launcher and retro-core then runs both. The first run will create the folder structure where you can drop some roms to test.
I build with mingw64 (it also works with tinycc and clang) so you might have to change some things if you run Linux proper.
That's so cool! Let me see if I can get it to work on Linux proper :-D
I've added build_sdl2.sh to the dev branch https://github.com/ducalex/retro-go/commit/034047ed7c2701ba77d1f742ae61b80c2c4d1d78 and as of now the dev branch can be built with SDL2. Unfortunately it doesn't run because the SDL2 code is broken. (Well it runs but it just freezes because we don't have any event loop or proper main SDL2 task.)
I'll try to fix it before the next release but if someone experienced with SDL2 comes around I'd be very happy to accept a PR or some guidance :).
Once it's working I'll make a proper makefile to build all apps. Or maybe make rg_tool.py just work for SDL2 too. Not sure what's best.