Go to the source code of this file.
Typedefs | |
| typedef u8(*) | FlashByteRead(u8 *address) |
| typedef void(*) | FlashReadCore(const u8 *source, u8 *destination, u32 size) |
| typedef u8 *(*) | FlashVerifyCore(u8 *source, u8 *flash, u16 size) |
Functions | |
| s32 | ReadFlashId (void) |
| Enters flash ID mode, waits for the chip and reads its device and manufacturer IDs. | |
| s32 | IdentifyFlash (void) |
| Selects matching chip handlers, falling back to the final table entry when unknown. | |
| void | FlashTimerIntr (void) |
| Counts down the active flash timeout and marks its expiration. | |
| s32 | SetFlashTimerIntr (u8 timerIndex, void(**callback)(void)) |
| Selects a hardware timer and returns its timeout interrupt callback. | |
| void | StartFlashTimer (u8 timingIndex) |
| Starts the selected operation timeout, saving the interrupt-enable state. | |
| void | StopFlashTimer (void) |
| Stops the flash timer and restores the saved interrupt-enable state. | |
| u8 | ReadFlashByte (u8 *source) |
| Reads one byte; copied into RAM so the cartridge can be polled during a write. | |
| void | CopyFlashReadRoutineToRam (void *destination) |
| Copies the byte reader to RAM and installs its Thumb entry point. | |
| u16 | WaitForFlashWrite (u8 timingIndex, volatile u8 *address, u8 expected) |
| Polls for the expected byte until success or timeout, returning an operation error. | |
| void | ReadFlashCore (const u8 *source, u8 *destination, u32 size) |
| Copies flash bytes into RAM; this routine executes from a RAM copy. | |
| void | ReadFlash (u16 sector, u32 offset, u8 *destination, s32 size) |
| Copies the RAM reader and reads a range using the standard sector geometry. | |
| u8 * | VerifyFlashCore (u8 *left, u8 *right, u16 size) |
| Returns the first differing byte in the right buffer, or NULL when all bytes match. | |
| s32 | Flash_VerifySector (u16 sector, s32 source) |
| Copies the verifier to RAM and compares a standard flash sector with source data. | |
Variables | |
| const struct FlashSetupInfo *const | gFlash_Chips [] |
| FlashWaitProc | gFlash_Handler3 |
| u32 | gFlash_Handler0 |
| u32 | gFlash_Handler1 |
| u32 | gEraseFlashSector |
| u16 * | gFlash_Handler4 |
| volatile u16 | gFlashTimerCount |
| u8 | gFlashTimeoutFlag |
| u8 | gFlashTimerNum |
| u16 * | gFlashTimerReg |
| u16 | gFlashSavedIme |
| s32 ReadFlashId | ( | void | ) |
Enters flash ID mode, waits for the chip and reads its device and manufacturer IDs.
Definition at line 10 of file flash.c.
Referenced by IdentifyFlash(), and ReadFlashId().
| s32 IdentifyFlash | ( | void | ) |
Selects matching chip handlers, falling back to the final table entry when unknown.
Definition at line 61 of file flash.c.
Referenced by IdentifyFlash(), and SaveState_InitializeWorkspace().
| void FlashTimerIntr | ( | void | ) |
Counts down the active flash timeout and marks its expiration.
Definition at line 93 of file flash.c.
Referenced by FlashTimerIntr(), and SetFlashTimerIntr().
Selects a hardware timer and returns its timeout interrupt callback.
Definition at line 106 of file flash.c.
Referenced by SaveState_InitializeWorkspace(), and SetFlashTimerIntr().
| void StartFlashTimer | ( | u8 | timingIndex | ) |
Starts the selected operation timeout, saving the interrupt-enable state.
Definition at line 119 of file flash.c.
Referenced by RunFlashEraseVerifier(), StartFlashTimer(), and WaitForFlashWrite().
| void StopFlashTimer | ( | void | ) |
Stops the flash timer and restores the saved interrupt-enable state.
Definition at line 140 of file flash.c.
Referenced by StopFlashTimer(), and WaitForFlashWrite().
Reads one byte; copied into RAM so the cartridge can be polled during a write.
Definition at line 158 of file flash.c.
Referenced by CopyFlashReadRoutineToRam(), and ReadFlashByte().
| void CopyFlashReadRoutineToRam | ( | void * | destination | ) |
Copies the byte reader to RAM and installs its Thumb entry point.
Definition at line 161 of file flash.c.
Referenced by CopyFlashReadRoutineToRam(), EraseAtmelFlashBlock(), EraseAtmelFlashChip(), EraseFlashChip(), EraseFlashSector(), ProgramAtmelFlashBlock(), ProgramFlashSector(), ProgramFlashSectorWithEraseRetry(), and ReadFlashId().
Polls for the expected byte until success or timeout, returning an operation error.
Definition at line 181 of file flash.c.
Referenced by WaitForFlashWrite().
Copies flash bytes into RAM; this routine executes from a RAM copy.
Definition at line 201 of file flash.c.
Referenced by ReadFlash(), and ReadFlashCore().
Copies the RAM reader and reads a range using the standard sector geometry.
Definition at line 214 of file flash.c.
Referenced by ReadFlash(), SaveState_LoadSummaryRecords(), and SaveState_ReadSlotAndCheckChecksum().
Returns the first differing byte in the right buffer, or NULL when all bytes match.
Definition at line 238 of file flash.c.
Referenced by Flash_VerifySector(), and VerifyFlashCore().
Copies the verifier to RAM and compares a standard flash sector with source data.
Definition at line 259 of file flash.c.
Referenced by Flash_VerifySector(), and SaveState_WriteWorkspaceSlot().
|
extern |
Referenced by IdentifyFlash().
|
extern |
|
extern |
Referenced by IdentifyFlash(), SaveState_WriteWorkspaceSlot(), and STATIC_ASSERT().
|
extern |
Referenced by Bios_SoundBiasOn(), and IdentifyFlash().
|
extern |
Referenced by Bios_SoundBiasOn(), IdentifyFlash(), and SaveState_EraseSlotSector().
|
extern |
Referenced by Bios_SoundBiasOn(), IdentifyFlash(), and StartFlashTimer().
|
extern |
Referenced by FlashTimerIntr(), and StartFlashTimer().
|
extern |
Referenced by Bios_SoundBiasOn(), FlashTimerIntr(), StartFlashTimer(), and WaitForFlashWrite().
|
extern |
Referenced by Bios_SoundBiasOn(), SetFlashTimerIntr(), StartFlashTimer(), and StopFlashTimer().
|
extern |
Referenced by SetFlashTimerIntr(), StartFlashTimer(), and StopFlashTimer().
|
extern |
Referenced by Bios_SoundBiasOn(), StartFlashTimer(), and StopFlashTimer().