Commit Graph
2329 Commits
Author SHA1 Message Date
Ryan Houdek 8cf47f8221 Adds support for named rootfs configurations
If the relative or absolute folder doesn't exist then FEX will search in the data folder for a rootFS named the same thing
If the path exists then it is used.

For example if my data folder contains `$HOME/.fex-emu/RootFS/Ubuntu_main/` and I set the RootFS option to `Ubuntu_main`
Then this rootfs will be used. Allows you to easily select a rootfs in that folder without having the full file path.
2021-03-31 23:46:07 -07:00
Ryan Houdek 43b6cc1cb9 Adds GetDataDirectory config helper
This ends up in either $HOME/.fex-emu/ or $XDG_DATA_HOME/.fex-emu/
2021-03-31 23:46:07 -07:00
Ryan Houdek 1ab6726498 Moves Config directory finding to FEXCore
This will be necessary in the next commit
2021-03-31 23:46:07 -07:00
Ryan Houdek c21acd0d45 Merge pull request #916 from Sonicadvance1/fix_execve_again
Fix execve again
2021-03-31 23:45:06 -07:00
Ryan Houdek e637751112 ptrace behaviour is now changed 2021-03-31 23:38:14 -07:00
Ryan Houdek fac6377ed3 Fixes a crash in openat 2021-03-31 23:37:57 -07:00
Ryan Houdek 4f3cb933cb Fixes execve 2021-03-31 23:37:56 -07:00
Ryan Houdek b2825bd848 Adds handler in ELFLoader to determine ELF type. 2021-03-31 23:37:56 -07:00
Ryan Houdek 83eb7f4ad3 Return EPERM in ptrace. A Feral launcher is attempting to use this to ensure it can't ptrace. 2021-03-31 23:37:56 -07:00
Ryan Houdek c3854c211a Fix finding home directory when we have no environment variables. 2021-03-31 23:37:56 -07:00
Ryan Houdek 61cd3eb3ce Fix crash in ELFDB if it tried loading something that wasn't an ELF 2021-03-31 23:37:56 -07:00
Ryan Houdek 490352f568 Merge pull request #921 from Sonicadvance1/update_imgui
Updates external imgui which fixes keypad enter in FEXConfig
2021-03-31 23:24:42 -07:00
Ryan Houdek 761447467e Updates external imgui which fixes keypad enter in FEXConfig 2021-03-30 15:39:11 -07:00
Ryan Houdek 3f38ed94ca Merge pull request #922 from Sonicadvance1/disable_oomscore
Disables gvisor test proc_pid_oomscore_test
2021-03-30 15:38:33 -07:00
Ryan Houdek ad877d4088 Disables gvisor test proc_pid_oomscore_test
Depending on runner this passes or fails.
The test expects to be able to open `/proc/self/oom_score_adj` as writable to adjust the oom score.
This is expected to fail on all three of our runners, but sometimes the solidrun board manages to open it.
Disable as it is a flake. Could be a kernel bug on the solid run board
2021-03-30 15:29:52 -07:00
Ryan Houdek 92fc6b1909 Merge pull request #920 from lioncash/insert
Config: Make lookup map assignment match behavior of comment
2021-03-30 14:17:37 -07:00
Lioncache 4b11dcb72a Config: Make lookup map assignment match behavior of comment
emplace() only performs an insertion or assignment if the key doesn't
already exist within the map, which is at odds with what the comment
above the line indicates should happen.

insert_or_assign() better models what the comment indicates.
2021-03-30 11:51:52 -04:00
Lioncache dd7c78dcd7 Config: Perform lookups by character overloads where applicable
These are marginally better to perform than the string equivalents
2021-03-30 11:41:57 -04:00
Lioncache a20ef403c1 Config: std::move strings within MergeEnvironmentVariables()
Same behavior, minus potential heap duplicate allocations
2021-03-30 11:40:42 -04:00
Ryan Houdek be06511d3d Merge pull request #919 from FEX-Emu/skmp/fix-build
Build: Fix for ubuntu 20.04
2021-03-30 03:20:43 -07:00
Stefanos Kornilios Mitsis Poiitidis b7a60337e8 Build: Fix for ubuntu 20.04 2021-03-30 13:08:19 +03:00
Stefanos Kornilios Mitsis Poiitidis 315b8e9c1e Merge pull request #917 from FEX-Emu/skmp/lightweight-docs-3
Docs: Add tags, unittest Readme.md, generated SourceOutline.md
2021-03-30 12:52:18 +03:00
Ryan Houdek 155a2b0194 Merge pull request #918 from lioncash/fallthrough
CMakeLists: Flag unannotated implicit fallthrough as an error
2021-03-30 02:37:07 -07:00
Stefanos Kornilios Mitsis Poiitidis 8c874f4540 Docs: Commit generated SourceOutline.md, update Readme.md 2021-03-30 12:21:18 +03:00
Stefanos Kornilios Mitsis Poiitidis 942b8549c6 Docs: Add tags to the source code 2021-03-30 12:21:18 +03:00
Ryan Houdek fa577b4527 Merge pull request #910 from FEX-Emu/skmp/lightweight-docs
Docs: lightweight doc autogen
2021-03-30 02:17:41 -07:00
Stefanos Kornilios Mitsis Poiitidis 15537f8c8c Scripts: Also add unittests folder for doc outline 2021-03-30 11:58:18 +03:00
Lioncache 434a74a88a CMakeLists: Flag unannotated implicit fallthrough as an error
Prevents a class of sneaky logic bugs from slipping through into the
codebase.

This also resolves a case of such a bug within the Decorder's ReadData()
where all 3 byte reads would be performed as if they were a 4 byte read.
2021-03-30 04:56:12 -04:00
Stefanos Kornilios Mitsis Poiitidis 1fdd6fbb14 Scripts: Add a documentation comment in changelog_generator.py 2021-03-30 11:55:39 +03:00
Stefanos Kornilios Mitsis Poiitidis 458bebf598 Scripts: Add a documentation comment in doc_outline_generator.py 2021-03-30 11:53:11 +03:00
Stefanos Kornilios Mitsis Poiitidis 2b10b9792b Scripts: Fix generate_release, don't use markdown for changelogs 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis 0dd02da57c Docs: Update outline scripts 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis 309139e203 Scripts: Add generate_release script 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis 350c33ada4 Docs: Update outline script 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis bdd35e5743 docs: Update outline generator 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis ceb7082e37 Docs/Versioning: Add Changelog Generator 2021-03-30 11:23:00 +03:00
Stefanos Kornilios Mitsis Poiitidis 2d6dc80039 Docs: Adds tag-based outline generator w/ glossary support 2021-03-30 11:22:56 +03:00
Ryan Houdek c92df21627 Merge pull request #915 from lioncash/fallthrough
OpcodeDispatcher: Add missing break for UD2 in INTOp()
2021-03-29 22:56:19 -07:00
Lioncache 539de0492e OpcodeDispatcher: Add missing break for UD2 in INTOp()
Fixes a case where the reason gets overwritten.
2021-03-29 23:42:26 -04:00
Ryan Houdek efd41de8ea Merge pull request #914 from lioncash/optional
Context: Make use of std::optional with GetFilenameHash()
2021-03-29 16:44:08 -07:00
Lioncache 99ae862875 Context: Eliminate undefined behavior in LoadEntryList()
This breaks the strict-aliasing rule. We can use std::memcpy here to
make this code well-defined.
2021-03-29 12:17:36 -04:00
Lioncache b81ea43601 Context: Make use of std::optional with GetFilenameHash()
Same behavior, minus the need for an out parameter. While we're at it,
we can tidy up some of the file handling code.
2021-03-29 12:17:32 -04:00
Ryan Houdek fcd4974cff Merge pull request #912 from Sonicadvance1/config_docs_improvements
Configuration option improvements
2021-03-29 04:47:45 -07:00
Stefanos Kornilios Mitsis Poiitidis 8550c9f2dd Merge pull request #913 from Sonicadvance1/fix_32bit_mask
Adds a 32-bit mask for multiblock RIP calculation
2021-03-29 14:35:32 +03:00
Ryan Houdek 15dd70487f Removes legacy difference between FEX config env variable and enum names 2021-03-29 00:26:11 -07:00
Ryan Houdek 8fad0c8fdb Adds a 32-bit mask for multiblock RIP calculation
In the case of overflow then it'll just mask this result.
The rest of the logic already matches what 32-bit expects.

Fixes #703
2021-03-28 23:39:53 -07:00
Ryan Houdek b6c0a9f2a0 Configuration option improvements
This commit does three things that are bounded to each other
1) Moves configs from ConfigValues.inl to Config.json
2) Uses the json to generate a man file with the options inside of it
3) Generates the code required for FEXLoader to automatically parse defined options

Moving the configuration options to a parseable format was required to generate the man pages.
Can't really include an inl file in the man page
Man page gets generated and installed through the regular cmake install process
`man FEX` to get the man page

With this change, FEXLoader's argument parsing now will automatically be generated from the json.
This way whatever is in the json file matches what is in the man page, in the json, AND what is returned in FEXLoader --help.
It will stay in sync now.

FEXConfig is the only application that stays out of sync for now as it requires some more thought to plan out.

A minor improvement that this brings as well is that every boolean option that has a long argument also gains the inversion of that property.
aka, `--gdb` also gains `--no-gdb` The use case for this is minor but boolean arguments should always allow negated variants.
2021-03-28 23:28:41 -07:00
Ryan Houdek b5a6dd031b Merge pull request #911 from Sonicadvance1/std_size_life
Replaces FEX's usage of classic C array element count with std::size
2021-03-28 05:58:55 -07:00
Ryan Houdek 650877adca Replaces FEX's usage of classic C array element count with std::size
Just learned that this is a c++17 feature and it's a nice little
cleanup.

Only one remains in our codebase which can't easily be replaced
2021-03-28 05:39:35 -07:00
Ryan Houdek 432b6fccf2 Merge pull request #907 from Sonicadvance1/replace_glfw
Replaces FEXConfig usage of GLFW with SDL2
2021-03-27 05:53:00 -07:00