Commit graph

4,661 commits

Author SHA1 Message Date
LibretroAdmin
9498be27f8
Merge pull request #162 from Clownacy/assorted-compiler-warnings
Silence various compiler warnings.
2026-03-28 21:21:33 +01:00
Clownacy
7bd9645251 Make OpenBIOS a built-in fallback.
Previously, the emulator would mysteriously fail if the user did not
know beforehand to provide a copy of the BIOS. This avoids that
problem, silently and automatically loading a built-in copy of
OpenBIOS, so that the emulator will always do what the user wants:
boot the game.

Closes #153. Requested in #158.
2026-03-28 10:43:30 +00:00
Clownacy
ebd60bc998 Silence various compiler warnings.
Tested with GCC, Clang, and MSVC. All seem to build and run fine.
2026-03-28 10:35:53 +00:00
LibretroAdmin
5b9f9f6cbc
Merge pull request #154 from Clownacy/patch-1
Add missing `#include` to `string_util.h`.
2026-03-28 03:15:06 +01:00
LibretroAdmin
182e563381
Merge pull request #158 from Clownacy/openbios
Add support for OpenBIOS.
2026-03-28 03:14:57 +01:00
LibretroAdmin
0896a9177f
Merge pull request #160 from Clownacy/default-axis-scaling
Change default axis scaling to 1.33x.
2026-03-28 03:14:21 +01:00
Clownacy
8f026d3154 Change default axis scaling to 1.33x.
See #138.
2026-03-12 23:29:25 +00:00
Clownacy
651bc09dbd Remove VRAM dumping.
Completely unused, and pulls-in needless dependencies.
2026-03-12 21:54:32 +00:00
Clownacy
38fe600d3b Use miniz for everything instead of using both miniz and zlib.
Should reduce the size of the executable.
2026-03-12 21:40:45 +00:00
Clownacy
a0656611c9 Update libchdr.
Now uses libchdr's own CMake script instead of a custom one, which
allows for assembly-optimised LZMA decoding on some platforms.

This update also introduces support for Zstandard compression.
2026-03-12 21:17:40 +00:00
Clownacy
71c5f18b15 Add support for OpenBIOS.
Closes libretro#156.
2026-03-12 20:59:28 +00:00
Clownacy
084e4627cd
Add missing #include to string_util.h.
The lack of this was causing a build error when compiling with MSYS2 MinGW Clang x64.

There were other build errors too, but those were caused by `offsetof` somehow not being constexpr, which I imagine is a Clang/MSYS2 bug.
2026-02-08 01:54:45 +00:00
hizzlekizzle
4d309c05fd
reword core option, remove ifdef (#142)
there was an escape character problem before, but I just reworded the whole thing to get rid of the ifdef in the process
2025-08-02 13:58:57 +02:00
Guilherme Janczak
37cd87e14c
only look for BIOS files in the libretro system directory (#122)
Don't look for BIOS files in the same directory as the executable,
instead obey the libretro system directory.

```cpp
 if (!g_retro_environment_callback(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &system_directory) || !system_directory)
   return GetProgramDirectoryRelativePath("system");
```
The code above reads "If we can't get the system directory from
libretro, return a directory named `system` located in the same
directory as the executable containing main()". This code is only used
to look for the path with the BIOS files.

On Unix, If RetroArch is /usr/bin/retroarch (or equivalent), it will try
to look for BIOS files at /usr/bin/system. On Android, non-root programs
will always be unable to look at that directory. Other platforms will
display similarly strange behavior.

This behavior feels more like an accident than an intentional design
choice. This commit removes it and all the code that implements it.
2024-07-24 17:35:00 +02:00
libretroadmin
bc54533f85 Backport cpu_recompiler_code_generator.cpp commit 2024-07-22 02:45:43 +02:00
DarthMew
b17b0e4348 NeGconRumble: Map the analog toggle to the RetroPad select button 2024-07-15 17:13:47 +02:00
DarthMew
b9bbf87254 Backport MDEC: Increase intermediate IDCT precision 2024-07-09 20:25:10 +02:00
DarthMew
db6659b1e9 Merge display hlsl helper files 2024-07-09 16:30:14 +02:00
DarthMew
365e29cf58
Merge pull request #123 from guijan/openbsd
only #include <malloc.h> if it exists
2024-07-08 03:08:13 +02:00
Guilherme Janczak
ef2689f996
only #include <malloc.h> if it exists
This makes more of the compilation process succeed on OpenBSD, but it
still fails.
2024-07-07 23:17:16 +00:00
DarthMew
62e2c5f265 file_system: Remove unused logchannel 2024-07-07 22:57:48 +02:00
DarthMew
d38cdaa3b1
Merge pull request #118 from guijan/mkstemp
A couple of fixes.
2024-07-07 16:30:05 +02:00
DarthMew
0bee3c9ba0
Merge pull request #120 from guijan/musl
linux: switch ftruncate64 for ftruncate
2024-07-07 15:54:44 +02:00
DarthMew
cff104245a
Merge pull request #119 from guijan/enum
avoid out of range enum cast in HostReg
2024-07-07 15:00:02 +02:00
Guilherme Janczak
79108f3955
use __ANDROID__ not ANDROID
ANDROID is defined by the NDK
__ANDROID__ is defined by the compiler.

When compiling for android without the NDK, such as inside Termux,
ANDROID isn't defined.
2024-07-07 08:04:42 +00:00
Guilherme Janczak
9644a1b7fb
linux: switch ftruncate64 for ftruncate
POSIX guarantees that off_t is a signed integer type. It was typically
int32_t on historical versions of implementations. Some kind of
migration is necessary for platforms that started with int32_t, and
glibc did it the worst way possible: 32-bit platforms still default to
32-bit off_t, they added a _FILE_OFFSET_BITS macro to request a specific
size, and you can alternatively call nonstandard versions of standard
functions that work with off_t which use a specific size, these are
typically suffixed with "64" (e.g. ftruncate64, stat64) and work with a
nonstandard off64_t type.

Swanstation gets this confusing situation wrong by both defining
_FILE_OFFSET_BITS=64 and using the nonstandard .*64 functions on Linux.
This works on glibc, but breaks other libcs such as musl. By using the
standard names and letting _FILE_OFFSET_BITS handle the rest on glibc,
the code works on all Linux systems.

Ref: https://www.gnu.org/software/libc/manual/html_node/File-Size.html#index-ftruncate64
2024-07-07 00:01:21 +00:00
Guilherme Janczak
d62a9d2a9f
avoid out of range enum cast in HostReg
In file included from /home/jan/Work/swanstation/src/core/bus.cpp:6:
In file included from /home/jan/Work/swanstation/src/core/cpu_code_cache.h:14:
/home/jan/Work/swanstation/src/core/cpu_recompiler_types.h:70:37: error: integer value 16 is outside the valid range of values [0, 15] for the enumeration type 'Code' [-Wenum-constexpr-conver
sion]
   70 | constexpr HostReg HostReg_Invalid = static_cast<HostReg>(HostReg_Count);
      |                                     ^
2 warnings and 1 error generated.

The code was unspecified behavior in C++ prior to C++17, and was changed
to undefined behavior in C++17. Recent versions of Clang have added a
warning that is treated as an error by default for it, and this commit
fixes compilation on recent Clang.

Ref: https://wiki.sei.cmu.edu/confluence/display/cplusplus/INT50-CPP.+Do+not+cast+to+an+out-of-range+enumeration+value
Ref: https://releases.llvm.org/18.1.4/tools/clang/docs/DiagnosticsReference.html#wenum-constexpr-conversion
2024-07-06 22:01:17 +00:00
Guilherme Janczak
e54ca3a447
only #include <alloca.h> if it exists
This makes compilation succeed on FreeBSD.
2024-07-06 21:15:06 +00:00
Guilherme Janczak
651ff274e4
mkstemp: feature test, fix fd leak and unchecked return 2024-07-06 21:14:42 +00:00
DarthMew
d6f0f687ac
Update number of pads 2 2024-07-06 21:37:05 +02:00
DarthMew
ac0ef93546
Increase number of pads 2024-07-06 21:29:24 +02:00
DarthMew
22050d391c
Update descriptions 2024-07-04 17:43:15 +02:00
DarthMew
83776ae7d3 Implement NeGcon with rumble 2024-07-04 17:29:03 +02:00
DarthMew
0f401e2dee Default to a more compatible fastmem mode 2024-07-03 16:02:20 +02:00
DarthMew
46e39dbd59
Set this to true
Followup to 834a6f1241
2024-07-03 04:02:32 +02:00
DarthMew
834a6f1241 Provide more details regarding MDEC routines 2024-07-03 03:53:32 +02:00
DarthMew
8a999111ff
Remove unnecessary line 2024-06-29 18:00:58 +02:00
DarthMew
24aac046e0 texture_replacements: Use the swanstation folder inside RetroArch's system directory as base for the textures folder 2024-06-28 00:09:42 +02:00
DarthMew
ec7a200c76
Merge pull request #108 from guijan/redundant
remove redundant check for the empty string in filename
2024-06-26 16:16:33 +02:00
DarthMew
092b812725 byte_stream: Remove redundant code 2024-06-26 16:09:49 +02:00
Guilherme Janczak
b6226b61a2
remove redundant check for the empty string in filename
The OS APIs will error in such a case, we don't need to manually look
for this error.
2024-06-25 07:00:23 +00:00
DarthMew
7a27436548 types: __forceinline is for MVSC 2024-05-30 22:13:49 +02:00
DarthMew
0ddd642709
Workaround for older GNU compilers 2024-05-30 18:39:47 +02:00
DarthMew
f2b9a58b8f Exclude until necessary 2024-05-30 17:30:00 +02:00
DarthMew
5f7c7a199b Windows: Allow compiling without Visual Studio 2024-05-29 22:49:19 +02:00
libretroadmin
b4e78fdf68 libchdr updates 2024-05-26 20:45:15 +02:00
libretroadmin
eab1d36201 Use path_is_directory directly 2024-05-24 02:12:10 +02:00
DarthMew
7e0a69028e Move FindFiles out of if statement 2024-05-24 01:37:21 +02:00
libretroadmin
6a0cc4a1cf Use more libretro-common 2024-05-21 14:33:28 +02:00
libretroadmin
805e6407d4 Remove SanitizeFileName 2024-05-21 14:24:00 +02:00