Clockspeed Changer auf gp32spain


Draget said:
Mein Spanisch ist quasi kaum existet. Kann nicht jemand der dieser Sprache gut mächtig ist ein paar interessante Sachen aus dem Orginalthread übersetzen?

Hi
wenn man dem Babelfish unter http://babelfish.altavista.com/
die URL mitgibt und von spanisch nach englisch uebersetzen laesst,
kommt noch was ganz brauchbares bei rum, auch wenn der Babelfish
ueber einige spanische Worte stolpert :))

Zitat:
Good,

Aqui I leave the utility you that mentioned before in the programming forum.

When load, deshabilita the processor 940t of direct form and with L and R can be selected the frequency bases. With A elije the division factor (in screen it always appears the resulting frequency to divide the frequency bases between this factor).

With START one leaves to the system without applying the changes (except 940t that deshabilita) and with SELECT the value of frequency settles down selected, before leaving to the system


UPDATED:

Version 1.01 that corrects problems of speed control and informs into some new data.
That certainty has left of that all this is of experimental form and that I do not become person in charge of the cost of batteries () or other problems that you can have by the use of this application.

The frequency can be regulated until 280Mhz...

Gruesse
Guido.
 
baaah ... ist nur ein fehlerhaftes Programm .... Rob hat's rausgefunden schon ein eigenes geschrieben:
OK, we'd better put this one to bed NOW!

The results from Hermes_PS2R's program are invalid, because of a bug in the code.
Code:
void set_FCLK(unsigned MHZ)
{
  unsigned v;
  unsigned mdiv,pdiv=3,scale=0;
  MHZ*=1000000;
  mdiv=(MHZ*pdiv)/SYS_CLK_FREQ;

  mdiv=((mdiv-8)<<8) & 0xff00;
  pdiv=((pdiv-2)<<3) & 0xfc;             /* <-- should be << 2 */
  scale&=3;
  v=mdiv | pdiv | scale;
  MEM_REG[0x910>>1]=v;
}

unsigned get_freq_920_CLK()
{
  unsigned i;
  unsigned reg,mdiv,pdiv,scale;

  reg=MEM_REG[0x912>>1];
  mdiv = ((reg & 0xff00) >> 8) + 8;
  pdiv = ((reg & 0xfc) >> 3) + 2;         /* <-- should be >> 2 */
  scale = reg & 3;
  MDIV=mdiv;
  PDIV=pdiv;
  SCALE=scale;

  i = (MEM_REG[0x91c>>1] & 7)+1;
  return ((SYS_CLK_FREQ * mdiv) / (pdiv << scale))/i;
}

Because of this bug, the PLL is not getting set correctly, and the clock frequency is not getting read from the PLL correctly.

ALL GP2X's run at 200MHz by default. Hermes_PS2R's program is wrong.

Also, for those people who have found that the LCD changes when the clock speed has changed, this is because the LCD clock is derived from FPLL, so changing FPLL changes the LCD clock. Simple! The LCD clock should be re-set whenever FPLL is changed.

Here's my routines to do the same thing as Hermes_PS2R is doing, but (afaik) these ones work correctly:
Code:
static unsigned int CalcPll (unsigned short pll)
{
  unsigned int temp1, temp2;

  temp1 = 7372800 * ((unsigned int)(((pll >> 8)&0xff)+8));
  temp2 = ((unsigned int)(((pll >> 2)&0x03f)+2)) * ( 1 << ((unsigned int)(pll & 3)));
  return temp1 / temp2;
}

unsigned int sdk2x_GetFPLL (void)
{
  return CalcPll (MSP_FPLLVSETREG);
}

unsigned int sdk2x_GetUPLL (void)
{
  return CalcPll (MSP_UPLLVSETREG);
}

unsigned int sdk2x_GetAPLL (void)
{
  return CalcPll (MSP_APLLVSETREG);
}

unsigned int sdk2x_SetFPLL (unsigned short FpllSetReg)
{
  int i;
  unsigned int imask;

  imask = MSP_INTMASK;

  /* Mask ALL interrupts */
  MSP_INTMASK = 0xFF8FFFE7;
  MSP_FPLLSETVREG = FpllSetReg;

  while (MSP_CLKCHGSTREG & 1);

  MSP_INTMASK = imask;

  for (i=0;(i<10000000) && (MSP_FPLLVSETREG != FpllSetReg); i++);

  return CalcPll (MSP_FPLLVSETREG);
}

If you're interested, I've modified the old pllset.c program to handle the MMSP2. You can get it from my site.


Und Vim hat es dann mal fix compiled: http://s17.yousendit.com/d.aspx?id=1WV0OZQ6JY2G23CMOQWTEZB8OS

EDIT: ok ... man sollte dinge vorher testen ... Vims datei sieht aus wie ne windows-exe die einem parameter fürs takteinstellen ausgibt...


EDIT2:

So, Vim hat mal schnell ne funktionierende GPE zusammengebacken. Ihr bekommt sie fix von meinem Server: http://www-users.rwth-aachen.de/markus.vehring/cpu_speed.zip

Wird noch nicht hochgeladen, da die Grenze noch bei 210mhz liegt ... vim versucht das schnell zu ändern. Er scheint wohl den 1.0 Code genutzt zu haben.
 
ok ... neue version draußen. Alle Fehler sollten nun draußen sein.

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,8,984


testet NeoGeoCD ... MetalSlug läuft nun mit MP3-Musik absolut flüssig (bei 266mhz). PSX hat auch nen dicken geschwindigkeitsboost. Außerdem uist das Bild stabiler :D
 
Sehr hübsch :)
Jetzt kann man sogar die Scanlines abstellen :)

Mit 105 Div 1 sind sie fast weg :)
 
Back
Top