$(PSPBIN) is not properly set.
Printable View
$(PSPBIN) is not properly set.
yea change it to the REAL path =P
~!SlasheR!~
Well, first of all thanks for all the aswers, but it still won't work. I now get the original errors that he (still) can't find "freetype/config/ftheader.h". As for the environment variables, if this is what you geht when you type "echo %PATH%" - the (right) bin path is there - twice!
-=Double Post Merge =-
Ok, here comes the cheap solution. Inside the includedirectory was a folder "freetype2", inside that a folder "freetype" with all the files in it. Copied "freetype" into the include directory, everything works. I could have tried that earlier -_-. Anyways, thanks for all the help.
do echo %PSPBIN% and see what it outputs
because.. ya know.. pspbin env variable is not the path variable..
It echos... wait for it... %PSPBIN% !
Where can I change that?
It's not a windows environment variable, you have to do it for cygwin.
Type (In a cygwin command prompt):
Depending on the directory freetype-config is in.Zitat:
PSPBIN = /usr/local/pspdev/bin
or
PSPBIN = /usr/local/pspdev/psp/bin
Then try running it again.
could some1 please answer my question???
http://forums.qj.net/psp-development-forum/146728-help-xmb-plugin-3.html
~!SlasheR!~
Thx!
-=Double Post Merge =-
I'm having troubles with pgeFont. I use it with the graphics.c library from Psilocybeing that is included as a sample that comes with pgeFont.
When I print a font with pge to the screen and use blitAlphaImageToScreen from the library, the image is totally messed up. I can do that before I print the text of after that, the result is the same.
Does anyone have a clue?
I read the thread and you've been given plenty of help. Use sceDisplayGetFrameBuf to get the address to send to pspDebugScreenSetOffset. Theres not much more that we can say without giving you the code.
-Aura
Is there any functions to open/read/modify an archive in the SDK? I need to use an archive (type not important) but I don't want to reinvent the wheel if theres a way already.
Yea i know Aura but i still need help?
thanks to every1 =)
~!SlasheR!~
any libs for unraring files?
~!SlasheR!~
Is there a way to list heap UIDs? I see functions for listing the UID of modules but I've not found anything for memory. Am I right in assuming the PSP_HEAP_SIZE_KB allocates a heap with a determinable UID also? Finally if I allocate a heap in a function using sceKernelCreateHeap does that remove the need for the PSP_HEAP_SIZE_KB macro and no extra additions, or would I then have to allocate from the heap each time using sceKernelAllocHeapMemory? I'm just not sure if the latter function is a method of using malloc with a heap?
Sorry for all the questions, I just stumbled across sysmem and become interested :p
-Aura
yep i did i found the one that ur talking about (rar2)
but i was wondering if there was any rar3 ones out there
Thx 4 ur reply anyways
~!SlasheR!~
Is there any reason for a prx (as in, a module not an app on its own) to give me errors when its C++ and not C? Whenever I compile a module in C++ it gives me:
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: warning: cannot find
entry symbol module_start; defaulting to 0000000000000000
/usr/local/pspdev/psp/sdk/lib/prxexports.o:(.rodata.sce Resident+0x8): undefined
reference to `module_start'
collect2: ld returned 1 exit status
make: *** [heaparea1.elf] Error 1
if the extention is C it works fine...
I'm compiling with -lstdc++ as well...
At the moment its no major biggy, I can get away with using C but when I want to introduce classes things are going to get hairy.
-Aura
I'm pretty sure there are some essential differences between the two, so you might have to use extern tags.
Anybody know where theres some samples to how the vlf library works.
Like something simple i was only able to find one and i was to complex for my tiny brain to take in.
what does that library do...?:tup:
ive heard of it but dont know what it does
~!SlasheR!~
thats KOOL as!!!
ill look into it if i figure out anything ill pm u :tup:
~!SlasheR!~
I didn't accomplish to get my menu to work, and fixing the errors is giving me even
more problems. Can somebody sort this out for me?:
Spoiler for main.c:
Spoiler for Makefile:
Error I'm getting:
Code:main.c: In function 'MainMenu':
main.c:<.text+0x9c>: Undefined reference to 'sceCtrlBufferPeekPositive'
main.c:<.text+0xfc>: Undefined reference to 'sceCtrlBufferPeekPositive'
collect2: ld returned 1 exit status
make: ** [menu.elf] Error1
add -lpspctrl to your makefile
It's giving the same errors again.
*Facepalm*
Check the header file in the future please, it'll save us all so many headaches:
Your code:
headerCode:...
sceCtrlBufferPeekPositive
...
-AuraCode:...
sceCtrlPeekBufferPositive
...
I don't understand your answer actually
I just changed it for you.Zitat:
#include <pspsdk.h>
#include <pspkernel.h>
#include <psppower.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("menu", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_ THREAD_ATTR_USER);
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;
}
#define N_Entries 3
char *MenuItems[] =
{
"ITEM",
"ITEM2",
"ITEM3"
};
int MainMenu()
{
SceCtrlData menupad, lastpad;
sceCtrlPeekBufferPositive (&lastpad, 1);
int i, selection = 0;
while(1)
{
pspDebugScreenSetXY(0, 0);
printf("Welcome to PROGRAM-NAME\n");
for(i = 0; i < N_Entries; i++)
{
if (i != selection)
printf(" %s\n", MenuItems[i]);
else
printf(" -> %s\n", MenuItems[i]);
}
sceCtrlPeekBufferPositive (&menupad, 1);
if (lastpad.Buttons != menupad.Buttons)
{
lastpad.Buttons = menupad.Buttons;
if (menupad.Buttons & PSP_CTRL_DOWN)
{
selection++;
if (selection >= N_Entries)
selection = 0;
}
else if(menupad.Buttons & PSP_CTRL_UP)
{
selection--;
if (selection < 0)
selection = N_Entries - 1;
}
else if(menupad.Buttons & PSP_CTRL_CROSS)
{
break;
}
}
}
return selection;
}
Use the code tag it looks sloppy as a spoiler or quote.
Check my post, specifically the 2 code boxes. Notice whats different about them. Yeah, it helps to get the function name correct :p
-Aura
been messin around with the vlf library
but it wont load the lateral menu even
though i tell it too any help.
Code://============================================
// Basic includes/start of program
//============================================
#include <pspkernel.h>
#include <stdlib.h>
#include "vlf.h"
#include "graphics.h"
#include <pspsdk.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <psppower.h>
//--------------------------------------------
PSP_MODULE_INFO("VLFTest", 0x800, 1, 0);
PSP_MAIN_THREAD_ATTR(0);
//--------------------------------------------
//============================================
// Global variables
//============================================
void *ReadFileAllocEx(char *file, int seek, int size, int *retSize);
int done = 0;
//============================================
// Main
//============================================
int app_main()
{
int mini();
char *items[] = { "Start", "Exit" };
vlfGuiSystemSetup(1, 1, 1);
vlfGuiLateralMenu(2, items, 0, mini, 100);
vlfGuiSetModelSystem();
void *battery_icon;
vlfGuiSetBackgroundPlane(0x00CC99);
vlfGuiSetModelSystem();
vlfGuiAddClock(); // Añade el reloj en la esquina superior derecha
// vlfGuiAddBatteryIconSystem(&battery_icon, 10*1000*1000);
int title_text = vlfGuiAddText(240, 50, "BlackBurd");
// vlfGuiSetTextAlignment(title_text, VLF_ALIGNMENT_CENTER);
while(1) {
vlfGuiDrawFrame();
}
sceKernelSleepThread();
return 0;
}
//============================================
// Main program
//============================================
int mini(int sel)
{
switch (sel)
{
case 0:
jesus();
return VLF_EV_RET_REMOVE_HANDLERS | VLF_EV_RET_REMOVE_OBJECTS;
case 1:
sceKernelExitGame();
break;
}
return VLF_EV_RET_NOTHING;
}
int jesus (int sel)
{
vlfGuiAddText(240, 50, "Demo test 2.");
BlackBurd, your's doesn't work too. Compiles but screen stays black:
Code:#include <pspsdk.h>
#include <pspkernel.h>
#include <psppower.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("menu", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
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);
sceKernelRegisterExitCallback(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;
}
#define N_Entries 3
char *MenuItems[] =
{
"ITEM",
"ITEM2",
"ITEM3"
};
int main()
{
SceCtrlData menupad, lastpad;
sceCtrlReadBufferPositive (&lastpad, 1);
int i, selection = 0;
while(1)
{
pspDebugScreenSetXY(0, 0);
printf("Welcome to PROGRAM-NAME\n");
for(i = 0; i < N_Entries; i++)
{
if (i != selection)
printf(" %s\n", MenuItems[i]);
else
printf(" -> %s\n", MenuItems[i]);
}
sceCtrlReadBufferPositive (&menupad, 1);
if (lastpad.Buttons != menupad.Buttons)
{
lastpad.Buttons = menupad.Buttons;
if (menupad.Buttons & PSP_CTRL_DOWN)
{
selection++;
if (selection >= N_Entries)
selection = 0;
}
else if(menupad.Buttons & PSP_CTRL_UP)
{
selection--;
if (selection < 0)
selection = N_Entries - 1;
}
else if(menupad.Buttons & PSP_CTRL_CROSS)
{
break;
}
}
}
return selection;
}
Hahahahaha, I meant my problem with my menu:P You posted one for me on the previous page
but I meant that one didn't work XD
The menu works now, Davee helped me out:D
I have another question again. I have a PRX Plugin now that needs to play MP3 sounds.
It compiles perfect but when I enable it in Recovery Menu and start my PSP the
screen stays black and my PSP turns off.
main.c:
exports.exp:Code:/* PRX psp file */
#include <pspsdk.h>
#include <pspkernel.h>
#include <string.h>
#include <pspsysmem.h>
#include <pspctrl.h>
#include <pspdebug.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <psppower.h>
#include "mp3player.h"
PSP_MODULE_INFO("XMB Music", 0x1000, 1, 1);
PSP_HEAP_SIZE_KB(20480);
#define printf pspDebugScreenPrintf
int main()
{
scePowerSetClockFrequency(333, 333, 166);
pspDebugScreenInit();
pspAudioInit();
SceCtrlData pad;
int i;
MP3_Init(1);
MP3_Load("ms0:/music/music.mp3");
while(1)
{
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS)
{
MP3_Play();
}
else if(pad.Buttons & PSP_CTRL_CIRCLE)
{
MP3_Pause();
for(i=0; i<10; i++)
{
sceDisplayWaitVblankStart();
}
}
if (MP3_EndOfStream() == 1)
{
MP3_Stop();
}
}
MP3_Stop();
MP3_FreeTune();
sceKernelSleepThread();
return 0;
}
/* Exported function returns the address of module_info */
void* getModuleInfo(void)
{
return (void *) &module_info;
}
Makefile:Code:PSP_BEGIN_EXPORTS
# These four lines are mandatory (although you can add other functions like module_stop)
# syslib is a psynonym for the single mandatory export.
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC_HASH(module_start)
PSP_EXPORT_VAR_HASH(module_info)
PSP_EXPORT_END
# Export our function
PSP_EXPORT_START(MyLib, 0, 0x0001)
PSP_EXPORT_FUNC_HASH(getModuleInfo)
PSP_EXPORT_END
PSP_END_EXPORTS
Code:TARGET = musicplugin
OBJS = main.o mp3player.o
# Define to build this as a prx (instead of a static elf)
BUILD_PRX=1
# Define the name of our custom exports (minus the .exp extension)
PRX_EXPORTS=exports.exp
USE_PSPSDK_LIBC = 1
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lmad -lpspaudiolib -lpspaudio -lpsppower
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Just taking one look at your code and I can tell you the problem:
PSP_HEAP_SIZE_KB(20480); allocates all free user memory. I know for a fact that the XMB actually allocates directly to the user memory so if you've allocated it elsewhere then the XMB won't load.
There may be other issues but I've not looked at the code enough to see, I'll update if I find anything else blindly obvious.
-Aura
EDIT:
Another thing, you've selected kernel mode (0x1000) and allocated from user memory, I'm not certain but I don't think thats either possible nor a good idea.
any body know anything about vlf library.
i still need help with the lateral menu.
mo one else seems to know how to do it and im very sure i didnt make a typo because it complies.
my ones always compile but it never shows anything on screen either :Argh:
~!SlasheR!~!