how do i download these libs:
libjpeg, freetype, liblua, liblualib, mikmodlib
Printable View
how do i download these libs:
libjpeg, freetype, liblua, liblualib, mikmodlib
Sounds like you're trying to insall the libs required to compile Lua Player.
http://wiki.ps2dev.org/psp:lua_player:compiling
cheers, i just couldnt get some of them (libjpeg etc...)
-= Double Post =-
problem, I compliled that exact version of luaplayer and it came up with errors- but anyway I make the 1.5 kxploits and then put them into a build that i tried and it just exited on me- any ideas?
some probs with loading eboots
errors:Code:#include <pspkernel.h>
#include <pspdebug.h>
#include <string.h>
#include <psploadexec.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
PSP_MAIN_THREAD_ATTR (0);//zeg de psp dat het programma kernel acces nodig heeft
pspDebugInstallKprintfHandler (NULL);
pspDebugInstallErrorHandler (NULL);
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int load_Eboot_calculator()
{
char *path_calculator; /*geheugenplaats voor de naam van de eboot die je wilt laden*/
const u32 Length_of_Eboot = strlen(path_calculator )+1;
struct SceKernelLoadExecParam calculator;
calculator.args = Length_of_Eboot;
calculator.argp = path_calculator;
calculator.key = NULL;
calculator.size = sizeof(calculator)+Length_of_Eboot;
sceKernelLoadExec(path_calculator,&calcualtor);
}
int main()
{
printf("press cross to load calculator");
SceCtrlData pad;
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS){
load_Eboot_calculator();
}
sceKernelSleepThread();
return 0;
}
}
Code:$ make kxploit
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o mai
n.c
main.c:8: error: syntax error before '(' token
main.c:9: error: syntax error before '(' token
main.c: In function 'load_Eboot_calculator':
main.c:49: error: 'calcualtor' undeclared (first use in this function)
main.c:49: error: (Each undeclared identifier is reported only once
main.c:49: error: for each function it appears in.)
main.c: In function 'main':
main.c:57: warning: implicit declaration of function 'sceCtrlReadBufferPositive'
make: *** [main.o] Error 1
i keep getting:
-= Double Post =-Zitat:
make: *** [release15] error 2
hello......
my problem is fixed;)
ok well mine aint!
prob : this crash my psp without showing something
the only warning is:Code:#include <pspkernel.h>
#include <pspdebug.h>
#include <string.h>
#include <psploadexec.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("Hello World", 0, 1, 1);
PSP_MAIN_THREAD_ATTR (0);//zeg de psp dat het programma kernel acces nodig heeft
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int load_Eboot_calculator(void)
{
struct SceKernelLoadExecParam calculator;
char *path_calculator= "ms0:/PSP/GAME/calculator/calculator.PBP";; /*geheugenplaats voor de naam van de eboot die je wilt laden*/
const u32 Length_of_Eboot = strlen(path_calculator )+1;
pspDebugInstallKprintfHandler (NULL);
pspDebugInstallErrorHandler (NULL);
calculator.args = Length_of_Eboot;
calculator.argp = path_calculator;
calculator.key = NULL;
calculator.size = sizeof(calculator)+Length_of_Eboot;
sceKernelLoadExec(path_calculator,&calculator);
}
int main()
{
pspDebugScreenInit();
SetupCallbacks();
printf("press cross to load calculator");
SceCtrlData pad;
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS){
load_Eboot_calculator();
}
}
sceKernelSleepThread();
return 0;
}
the eboot.pbp is in the same map als calculator.pbpCode:main.c: In function 'load_Eboot_calculator':
main.c:53: warning: control reaches end of non-void function
Okay so I did the blit after the other blits (at the end) but now when I press RIGHT it just goes once, it goes off the screen which is good, it doesnt stop but now I can only shoot it once, and it follows where ever my MegaY position goes, this is what I wanted(except that it only shoots once) but I want it just to go in a straight line instead of following my MegaY, does anyone know how to make it so when I press the RIGHT button, it shoots where my MegaY position is, but then it just goes where ever its current Y position is and doesnt follow Megaman, and also how to make it shoot more than once.
is this the issue?
http://img293.imageshack.us/img293/1412/problemjh4.png
hallo007: This line:
Should be:Code:char *path_calculator= "ms0:/PSP/GAME/calculator/calculator.PBP";;
Glynnder: The old versions of Lua Player may not compile, I've only been able to compile version 0.20 without editing any source code.Code:char *path_calculator= "ms0:/PSP/GAME/CALCULATOR/EBOOT.PBP";
Gonrai: When you first shoot take the value from the MegaY value and store it in a new variable such as bulletY, then pass the bulletY to the blit function of the bullet instead of MegaY.
Okay:
1. I stored it in a variable, and its working fine now.
but
2. It still only shoots once.
This still doesn't account for multiple bullets however. I think there's a tutorial on evilmana.com on bullets. Maybe you can convert the Lua code to C for your needs.Code:if(pad.Buttons & PSP_CTRL_RIGHT)
{
shoot=1;
MegaPelY = MegaY;
}
if(shoot==1) {
megaPelX+=1;
}
i am trying to find errors xD cant find em lol i tried making a counter but i suck lol so can anyone help, thanks :D
Here is what CYGWIN gave me when i tried to commpile
$ make kxploit
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o mai
n.c
main.c: In function 'main':
main.c:92: error: syntax error before 'for'
main.c:92: warning: statement with no effect
main.c:92: error: syntax error before ')' token
main.c: At top level:
main.c:97: warning: type defaults to 'int' in declaration of 'pspDebugScreenClea
r'
main.c:97: error: conflicting types for 'pspDebugScreenClear'
/usr/local/pspdev/psp/sdk/include/pspdebug.h:119: error: previous declaration of
'pspDebugScreenClear' was here
main.c:97: warning: data definition has no type or storage class
main.c:99: error: syntax error before string constant
main.c:99: warning: type defaults to 'int' in declaration of 'pspDebugScreenPrin
tf'
main.c:99: error: conflicting types for 'pspDebugScreenPrintf'
/usr/local/pspdev/psp/sdk/include/pspdebug.h:49: error: previous declaration of
'pspDebugScreenPrintf' was here
main.c:99: warning: data definition has no type or storage class
main.c:100: error: syntax error before string constant
main.c:100: warning: type defaults to 'int' in declaration of 'pspDebugScreenPri
ntf'
main.c:100: error: conflicting types for 'pspDebugScreenPrintf'
/usr/local/pspdev/psp/sdk/include/pspdebug.h:49: error: previous declaration of
'pspDebugScreenPrintf' was here
main.c:100: warning: data definition has no type or storage class
make: *** [main.o] Error 1
Here is my codeshould i change this PSP_MODULE_INFO("Hello World", 0,1,1);Code:
//counter - My second PSP Program
/*
This program was created by ME on October 21 2006
It is a simple counter Application
thanks to http://www.psp-programming.com
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
PSP_MODULE_INFO("Hello World", 0,1,1);
#define poop pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelSleepThreadCB();
return 0;
}
/*Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0,0,0);
if(thid >=0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main()
{
//to end a line a semi colon is needed, not sure what these two blocks of code do...
pspDebugScreenInit();
SetupCallbacks();
//this prinnts Hello World to the screen
int counter = 0;
int i = 0;
SceCtrlData pad;
poop ("Press [X] to start the Timer");
//this is to make the printf appear, becuase it will just erase without it
sceKernelSleepThread();
// "while" represents a loop
// the if = if statement in english.
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
//break = break the loop
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
poop("Press [O] To Stop the Timer\n");
poop("Counter: %i", counter);
counter++
for(i=0; i<5; i++) {
sceDisplayWaitVblankStart();
}
}
pspDebugScreenClear();
poop("Counter Finished.");
poop("Final Count: %i", counter);
return 0;
}
to PSP_MODULE_INFO("Counter" , 0,1,1);
What do the numbers mean?
What are Variables and integers what do they do. lol i totally suck. please help :D thanks
thats was v0.20!
No no no its shooting and blitting to the screen fine, its not going where ever megaman goes anymore, but it only shoots once, so I tried setting the value of shoot to 0, but now it only goes right when I pres the RIGHT button, and it stops when I release the RIGHT button..I just want the bullet to shoot going right where ever Megaman's current Y position is (covered that) make it go right non stop, so if I release the RIGHT button it doesnt matter, it still keeps going, and if I press the RIGHT button again it blits another bullet.
When I take away shoot = 0; it goes non stop even If I do release the RIGHT button, but still it doesnt make multiple bullets.Code:if(pad.Buttons & PSP_CTRL_RIGHT)
{
shoot=1;
}
if(shoot==1) {
megaPelX+=1;
megaPelY;
shoot = 0;
}
isnt it possible to load an eboot with another name then eboot?Zitat:
Zitat von Insomniac197
because normal is online the name behind "." important?
hallo007: I'm unsure to be honest, it just struck me as odd and could be the reason for your error.
i will tried.
btw : then it's still rare because you first need to press x before it loads that function;)
Zitat:
Zitat von Gonrai
You'll probably also want to wrap the blitting function of the bullet in an if check:Code:if(pad.Buttons & PSP_CTRL_RIGHT && shoot == 0)
{
shoot=1;
}
if(shoot==1) {
megaPelX+=1;
}
if(megaPelY >= 272) { //CHANGE 272 TO WHATEVER VALUE YOU WANT THE BULLET TO STOP AT
shoot = 0;
}
Code:if(shoot==1)
{
//BLIT BULLET IMAGE
}
So can anyone explain why I can't rapidly shoot bullets?
still not working
still crashing , the hello world i wanne load works
but the eboot loader doesnt:
Code:#include <pspkernel.h>
#include <pspdebug.h>
#include <string.h>
#include <psploadexec.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("Hello World", 0, 1, 1);
PSP_MAIN_THREAD_ATTR (0);//zeg de psp dat het programma kernel acces nodig heeft
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int load_Eboot_calculator(void)
{
struct SceKernelLoadExecParam calculator;
char *path_calculator= "ms0:/PSP/GAME/HELLOWORLD/EBOOT.PBP"; /*geheugenplaats voor de naam van de eboot die je wilt laden*/
const u32 Length_of_Eboot = strlen(path_calculator )+1;
pspDebugInstallKprintfHandler (NULL);
pspDebugInstallErrorHandler (NULL);
calculator.args = Length_of_Eboot;
calculator.argp = path_calculator;
calculator.key = NULL;
calculator.size = sizeof(calculator)+Length_of_Eboot;
sceKernelLoadExec(path_calculator,&calculator);
}
int main()
{
pspDebugScreenInit();
SetupCallbacks();
printf("press cross to load calculator");
SceCtrlData pad;
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS){
load_Eboot_calculator();
}
}
sceKernelSleepThread();
return 0;
}
Because you haven't setup a system for mutiple bullets.
See the tutorial at evilmana.com that I mentioned, the principals apply across any language.
http://www.evilmana.com/tutorials/lu...et_bullets.php
can anyone help me with my problem? thanks insomniac great tutorials
Sethis - Your problem is t hat you are making hte thread fall 'asleep' (aka stopping all processes besides HOME button). here ya go.
Code://counter - My second PSP Program
/*
This program was created by ME on October 21 2006
It is a simple counter Application
thanks to http://www.psp-programming.com
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
PSP_MODULE_INFO("Hello World", 0,1,1);
#define poop pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelSleepThreadCB();
return 0;
}
/*Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0,0,0);
if(thid >=0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main()
{
//to end a line a semi colon is needed, not sure what these two blocks of code do...
pspDebugScreenInit();
SetupCallbacks();
//this prinnts Hello World to the screen
int counter = 0;
int i = 0;
SceCtrlData pad;
poop ("Press [X] to start the Timer");
//this is to make the printf appear, becuase it will just erase without it
// "while" represents a loop
// the if = if statement in english.
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
//break = break the loop
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
poop("Press [O] To Stop the Timer\n");
poop("Counter: %i", counter);
counter++
for(i=0; i<5; i++) {
sceDisplayWaitVblankStart();
}
}
pspDebugScreenClear();
poop("Counter Finished.");
poop("Final Count: %i", counter);
poop("\n\n\tPress L Trigger to exit.");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_LTRIGGER) {
break;
}
}
sceKernelExitGame();
return 0;
}
The line:
Also needs a semi-colon at the end of it:Code:counter++
Code:counter++;
any help with my issue?
OK, I'm trying to compile a simple EBOOT runner, that will run a Hello World EBOOT. It compiles, but when I run it and press X, it does nothing. Anyone know what's wrong?
Spoiler for Code:
Spoiler for Makefile:
Spoiler for Errors:
Try that ;)Code:#include <pspkernel.h>
#include <pspdebug.h>
#include <string.h>
#include <psploadexec.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("Eboot Runner", 0x1000, 1, 1);
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback(" Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCall back(cbid);
sceKernelSleepThreadCB();
return 0;
}
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("up date_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid , 0, 0);
}
return thid;
}
int load_eboot(void) {
struct SceKernelLoadExecParam eboot;
char *ebootpath= "ms0:/PSP/GAME/Hello/EBOOT.PBP";
const u32 Length_of_Eboot = strlen(ebootpath )+1;
pspDebugInstallKprintfHan dler (NULL);
pspDebugInstallErrorHandl er (NULL);
eboot.args = Length_of_Eboot;
eboot.argp = ebootpath;
eboot.key = NULL;
eboot.size = sizeof(eboot)+Length_of_E boot;
sceKernelLoadExec(ebootpa th,&eboot);
}
int main() {
pspDebugScreenInit();
SetupCallbacks();
SceCtrlData pad;
printf("Press X to launch EBOOT");
while(1) {
sceCtrlReadBufferPositive (&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS){
load_eboot();
}
}
sceKernelSleepThread();
return 0;
}
I seem to remember something about it needing to be a PRX.
So code a kernel mode EBOOT to load a kernel mode PRX, from the PRX unload the boot EBOOT, then load the desired EBOOT.
I could be mistaken, or thinking of something else.
Gah...
Whats the code to make the psp wait for a set amount of time? I know I just saw it in here not to long ago but I cant seem to find it now. I've been using rediculicly long for loops as my wait function, but depending on what else I have it doing the for loop could be anywhere from 5000 to 80million to get it to wait just a few milliseconds...
Something like sceKernelWait(time)?
SG57, it still didn't work. I added the while loop, and it gave me the same warning as when I compiled without the while loop.
Code:$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o mai
n.c
main.c: In function 'load_eboot':
main.c:45: warning: control reaches end of non-void function
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/
pspdev/psp/sdk/lib main.o -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
-lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspus
er -lpspkernel -o runner.elf
psp-fixup-imports runner.elf
psp-strip runner.elf -o runner_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL \
NULL NULL NULL \
NULL runner_strip.elf NULL
rm -f runner_strip.elf
Propel - read the tutorial on howto launch an eboot, as well as make your main function return a value...
AKA, just add
return 0;
to the very bottom of your code, but still in the main functions brackets.
Zitat:
Zitat von F.T.P.
sceKernelDelayThread(1000 000);
will delay the thread in micro seconds, this will delay it for 1 second.
In this function: int load_eboot(void) , you are not returning an int.Zitat:
Zitat von Propel
sceDisplayWaitVBlank(); delays it for 1/60 secondZitat:
Zitat von F.T.P.
Or you could use
sceKernelDelayThread(mirc oseconds)
Hey, thanks alot you two! ;)
Man, I'm too tired. How could I forget that.Zitat:
Zitat von SG57
-= Double Post =-
I compiled it with no errors, but it still doesn't work. WTF is wrong?!?!?
n00b Question time
So the 2.8 TIFF games are created with C++?
Yeah, they're created with C. But if you are going to start developing, don't start with TIFF games, start with regular C coding and work your way up to TIFF.Zitat:
Zitat von ZeroMega