diff options
Diffstat (limited to 'cpu_threaded.c')
-rw-r--r-- | cpu_threaded.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cpu_threaded.c b/cpu_threaded.c index fd8d44f..f0d38be 100644 --- a/cpu_threaded.c +++ b/cpu_threaded.c @@ -3793,18 +3793,18 @@ void flush_translation_cache_bios(void) void dump_translation_cache(void) { - file_open(ram_cache, cache_dump_prefix "ram_cache.bin", write); - file_write(ram_cache, ram_translation_cache, - ram_translation_ptr - ram_translation_cache); - file_close(ram_cache); - - file_open(rom_cache, cache_dump_prefix "rom_cache.bin", write); - file_write(rom_cache, rom_translation_cache, - rom_translation_ptr - rom_translation_cache); - file_close(rom_cache); - - file_open(bios_cache, cache_dump_prefix "bios_cache.bin", write); - file_write(bios_cache, bios_translation_cache, - bios_translation_ptr - bios_translation_cache); - file_close(bios_cache); + FILE *fd = fopen(cache_dump_prefix "ram_cache.bin", "wb"); + fwrite(ram_translation_cache, 1, + ram_translation_ptr - ram_translation_cache, fd); + fclose(fd); + + fd = fopen(cache_dump_prefix "rom_cache.bin", "wb"); + fwrite(rom_translation_cache, 1, + rom_translation_ptr - rom_translation_cache, fd); + fclose(fd); + + fd = fopen(cache_dump_prefix "bios_cache.bin", "wb"); + fwrite(bios_translation_cache, 1, + bios_translation_ptr - bios_translation_cache, fd); + fclose(fd); } |