WIP Porting over Codehandler + Code Types to the Switch + Cheat Database. But need a little bit of help

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by CosmoCortney, Jul 31, 2018.

  1. CosmoCortney
    OP

    CosmoCortney Chemtrail Pilot

    Member
    10
    Apr 18, 2013
    New Zealand
    on the cool side of the pillow
    Hello,
    I just thought it'd be cool if I could port the Codehandler and Code Types from my Lynx Code Manager to the Switch.
    But before I do that I need a few things to be clarified:
    1. What's the effective/logical range of the general purpose memory? (e.g. Wii U has 10000000 - 50000000)
    2. Is the memory Big Endian or Little Endian?
    3. Is anyone willing to cooperate with me and can implement the Codehandler into their TCP client or USB client? A communication through TCP or USB is necessary because cheats must be sent from a computer.
    4. Do I need syscalls in order to write into memory?
      4.1. If yes, which are those? Documentation?
    5. Is it possible for the Codehandler to inherit all access privileges?
    6. Anyone willing to create a cheat code manager? @BullyWiiPlaza maybe you would to port over JGeckoU ^^
    I do have a Cheat Code database for various systems on my Website. Adding support for the Nintendo Switch can be done within a few minutes!
    Trustworthy persons can be given access to post their codes.

    Here's a documentation of the Lynx Code Types: https://www.follow-the-white-rabbit.net/page.php?tools=lynx_code_manager
     
  2. Magnus Hydra

    Magnus Hydra GBAtemp Regular

    Member
    3
    GBAtemp Patron
    Magnus Hydra is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Dec 12, 2011
    United States
    Hey have you used the NSwitchDebugger yet or sys-netcheat? I know that's not what you're asking for but I though it might help you on ur quest.
     
    Last edited by Magnus Hydra, Jul 31, 2018
  3. MichiS97

    MichiS97 "Leftist snowflake milennial"

    Member
    9
    GBAtemp Patron
    MichiS97 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jun 14, 2011
    Germany
    Munich
    Thank you so much for keeping up the good work.
     
  4. Jonna

    Jonna Some sort of musician.

    Member
    7
    May 15, 2015
    Canada
    Canada
    I was waiting for you to get on board with the Switch! Loved your involvement with TCP Gecko in the Wii U homebrew!
     
  5. dsrules

    dsrules GBAtemp Guru

    Member
    9
    Sep 20, 2005
  6. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3

    Member
    10
    Aug 2, 2014
    Germany
    Last edited by BullyWiiPlaza, Jul 31, 2018
    CosmoCortney and Jonna like this.
  7. Alkéryn

    Alkéryn Moon Dweller ~

    Member
    8
    Mar 15, 2015
    France
    Albategnius, Moon
    It is arm so it is bi endian, you can use both on this arm i think
    https://en.wikipedia.org/wiki/Endianness#Bi-endianness
    i think it is little endian by default though
    but you can switch the endianess

    Also for memory idk the range but it is very likely ASLR
     
    Last edited by Alkéryn, Jul 31, 2018
  8. connivence

    connivence Advanced Member

    Newcomer
    3
    Jun 19, 2018
    Korea, North
    1. None, the address space layout is randomized due to ASLR.
    2. Little endian.
    3. -
    4. 0x69, 0x6A, 0x6B, 0x73 to 0x78, and there is code using those I believe, in the current "debuggers". (http://switchbrew.org/index.php?title=SVC)
    5. -
    6. -
     
    CosmoCortney and Alkéryn like this.
  9. CosmoCortney
    OP

    CosmoCortney Chemtrail Pilot

    Member
    10
    Apr 18, 2013
    New Zealand
    on the cool side of the pillow
    Not yet since i'm not at home most of the time.
    But I will return home the weekend after so I can take my Switch with me :)
    Before I have access to my Switch I can already edit the source of the codehandler (it's in C/C++)

    I see. But the offset between where the game's general purpose memory starts and a non-pointer cheat is always the right, am I right?
    By analyzing some videos on YouTube it seems like we can get the game's memory.
     
    Last edited by CosmoCortney, Aug 1, 2018
  10. connivence

    connivence Advanced Member

    Newcomer
    3
    Jun 19, 2018
    Korea, North
    I believe it should be, except for the heap I assume.
     
    CosmoCortney likes this.
Loading...