Skip to content

Commit 836a0e1

Browse files
authored
Merge branch 'main' into splash
2 parents cdec82a + e90d74d commit 836a0e1

31 files changed

Lines changed: 452 additions & 148 deletions

.github/scripts/create-app.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ cp pcsx-redux.icns ${APPROOT}/Contents/Resources/AppIcon.icns
4040
# Remove source images that were used to create the app icon.
4141
rm -rfv ${APPROOT}/Contents/Resources/share/icons
4242

43+
# Remove temporary image files
44+
rm -rfv pcsx-redux.iconset pcsx-redux.icns
45+
4346
# Create the required Info.plist and version.plist files
4447
# with the minimum information.
4548
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add CFBundleDisplayName string ${APP}"
@@ -54,6 +57,8 @@ PlistBuddy ${APPROOT}/Contents/Info.plist -c "add CFBundleInfoDictionaryVersion
5457
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add CFBundleName string ${APP}"
5558
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add CFBundlePackageType string APPL"
5659
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add NSHumanReadableCopyright string Copyright PCSX-Redux Authors"
60+
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add LSApplicationCategoryType string public.app-category.games"
61+
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add LSSupportsGameMode bool true"
5762

5863
PlistBuddy ${APPROOT}/Contents/Info.plist -c "add LSMinimumSystemVersion string 10.15"
5964

.github/workflows/linux-aur.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,21 @@ jobs:
1313
image: archlinux:latest
1414
steps:
1515
- name: Install dependencies
16-
run: |
16+
run: |
1717
pacman -Syu --noconfirm --needed capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib git make pkg-config sudo base-devel pacman-contrib
18+
- uses: actions/checkout@v3
19+
with:
20+
set-safe-directory: true
1821
- name: Create builduser
1922
run: |
2023
useradd builduser -m
2124
passwd -d builduser
25+
echo "builduser ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/builduser && chmod 440 /etc/sudoers.d/builduser
2226
- name: Build AUR Package
2327
run: |
24-
git clone https://aur.archlinux.org/pcsx-redux-git.git
25-
chown -R builduser:builduser pcsx-redux-git
26-
cd pcsx-redux-git
27-
sudo -u builduser makepkg
28+
mkdir /build
29+
git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
30+
chown -R builduser:builduser /build
31+
cd /build/pcsx-redux-git
32+
sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
33+
sudo -u builduser bash -c 'makepkg --noconfirm --syncdeps'

.github/workflows/macos-toolchain.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
- uses: n1hility/cancel-previous-runs@v2
2020
with:
2121
token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: install dependencies
23+
run: brew install --verbose nikitabobko/tap/brew-install-path
2224
- name: build mips binutils
23-
run: brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb --debug
25+
run: brew install-path --verbose ./tools/macos-mips/mipsel-none-elf-binutils.rb
2426
- name: build mips gcc
25-
run: brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb --debug
27+
run: brew install-path --verbose ./tools/macos-mips/mipsel-none-elf-gcc.rb
2628
- name: build openbios
2729
run: make -C ./src/mips/openbios

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fb.bat
5858

5959
# macos files
6060
.DS_store
61-
61+
PCSX-Redux.app
6262

6363
# Savestate files
6464
*.sstate

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ You need MacOS Catalina or later with the latest XCode to build, as well as a fe
130130

131131
Compiling OpenBIOS will require a mips compiler, that you can generate using the following commands:
132132
```bash
133-
brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb
134-
brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
133+
brew install nikitabobko/tap/brew-install-path
134+
brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
135+
brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
135136
```
136137

137138
Then, you can compile OpenBIOS using `make -C ./src/mips/openbios`.

src/core/DynaRec_aa64/emitter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class Emitter : public MacroAssembler {
7171
return VirtualProtect(s_codeCache, allocSize, PAGE_EXECUTE_READWRITE, &oldProtect) != 0;
7272
#elif !defined(__APPLE__)
7373
return mprotect(s_codeCache, allocSize, PROT_READ | PROT_WRITE | PROT_EXEC) != -1;
74+
#else
75+
return false;
7476
#endif
7577
}
7678

src/core/DynaRec_aa64/recompiler.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ bool DynaRecCPU::Init() {
6767
PCSX::g_system->message("[Dynarec] Failed to allocate executable memory.\nTry disabling the Dynarec CPU.");
6868
return false;
6969
}
70-
#endif
71-
#if defined(__APPLE__)
70+
#else
7271
gen.setRW(); // M1 wants buffer marked as readable/writable with mprotect before emitting code
7372
#endif
7473
emitDispatcher(); // Emit our assembly dispatcher
@@ -102,8 +101,6 @@ void DynaRecCPU::Shutdown() {
102101
delete[] m_ramBlocks;
103102
delete[] m_biosBlocks;
104103
delete[] m_dummyBlocks;
105-
106-
gen.dumpBuffer(); // dump buffer on shutdown/hard-reset for diagnostics
107104
}
108105

109106
/// Params: A program counter value

src/core/DynaRec_aa64/recompiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ class DynaRecCPU final : public PCSX::R3000Acpu {
237237
virtual void Shutdown() final;
238238
virtual bool isDynarec() final { return true; }
239239

240+
virtual void invalidateCache() override final {
241+
memset(m_regs.iCacheAddr, 0xff, sizeof(m_regs.iCacheAddr));
242+
memset(m_regs.iCacheCode, 0xff, sizeof(m_regs.iCacheCode));
243+
uncompileAll(); // Mark all blocks as uncompiled
244+
}
245+
240246
virtual void SetPGXPMode(uint32_t pgxpMode) final {
241247
if (pgxpMode != 0) {
242248
throw std::runtime_error("PGXP not supported in x64 JIT");

src/core/arguments.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ PCSX::Arguments::Arguments(const CommandLine::args& args) {
3535
if (std::filesystem::exists("pcsx.json")) m_portable = true;
3636
if (std::filesystem::exists(std::filesystem::path("vsprojects") / "pcsx-redux.sln")) m_portable = true;
3737
if (std::filesystem::exists(std::filesystem::path("..") / "pcsx-redux.sln")) m_portable = true;
38+
if (args.get<bool>("no-portable")) m_portable = false;
3839
if (args.get<bool>("safe") || args.get<bool>("testmode") || args.get<bool>("cli")) m_safeModeEnabled = true;
3940
if (args.get<bool>("resetui")) m_uiResetRequested = true;
4041
if (args.get<bool>("noshaders")) m_shadersDisabled = true;

src/mips/openbios/card/device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,9 @@ static const struct Device s_cardDevice = {
632632
.desc = "MEMORY CARD",
633633
.init = (void (*)())psxdummy,
634634
.open = dev_bu_open,
635-
.action = psxdummy,
635+
.action = (int (*)(struct File *, enum FileAction))psxdummy,
636636
.close = dev_bu_close,
637-
.ioctl = psxdummy,
637+
.ioctl = (int (*)(struct File *, int, int))psxdummy,
638638
.read = dev_bu_read,
639639
.write = dev_bu_write,
640640
.erase = dev_bu_erase,

0 commit comments

Comments
 (0)