stella icon indicating copy to clipboard operation
stella copied to clipboard

Posibility of merging the latest changes of upstream Stella to Libretro version?

Open saulfabregwiivc opened this issue 1 year ago • 3 comments

Hi there ;)

Just wanting to start playing some Atari 2600 games, but i see the Stella core in RetroArch is not being updated anymore. So i want to kindly ask this: Could you please carry (merge) the latest changes from this upstream repo of Stella to Libretro's fork of Stella?: https://github.com/libretro/stella

Yeah i know i can just grab the official Windows release and play it on PC but i want also a Libretro core since i use RA a lot in some devices, ex. Android, Wii, etc.

Thanks for listening, and keep it up with the development of Stella! :D

saulfabregwiivc avatar Feb 15 '24 16:02 saulfabregwiivc

That is not up to us, but the Libretro team. We can only provide support here.

thrust26 avatar Feb 15 '24 17:02 thrust26

Unless I'm misunderstanding something here, the Stella core is up-to-date in the mainline. So I guess the Github page you've provided is out of date. Retroarch support is directly in src/os/libretro here, and compiles fine along with the other ports.

Now, it doesn't have all the features of mainline Stella, and we would like someone to come along and help with that (as @thrust26 mentions above). But the code in the main Stella version is much newer than from that Github page, and is kept up-to-date as we develop Stella.

sa666666 avatar Feb 15 '24 17:02 sa666666

Thanks for replying.

I'm trying to make my own core of latest upstream Stella for Libretro (RetroArch) for the Wii console from this repo, but unfortunately RetroArch Wii is compiled using an old toolkit (devkitPPC r29-1) and when i try to compile Stella with that toolkit i get those error messages:

C:\Users\ASUS\stella\src\libretro>make platform=wii
/opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++ -I. -I.. -I../libretro -I../emucore -I../emucore/tia -I../common -I../common/audio -I../common/tv_filters  -std=c++14 -fno-rtti -DGIT_VERSION=\"" c5f03f839"\" -mcpu=750 -meabi -mhard-float -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int -DGEKKO -mrvl -O3 -DNDEBUG -fomit-frame-pointer -Wall -W -Wno-unused-parameter  -D__LIB_RETRO__ -DSOUND_SUPPORT -DHAVE_STDINT_H -DHAVE_STRINGS_H -fno-rtti -pedantic -c -o../libretro/libretro.o ../libretro/libretro.cxx
In file included from ../libretro/StellaLIBRETRO.hxx:21:0,
                 from ../libretro/libretro.cxx:15:
../common/bspf.hxx: In function 'int BSPF::compareIgnoreCase(const string&, const string&)':
../common/bspf.hxx:161:45: error: 'strcasecmp' was not declared in this scope
     return strcasecmp(s1.c_str(), s2.c_str());
                                             ^
../common/bspf.hxx: In function 'int BSPF::compareIgnoreCase(const char*, const char*)':
../common/bspf.hxx:169:29: error: 'strcasecmp' was not declared in this scope
     return strcasecmp(s1, s2);
                             ^
../common/bspf.hxx: In function 'bool BSPF::startsWithIgnoreCase(const string&, const string&)':
../common/bspf.hxx:179:59: error: 'strncasecmp' was not declared in this scope
     return strncasecmp(s1.c_str(), s2.c_str(), s2.length()) == 0;
                                                           ^
../common/bspf.hxx: In function 'bool BSPF::startsWithIgnoreCase(const char*, const char*)':
../common/bspf.hxx:187:42: error: 'strncasecmp' was not declared in this scope
     return strncasecmp(s1, s2, strlen(s2)) == 0;
                                          ^
In file included from ../common/tv_filters/NTSCFilter.hxx:25:0,
                 from ../emucore/Console.hxx:42,
                 from ../libretro/StellaLIBRETRO.hxx:24,
                 from ../libretro/libretro.cxx:15:
../common/tv_filters/AtariNTSC.hxx: At global scope:
../common/tv_filters/AtariNTSC.hxx:158:16: error: 'thread' is not a member of 'std'
     unique_ptr<std::thread[]> myThreads;  // NOLINT
                ^~~
../common/tv_filters/AtariNTSC.hxx:158:16: error: 'thread' is not a member of 'std'
../common/tv_filters/AtariNTSC.hxx:158:29: error: template argument 1 is invalid
     unique_ptr<std::thread[]> myThreads;  // NOLINT
                             ^
../common/tv_filters/AtariNTSC.hxx:158:29: error: template argument 2 is invalid
In file included from ../emucore/EventHandler.hxx:33:0,
                 from ../libretro/StellaLIBRETRO.hxx:28,
                 from ../libretro/libretro.cxx:15:
../emucore/Event.hxx:198:18: error: 'mutex' in namespace 'std' does not name a type
     mutable std::mutex myMutex;
                  ^~~~~
../emucore/Event.hxx: In member function 'Int32 Event::get(Event::Type) const':
../emucore/Event.hxx:153:23: error: 'mutex' is not a member of 'std'
       std::lock_guard<std::mutex> lock(myMutex);
                       ^~~
../emucore/Event.hxx:153:23: error: 'mutex' is not a member of 'std'
../emucore/Event.hxx:153:33: error: template argument 1 is invalid
       std::lock_guard<std::mutex> lock(myMutex);
                                 ^
../emucore/Event.hxx:153:40: error: 'myMutex' was not declared in this scope
       std::lock_guard<std::mutex> lock(myMutex);
                                        ^~~~~~~
../emucore/Event.hxx:153:35: warning: unused variable 'lock' [-Wunused-variable]
       std::lock_guard<std::mutex> lock(myMutex);
                                   ^~~~
../emucore/Event.hxx: In member function 'void Event::set(Event::Type, Int32)':
../emucore/Event.hxx:162:23: error: 'mutex' is not a member of 'std'
       std::lock_guard<std::mutex> lock(myMutex);
                       ^~~
../emucore/Event.hxx:162:23: error: 'mutex' is not a member of 'std'
../emucore/Event.hxx:162:33: error: template argument 1 is invalid
       std::lock_guard<std::mutex> lock(myMutex);
                                 ^
../emucore/Event.hxx:162:40: error: 'myMutex' was not declared in this scope
       std::lock_guard<std::mutex> lock(myMutex);
                                        ^~~~~~~
../emucore/Event.hxx:162:35: warning: unused variable 'lock' [-Wunused-variable]
       std::lock_guard<std::mutex> lock(myMutex);
                                   ^~~~
../emucore/Event.hxx: In member function 'void Event::clear()':
../emucore/Event.hxx:172:23: error: 'mutex' is not a member of 'std'
       std::lock_guard<std::mutex> lock(myMutex);
                       ^~~
../emucore/Event.hxx:172:23: error: 'mutex' is not a member of 'std'
../emucore/Event.hxx:172:33: error: template argument 1 is invalid
       std::lock_guard<std::mutex> lock(myMutex);
                                 ^
../emucore/Event.hxx:172:40: error: 'myMutex' was not declared in this scope
       std::lock_guard<std::mutex> lock(myMutex);
                                        ^~~~~~~
../emucore/Event.hxx:172:35: warning: unused variable 'lock' [-Wunused-variable]
       std::lock_guard<std::mutex> lock(myMutex);
                                   ^~~~
make: *** [Makefile:611: ../libretro/libretro.o] Error 1

Any ideas what's causing this, or is my toolchain just so old for be able to compile Stella properly?

I ask it because:

  1. I've saw recently Stella switched to C++ 17.
  2. I don't know in what example but i saw someone made a working build of Stella for the Nintendo Wii as a Libretro (RetroArch) Wii core, in this issue: https://github.com/stella-emu/stella/issues/377

I need some help here. Thanks.

saulfabregwiivc avatar Feb 16 '24 13:02 saulfabregwiivc

This looks like your compiler doesn't support the required level of C++17. Unfortunately, now that the codebase has moved to C++20, it's even less likely to be able to compile on older hardware. So I'm going to close this one, as there's nothing we can do on our end.

sa666666 avatar Jun 12 '24 16:06 sa666666