Skip to content

Instantly share code, notes, and snippets.

@khang06
Created August 24, 2018 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khang06/0ae5f927a6dd771d87bcefcd8c53695f to your computer and use it in GitHub Desktop.
Save khang06/0ae5f927a6dd771d87bcefcd8c53695f to your computer and use it in GitHub Desktop.
bad dbgsetting patch v1
@little-endian
@nsobid-F18FF3CFCBAD0884D72ABBEB6C540D6B
@flag offset_shift 0x100
#01003BC0000A0000 Splatoon 2 1.0.0 USA
// DbgSetting over ShootingRange
@enabled
// first we need a way to access the scene
01455850 540F1A00 // add the ptr to Cstm::newScene<TitleForShow::Scene>(int,sead::Heap *) to ShootingRange (not possible to do it patching .text, you need to patch .rela.dyn otherwise it will be overwritten with the relocation stuff)
001A0F84 E0FF8152 // operator new(0x3F8) to operator new(0xFFF)
001A0F94 ABAD2594 // TitleForShow::Scene::Scene to DbgSetting::Scene::Scene
// then we need to replace the stubbed text render code
0120828C 82030014 // branch Lp::Sys::DbgTextWriter::pilotDraw(agl::lyr::RenderInfo const&, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*)const to Lp::Sys::DbgTextWriter::productDraw(agl::lyr::RenderInfo const&, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*)const
0120748C 16000014 // branch Lp::Sys::DbgTextWriter::pilotEntry(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*) to Lp::Sys::DbgTextWriter::productEntry(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*)
012074B4 18010014 // branch Lp::Sys::DbgTextWriter::pilotEntryV(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*, std::__va_list) to Lp::Sys::DbgTextWriter::productEntryV(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char const*, std::__va_list)
012074B8 55010014 // branch Lp::Sys::DbgTextWriter::pilotEntry(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char16_t const*) to Lp::Sys::DbgTextWriter::productEntry(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char16_t const*)
012074E0 57020014 // branch Lp::Sys::DbgTextWriter::pilotEntryV(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char16_t const*, std::__va_list) to Lp::Sys::DbgTextWriter::productEntryV(int, sead::Vector2<float> const&, Lp::Sys::DbgTextWriter::ArgEx const*, char16_t const*, std::__va_list)
// TODO: get the menu to use npad instead of debug pad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment