Commit Graph

786 Commits

Author SHA1 Message Date
lif 052656959f plumbing direct framebuffer access through the libretro way 2023-12-23 23:05:33 -08:00
lif ef45161c94 vr4300 2023-12-16 17:56:58 -08:00
lif 7813578631 n64 pixel format 2023-12-12 23:07:39 -08:00
lif 6218568cc5 wip:libdragon 2023-12-12 20:08:12 -08:00
David Guillen Fandos 895fb075c3 Update libretro.h to the latest version 2023-11-22 23:06:13 +01:00
David Guillen Fandos 904eaa2fa7 [dynarec] "Fix" ARM-mode STM instruction writeback
Move writeback to the end of the instruction (instead of the start).
This is also wrong but fixes some common cases (ie. push sp).
2023-11-21 23:35:07 +01:00
David Guillen Fandos ebbcdc852e [interp] Execute ldm/stm in the correct order (low to high)
This affects no games tho.
2023-11-14 23:54:05 +01:00
David Guillen Fandos f0f0b57c56 [Interp] Improve sbit emulation for LDM 2023-11-13 21:08:58 +01:00
David Guillen Fandos beb6e4b520 [Interp] Re-implement LDM/STM improving some missing cases.
Fixes the "base register in the list" for STM and partially honors the S
bit.
2023-11-06 01:17:54 +01:00
David Guillen Fandos 723d23adf8 Fix bug in instrumentation code 2023-11-03 01:01:56 +01:00
David Guillen Fandos 875c192257 [Interp] Simplify PC calculation 2023-11-03 00:30:35 +01:00
David Guillen Fandos 64d0a066b4 Move interpreter to use CXX so that we can simplify some bits 2023-11-03 00:09:08 +01:00
David Guillen Fandos e97037043e Move stats code out of cpu.c 2023-11-02 23:39:38 +01:00
David Guillen Fandos eaf8b94702 Update libretro common headers 2023-10-06 20:41:59 +02:00
David Guillen Fandos 7127ec6408 Improve DMA and BIOS reads 2023-10-01 23:51:53 +02:00
David Guillen Fandos 642179228a Fix gpsp options (and 3ds dynarec disable too) 2023-09-24 23:12:28 +02:00
David Guillen Fandos 4ce9c5ba26 Remove unused option 2023-09-24 23:01:43 +02:00
David Guillen Fandos 9632dedf90 Implement EEPROM save override.
Disabled SRAM/FLASH when EEPROM saves have been attempted. Allows to
override games via gba_over too
2023-09-23 18:13:18 +02:00
David Guillen Fandos ae048beb9c Rework RTC and break it into GPIO, with RTC and Rumble (GPIO3)
This adds Rumble support for GPIO3-enabled games (Drill Dozer).
2023-09-20 22:46:06 +02:00
David Guillen Fandos f0bacff91a Remove gpsp savegame method in favour of libretro's one
This generates 128KB save files (instead of variable sized ones) to
prevent truncated savegames under some circumstances. Most other
emulators have no trouble loading them (and the unused data is simply
ignored).

Remove also config txt file that's now unused.
2023-09-19 20:36:56 +02:00
David Guillen Fandos bcd062ea1b Remove config.txt parsing and reading 2023-09-19 20:36:56 +02:00
David Guillen Fandos 0501be5d78 Simplify gba over a bit 2023-09-19 20:36:56 +02:00
David Guillen Fandos 1d46986e92 Fix horizontal window inversion logic. 2023-09-19 00:19:26 +02:00
David Guillen Fandos 6e59ca6795 Improve EEPROM reads/writes and ROM reads
Unmapped areas read a value closer to what hardware produces.
Ensure that 32MB games can do EEPROM reads.
2023-09-14 00:22:55 +02:00
David Guillen Fandos c0d8ffaa38 Adding DMA transfer "Sleep" mode
This accounts for DMA stealing cycles from the CPU whenever the CPU
triggers a DMA (does not affect H/V blank or sound DMAs).
Works by moving the CPU to a PAUSED state where the cycles are accounted
for, reusing a similar mechanism for HALT/STOP.

Fixes a couple of games, notably GTA that has a DMA/IRQ race condition
(likely a bug really) if cycles are grossly miscalculated.
2023-09-08 19:44:13 +02:00
David Guillen Fandos 2352adcc50 Improve savestate loading to avoid corrupting the current state
It should not happen since the magic value and version would normally
discard incompatible savestates, however it's preferrable to check
before loading the state (it's just some minor sanity check).
2023-09-07 20:26:44 +02:00
David Guillen Fandos 1d1c719372 Remove COMPLETED_FRAME flag to simplify things 2023-09-06 00:48:37 +02:00
David Guillen Fandos 5f3e0a88cf Remove alert_loop in favour of cpu_sleep_loop 2023-09-06 00:02:47 +02:00
David Guillen Fandos 8ae2234374 Fix delay slot issue on PSP/PS2 2023-09-04 23:44:28 +02:00
David Guillen Fandos c1586a4825 Add sprite limit options and honor H-Blank Free too. 2023-09-01 23:57:57 +02:00
David Guillen Fandos 7321d49ca4 Remove PSP special weirdness, has almost no perf impact. 2023-08-31 00:26:42 +02:00
David Guillen Fandos 7906413f28 Define more I/O registers 2023-08-29 23:07:58 +02:00
David Guillen Fandos 188887e6c8 Mix MacOS x86 builds too 2023-08-27 13:40:36 +02:00
David Guillen Fandos 9d46b84dee Fix iOS builds 2023-08-27 12:28:55 +02:00
David Guillen Fandos 36b607d2b4 Merge remote-tracking branch 'upstreamssh/master' 2023-08-26 12:21:46 +02:00
David Guillen Fandos 91e8ca8f4e Merge remote-tracking branch 'origin/master' 2023-08-26 12:19:58 +02:00
David Guillen Fandos ff4e1da1f3 Merge branch 'cxx_impl'
Merge the new video code, which fixes many long-standing issues.
This also implements Video 4 effects and mosaic effect.
2023-08-26 12:16:49 +02:00
David Guillen Fandos 4ca45efcc7 Implement Mosaic effect (for all modes and types).
The effect is not pixel perfect, and the code is slower than non-mosaic
code. However this is intentional to ensure rendering is not very slow.
This improves most games that use this effect, and it's definitely
better than not having it.
2023-08-23 21:18:09 +02:00
David Guillen Fandos 1526af3b68 Implement mode 4 color effects
Modes 3/5 are still not supported and use regular fullcolor path.
Fixes many games, particularly menus and initial sequences for many
other games.
2023-08-18 03:30:14 +02:00
David Guillen Fandos 38390d4c55 Fix backdrop flag filling
Fixes a few games (specially transitions that use backdrop effects)
2023-08-17 22:21:37 +02:00
David Guillen Fandos 2c0c8c85d7 Some cosmetic changes 2023-08-06 20:21:50 +02:00
David Guillen Fandos 7bcd7939fb Implement row/half-row skip
This helps a lot with backgrounds that are mostly transparent.
2023-08-06 14:19:27 +02:00
David Guillen Fandos 01471a4295 Improve object blitting too 2023-08-06 13:21:47 +02:00
David Guillen Fandos 88fdbebd53 More perf improvements 2023-08-05 16:02:57 +02:00
David Guillen Fandos d6f5d72a97 Minor perf improvements 2023-08-05 00:39:44 +02:00
David Guillen Fandos 195e82b615 Minor simplification 2023-08-04 23:17:33 +02:00
David Guillen Fandos d1b4f69e32 Some more perf tweaks! 2023-08-04 01:59:06 +02:00
David Guillen Fandos 3858694aad More perf tweaks to sprite rendering 2023-08-04 01:30:53 +02:00
David Guillen Fandos 4822923b90 Improve affine text renderer 2023-08-04 00:26:46 +02:00
David Guillen Fandos 71df26db98 Optimize bitmap rendering a bit further 2023-08-03 00:32:32 +02:00