I've had the code for this in CakesFW for a while now, but I've decided to separate it and make it a standalone project.
This is a mostly drop-in replacement for Gateway's LauncherTemplate.dat you see in projects like rxTools and Decrypt9.
What this does, is, from whatever entry point you're coming, does some exploits to get into ARM9 kernel mode, and then runs your code.
More info on the github page: https://github.com/mid-kid/CakeHax
Currently supported entry points are MSET 4.x on firmwares 4.x and 9.0-9.2, and spider 4.0-9.2.
Note for MSET: The only MSET 9.x ROP installer right now is http://mkiddy.leerik.nl/cakes/CakesROP.nds
As an example of how to replace LauncherTemplate.dat with CakeHax, this is all I had to change in Decrypt9 to make it run on MSET with CakeHax: https://github.com/mid-kid/Decrypt9/commit/86f1c21672c7672992f7ba224bf0e001d4c8d3f5
And here a binary: http://mkiddy.leerik.nl/bin/Decrypt9.dat (NOTE: You can't rename it, or it won't work. You'll have to use the ropCustom.txt feature in CakesROP.nds for MSET)
This is a mostly drop-in replacement for Gateway's LauncherTemplate.dat you see in projects like rxTools and Decrypt9.
What this does, is, from whatever entry point you're coming, does some exploits to get into ARM9 kernel mode, and then runs your code.
More info on the github page: https://github.com/mid-kid/CakeHax
Currently supported entry points are MSET 4.x on firmwares 4.x and 9.0-9.2, and spider 4.0-9.2.
Note for MSET: The only MSET 9.x ROP installer right now is http://mkiddy.leerik.nl/cakes/CakesROP.nds
As an example of how to replace LauncherTemplate.dat with CakeHax, this is all I had to change in Decrypt9 to make it run on MSET with CakeHax: https://github.com/mid-kid/Decrypt9/commit/86f1c21672c7672992f7ba224bf0e001d4c8d3f5
And here a binary: http://mkiddy.leerik.nl/bin/Decrypt9.dat (NOTE: You can't rename it, or it won't work. You'll have to use the ropCustom.txt feature in CakesROP.nds for MSET)