summaryrefslogtreecommitdiff
path: root/gba_memory.c
AgeCommit message (Collapse)Author
2021-06-27Enable big-endian devices: gc/wiiDavid Guillen Fandos
This patch adds big-endian compatibility in gpsp (in general but only for the interpreter). There's no performance hit for little-endian platforms (should be a no-op) and only add a small overhead in memory accesses for big-endian platforms. Most memory accesses are wrapped with a byteswap instruction and I/O reg accesses are also rewired for proper access (using macros). Video rendering has been fixed to also do byteswaps but there's a couple of games and rendering modes that still seem broken (but they amount to less than 20 games in my tests with 1K ROMs). This also adds build rules and CI for NGC/WII/WIIU (untested)
2021-06-25Remove macros in dma codeDavid Guillen Fandos
This reduces code size more than 20% (which is 200-300KB!). DMA handling accounts for less than 0.5% the average emulation runtime which doesn't justify the crazy optimization level that the code has. In fact it's more than likely that the new code runs faster due to less I-cache trashing.
2021-06-09Cleanup unused stuffDavid Guillen Fandos
2021-05-17Add ROM mirroring and fix mult. cycle countDavid Guillen Fandos
This should correct some minor issues in some games.
2021-05-05Adding Code Breaker cheat supportDavid Guillen Fandos
This works on both interpreter and dynarec. Tested in MIPS, ARM and x86, still needs some more testing, some edge cases can be buggy.
2021-03-30Improve indirect jumps in ARMDavid Guillen Fandos
Handle already translated blocks in the ARM asm to speed up indirect branches (affect some games more than others)
2021-03-26Move OAM RAM to stubs alsoDavid Guillen Fandos
Makes accesses more efficient for MIPS. Make accesses also fast for palette reads.
2021-03-26Move OAM update flag to a registerDavid Guillen Fandos
Fix a small bug in MIPS dynarec that affects non -G0 targets
2021-03-23Make ewram memory linealDavid Guillen Fandos
This saves a few cycles in MIPS and simplifies a bit the core. Removed the write map, only affects interpreter performance very minimally. Rewired ARM and x86 handlers to support direct access to I/EWRAM (and VRAM on ARM) to compensate. Overall performance is slightly better but code is cleaner and allows for further improvements in the dynarecs.
2021-03-17Enable runtime dynarec enable/disableDavid Guillen Fandos
Added a more thorough cache cleanup for reset/mode-change too. Fixed the mmap initialization that ends up leaking memory. Minor x86 asm fixes for Android.
2021-03-17Remove BIOS reserved translation areaDavid Guillen Fandos
This is not really necessary since it can share area with ROM. Performance impact should be very minimal (haven't noticed it myself) and could be compensated (even by a positive offset) if we bump the ROM cache area size. Tested with several dynarecs.
2021-03-16Simplify open load handling for MIPS and fix other archesDavid Guillen Fandos
Also rewrite a bit memory handlers for smaller functions.
2021-03-16Rewrite of the MIPS dynarec stubsDavid Guillen Fandos
This allows us to emit the handlers directly in a more efficient manner. At the same time it allows for an easy fix to emit PIC code, which is necessary for libretro. This also enables more platform specific optimizations and variations, perhaps even run-time multiplatform support.
2021-03-15Move palettes around to simplify MIPS dynarecDavid Guillen Fandos
Will move also OAM structures to gain a few cycles per load/store. Loads can also be optimized for an extra instruction per access.
2021-03-11Fix fd checkDavid Guillen Fandos
2021-03-10Remove PSP-specific stuff from MIPS backendDavid Guillen Fandos
This is unnecessary since newlib supports all file I/O. This is needed for other mips ports
2021-03-06Fix x86 dynarec, broken by d10c4afeDavid Guillen Fandos
The dynarec expects function args to be located in registers instead of the stack, which is not the default calling convetion in GCC/clang.
2021-02-23Small fixes to division by zeroDavid Guillen Fandos
This causes crashes in PSP quite often in many games. Other CPUs might (depending on the processor state) silently return zero or some undefined value. The fix is borrowed from ReGBA's codebase
2021-02-15More cleanups (mostly whitespace and unused stuff)David Guillen Fandos
2020-10-28Use correct path separatornegativeExponent
2020-10-09Update RTC emulationnegativeExponent
- Based on notes, gpSP's RTC does was based on vba. - I've updated relevant sections of it based on latest vba. reference issue: https://github.com/libretro/gpsp/issues/79
2020-09-05Add optional battery save using libretro save apinegativeExponent
- Adds core option to allow battery saves using the libretro api (retro_get_memory_data/size) - Initial save size set at 128KB and actual size is automatically determined internally by gba. - This will always assume that a save file is supported since save size or type cannot be determined until gba tries to write to backup memory. - A 128KB block of memory is used as buffer, similar method to VBA Next/Beetle GBA workarounds. Fix https://github.com/libretro/gpsp/issues/72
2019-11-15Fix flash 64K games not saving (Fix https://github.com/libretro/gpsp/issues/59)negativeExponent
2019-10-03Reenable native file IO on PSPbmaupin
2015-09-20fix sram not saving on some platforms.aliaspider
2015-04-06show the gbaover details for the current gamepak only.aliaspider
2014-12-22Split up gba_over entries into separate header filetwinaphex
2014-12-22Add entries to gbaovertwinaphex
2014-12-22Add more gbaover entriestwinaphex
2014-12-22Add entries to gbaovertwinaphex
2014-12-22Add more entries to gbaovertwinaphex
2014-12-22Add more entries to gbaovertwinaphex
2014-12-22Add more entries to gbaovertwinaphex
2014-12-21Remove patching of two BIOS ROM locationstwinaphex
2014-12-21Update gbaovertwinaphex
2014-12-21Add more entries to gbaovertwinaphex
2014-12-21More changestwinaphex
2014-12-21Add some more vbaover entriestwinaphex
2014-12-21Start adding gbaover - unfinishedtwinaphex
2014-12-20Get rid of function_ccTwinaphex
2014-12-20Change load_gamepak signaturetwinaphex
2014-12-20gba_memory.c - some cleanupstwinaphex
2014-12-20Make functions static in gba_memory.ctwinaphex
2014-12-13Remove more case rangestwinaphex
2014-12-12dma_transfer - change dest_ptr to type uintptr_t - fixes 64bit interpretertwinaphex
according to aliaspider
2014-12-11Demacro-ize dma_transfer_expandtwinaphex
2014-12-11gba_memory.c - Turn trigger_dma into functiontwinaphex
2014-12-11(gba_memory.c) Turn trigger_timer into real functiontwinaphex
2014-12-11Turn some sound macro functions in gba_memory.c into real functionstwinaphex
2014-12-11cleanupstwinaphex