Kurok PSP errors
Moderator: InsideQC Admins
22 posts
• Page 1 of 2 • 1, 2
Kurok PSP errors
Hello,can something help me with engine?
my friend done some features for flitzkurok PC engine,and i want add it in kurok psp engine
if i compile it,i have a errors
http://rghost.ru/36531975
my friend done some features for flitzkurok PC engine,and i want add it in kurok psp engine
if i compile it,i have a errors
http://rghost.ru/36531975
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Kurok PSP errors
List of errors?
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
In common.h ...
You have ...
But this needs to be ...
The PSP C++ files hates the qboolean datatype. So the above is required to work around the issue.
You have ...
- Code: Select all
#if !defined BYTE_DEFINED
typedef unsigned char byte;
#define BYTE_DEFINED 1
#endif
#undef true
#undef false
typedef enum {false, true} qboolean;
But this needs to be ...
- Code: Select all
#if !defined BYTE_DEFINED
typedef unsigned char byte;
#define BYTE_DEFINED 1
#endif
#undef true
#undef false
#if defined(PSP) && defined(__cplusplus) // <---------------------
typedef enum {qfalse, qtrue} qboolean; // <---------------------------
#else // <-----------------------------------------------------------------
typedef enum {false, true} qboolean;
#endif // <--------------------------------------------------
The PSP C++ files hates the qboolean datatype. So the above is required to work around the issue.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
Baker wrote:In common.h ...
You have ...
- Code: Select all
#if !defined BYTE_DEFINED
typedef unsigned char byte;
#define BYTE_DEFINED 1
#endif
#undef true
#undef false
typedef enum {false, true} qboolean;
But this needs to be ...
- Code: Select all
#if !defined BYTE_DEFINED
typedef unsigned char byte;
#define BYTE_DEFINED 1
#endif
#undef true
#undef false
#if defined(PSP) && defined(__cplusplus) // <---------------------
typedef enum {qfalse, qtrue} qboolean; // <---------------------------
#else // <-----------------------------------------------------------------
typedef enum {false, true} qboolean;
#endif // <--------------------------------------------------
The PSP C++ files hates the qboolean datatype. So the above is required to work around the issue.
arr-_-
http://savepic.su/1318524.htm
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Kurok PSP errors
in common.h add ...
#define bound(a, b, c) ((a) >= (c) ? (a) : (b) < (a) ? (a) : (b) > (c) ? (c) : (b))
#define bound(a, b, c) ((a) >= (c) ? (a) : (b) < (a) ? (a) : (b) > (c) ? (c) : (b))
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
Baker wrote:in common.h add ...
#define bound(a, b, c) ((a) >= (c) ? (a) : (b) < (a) ? (a) : (b) > (c) ? (c) : (b))
more errors
http://savepic.su/1311344.htm
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Kurok PSP errors
You'll probably have to open mathlib.h and mathlib.c and copy RotatePointAroundVector and VectorVectors into your new mathlib.h and mathlib.c
The function is missing.
The function is missing.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
Baker wrote:You'll probably have to open mathlib.h and mathlib.c and copy RotatePointAroundVector and VectorVectors into your new mathlib.h and mathlib.c
The function is missing.
ok,but i have new errors
http://savepic.su/1400255.htm
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Kurok PSP errors
Max_Salivan wrote:ok,but i have new errors![]()
Replace existing function in mathlib.c:
I don't know how to make ASM work on a PSP. But this will make the function work.
The ASM will still compile on the PC version, but for the PSP it will use native floating point functions.
- Code: Select all
/*
=================
SinCos
=================
*/
void SinCos( float radians, float *sine, float *cosine )
{
#if defined(PSP)
*sine = sinf (radians);
*cosine = cosf (radians);
#else
_asm
{
fld dword ptr [radians]
fsincos
mov edx, dword ptr [cosine]
mov eax, dword ptr [sine]
fstp dword ptr [edx]
fstp dword ptr [eax]
}
#endif
}
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
i think it uses gnu intel syntax, so basically the same gcc uses.
ill see if i can find something about it.
ill see if i can find something about it.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Kurok PSP errors
yep its standard x86 asm intel syntax so you can use a number of tools like nasm or gcc's own gas the syntax differs from ms format though so you might have to read up a bit on the differences. intels assembler should work to 
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Kurok PSP errors
I'm not so sure about that for a PSP. The PSP ASM I've seen doesn't look like that.
Looks like:
And he posted that the ASM code was giving him an error during the compile (in the screenshot). The PSP uses a MIPS processor. I also kind of think that the ASM in question is only a modest improvement over what a C compiler would probably do with that code. It's just calling a standard math function and returning it, it isn't like it is doing some wild and crazy span drawing stuff.
Looks like:
- Code: Select all
asm __volatile__ ("\n\
ori $5,$0,0\n\
ori $17,$0,0\n\
loop:\n\
mul %1,%2\n\
mflo $16\n\
And he posted that the ASM code was giving him an error during the compile (in the screenshot). The PSP uses a MIPS processor. I also kind of think that the ASM in question is only a modest improvement over what a C compiler would probably do with that code. It's just calling a standard math function and returning it, it isn't like it is doing some wild and crazy span drawing stuff.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Kurok PSP errors
Baker wrote:I'm not so sure about that for a PSP. The PSP ASM I've seen doesn't look like that.
Looks like:
- Code: Select all
asm __volatile__ ("\n\
ori $5,$0,0\n\
ori $17,$0,0\n\
loop:\n\
mul %1,%2\n\
mflo $16\n\
And he posted that the ASM code was giving him an error during the compile (in the screenshot). The PSP uses a MIPS processor. I also kind of think that the ASM in question is only a modest improvement over what a C compiler would probably do with that code. It's just calling a standard math function and returning it, it isn't like it is doing some wild and crazy span drawing stuff.
thanks for information)
i have a new errors-_-
http://savepic.su/1437126.htm
UPD:i am compile it
added
#define FL_MONSTERCLIP 8192 // Only solid to entities with FL_MONSTER
but doors and buttons dont work,i am pass through them
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Kurok PSP errors
i know its a mips but various sites state that its standard x86 asm hmm ? though that asm code looks a bit weird. it does resemble intel asm a bit but without the \n\ newlines also i dont recognize the ori calls. mul is pretty standard though and im not sure about mflo. codewarrior has a compiler/assembler for mips but its not free i think i wonder if rtems has one.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
22 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest