Increase cpu for rendering pdf

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Increase cpu for rendering pdf

Post by sauron_le_noir »

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
Hellcat
Posts: 83
Joined: Wed Jan 24, 2007 2:52 pm

Re: Increase cpu for rendering pdf

Post by Hellcat »

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);

:)
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

...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??
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

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/~sauronl ... review.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
a_noob
Posts: 97
Joined: Sun Sep 17, 2006 8:33 am
Location: _start: jr 0xDEADBEEF

Post by a_noob »

Did you even read what you posted Hellcat? scePowerSetBusClockFrequency
Sets the Bus not the CPU.

Code: Select all

.øOº'ºOø.
'ºOo.oOº'
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Code: Select all

scePowerSetClockFrequency&#40;333, 333, 166&#41;;
Sets maximum speed.
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

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
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
Post Reply