Magikoopa icon indicating copy to clipboard operation
Magikoopa copied to clipboard

Split into command line and gui executables

Open RicBent opened this issue 4 years ago • 2 comments

RicBent avatar Dec 11 '21 23:12 RicBent

Is this still being worked on? I'd love a CLI version that I can use in a CI/CD pipeline

fadillzzz avatar Nov 13 '23 12:11 fadillzzz

Hey, indeed it is being worked on and almost done.

See https://github.com/RicBent/magwi

It's a complete CLI replacement for Magikoopa. At least for NSMB2 its already stable and is being used to build SMBNext. Besides these hks files (ie it just works out of the box with Magikoopa projects) it also supports inline C(++)/ASM hooks like this to make the workflow a bit nicer:

// Places 3 branches with different condition codes/linking to exampleHook
mw_b(0x00100040)
mw_bleq(0x0010208C)
mw_bne(0x003A1F38)
int exampleHook() { return 3; }

// Replace 5 bytes at 0x006ad410
mw_replace(0x006ad410)
char exampleReplaceHook = { 0x42, 0x42, 0x42, 0x42, 0x42 };

Though a bit work is still needed to add proper error messages (right now it just panics with cryptic error messages if something goes wrong). Also some symbols need to be relocated if pre/post hooks are used (those were called "softbranch" in Magikoopa).

RicBent avatar Nov 15 '23 13:11 RicBent