Changes

796 bytes added ,  19:13, 2 September 2017
no edit summary
Line 2: Line 2:     
= manu =
 
= manu =
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || || Takes 4 bytes of input, and produces 0 bytes output.
+
| 0 || InitUsbTransferPipeFsFile || Takes 4 bytes of input, and produces 0 bytes output.
 
|-
 
|-
 
| 1 || FsFile_Exists || Takes an X descriptor, and produces, 8 bytes output.
 
| 1 || FsFile_Exists || Takes an X descriptor, and produces, 8 bytes output.
Line 15: Line 14:  
| 3 || FsFile_Write || Takes 0x18 bytes of input, an A descriptor, and an X descriptor, and produces 0 bytes of output.
 
| 3 || FsFile_Write || Takes 0x18 bytes of input, an A descriptor, and an X descriptor, and produces 0 bytes of output.
 
|-
 
|-
| 4 || || Takes 4 bytes of input, and produces 0 bytes of output.
+
| 4 || InitUsbTransferPipeRaw || Takes 4 bytes of input, and produces 0 bytes of output.
 
|-
 
|-
| 5 || || Takes 0x10 bytes of input and a B descriptor, and produces 8 bytes of output.
+
| 5 || Raw_Read || Takes 0x10 bytes of input and a B descriptor, and produces 8 bytes of output.
 
|-
 
|-
| 6 || || Takes 0x10 bytes of input and an A descriptor, and produces 8 bytes of output.
+
| 6 || Raw_Write || Takes 0x10 bytes of input and an A descriptor, and produces 8 bytes of output.
 
|-
 
|-
 
|}
 
|}
   −
This seems to interface with [[USB_services|usb:ds]]. SystemInitializer only uses cmd1..cmd3.
+
All commands are wrappers for [[USB_services|usb:ds]] requests with USB configured as:
 +
VID: 0x057E (Nintendo Co., Ltd)
 +
PID: 0x3000
 +
BCD: [0x62-byte array]
 +
    0x00: 0x0100
 +
    0x02: "Nintendo"
 +
    0x22: "NintendoSdkDebugger"
 +
    0x42: "SerialNumber"
 +
 
 +
[[SystemInitializer]] only uses cmd1..cmd3.
 +
 
 +
== InitUsbTransferPipeFsFile ==
 +
Takes an unknown u32 (ID?) and configures a transfer pipe over [[USB_services|usb:ds]] for file access mode.
    
== FsFile_Exists ==
 
== FsFile_Exists ==
Takes an input path string(type-0x9 buffer), returns 8-bytes for the output u8 flag.
+
Takes an input path string (type-0x9 buffer), returns 8-bytes for the output u8 flag.
    
Checks whether the specified file exists.
 
Checks whether the specified file exists.
Line 43: Line 54:     
SystemInitializer also uses this as "FsFile::Create" with all input u64s set to 0.
 
SystemInitializer also uses this as "FsFile::Create" with all input u64s set to 0.
 +
 +
== InitUsbTransferPipeRaw ==
 +
Takes an unknown u32 (ID?) and configures a transfer pipe over [[USB_services|usb:ds]] for raw access mode.
 +
 +
== Raw_Read ==
 +
Takes a type-0x6 output buffer and 2 u64s: '''offset''' and '''size'''.
 +
 +
Reads raw data from the device.
 +
 +
== Raw_Write ==
 +
Takes a type-0x5 input buffer and 2 u64s: '''offset''' and '''size'''.
 +
 +
Writes raw data to the device.