| View previous topic :: View next topic |
| Author |
Message |
nakuribon
Joined: 10 Jul 2006 Posts: 5
|
Posted: Sun Jul 16, 2006 6:25 am Post subject: |
|
|
its a windows console application, you have to use it from the command line.
hit start, click run, type "cmd" (no quotes of course), hit enter, get to the Tools directory using a bunch of "cd" commands, type font2osl -convert "FONT NAME HERE" SIZE "BITMAP FILE" "TEXT FILE" and then font2osl -create "BITMAP FILE" "TEXT FILE" "OFT FILE" |
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Thu Sep 14, 2006 6:40 am Post subject: |
|
|
Sorry guys for not being active... I'm really busy these times. But now it's okay.
I've worked quite a bit on the library in between but never had time to release it.
You can download here the SOURCE CODE (only source files, nothing else like installation package are provided):
http://oslib.palib.info/OSLib_src.zip
This is the latest version source code, a lot in advance compared to the actual distributed version. I'll update it later, but I'm facing some problems regarding backward compatibility.
The advantage of using OSLib like this is that you can easily extend it (without even touching to OSLib's source code) with what you need for your project. For example, if you want to create your own map routine with special mirror handling, you can just take the OSLib oslDrawMap one and slightly modify it. PSP's GPU is sequencial and thus such things are really easy to do without screwing your project. You can for example do:
| Code: | oslStartDrawing();
oslClearScreen(0);
sceGuDisable(GU_DITHER); //Enable dithering
oslDrawImage(myImage); //Draw this without dithering
sceGuEnable(GU_DITHER); //Dithering will be used then
oslDrawGradientRect(0, 0, 480, 272, 0, 0, 255, 255);
oslEndDrawing(); |
Hope this will help in your project. If you are wanting to help in any way, for example by enhancing the current library, you are welcomed. Please tell me ;-) _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Tue Oct 10, 2006 4:08 am Post subject: |
|
|
Nobody is interested? :'(
Is there still somebody using this library? Do you have some suggestion or anything? _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
bronxbomber92
Joined: 21 Jul 2006 Posts: 36
|
Posted: Tue Oct 10, 2006 6:06 am Post subject: |
|
|
I'm interested :)
But how would I install this? Its different then installing another library, isn't it? I started a bunch of lua games a long time ago, and never released them. I would like to change them over to c using OSLib :) in spare time from my emu and 3D stuff :)
Thanks for you work! Just need to instal it :p
Btw, I'm on Mac OS X |
|
| Back to top |
|
 |
snowymydog
Joined: 15 Sep 2006 Posts: 2
|
Posted: Tue Oct 10, 2006 10:31 am Post subject: |
|
|
Hey Brunni, I'm using OSL. It's great.
Sci-Fi yoyo is powered by OSL, and my new project is using OSL too. I can't live without OSL, cause I know nothing about GU.
When I finished my new project, I want to release an OSL extension. Of course, I'll send the source to you and wait for your authorization. If you think it sucks, I won't release it.
Thanks for your work, don't stop updating OSLIB. :P |
|
| Back to top |
|
 |
bronxbomber92
Joined: 21 Jul 2006 Posts: 36
|
Posted: Sat Oct 14, 2006 7:35 am Post subject: |
|
|
| So, can anyone confirm wether this can be installed on Mac OS X? |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Sun Oct 15, 2006 12:07 am Post subject: |
|
|
| Brunni wrote: | Nobody is interested? :'(
Is there still somebody using this library? Do you have some suggestion or anything? |
I still use this WONDERFULL lib !
But I still use the older release, what's new in the latest sources ?
You said we have to compil it and that there's no install script but I can see install.bat and a bunch of cygwin compiled libs (*.a) into the archive. Would be great id you could provide a bit more infos.
Thanks :) |
|
| Back to top |
|
 |
Soily
Joined: 17 Oct 2006 Posts: 2
|
Posted: Tue Oct 17, 2006 8:36 am Post subject: |
|
|
Salut/Hello Brunni!
I'm getting started on PSP development, and your library is exactly what I was looking for! I "accidentally" found it while trying to solve an SDL_ttf installation problem, and I'm very happy about that discovery.
So far, I've only played around with it a little bit, testing simple stuff (displaying images, basic controls...), but it really seems to be great, yet simple to use.
So, thank you for making this library and for releasing it. I definitely hope that you will continue working on it, improving and extending it!
Besides (for forum moderators), I think it would be nice if this topic was sticky'd, or if there was a sticky thread with a list of libraries available for PSP developpers (with links and basic info). I think it would be quite useful.
++
Soily |
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Wed Oct 18, 2006 1:57 am Post subject: |
|
|
Thanks for support :)
In fact I "left" the scene for a while for some reasons (I'm beginning new studies) and when I came again I thought it was completely dead :(
So I'm happy that some people are still using it ^^
It will motivate me to update it, when I get some time (sorry for that, but I've got lot of things to do). If some people are willing to realize "extensions", that would be great, and if you need some code from my side to support doing it in a more generic way, just ask me ;-)
The best thing possible would be that it's just "plug-in-able" without weighting up the whole library for users who don't use it :-)
I just need to find a bit of time to update it. Btw I've uploaded the latest version of the zip, which contains the updated version. There are a lot of fixes, I should update the documentation as well, but I've got so few time now :-( For now, just look at the source (updated as well) if you're wondering how something is working, or just ask here ;-)
And about installation, in fact you have to do the following:
- Locate the standard library folder of your PSPSDK, should be /usr/local/pspdev/psp/sdk/lib.
- Copy to this folder the files libosl.a, libz.a and libpng.a
- Locate the include folder, should be /usr/local/pspdev/psp/sdk/include
- Create an OSLib folder there
- Copy the following files: audio.h, oslib.h, text.h, usb.h, vfpu.h, vfpu_ops.h.
Hope it helps.
http://oslib.palib.info/OSLib.zip
Brunni _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Wed Oct 18, 2006 2:33 am Post subject: |
|
|
| Thank for the tip. Anyway I switched my psp dev environment to linux, so I've to recompile your lib :) |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Wed Oct 18, 2006 5:55 am Post subject: |
|
|
I've a compile error:
| Code: | psxdev@debianv:~/OSLib_src$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o blit.o blit.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o oslib.o oslib.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o vfpu.o vfpu.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o text.o text.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o stub.o stub.S
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -D_DEBUG -DPSP -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -c -o audio.o audio.c
audio.c: In function 'oslAudioChannelThread':
audio.c:88: error: 'struct <anonymous>' has no member named 'volumeleft'
audio.c:88: error: 'struct <anonymous>' has no member named 'volumeright'
make: *** [audio.o] Error 1
|
I have the latest toolchain and sdk compiled from svn.
Any idea ? |
|
| Back to top |
|
 |
johnsto
Joined: 18 Jan 2006 Posts: 30
|
Posted: Thu Oct 19, 2006 3:48 am Post subject: |
|
|
Brunni I'm still using it!
Something I added to the library myself was loading PNG images from an unsigned char array (so I can compile them all into the eboot). The basic code is at the bottom if anyone wants it.
It would be pretty cool if the same could be done for .wav's and .bgm's? (I had a go but got scared).
Also network support would be nice but I guess that's not the point of the library.
| Code: |
typedef struct {
unsigned char *buffer;
int pos;
} memp_t;
void oslPngReadMemFn(png_structp png_ptr, png_bytep data, png_size_t length) {
memp_t *array = (memp_t*)png_get_io_ptr(png_ptr);
memcpy(data, array->buffer + array->pos, length);
array->pos += length;
}
OSL_IMAGE *oslLoadImagePNG(unsigned char* data, int location, int pixelFormat)
{
const size_t nSigSize=8;
OSL_IMAGE *p_texture = NULL;
memp_t mp;
mp.pos = 0;
mp.buffer = data;
mp.pos += nSigSize;
if ( png_check_sig( data, nSigSize ) == 0 )
{
goto error;
}
png_struct * pPngStruct = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
if ( pPngStruct == NULL)
{
goto error;
}
png_info * pPngInfo = png_create_info_struct( pPngStruct );
if ( pPngInfo == NULL )
{
png_destroy_read_struct( &pPngStruct, NULL, NULL );
goto error;
}
if ( setjmp( pPngStruct->jmpbuf ) != 0 )
{
png_destroy_read_struct( &pPngStruct, NULL, NULL );
goto error;
}
p_texture = 1;
png_set_read_fn(pPngStruct, (png_voidp)&mp, (png_rw_ptr)oslPngReadMemFn);
// png_init_io( pPngStruct, &f );
png_set_sig_bytes( pPngStruct, nSigSize );
png_read_png( pPngStruct, pPngInfo, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_BGR, NULL );
/* SNIP - the rest is the same as oslLoadImageFilePNG - SNIP */
} |
|
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Fri Oct 20, 2006 4:43 am Post subject: |
|
|
goebish> Sorry, that's my fault, I've copied the bad files in the source archive. It should be okay now (just download it again) :-)
About file loading, thank you, that's very useful. When I get some time I'll try to make more advanced routines for sound (and so on) that can load anything from a custom stream (RAM, file or user implemented) instead of stdio/FILE. _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Sun Nov 05, 2006 7:53 pm Post subject: |
|
|
Thanks, I managed to compile it under linux :)
I only had a small problem: the file zlibInterface.h should be named zlibinterface.h
Au fait, tu as un site officiel pour OSLib ? Je pense que ça pourrait interresser beaucoup de monde. Aussi simple à coder que du LUA mais avec un vrai langage ;) |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Sun Nov 05, 2006 11:24 pm Post subject: |
|
|
Thanks, I managed to compile it under linux :)
I only had a small problem: the file zlibInterface.h should be renamed to zlibinterface.h
Johnsto > great code, thanks.
Au fait, tu as un site officiel pour OSLib ? Je pense que ça pourrait interresser beaucoup de monde. Aussi simple à coder que du LUA mais avec un vrai langage ;) |
|
| Back to top |
|
 |
snowymydog
Joined: 15 Sep 2006 Posts: 2
|
Posted: Mon Nov 27, 2006 7:54 pm Post subject: |
|
|
| Brunni, the lastest version OSLib's loop sound doesn't work. I replaced with the old version and compile again, it works fine. So i guess there might be some bugs in the new version. Just to let you know. :) |
|
| Back to top |
|
 |
darkplastic
Joined: 15 Dec 2006 Posts: 6
|
Posted: Tue Jan 16, 2007 3:52 am Post subject: Any1 got the fix to sound loop? |
|
|
| Have any of u guys got the fix to loop sound since i cant seem to find an older version. Cheers |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Tue Jan 16, 2007 5:45 am Post subject: |
|
|
Brunni, please, please open a dedicated forum about OSLib, I'm sure a lot of people want to see it evolve.
Stp Brunni, un petit forum dédié :) |
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Mon Feb 12, 2007 6:59 am Post subject: |
|
|
Hello all,
I'm sorry, I've nearly disappeared from the surface of the earth. The problem is, I began a new school which needs a lot of work, and I've got 4h30 of train per day, letting me very few time to work on personal projects.
The current semester is now finished, I'll try to make something more for OSLib, and yes a forum would be a great idea. There's already something there, it seems rather dead because nobody "advertised" for it, only a few courageous people found it by googling. But be assured that when a question is asked there, we always do our best to answer it quickly: http://www.playeradvance.org/forum/forumdisplay.php?f=58
The forum which hosts this is french, but you can write in english - like most people coming there do ;)
Something else interesting to do would be to release the MMSPlus source code, as it's a good application for OSLib. _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
NeoTechni
Joined: 30 Oct 2006 Posts: 15
|
Posted: Mon Feb 12, 2007 8:05 am Post subject: |
|
|
Is there a standard map format? Or an editor?
If there is no editor I could make one for Windows |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Sun Feb 18, 2007 11:40 pm Post subject: |
|
|
This is *exactly* what I was looking for. I'm not the only one it seems :)
I've hacked up an extension module for Python:
http://fraca7.homeunix.net/trac/wiki/OSLIB/
The two samples (sprite and maps) already work. |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Mon Feb 19, 2007 5:06 am Post subject: |
|
|
why not work on this library on your long train rides :)
i know that for me the train is a nice quiet place to get
great work done as you see the country side pass by
so use natures own inspiration _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
fergie4000
Joined: 19 Jan 2007 Posts: 25
|
Posted: Mon Feb 19, 2007 8:41 pm Post subject: |
|
|
this isn't necessarily for this thread, but i am using oslib. is there anyway to read back the co-ordinates onto the screen of the sprite sample at http://oslib.palib.info/samples/ i have tried but no success yet.
tia |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Mon Feb 19, 2007 9:07 pm Post subject: |
|
|
to fergie4000:
What's your problem exactly ?
int x_coord, y_coord;
OSL_IMAGE* mySprite;
... do what you want with your image
x_coord = mySprite->x;
y_coord = mySprite->y;
Is that what you want ?
to Brunni:
You told some time ago that you would release MMS source code, do you still plan to do it ? |
|
| Back to top |
|
 |
fergie4000
Joined: 19 Jan 2007 Posts: 25
|
Posted: Mon Feb 19, 2007 9:26 pm Post subject: |
|
|
i am using the sample. and i want to be able to move the sprite around and read the co-ordinates of the center pixel and printf it to the screen. i'm kinda new at this but i think it is possible. i also want to refresh the co-ords every time the sprite is moved. if that makes any sense?
tia
*edit*
also is it possible to blit text? if so how? |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Mon Feb 19, 2007 9:33 pm Post subject: |
|
|
I think this is what you want:
oslPrintf_xy(mySprite->x,mySprite->y,"%i,%i",mySprite->x,mySprite->y); |
|
| Back to top |
|
 |
fergie4000
Joined: 19 Jan 2007 Posts: 25
|
Posted: Mon Feb 19, 2007 9:35 pm Post subject: |
|
|
ok thanks. looks good.
*edit*
oslPrintf_xy(mySprite->x,mySprite->y,"%i,%i",mySprite->x,mySprite->y);
wouldn't the first mySprite->x,mySprite->y make the text in the same place as the sprite? |
|
| Back to top |
|
 |
goebish
Joined: 14 Oct 2006 Posts: 29
|
Posted: Mon Feb 19, 2007 9:40 pm Post subject: |
|
|
| Yes it does. |
|
| Back to top |
|
 |
fergie4000
Joined: 19 Jan 2007 Posts: 25
|
Posted: Mon Feb 19, 2007 9:42 pm Post subject: |
|
|
thats bloody perfect! just tried it. its exactly what i needed. now i just gotta make a better image.
:P
thanks again. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Feb 21, 2007 9:38 am Post subject: |
|
|
| fraca7 wrote: | This is *exactly* what I was looking for. I'm not the only one it seems :)
I've hacked up an extension module for Python:
http://fraca7.homeunix.net/trac/wiki/OSLIB/
The two samples (sprite and maps) already work. |
I tried the sample... I'm a little surprised at how fast the parallax scrolling demo runs. It seems perfect for doing those old 16bit computer style platformers and shooters. I might try my hand at making one this spring... I've been doing more python programming recently, and psp-python really has my interest piqued. |
|
| Back to top |
|
 |
|