A program that makes writing Cemuhook patches a bit easier by making it more organic and less error-prone.
It basically extends Cemuhook's format with a few Quality of Life features which it then "compiles" into a Cemuhook patch:
- Automatically addresses numbering (no need to refactor code in some cases due to a line change).
- Automatically calculates and inserts code cave size.
- Interprets the loading of constant values in the code cave and makes the addresses for you.
- Makes code cave entries more elegant/smarter.
- Always-on-top mode for easy access.
It doesn't change any existing behavior and using these added features should be fairly easy.
Latest version for Windows can be downloaded in Releases.
A good example of all of the different things/behavior can be seen in the example folder!
codeCaveSize=auto ; Handles the size on it's own.
codeCaveEntry:
fmuls f3, f3, f2 ; No addresses in front of everything.
lfs f2, .float($aCemuExpression*10)@l(r3) ; Cemu expression directly into a float register, it's possible!
lbz r2, .byte(2) ; Other types are also supported! Also, it will use the same, normal register if you don't hint it using `@l(rX)`.
blr
This assumes you've installed the C++ part in Visual Studio.
- Download and install Qt. Make sure to select MSVC while it's installing.
- Clone or download this repository somewhere.
- Open up the special
Qt X.XX.X (MSVC XXXX XX-bit)
command prompt. - Browse to the folder where you've cloned/downloaded the repository and go to the
src
folder. - Go to the
src
folder. - Find a file called
vcvarsall.bat
somewhere in your Visual Studio installation folder and call it from within the CMD window via the following command (replace the path to the one you've found):call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
. - Run
qmake -config release
- Run
nmake
- And finally, run
windeployqt --release release
.
You should now have a working notepad.exe
in the release
folder!
(I'm honestly not sure if there's an easier way to compile a program from the command prompt, but this worked well enough to create the Release build.)
Basically, I wanted to try Qt and had a good idea/need for a tool that would help with some of the aspects of patching and totally not lessen the amount of screw-ups I make.
This project is largely based and build upon Qt's notepad example, which is licensed under BSD 3-Clause "New" or "Revised" License. This project is also distributed under the same license.