| View previous topic :: View next topic |
| Author |
Message |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Wed Jun 13, 2007 2:46 am Post subject: BUG Report: Mikmodlib svnrev 2254 incompatibility with VFPU |
|
|
Just this simple line:
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU);
Prevents any sound coming/playing.... By removing it everything is fine without using the VFPU I wouldn't be able to do much optimization!
I have tested it THRICE with Wavloader[by Insomnaic197 i.e I_W_N]. Try it with the included samples.
----
Please help.
|
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Wed Jun 13, 2007 8:06 am Post subject: |
|
|
are you sure you are not using the vfpu thruout more than one thread ?
if you do you might just be trashing the vfpu state and so try to keep
most if not ALL uses of vfpu into a single thread and then have that thread
export any functions to allow other threads access to the vfpu thread functions _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Thu Jun 14, 2007 8:07 pm Post subject: |
|
|
AFAIK not using THREAD_ATTR_VFPU leads to an exception when running VFPU instructions, else between threads the VFPU state is saved/restored. So i would expect two possibilities :
1)
- Entering a NO VFPU thread would save VFPU state in the old thread and disable coprocessor 2 (VFPU).
- Entering a VFPU thread would enable coprocessor and restore VFPU state for the new thread.
2)
- Entering a NO VFPU thread would disable coprocessor 2 (VFPU).
- Entering a VFPU thread would enable coprocessor and save VFPU state in the old VFPU owner thread and restore VFPU state for the new VFPU thread.
the 2) would be better because if you have only one VFPU thread you don't need to save/restore VFPU state.
If not, it would be a very bad design comming from SONY engineers ! |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Thu Jun 14, 2007 8:28 pm Post subject: |
|
|
Oh i DO remember one thing we check with [MrMrIce] :
you CANNOT use VFPU in callback functions, especially when they use their own thread. We tried a GE callback but we failed because it seems the callback is executed in a different thread (a protected one ? the current thread which can be a NO VFPU thread when the callback is called ?).
So, just a question, do you use VFPU in a callback function for sound ? |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Thu Jun 14, 2007 10:14 pm Post subject: |
|
|
welcome back hlide ..sux to here you have no net at your home ...bummer _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Fri Jun 15, 2007 2:25 am Post subject: well... |
|
|
I wish I knew such complicated things....
Would it help if I post what I am doing? [I was trying to use MrMrice's Psp Math lib.] |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Fri Jun 15, 2007 3:36 am Post subject: Well. Caught the culprit... |
|
|
It Happens only in Kernel Mode not in User mode.
The above phenomenon happens.
Files Attached below.
http://www.sendspace.com/file/l0z79a --- WAV player w/out VFPU usage works totally fine.
http://www.sendspace.com/file/d7dhdy -- VFPU attr --- The actual problems in this -- Doesn't play the sound at all.
Mikmodlib needs to installed for this to work. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Fri Jun 15, 2007 9:18 pm Post subject: |
|
|
huh i'm no net at home so i cannot dl them :///
my internet box is not working and i'm still waiting for an hypothetical exchange (two weeks and still they didn't send a new one as promised)
*sigh*
as i said : if you are running VFPU in a callback, this may be a problem.
you may need to have a VFPU thread which waits for an event. Your callback should send an event to wake up this thread instead of VFPUing directly. Sure, it sucks...
So you say this happens at kernel mode ? hummm... should a callback have a different behavior ? maybe a callback needs a special context when in kernel mode lest a callback function should mess up and endanger the operating system (like a Blue Screen Of Death or freezing) ???
not clear... |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sat Jun 16, 2007 12:45 am Post subject: |
|
|
| Ok, Would it help if I put the source code in CODE tags... ? |
|
| Back to top |
|
 |
|