Commit Graph

47 Commits

Author SHA1 Message Date
lif 052656959f plumbing direct framebuffer access through the libretro way 2023-12-23 23:05:33 -08:00
lif 7813578631 n64 pixel format 2023-12-12 23:07:39 -08: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 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 cde8a90ff8 Move pixel blitting from single mem access to byte-level 2023-08-01 01:20:29 +02:00
David Guillen Fandos 1ee50ada80 Reimplement sprite copy-mode for obj-based windowing
Seems it fixes a couple of visual issues in games too.
Might need to re-check that we do not overdraw too much to avoid
performance issues.
2023-07-28 19:35:33 +02:00
David Guillen Fandos dc4c312ca7 Rewrite tile rendering base functions 2023-07-18 23:04:56 +02:00
David Guillen Fandos 6bf53cf3db Minor I/O write improvements 2023-04-19 23:22:18 +02:00
David Guillen Fandos 1955336a2b Fix color conversion on interpreter
This causes the MSB to be copied into the green channe LSB, causing a
very subtle (almost imposible to see) color distortion.
Dynarecs use their own code path so are not afected.
2021-11-14 13:19:23 +01:00
David Guillen Fandos 1feab54699 Rewrite DMA handlers
Make it cleaner and clearer, also fix an out of bounds issue in high
memory regions.
2021-08-27 21:38:38 +02:00
David Guillen Fandos 8207775256 Fix out of bounds read bug on open bus read
This bug doesn't affect many games but makes sanitizers unhappy.
Also fix some minor FIFO clear bug
2021-08-24 19:55:37 +02:00
David Guillen Fandos 7068cbc95b New savestate implementation
This uses BSON as savestate format, to allow external tools to parse it
(so that we can add proper test of the states). The BSON is not 100%
correct according to spec (no ordered keys) but can be parsed by most
libraries.

This fixes also a bug in the savestate palette color recalculation that
was wrongly overwritting the original palette (which could cause some
problems on some games).

Also fixes some potential issues by serializing some more stuff and
cleans up unused stuff.

Testing shows that states look good and there's only minor differences
in audio ticks, related to buffer sizes (since buffer flushes are
de-synced from video frames due to different frequency).
2021-08-24 17:15:27 +02:00
David Guillen Fandos a3377c2ac1 Minor DMA cleanup 2021-08-21 18:10:12 +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 8dbf5f6c17 Enable big-endian devices: gc/wii
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-27 01:16:28 +02:00
David Guillen Fandos eab44b9e0b Enable runtime dynarec enable/disable
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-17 21:05:49 +01:00
David Guillen Fandos 5127f4b5cc Remove PSP-specific stuff from MIPS backend
This is unnecessary since newlib supports all file I/O.
This is needed for other mips ports
2021-03-10 18:41:37 +01:00
David Guillen Fandos 56dc6ecb70 Remove libco
This removes libco and all the usages of it (+pthreads).
Rewired all dynarecs and interpreter to return after every frame so that
libretro can process events. This required to make dynarec re-entrant.

Dynarecs were updated to check for new frame on every update (IRQ, cycle
exhaustion, I/O write, etc). The performance impact of doing so should
be minimal (and definitely outweight the libco gains). While at it,
fixed small issues to get a bit more perf: arm dynarec was not idling
correctly, mips was using stack when not needed, etc.

Tested on PSP (mips), OGA (armv7), Linux (x86 and interpreter). Not
tested on Android though.
2021-03-08 18:44:03 +01:00
David Guillen Fandos 3d558413fd Fix x86 dynarec, broken by d10c4afe
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-03-06 21:15:22 +01:00
twinaphex fa80ff3c4b Cleanups 2020-10-06 03:09:13 +02:00
bmaupin 89e55e9902 Reenable native file IO on PSP 2019-10-03 13:53:34 -04:00
Twinaphex d10c4afea2 Get rid of function_cc 2014-12-20 09:14:38 +01:00
twinaphex 5b59ef3acc Reimplement cache invalidation code 2014-12-11 18:47:48 +01:00
aliaspider f10da5d664 cleanups 2014-12-10 13:10:25 +01:00
aliaspider 6d7fd87e07 add a HAVE_MMAP check, cleanups. 2014-12-10 12:29:19 +01:00
aliaspider ad485d434a implement retro_serialize/unserialize 2014-12-10 11:06:17 +01:00
twinaphex 4a2ab23f77 Take out SDL defines in common.h 2014-12-10 01:30:02 +01:00
aliaspider afff31b508 fix arm target compile errors. 2014-12-10 01:03:14 +01:00
twinaphex 5c949f38e4 Assume PC_BUILD 2014-12-09 17:18:45 +01:00
twinaphex a4a7f66364 Remove gui.c 2014-12-09 16:40:21 +01:00
twinaphex 4a2c77bcc9 Remove zip.c/zip.h 2014-12-09 15:33:14 +01:00
aliaspider 50df6df600 fix undefined referances. 2014-12-09 01:59:02 +01:00
aliaspider 8f9b841f72 can compile 2014-12-09 00:17:28 +01:00
twinaphex 3af92d87a1 Take out Windows CE code 2014-07-14 04:54:52 +02:00
twinaphex 093a70482f Get rid of PND_BUILD/RPI_BUILD/POLLUX_BUILD/GIZ_BUILD 2014-07-14 04:50:52 +02:00
Dave ffa573f880 raspberry pi port 2013-03-07 23:16:38 +02:00
notaz d0944fc942 store saves and configs in gpsp dir
Don't like ROM dir littering.
Still looking there for .sav and .cht files though.
2011-09-08 00:48:33 +03:00
notaz a88b04319e support multi-file zips, skipping irrelevant files 2011-09-08 00:48:33 +03:00
notaz 2f1c528a6c tweak sound buffering and timing to better match pandora's refresh.
this also changes how direct sound channels are started and
sample step precision is increased to hopefully fix gbc + direct
channel desync that has been reported on the forums.
2011-09-08 00:48:33 +03:00
notaz eb3668fc5d initial pandora port, with hardware scaling and stuff 2011-09-06 00:18:01 +03:00
notaz c21718e922 move warm too 2011-09-03 01:58:52 +03:00
notaz 8b6232a675 fix some warnings 2011-09-03 01:31:26 +03:00
notaz eac6971733 revive PC build, support Linux 2011-09-03 01:05:41 +03:00
notaz ee0a3871f9 get rid of GP2X_BUILD checks where they are not really needed 2011-09-03 01:01:17 +03:00
notaz 638cc6264c cpu clock setup, save rom dir, cleanups 2009-06-06 23:33:15 +03:00
notaz 4742480dca wiz port wip 2009-05-30 22:47:25 +03:00
notaz 2823a4c819 original source from gpsp09-2xb_src.tar.bz2 2009-05-21 18:48:31 +03:00