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?
p_sprint in nanox / microwindows
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)
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)
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: Select all
/* 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*/
};
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).
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).