diff --git a/.github/workflows/Orbis474.yml b/.github/workflows/Orbis474.yml
deleted file mode 100644
index 1a78b9d8..00000000
--- a/.github/workflows/Orbis474.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis474
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 make clean
- # 4.74 Support
- - name: make 4.74 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 MIRA_CHECKS=TRUE make
- - name: make 4.74 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 ADD_GIT_HASH=TRUE MIRA_CHECKS=TRUE make
- - name: Upload 4.74 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_474.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_474.bin
- - name: Upload 4.74 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_474.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_474.elf
diff --git a/.github/workflows/Orbis501.yml b/.github/workflows/Orbis501.yml
deleted file mode 100644
index 16cb6423..00000000
--- a/.github/workflows/Orbis501.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis501
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 make clean
- # 5.01 Support
- - name: make 5.01 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 MIRA_CHECKS=TRUE make
- - name: make 5.01 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 ADD_GIT_HASH=TRUE MIRA_CHECKS=TRUE make
- - name: Upload 5.01 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_501.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_501.bin
- - name: Upload 5.01 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_501.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_501.elf
diff --git a/.github/workflows/Orbis503.yml b/.github/workflows/Orbis503.yml
deleted file mode 100644
index 745fab14..00000000
--- a/.github/workflows/Orbis503.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis503
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 make clean
- # 5.03 Support
- - name: make 5.03 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 MIRA_CHECKS=TRUE make
- - name: make 5.03 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_503 ADD_GIT_HASH=TRUE MIRA_CHECKS=TRUE make
- - name: Upload 5.03 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_503.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_503.bin
- - name: Upload 5.03 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_503.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_503.elf
diff --git a/.github/workflows/Orbis505.yml b/.github/workflows/Orbis505.yml
deleted file mode 100644
index 9cfa6981..00000000
--- a/.github/workflows/Orbis505.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis505
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 make clean
- # 5.05 Support
- - name: make 5.05 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 MIRA_CHECKS=TRUE make
- - name: make 5.05 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 ADD_GIT_HASH=TRUE MIRA_CHECKS=TRUE make
- - name: Upload 5.05 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_505.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_505.bin
- - name: Upload 5.05 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_505.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_505.elf
diff --git a/.github/workflows/Orbis620.yml b/.github/workflows/Orbis620.yml
deleted file mode 100644
index d5ce193d..00000000
--- a/.github/workflows/Orbis620.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis620
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 make clean
- # 6.20 Support
- - name: make 6.20 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 MIRA_CHECKS=TRUE make
- - name: make 6.20 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 MIRA_CHECKS=TRUE make
- - name: Upload 6.20 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_620.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_620.bin
- - name: Upload 6.20 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_620.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_620.elf
diff --git a/.github/workflows/Orbis672.yml b/.github/workflows/Orbis672.yml
deleted file mode 100644
index 930f8045..00000000
--- a/.github/workflows/Orbis672.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Orbis672
-
-on:
- push:
- branches: [ master, develop ]
- pull_request:
- branches: [ master, develop ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- # Checkout the repository
- - uses: actions/checkout@v2
- # Install required stuff needed to build Mira
- - name: preinstall
- run: sudo apt install build-essential git clang lldb clang-tidy clang-tools cppcheck
- # Handle loader crap
- - name: create loader directories
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 make create
- - name: clean loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 make clean
- - name: create mira directories
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 make create
- - name: clean mira
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 make clean
- # 6.72 Support
- - name: make 6.72 loader
- run: cd loader; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 MIRA_CHECKS=TRUE make
- - name: make 6.72 elf
- run: cd kernel; MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 ADD_GIT_HASH=TRUE MIRA_CHECKS=TRUE make
- - name: Upload 6.72 loader
- uses: actions/upload-artifact@v2
- with:
- name: MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_672.bin
- path: loader/build/MiraLoader_Orbis_MIRA_PLATFORM_ORBIS_BSD_672.bin
- - name: Upload 6.72 elf
- uses: actions/upload-artifact@v2
- with:
- name: Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_672.elf
- path: kernel/build/Mira_Orbis_MIRA_PLATFORM_ORBIS_BSD_672.elf
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 00000000..34240092
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,80 @@
+name: C/C++ CI
+
+on: [push]
+
+jobs:
+ build-ubuntu:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Set up Clang
+ uses: egor-tensin/setup-clang@v1
+ with:
+ version: 13
+ platform: x64
+ - uses: actions/checkout@v1
+ - name: Install Pre-Reqs
+ run: sudo apt update && sudo apt install lld
+ - name: Download and install OOSDK
+ run: mkdir /home/runner/toolchain && pushd /home/runner/toolchain && wget https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/releases/download/v0.5.2/v0.5.2.tar.gz && tar -zxvf v0.5.2.tar.gz && mv OpenOrbis/PS4Toolchain/* /home/runner/toolchain && rm -rf OpenOrbis && export OO_PS4_TOOLCHAIN=/home/runner/toolchain && echo "OO_PS4_TOOLCHAIN=/home/runner/toolchain" >> $GITHUB_ENV && popd
+ #- name: configure176
+ # run: export MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_176 && mkdir build176 && cd build176 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_176 -G "Unix Makefiles" .. && cd ..
+ #- name: configure405
+ # run: mkdir build405 && cd build405 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_405 -G "Unix Makefiles" .. && cd ..
+ #- name: configure455
+ # run: mkdir build455 && cd build455 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_455 -G "Unix Makefiles" .. && cd ..
+ #- name: configure474
+ # run: mkdir build474 && cd build474 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_474 -G "Unix Makefiles" .. && cd ..
+ #- name: configure501
+ # run: mkdir build501 && cd build501 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501 -G "Unix Makefiles" .. && cd ..
+ #- name: configure505
+ # run: mkdir build505 && cd build505 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505 -G "Unix Makefiles" .. && cd ..
+ #- name: configure620
+ # run: mkdir build620 && cd build620 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_620 -G "Unix Makefiles" .. && cd ..
+ #- name: configure650
+ # run: mkdir build650 && cd build650 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_650 -G "Unix Makefiles" .. && cd ..
+ - name: configure672
+ run: mkdir build672 && cd build672 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_672 -G "Unix Makefiles" .. && cd ..
+ #- name: configure755
+ # run: mkdir build755 && cd build755 && cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DMIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_755 -G "Unix Makefiles" .. && cd ..
+ #- name: build176
+ # run: cmake --build build176
+ #- name: build405
+ # run: cmake --build build405
+ #- name: build455
+ # run: cmake --build build455
+ #- name: build474
+ # run: cmake --build build474
+ #- name: build501
+ # run: cmake --build build501
+ #- name: build505
+ # run: cmake --build build505
+ #- name: build620
+ # run: cmake --build build620
+ #- name: build650
+ # run: cmake --build build650
+ - name: build672
+ run: cmake --build build672
+ #- name: build755
+ # run: cmake --build build755
+ - name: upload mira binaries
+ uses: actions/upload-artifact@v2
+ with:
+ name: Binaries
+ path: |
+ build176/loader/loader.bin
+ build405/loader/loader.bin
+ build455/loader/loader.bin
+ build474/loader/loader.bin
+ build501/loader/loader.bin
+ build505/loader/loader.bin
+ build620/loader/loader.bin
+ build650/loader/loader.bin
+ build672/loader/loader.bin
+ build672/example_trainer/example_trainer.prx
+ build672/tests/tests.EBOOT.BIN
+ build672/daemon/daemon.prx
+ build672/mira_module/mira_module.prx
+ build755/loader/loader.bin
+
diff --git a/.gitignore b/.gitignore
index ecc8bc13..97fc952d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,6 @@ project.log
report.tasks
strace_out
maneja/**
+.vscode/*
+*.prx
+*.oprx
\ No newline at end of file
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
deleted file mode 100644
index 15a6f4ca..00000000
--- a/.vscode/c_cpp_properties.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "configurations": [
- {
- "name": "Mira",
- "includePath": [
- "${workspaceFolder}/kernel/**",
- "${workspaceFolder}/kernel/src",
- "${workspaceFolder}/external/freebsd-headers/include",
- "${workspaceFolder}/external"
- ],
- "defines": [
- "_KERNEL",
- "MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505",
- "__LP64__=1",
- "_M_X64",
- "__amd64__",
- "_DEBUG",
- "__BSD_VISIBLE",
- "__FreeBSD__",
- "FLATCC_USE_GENERIC_ALIGNED_ALLOC",
- "MIRA_UNSUPPORTED_PLATFORMS"
- ],
- "compilerPath": "/usr/bin/clang",
- "cStandard": "c11",
- "cppStandard": "c++11",
- "intelliSenseMode": "clang-x64"
- },
- {
- "name": "MiraLoader",
- "includePath": [
- "${workspaceFolder}/kernel/**",
- "${workspaceFolder}/loader",
- "${workspaceFolder}/external/freebsd-headers/include"
- ],
- "defines": [
- "_KERNEL",
- "MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_505",
- "__LP64__=1",
- "_M_X64",
- "__amd64__",
- "_DEBUG",
- "__BSD_VISIBLE",
- "__FreeBSD__",
- "MIRA_UNSUPPORTED_PLATFORMS"
- ],
- "compilerPath": "/usr/bin/clang",
- "cStandard": "c11",
- "cppStandard": "c++11",
- "intelliSenseMode": "clang-x64"
- },
- {
- "name": "Daemon",
- "includePath": [
- "${workspaceFolder}/daemon/src",
- "${env:OO_PS4_TOOLCHAIN}/include",
- "${env:OO_PS4_TOOLCHAIN}/include/c++/v1",
- "${workspaceFolder}/daemon/src/External/include"
- ],
- "defines": [
- "_DEBUG",
- "PS4",
- "__FreeBSD__",
- "__BSD_VISIBLE"
- ],
- "compilerPath": "/usr/bin/clang++",
- "cStandard": "c11",
- "cppStandard": "c++14",
- "intelliSenseMode": "clang-x64"
- },
- {
- "name": "Maneja",
- "includePath": [
- "${workspaceFolder}/maneja/Source/**",
- "${env:OO_PS4_TOOLCHAIN}/include",
- "${env:OO_PS4_TOOLCHAIN}/include/c++/v1"
- ],
- "defines": [
- "_DEBUG",
- "PS4"
- ],
- "compilerPath": "/usr/bin/clang++",
- "cStandard": "c11",
- "cppStandard": "c++14",
- "intelliSenseMode": "clang-x64"
- }
- ],
- "version": 4
-}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 6deec11c..00000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "type": "lldb",
- "request": "launch",
- "name": "Launch",
- "program": "${workspaceFolder}/maneja/Build/maneja_pc.elf",
- "args": [],
- "cwd": "${workspaceFolder}/maneja"
- }
- ]
-}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index c670b9a5..00000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "version": "2.0.0",
- "options": {
- "env": {
- "platform": "MIRA_PLATFORM_ORBIS_BSD_505",
- "checks": ""
- }
- },
- "tasks": [
- {
- "label": "Build Mira",
- "type": "shell",
-
- "command": "MIRA_PLATFORM=$platform make clean;MIRA_PLATFORM=$platform make create;MIRA_PLATFORM=$platform MIRA_CHECKS=$checks pvs-studio-analyzer trace -- make",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/kernel"
- },
- "dependsOn": [ "Build MiraLoader" ]
- },
- {
- "label": "Build MiraLoader",
- "type": "shell",
- "command": "MIRA_PLATFORM=$platform make clean;MIRA_PLATFORM=$platform make create;MIRA_PLATFORM=$platform MIRA_CHECKS=$checks make",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/loader"
- }
- },
- {
- "label": "Build protobuf files",
- "type": "shell",
- "command": "python3 ./scripts/build_proto.py --inputDir=./external",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ]
- },
- {
- "label": "Build Flatbuffers",
- "type": "shell",
- "command": "flatc --cpp rpc.fbs; flatc --cpp filemanager.fbs",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/daemon/src/External/flatbuffers"
- }
- },
- {
- "label": "Build Daemon",
- "type": "shell",
- "command": "make clean; make",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/daemon"
- }
- },
- {
- "label": "Build Maneja (PC)",
- "type": "shell",
- "command": "make pc",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/maneja"
- }
- },
- {
- "label": "Build Maneja (PS4)",
- "type": "shell",
- "command": "make ps4",
- "group": "build",
- "problemMatcher": [
- "$gcc"
- ],
- "options": {
- "cwd": "${workspaceFolder}/maneja"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..d35aa8ab
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,92 @@
+cmake_minimum_required(VERSION 3.20)
+
+# Set verbosity
+set(CMAKE_VERBOSE_MAKEFILE OFF)
+
+# set the project name
+project(mira-project)
+
+# Set the firmware version
+if (MIRA_PLATFORM)
+else()
+ message("MIRA_PLATFORM not defined, defaulting to 672")
+ set(MIRA_PLATFORM MIRA_PLATFORM_ORBIS_BSD_672)
+endif()
+
+if (NOT "" STREQUAL "$ENV{MIRA_PLATFORM}")
+ message("overriding build by environment variable for MIRA_PLATFORM=$ENV{MIRA_PLATFORM}")
+ set(MIRA_PLATFORM $ENV{MIRA_PLATFORM})
+endif()
+
+# Display some output to the user
+message("Configuring for MIRA_PLATFORM=${MIRA_PLATFORM}")
+
+# Enable static analysis checking
+set(MIRA_CHECKS False)
+set(OOSDK_FOUND False)
+
+
+# mira-project's required build order
+# There are dependencies that require certain things to be pre-built
+#
+# /kernel
+# - Dep: trainer_loader
+#
+# /loader
+# - Dep: kernel
+#
+# /mira_module (OOSDK dep, none local)
+# /daemon (OOSDK dep, none local)
+
+# If we have MIRA_CHECKS on our environment variable, then we enable it in CMAKE
+if (EXISTS "$ENV{MIRA_CHECKS}")
+ set(MIRA_CHECKS True)
+endif()
+
+# If the OO_PS4_TOOLCHAIN environment variable is found, set a CMake variable with the same name
+if (EXISTS "$ENV{OO_PS4_TOOLCHAIN}")
+ set(OO_PS4_TOOLCHAIN $ENV{OO_PS4_TOOLCHAIN})
+ set(OOSDK_FOUND True)
+endif()
+
+# Spit out a message if we have static analysis enabled
+if (MIRA_CHECKS EQUAL True)
+ message("MIRA_CHECKS is enabled, enabling static analysis.")
+endif()
+
+# Check to see if we found the OpenOrbis Toolchain
+if (EXISTS "$ENV{OO_PS4_TOOLCHAIN}")
+ message("OpenOrbis SDK found, building extra libraries...")
+
+ # Build the userland common module which gets injected into each process
+ add_subdirectory(mira_module)
+
+ # Trainer example
+ add_subdirectory(example_trainer)
+
+ # Make mira_module a dependency of example_trainer
+ add_dependencies(example_trainer mira_module)
+
+ # Build the daemon
+ add_subdirectory(daemon)
+
+ # Make the standalone tests
+ add_subdirectory(tests)
+else()
+ message("OpenOrbis SDK is not found, extra libraries is skipped ...")
+endif()
+
+# This is required for all other steps to succeeed
+add_subdirectory(trainer_loader)
+
+# Kernel depends on trainer_loader
+add_subdirectory(kernel)
+
+# Make trainer_loader a dependency of kernel
+add_dependencies(kernel trainer_loader)
+
+# Loader depends on kernel
+add_subdirectory(loader)
+
+# Make kernel a dependency of loader
+add_dependencies(loader kernel)
diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md
new file mode 100644
index 00000000..e735f043
--- /dev/null
+++ b/CONTRIBUTION.md
@@ -0,0 +1,18 @@
+Shamelessly Stolen and Modified from RPCS3's Repo: https://github.com/RPCS3/rpcs3/wiki/coding-style
+
+We recommend to follow these guidelines when writing code for Mira-Project. They aren't very strict rules since we want to be flexible and we understand that under certain circumstances some of them can be counterproductive. Just try to follow as many of them as possible:
+
+### General coding style
+* Variable naming: *Prefix + CamelCase*
+ * Globals: _g__*
+ * Class members: _m__*
+ * Scoped: _s__*
+ * Looped: _l__*
+ * Constants: _c__*
+* Template parameter names: *CamelCase*, or just T, U, V...
+* Avoid `#defines`, use constant variables instead, preferrably in an enum class.
+* Put curly-brackets (`{` and `}`) on the next line.
+* Eliminate all compiler warnings from your code.
+* Comment *every* hack you do, *every* snippet you comment out and *every* improvable code.
+* If you have to comment or place a commented code snippet, include the reasons to do that in the comment.
+* Ensure that every source file you modify has the newline at the end of file. Every line ends with "newline" and the end of file must have "newline" too, GitHub usually warns about it.
\ No newline at end of file
diff --git a/CppCheckSuppressions.txt b/CppCheckSuppressions.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..808c04b8
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
+FROM ubuntu:focal
+
+# Version to build
+ENV MIRA_PLATFORM MIRA_PLATFORM_ORBIS_BSD_672
+
+# Install key
+RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
+
+# Install dependencies
+RUN apt-get -qq update && \
+ apt-get install -qqy --install-recommends \
+ ca-certificates \
+ autoconf automake cmake dpkg-dev file git make patch \
+ libc-dev libc++-dev libgcc-10-dev libstdc++-10-dev \
+ dirmngr gnupg2 lbzip2 wget xz-utils libtinfo5 clang-13 lldb-13 lld-13 git tar && \
+ rm -rf /var/lib/apt/lists/*
+
+# TODO: Prep OOSDK Toolchain
+RUN mkdir /toolchain && cd /toolchain && wget https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/releases/download/v0.5.2/v0.5.2.tar.gz && \
+ tar -zxvf v0.5.2.tar.gz && mv OpenOrbis/PS4Toolchain/* /toolchain && rm -rf /toolchain/OpenOrbis && \
+ export OO_PS4_TOOLCHAIN=/toolchain
+
+# Build Mira
+RUN export MIRA_PLATFORM=${MIRA_PLATFORM} && mkdir /build && cd /build && \
+ git clone https://github.com/kiwidoggie/mira-project.git && \
+ /usr/local/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DMIRA_PLATFORM=${MIRA_PLATFORM} -H/build/mira-project -B/build/mira-project/build -G "Unix Makefiles" \
+ /usr/local/bin/cmake --build /build/mira-project --config Debug --target clean -j 34 --
\ No newline at end of file
diff --git a/README.md b/README.md
index f6e7d2e2..5df760ae 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
The Mira Project is a set of tools that grants you more power and control over your jailbroken Playstation 4. It is the result of all the hard work by the OpenOrbis team.
-It works differently to the custom firmware experience on Playstation 3, where CFW would be installed on the system via modified PUP files (e.g. Rebug), however once the framework is installed and ran it gives users the same functionality they were previously used to.
+It works differently to the custom firmware experience on Playstation 3, where CFW would be installed on the system via modified PUP files (e.g. Rebug), however once the framework is installed and ran it gives users the same functionality they were previously used to. This can be installed by exploiting specififc system applications to load the kernel exploit and load Mira (Persistence Boot), as well as being ran from WebKit.
If you would like to contribute join us on [Open Orbis Discord], it is the only location where you can find the official project.
@@ -15,84 +15,54 @@ If you would like to contribute join us on [Open Orbis Discord], it is the only
|5.01|![](https://github.com/OpenOrbis/mira-project/workflows/Orbis501/badge.svg)|
|5.03|![](https://github.com/OpenOrbis/mira-project/workflows/Orbis503/badge.svg)|
|5.05|![](https://github.com/OpenOrbis/mira-project/workflows/Orbis505/badge.svg)|
-|6.20|WIP|
+|6.20|![](https://github.com/OpenOrbis/mira-project/workflows/Orbis620/badge.svg)|
|6.72|![](https://github.com/OpenOrbis/mira-project/workflows/Orbis672/badge.svg)|
+|7.00|WIP|
+|7.55|WIP|
-# New Features!
+# Current Features
+## Kernel
- Homebrew Enabler (HEN)
+ - Trainer Support (Thanks theorywrong)
+ - Device driver for kernel extensions
+
+## Daemon
+ - RPC
+ - Debugger
+ - File Manager
+
+## Loader
+ - All modules are embedded into the loader
+
+# Planned Features
+
+## Kernel
- Emulated Registry (EmuReg)
- Emulated NVS (EmuNVS)
- Kernel Debugger
- Remote GDB
- System-level FUSE implementation (Experimental, WIP)
- - Load sprx modules + IAT + Function Hooking (Thanks theorywrong)
+ - Kernel Soft Reboot
+ - FakeDex Support
+ - Linux loader
-You can also:
+## Daemon
- Mount and decrypt local gamesaves (Thanks ChendoChap) (WIP)
- - Transfer files to and from the harddrive
- - Implement your own kernel plugins (RPC using protobuf)
- - Implement your own userland trainers (hooks included!)
- - Dump your HDD encryption keys
- - A bunch of other stuff
+ - Implement your own dynamically loaded plugins (RPC using protobuf)
+ - Substitute hooking library
+ - Dumping per-console keys
+ - Update Removal
+ - Game dumping and decryption
+ - Remote registry
+ - Remote NVS
-### Contributors
+## Trainers
+ - SpoofNP (Fake NP for LAN usage)
-This project would not be possible without these people (no paticluar order):
+# Installation
-* [kiwidog] - Developer
-* [SpecterDev] - Developer
-* [flatz] - Developer (Code, writeups, non-stop help we <3 u flatz)
-* [CrazyVoid] - Developer (Loader/self/SDK help, overall general help, OO moderator)
-* [theorywrong] - Developer (Substitute, OverlayFS, general)
-* [SiSTR0] - Developer (HEN support, general)
-* [SocraticBliss] - Developer (HEN support, general)
-* [valentinbreiz] - Developer (Mira Companion App v1)
-* [Seremo] - Developer (Mira Companion App v2, Log plugin)
-* [Al-Azif] - Developer (5.05 lead maintainer, general)
-* [z80] - Developer (5.05 maintainer)
-* [balika011] - Developer (Fixing userland elf loader entry point, general developer)
-* [Zer0xFF] - Developer (OverlayFS, general)
-* [CelesteBlue] - Developer (Bugfixes, plugins)
-* [Joonie] - Developer (Offsets porting 5.01/5.05)
-* [AlexAltea] - Low level and kernel help (go check out [Orbital Emulator])
-* [qwertyoruiop] - Security (4.55-5.05 kernel exploits)
-* CTurt - Security (Initial payload PS4 SDK and 1.76 kernel exploit)
-* [m0rph3us1987] - Developer (Code examples, kernel SDK, overall general help)
-* [eeply] - Developer (UART)
-* [zecoxao] - RE (4.74 Port)
-* [aerosoul] - Developer (Everything elf related, loaders, etc)
-* [maxton] - Developer (Everything pkg related, etc)
-* [ChendoChap] - RE (Bug hunting, general kernel help)
-* [sugarleaf] - Initial 4.55 private exploit, inital help with Mira dev (retired/left)
-* [kozarovv] - RE (4.05 offsets)
-* [LM] - RE (Research on System-Library-Loading), assembler and linker script help
-* [TheFlow] - RE
-* [samsepi0l] - Offset Porting
-* [xvortex] - Original VTX-Hen
-* [2much4u] - Ptrace patches
-* [golden] - Ptrace patches, rpc ideas
-* [idc] - Developer
-* [lordfriky] - MacOS support and script fixes
-* [ethylamine] - Developer
-
-### Special Thanks
-* [bigboss] - liborbis with examples and orbisdev (and complaining a lot)
-* [rogero] - Original 5.01 testing
-* [AbkarinoMHM] - Original 5.01 testing
-* [wildcard] - General questions, and hardware help
-* [frangarcj] - orbisdev sdk, musl, C++ support
-* [masterzorag] - orbisdev sdk, musl, C++ support
-* [fjtrujy] - orbisdev sdk, musl, C++ support
-* [Anon #1] - Developer (Code, Non-stop help, <3 thx bruv)
-* [Anon #2] - Developer (Code, Non-stop help, gl with job!)
-* [Anon #3] - Security (Future proofing design)
-* [Anon #4] - Developer (Ideas from Vita)
-* [Anon #5] - Security (Software and hardware)
-
-### Installation
-
-#### Checking out repository
+## Checking out repository
In order to start development on the mira-project, you will need a few components installed.
* clang
* clang-tidy
@@ -102,148 +72,47 @@ In order to start development on the mira-project, you will need a few component
* ld (or lld.ld)
* git
* python3 (3.6.9 at time of writing, but any newer version should work)
+* cmake
These can be installed (on Ubuntu, other platforms may vary) by using the command(s):
-`sudo apt install git build-essential clang lldb clang-tidy clang-tools cppcheck`
+`sudo apt install git build-essential clang lldb clang-tidy clang-tools cppcheck git python3 cmake`
-#### Cloning the repository
+## Cloning the repository
Cloning the repository is easily done by:
`git clone https://github.com/OpenOrbis/mira-project.git`
-#### Protobuf files
-The RPC messaging system leverages protobuf in order to easily expand and add cross-language RPC support. This involves 2 major components for the default build. Due to previous dependencies, we are not using the C++ version of protobuf due to not having a full STL runtime in the kernel (it was too much work/effort) so instead we are leveraging the [protobuf-c] project.
-
-##### Installing protobuf-c
-Installing protobuf-c should only need to be done once, there is support for proto3 files at this time and should not be an issue (compared to previous which only supported proto2).
-
-You can follow the protobuf build instructions located [here](https://github.com/protobuf-c/protobuf-c#building)
-
-##### Building the protobuf file definitions + fixing them
-Currently there is a script that will handle *most* of the work required for building new protobuf files. From the *ROOT* of the cloned directory (mira-project/) you can use the provided python script for generating new protobuf files.
-
-`python3 ./scripts/build_proto.py --inputDir=./external`
-
-By default the script will only run in the local directory it was called from. This behavior can be changed with command line argument overrides:
-
-`--inputDir=`
-`--outputDir=