|
SSBM Decomp
|
Go to the source code of this file.
Data Structures | |
| struct | CardIconInfo |
| struct | CardState |
| One CARD file containing up to nine logical files. More... | |
| struct | CardWriteArgs |
| CARD_CMD_WRITE_BLOCK: 0x20-byte block header followed by size bytes of data; the remaining bytes in the block are cleared. More... | |
| struct | CardReadArgs |
| CARD_CMD_READ_BLOCK, CARD_CMD_SCAN_BLOCK: phys 0 shares the last header sector. More... | |
| struct | CardVerifyArgs |
| CARD_CMD_VERIFY_BLOCK: compare the block header and data against block_id/seq/data. More... | |
| struct | CardSectorArgs |
| CARD_CMD_READ_SECTOR, CARD_CMD_WRITE_SECTOR: transfer through sector_buf. More... | |
| struct | CardClearArgs |
| CARD_CMD_CLEAR_BUF: memset(data, 0, size). More... | |
| struct | CardCreateArgs |
| CARD_CMD_CREATE_FILE. More... | |
| struct | CardHeaderArgs |
| CARD_CMD_WRITE_HEADER, CARD_CMD_VERIFY_HEADER: header sector index and the banner/icons buffers (the comment comes from CardState). More... | |
| struct | CardReadHeaderArgs |
| CARD_CMD_READ_HEADER: destination buffers, any of which may be NULL. More... | |
| struct | CardGetStatusArgs |
| CARD_CMD_GET_STATUS. More... | |
| struct | CardCmd |
| One entry of the command ring hsd_804D1148. More... | |
| union | CardCmd::CardCmd_x8 |
| struct | CardFileReqArgs |
| CARD_REQ_READ_FILE, CARD_REQ_WRITE_FILE. More... | |
| struct | CardCreateReqArgs |
| CARD_REQ_CREATE_FILE. More... | |
| struct | CardStatusReqArgs |
| CARD_REQ_SET_STATUS. More... | |
| struct | CardOpenReqArgs |
| CARD_REQ_OPEN_FILE. More... | |
| struct | CardHeaderReqArgs |
| CARD_REQ_READ_HEADER: destination buffers, any of which may be NULL. More... | |
| struct | CardRequest |
| One entry of the request queue hsd_804D2348. More... | |
| union | CardRequest::CardRequest_x8 |
Macros | |
| #define | HSD_CARD_MAX_FILES 9 |
Typedefs | |
| typedef void(* | CardCallback) (int file_idx, int result) |
| Completion callback: (file index or 0, result). | |
Functions | |
| ASSERT_SIZE (CardIconInfo, 0x12) | |
| ASSERT_SIZE (CardState, 0x464) | |
| ASSERT_SIZE (CardCmd, 0x24) | |
| ASSERT_SIZE (CardRequest, 0x18) | |
| void | hsd_803AAA48 (void) |
| Drives queued requests and commands until idle or waiting for CARD I/O. | |
| int | hsd_803AC340 (CardIconInfo *icon_info) |
| void | hsd_803AC3E0 (CardState *statestate, int file_idx, int file_size, int file_flags, u8 *data) |
| void | hsd_803B2374 (void) |
| void | hsd_803B24E4 (CardState *statestate, int chan, int sector_size, void *work_buf) |
| int | hsd_803B2550 (CardState *statestate, const char *filename, CardCallback callback) |
| int | hsd_803B2674 (CardState *statestate) |
| int | hsd_803B27F4 (CardState *statestate, void *comment, void *banner, void *icons, CardCallback callback) |
| Queues a header read into the non-NULL destination buffers. | |
| int | hsd_803B286C (CardState *statestate, const char *filename, const char *comment, void *banner, void *icons, CardCallback callback) |
| Queues file creation. | |
| int | hsd_803B2928 (CardState *statestate, const char *comment, void *banner, void *icons, CardCallback callback) |
| Queues a header/status update. | |
| int | hsd_803B29D8 (CardState *statestate, int file_idx, u8 *buf, CardCallback callback) |
| Queues a logical-file read into the borrowed destination buffer. | |
| int | hsd_803B2A4C (CardState *statestate, int file_idx, u8 *buf, CardCallback callback) |
| Queues a logical-file write from the borrowed source buffer. | |
| int | hsd_SetCardIconInfo (CardState *statestate, CardIconInfo *icon_info) |
| #define HSD_CARD_MAX_FILES 9 |
| typedef void(* CardCallback) (int file_idx, int result) |
Completion callback: (file index or 0, result).
| enum HSD_CardResult |
| enum CardBannerFormat |
| enum CardCmdType |
Ring commands run by hsd_803AAA48; asynchronous CARD operations are completed by hsd_803A949C.
Names describe the observed operations; they are not recovered original identifiers.
| enum CardRequestType |
Requests queued by hsd_3B27.c and started by fn_803AA790.
| enum CardActiveType |
What the queued commands complete; its callback runs when the ring drains.
Write suffixes refer to file_flags modes, not these tag values.
| ASSERT_SIZE | ( | CardIconInfo | , |
| 0x12 | ) |
| ASSERT_SIZE | ( | CardState | , |
| 0x464 | ) |
| ASSERT_SIZE | ( | CardCmd | , |
| 0x24 | ) |
| ASSERT_SIZE | ( | CardRequest | , |
| 0x18 | ) |
| void hsd_803AAA48 | ( | void | ) |
Drives queued requests and commands until idle or waiting for CARD I/O.
Async CARD calls start with interrupts disabled; the busy flag is set after the call returns, before interrupts are restored. CARD completion callbacks must therefore not run inline from those calls.
| int hsd_803AC340 | ( | CardIconInfo * | icon_info | ) |
| void hsd_803B2374 | ( | void | ) |
| void hsd_803B24E4 | ( | CardState * | state, |
| int | chan, | ||
| int | sector_size, | ||
| void * | work_buf ) |
| int hsd_803B2550 | ( | CardState * | state, |
| const char * | filename, | ||
| CardCallback | callback ) |
| int hsd_803B2674 | ( | CardState * | state | ) |
| int hsd_803B27F4 | ( | CardState * | state, |
| void * | comment, | ||
| void * | banner, | ||
| void * | icons, | ||
| CardCallback | callback ) |
Queues a header read into the non-NULL destination buffers.
Returns 0 when queued, not when complete; a negative return does not queue a request or invoke the callback. The same return contract applies to the create, status, read and write request functions below.
| int hsd_803B286C | ( | CardState * | state, |
| const char * | filename, | ||
| const char * | comment, | ||
| void * | banner, | ||
| void * | icons, | ||
| CardCallback | callback ) |
Queues file creation.
Copies 0x40 bytes from comment into state even if the queue is full; filename, banner and icons are borrowed.
| int hsd_803B2928 | ( | CardState * | state, |
| const char * | comment, | ||
| void * | banner, | ||
| void * | icons, | ||
| CardCallback | callback ) |
Queues a header/status update.
Copies 0x40 bytes from comment into state even if the queue is full; banner and icons are borrowed.
| int hsd_803B29D8 | ( | CardState * | state, |
| int | file_idx, | ||
| u8 * | buf, | ||
| CardCallback | callback ) |
Queues a logical-file read into the borrowed destination buffer.
| int hsd_803B2A4C | ( | CardState * | state, |
| int | file_idx, | ||
| u8 * | buf, | ||
| CardCallback | callback ) |
Queues a logical-file write from the borrowed source buffer.
| int hsd_SetCardIconInfo | ( | CardState * | state, |
| CardIconInfo * | icon_info ) |