| View previous topic :: View next topic |
| Author |
Message |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Fri Aug 08, 2008 7:25 pm Post subject: Increase cpu for rendering pdf |
|
|
I've just terminated the function to render a pdf to the psp but it take 5 to 8 s
to render a page on the psp i have read that you can increase the cpu speed
of the psp.
I have see many samples how to do that but can someone point me a example
to increase the speed of the cpu at maximun and a sample how to revert back
to normal.
The idea behint is to increase the cpu just before the rendering and to go back
to normal speed (for battery reason) when rendering is done.
Another question related to power when i read my pdf after X seconds the brightness
of the psp is going down , when i click on any key no problem the brighness comes back to normal.
My pdf reader use the analog stick to move the view paget of the pdf but when i use
the analog stick the bridgness doesn' comme back.
Must i use sceDisplaySettBrightnes and forece the brightness or is there some voodo
code that enable this with a anolog stick thx a lot for help me the pdf reader is nearly done i must just implement a file chooser and fix this 2 open bugs |
|
| Back to top |
|
 |
Hellcat
Joined: 24 Jan 2007 Posts: 84
|
Posted: Fri Aug 08, 2008 7:45 pm Post subject: Re: Increase cpu for rendering pdf |
|
|
| psppower.h wrote: | /**
* Set Bus Frequency
* @param busfreq - new BUS frequency, valid values are 1 - 167
*/
int scePowerSetBusClockFrequency(int busfreq); |
That should be the one for setting the CPU, but something happened in 3.71 and later, not sure if it still works propperly....
worth a try :)
The display getting dimmer is due to the power save settings, if you don't want it, turn if off :p (XMB -> settings -> power save settings)
However:
| psppower.h wrote: | /**
* Generate a power tick, preventing unit from
* powering off and turning off display.
*
* @param unknown - pass 0
*/
int scePowerTick(int unknown); |
:) |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Fri Aug 08, 2008 8:54 pm Post subject: |
|
|
| ...consider algorythmic optimization...requiring faster hardware at first seen slow-down is always a defeat... are you basing on a well known open library or you rewrited something from scratch?? |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sat Aug 09, 2008 1:58 am Post subject: |
|
|
It's the sumatrpdf rendering library. rendering speed is propotional with the complexity
of the page rendered!!!! many font many images etc ....
it's a pure cpu issue.
At this link you have a preview wat my homebrew can do
there is no filechosser yet it take always from
psp/game/psppdf/test.pdf you may replace test.pdf with any of your pdf's
LTRIGGER backward page RTRIGGER forward page
analogic stick navigation into the page
UP key = zoom in
Dow key = zoom out
X = quit pdf reader
Known bug zoom > 1.7 may crash the homebrew with a enought memory error
zoom < 0 if the bitmap rendere is less than 480x272 garbage on the screen not covered by the bimap
I try the implementation of cpu at hight speed this week-end
fix the garbage
and try to allocate more memory if slim detected
the link for the preview:
http://www.enterinmydream.info/~sauronlenoir/psppdf_preview.zip
it's a debug build if the homebrew crash i'm very interested int the 2 or 3 txt files
generated in the folder where the homebrew is launched they give me indication
about the heap space (malloc and free objects ...).
The code for illegal pdfs or endomaged pdf is not tested yet i give in the zip
a test.pdf make with openoffice
PS: i have tested the homebrew on a psp slim with 4.01M33 |
|
| Back to top |
|
 |
a_noob
Joined: 17 Sep 2006 Posts: 97 Location: _start: jr 0xDEADBEEF
|
Posted: Sat Aug 09, 2008 3:04 am Post subject: |
|
|
Did you even read what you posted Hellcat? scePowerSetBusClockFrequency
Sets the Bus not the CPU. _________________
| Code: | .øOº'ºOø.
'ºOo.oOº' |
|
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Aug 09, 2008 3:42 am Post subject: |
|
|
| Code: | | scePowerSetClockFrequency(333, 333, 166); |
Sets maximum speed. |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sat Aug 09, 2008 5:16 am Post subject: |
|
|
thx jf and special thx to you a_noob pointing me the tri library it a very very cool
library much better even than osllib
heu another question when the homebrew quit must i reset the cpu to his default
or wil it do it automaticly when leaving and returning to the xmb |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Aug 09, 2008 5:33 am Post subject: |
|
|
| It sets itself to the speed you have set in the custom firmware for the XMB. PSP apps really don't have to do ANYTHING as far as cleanup goes from what I can tell. The PSP in essence resets itself... and the M33 allows you to set it to HARD reset after a game as well. |
|
| Back to top |
|
 |
|