From 5127f4b5ccb723f7572b9edc509cf78366153e25 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 10 Mar 2021 18:39:43 +0100 Subject: Remove PSP-specific stuff from MIPS backend This is unnecessary since newlib supports all file I/O. This is needed for other mips ports --- cpu_threaded.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'cpu_threaded.c') 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); } -- cgit v1.2.3