Skip to content

Commit

Permalink
Fixed broken with previous commit samples. Get rid of "lvalue require…
Browse files Browse the repository at this point in the history
…d as left operand of assignment" error. Minor fixes.
  • Loading branch information
AKuHAK committed Oct 13, 2015
1 parent 9ea66f9 commit 8b0559d
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 46 deletions.
6 changes: 3 additions & 3 deletions ee/debug/samples/Makefile.sample
Expand Up @@ -12,11 +12,11 @@ EE_BIN = callstacktest.elf
EE_OBJS = callstacktest.o
EE_LIBS = -ldebug -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN)

clean:
rm -f *.elf *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

8 changes: 4 additions & 4 deletions ee/draw/samples/texture/Makefile.sample
Expand Up @@ -11,11 +11,8 @@ EE_BIN = texture.elf
EE_OBJS = texture.o
EE_LIBS = -ldraw -lgraph -lmath3d -lmf -lpacket -ldma

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: flower.c $(EE_BIN)
$(EE_TOOL_PREFIX)strip --strip-all $(EE_BIN)
ee-strip --strip-all $(EE_BIN)

flower.c:
bin2c texture.raw flower.c flower
Expand All @@ -29,3 +26,6 @@ run: $(EE_BIN)
reset:
ps2client reset

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/erl/samples/cpp-hello/Makefile.sample
Expand Up @@ -11,11 +11,11 @@
EE_ERL = cpp-hello.erl
EE_OBJS = cpp-hello.o

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_ERL)

clean:
rm -f *.erl *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/erl/samples/hello/Makefile.sample
Expand Up @@ -11,11 +11,11 @@
EE_ERL = hello.erl
EE_OBJS = hello.o

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_ERL)

clean:
rm -f *.erl *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

12 changes: 6 additions & 6 deletions ee/libvux/src/vuhw.c
Expand Up @@ -285,20 +285,20 @@ void Vu0CopyMatrix(VU_MATRIX *dest, VU_MATRIX *src)

float Vu0DotProduct(VU_VECTOR *v0, VU_VECTOR *v1)
{
float ret;
float ret=0;

/* ret = (v0.x*v1.x + v0.y*v1.y + v0.z*v1.z);*/

asm __volatile__ (
"lqc2 vf1, 0(%1) \n" // load 1 qword from ee
"lqc2 vf2, 0(%2) \n" // load 1 qword from ee
"lqc2 vf1, 0(%1) \n" // load 1 qword from ee
"lqc2 vf2, 0(%2) \n" // load 1 qword from ee

"vmul.xyz vf3, vf1, vf2 \n" // mul v0 by v1

"vaddy.x vf3, vf3, vf3y \n" // add x+y and store in x
"vaddz.x vf3, vf3, vf3z \n" // add z+x and store in x
"vaddy.x vf3, vf3, vf3y \n" // add x+y and store in x
"vaddz.x vf3, vf3, vf3z \n" // add z+x and store in x

"qmfc2 %0, vf3 \n" // copy vector to ee reg
"qmfc2 %0, vf3 \n" // copy vector to ee reg
: "=r" (ret) : "r" (v0), "r" (v1)
);

Expand Down
8 changes: 4 additions & 4 deletions ee/packet/src/packet.c
Expand Up @@ -20,7 +20,7 @@ packet_t *packet_init(int qwords, int type)
if (type == PACKET_SPR)
{

(u32*)packet->data = (u32*)SPR_BEGIN;
packet->data = (qword_t *)SPR_BEGIN;
packet->qwc = 0x1000;

}
Expand All @@ -42,7 +42,7 @@ packet_t *packet_init(int qwords, int type)
if (type == PACKET_UCAB)
{

(u32)packet->data |= (u32)0x30000000;
packet->data = (qword_t *)((u32)packet->data | 0x30000000);

}

Expand Down Expand Up @@ -74,7 +74,7 @@ void packet_free(packet_t *packet)
if (packet->type == PACKET_UCAB)
{

(u32)packet->data ^= 0x30000000;
packet->data = (qword_t *)((u32)packet->data ^ 0x30000000);

}

Expand All @@ -94,7 +94,7 @@ void packet_reset(packet_t *packet)
if (packet->type == PACKET_SPR)
{

(u8*)packet->data = (u8*)SPR_BEGIN;
packet->data = (qword_t *)SPR_BEGIN;
return;

}
Expand Down
6 changes: 3 additions & 3 deletions ee/rpc/audsrv/samples/playadpcm/Makefile.sample
Expand Up @@ -12,9 +12,6 @@ EE_BIN = playadpcm.elf
EE_OBJS = playadpcm.o
EE_LIBS = -laudsrv -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN) evillaugh.adp

%.adp : %.wav
Expand All @@ -23,3 +20,6 @@ all: $(EE_BIN) evillaugh.adp
clean:
rm -f *.elf *.o *.adp

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/audsrv/samples/playcdda/Makefile.sample
Expand Up @@ -12,11 +12,11 @@ EE_BIN = playcdda.elf
EE_OBJS = playcdda.o
EE_LIBS = -laudsrv -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN)

clean:
rm -f *.elf *.o

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/audsrv/samples/playwav/Makefile.sample
Expand Up @@ -12,11 +12,11 @@ EE_BIN = playwav.elf
EE_OBJS = playwav.o
EE_LIBS = -laudsrv -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN)

clean:
rm -f *.elf *.o

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/audsrv/samples/playwav2/Makefile.sample
Expand Up @@ -12,11 +12,11 @@ EE_BIN = playwav2.elf
EE_OBJS = playwav2.o
EE_LIBS = -laudsrv -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN)

clean:
rm -f *.o *.elf

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/audsrv/samples/testcd/Makefile.sample
Expand Up @@ -12,11 +12,11 @@ EE_BIN = testcd.elf
EE_OBJS = testcd.o
EE_LIBS = -laudsrv -lc

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(BINS)

clean:
rm -f *.o *.elf

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/multitap/samples/Makefile.sample
Expand Up @@ -12,9 +12,6 @@ EE_BIN = mtap_sample.elf
EE_OBJS = mtap_sample.o
EE_LIBS = -lpadx -lc -lmtap

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN) freesio2.irx freemtap.irx freepad.irx

clean:
Expand All @@ -30,3 +27,6 @@ freemtap.irx:
freepad.irx:
cp $(PS2SDK)/iop/irx/freepad.irx $@

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

6 changes: 3 additions & 3 deletions ee/rpc/padx/samples/Makefile.sample
Expand Up @@ -12,9 +12,6 @@ EE_BIN = padx_sample.elf
EE_OBJS = padx.o
EE_LIBS = -lpadx

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

all: $(EE_BIN) freesio2.irx freepad.irx

clean:
Expand All @@ -26,3 +23,6 @@ freesio2.irx:
freepad.irx:
cp $(PS2SDK)/iop/irx/freepad.irx $@

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

3 changes: 1 addition & 2 deletions samples/Makefile_sample
Expand Up @@ -12,8 +12,7 @@ SUBDIRS = cpp-hello
SUBDIRS += debug/callstacktest
SUBDIRS += draw/cube
SUBDIRS += draw/teapot
#there is no flower.c
#SUBDIRS += draw/texture
SUBDIRS += draw/texture
SUBDIRS += font
SUBDIRS += graph
SUBDIRS += hello
Expand Down

0 comments on commit 8b0559d

Please sign in to comment.