diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-11-07 07:58:28 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-07 07:58:28 +1100 |
| commit | 864748c6f96eed0e084a30df9d1f76918bb69415 (patch) | |
| tree | b270d5958c40af3ec4221429e2881a1eb28200a9 | |
| parent | ddb63dcec217104580cced6bf00a88ef91f5563f (diff) | |
match Sram_CopySave (#1467)
| -rw-r--r-- | src/code/z_sram_NES.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c index 83e271edc..696d79823 100644 --- a/src/code/z_sram_NES.c +++ b/src/code/z_sram_NES.c @@ -1694,8 +1694,6 @@ void Sram_EraseSave(FileSelectState* fileSelect2, SramContext* sramCtx, s32 file gSaveContext.flashSaveAvailable = D_801F6AF2; } -#ifdef NON_MATCHING -// v0/v1 void Sram_CopySave(FileSelectState* fileSelect2, SramContext* sramCtx) { FileSelectState* fileSelect = fileSelect2; u16 i; @@ -1737,13 +1735,11 @@ void Sram_CopySave(FileSelectState* fileSelect2, SramContext* sramCtx) { // clear buffer bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE); // read to buffer - SysFlashrom_ReadData(&sramCtx->saveBuf[0], gFlashSaveStartPages[fileSelect->selectedFileIndex * 2], - gFlashSaveNumPages[fileSelect->selectedFileIndex * 2]); - if (1) {} + if (SysFlashrom_ReadData(&sramCtx->saveBuf[0], gFlashSaveStartPages[fileSelect->selectedFileIndex * 2], + gFlashSaveNumPages[fileSelect->selectedFileIndex * 2])) {} - SysFlashrom_ReadData(&sramCtx->saveBuf[0x2000], gFlashSaveStartPages[fileSelect->selectedFileIndex * 2 + 1], - gFlashSaveNumPages[fileSelect->selectedFileIndex * 2 + 1]); - if (1) {} + if (SysFlashrom_ReadData(&sramCtx->saveBuf[0x2000], gFlashSaveStartPages[fileSelect->selectedFileIndex * 2 + 1], + gFlashSaveNumPages[fileSelect->selectedFileIndex * 2 + 1])) {} // copy buffer to save context Lib_MemCpy(&gSaveContext.save, sramCtx->saveBuf, sizeof(Save)); @@ -1780,9 +1776,6 @@ void Sram_CopySave(FileSelectState* fileSelect2, SramContext* sramCtx) { gSaveContext.save.time = D_801F6AF0; gSaveContext.flashSaveAvailable = D_801F6AF2; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_sram_NES/Sram_CopySave.s") -#endif void Sram_InitSave(FileSelectState* fileSelect2, SramContext* sramCtx) { s32 phi_v0; |
