diff options
author | Jesse Talavera-Greenberg <jesse@jesse.tg> | 2023-11-24 13:17:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 19:17:22 +0100 |
commit | 651b0f680c4531558990a5beb0e638968009dc51 (patch) | |
tree | bdf9f7897ce9e1abb422c47efad945b764b7673a | |
parent | 679c37ddcedc7e6300a98ec5800f133c752615e7 (diff) |
Use Platform::File calls in NDS::debug (#1888)
-rw-r--r-- | src/NDS.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp index d13fd91..a216fed 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -2074,25 +2074,24 @@ void debug(u32 param) //for (int i = 0; i < 9; i++) // printf("VRAM %c: %02X\n", 'A'+i, GPU->VRAMCNT[i]); - FILE* - shit = fopen("debug/DSfirmware.bin", "wb"); - fwrite(ARM9->ITCM, 0x8000, 1, shit); + Platform::FileHandle* shit = Platform::OpenFile("debug/DSfirmware.bin", FileMode::Write); + Platform::FileWrite(ARM9->ITCM, 0x8000, 1, shit); for (u32 i = 0x02000000; i < 0x02400000; i+=4) { u32 val = ARM7Read32(i); - fwrite(&val, 4, 1, shit); + Platform::FileWrite(&val, 4, 1, shit); } for (u32 i = 0x037F0000; i < 0x03810000; i+=4) { u32 val = ARM7Read32(i); - fwrite(&val, 4, 1, shit); + Platform::FileWrite(&val, 4, 1, shit); } for (u32 i = 0x06000000; i < 0x06040000; i+=4) { u32 val = ARM7Read32(i); - fwrite(&val, 4, 1, shit); + Platform::FileWrite(&val, 4, 1, shit); } - fclose(shit); + Platform::CloseFile(shit); /*FILE* shit = fopen("debug/directboot9.bin", "wb"); |