Commit Graph

25 Commits

Author SHA1 Message Date
David Guillen Fandos 11d87b89df Rewrite I/O side effects write and IRQ triggers
This rewrites the way that CPU alerts work, making them a bitmap (since
multiple alerts can happen simultaneously, like SMC and IRQ). This
doesn't really fix many games but improves accuracy overall and improves
performance on some I/O writes (the ones without side effects).
The IRQ raising is now decoupled and explicitely called via a new
function (check_and_raise_interrupts) to avoid issues such as invalid
CPSR values (doesn't seem to bother most games!). There's more side
effects missing, so this just lays the ground for more fixes.
2023-04-14 01:41:55 +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 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
jdgleaver d0b35e939c Add turbo A/B buttons 2021-05-17 13:02:41 +01:00
jdgleaver 134aba2b37 Add dedicated RetroPad fast-forward button 2021-05-13 16:03:55 +01:00
twinaphex 6ddc6f494d Turn two functions static 2014-12-13 05:01:02 +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 a1a8e339ff Remove non-libretro code in input.c 2014-12-09 16:47:47 +01:00
twinaphex a39ed082f7 Remove useless GUI font code 2014-12-09 16:45: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
aliaspider 0ccab79884 fix x86 build 2014-07-14 06:10:33 +01: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 bbba320911 enable -Wall and fix warnings reported by it 2011-09-06 00:18:06 +03:00
notaz eb3668fc5d initial pandora port, with hardware scaling and stuff 2011-09-06 00:18:01 +03:00
notaz 43c24b301d refactor GP2X stuff for pandora reuse 2011-09-04 20:19:13 +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 42c8119010 u5 release 2009-06-13 22:19:53 +03:00
notaz 5a01fba679 u4 release 2009-06-09 00:43:01 +03:00
notaz 4cdfc0bc7b working tripple buffering 2009-05-31 23:10:24 +03:00
notaz 4742480dca wiz port wip 2009-05-30 22:47:25 +03:00
notaz 9020645032 tweaks from 2008 (gpsp09-2xb_3) 2009-05-21 19:16:10 +03:00
notaz 2823a4c819 original source from gpsp09-2xb_src.tar.bz2 2009-05-21 18:48:31 +03:00