forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

danzeff OSK
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
twuking



Joined: 22 Jun 2006
Posts: 24

PostPosted: Thu Jul 06, 2006 12:54 am    Post subject: Reply with quote

danzeff.h
Code:

#ifndef INCLUDED_KEYBOARDS_DANZEFF_H
#define INCLUDED_KEYBOARDS_DANZEFF_H

//danzeff is BSD licensed, if you do make a new renderer then please share it back and I can add it
//to the original distribution.

//Set which renderer target to build for
/* #define DANZEFF_SDL */
 #define DANZEFF_SCEGU



//the SDL implementation needs the pspctrl_emu wrapper to convert
//a SDL_Joystick into a SceCtrlData
#ifdef DANZEFF_SDL
#include "pspctrl_emu.h"
#else //not DANZEFF_SDL
#include <pspctrl.h>
#endif //DANZEFF_SDL

#ifdef __cplusplus
extern "C" {
#endif

//Initialization and de-init of the keyboard, provided as the keyboard uses alot of images, so if you aren't going to use it for a while, I'd recommend unloading it.
void danzeff_load();
void danzeff_free();

//returns true if the keyboard is initialized
/*bool*/ int danzeff_isinitialized();

/** Attempts to read a character from the controller
* If no character is pressed then we return 0
* Other special values: 1 = move left, 2 = move right, 3 = select, 4 = start
* Every other value should be a standard ascii value.
* An unsigned int is returned so in the future we can support unicode input
*/
unsigned int danzeff_readInput(SceCtrlData pspctrl);
#define DANZEFF_LEFT   1
#define DANZEFF_RIGHT  2
#define DANZEFF_SELECT 3
#define DANZEFF_START  4

//Move the area the keyboard is rendered at to here
void danzeff_moveTo(const int newX, const int newY);

//Returns true if the keyboard that would be rendered now is different to the last time
//that the keyboard was drawn, this is altered by readInput/render.
/*bool*/ int danzeff_dirty();

//draw the keyboard to the screen
void danzeff_render();


///Functions only for particular renderers:

#ifdef DANZEFF_SDL ///Functions only for SDL Renderer
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
//set the screen surface for rendering on.
void danzef_set_screen(SDL_Surface* screen);
#endif //DANZEFF_SDL


#ifdef __cplusplus
}
#endif

#endif //INCLUDED_KEYBOARDS_DANZEFF_H
Back to top
View user's profile Send private message
sandberg



Joined: 05 Oct 2005
Posts: 90
Location: Denmark

PostPosted: Thu Jul 06, 2006 3:24 am    Post subject: Reply with quote

You need to setup the GU correctly and setup the display/framebuffers etc. Which is not done in your program.

Take one of the examples from the pspsdk in the samples/gu directory to see how they're implemented.
_________________
Br, Sandberg
Back to top
View user's profile Send private message
Nerd42



Joined: 10 Jul 2008
Posts: 9

PostPosted: Thu Jul 10, 2008 2:14 am    Post subject: Reply with quote

I want DosBox with this keyboard!! :)
Back to top
View user's profile Send private message Send e-mail
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jul 10, 2008 4:40 am    Post subject: Reply with quote

It's really easy to do. I added danzeff to Basilisk rather easily, and it works well.
Back to top
View user's profile Send private message AIM Address
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Mon Jul 21, 2008 9:58 pm    Post subject: Reply with quote

Hi! :)

I added OSLib to the Danzeff OSK. :)
Here you can find the source and a sample eboot:
http://www.sakya.it/downloads/DanzeffOSLib.rar

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
Ixar



Joined: 26 Sep 2006
Posts: 11

PostPosted: Mon Jul 21, 2008 10:18 pm    Post subject: Reply with quote

I just thought of something, maybe crazy... please tell me.

Would it be possible to hook the input method provided by the psp firmware with OSK ? Do you have such a firmware hook source code somewhere I can see how to do it for the keyboard ?

Thanks.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Tue Jul 22, 2008 10:03 pm    Post subject: Reply with quote

Quote:
Would it be possible to hook the input method provided by the psp firmware with OSK ?

I was doing something similar, but then i leaved it due to lack of time. Pick up prxtool and analyze what functions do program using sony's OSK call (or alternatively, search for some osk homebrew demo). Then implement your own interface and hook old functions with yours (see pikey to learn how to do syscalls hook). If you succeed, please, leave me a note.
Jean
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group