Skip to content

Commit 85880d6

Browse files
committed
Initial import.
0 parents  commit 85880d6

18 files changed

+1585
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PSX.Dev-README.md
2+
*.elf
3+
*.map
4+
*.cpe
5+
*.ps-exe
6+
*.dep
7+
*.o
8+
*.a

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "third_party/nugget"]
2+
path = third_party/nugget
3+
url = https://github.com/pcsx-redux/nugget.git

.vscode/c_cpp_properties.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Win32",
5+
"compilerPath": "${env:AppData}\\mips\\mips\\bin\\mipsel-none-elf-gcc.exe",
6+
"cStandard": "c17",
7+
"cppStandard": "c++20",
8+
"defines": [
9+
"__STDC_HOSTED__ = 0"
10+
],
11+
"includePath": [
12+
"${env:AppData}/mips/mips/include",
13+
"${workspaceFolder}/",
14+
"${workspaceFolder}/third_party/nugget",
15+
"${workspaceFolder}/third_party/nugget/third_party/EASTL/include",
16+
"${workspaceFolder}/third_party/nugget/third_party/EABase/include/common"
17+
],
18+
"intelliSenseMode": "gcc-x86"
19+
},
20+
{
21+
"name": "linux",
22+
"compilerPath": "mipsel-linux-gnu-gcc",
23+
"cStandard": "c17",
24+
"cppStandard": "c++20",
25+
"defines": [
26+
"__STDC_HOSTED__ = 0"
27+
],
28+
"includePath": [
29+
"/usr/mipsel-linux-gnu/include",
30+
"/usr/local/mipsel-linux-gnu/include",
31+
"/usr/mipsel-none-elf/include",
32+
"/usr/local/mipsel-none-elf/include",
33+
"${workspaceFolder}/",
34+
"${workspaceFolder}/third_party/nugget",
35+
"${workspaceFolder}/third_party/nugget/third_party/EASTL/include",
36+
"${workspaceFolder}/third_party/nugget/third_party/EABase/include/common"
37+
],
38+
"intelliSenseMode": "gcc-x86"
39+
}
40+
],
41+
"version": 4
42+
}

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug",
6+
"type": "gdb",
7+
"request": "attach",
8+
"target": "localhost:3333",
9+
"remote": true,
10+
"cwd": "${workspaceRoot}",
11+
"valuesFormatting": "parseText",
12+
"stopAtConnect": true,
13+
"gdbpath": "gdb-multiarch",
14+
"windows": {
15+
"gdbpath": "gdb-multiarch.exe"
16+
},
17+
"osx": {
18+
"gdbpath": "gdb"
19+
},
20+
"executable": "${workspaceRoot}/core/torus.elf",
21+
"autorun": [
22+
"monitor reset shellhalt",
23+
"load core/torus.elf",
24+
"tbreak main",
25+
"continue"
26+
]
27+
}
28+
]
29+
}

.vscode/tasks.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build Debug",
6+
"type": "shell",
7+
"command": "make BUILD=Debug",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": [
13+
"$gcc"
14+
]
15+
},
16+
{
17+
"label": "Build Release",
18+
"type": "shell",
19+
"command": "make",
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
},
24+
"problemMatcher": [
25+
"$gcc"
26+
]
27+
},
28+
{
29+
"label": "Clean",
30+
"type": "shell",
31+
"command": "make clean",
32+
"group": {
33+
"kind": "build"
34+
}
35+
}
36+
]
37+
}

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
all: demo.ps-exe
2+
3+
core:
4+
$(MAKE) -C core
5+
6+
loader:
7+
$(MAKE) -C loader
8+
9+
clean:
10+
$(MAKE) -C core clean
11+
rm -f demo.ps-exe
12+
13+
demo.ps-exe: core loader
14+
cp loader/loader.ps-exe demo.ps-exe
15+
# ps1-packer loader/loader.ps-exe -o demo.ps-exe
16+
17+
.PHONY: clean core loader

compile_flags.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-m32
2+
-std=c++20
3+
-fcoroutines-ts
4+
-I.
5+
-Ithird_party/nugget
6+
-Ithird_party/EASTL/include
7+
-Ithird_party/EABase/include/Common

core/.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
ColumnLimit: 120
4+
AccessModifierOffset: -2

core/.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 4

core/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
all: core.o
2+
3+
TARGET = torus
4+
TYPE = ps-exe
5+
6+
SRCS = \
7+
torus.cpp \
8+
9+
CXXFLAGS = -std=c++20
10+
11+
LDFLAGS += -Wl,-wrap,memcpy -Wl,-wrap,memset
12+
13+
include ../third_party/nugget/psyqo/psyqo.mk
14+
15+
core.bin: $(TARGET).ps-exe
16+
../ps1-packer $< -raw -o $@
17+
18+
core.o: core.bin
19+
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@

core/presets.hh

Lines changed: 303 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)