Homebrew PSP plugin to persistently lock the CPU clock to a specific speed?

2excal7

Member
OP
Newcomer
Joined
Feb 10, 2024
Messages
16
Trophies
0
Age
29
XP
87
Country
Indonesia
I was playing Trails In The Sky, and I used CWCheat to set the CPU speed to 111 Mhz because it just so happens the game isn't all that intensive to run and I wanted to be able to reduce the battery consumption. But then I noticed the CPU clock kept getting reset to the default 222 MHz... at first I was confused why it did that, figured that maybe the game just refuses to run in any speed other than 222 MHz.

But then I had a thought.... so I had my character enter a new map, and I brought up CWCheat as the screen was fading out and sure enough, I noticed the clock had been bumped to 333 MHz. And then afterwards when the new map's done loading, the CPU clock speed was back at 222 MHz. So in other words, the CPU clock is temporarily bumped up anytime the game enters a loading state to speed up loading times, then back down when it's done. This is not exactly an issue in and of itself, but it does mean that I can never run the game at anything other than 222 MHz.

So now that I know the game does this, does anyone know if there's a plugin that can persistently keep the CPU clock to the speed I want?
 

slaphappygamer

Well-Known Member
Member
Joined
Nov 30, 2008
Messages
4,178
Trophies
2
Age
47
Location
California
XP
7,983
Country
United States
I’ve always changed the clock speed in the recovery menu. I did this with GTA Vice City Stories and it worked well. I had the speed set to 333mhz. I like the recovery menu options better since I can GAME and XMB independently.
 

2excal7

Member
OP
Newcomer
Joined
Feb 10, 2024
Messages
16
Trophies
0
Age
29
XP
87
Country
Indonesia
Welp, I dug out ye olde PPSSPP disassembly tool and decided to take matters into my own hands: I stubbed out the function calls responsible for changing the clock speed during gameplay.

It happens at at least 6 different instances:
  • When the game is booted (clock up)
  • When you reach the title menu (clock down)
  • When you start/load a game (clock up)
  • When the game finishes loading (clock down)
  • When you enter a different map (clock up)
  • When the map finishes loading (clock down)
Instance #1 happens way too early and CWCheat hasn't even loaded by this point, so I left it out. I only stubbed the other 5 instances where it matters. This here's for the official English release of the game - I've tested it and so far the clock speed has stayed put, just as I wanted.
Code:
_S ULUS-10540
_G Trails In The Sky [USA]
_C1 Disable clock speed change
_L 0xE00A9267 0x00004D6C
_L 0x20004D6C 0x00000000
_L 0x20004D70 0x00000000
_L 0x20107304 0x00000000
_L 0x20107308 0x00000000
_L 0x20107A94 0x00000000
_L 0x20107A98 0x00000000
_L 0x201085DC 0x00000000
_L 0x201085E0 0x00000000
_L 0x20108CE4 0x00000000
_L 0x20108CE8 0x00000000

I'm still looking for a plugin that locks it persistently so I wouldn't need to do all this. I still have the Second Chapter to look forward to after all. :P
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • A @ ATEMVEGETA:
    @The Real Jdbye, You traded just a Pokemon or transfered the save data?
  • K3Nv2 @ K3Nv2:
    Gotta transfer them all!
  • The Real Jdbye @ The Real Jdbye:
    @ATEMVEGETA i traded all the pokemon
  • BigOnYa @ BigOnYa:
    On the Switch forums I've seen people claim they were banned for using saves from emulator, on Ofw. But I don't play that ****
    +1
  • K3Nv2 @ K3Nv2:
    I sold all my Pokémon to Arabic princes
    +1
  • A @ ATEMVEGETA:
    @BigOnYa, Interesting! Can you show me some of those posts plz?
  • BigOnYa @ BigOnYa:
    No you go find them, use the search, or ask in the Switch noob forums.
    +1
  • Larsenv @ Larsenv:
    @Xdqwerty I'm not sure if there was a 13 or over rule back in 2013
    +1
  • BigOnYa @ BigOnYa:
    @ATEMVEGETA here's a few comments, but know ive seen more in the threads. Post in thread 'Pokemon Scarlet save file' https://gbatemp.net/threads/pokemon-scarlet-save-file.646217/post-10403348
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, im still afraid of coming out irl tho
  • A @ ATEMVEGETA:
    @BigOnYa,
    Well, I had read that thread already, it does not mention moving saves from Emulator to OFW. Also I am not planning to edit/modify a save file. Just play a save file on an emulator, and then move it to OFW and play it on my switch.
  • BigOnYa @ BigOnYa:
    I wouldn't risk it, but do what you want. A console ban is loss of all online play, of any games.
  • K3Nv2 @ K3Nv2:
    Not my online Mario kart races!
    +2
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, I try to do a gdevelop event to make an enemy fire bullets if it is on screen and its in colision with a platform, but it doesnt work (and yes i downloaded the "is on screen" condition extension)
  • Xdqwerty @ Xdqwerty:
    and the enemy has the fire bullet behavior
  • BigOnYa @ BigOnYa:
    You can try in code, if player distance <1000
    then enemy fire bullets at player.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, lemme try
  • BigOnYa @ BigOnYa:
    Or use the ray casting behavior for the enemies
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i cant find that behavior
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, and nope the player distance condition didnt work
  • K3Nv2 @ K3Nv2:
    Bigonya uses couch casting abilities to scare people away lol
    +1
  • BigOnYa @ BigOnYa:
    Sorry that behaviour is just called raycast
    BigOnYa @ BigOnYa: Sorry that behaviour is just called raycast