summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-01Revert "Add ROM mirroring and fix mult. cycle count"HEADpico-feneonloop
This reverts commit aafde6de7b2a28c1684c0e9fa62fee9a2a5398dd. This was causing trimmed roms to fail to load.
2021-07-13Merge remote-tracking branch 'libretro/master' into pico-feneonloop
2021-07-05Fix conditional ARM instructions at the end of a translation blockDavid Guillen Fandos
This fixes issue #133 The explanation is as follows. Most blocks end on an inconditional jump/branch, but there's two cases where this doesn't happen: translation gates and when we hit MAX_EXITS. These are very uncommon cases and therefore more prone to hidden bugs. When this happens, the last instruction emits a conditional jump (via arm_conditional_block_header macro) which is patched by a later instruction via generate_branch_patch_conditional. Typically the last unconditional branch will trigger the patching condition (which is aproximately condition != last_condition), but in these two cases it might not happen, leaving an unpatched branch. This makes x86 and ARM dynarecs crash in interesting ways (although it might not crash depending on $stuff and make the bug even harder to track).
2021-07-03Revert "USB headphone detection"neonloop
This reverts commit 960d776dfcd5d2f071107be1ff08b1a16d275a3f. This is now handled in custom SDL, so each emulator doesn't need to handle it.
2021-07-03Restores extract/extend functions for old ARM devicesneonloop
2021-07-03Merge remote-tracking branch 'libretro/master' into pico-feneonloop
2021-07-01Add palette conversion routine for non-R2 MIPSDavid Guillen Fandos
Gated MIPS_HAS_R2_INSTS not used at the moment. Tested with qemu.
2021-07-01Fix some UB behaviourDavid Guillen Fandos
2021-06-27Merge pull request #137 from davidgfnet/masterDavid G. F
Enable big-endian devices: gc/wii
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-25Merge pull request #136 from davidgfnet/masterDavid G. F
Remove macros in dma code
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-22Merge pull request #135 from davidgfnet/masterDavid G. F
Fix CI for OD beta
2021-06-22Fix CI for OD betaDavid Guillen Fandos
2021-06-22Merge pull request #134 from davidgfnet/masterDavid G. F
Some MIPS fixes
2021-06-22Fix the no-caller-saves bug for MIPSDavid Guillen Fandos
Seems that ABI mandates that we allocate space for arg0..4 even if we do pass them as registers. For some reason write_io_register<> functions write in that stack area (1 word) corrupting the s0 saved register. This seems to be a new gcc behaviour?
2021-06-21Add support for mips64n32David Guillen Fandos
This only needs some support to save/load state with 64 bit registers. Since pointers remain 32 bit, no extra changes are needed in the dynarec. Verified with qemu (qemu-mipsn32el) and miniretro.
2021-06-18Add preliminary support for non mips32r2 devicesDavid Guillen Fandos
This is required in PS2 but could also make older dingux devices run gpsp on retroarch
2021-06-16Rework patch handlers (MIPS)David Guillen Fandos
2021-06-16Minor cleanup in MIPS codeDavid Guillen Fandos
2021-06-09Update libretro.h with the new extensions from upstreamDavid Guillen Fandos
2021-06-09Cleanup unused stuffDavid Guillen Fandos
2021-05-20Minor mips asm cleanup and fixesDavid Guillen Fandos
2021-05-19Cleanup Makefiles a bitDavid Guillen Fandos
2021-05-19Minor optimizationDavid Guillen Fandos
2021-05-17Merge pull request #130 from jdgleaver/turbo-buttonsAutechre
Add turbo A/B buttons
2021-05-17Add turbo A/B buttonsjdgleaver
2021-05-17Add ROM mirroring and fix mult. cycle countDavid Guillen Fandos
This should correct some minor issues in some games.
2021-05-17Fix ARM dynarec unaligned 32 bit loadsDavid Guillen Fandos
This might make a handful games slightly slower (but on the upper side they work now instead of crashing or restarting). Also while at it, fix some minor stuff in arm stubs for speed.
2021-05-13Merge pull request #86 from jdgleaver/ff-buttonAutechre
Add dedicated RetroPad fast-forward button
2021-05-13Add dedicated RetroPad fast-forward buttonjdgleaver
2021-05-08Sets main_path correctly (thanks, eggs!)neonloop
2021-05-07Small optimization (~2-4%) and whitespace cleanup!David Guillen Fandos
Cleans up a ton of whitespace in cpu.c (like 100KB!) and improves readability of some massive decode statements. Added an optimization for PC-relative loads (pool load) in ROM (since it's read only and cannot possibily change) that directly emits an immediate load. This is way faster, specially in MIPS/x86, ARM can be even faster if we rewrite the immediate load macros to also use a pool.
2021-05-06Adds support for loading .zip filesneonloop
2021-05-05Fix aligned32 reads in interpreter modeDavid Guillen Fandos
An address check was missing to read aligned 32 (stm/ldm) data from high mem areas (0xX0000000). This fixes SM4 EU that for some reason has some weird memory access (perhaps a bug?)
2021-05-05Fix small buf and add cheat error messagesDavid Guillen Fandos
Some minor formating too
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-05-05Merge remote-tracking branch 'libretro/master' into pico-feneonloop
2021-05-05Revert "Remove BIOS reserved translation area"neonloop
This reverts commit fb7ca09b019248b9a0aba481ea55386f71053d73. It seems that commit broke rolling in Minish Cap when using the ARM dynarec.
2021-04-28Fix invalid memory map entriesnegativeExponent
2021-04-27Fix Vita port and likely some Linux/Android hidden issuesDavid Guillen Fandos
Using an invalid SP makes Vita crash (for an unkown reason) and makes things like C signal handlers crash (luckily Retroarch doesn't use them). It is also a violation of the ABI and not a great idea. Recycled some little used registers to free SP. Perf should be roughly the same.
2021-04-26Fix RTC support for MIPSDavid Guillen Fandos
2021-04-19Restored older GBC_BASE_RATE to fix sound popping (thanks, eggs!)neonloop
2021-04-18USB headphone detectionneonloop
This checks for USB hotplugging every 60 times audio is written. This can be adjusted to favor performance vs reacting to hotplugs more quickly. There are some errors that appear when unplugging the headset because it tries to write audio to a device that has disappeared.
2021-04-09Include eggs' smoothness edits to drowsnug's upscalerneonloop
2021-04-04Fix palette writes in MIPSDavid Guillen Fandos
Was not writing to the right address (but decoded memory was working). Most game worked well except those that depend on modifying the existing palette bits (instead of copying from ROM/RAM). Fixes several games.
2021-04-03Do not use stack in mips stubsDavid Guillen Fandos
No need for it (faster) and avoid mis-aligning it across calls
2021-04-03Add instruction tracing, for testing purposesDavid Guillen Fandos
2021-04-02Adds a "smooth subpixel" upscalerneonloop
Thanks to drowsnug for the original implementation of a subpixel scaler. This scaler uses the core of that one, but smooths the transition in the new pixels added during scaling. If you think of the scaler as 4x integer scaling of the GBA screen, and assigning each of those pixels to a subpixel, each subpixel takes the value of 50% the pixel assigned, 25% of the pixel to its left, and 25% of the pixel to its right. With the pixels: BGRBGRBGRBGR AAAABBBBCCCC ^--- this subpixel will be 1/4 A[G] + 1/2 B[G] + 1/4 B[G] The first and last pixels in each batch are not blended with the previous / next batch to keep them sharp.
2021-04-02Add function decorators for easier debugging / profilingDavid Guillen Fandos