Commit Graph

64 Commits

Author SHA1 Message Date
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 40b3cd51ec Fix sign extension from BG references (broke it in 7f7d06) 2021-08-24 17:13:39 +02:00
David Guillen Fandos 1409e04629 Remove unused crust 2021-08-16 00:03:24 +02:00
David Guillen Fandos 7f7d066854 Remove video vars serialization
This is not needed at all, since the variables are not updated between
reload and end-of-frame (where we take our savestates). Added a reload
call during gba_load_state() to initialize it from the I/O regs.
2021-08-15 23:30:57 +02:00
David Guillen Fandos c9421e6929 Some small cleanup to make the code more C++ conformant 2021-07-11 13:35:21 +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 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
bmaupin 3df169d3e8 Add manual frame skipping 2020-02-28 13:23:56 -05:00
aliaspider f1d14fbe7c (3ds) dynarec: map the translation caches to specific addresses at
runtime, increases compatibility with loaders that can reloacate each
program section seperately.
move the svc enabling functions to the frontend.
2015-11-04 15:46:27 +01:00
aliaspider 69b5bfc05e allocate gba_screen_pixels on the heap.
use linearMemAlign for the 3DS target.
2015-04-13 02:43:42 +01:00
twinaphex bedf50b36f Another 64bit fix - vertical_pixel_flip needs to be of type s32 2014-12-12 02:23:48 +01:00
twinaphex c40748197f Create specialized macro for single_tile_map 2014-12-12 01:49:49 +01:00
twinaphex 522a2facb0 And another one - pt. 4 2014-12-12 01:41:57 +01:00
twinaphex 2dea1673ff And another one - pt. 3 2014-12-12 01:39:08 +01:00
twinaphex 8db28496c8 And another one - pt. 2 2014-12-12 01:36:49 +01:00
twinaphex 80c974a80f Start making specialized functions of multiple_tile_map - pt. 1 2014-12-12 01:34:36 +01:00
twinaphex c54cff8f70 Cut down a lot of duplicate code in tile_render functions 2014-12-12 01:30:05 +01:00
twinaphex bf17a15988 And there, done - tile_render is gone 2014-12-12 01:20:52 +01:00
twinaphex 65272c421b And another one pt. 5 2014-12-12 01:17:36 +01:00
twinaphex f25f747233 And another one pt. 4 2014-12-12 01:15:13 +01:00
twinaphex f19051b039 And another pt .3 2014-12-12 01:12:08 +01:00
twinaphex f72fe7c554 And another one pt. 2 2014-12-12 01:08:27 +01:00
twinaphex 76b4e3f2df And another one 2014-12-12 01:05:32 +01:00
twinaphex 5bcda4e05e Put proper comments in first 2014-12-12 01:02:40 +01:00
twinaphex f139b01562 De-macroize tile_render in render_scanline_text_transparent_normal 2014-12-12 00:58:39 +01:00
twinaphex ad472bf85f Demacro-ize tile_render in render_scanline_text_base_normal 2014-12-12 00:51:51 +01:00
twinaphex ee1a0377cf Unroll render_scanline_text_builder insanity 2014-12-12 00:29:49 +01:00
twinaphex 4cfd459d5b Simplify tile_4bpp_draw_base_normal 2014-12-11 22:41:29 +01:00
twinaphex 853be8aea3 Remove unused RENDER_COLOR16_NORMAL ifdefs 2014-12-11 21:38:35 +01:00
twinaphex 1adb50de8c Fixup render_scanline_vram_setup_mode4 2014-12-11 20:51:48 +01:00
twinaphex 8511266962 (video.c) Smal cleanups/micro-opts 2014-12-11 20:50:03 +01:00
twinaphex 36c98a7872 video.c - micro-opts 2014-12-11 20:27:58 +01:00
twinaphex 657c7bee5c Create define ARM_ARCH_BLENDING_OPTS - so that we can optionally
compile in the ARM ASM blend file
2014-12-11 19:12:09 +01:00
twinaphex 7a0b0cba45 Style nits 2014-12-10 15:47:19 +01:00
aliaspider f10da5d664 cleanups 2014-12-10 13:10:25 +01:00
aliaspider a926a68eb3 cleanups 2014-12-10 12:53:26 +01:00
aliaspider ad485d434a implement retro_serialize/unserialize 2014-12-10 11:06:17 +01:00
twinaphex eadd3a34b9 Remove unused screen_filter2 2014-12-09 17:29:40 +01:00
twinaphex 1a42217435 Get rid of non-libretro/SDL code in video.c 2014-12-09 17:26:57 +01:00
twinaphex 5c949f38e4 Assume PC_BUILD 2014-12-09 17:18:45 +01:00
twinaphex a39ed082f7 Remove useless GUI font code 2014-12-09 16:45:14 +01:00
aliaspider 3cc3944725 add debug build option to x86 standalone target. 2014-12-09 02:43:59 +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 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 108c704a36 initial Caanoo port
plus some random tweaks
2012-10-06 19:15:06 +03:00
notaz e38fee1b96 integrate M-HT's neon scalers 2012-10-02 01:06:32 +03:00
notaz bbba320911 enable -Wall and fix warnings reported by it 2011-09-06 00:18:06 +03:00