overclocking in snes9xgp


Azure

Trust the recursion...
Joined
May 21, 2003
Messages
3,805
Location
California, USA
How can i add the overclocking feature with the hexeditor? Can somebody guide me, or link to the emu already patched?
 
OK. Let me try to make this simple.

All programs, even ones written in higher-level languages, are eventually translated into binary. One way to represent binary code is through the hexadecimal number system, which uses a 16 base instead of a 10 base. Because one needs only two digits to represent 256, this is rather popular in the computer science world.

Now, when I write "x = x + 1" in C++, something like this appears in the object code during compilation:

MOV reg, [x]
ADD reg, 1
MOV [x], reg

Not exactly that, and "reg" depends on the processor, but you get the gist. Now, each part of those commands has a binary, and therefore hexadecimal, equivilent. In fact, these words represent the machine code, and its called "Assembly" (or asm for short). So let's say it works out like this:

00 = MOV rmv, rmv
02 = ADD rmv, number
64536273F = Address for [x]
0001 = number for register

So what we end up with is...

76546372D: 64536273F 0001 0000
76546372E: 0001 00000001 0002
76546372F: 0001 64536273F 0000

When you are patching hex-wise, that is what you are looking at.

Now, back to the question. What you would need to find is where the clock-speed is set. The problem is, unless the coder intentionally placed some code in there, you may have to add in the code yourself. Which means adding in several lines of machine code to set the clock speed. Now, do you see the address for x? That represents where the value of x is located in the file at time of compliation. If you add more bytes before that address, then it becomes invalid. There are also many other places addresses are used.

In short: Unless you're a master hacker, give it up.
 
Hi

here it's an easy one but there are some steps to perform and if you know
nothing in coding, it won't be easy ;-)

1/ uncompress the fxe
2/ check the usual value used to set clockspeed to 133Mhz
(in fact there are 3 values sent as parameters to the function)
sorry I dont remember them and I'm at work right now...
3/ do a search on them
4/ modify them & save.

easy ?

I've done this for example to check the speed of snesemu (and changed other
stuff like disactivating the fps display...)
or the one from infones gp32 (btw it runs at 166Mhz....)
 
Ah, so there actually is a specific function available in every GP32 program to set the clock speed, whether the author puts it there or not? Hmm, that will make it much easier. Nothing is worse then trying to add something to a program with only the machine code to look at.
 
I havnt got a clu how to hex edit and im sure loads of other people dont either so do u think that the author, or if its open source anyone change it to 156 (this seems to work on a lot more gps than 166)?
 
Back
Top