| View previous topic :: View next topic |
| Author |
Message |
twuking
Joined: 22 Jun 2006 Posts: 24
|
Posted: Thu Jul 06, 2006 12:54 am Post subject: |
|
|
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 |
|
 |
sandberg
Joined: 05 Oct 2005 Posts: 90 Location: Denmark
|
Posted: Thu Jul 06, 2006 3:24 am Post subject: |
|
|
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 |
|
 |
Nerd42
Joined: 10 Jul 2008 Posts: 9
|
Posted: Thu Jul 10, 2008 2:14 am Post subject: |
|
|
| I want DosBox with this keyboard!! :) |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Jul 10, 2008 4:40 am Post subject: |
|
|
| It's really easy to do. I added danzeff to Basilisk rather easily, and it works well. |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
|
| Back to top |
|
 |
Ixar
Joined: 26 Sep 2006 Posts: 11
|
Posted: Mon Jul 21, 2008 10:18 pm Post subject: |
|
|
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 |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Tue Jul 22, 2008 10:03 pm Post subject: |
|
|
| 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 |
|
 |
|