Filesystem services PXI: Difference between revisions

Steveice10 (talk | contribs)
mNo edit summary
TimmSkiller (talk | contribs)
Update HasFile/HasDirectory
 
(7 intermediate revisions by 3 users not shown)
Line 80: Line 80:
| 0x00130102
| 0x00130102
| [[1.0.0-0]]
| [[1.0.0-0]]
| ? (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
| [[FSPXI:HasFile|HasFile]]
|-
|-
| 0x00140102
| 0x00140102
| [[1.0.0-0]]
| [[1.0.0-0]]
| ? (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
| [[FSPXI:HasDirectory|HasDirectory]]
|-
|-
| 0x001500C0
| 0x001500C0
Line 96: Line 96:
| 0x00170080
| 0x00170080
| [[1.0.0-0]]
| [[1.0.0-0]]
| ? (archivehandlelo, archivehandlehi)
| [[FSPXI:LockArchive|LockArchive]] (archivehandlelo, archivehandlehi)
|-
|-
| 0x00180000
| 0x00180000
Line 196: Line 196:
| 0x003000C2
| 0x003000C2
| [[1.0.0-0]]
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectRead4IO|CardNorDirectRead4IO]]
| [[FSPXI:CardNorDirectRead_4xIO|CardNorDirectRead_4xIO]]
|-
|-
| 0x00310082
| 0x00310082
Line 220: Line 220:
| 0x00360040
| 0x00360040
| [[1.0.0-0]]
| [[1.0.0-0]]
| [[FSPXI:SendInitializeInfo|SendInitializeInfo]]
| [[FSPXI:SendInitializeInfoTo9|SendInitializeInfoTo9]]
|-
|-
| 0x00370100
| 0x00370100
Line 248: Line 248:
| 0x003D0040
| 0x003D0040
| ?
| ?
| ?
| [[FSPXI:FormatCardNorDevice|FormatCardNorDevice]]
|-
|-
| 0x003E0000
| 0x003E0000
Line 288: Line 288:
| 0x00470042
| 0x00470042
| [[3.0.0-5]]
| [[3.0.0-5]]
| ?
| [[FSPXI:GenerateRandomBytes|GenerateRandomBytes]]
|-
|-
| 0x004800C2
| 0x004800C2
Line 320: Line 320:
| 0x004F0080
| 0x004F0080
| [[3.0.0-5]]
| [[3.0.0-5]]
| ? (unknown_u64)
| [[FSPXI:SetCtrCardLatencyParameter|SetCtrCardLatencyParameter]] (u64)
|-
|-
| 0x00500040
| 0x00500040
Line 357: Line 357:
!  Available since system version
!  Available since system version
!  Description
!  Description
|-
| 0x000101C2
| [[1.0.0-0]]
| [[FSPXI:OpenFile|OpenFile]]
|-
| 0x00020142
| [[1.0.0-0]]
| DeleteFile? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00030244
| [[1.0.0-0]]
| RenameFile? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, secondarchivehandlelo, secondarchivehandlehi, secondpathtype, secondpathsize, pathptrsize, pathptr, secondpathptrsize, secondpathptr)
|-
| 0x00040142
| [[1.0.0-0]]
| DeleteDirectory? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00050202
| [[1.0.0-0]]
| CreateFile? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, unknown_u32, unknown_lo, unknown_hi, pathptrsize, pathptr)
|-
| 0x00060182
| [[1.0.0-0]]
| CreateDirectory? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, unknown_u32, pathptrsize, pathptr)
|-
| 0x00070244
| [[1.0.0-0]]
| RenameDirectory? (unknown_u32, archivehandlelo, archivehandlehi, pathtype, pathsize, secondarchivehandlelo, secondarchivehandlehi, secondpathtype, secondpathsize, pathptrsize, pathptr, secondpathptrsize, secondpathptr)
|-
| 0x00080102
| [[1.0.0-0]]
| OpenDirectory (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00090142
| [[1.0.0-0]]
| [[FSPXI:ReadFile|ReadFile]]
|-
| 0x000A00C2
| [[1.0.0-0]]
| CalculateFileHashSHA256
|-
| 0x000B0182
| [[1.0.0-0]]
| WriteFile
|-
| 0x000C0104
| [[1.0.0-0]]
| [[FSPXI:CalcSavegameMAC|CalcSavegameMAC]]
|-
| 0x000D0080
| [[1.0.0-0]]
| [[FSPXI:GetFileSize|GetFileSize]]
|-
| 0x000E0100
| [[1.0.0-0]]
| SetFileSize (sizelo, sizehi, filehandlelo, filehandlehi)
|-
| 0x000F0080
| [[1.0.0-0]]
| CloseFile (filehandlelo, filehandlehi)
|-
| 0x001000C2
| [[1.0.0-0]]
| ReadDirectory (dirhandlelo, dirhandlehi, count, ptrsize, ptr)
|-
| 0x00110080
| [[1.0.0-0]]
| CloseDirectory (dirhandlelo, dirhandlehi)
|-
| 0x001200C2
| [[1.0.0-0]]
| [[FSPXI:OpenArchive|OpenArchive]]
|-
| 0x00130102
| [[1.0.0-0]]
| CreateExtSaveData? (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00140102
| [[1.0.0-0]]
| (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00150102
| [[1.0.0-0]]
| (archivehandlelo, archivehandlehi, pathtype, pathsize, pathptrsize, pathptr)
|-
| 0x00160080
| [[1.0.0-0]]
| CloseArchive (archivehandlelo, archivehandlehi)
|-
| 0x00170080
| [[1.0.0-0]]
| ReopenArchive? (archivehandlelo, archivehandlehi)
|-
| 0x00180000
| [[1.0.0-0]]
| GetCardType
|-
| 0x00190000
| [[1.0.0-0]]
| [[FSPXI:GetSdmcArchiveResource|GetSdmcArchiveResource]]
|-
| 0x001A0000
| [[1.0.0-0]]
| [[FSPXI:GetNandArchiveResource|GetNandArchiveResource]]
|-
| 0x001B0000
| [[1.0.0-0]]
| GetSdmcFatFsError
|-
| 0x001C0000
| [[1.0.0-0]]
| GetSdmcDetected
|-
| 0x001D0000
| [[1.0.0-0]]
| GetSdmcWritable
|-
| 0x001E0042
| [[1.0.0-0]]
| [[FSPXI:GetSdmcCid|GetSdmcCid]]
|-
| 0x001F0042
| [[1.0.0-0]]
| [[FSPXI:GetNandCid|GetNandCid]]
|-
| 0x00200000
| [[1.0.0-0]]
| GetSdmcSpeedInfo
|-
| 0x00210000
| [[1.0.0-0]]
| GetNandSpeedInfo
|-
| 0x00220042
| [[1.0.0-0]]
| GetSdmcLog
|-
| 0x00230042
| [[1.0.0-0]]
| GetNandLog
|-
| 0x00240000
| [[1.0.0-0]]
| ClearSdmcLog
|-
| 0x00250000
| [[1.0.0-0]]
| ClearNandLog
|-
| 0x00260000
| [[1.0.0-0]]
| GetCardSlotInserted
|-
| 0x00270000
| [[1.0.0-0]]
| CardSlotPowerOn
|-
| 0x00280000
| [[1.0.0-0]]
| CardSlotPowerOff
|-
| 0x00290000
| [[1.0.0-0]]
| CardSlotGetIfPowerStatus
|-
| 0x002A0040
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectCommand|CardNorDirectCommand]] (These CardNor commands are used for accessing the raw gamecard flash savedata)
|-
| 0x002B0080
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectCommandWithAddress|CardNorDirectCommandWithAddress]]
|-
| 0x002C0082
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectRead|CardNorDirectRead]]
|-
| 0x002D00C2
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectReadWithAddress|CardNorDirectReadWithAddress]]
|-
| 0x002E0082
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectWrite|CardNorDirectWrite]]
|-
| 0x002F00C2
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectWriteWithAddress|CardNorDirectWriteWithAddress]]
|-
| 0x003000C2
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectRead4IO|CardNorDirectRead4IO]]
|-
| 0x00310082
| [[1.0.0-0]]
| CardNorDirectCpuWriteWithoutVerify
|-
| 0x00320040
| [[1.0.0-0]]
| [[FSPXI:CardNorDirectSectorEraseWithoutVerify|CardNorDirectSectorEraseWithoutVerify]]
|-
| 0x00330080
| [[1.0.0-0]]
| GetProductInfo
|-
| 0x00340040
| [[1.0.0-0]]
| SetCardSpiBaudrate
|-
| 0x00350040
| [[1.0.0-0]]
| SetCardSpiBusMode
|-
| 0x00360040
| [[1.0.0-0]]
| SendInitializeInfo
|-
| 0x00370140
| [[1.0.0-0]]
| CreateExtSaveData
|-
| 0x003800C0
| [[1.0.0-0]]
| DeleteExtSaveData
|-
| 0x00390082
| [[1.0.0-0]]
| EnumerateExtSaveData
|-
| 0x003A0100
| [[1.0.0-0]]
| GetSpecialContentIndex
|-
| 0x003B00C2
| [[1.0.0-0]]
| GetLegacyRomHeader
|-
| 0x003C00C2
| [[1.0.0-0]]
| GetLegacyBannerData
|-
| 0x003D....
| ?
| ?
|-
|-
| 0x003E....
| 0x003E....
| ?
| ?
| This was removed with version 3.
| This was removed with [[3.0.0-5]].
|-
|-
| 0x003F0000
| 0x003F0000
Line 612: Line 368:
| 0x00400040
| 0x00400040
| [[1.0.0-0]]
| [[1.0.0-0]]
| DeleteAllExtSaveDataOnNand
| [[FSPXI:DeleteAllExtSaveDataOnNand|DeleteAllExtSaveDataOnNand]]
|-
|-
| 0x00410000
| 0x00410000
Line 620: Line 376:
| 0x00420000
| 0x00420000
| [[1.0.0-0]]
| [[1.0.0-0]]
| CreateSeed
| [[FSPXI:CreateSeed|CreateSeed]]
|-
|-
| 0x00430042
| 0x00430042
Line 628: Line 384:
| 0x00440040
| 0x00440040
| [[2.0.0-2]]
| [[2.0.0-2]]
| GetArchiveResource
| [[FSPXI:GetArchiveResource|GetArchiveResource]]
|-
|-
| 0x00450002
| 0x00450002
Line 640: Line 396:
| 0x00470082
| 0x00470082
| [[2.0.0-2]]
| [[2.0.0-2]]
| EnumerateSharedExtSaveData
| This was removed with [[3.0.0-5]].
|-
|-
| 0x00480102
| 0x00480102
| [[2.0.0-2]]
| [[2.0.0-2]]
| GetLegacySubBannerData
| [[FSPXI:GetLegacySubBannerData|GetLegacySubBannerData]]
|-
|-
| 0x00490042
| 0x00490042
| [[2.0.0-2]]
| [[2.0.0-2]]
| Initialize (?)
| ?
|-
|-
| 0x004A00C2
| 0x004A00C2
| [[2.0.0-2]]
| [[2.0.0-2]]
| OpenSpecialFile? (archivehandlelo, archivehandlehi, size, ptrsize_mul2, ptr)
| [[FSPXI:GetFileLastModified|GetFileLastModified]]
|-
|-
| 0x004B0102
| 0x004B0102
| [[2.0.0-2]]
| [[2.0.0-2]]
| ReadSpecialFile
| [[FSPXI:ReadSpecialFile|ReadSpecialFile]]
|-
|-
| 0x004C0040
| 0x004C0040
| [[2.0.0-2]]
| [[2.0.0-2]]
| GetSpecialFileSize. cmd[1] = must be value 0x0. Writes the u64 size to cmdreply[2-3].
| [[FSPXI:GetSpecialFileSize|GetSpecialFileSize]]
|-
|-
|}
|}
Commands listed in the previous chart marked as available since [[1.0.0-0]] that are not shown in this chart are the same between both.


=Errors=
=Errors=
Line 675: Line 433:
| 0xC86044D2
| 0xC86044D2
| Failed to write file. Partition is full.
| Failed to write file. Partition is full.
|-
| 0xC8804471
| Attempted to open a file under a directory which doesn't exist.
|-
|-
| 0xC8804478
| 0xC8804478
Line 690: Line 451:
| 0xC92044E6
| 0xC92044E6
| Operation not allowed with the current file openflags/file already in use (if file was previously opened for writing).
| Operation not allowed with the current file openflags/file already in use (if file was previously opened for writing).
|-
| 0xC92044E7
| Resource locked.
|-
|-
| 0xC9204509
| 0xC9204509
Line 702: Line 466:
| 0xC960F401
| 0xC960F401
| [[SDMC]]/NAND bus error, REG_SDSTATUS: Bit23 (0x00800000)
| [[SDMC]]/NAND bus error, REG_SDSTATUS: Bit23 (0x00800000)
|-
| 0xD8604664
| FSUSER: Returned when attempting to create a file in savedata when the current total number of files is already the [[FS:FormatSaveData|maximum]].
|-
|-
| 0xD9004587
| 0xD9004587