[Interested?] OldSchool Library
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"
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"
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:
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 ;-)
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: Select all
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();
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
Nobody is interested? :'(
Is there still somebody using this library? Do you have some suggestion or anything?
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
Oldschool library for PSP - PC version released
-
- Posts: 36
- Joined: Fri Jul 21, 2006 11:00 am
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
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
-
- Posts: 2
- Joined: Fri Sep 15, 2006 11:26 am
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
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
-
- Posts: 36
- Joined: Fri Jul 21, 2006 11:00 am
I still use this WONDERFULL lib !Brunni wrote:Nobody is interested? :'(
Is there still somebody using this library? Do you have some suggestion or anything?
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 :)
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
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
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
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
Oldschool library for PSP - PC version released
I've a compile error:
I have the latest toolchain and sdk compiled from svn.
Any idea ?
Code: Select all
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
Any idea ?
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.
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: Select all
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 */
}
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.
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
Oldschool library for PSP - PC version released
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 ;)
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 ;)
-
- Posts: 2
- Joined: Fri Sep 15, 2006 11:26 am
-
- Posts: 6
- Joined: Fri Dec 15, 2006 8:50 pm
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
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/foru ... y.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.
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/foru ... y.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
Oldschool library for PSP - PC version released
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've hacked up an extension module for Python:
http://fraca7.homeunix.net/trac/wiki/OSLIB/
The two samples (sprite and maps) already work.
-
- Posts: 25
- Joined: Fri Jan 19, 2007 3:03 pm
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
tia
-
- Posts: 25
- Joined: Fri Jan 19, 2007 3:03 pm
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?
tia
*edit*
also is it possible to blit text? if so how?
-
- Posts: 25
- Joined: Fri Jan 19, 2007 3:03 pm
-
- Posts: 25
- Joined: Fri Jan 19, 2007 3:03 pm
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.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.