-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
10,325 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
build | ||
data/*/* | ||
!data/bnk/sfx.bnk | ||
!data/bnk/oside.bnk | ||
!data/org/oside.org | ||
*.o | ||
*.elf | ||
*.exe | ||
*.iso | ||
*.psb | ||
*.bsp | ||
.vscode | ||
compile_flags.txt | ||
compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
include psn00bsdk-setup.mk | ||
|
||
# Project target name | ||
TARGET = orgplay | ||
|
||
# Searches for C, C++ and S (assembler) files in specified directory | ||
SRCDIR = src | ||
CFILES = $(notdir $(wildcard $(SRCDIR)/*.c)) | ||
CPPFILES = $(notdir $(wildcard $(SRCDIR)/*.cpp)) | ||
AFILES = $(notdir $(wildcard $(SRCDIR)/*.s)) | ||
|
||
# Create names for object files | ||
OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ | ||
$(addprefix build/,$(CPPFILES:.cpp=.o)) \ | ||
$(addprefix build/,$(AFILES:.s=.o)) | ||
|
||
# Project specific include and library directories | ||
# (use -I for include dirs, -L for library dirs) | ||
INCLUDE += | ||
LIBDIRS += | ||
|
||
# Libraries to link | ||
LIBS = -lpsxgpu -lpsxspu -lpsxetc -lpsxapi -lpsxcd -lc | ||
|
||
# C compiler flags | ||
CFLAGS = -g -O2 -fno-builtin -fdata-sections -ffunction-sections | ||
|
||
# C++ compiler flags | ||
CPPFLAGS = $(CFLAGS) -fno-exceptions | ||
|
||
# Assembler flags | ||
AFLAGS = -g | ||
|
||
# Linker flags (-Ttext specifies the program text address) | ||
LDFLAGS = -g -Ttext=0x80010000 -gc-sections \ | ||
-T $(GCC_BASE)/$(PREFIX)/lib/ldscripts/elf32elmip.x | ||
|
||
all: $(TARGET).exe | ||
|
||
iso: $(TARGET).iso | ||
|
||
$(TARGET).iso: $(TARGET).exe | ||
mkpsxiso -y -q iso.xml | ||
|
||
$(TARGET).exe: $(OFILES) | ||
$(LD) $(LDFLAGS) $(LIBDIRS) $(OFILES) $(LIBS) -o $(TARGET).elf | ||
elf2x -q $(TARGET).elf | ||
|
||
build/%.o: $(SRCDIR)/%.c | ||
@mkdir -p $(dir $@) | ||
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ | ||
|
||
build/%.o: $(SRCDIR)/%.cpp | ||
@mkdir -p $(dir $@) | ||
$(CXX) $(AFLAGS) $(INCLUDE) -c $< -o $@ | ||
|
||
build/%.o: $(SRCDIR)/%.s | ||
@mkdir -p $(dir $@) | ||
$(CC) $(AFLAGS) $(INCLUDE) -c $< -o $@ | ||
|
||
clean: | ||
rm -rf build $(TARGET).elf $(TARGET).exe | ||
|
||
.PHONY: all iso clean |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<iso_project image_name="orgplay.iso"> | ||
<track type="data"> | ||
<identifiers | ||
system ="PLAYSTATION" | ||
application ="PLAYSTATION" | ||
volume ="ORGPLAY" | ||
volume_set ="ORGPLAY" | ||
publisher ="FGSFDS" | ||
/> | ||
<directory_tree> | ||
<file name="system.cnf" type="data" source="system.cnf"/> | ||
<file name="orgplay.exe" type="data" source="orgplay.exe"/> | ||
<dir name="bnk" srcdir="data/bnk"> | ||
<file name="oside.bnk" type="data"/> | ||
<file name="sfx.bnk" type="data"/> | ||
</dir> | ||
<dir name="org" srcdir="data/org"> | ||
<file name="oside.org" type="data"/> | ||
</dir> | ||
<dummy sectors="1024"/> | ||
</directory_tree> | ||
</track> | ||
</iso_project> | ||
</xml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# PSn00bSDK project setup file | ||
# Part of the PSn00bSDK Project | ||
# 2019 - 2020 Lameguy64 / Meido-Tek Productions | ||
# | ||
# This file may be copied for use with your projects, see the template | ||
# directory for a makefile template | ||
|
||
ifndef PREFIX | ||
|
||
PREFIX = mipsel-unknown-elf | ||
|
||
endif # PREFIX | ||
|
||
ifndef GCC_VERSION | ||
|
||
GCC_VERSION = 7.4.0 | ||
|
||
endif # GCC_VERSION | ||
|
||
# PSn00bSDK library/include path setup | ||
ifndef PSN00BSDK_LIBS | ||
|
||
# Default assumes PSn00bSDK is in the same parent dir as this project | ||
|
||
LIBDIRS = -L../psn00bsdk/libpsn00b | ||
INCLUDE = -I../psn00bsdk/libpsn00b/include | ||
|
||
else | ||
|
||
LIBDIRS = -L$(PSN00BSDK_LIBS) | ||
INCLUDE = -I$(PSN00BSDK_LIBS)/include | ||
|
||
endif # PSN00BSDK_LIBS | ||
|
||
# PSn00bSDK toolchain path setup | ||
ifndef GCC_BASE | ||
|
||
ifndef PSN00BSDK_TC | ||
|
||
# Default assumes GCC toolchain is in root of C drive or /usr/local | ||
|
||
ifeq "$(OS)" "Windows_NT" | ||
|
||
GCC_BASE = /c/mipsel-unknown-elf | ||
GCC_BIN = | ||
|
||
else | ||
|
||
GCC_BASE = /usr/local/mipsel-unknown-elf | ||
GCC_BIN = | ||
|
||
endif | ||
|
||
else | ||
|
||
GCC_BASE = $(PSN00BSDK_TC) | ||
GCC_BIN = $(PSN00BSDK_TC)/bin/ | ||
|
||
endif # PSN00BSDK_TC | ||
|
||
endif # GCC_BASE | ||
|
||
CC = $(GCC_BIN)$(PREFIX)-gcc | ||
CXX = $(GCC_BIN)$(PREFIX)-g++ | ||
AS = $(GCC_BIN)$(PREFIX)-as | ||
AR = $(GCC_BIN)$(PREFIX)-ar | ||
LD = $(GCC_BIN)$(PREFIX)-ld | ||
RANLIB = $(GCC_BIN)$(PREFIX)-ranlib |
Oops, something went wrong.