| View previous topic :: View next topic |
| Author |
Message |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Fri Apr 25, 2008 8:06 pm Post subject: [SOLVED] Help with danzeff osk |
|
|
I've read akll the post in this forum about this argument but there isn't a completely answer, i'haven't find a example for the danzeff osk function,
there is only a readme!
My question is:
How to load the osk and write to screen the caracter pressed? _________________ Get Xplora!
Last edited by ne0h on Tue Apr 29, 2008 11:22 pm; edited 1 time in total |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Apr 26, 2008 1:03 am Post subject: |
|
|
I've writed this code, but nothing appear on the screen!
| Code: |
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspdebug.h>
#include <pspgu.h>
#include <pspgum.h>
#include <callbacks.h>
#include <pspaudio.h>
#include <SDL/SDL.h>
#include <pspsdk.h>
#include "danzeff.h"
PSP_MODULE_INFO("ajkfadfjk", 0, 1, 1);
#define printf pspDebugScreenPrintf
int main()
{
SetupCallbacks();
pspDebugScreenInit();
int n;
SceCtrlData pspctrl;
void danzeff_load();
printf("Inizio");
while(1){
danzeff_dirty();
n = danzeff_readInput(pspctrl);
printf("%c",n);
void danzeff_render();
}
sceKernelSleepThread();
}
|
Makefile
| Code: |
TARGET = file
OBJS = main.o danzeff.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspgu -lpspgum -lpsppower -lpng -lz -lm -lsdl -lz -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpsputility -lpspuser -lpspkernel -lpsphprm_driver
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Background Changer
include $(PSPSDK)/lib/build.mak
|
Why? _________________ Get Xplora! |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Apr 26, 2008 1:35 am Post subject: |
|
|
Where i can find a example to use the sony built-in osk? _________________ Get Xplora! |
|
| Back to top |
|
 |
pspZorba
Joined: 22 Sep 2007 Posts: 156 Location: NY
|
Posted: Sat Apr 26, 2008 2:08 am Post subject: |
|
|
For PSPlorer I wrote a simple class to use the sony virtual key board have a look in the sources.
Or I wrote a sample that you can download it here
If you can read French there are more explanations here _________________ --pspZorba--
NO to K1.5 ! |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Sat Apr 26, 2008 2:39 am Post subject: |
|
|
| pspZorba wrote: | For PSPlorer I wrote a simple class to use the sony virtual key board have a look in the sources.
Or I wrote a sample that you can download it here
If you can read French there are more explanations here |
You should translate your pages into english...They seem to be good.... _________________ Ciao! from Italy |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Apr 26, 2008 2:57 am Post subject: |
|
|
I'm writing my programm in C, not C++ and when i try to compile i've a error.
So i try to modify the src and write a my C function...
If is possible has anyone this simple function in C? _________________ Get Xplora! |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Apr 26, 2008 3:09 am Post subject: |
|
|
or can i make a prx to load with arg?
Arg1=already putted text in the key board
return=final text in the key board
Excuse me for my english! :( _________________ Get Xplora! |
|
| Back to top |
|
 |
pspZorba
Joined: 22 Sep 2007 Posts: 156 Location: NY
|
Posted: Sat Apr 26, 2008 3:41 am Post subject: |
|
|
thx phobox,
Yes I have been asked to translate them, it's on the way .. _________________ --pspZorba--
NO to K1.5 ! |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Apr 26, 2008 4:13 am Post subject: |
|
|
| ne0h wrote: | I've writed this code, but nothing appear on the screen!
| Code: |
void danzeff_load();
printf("Inizio");
while(1){
danzeff_dirty();
n = danzeff_readInput(pspctrl);
printf("%c",n);
void danzeff_render();
}
| Why? | Because you're not calling danzeff_load or danzeff_render, you're declaring prototypes. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Apr 26, 2008 4:50 am Post subject: |
|
|
if i put danzeff_load(); i've have a error:
undeclared reference to danzeff_load(); _________________ Get Xplora! |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sat Apr 26, 2008 10:08 am Post subject: |
|
|
Because you didn't #include the danzeff include files, and/or you didn't link with the danzeff library.
By adding 'void' you've removed the calls entirely!
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Sat Apr 26, 2008 7:14 pm Post subject: |
|
|
| AAAAAAAAAAARRRRRRRGHHHHHHHHHH LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C!!!!!!!!!!!!!!!!!!!!!!!!!!!! damn #*?!_;à |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Apr 27, 2008 12:00 pm Post subject: |
|
|
| jean wrote: | | AAAAAAAAAAARRRRRRRGHHHHHHHHHH LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C,LEARN C!!!!!!!!!!!!!!!!!!!!!!!!!!!! damn #*?!_;à |
Don't hold back - tell us how you really feel. :)
ne0h: if you don't know the difference between "void do_something();" and "do_something()", you probably need a few more lessons in C before trying to do your own PSP program. Not an insult, just a recognition of general ability. Programming the PSP requires you to be proficient in C and maybe C++. You don't seem to have the proper proficiency yet. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Apr 27, 2008 6:29 pm Post subject: |
|
|
See the makefile and the src, i've included "danzeff.h" library and linked danzeff.c (danzeff.o) but the compiler don't find the declaration of danzeff_load, i've writed void danzeff_load(); to jump over this function and see what appen!
The daclaration of danzeff_load(); is in the danzeff.h and danzeff.c library, why the compiler don't find the declaration?
This error i only for this function:
danzeff_load();
danzeff_render();
another function works perfectly! (danzeff_dirty(); works perfectly!!! )
Can anyone give me an example to load the osk? _________________ Get Xplora! |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Apr 27, 2008 7:46 pm Post subject: |
|
|
Doom for the PSP uses the OSK.
http://groups.google.com/group/chilly-willys-ice-flow/web/doom-for-the-psp?hl=en
You'll note that it does two waits on the vblank in the OSK loop - the OSK is "twitchy" if you call it at 60 Hz. It feels MUCH better at 30 Hz. It's something I keep mentioning to sakya about his interface on LightMP3, but he hasn't changed it yet. ;) :) |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Apr 27, 2008 8:05 pm Post subject: |
|
|
Thanks,
excuse me but piKey0.4 is a osk, isn't it?
Can i use it? _________________ Get Xplora! |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Mon Apr 28, 2008 12:05 am Post subject: |
|
|
I've the function in C++ for load the built-in osk, i've compiled the eboot correctly, but i can not integrate this function in my code because i'm writing my prog in C, i've think to build a prx that can load with arg (the already present text) and return the value of the string writed;
I've writed an example:
| Code: |
//--- various include
#define printf pspDebugScreenPrintf
#define RGB(r, g, b) ((r)|((g)<<8)|((b)<<16))
PSP_MODULE_INFO("PSP_Explorer", 0, 1, 1);
char main(char* argc, char **argv[])
{
pspDebugScreenInit();
printf("%s", argv[1]);
char returnstring[128]="String returned";
return returnstring;
}
|
And load the PRX with sceKernelLoadStartModuleWithArgs(1, "String args");
but how to capture the return of the main function in the prx?
Is possible to do what i've writed?
Excuse me is this function in not correctly but i didn't know good the function to load a prx etc... _________________ Get Xplora! |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Apr 28, 2008 6:02 am Post subject: |
|
|
| ne0h wrote: | Thanks,
excuse me but piKey0.4 is a osk, isn't it?
Can i use it? |
Pikey is NOT an OSK - rather, it is a plugin that lurks in the background until you try to use the Sony OSK, then it generates fake button inputs when you type on an IR keyboard to simulate the user using the dpad/buttons to select the corresponding letters in the OSK. When in a game or app, certain keys can also be used to simulate pressing the dpad, buttons, or analog stick, allowing one to control the app via the IR keyboard. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Tue Apr 29, 2008 2:25 am Post subject: |
|
|
Thanks! _________________ Get Xplora! |
|
| Back to top |
|
 |
everlasting
Joined: 19 Mar 2007 Posts: 41
|
Posted: Tue Apr 29, 2008 6:24 pm Post subject: |
|
|
| Correct if i am wrong, i made a program with the danzeff osk like a year ago so i could be wrong. Apart from the void stuff you haven't even started the graphic interface with gustart as the readme of the danzeff says you have to. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Tue Apr 29, 2008 11:21 pm Post subject: |
|
|
I have already do this, but the compiler can't find the danzeff_load(); funct...
However i'm writing a new osk for my programm, thanks! _________________ Get Xplora! |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Wed Apr 30, 2008 10:26 pm Post subject: |
|
|
Because you've still not linked the danzeff lib. I can't wait to see what you come up with.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
|