Commit Graph

31 Commits

Author SHA1 Message Date
David Guillen Fandos 1b37289890 Fix MIPS instruction tracing 2021-08-15 22:13:33 +02:00
David Guillen Fandos 5be5015338 Rearrange register layout and exclude useless regs from savestat
This changes the savestate format once again.
2021-08-15 21:07:20 +02:00
David Guillen Fandos 60155e0b81 Add preliminary support for PS2 devices 2021-07-22 18:30:45 +02:00
David Guillen Fandos 3009504613 Fix palette calculation on XBGR1555 mode 2021-07-20 23:09:14 +02:00
David Guillen Fandos 3eddcf8416 Minor mips dead code cleanup 2021-07-19 00:24:45 +02:00
David Guillen Fandos aded681de2 Add support for native XBGR1555 format
This is the format used by PS2.
This requires fixing the palette conversion routines (and palette writes
in the MIPS dynarec) but also adding support for 555 mode blending
(currently only 565 modes are supported, regardless of whether they are
RGB or BGR).
2021-07-07 00:51:29 +02:00
David Guillen Fandos 3d874ec5e3 Add palette conversion routine for non-R2 MIPS
Gated MIPS_HAS_R2_INSTS not used at the moment. Tested with qemu.
2021-07-01 12:06:57 +02:00
David Guillen Fandos e0a31952db Add preliminary support for non mips32r2 devices
This is required in PS2 but could also make older dingux devices run
gpsp on retroarch
2021-06-18 18:03:47 +02:00
David Guillen Fandos 34b90277bc Rework patch handlers (MIPS) 2021-06-16 19:35:11 +02:00
David Guillen Fandos a160b6de50 Minor cleanup in MIPS code 2021-06-16 19:12:32 +02:00
David Guillen Fandos f19f1695a6 Minor mips asm cleanup and fixes 2021-05-20 15:46:04 +02:00
David Guillen Fandos 37430f22c5 Small optimization (~2-4%) and whitespace cleanup!
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-07 20:41:54 +02:00
David Guillen Fandos 883f07f487 Fix small buf and add cheat error messages
Some minor formating too
2021-05-05 21:15:27 +02:00
David Guillen Fandos 4fd456e158 Adding Code Breaker cheat support
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-05 21:15:27 +02:00
David Guillen Fandos ff48af07b0 Fix RTC support for MIPS 2021-04-26 19:42:59 +02:00
David Guillen Fandos a5c06f62d6 Fix palette writes in MIPS
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-04 18:13:15 +02:00
David Guillen Fandos 5b5a4db6c2 Add instruction tracing, for testing purposes 2021-04-03 00:37:42 +02:00
David Guillen Fandos 7ea6c5e247 Move OAM RAM to stubs also
Makes accesses more efficient for MIPS. Make accesses also fast for palette
reads.
2021-03-26 23:13:26 +01:00
David Guillen Fandos a494a3f00e Move OAM update flag to a register
Fix a small bug in MIPS dynarec that affects non -G0 targets
2021-03-26 23:13:26 +01:00
David Guillen Fandos ff510e7f7a Move caches to stub files to get around gcc 10
Seems that using the __atribute__ magic for sections is not the best way
of doing this, since it injects some default atributtes that collide
with the user defined ones. Using assembly is far easier in this case.

Reworked definitions a bit to make it easier to import from assembly.
Also wrapped stuff around macros for easy and less verbose
implementation of the symbol prefix issue.
2021-03-23 20:02:44 +01:00
David Guillen Fandos 11ec213c99 Make ewram memory lineal
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-23 19:09:56 +01:00
David Guillen Fandos 34e672ed25 Simplify open load handling for MIPS and fix other arches
Also rewrite a bit memory handlers for smaller functions.
2021-03-16 22:58:58 +01:00
David Guillen Fandos 6b503667ec Add Dingux support
Uses a different cache primitive and a differend madd(u) encoding.
Also added a flag for BGR vs RGB color output (since PSP is assuming to
be BGR for speed).
Aside from that the ABI required some special function calls for PIC.
2021-03-16 22:58:58 +01:00
David Guillen Fandos 5ffd2832e8 Rewrite of the MIPS dynarec stubs
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-16 22:58:58 +01:00
David Guillen Fandos 462f0e9784 Improve cache flush magic
Make it better and more generic. Add support for MIPS32 and fix the
messy PSP code.
2021-03-12 01:46:09 +01:00
David Guillen Fandos 8d52e613c7 Minor cleanup in ARM and MIPS
Fix some small issues, mainly associated with undefined behaviour
expressions
2021-02-12 21:47:35 +01:00
bmaupin a60de42f3a Get dynarec working again for PSP 2019-10-20 14:58:51 -04:00
twinaphex 5b59ef3acc Reimplement cache invalidation code 2014-12-11 18:47:48 +01:00
aliaspider a926a68eb3 cleanups 2014-12-10 12:53:26 +01:00
twinaphex fe19474dca Add macro parameter 'opcode' to some macros 2014-12-10 01:17:37 +01:00
notaz 2823a4c819 original source from gpsp09-2xb_src.tar.bz2 2009-05-21 18:48:31 +03:00