Code Monkey home page Code Monkey logo

sdlretro's Introduction

sdlretro

This is a lightweight libretro frontend written for SDL, aims to write simple codes that are easy to maintain, and optimize performance on retro devices like GCW-Zero and RG-350.

Build

  • Use CMake 3.0 or later to build the project
  • SDL 1.x and FreeType are requrired, and all platforms that supported by SDL 1.x(in window mode or fbdev IPU scaling) and FreeType should be supported as well
  • for GCW-Zero/RG350:
    1. create build folder and run cmake -DCMAKE_BUILD_TYPE=Release -DMODEL=gcw0 .. in it
    2. run make to build the binary
    3. run ./make_opk.sh in folder opk to build Lite Version
    4. or create a folder cores in opk and put all core files into the folder, then run FULL=1 ./make_opk.sh to build Full Version

Installation for GCW-Zero/RG350

  • Full version: Just copy sdlretro-full.opk to app folder
  • Lite version: Copy sdlretro.opk to app folder, create /media/data/local/home/.sdlretro/cores and put core files in the directory.

Run

  • Select game rom to run, if rom file type is supported more than one core, a core selection menu is popup first.
  • Rom in zip is supported if there are no more than 2 files (one rom file and one dir/readme) in the zip. If the core does not support in-memory rom load, the rom in zip will be extracted to .sdlretro/tmp and removed on exit.
  • Use power-flick to enter menu.

CREDITS

sdlretro's People

Contributors

soarqin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sdlretro's Issues

[SDLRetro][FunKey S] Newer API calls make the app crash

Hardware: FunKey S (SoC V3s ARM Cortex A7-A clocked @ 1.2GHz)
Software: sdlretro for the frontent (https://github.com/FunKey-Project/sdlretro) and FBNeo 1.0.0.03 for the Libretro core (compiled from last b7bebfe).

Newer API calls make the app crash without any notice. SDLRetro does not seem to handle them well.

I can't launch any game from FBNeo, even if the CRCs match perfectly the ones in https://github.com/libretro/FBNeo/tree/master/dats. All it does is bringing me back to the desktop (GMenu2X). Windows port works fine with 1.0.0.02 roms (this port has not been released in 1.0.0.03 yet so I can't compare with the exact same romset).

Here is the only error message I get in GMenu2X logs:
[07-05 08:36:26 I] Unhandled env: 0x22
[07-05 08:36:26 I] Unhandled env: 0x3E

Here is the discussion about it: libretro/FBNeo#818

build (mac) issues

On mac (M1, OSX 12.3) I get this:

/Users/konsumer/Desktop/sdlretro/src/libretro/vfs_unix.cpp:73:16: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
   auto off = lseek64(stream->file_handle, 0, SEEK_CUR);
              ^~~~~~~
              lseek
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:465:8: note: 'lseek' declared here
off_t    lseek(int, off_t, int);
        ^
/Users/konsumer/Desktop/sdlretro/src/libretro/vfs_unix.cpp:74:16: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
   auto res = lseek64(stream->file_handle, 0, SEEK_END);
              ^~~~~~~
              lseek
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:465:8: note: 'lseek' declared here
off_t    lseek(int, off_t, int);
        ^
/Users/konsumer/Desktop/sdlretro/src/libretro/vfs_unix.cpp:75:5: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
   lseek64(stream->file_handle, off, SEEK_SET);
   ^~~~~~~
   lseek
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:465:8: note: 'lseek' declared here
off_t    lseek(int, off_t, int);
        ^
/Users/konsumer/Desktop/sdlretro/src/libretro/vfs_unix.cpp:84:12: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
   return lseek64(stream->file_handle, 0, SEEK_CUR);
          ^~~~~~~
          lseek
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:465:8: note: 'lseek' declared here
off_t    lseek(int, off_t, int);
        ^
/Users/konsumer/Desktop/sdlretro/src/libretro/vfs_unix.cpp:88:12: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
   return lseek64(stream->file_handle, offset, seek_position);
          ^~~~~~~
          lseek
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:465:8: note: 'lseek' declared here
off_t    lseek(int, off_t, int);

I fixed with this:

sed -i -e 's/lseek64/lseek/g' src/libretro/vfs_unix.cpp

Then I got this error, whcih I dunno how to fix:

[  5%] Built target cpuid
[ 18%] Built target spdlog
[ 22%] Built target xxhash
Consolidate compiler generated dependencies of target libretro
[ 24%] Building CXX object src/libretro/CMakeFiles/libretro.dir/vfs_unix.cpp.o
[ 25%] Linking CXX static library liblibretro.a
[ 41%] Built target libretro
[ 50%] Built target samplerate
[ 53%] Built target stb
[ 65%] Built target driver_common
[ 68%] Built target glad
[ 79%] Built target driver_sdl2
[ 89%] Built target gui
[ 93%] Built target miniz
[ 94%] Linking CXX executable sdlretro
[ 96%] Built target sdlretro
[ 98%] Building C object src/external/wingetopt/CMakeFiles/wingetopt.dir/getopt.c.o
In file included from /Users/konsumer/Desktop/sdlretro/src/external/wingetopt/getopt.c:55:
/Users/konsumer/Desktop/sdlretro/src/external/wingetopt/include/getopt.h:16:10: fatal error: 'crtdefs.h' file not found
#include <crtdefs.h>
         ^~~~~~~~~~~
1 error generated.
make[2]: *** [src/external/wingetopt/CMakeFiles/wingetopt.dir/getopt.c.o] Error 1
make[1]: *** [src/external/wingetopt/CMakeFiles/wingetopt.dir/all] Error 2
make: *** [all] Error 2

data folder missing

when installed on an rg350, a ".sdlretro" folder is expected in /usr/local/home/ however the emulator doesn't create this folder on it's own. This means things like saving don't immediately work correctly. Everything works as expected if the folder is manually made however.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.