AMPXI:IsImportDatabaseInitialized: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
TimmSkiller (talk | contribs)
fixed wrong possible output values
TimmSkiller (talk | contribs)
No edit summary
 
Line 30: Line 30:


=Description=
=Description=
This checks whether /dbs/import.db exists (or is initialized) on the media indicated by the specified [[Filesystem_services#MediaType|Media Type]].
Returns whether cleanup is required. In general, this checks the import.db for the specified media type. If any entries are found that are marked as fully installed (not pending), this returns true.


The output u8 remains 0 if import.db exists.
However, for NAND, this first checks whether a) <code>nand:/data</code> contains more than one file/directory, and b) whether <code>nand:/data/<ID0></code> exists. If either of these conditions are met, this returns true without further checking the NAND import database.
 
[[Filesystem_services#MediaType|Media Type]] must be either SD or NAND. If Game Card is specified, this will always return 0xD8C0801E and set the output u8 to 2 (not supported).
 
Additionally, 0xE0A046DF is returned if import.db does not exist on the media.

Latest revision as of 13:13, 7 June 2025

Request

Index Word Description
0 Header code [0x003F0040]
1 Media Type

Response

Index Word Description
0 Header code [0x003F0080]
1 Result code
2 u8, isInitialized?


Description

Returns whether cleanup is required. In general, this checks the import.db for the specified media type. If any entries are found that are marked as fully installed (not pending), this returns true.

However, for NAND, this first checks whether a) nand:/data contains more than one file/directory, and b) whether nand:/data/<ID0> exists. If either of these conditions are met, this returns true without further checking the NAND import database.