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 

[Interested?] OldSchool Library
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Wed Apr 25, 2007 6:26 am    Post subject: Reply with quote

Sorry for the late reply :-'
I don't understand your question (and no need to translate with babelfish, thanks ;-)
Why would you like to create a new instance every time? Maybe oslCreateImageTile is what you need, but it will require extra memory, so it's not a very good idea...
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Thu Apr 26, 2007 11:47 am    Post subject: Reply with quote

Hi brunni !

First i never thanks you for oslib so, thanks :)
I'v used oslib for the first time there is a while ago, and i always add a problem, that is i think a problem with libpng. I'm using psplink to view the psp memory usage to manage/optimize it, but when initializing oslib the memory left on the psp is automaticly around 1mb. I think libpng or oslib automaticly allocate an amount of memory or dunno.. so is there a way to prevent this so i can have a better view of the memory used when adding a function or anything else ?

See you,
Cpasjuste.
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Thu Apr 26, 2007 6:24 pm    Post subject: Reply with quote

Thanks ^^
OSLib doesn't even use 1 MB, so it's strange that you say it only leaves 1 MB free...
In fact I'm sorry but I can't help you, I've never been able to set-up psplink, it's sooooo complicated :/
Maybe if you want you could see with the source code to find where (which routine) the memory usage grows so much?
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Thu Apr 26, 2007 10:54 pm    Post subject: Reply with quote

Hehe, you miss the best dev tool for the psp without using psplink !
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Fri Apr 27, 2007 5:53 am    Post subject: Reply with quote

I'd like to get it to work...
I don't like spending hours setting up a devtool. I know some people will say it's a bad point of view, but that's it. I didn't find any "ready to use" pack for PSPlink, and last time I tried, I've not got anything to work (my PSP was on a black screen with PSPLink v2.0 or something and I had to open a console on Windows which did nothing, whatever command I fed it with), and I don't understand the documentation (in english) :(
But maybe you can help me? :)
Thanks
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Fri Apr 27, 2007 10:43 am    Post subject: Reply with quote

Hi bruuni, so here it is, you should try it :

- Download http://mydedibox.fr/downloads/PSP/psplink_2.0.zip

- Copy the folder "/psp/game/psplink" to the psp game folder

- Launch psplink from the psp, you should see like you said "welcome do psplink 2.0 ...blah blah

- If you are not connected via USB to the PC, connect your psp via USB, windows should ask you a driver for the psp usb, select the one in "/PC/driver"

- launch "usbhostfs_pc.exe" from the folder "/PC", you should see "connected"

- launch "pcterm.exe" from the folder "/PC", you should have a prompt "host0:>"

From here, you could type "help" to see the available commands. Type "ls" for exemple to see where you are, you should see the content of the directory where you have launch usbhostfs_pc.exe on your pc. You should launch usbhostfs_pc.exe with one parameter : the path to your current psp project eg : "usbhostfs_pc.exe c:\mypspgame". Now type "ls" again then you will see the content of the folder mypspgame. Type "./myproject.elf" to launch your compiled program, with the terminal still running. Very cool to debug applications :) You could also type "reset" to reset psplink, compile again your aplication then launch it again directly from psplink without having to transfer it ....

I will send you a french copy of this tomorow from work if needed.

See you soon.
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Sun Apr 29, 2007 8:04 pm    Post subject: Reply with quote

Thank you very much.

Cpasjuste wrote:
Hi bruuni, so here it is, you should try it :

- Download http://mydedibox.fr/downloads/PSP/psplink_2.0.zip

- Copy the folder "/psp/game/psplink" to the psp game folder

- Launch psplink from the psp, you should see like you said "welcome do psplink 2.0 ...blah blah

- If you are not connected via USB to the PC, connect your psp via USB, windows should ask you a driver for the psp usb, select the one in "/PC/driver"

- launch "usbhostfs_pc.exe" from the folder "/PC", you should see "connected"

- launch "pcterm.exe" from the folder "/PC", you should have a prompt "host0:>"

From here, you could type "help" to see the available commands. Type "ls" for exemple to see where you are, you should see the content of the directory where you have launch usbhostfs_pc.exe on your pc. You should launch usbhostfs_pc.exe with one parameter : the path to your current psp project eg : "usbhostfs_pc.exe c:\mypspgame". Now type "ls" again then you will see the content of the folder mypspgame. Type "./myproject.elf" to launch your compiled program, with the terminal still running. Very cool to debug applications :) You could also type "reset" to reset psplink, compile again your aplication then launch it again directly from psplink without having to transfer it ....

I will send you a french copy of this tomorow from work if needed.

See you soon.


Thank you very much!
Strangely, MMSPlus won't even start with PSPLink (bus error), but it works perfectly without it :S
Anyway, what I have found is that once I call malloc for the first time, the free memory drops to 1.2 MB. Using OSLib or not. I don't know what PSPLink does to compute the available memory but I guess malloc reserves a huge block of memory for its internal use and then allocates memory within it, which is the problem.
What are you using for allocating your memory?
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Sun Apr 29, 2007 8:40 pm    Post subject: Reply with quote

Brunni wrote:
Sorry for the late reply :-'
I don't understand your question (and no need to translate with babelfish, thanks ;-)
Why would you like to create a new instance every time? Maybe oslCreateImageTile is what you need, but it will require extra memory, so it's not a very good idea...


I found another way(resizing arrays) , but thanks!.

By the way , is there any bug in "oslDeleteImage()" function?
Because when i use the function , after some time the application crashes!.


my function that releases unused objects is this one:

Code:
void CLEAR_LIST(OSL_IMAGE *D[],int LIMIT)
{
int l;
for (l=0;l<=LIMIT-1;l++)
{
if(D[l]) { oslDeleteImage(D[l]); }
}
return ;
}


An example:

OSL_IMAGE * LOOP[5];//GLOBAL
Code:

int t;
for (t=0;t<=4;t++)
{
LOOP[t]=loadimage(blahblah)
}


When its time to load the next level:
Code:

CLEAR_LIST(LOOP,5);
LOAD THE NEXT LEVEL..
[/code]
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Sun Apr 29, 2007 9:14 pm    Post subject: Reply with quote

Are you loading your images to vram with "OSL_IN_VRAM" ? If yes, you must delet the last loaded image before the others one.
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Sun Apr 29, 2007 10:12 pm    Post subject: Reply with quote

Cpasjuste wrote:
Are you loading your images to vram with "OSL_IN_VRAM" ? If yes, you must delet the last loaded image before the others one.


No , im using RAM :
OSL_IN_RAM, OSL_PF_5551
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Sun Apr 29, 2007 10:22 pm    Post subject: Reply with quote

Hum ok, strange problem, it work fine here.
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Sun Apr 29, 2007 10:28 pm    Post subject: Reply with quote

Cpasjuste wrote:
Hum ok, strange problem, it work fine here.


Well , it happens after i load the same level for about 3-4 times!
Thats really weird..
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Mon Apr 30, 2007 2:20 am    Post subject: Reply with quote

nDEV wrote:
Cpasjuste wrote:
Hum ok, strange problem, it work fine here.


Well , it happens after i load the same level for about 3-4 times!
Thats really weird..


I think i found the bug ;) !

There was a part of my code that i think it was behind all this!
The sound manager was actually loading the same sound file on the pointer without deleting the previous!

edit:
woohoo! yea , that was the problem!!!!!!!!!!!!!!!#@!@#!@#!@!111
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Mon Apr 30, 2007 11:16 am    Post subject: Reply with quote

By the way , how many sound channels im able to use?
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Tue May 01, 2007 6:00 am    Post subject: Reply with quote

8 (0-7)
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Tue May 01, 2007 6:39 pm    Post subject: Reply with quote

Oks thanks.
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Thu May 10, 2007 3:03 pm    Post subject: Reply with quote

Another question!
Some times my 2nd app crashes...is there any option that shows the error on the screen instead of crashing!!?
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Thu May 10, 2007 6:25 pm    Post subject: Reply with quote

PSPLink... ;)
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Fri May 11, 2007 6:00 am    Post subject: Reply with quote

oh ok lol

Btw , how do you release the keys?

oslFlushKeys isnt working!
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Sat May 12, 2007 12:48 am    Post subject: Reply with quote

Release the keys? I don't understand what you want to do...
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
BigNastyCurve



Joined: 13 May 2007
Posts: 9

PostPosted: Sun May 13, 2007 12:44 pm    Post subject: Reply with quote

This is a little off-topic, but when I install psplink and get to the windows driver installation part, after I choose the driver in /PC/driver I'm told that "The hardware was not installed because the wizard could not find the necessary software". Does anyone have any idea why it won't accept the driver? Windows XP SP2.

Nm I fixed it...

Use this guide if you can't get the file listed above to work:

http://forums.qj.net/f-psp-development-forum-11/t-beginners-guide-to-debugging-with-psplink-49335.html


Last edited by BigNastyCurve on Sun May 13, 2007 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun May 13, 2007 12:50 pm    Post subject: Reply with quote

BigNastyCurve wrote:
This is a little off-topic, but when I install psplink and get to the windows driver installation part, after I choose the driver in /PC/driver I'm told that "The hardware was not installed because the wizard could not find the necessary software". Does anyone have any idea why it won't accept the driver? Windows XP SP2.


I ran into the same thing... WXP/SP2 won't install the drivers unless the hardware is present. You have to activate PSPLink (or something equivalent) on the PSP first, THEN it'll let you install the drivers.
Back to top
View user's profile Send private message AIM Address
BigNastyCurve



Joined: 13 May 2007
Posts: 9

PostPosted: Sun May 13, 2007 1:13 pm    Post subject: Reply with quote

Hmmm, yah I did that (which is why it prompted me for drivers to begin with) but it still wouldn't take. In any case, the guide listed in my link helped me solve it (albet it took longer). Thanks, though!
Back to top
View user's profile Send private message
BigNastyCurve



Joined: 13 May 2007
Posts: 9

PostPosted: Thu May 17, 2007 11:26 am    Post subject: Reply with quote

Is the zip file in the first post still his latest version? Just checking, as I'd really like to use this lib.
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Thu May 17, 2007 6:16 pm    Post subject: Reply with quote

Which is the latest release?
im gonna use oslib again in few days for a simple app..
Back to top
View user's profile Send private message
goebish



Joined: 14 Oct 2006
Posts: 29

PostPosted: Thu May 17, 2007 6:24 pm    Post subject: Reply with quote

I think you can find it here:
http://oslib.palib.info/OSLib.zip

Hi Brunni, I think you should change your sig so that it directly point to oslib website ;)
Back to top
View user's profile Send private message
nDEV



Joined: 13 Apr 2007
Posts: 48

PostPosted: Thu May 17, 2007 7:35 pm    Post subject: Reply with quote

goebish wrote:
I think you can find it here:
http://oslib.palib.info/OSLib.zip

Hi Brunni, I think you should change your sig so that it directly point to oslib website ;)

hmm..ok :P
Back to top
View user's profile Send private message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Sat May 19, 2007 7:56 am    Post subject: Reply with quote

FINALLY!!!!!!!!
Here it is :) The version 2.00 alpha1. Get it here: http://brunni.dev-fr.org/index.php?page=pspsoft_oslib

It's alpha, not definite (some things may change until the final release!), but it's still good for testing ;)
Please tell me any problem or suggestion with this version. Thank you in advance ^^

Here is an all new documentation, very complete: http://brunni.dev-fr.org/oslib/doc/doxygen/index.html (go to the module tab)
Here is a partial list of new functionality (read the CHANGES.TXT file for more information, especially about changes that could eventually break your code):
Code:
 - All new documentation: every OSLib function is documented, and there are some code samples.
 - osl_keys->pressed.thing replaced with osl_pad.pressed.thing (old method is still available)
 - New audio formats: MOD, S3M, IT and XM! WARNING: ONLY ONE OF THESE FILES CAN BE PLAYED AT ONCE! Only BGM and WAV support multiple instances.
 - VRAM manager added: you can now load and unload images from VRAM in any order :) Can be disabled.
 - You can move images from RAM <=> VRAM at any time!
 - You can now unswizzle images, and swizzle them more easily (even directly when creating)!
 - You can now directly load paletted images, create paletted image from a true color one, convert between image formats!
 - You can draw and read single pixels on images
 - You can set an automatic fatal error message to display if any file could not be loaded.
 - New map format supporting tile mirroring!
 - Highly optimized map drawing routine. Runs as fast as oslDrawMapSimple before but without any limitation!
 - New 4-bit font format: you can display colorful characters, which can be tinted!
 - New text engine, running faster, except if you set a non fully transparent background color.
 - Faster image drawing. Rotated images, even big ones are drawn as fast as other. oslDrawImage is faster and you don't need to use oslDrawImageSimple anymore. Computed coordinates for rotated images are more precise now, the rotation will appear perfectly smooth.
 - Better sound mixer. If you play another sound on a busy channel, the old sound will stop. You cannot play the same sound on several channels though, you must create multiple instances.
 - New effect OSL_FX_TINT, allowing to tint objects.
 - New variables OSL_SCREEN_WIDTH / HEIGHT (depends on the current drawbuffer)
 - You can now define the framerate you want!
 - Dithering can be enabled / disabled (disabled by default).
 - The resolution can be changed on the fly (just call oslInitGfx again)!
 - The default display list size can be redefined (more or less instructions before needing a oslSyncDrawing).
 - oslInit has got new arguments to make OSLib it more or less intrusive.
 - New text functions (GetStringWidth, ...).
 - New virtual file system! Everything can now be loaded from a file, memory or a custom device you created by yourself.
 - You can now define an alpha value to set to the drawbuffer for written pixels!
 - Better and cleaner synchronization code.
   - You should no more see tearing on top of the screen when sound puts a heavy load on the CPU.
 - Clipping is now defined automatically with oslSetDrawBuffer!
 - On PC, any texture type is now supported; if the hardware does not support a format, it's automatically converted.


Download link: http://brunni.dev-fr.org/dl/psp/OSLib_200a1.rar
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
seventoes



Joined: 02 Oct 2005
Posts: 79

PostPosted: Sat May 19, 2007 8:56 am    Post subject: Reply with quote

Brunni wrote:
FINALLY!!!!!!!!
Here it is :) The version 2.00 alpha1. Get it here: http://brunni.dev-fr.org/index.php?page=pspsoft_oslib

It's alpha, not definite (some things may change until the final release!), but it's still good for testing ;)
Please tell me any problem or suggestion with this version. Thank you in advance ^^

Here is an all new documentation, very complete: http://brunni.dev-fr.org/oslib/doc/doxygen/index.html (go to the module tab)
Here is a partial list of new functionality (read the CHANGES.TXT file for more information, especially about changes that could eventually break your code):
Code:
 - All new documentation: every OSLib function is documented, and there are some code samples.
 - osl_keys->pressed.thing replaced with osl_pad.pressed.thing (old method is still available)
 - New audio formats: MOD, S3M, IT and XM! WARNING: ONLY ONE OF THESE FILES CAN BE PLAYED AT ONCE! Only BGM and WAV support multiple instances.
 - VRAM manager added: you can now load and unload images from VRAM in any order :) Can be disabled.
 - You can move images from RAM <=> VRAM at any time!
 - You can now unswizzle images, and swizzle them more easily (even directly when creating)!
 - You can now directly load paletted images, create paletted image from a true color one, convert between image formats!
 - You can draw and read single pixels on images
 - You can set an automatic fatal error message to display if any file could not be loaded.
 - New map format supporting tile mirroring!
 - Highly optimized map drawing routine. Runs as fast as oslDrawMapSimple before but without any limitation!
 - New 4-bit font format: you can display colorful characters, which can be tinted!
 - New text engine, running faster, except if you set a non fully transparent background color.
 - Faster image drawing. Rotated images, even big ones are drawn as fast as other. oslDrawImage is faster and you don't need to use oslDrawImageSimple anymore. Computed coordinates for rotated images are more precise now, the rotation will appear perfectly smooth.
 - Better sound mixer. If you play another sound on a busy channel, the old sound will stop. You cannot play the same sound on several channels though, you must create multiple instances.
 - New effect OSL_FX_TINT, allowing to tint objects.
 - New variables OSL_SCREEN_WIDTH / HEIGHT (depends on the current drawbuffer)
 - You can now define the framerate you want!
 - Dithering can be enabled / disabled (disabled by default).
 - The resolution can be changed on the fly (just call oslInitGfx again)!
 - The default display list size can be redefined (more or less instructions before needing a oslSyncDrawing).
 - oslInit has got new arguments to make OSLib it more or less intrusive.
 - New text functions (GetStringWidth, ...).
 - New virtual file system! Everything can now be loaded from a file, memory or a custom device you created by yourself.
 - You can now define an alpha value to set to the drawbuffer for written pixels!
 - Better and cleaner synchronization code.
   - You should no more see tearing on top of the screen when sound puts a heavy load on the CPU.
 - Clipping is now defined automatically with oslSetDrawBuffer!
 - On PC, any texture type is now supported; if the hardware does not support a format, it's automatically converted.


Download link: http://brunni.dev-fr.org/dl/psp/OSLib_200a1.rar


All i can say is wow! Great job brunni, OSLib is probably the simplest and most powerful library available! Cant wait for v2 final so i can upgrade my WIP to make use of all those tasty optimizations :) (Im especially liking the vpu_sinf and vpu_cosf, plans to make a vpu_atan/atan2? Those two are used quite a bit in my game.)

Thanks for all your hard work!
Back to top
View user's profile Send private message
BigNastyCurve



Joined: 13 May 2007
Posts: 9

PostPosted: Sat May 19, 2007 10:40 am    Post subject: Reply with quote

question about 1.0:

This works:

intro = oslLoadImageFile("splash_32.png", OSL_IN_RAM, OSL_PF_8888);



This doesn't work:

intro = oslLoadImageFile(".\\images\\splash_32.png", OSL_IN_RAM, OSL_PF_8888);


The file is in both locations. I was extremely puzzled at first because I couldn't get an image loaded to save my life. Then I moved it out into the eboot directory, changed my code and it worked. Is there a particular reason that I can't use subdirectories? I'd rather not have my assets all over the main directory if I can help it.

Thanks...
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 7 of 9

 
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