/dev/mcp

From WiiUBrew
Jump to navigation Jump to search

List of functions (Ioctl)

Command Function Access Permissions Description Notes
0x05 MCP_CompatWagonSourcePrepare All 0x0400
0x06 MCP_CompatWagonSourceComplete All 0x0400
0x07 MCP_CompatWagonDestinationPrepare All 0x0400
0x08 MCP_CompatWagonDestinationComplete All 0x0400
0x09 MCP_CompatWagonDeleteContext All 0x0400 Deletes Wii system transfer context.
0x0A MCP_CompatWagonCreateContext All 0x0400 Creates Wii system transfer context.
0x0B MCP_CompatWagonDeleteArchiveHash All 0x0400 Deletes a Wii system transfer hash.
0x0C MCP_CompatExPrepareLaunch All 0x0002 Prepares for a Cafe2Wii transition.
0x0D MCP_CompatExLaunch All 0x0002 Starts the Cafe2Wii transition.
0x0E MCP_CompatHaiCreateCompanionFile All 0x0002 Creates a file containing information for HAI.
0x10 StartHeartBeatMonitor COSKERNEL only Starts the kernel heartbeat monitor. Called by KiStartHeartBeatMonitor
0x20 MCP_GetEnvironmentVariable COSKERNEL only Gets the system environment table through /dev/dk/envsvc Called by KiGetEnvironmentTable
0x30 MCP_ResetOnPanicEnable Debug only 0x0008 Sets reset_on_crash in system.xml to 1
0x31 MCP_ResetOnPanicState Debug only 0x0008 Sets reset_on_crash in system.xml to 0
0x42 GetRegionCharCode All 0x0010 Gets a 3 character code reflecting the system prod area, including JPN, USA, EUR, AUS, KOR, TWN and CHN.
0x47 MCP_GetPreciseTitleSize Espresso only Gets a title's actual disk size. Uses quota size, but will manually calculate if no quota is present
0x48 MCP_AssignTitlePatch ACP only Assigns a content redirection path for titles that have an installed update to the MCP MIDP remap_paths_region Called by ACP_AssignTitlePatch
0x49 PrepareTitleByPath All Called by KiPrepareTitleByPathAsync
0x4A GetMasterTitleInfo COSKERNEL only Gets stored app.xml info for the current master title. Called by KiIsMasterTitleCafemenu,
0x4B MCP_PreloadTitleFolder All Preloads a title folder for launching
0x4C MCP_GetOwnTitleInfo All Retrieves the calling process's title information Treated slightly differently if called by ARM
0x4D MCP_TitleCount All Returns the current number of titles on the console. Data from mcp_list_region
0x4E MCP_DeviceList
MCP_FullDeviceList
Espresso only 0x0008 Gets the device list Data from mcp_list_region
0x4F RelaunchPrepareTitleByPath COSKERNEL only Prepares a title by path for relaunch. Called by KiPrepareTitleByPathAsync
0x50 MCP_CloseTitle COSKERNEL only Closes a title. Called by KiCloseTitle and KiStartCloseTitle
0x51 MCP_PrepareTitle COSKERNEL only Prepares a title for launch. Called by KiSetupTitle
0x52 PrepareTitleAsync COSKERNEL only Prepares a title for launch. Called by KiPreparetitleAsync
0x53 MCP_LoadFile COSKERNEL only Loads a Cafe OS, process code, or system data content file Called by KiLoadAsync
0x55 COSKERNEL only Validates an input argument. Purpose is unknown.
0x57 MCP_GetFileLength COSKERNEL only Gets the length of a file.
0x58 MCP_TitleList
MCP_GetTitleInfo
MCP_GetTitleInfoByDevice
MCP_GetTitleInfoByTitleAndDevice
MCP_GetTitleInfoByTitleAndDeviceType
MCP_GetTitleInfoByTitleAndIndexedDevice
MCP_PatchCheckTitleVersionByPath
MCP_TitleListByAppAndDevice
MCP_TitleListByAppType
MCP_TitleListByAppTypeFlagsAndDeviceType
MCP_TitleListByDevice
MCP_TitleListByDeviceType
MCP_TitleListByUniqueId
MCP_TitleListByUniqueIdAndDeviceType
MCP_TitleListByUniqueIdAndDeviceTypeAndAppType
MCP_TitleListByUniqueIdAndIndexedDeviceAndAppType"
Non-kernel only 0x0010, 0x0008 Gets title information in the form of MCP_TitleListType
0x59 RelaunchPrepareTitle COSKERNEL only Prepares a title by path for relaunch. Called by KiPrepareTitleAsync
0x5A GetLaunchParameters COSKERNEL only Called by KiGetLaunchParameters
0x5B MCP_GetTitleId Espresso only
0x5C MCP_MemBlockSwitchToForeground COSKERNEL only Called by KiSetForegroundTitle
0x5D MCP_ConfirmTitleLaunch Unknown Not implemented
0x5E ARM only Gets data from mcp_list_region.
0x5F MCP_GetTitleSize Espresso only Gets a title's size based on install requirements from its content metadata.
0x60 MCP_SetSystemTime COSKERNEL only 0x0008 Sets the absolute system time in the RTC. Called by KiSetAbsoluteSystemTime
0x61 MCP_GetAbsoluteSystemTime COSKERNEL only Gets the absolute system time from the RTC. Called by KiGetAbsoluteSystemTime
0x62 MCP_SetDefaultTitleId Debug only 0x0008 Sets the default title ID in system.xml. This is always the Wii U Menu on retail consoles. Variants include System Config Tool on development consoles, Kiosk Menu on kiosk consoles, and Joysound on OrchestraX consoles.
0x63 MCP_SetPowerButtonEnabled COSKERNEL only Toggles power transitions. Called by KiPowerButtonCtrl
0x64 MCP_DisablePowerOffOnCrash Debug only 0x0008 Disallows the console powering off following a crash.
0x65 MCP_GetDefaultTitleId Debug only 0x0008 Gets the default title ID from system.xml.
0x66 MCP_RequestPowerOff Espresso only 0x0008 Requests to shut down the console. This can be into ECO mode or standby mode.
0x67 MCP_GetSATALimiterState Debug only Gets the SATA limiter state. Intended for WUIH consoles.
0x68 MCP_SetSATALimiterState Debug only Sets the SATA limiter state. Intended for WUIH consoles.
0x69 MCP_GetTitleSATALimiterState Debug only Gets the SATA limiter state for a title. Only retrieves data if the hardware version one of WUIH. Said data is set by storage_limiter (0005001B-10064000).
0x6A MCP_SetDefaultEcoTitleId Debug only 0x0008 Sets the default ECO process title ID.
0x6B MCP_GetDefaultEcoTitleId Debug only 0x0008 Gets the default ECO process title ID. This is usually 00050010-10066000 on retail consoles and 00050010-1006A000 on development consoles.
0x70 SetVersionList All 0x0004 Sets version list data.
0x71 ApplyVersionList All 0x0004 Commits any pending version list changes from the cached version list to the real version list.
0x73 MCP_PatchDeleteVersionList All 0x0004, 0x1000 Clears and recreates the version list.
0x74 MCP_PatchCheckTitleVersion
MCP_PatchCheckTitleVersionByPath
MCP_PatchGetLatestVersion
MCP_PatchGetVersion
Espresso only 0x0004, 0x1000 Obtains version data from the version list.
0x75 MCP_PatchSetLatestVersion
MCP_PatchSetRequiredVersion
MCP_PatchSetVersionListVersion
All 0x400, 0x1000 Sets version data in the version list.
0x76 CloseVersionList All 0x0004 Virtually commits pending version list changes and clears the cached list.
0x7A IvsSet All 0x0004 Writes the Ivs ticket to /vol/system_slc/security/ivs.bin and updates the IvsConfig in Hardware/EEPROM.
0x7B IvsGet All 0x0004 Verifies and gets the IVS seed.
0x7C GetMasterTitleDeviceType All 0x0004 Checks the master title device label and returns 1 if it contains hfio, and 2 if it contains sd. Can be called at any point but will simply return 0 if the security level is normal. This is likely because the checked device types are not intended to be used in a normal environment.
0x7D MCP_InstallGetAocSize2 All 0x0080 Gets the install size of an AOC title.
0x7F MCP_InitializeIvs All 0x0020
0x82 MCP_InstallGetProgress All 0x0004 Gets the current progress of the current install operation.
0x89 MCP_GetSystemVersion All Gets the system version.
0x8A MCP_InstallSetCache All 0x0004 Depreciated.
0x8B RemoveDigestBin All 0x0004 Removes digest.bin
0x8D MCP_InstallSetTargetDevice All 0x0004 Sets the target device for installation.
0x8E MCP_DeleteTicketsAsync All 0x0004 Deletes specified tickets.
0x96 MCP_UpdateCheckResume All 0x0004
0x97 MCP_UpdateClearContextAsync All 0x0004 Clears any update context.
0x98 MCP_UpdateCheckUpdaterVersion All 0x0008 Checks the system updater version.
0x99 MCP_UpdateCheckContext All 0x0004 Checks update context.
0x9A MCP_UpdateContextSetUserFlag All 0x0004 Sets the user flag in update context.
0x9B MCP_UpdateContextReadUserFlag All 0x0004 Reads the user flag in update context.
0xA0 MCP_TitleListUpdateGetNext All Gets the next title in the title list to be updated.
0xA1 MCP only Unknown.
0xA2 MCP_TitleListUpdateCancel All Cancels any current title list update.
0xC0 MCP_DeleteUserData
MCP_DeleteUserDataWithException
All 0x0008 Deletes user data. Excludes data specified by exceptions.txt if WithException is called.
0xC1 MCP_GetSystemLog Debug only 0x0008 Gets the system log.
0xC2 MCP_FormatExternalStorage All 0x0008 Formats an external USB storage device.
0xC3 MCP_ChangeSystemMode Debug only 0x0008 Changes the PRSH boot info and settings in system.xml including simulated_ppc_mem2_size and dev_mode.
0xC4 MCP_GetSystemMode All Gets the current system mode.
0xC5 MCP_ChangeSystemMemoryEmuMode Debug only 0x0008 Changes simulated_ppc_mem2_size in system.xml (can be either 2GB or 4GB)
0xC6 MCP_GetSystemMemoryEmuMode Debug only 0x0008 Gets simulated_ppc_mem2_size from system.xml
0xC7 MCP_ExternalStorageLock All Locks external storage. Only works for ODD.
0xC8 MCP_ExternalStorageUnlock All Unlocks external storage. Only works for ODD.
0xC9 MCP_GetFastRelaunchEnable Debug only 0x0008 Gets fast_relaunch_value from system.xml
0xCA MCP_SetFastRelaunchEnable Debug only 0x0008 Sets fast_relaunch_value from system.xml
0xCB MCP_GetSystemCrashLog All 0x0200 Gets the latest system crash log.
0xCC MCP_GetSystemCrashFlag All 0x0008 Gets the system 'crash flag', which indicates if mcp_crash_region has crash data.
0xCD MCP_TriggerCrashLogCollection
MCP_TriggerCrashLogCollectionEx
All Creates and populates a new crash log.
0xCE MCP_GetSystemCrashLogDescription All 0x0200 Gets a crash log description (.dsc file accompanying the crash log)
0xD2 GetDeviceCert All 0x0000 Gets the device certificate.
0xD3 MCP_GetDeviceId All 0x0010 Gets the device ID.
0xD5 GetCompatTmdViews All 0x0000 Gets Wii TMD information.
0xD8 MCP_GetCompatDeviceId All 0x0010 Gets the Wii device ID
0xDB GetTmdView All 0x0000 Gets TMD information. Essentially ES_GetTmdView from the Wii.
0xF1 MCP_InstallSetTargetUsb All 0x0004 Sets the installation operation target to USB storage.
0xF2 InstallSetupContextThenInstallTitleAsync All 0x0004 Sets up the install context then installs a title.
0xF3 InstallAbortAndResetOp All 0x0004 Cancels any install operations and clears update context.
0xF4 InstallCleanupArtefacts All 0x0004 Removes install context and filesystem info.
0xF5 All 0x0004 Unknown. Install-related
0xF6 InstallSetupContextThenInstallTitleAsyncAbort All 0x0004
0xF7 GetInstallContextInfo All 0x0004 Gets information from any existing install context.
0xF9 All 0x0004 Unknown.
0xFA MCP_InstallGetTargetDevice All 0x0004 Gets the install target device. 0x0 for MLC, 0x1 for USB
0x100 MCP_RightCheckLaunchable All 0x0010 Checks title tickets to ensure that the user has the right to launch a title (i.e has it been purchased legitimately).
0x111 MCP_DemoLaunchGetRemainder All 0x0008 Gets the remaining amount of time a demo can be used for.
0x120 MCP_AocOpenTitle All 0x0080 Opens an AOC title.
0x121 MCP_AocCloseTitle All 0x0080 Closes an AOC title.
0x122 MCP_AocTestScanned 0x0000 Checks AOC data in mcp_list_region
0x123 MCP_AocLockTitle All 0x0800 Locks an AOC title.
0x124 MCP_AocUnlockTitle All 0x0800 Unlocks an AOC title.
0x130 MCP_ChangeEcoSettings Espresso only 0x0008 Changes ECO mode settings in eco.xml. If the console is currently in ECO mode, it resets the auto-power-down timer.
0x131 MCP_GetEcoSettings
MCP_GetEcoWDSetting
Espresso only 0x0008 Gets ECO mode settings from eco.xml.
0x132 MCP_ChangeStandbySettings All 0x0008 Changes the value of standby_enable in system.xml.
0x133 MCP_GetStandbySettings All 0x0008 Gets the value of standby_enable in system.xml.
0x134 MCP_ChangeEcoWDSetting Debug only 0x0008 Changes the value of wd_disable in eco.xml. "EcoWD" referring to the ECO mode watchdog.
0x135 MCP_Get4SecondOffStatus COSKERNEL only
0x136 All Unknown.
0x137 EnsurePMSvcIsRunning All 0x0008, 0x0400 Uncertain. Called by MCP_WagonUFormatDestination and MCP_DeleteUserDataWithException
0x138 MCP_SetSyslogFilterMask Debug only 0x0008 Sets log_mask in system.xml.
0x139 MCP_GetSyslogFilterMask Debug only 0x0008 Gets log_mask in system.xml.
0x140 MCP_CopyTitleAbort All 0x0004 Aborts any current copy title operations.
0x141 MCP_DeleteTitleAbort All 0x0008 Aborts any current delete title operations.
0x142 MCP_InstallTitleAbort All 0x0004 Aborts any current install title operations.
0x145 MCP_InstallCleanupAbort All Aborts any current install cleanup operations.
0x149 MCP_InstallGetAvailableUpdateOp
MCP_InstallUtilIsResumeAvailable
All 0x0004 Checks the availability of a certain install action.
0x160 MCP_WagonUCreateArchive All 0x0400 Creates a system transfer data archive. Stored in /vol/wagon_archive/private/Nintendo Wii U/sys/HAJA/
0x161 MCP_WagonUInstallArchive All 0x0400 Installs a system transfer data archive.
0x162 MCP_WagonUEstimateArchiveSize
MCP_WagonUEstimateArchiveSizeEx
All Gets the approximate size of a system data transfer archive based on the specified stage of operation. The archive stages are compat, cafe, and account.
0x163 MCP_WagonUGetProgress All 0x0400 Gets the current progress of a system transfer operation.
0x164 MCP_WagonUCheckArchiveExists All 0x0400 Checks if a system transfer data archive exists.
0x165 MCP_WagonUDeleteArchive All 0x0400 Deletes any system transfer data archives. Searches in /vol/wagon_archive/private/Nintendo Wii U/sys/HAJA/
0x166 MCP_WagonUFormatDestination All 0x0400 Clears user data while acknowledging the specified exceptions in the WagonU migration list.
0x167 MCP_WagonUSetSessionId All 0x0400 Sets the WagonU session ID.
0x171 MCP_AppTagGetEnability All 0x0010
0x172 MCP_AppTagFlush All 0x0004
0x173 MCP_AppTagRollback All 0x0004
0x174 MCP_AppTagCreate Espresso only 0x0004
0x175 MCP_AppTagRemove All 0x0004
0x176 MCP_AppTagGetSize All 0x0010
0x180 MCP_NominalTitleGetTitleId Espresso only 0x0010 Gets a title ID based on a given index. Weird function, requires review.
0x210 MCP_MemBlockSetPidStartAddr COSKERNEL only

List of functions (Ioctlv)

Command Function Access Permissions Description Notes
0x01 MCP_LaunchCompat All 0x0002 Starts the Cafe2Wii transition.
0x02 MCP_CompatLoadAVFile All 0x0002 Loads the DMCU firmware or deint.txt.
0x03 MCP_CompatCopyFile All 0x0042 Copies a CMPTSave file.
0x04 MCP_CompatGetVersion All 0x0002 Gets Wii title version info.
0x30 MCP_ReadSysConfig
MCP_ReadSysConfigAsync
Superseded by UCReadSysConfig]
0x31 MCP_WriteSysConfig
MCP_WriteSysConfigAsync
Superseded by UCWriteSysConfig]
0x32 MCP_WriteUncSysConfig
MCP_WriteUncSysConfigAsync
Removed
0x33 MCP_ConfirmSysConfig
MCP_ConfirmSysConfigAsync
Removed
0x34 MCP_RestoreSysConfig
MCP_RestoreSysConfigAsync
Removed
0x35 MCP_DeleteSysConfig
MCP_DeleteSysConfigAsync
Superseded by UCDeleteSysConfig
0x36 MCP_DeleteUncSysConfig
MCP_DeleteUncSysConfigAsync
Removed
0x37 MCP_ListSysConfig
MCP_ListSysConfigAsync
Superseded by UCListSysConfig
0x38 MCP_QuerySysConfig
MCP_QuerySysConfigAsync
Superseded by UCQuerySysConfig
0x40 MCP_GetSysProdSettings Debug only 0x0008 Gets system.xml
0x41 MCP_SetSysProdSettings Debug only 0x0008 Sets system.xml
0x72 PatchSetVersionListTitleVersion All 0x0004 Sets titles' versions in the version list. Clears versions?
0x7E MCP_IvsApply ARM only 0x0000 Sets the STRM key with /dev/crypto ioctl 0x1F using either the IvsSeed in Hardware/EEPROM or the seed from the Ivs ticket.
0x80 MCP_InstallGetInfo All 0x0004
0x81 MCP_InstallTitleAsync All 0x0004 Installs a title.
0x83 MCP_DeleteTitleAsync
MCP_DeleteTitleWithoutFlushAsync
All 0x0008 Deletes a title.
0x84 MCP_UninstallTitleAsync All 0x0008 Uninstalls a title.
0x85 MCP_CopyTitleAsync
MCP_CopyTitleWithoutFlushAsync
All 0x0004 Copies a title. Intended for transferring titles between storage devices.
0x86 MCP_InstallTicket Debug only 0x0004 Installs a ticket.
0x87 WriteDigestBin All 0x0004 Writes data to /vol/system_slc/security/digest.bin.
0x88 ReadDigestBin All 0x0004 Reads data from /vol/system_slc/security/digest.bin.
0x8C DeleteContentAsync All 0x0080 Deletes specified content.
0x90 MCP_UpdateCheckAsync All 0x0008 Checks for any pending system updates offline.
0x91 MCP_UpdatePerformAsync All 0x0004 Performs a system update.
0x92 MCP_UpdateGetProgress All 0x0004 Gets the current progress of the current system update operation.
0x93 MCP_UpdatePrepareUpdaterAsync All 0x0008 Ensures the system updater exists and an update is ready to be performed.
0x95 MCP_UpdateGetPathByAppTypeAsync All 0x0004 Gets the path of specified update data by app type.
0xD0 MCP_GenerateSignature All
0xD1 VerifySignedContainer All
0xD4 MCP_GetContentInfos All 0x0010 Gets all content metadata entries in specified title metadata.
0xD7 MCP_DeleteTicket All 0x0004 Deletes a ticket. Essentially ES_DeleteTicket from the Wii.
0xD6 MCP_GetTicketViews All 0x0084 Gets ticket information. Essentially ES_GetTicketViews from the Wii.
0xD9 MCP_CompatListOwnedTitles
MCP_ListOwnedTitles
All 0x0004 Lists owned titles.
0xDA MCP_FindContentInfos All 0x0010 Gets specified content metadata from specified title metadata.
0xDC MCP_GetTicketItemRights All 0x0084 Gets item rights from a ticket.
0xDD MCP_ListTicketSyncInfosByBucket All 0x0000 Gets ticket 'sync' info by 'bucket'. A ticket 'bucket' refers to the folder that the ticket is held in sys/rights/ticket/apps.
0xDE MCP_GetInstalledContentCount All 0x0010 Gets the number of installed contents for a title.
0xDF MCP_GetInstalledContentIndices All 0x0010
0xF0 MCP_InstallGetSize All 0x0004 Gets the size of installable content according to the TMD.
0xFB MCP_InstallGetRequiredSize All 0x0004 Get the required install size for a title, using a linked title package if one exists.
0xFC MCP_InstallUtilGetTitleEnability All 0x0010 Gets the enability of a title, meaning if the title is considered broken/incomplete or is valid. This checks any broken.mcp files in a title directory, which are very lightweight and roughly indicate the issue, as well as any /code/__istldrctinprg
0xFD MCP_DeleteTitleDoneAsync All 0x0008 Cleans up after performing a delete title operation. Removes the deleted title from the title list and clears the operation. Will not perform for titles located in compat_slc or game updates.
0xFE MCP_CopyTitleDoneAsync All 0x0004 Cleans up after performing a copy title operation.
0xFF MCP_CopyGetRequiredSize All 0x0004 Get the required copy size for a title, using a linked title package if one exists.
0x125 MCP_AocGetOpenInfo All 0x0010 Checks if there are any currently open AOC titles.
0x143 MCP_InstallCleanupAsync
MCP_InstallCleanupWithoutFlushAsync
All 0x0004 Cleans up after an install title operation.
0x150 MCP_GetInstalledTitleVersion All 0x0010 Gets the version of an installed title, using different methods depending on the app type.
0x151 All 0x0010 Unknown. Gets the TMD view of a title.
0x152 All 0x0010 Unknown. Reads some TMD content.
0x170 MCP_AppTagSetEnability All 0x0004
0x177 MCP_AppTagReadWithPos All 0x0010
0x178 MCP_AppTagWriteWithPos All 0x0004
0x179 MCP_AppTagTruncateWithPos All 0x0004

Boot PM flags

See PowerFlags.