Skip to content

Commit 4fa4c6d

Browse files
authored
Merge pull request #5 from fjtrujy/logo_pcsx2
Make logo example to work in PCSX2
2 parents 431f863 + 7b4fa29 commit 4fa4c6d

File tree

4 files changed

+55
-10
lines changed

4 files changed

+55
-10
lines changed

.github/workflows/compilation.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,37 @@ jobs:
2020
- name: Install ps2stuff
2121
run: |
2222
git clone https://github.com/ps2dev/ps2stuff.git
23-
cd ps2stuff && make clean all install
23+
cd ps2stuff
24+
make -j $(getconf _NPROCESSORS_ONLN) clean
25+
make -j $(getconf _NPROCESSORS_ONLN) all
26+
make -j $(getconf _NPROCESSORS_ONLN) install
2427
2528
- name: Compile project
2629
run: |
27-
make clean all install
30+
make -j $(getconf _NPROCESSORS_ONLN) clean
31+
make -j $(getconf _NPROCESSORS_ONLN) all
32+
make -j $(getconf _NPROCESSORS_ONLN) install
2833
2934
- name: Compile GLUT
3035
run: |
31-
cd glut && make clean all install
36+
cd glut
37+
make -j $(getconf _NPROCESSORS_ONLN) clean
38+
make -j $(getconf _NPROCESSORS_ONLN) all
39+
make -j $(getconf _NPROCESSORS_ONLN) install
3240
3341
- name: Compile examples
3442
run: |
3543
cd examples
36-
# For now just box example is compiling
37-
cd box && make clean all
44+
# For now just box and logo example is compiling
45+
cd box && make clean all && cd ..
46+
cd logo && make clean all && cd ..
47+
3848
3949
- name: Upload artifacts
4050
uses: actions/upload-artifact@v3
4151
with:
4252
name: examples
4353
path: |
44-
examples/box/box.elf
54+
examples/**/*.elf
55+
examples/**/*.gl
56+
examples/**/*.rtx

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ prebuilddone
1010
*.vo
1111
*.a
1212
*.elf
13+
*.orig

examples/logo/Makefile

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
1-
TARGET = logo.elf
1+
EE_BIN = logo.elf
2+
EE_CFLAGS := -I$(PS2SDK)/ports/include -I../shared_code/ $(EE_CFLAGS)
3+
EE_CXXFLAGS := -I$(PS2SDK)/ports/include -I../shared_code/ $(EE_CXXFLAGS)
4+
EE_OBJS = logo.o ../shared_code/text_stuff.o
5+
EE_LDFLAGS += -L$(PS2SDK)/ports/lib
6+
EE_LIBS = -lps2glut -lps2gl -lps2stuff -lpad -ldma
27

3-
# all the examples share the same makefile, just with a different
4-
# executable name..
5-
include ../shared_code/Makefile.examples
8+
ifeq ($(DEBUG), 1)
9+
EE_CFLAGS += -D_DEBUG -g -O0
10+
EE_CXXFLAGS += -D_DEBUG -g -O0
11+
endif
12+
13+
# Disabling warnings
14+
WARNING_FLAGS = -Wno-strict-aliasing -Wno-conversion-null
15+
16+
# VU0 code is broken so disable for now
17+
EE_CFLAGS += $(WARNING_FLAGS) -DNO_VU0_VECTORS
18+
EE_CXXFLAGS += $(WARNING_FLAGS) -DNO_VU0_VECTORS
19+
20+
all: $(EE_BIN)
21+
22+
clean:
23+
rm -f $(EE_BIN) $(EE_OBJS)
24+
25+
run: $(EE_BIN)
26+
ps2client -h 192.168.1.10 execee host:$(EE_BIN)
27+
28+
reset:
29+
ps2client -h 192.168.1.10 reset
30+
31+
sim: $(EE_BIN)
32+
PCSX2 --elf=$(PWD)/$(EE_BIN)
33+
34+
include $(PS2SDK)/samples/Makefile.pref
35+
include $(PS2SDK)/samples/Makefile.eeglobal_cpp

examples/logo/logo.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <math.h>
99
#include <stdio.h>
1010
#include <stdlib.h>
11+
#include <fcntl.h>
12+
#include <unistd.h>
1113

1214
#include "GL/gl.h"
1315
#include "GL/glut.h"

0 commit comments

Comments
 (0)