After some testing I can init the internal osk.
I have not idea about the most fields but it works. You can improve it and add to the sdk.
http://zcom.sytes.net/tee/tutorials/psposk/psposk.zip
Sony PSP OSK
Sony PSP OSK
http://emergencyexit.untergrund.net - Quake 2 PSP
heres a mirror http://MIRROR.ftpz.us/http://zcom.sytes ... psposk.zip
Thanks, it's very useful.
But i have found some bugs with osk :
- If the thread that calls osk functions is kernel thread, this doesn't work, you must call it with user thread.
- If the flash1 is assigned as read only, the osk is showed but the messages aren't showed.
And here some fields found :
typedef struct PspOskData_s {
int unk_00;
int unk_04;
int language;
int unk_12;
int unk_16; // This is charset type (0 = all, 1 = number, ...)
int lines;
int unk_24;
unsigned short* desc;
unsigned short* intext;
int outtextlength;
unsigned short* outtext;
int rc;
int outtextlimit;
} PspOskData;
typedef struct PspOsk_s {
unsigned int size;
int language;
int buttonswap;
int unk_12; // set 17
int unk_16; // set 19
int unk_20; // set 18
int unk_24; // set 16
int rc;
int unk_32;
int unk_36;
int unk_40;
int unk_44;
int unk_48; // Number of datas
PspOskData* data; // Array of data
int unk_56;
int unk_60;
} PspOsk;
But i have found some bugs with osk :
- If the thread that calls osk functions is kernel thread, this doesn't work, you must call it with user thread.
- If the flash1 is assigned as read only, the osk is showed but the messages aren't showed.
And here some fields found :
typedef struct PspOskData_s {
int unk_00;
int unk_04;
int language;
int unk_12;
int unk_16; // This is charset type (0 = all, 1 = number, ...)
int lines;
int unk_24;
unsigned short* desc;
unsigned short* intext;
int outtextlength;
unsigned short* outtext;
int rc;
int outtextlimit;
} PspOskData;
typedef struct PspOsk_s {
unsigned int size;
int language;
int buttonswap;
int unk_12; // set 17
int unk_16; // set 19
int unk_20; // set 18
int unk_24; // set 16
int rc;
int unk_32;
int unk_36;
int unk_40;
int unk_44;
int unk_48; // Number of datas
PspOskData* data; // Array of data
int unk_56;
int unk_60;
} PspOsk;
hmmmm.....This is sweet and all, but the example shown I dislike very much (lol). Not the best commenting and its hard to edit certain things ex: make the out put of the text go from unsigned short into a buffer (but my trusty friend sprintf).
'I' cannot relaly see whats going on but it works, so I just change and delete and add things here and there to see what happens
ALSO, where you said
data.language = 2; // english
that is the language output and ONLY KEYPAD buttons are english, where
osk.language = 1; // originally 2
is the actual OSK language (the help button and enter buttons are in english), when 2, its spanish, 1 =english, 0 = japenese, etc.
osk.buttonswap = 1; // originally 0
When 1, the O adn X are swapped, and since the PSP was made in japan (yes?) they thought X as enter was opposite so buttons swapped is 'true' or '1' so it makes sense.
Hope that helps anyone who had issues with what I did, hope some one makes a better and easy to understand example where it is fully documented. (no offense to the example made by McZonk as it is pretty sweet having this keyboard)
'I' cannot relaly see whats going on but it works, so I just change and delete and add things here and there to see what happens
ALSO, where you said
data.language = 2; // english
that is the language output and ONLY KEYPAD buttons are english, where
osk.language = 1; // originally 2
is the actual OSK language (the help button and enter buttons are in english), when 2, its spanish, 1 =english, 0 = japenese, etc.
osk.buttonswap = 1; // originally 0
When 1, the O adn X are swapped, and since the PSP was made in japan (yes?) they thought X as enter was opposite so buttons swapped is 'true' or '1' so it makes sense.
Hope that helps anyone who had issues with what I did, hope some one makes a better and easy to understand example where it is fully documented. (no offense to the example made by McZonk as it is pretty sweet having this keyboard)
-
- Posts: 87
- Joined: Mon Jan 08, 2007 12:16 pm
- Location: Australia
i would really love to see this work in my program but i dont really have a clue how to set it all up,
i have these in so far
now my problem is how do i use all this
i want a function called keyboard() that displays this keyboard, makes it work and then stores the entered text in a char * array, then shuts the keyboard down allowing my program to return to it previous place
thanks in advance
i have these in so far
Code: Select all
#include <psputility_osk.h>
SceUtilityOskParams * myKeyboard;
SceUtilityOskData * myKeyboardData;
SceOskState keyboardState;
i want a function called keyboard() that displays this keyboard, makes it work and then stores the entered text in a char * array, then shuts the keyboard down allowing my program to return to it previous place
thanks in advance