libctrshell (for cia development)

Discussion in '3DS - Homebrew Development and Emulators' started by cpasjuste, Oct 29, 2015.

  1. cpasjuste
    OP

    cpasjuste GBAtemp Fan

    Member
    440
    641
    Aug 27, 2015
    France
    Hi,

    Here is a project i did write a while back, which should ease development on the 3ds. This is not really true now with citra emulator, but it could be useful for cia development and testing or real hardware.

    "libctrshell" is a library to add to your (cia) project, and will provide a shell over wifi to print debug messages over the network and a few more functions.

    I never made it public as it may contains a lot of bugs, is not finished and the code is crappy but it still improved my development time...

    I won't go too deep in the details as i'm too lazy for this now, but for short you should :

    - build libctrshell and add it to your (cia) project
    - use "ctr_shell_init(NULL, SHELL_PORT)" to start the server in your project
    - use "ctr_shell_print" to printf to the client
    - build the java client or download it to connect to your 3ds/project
    - use "title_send [cia_path] to send/exec your newly compiled project to the 3ds

    Source code : https://github.com/Cpasjuste/libctrshell

    Here is a list of the available cmds :
    Code:
    [LIST=1]
    [*]  ls [path] - list directory content
    [*]  cd [path] - enter directory
    [*]  rm [file] - delete file
    [*]  rmdir [dir] - delete directory
    [*]  mkdir [dir] - create directory
    [*]  mv [path] [newPath] - move file/directory
    [*]  pwd - echo current directory
    [*]  title_list [0/1] - list titles (0=nand/1=sd)
    [*]  title_info [file/titleid] - get cia/title infos
    [*]  title_del [titleid] - delete given titleid
    [*]  title_install [ciaFile] - install cia
    [*]  title_exec [titleid] - execute given titleid
    [*]  title_send [localCia] - send, install and execute cia file
    [*]  put [localFile] [remoteFile] - send file to ctr sdcard
    [*]  memr [address] [lenght] - read u32 block of memory (memr 0x1FF810A0 1)
    [*]  memw [address] [u32] - write u32 block to memory (memw 0x1FF810A0 00000000)
    [*]  menu - return to menu
    [*]  reset - reload CtrShell
    [*]  exit - disconnect from CtrShell
    [*]  help - show this help
    [/LIST]
    
     
    Last edited by cpasjuste, Oct 29, 2015
  2. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,953
    Jun 9, 2007
    Antarctica
    Thank you again for this, it should bring CIA-based homebrew development on par with netloading 3dsx homebrews.

    I don't usually like to use image macros or memes, but I think this one is appropriate here:
    [​IMG]

    This is something long overdue.
     
  3. hippy dave

    hippy dave Butts Butts Megabutts

    Member
    2,587
    1,803
    Apr 30, 2012
    Very nice, thanks.
     
  4. DarkFlare69

    DarkFlare69 GBAtemp Psycho!

    Member
    4,721
    2,573
    Dec 8, 2014
    United States
    Ohio
    Nice, good work!