| View previous topic :: View next topic |
| Author |
Message |
diedel
Joined: 22 Sep 2008 Posts: 16
|
|
| Back to top |
|
 |
Wraggster
Joined: 26 Aug 2005 Posts: 121
|
Posted: Thu Sep 25, 2008 6:14 am Post subject: |
|
|
ooh awesome, awesome indeed, opens up a lot of releases and even a possible virtual boy emu and FreeCNC :) _________________ Webmaster of http://www.dcemu.co.uk
DCEMU The Worlds Only Homebrew & Gaming Network of Sites. |
|
| Back to top |
|
 |
[wl]
Joined: 05 May 2006 Posts: 16
|
Posted: Sat Sep 27, 2008 9:22 am Post subject: |
|
|
| looks like now "KQ - the console-style roleplaying game" can be ported to psp? |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
Posted: Sun Oct 19, 2008 6:09 am Post subject: |
|
|
Hi,
a beta version of the library is ready to use. It is possible to add it to the ps2dev svn?
Thanks. |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
|
| Back to top |
|
 |
TehSausage
Joined: 29 Sep 2008 Posts: 3 Location: Australia
|
Posted: Wed Oct 22, 2008 4:23 pm Post subject: |
|
|
Great job, I know how much work it is. (Well, I had no prior PSP programming experience)
You don't seem to have an IR keyboard driver, you can use mine if you want ( Shouldn't be too hard to fix up. Requires kernel mode :( ) - http://tehsausage.com/allegro-psp/download
I think I've pretty much given up on mine now, too lazy to implement scaling etc.
Edit: You could use the timer (and possibly analog mouse) driver from there too, they're not perfect (thread synchronization mainly) but better than nothing. |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
Posted: Thu Oct 23, 2008 6:54 am Post subject: |
|
|
This is my first PSP programming experience too.
As you say it gets much time but actually I have enough of it to spend :) I like this project.
| Quote: |
I think I've pretty much given up on mine now, too lazy to implement scaling etc. |
You know the projects are never finished :) so you can continue anytime.
| Quote: | | Edit: You could use the timer (and possibly analog mouse) driver from there too, they're not perfect (thread synchronization mainly) but better than nothing. |
Thanks man, I appreciate your friendly help. Technically, joining our codes the port is near complete :)
Greetings! |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
|
| Back to top |
|
 |
NoEffex
Joined: 27 Nov 2008 Posts: 108
|
Posted: Wed Jan 21, 2009 3:43 pm Post subject: |
|
|
Very, very good deal. _________________ Programming with:
Geany + Latest PSPSDK from svn |
|
| Back to top |
|
 |
blu_eye4
Joined: 26 Oct 2008 Posts: 37
|
Posted: Sat Jan 24, 2009 9:26 pm Post subject: |
|
|
Great!!!
Now, I need to ask you a question... Can you work a porting of your library for Nanodesktop? I hope that you accept... You can contact me at cameracafffe@live.it for further informations... |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
Posted: Mon Jan 26, 2009 12:33 am Post subject: |
|
|
| What's Nanodesktop? |
|
| Back to top |
|
 |
Gefa
Joined: 13 Aug 2008 Posts: 12 Location: Italy
|
|
| Back to top |
|
 |
blu_eye4
Joined: 26 Oct 2008 Posts: 37
|
Posted: Mon Jan 26, 2009 3:27 am Post subject: |
|
|
| Exact! Nanodesktop is the most important PSPSDK... your Allegro Library is very very important... if you accept, we can create all what we want... scientific application, games, emulators :) |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
Posted: Fri Feb 20, 2009 7:07 am Post subject: |
|
|
Thanks sauron_le_noir.
I'll add it to the last version of the library.
I wrote you a PM.
Cya. |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sat Feb 21, 2009 1:30 am Post subject: |
|
|
| you are welcome. Allegro is a great library |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Apr 08, 2009 9:32 am Post subject: Re: Allegro 4.3.10plus PSP port |
|
|
Download link on the above page no longer works. |
|
| Back to top |
|
 |
diedel
Joined: 22 Sep 2008 Posts: 16
|
Posted: Sun Apr 12, 2009 11:48 pm Post subject: |
|
|
The download links from the entire blog are working again.
Big thanks J.F. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Apr 13, 2009 6:49 am Post subject: |
|
|
| The link is indeed working again. Thanks! :) |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Wed Apr 15, 2009 5:19 am Post subject: |
|
|
Just a little correction in de mouse driver.
| Code: | /* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* PSP mouse driver.
* TODO:.
*
* By sauron_le_noir some part of psp_mouse_timer_poll based on
* the sdl code of Nekuz0r
*
* See readme.txt for copyright information.
*/
#include "allegro.h"
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintpsp.h"
#include "math.h"
#include <pspctrl.h>
#ifndef ALLEGRO_PSP
#error something is wrong with the makefile
#endif
static int psp_mouse_init(void);
static void psp_mouse_exit(void);
static void psp_mouse_position(int, int);
static void psp_mouse_set_range(int, int, int, int);
static void psp_mouse_get_mickeys(int *, int *);
static void psp_mouse_timer_poll(void);
MOUSE_DRIVER mouse_psp =
{
MOUSE_PSP,
empty_string,
empty_string,
"psp mouse",
psp_mouse_init,
psp_mouse_exit,
NULL, // AL_METHOD(void, poll, (void));
psp_mouse_timer_poll, // AL_METHOD(void, timer_poll, (void));
psp_mouse_position,
psp_mouse_set_range,
NULL, // AL_METHOD(void, set_speed, (int xspeed, int yspeed));
psp_mouse_get_mickeys,
NULL, // AL_METHOD(int, analyse_data, (AL_CONST char *buffer, int size));
NULL, // AL_METHOD(void, enable_hardware_cursor, (AL_CONST int mode));
NULL // AL_METHOD(int, select_system_cursor, (AL_CONST int cursor));
};
static int mouse_minx = 0;
static int mouse_miny = 0;
static int mouse_maxx = 479; /* 0 to 479 = 480 */
static int mouse_maxy = 271; /* 0 to 272 = 272 */ /* 480x272 is the resolution of the psp display */
static int mymickey_x = 0;
static int mymickey_y = 0;
static SceCtrlData pad;
static int aStickX = 0;
static int aStickY = 0;
static float aStickR;
static float aStickA;
static int x,y;
static float Precision = 360.0f;
static int getSqrRadius(int X, int Y)
{
return sqrt((X * X) + (Y * Y));
}
static int psp_mouse_init(void)
{
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
}
static void psp_mouse_timer_poll(void)
{
sceCtrlPeekBufferPositive(&pad, 1);
if (pad.Buttons != 0)
{
sceCtrlReadBufferPositive(&pad, 1);
_mouse_b = 0;
if (pad.Buttons & PSP_CTRL_LTRIGGER) _mouse_b = 1;
if (pad.Buttons & PSP_CTRL_RTRIGGER) _mouse_b = 2;
if ( (pad.Buttons & PSP_CTRL_LTRIGGER) && (pad.Buttons & PSP_CTRL_RTRIGGER)) _mouse_b = 4;
}
aStickX = pad.Ly - 128;
aStickY = pad.Lx - 128;
aStickR = getSqrRadius(aStickX, aStickY);
if (aStickR > 100) {
if (getSqrRadius(aStickX, aStickY) > 30) {
aStickA = ((atan2f(aStickX, -aStickY) + M_PI) / (M_PI * 2)) * Precision;
} else {
aStickA = -1;
}
//1° a 89°
if (aStickA >= 1 && aStickA <= (89 * (Precision / 360.0f))) {
x += (10 * (1 - (aStickA / (Precision / 360.0f) / 90)));
y -= (10 * (0 + (aStickA / (Precision / 360.0f) / 90)));
}
else if (aStickA >= (91 * (Precision / 360.0f)) && aStickA <= (179 * (Precision / 360.0f))) {
x -= (10 * (0 + (((aStickA / (Precision / 360.0f)) - 89) / 90)));
y -= (10 * (1 - (((aStickA / (Precision / 360.0f)) - 89) / 90)));
}
else if (aStickA >= (181 * (Precision / 360.0f)) && aStickA <= (269 * (Precision / 360.0f))) {
x -= (10 * (1 - (((aStickA / (Precision / 360.0f)) - 179) / 90)));
y += (10 * (0 + (((aStickA / (Precision / 360.0f)) - 179) / 90)));
}
else if (aStickA >= (271 * (Precision / 360.0f)) && aStickA <= (359 * (Precision / 360.0f))) {
x += (10 * (0 + (((aStickA / (Precision / 360.0f)) - 269) / 90)));
y += (10 * (1 - (((aStickA / (Precision / 360.0f)) - 269) / 90)));
}
else if (aStickA == 0) {
x += 10;
}
else if (aStickA == (90 * (Precision / 360.0f))) {
y -= 10;
}
else if (aStickA == (180 * (Precision / 360.0f))) {
x -= 10;
}
else if (aStickR == (270 * (Precision / 360.0f))) {
y += 10;
}
}
if (x < 0)
x = 0;
if (x > 479)
x = 479;
if (y < 0)
y = 0;
if (y > 271)
y = 271;
_mouse_x = x;
_mouse_y = y;
}
static void psp_mouse_position(int x, int y)
{
_mouse_x = x;
if (_mouse_x < mouse_minx) _mouse_x = 0;
if (_mouse_x > mouse_maxx) _mouse_x = mouse_maxx;
_mouse_y = y;
if (_mouse_y < mouse_miny) _mouse_y = 0;
if (_mouse_y > mouse_maxy) _mouse_y = mouse_maxy;
}
static void psp_mouse_set_range(int x1, int y1, int x2, int y2)
{
}
static void psp_mouse_get_mickeys(int *mickeyx, int *mickeyy)
{
*mickeyx = 0;
*mickeyy = 0;
}
static void psp_mouse_exit(void)
{
}
|
it limit the mouse correctly to 0..479 and 0.271 |
|
| Back to top |
|
 |
DanielC
Joined: 11 Jul 2008 Posts: 40 Location: Australia
|
Posted: Thu Apr 16, 2009 1:02 pm Post subject: |
|
|
Sorry if this is off topic, but i'm just curious...
Is this in anyway related to the legendary Allegro graphics/gaming library from back in the MS-DOS days (which is still maintained today)? Or is the same name purely coincedental..?
EDIT: Sorry, you failed to mention that this is a port of THE Allegro library. WOW. Well done! Very awesome! _________________ Regards,
Daniel C |
|
| Back to top |
|
 |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Mon Apr 20, 2009 4:04 am Post subject: |
|
|
@diedel:
In any case, I'm writing a new version of Nanodesktop that shall
support sprites. I thought that this can be useful in an Allegro
porting. I've open a thread in this forum for the proof of concept.
Here a screenshot:
http://img82.imageshack.us/img82/6527/screenshotftk.png
I hope that you can create a version of ndAllegro in the future...
:) |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Tue Apr 21, 2009 5:38 am Post subject: |
|
|
| DanielC it is indeed this library that have been ported to the psp |
|
| Back to top |
|
 |
slasher2661996
Joined: 22 Feb 2009 Posts: 91 Location: Melbourne Australia ZOMG
|
Posted: Tue Apr 21, 2009 7:11 pm Post subject: |
|
|
| Mind telling me what this is used for? |
|
| Back to top |
|
 |
whistler
Joined: 04 Mar 2008 Posts: 40
|
Posted: Tue Oct 06, 2009 1:05 am Post subject: |
|
|
| thanks for porting allegro:) btw are you working on making the addons(allegroGL, jpgalleg, loadpng, logg) usable with the psp. From what i can see all the dependencies like libpng, jpeg, zlib, ogg and pspgl(which is basically a subset of opengl) are already in the svn repo |
|
| Back to top |
|
 |
Josh1billion

Joined: 12 Jul 2005 Posts: 32 Location: Wisconsin, USA
|
Posted: Fri Jan 01, 2010 5:34 pm Post subject: |
|
|
Is it possible to install this on Windows alongside MinPSPW? _________________ Josh1billion - PHP, C++, PSP programmer. |
|
| Back to top |
|
 |
|