Set_fclk Crash


GnoStiC

Member
Joined
Mar 3, 2006
Messages
171
Location
izmir/TR
Website
gnostic.lryiu.com
i'm using the cpu speed for overclocking in my software and i have some problems..

step1:
1) gp2x boots, i choose my software from the game menu
2) i use set_add_ULCDCLK and then set_FCLK for overclocking
3) on line
Code:
MEM_REG[0x910>>1]=v;			  //Set frequency

screen gets garbled like the battery is low and gp2x crashes..
i tried turning off the interrupts but it didn't do any good.

step2:
1) gp2x boots, from console i set init level 3 (init 3)
OR
kill gp2xmenu (and/or rc.sysinit), init level becomes 3 (it is init boot before)

and everything works fine..

any ideas, suggestions?
 
Code:
void set_FCLK(unsigned MHZ)
{
 MHZ = 200;

	unsigned v;
	unsigned mdiv,pdiv=3,scale=0;
	MHZ*=1000000;
	mdiv=(MHZ*pdiv)/SYS_CLK_FREQ;
	mdiv=((mdiv-8)<<8) & 0xff00;
	pdiv=((pdiv-2)<<2) & 0xfc;
	scale&=3;
	v=mdiv | pdiv | scale;
	MEM_REG[0x0910>>1] = v;

	//while (MEM_REG[0x0902>>1] & 2); is it &1 or &2?
}

paeryn posted on Oct 4 2006 at 01:05 AM said:
What value are you trying to set FPLLSETVREG (0x910) to?
 
Last edited by a moderator:
o_O hm ... strange ... i never got such an error ..
The only thing which froze my gp a couple of times was, that i forget to call the cpuctrl_init() function or had this function called before the gp2x_init() function. ... but i never got a garbled screen
 
from uae4all rls info:

critical posted on Oct 30 2006 at 11:11 AM said:
EDIT: updated to 0.6.3. Crashing on clock change in earlier versions seemed to be due to the change to using HW_SURFACEs. Now a SW one is used for the menu, as it used to be.

changing SDL_HWSURFACE to SDL_SWSURFACE solved my crashing problem too..
(thank you critical)
 
Last edited by a moderator:
Back
Top