using assembly?
using assembly?
Is it possible to use assembly with C to make psp games? I was thinking that only using C might be too slow for some games.
Re: using assembly?
The rule is to first conceive, then improve the algorithms, and then, if needed, do some assembly.
But really, do you think you need ASM?
With GCC you can use some "inline assembly" in your C code. You can find pieces of information on google. But the psp cpu uses MIPS instructions, so the examples on the Internet which are mostly for x86 assembly will be useless.
But really, do you think you need ASM?
With GCC you can use some "inline assembly" in your C code. You can find pieces of information on google. But the psp cpu uses MIPS instructions, so the examples on the Internet which are mostly for x86 assembly will be useless.
Re: using assembly?
Is my makefile correctly written to compile the assembly code?
and also is my assembly code correctly written?
Code: Select all
TARGET = mebasic
OBJS = assembly.o main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = ME Basic Example
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Code: Select all
.global foo
.text
foo:
lb $t1,$12
Re: using assembly?
How would I combine assembly and c? Is it like the gba where you have to create a s and a c file? Or is it done differently?
Re: using assembly?
the c/c++ compiler does a pretty good code making fast code. using assembly does not guarantee that it will be faster - you need to know what you are doing. make what you want to make, then figure out (by analysis - not guessing) where you need to improve speed. assembly is just one tool you can use to optimize performance. if you are just starting with assembly then you probably will have a hard time beating the compiler.
Who is online
Users browsing this forum: No registered users and 1 guest