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 

p_sprint in nanox / microwindows

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue Aug 23, 2005 6:09 am    Post subject: p_sprint in nanox / microwindows Reply with quote

I successfully compiled p_sprint into the mouse and keyboard driver for microwindows.

Although I haven't got a (charged - left my charger somewhere :s) PSP handy, darkshadow88 has helped me to test this and get it to work.

I don't have svn write access but will post here when it works fully (nearly there) for those who are interested.

Is anyone even interested? :D Or is the whole Microwindows thing a dead-end anyway?
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue Aug 23, 2005 8:25 am    Post subject: Reply with quote

Ok, here's the result of our work so far: a 1.0 Eboot of the Microwindows MDEMO with p-sprint enabled.

Right now it only simulates the ASCII values of keys you press, not scancodes or modifiers (but in p-sprint you can still type CTRL-X and stuff like that, just software in Microwindows that looks at modifier status solely can't do anything with it), so F1 or Left won't work yet. We couldn't figure out yet how Microwindows handles the scancodes or the modifiers properly, and make them compatible with p-sprint, so that'll come later.

Here's the download:
http://www.niwra.nl/psp/p-sprint-c/MDEMOP_SP.rar

The download includes the three files you need to update in the microwindows/src/drivers folder, and the p-sprint files you need to copy there. P-sprint has also been edited, as it reset the controller reads during its own init, which it shouldn't be doing when it reads alongside with the mouse driver or other drivers - in other words, when using p_spReadKeyEx. So that was fixed in this version (which will be released as 0.63a)
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue Aug 23, 2005 10:09 pm    Post subject: Reply with quote

I see that nano-x has a pretty different set of scancodes. So I'll have to add a mapping option to fix this to p-sprint to get the control keys to work. Will do that tomorrow

Code:
/* Standard keymapings for kernel values */

static MWKEY      keymap[128] = {
MWKEY_UNKNOWN, MWKEY_ESCAPE, '1', '2', '3',            /* 0*/
'4', '5', '6', '7', '8',                  /* 5*/
'9', '0', '-', '=', MWKEY_BACKSPACE,               /* 10*/
MWKEY_TAB, 'q', 'w', 'e', 'r',                  /* 15*/
't', 'y', 'u', 'i', 'o',                  /* 20*/
'o', '[', ']', MWKEY_ENTER, MWKEY_LCTRL,            /* 25*/
'a', 's', 'd', 'f', 'g',                  /* 30*/
'h', 'j', 'k', 'l', ';',                  /* 35*/
'\'', '`', MWKEY_LSHIFT, '\\', 'z',               /* 40*/
'x', 'c', 'v', 'b', 'n',                  /* 45*/
'm', ',', '.', '/', MWKEY_RSHIFT,               /* 50*/
MWKEY_KP_MULTIPLY, MWKEY_LALT, ' ', MWKEY_CAPSLOCK, MWKEY_F1,       /* 55*/
MWKEY_F2, MWKEY_F3, MWKEY_F4, MWKEY_F5, MWKEY_F6,          /* 60*/
MWKEY_F7, MWKEY_F8, MWKEY_F9, MWKEY_F10, MWKEY_NUMLOCK,       /* 65*/
MWKEY_SCROLLOCK, MWKEY_KP7, MWKEY_KP8, MWKEY_KP9, MWKEY_KP_MINUS,   /* 70*/
MWKEY_KP4, MWKEY_KP5, MWKEY_KP6, MWKEY_KP_PLUS, MWKEY_KP1,       /* 75*/
MWKEY_KP2, MWKEY_KP3, MWKEY_KP0, MWKEY_KP_PERIOD, MWKEY_UNKNOWN,    /* 80*/
MWKEY_UNKNOWN, MWKEY_UNKNOWN, MWKEY_F11, MWKEY_F12, MWKEY_UNKNOWN,   /* 85*/
MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,   /* 90*/
MWKEY_UNKNOWN, MWKEY_KP_ENTER, MWKEY_RCTRL, MWKEY_KP_DIVIDE,MWKEY_PRINT,/* 95*/
MWKEY_RALT, MWKEY_BREAK, MWKEY_HOME, MWKEY_UP, MWKEY_PAGEUP,      /* 100*/
MWKEY_LEFT, MWKEY_RIGHT, MWKEY_END, MWKEY_DOWN, MWKEY_PAGEDOWN,      /* 105*/
MWKEY_INSERT, MWKEY_DELETE, MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,   /* 110*/
MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_PAUSE,   /* 115*/
MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,   /* 120*/
MWKEY_LMETA, MWKEY_RMETA, MWKEY_MENU               /* 125*/
};
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Thu Aug 25, 2005 4:34 pm    Post subject: Reply with quote

I tested a simple switch conversion and that seems to work. But I'll add something to p-sprint itself, either a mode to be able to change the keycode mappings or maybe even a microwindows specific mode, to optimise speed.

Unfortunately Microwindows seems to be rough in some areas. The edit and medit controls (single and multiline textboxes) don't seem to work at all with variable width fonts, and from the looks of it, they never have either, as when asking the font width and height they always simply pas an "X", never the actual character(s) they were looking at.

This causes the cursor to be completely out of step. But the text itself is printed ok (well, almost, except the e is clipped slightly) so somewhere something must work. I'm afraid that it will need some serious work; I couldn't find out yesterday what the problem was (but then I'm a n00b).
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
Page 1 of 1

 
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