pcsx_rearmed.git
13 days agodeps: switch gnu_lightning to a github mirror
notaz [Thu, 22 May 2025 22:50:11 +0000 (01:50 +0300)]
deps: switch gnu_lightning to a github mirror

The original is sometimes down, breaking CI.

13 days agofrontend: more gl options
notaz [Tue, 20 May 2025 21:54:58 +0000 (00:54 +0300)]
frontend: more gl options

2 weeks agospu: ssat is ARMv6, not v7
notaz [Tue, 20 May 2025 23:54:37 +0000 (02:54 +0300)]
spu: ssat is ARMv6, not v7

2 weeks agocdrom: fix wrong volumes on state load
notaz [Tue, 20 May 2025 23:53:41 +0000 (02:53 +0300)]
cdrom: fix wrong volumes on state load

libretro/pcsx_rearmed#890

2 weeks agospu: deal with some reverb overflows
notaz [Tue, 20 May 2025 23:00:40 +0000 (02:00 +0300)]
spu: deal with some reverb overflows

still possible but hopefully won't happen in practice
libretro/pcsx_rearmed#890

2 weeks agofrontend: improve sdl gamepad support
notaz [Tue, 20 May 2025 21:48:28 +0000 (00:48 +0300)]
frontend: improve sdl gamepad support

notaz/pcsx_rearmed#379

2 weeks agofrontend: rework sdl gl vout_method
notaz [Wed, 14 May 2025 21:46:37 +0000 (00:46 +0300)]
frontend: rework sdl gl vout_method

3 weeks agounbreak NO_FRONTEND build
notaz [Sun, 11 May 2025 23:34:26 +0000 (02:34 +0300)]
unbreak NO_FRONTEND build

3 weeks agofrontend: use more traditional profile dir
notaz [Sun, 11 May 2025 18:27:12 +0000 (21:27 +0300)]
frontend: use more traditional profile dir

With backward compatibility to working dir, also can set 'HOME=' env var
for the old behavior.

notaz/pcsx_rearmed#375

3 weeks agosdandalone: rework sdl output
notaz [Sat, 10 May 2025 22:21:51 +0000 (01:21 +0300)]
sdandalone: rework sdl output

- 2x overlay mode from PicoDrive
- somewhat proper fullscreen mode
- overlay scaling options
- gles mode probably broken (no longer works on more modern distros
  anyway - it's some very old code)
- new bugs

5 weeks agocdrom: fix double free on exit
notaz [Thu, 24 Apr 2025 22:13:08 +0000 (01:13 +0300)]
cdrom: fix double free on exit

6 weeks agodisable a false-positive warning
notaz [Tue, 22 Apr 2025 22:26:42 +0000 (01:26 +0300)]
disable a false-positive warning

6 weeks agocdrom: Align read buffers to 64 bytes
Paul Cercueil [Tue, 15 Apr 2025 11:18:05 +0000 (13:18 +0200)]
cdrom: Align read buffers to 64 bytes

Align the address and size of read buffers to 64 bytes, which
should be bigger or equal than the size of the cache lines on most
systems.

This allows hardware CD-ROM implementations to perform reads using DMA,
which generally have tight requirements on alignment.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agocdrom: Handle empty path string as synonym to cdrom:
Paul Cercueil [Tue, 15 Apr 2025 10:43:14 +0000 (12:43 +0200)]
cdrom: Handle empty path string as synonym to cdrom:

An empty path string previously meant we were going to use the hardware
CD-ROM. This is obvious when looking at the UsingIso() function for
instance.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agocdrom: Support using C11 threads instead of libretro ones
Paul Cercueil [Mon, 14 Apr 2025 21:47:35 +0000 (23:47 +0200)]
cdrom: Support using C11 threads instead of libretro ones

Libretro threads only work on... libretro.
Add support for C11 threads for the non-libretro platforms that still
want the async CD-ROM code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agocdrom: Support subchannel reads with HW players
Paul Cercueil [Mon, 14 Apr 2025 19:54:38 +0000 (21:54 +0200)]
cdrom: Support subchannel reads with HW players

Add function rcdrom_readSub(), that can be implemented by frontends, and
update rcdrom_open() to take an extra parameter, that can be set by the
frontend to tell the async CD-ROM code whether or not subchannel reads
are supported.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agocdrom: Update real-CDROM API
Paul Cercueil [Mon, 14 Apr 2025 19:26:29 +0000 (21:26 +0200)]
cdrom: Update real-CDROM API

Rename cdrom_read_sector() to rcdrom_readSector(), and
cdrom_is_media_inserted() to rcdrom_isMediaInserted() to match the rest
of the "rcdrom" API.

Update rcdrom_open() to return a handle, which will then be passed
around to every other rcdrom API call.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agocdrom: Move libretro specific stuff out of libpcsxcore
Paul Cercueil [Mon, 14 Apr 2025 19:21:51 +0000 (21:21 +0200)]
cdrom: Move libretro specific stuff out of libpcsxcore

This stuff doesn't belong here, and prevents other emulators using
libpcsxcore from implementing the new async CDROM API properly.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
6 weeks agolightrec: Detect and speed up GPU status polling
Paul Cercueil [Sat, 19 Apr 2025 13:27:02 +0000 (15:27 +0200)]
lightrec: Detect and speed up GPU status polling

If the GPUSTATUS_POLLING_THRESHOLD macro is set to a value > 0, the
Lightrec glue code will attempt to detect polling of the GPU status
register, with a polling interval in PSX cycles up to the threshold
configured.

This is still quite experimental, hence the reason why it's disabled by
default. However, this gives a huge speed boost (35% and above) when
running on Dreamcast, tested with a threshold value of 350, on games
that don't use the PSX CPU much and spend a lot of time waiting for
VSYNC.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
7 weeks agogte_neon: fix broken ir0 saturation flag
notaz [Sat, 12 Apr 2025 23:25:23 +0000 (02:25 +0300)]
gte_neon: fix broken ir0 saturation flag

a 14 year old bug...
notaz/pcsx_rearmed#371

7 weeks agodrc: make gcc11 happier
notaz [Sat, 12 Apr 2025 21:57:05 +0000 (00:57 +0300)]
drc: make gcc11 happier

-Warray-bounds only under -O3, apparently

7 weeks agolightrec: update
notaz [Sat, 12 Apr 2025 21:25:55 +0000 (00:25 +0300)]
lightrec: update

7 weeks agounbreak enhanced resolution
notaz [Sat, 12 Apr 2025 20:51:39 +0000 (23:51 +0300)]
unbreak enhanced resolution

Fixes: cdc1d78f3e3e22c45e8461368b3aa58fce23c09c

8 weeks agolibretro: revise the psxclock text again
notaz [Tue, 8 Apr 2025 23:16:06 +0000 (02:16 +0300)]
libretro: revise the psxclock text again

notaz/pcsx_rearmed#362

2 months agolibretro: remove outdated text
notaz [Wed, 2 Apr 2025 22:00:12 +0000 (01:00 +0300)]
libretro: remove outdated text

2 months agofrontend/menu: label can only go with statement
Apaczer [Wed, 2 Apr 2025 12:55:05 +0000 (14:55 +0200)]
frontend/menu: label can only go with statement

fix for older gcc

2 months agoconfigure: disable `tslib` for static
Apaczer [Tue, 1 Apr 2025 18:21:00 +0000 (20:21 +0200)]
configure: disable `tslib` for static

2 months agofrontend/menu: disable dl func. on static gcc
Apaczer [Tue, 1 Apr 2025 18:20:41 +0000 (20:20 +0200)]
frontend/menu: disable dl func. on static gcc

2 months agoMakefile: don't fail on release when missing plugins
Apaczer [Tue, 1 Apr 2025 18:29:10 +0000 (20:29 +0200)]
Makefile: don't fail on release when missing plugins

2 months agoconfigure: don't build so plugins for static
Apaczer [Tue, 1 Apr 2025 13:37:19 +0000 (15:37 +0200)]
configure: don't build so plugins for static

2 months agofrontend/menu: don't show ext. plugins in static build
Apaczer [Mon, 31 Mar 2025 19:58:29 +0000 (21:58 +0200)]
frontend/menu: don't show ext. plugins in static build

2 months agofrontend/menu: display only plausible gpu plugins
Apaczer [Mon, 31 Mar 2025 15:08:56 +0000 (17:08 +0200)]
frontend/menu: display only plausible gpu plugins

2 months agoMakefile: define supported GPUs with cflag
Apaczer [Mon, 31 Mar 2025 15:26:30 +0000 (17:26 +0200)]
Makefile: define supported GPUs with cflag

add HAVE_NEON_GPU to config.mak

2 months agoplugins: fix gpu_neon build as a .so
notaz [Sun, 30 Mar 2025 23:16:04 +0000 (02:16 +0300)]
plugins: fix gpu_neon build as a .so

2 months agoreadme.txt: add `gpu_neon.so` to plug list
Apaczer [Sun, 30 Mar 2025 19:33:40 +0000 (21:33 +0200)]
readme.txt: add `gpu_neon.so` to plug list

2 months agofrontend: rm unused now gpu chars and func.
Apaczer [Sun, 30 Mar 2025 19:22:47 +0000 (21:22 +0200)]
frontend: rm unused now gpu chars and func.

2 months agofrontend: rm BUILTIN_GPU_NEON ifdefs for shared build to work
Apaczer [Sun, 30 Mar 2025 19:18:12 +0000 (21:18 +0200)]
frontend: rm BUILTIN_GPU_NEON ifdefs for shared build to work

2 months agofrontend/menu: only display sel. GPU plug setting
Apaczer [Sat, 29 Mar 2025 16:55:33 +0000 (17:55 +0100)]
frontend/menu: only display sel. GPU plug setting

2 months agoclean up pad plugin stuff
notaz [Sun, 30 Mar 2025 14:59:42 +0000 (17:59 +0300)]
clean up pad plugin stuff

pad code was never used as a plugin, and there is no benefit from all
the indirection

2 months agodrop all the net stuff
notaz [Sun, 30 Mar 2025 14:09:41 +0000 (17:09 +0300)]
drop all the net stuff

it's completely broken and there are no plans to work on it

2 months agoclean up old gpu psemu funcs
notaz [Sun, 30 Mar 2025 13:57:45 +0000 (16:57 +0300)]
clean up old gpu psemu funcs

2 months agoconfigure: omit already build-in GPU in $plugins
Apaczer [Sat, 29 Mar 2025 15:17:27 +0000 (16:17 +0100)]
configure: omit already build-in GPU in $plugins

2 months agofrontend/menu: show relevant built-in GPU
Apaczer [Fri, 28 Mar 2025 21:12:38 +0000 (22:12 +0100)]
frontend/menu: show relevant built-in GPU

2 months agoconfigure: unset `PIC` cflag for plugins if not used
Apaczer [Wed, 26 Mar 2025 21:14:57 +0000 (22:14 +0100)]
configure: unset `PIC` cflag for plugins if not used

also don't redefine PIC in Makefiles

2 months agofrontend: disable watchdog thread if being debugged
notaz [Sat, 29 Mar 2025 23:36:23 +0000 (01:36 +0200)]
frontend: disable watchdog thread if being debugged

2 months agoimplement scanout wrapping
notaz [Sat, 29 Mar 2025 23:27:32 +0000 (01:27 +0200)]
implement scanout wrapping

... somewhat at least
libretro/pcsx_rearmed#884

2 months agogte: more modern lzc for interpreter
notaz [Fri, 28 Mar 2025 00:20:56 +0000 (02:20 +0200)]
gte: more modern lzc for interpreter

2 months agomisc: put some debug stuff in savestates
notaz [Thu, 27 Mar 2025 20:48:20 +0000 (22:48 +0200)]
misc: put some debug stuff in savestates

for issue reports where people provide savestates

2 months agospu: partially implement current vol regs
notaz [Wed, 26 Mar 2025 23:43:02 +0000 (01:43 +0200)]
spu: partially implement current vol regs

libretro/pcsx_rearmed#885

2 months agomisc: accept savestates with RASTATE header
notaz [Tue, 25 Mar 2025 23:44:06 +0000 (01:44 +0200)]
misc: accept savestates with RASTATE header

can load RA .state file in standalone after:
rzip x a.state .pcsx/sstates/<exename>-<serial>.000

2 months agomisc: unbreak slowboot
notaz [Mon, 24 Mar 2025 22:27:34 +0000 (00:27 +0200)]
misc: unbreak slowboot

Fixes: 0b6f8a28056646a35b7d54689831107eb7932e0f
notaz/pcsx_rearmed#360

2 months agoFixes to libretro makefile for emscripten builds (#878)
Joe Osborn [Sat, 22 Mar 2025 23:34:25 +0000 (16:34 -0700)]
Fixes to libretro makefile for emscripten builds (#878)

* Fixes to libretro makefile for emscripten builds

* Include default 0 for pthread

* update flags to support both threaded and non-threaded cases

2 months agofrontend/menu: rename "Interlace" back to "Skip every 2nd line"
Apaczer [Fri, 21 Mar 2025 13:41:27 +0000 (14:41 +0100)]
frontend/menu: rename "Interlace" back to "Skip every 2nd line"

2 months agolibretro: add "Interlace mode" to UNAI options
Apaczer [Tue, 18 Mar 2025 13:49:26 +0000 (14:49 +0100)]
libretro: add "Interlace mode" to UNAI options

2 months agoandroid: drop -funroll-loops
notaz [Mon, 17 Mar 2025 00:18:54 +0000 (02:18 +0200)]
android: drop -funroll-loops

I don't like the bloat. If someone can show benchmarks showing this
helps, I'm happy to revert this.

2 months agodefault to O3 for autovectorization
notaz [Mon, 17 Mar 2025 00:17:37 +0000 (02:17 +0200)]
default to O3 for autovectorization

2 months agoexperimental rgb32 output option
notaz [Mon, 17 Mar 2025 00:15:23 +0000 (02:15 +0200)]
experimental rgb32 output option

notaz/pcsx_rearmed#355

2 months agospu: don't crash on 1 cpu w/threads enabled
notaz [Sun, 16 Mar 2025 23:14:07 +0000 (01:14 +0200)]
spu: don't crash on 1 cpu w/threads enabled

closes notaz/pcsx_rearmed#356

2 months agogpulib: avoid forced clears on state load
notaz [Fri, 14 Mar 2025 22:09:48 +0000 (00:09 +0200)]
gpulib: avoid forced clears on state load

forcing reg writes caused full fb clears each frame on run-ahead

3 months agospu: fix thread vs savestates races
notaz [Tue, 4 Mar 2025 00:02:33 +0000 (02:02 +0200)]
spu: fix thread vs savestates races

3 months agotry to support macOS for standalone
notaz [Mon, 3 Mar 2025 00:02:05 +0000 (02:02 +0200)]
try to support macOS for standalone

3 months agorelease r25 r25
notaz [Fri, 21 Feb 2025 23:43:45 +0000 (01:43 +0200)]
release r25

3 months agocdrom: adjust the t'ai hack
notaz [Tue, 25 Feb 2025 23:45:02 +0000 (01:45 +0200)]
cdrom: adjust the t'ai hack

3 months agomisc: time_bcd should actually be bcd
notaz [Tue, 25 Feb 2025 21:17:59 +0000 (23:17 +0200)]
misc: time_bcd should actually be bcd

3 months agodma: partially disable pcr handling
notaz [Tue, 25 Feb 2025 00:59:52 +0000 (02:59 +0200)]
dma: partially disable pcr handling

3 months agodrc: update patches
notaz [Mon, 24 Feb 2025 23:35:57 +0000 (01:35 +0200)]
drc: update patches

3 months agodrc: forgot to set may_except
notaz [Mon, 24 Feb 2025 23:28:47 +0000 (01:28 +0200)]
drc: forgot to set may_except

otherwise unneeded_reg[] thing breaks, can be seen with
Config.PreciseExceptions enabled in some games

3 months agodrc: limit more prints
notaz [Mon, 24 Feb 2025 00:52:26 +0000 (02:52 +0200)]
drc: limit more prints

to not flood the logs

3 months agodrc: fix wrong writes
notaz [Sun, 23 Feb 2025 02:20:09 +0000 (04:20 +0200)]
drc: fix wrong writes

3 months agomisc: detect pal from lic sector
notaz [Sun, 23 Feb 2025 00:13:08 +0000 (02:13 +0200)]
misc: detect pal from lic sector

3 months agocdrom: don't deliver non mode1/2 sectors
notaz [Sun, 23 Feb 2025 00:11:17 +0000 (02:11 +0200)]
cdrom: don't deliver non mode1/2 sectors

3 months agopsxinterpreter: log bus error address
notaz [Sat, 22 Feb 2025 23:12:53 +0000 (01:12 +0200)]
psxinterpreter: log bus error address

3 months agodma: handle PCR writes
notaz [Sat, 22 Feb 2025 23:10:09 +0000 (01:10 +0200)]
dma: handle PCR writes

no commercial game needs this, so was missing
notaz/pcsx_rearmed#354

3 months agocdrom: try emulating fifo status bit
notaz [Sat, 22 Feb 2025 22:59:16 +0000 (00:59 +0200)]
cdrom: try emulating fifo status bit

is this good enough?
notaz/pcsx_rearmed#354

3 months agodrc: fix a clash of 'unneeded' passes
notaz [Sat, 22 Feb 2025 18:34:56 +0000 (20:34 +0200)]
drc: fix a clash of 'unneeded' passes

pass2_unneeded_regs() made decisions before some removals

3 months agospu: update TI C64x code
notaz [Fri, 21 Feb 2025 23:27:09 +0000 (01:27 +0200)]
spu: update TI C64x code

surprised it's not broken completely

3 months agogpulib: add height adjustment option
notaz [Fri, 21 Feb 2025 22:01:59 +0000 (00:01 +0200)]
gpulib: add height adjustment option

libretro/pcsx_rearmed#880

3 months agounbreak gh build
notaz [Thu, 13 Feb 2025 23:15:27 +0000 (01:15 +0200)]
unbreak gh build

3 months agodrc: avoid some header includes when not needed
notaz [Thu, 13 Feb 2025 23:04:47 +0000 (01:04 +0200)]
drc: avoid some header includes when not needed

3 months agodb: add localized PE2 versions
notaz [Thu, 13 Feb 2025 00:09:18 +0000 (02:09 +0200)]
db: add localized PE2 versions

3 months agocdrom: more lid hacks
notaz [Wed, 12 Feb 2025 00:31:51 +0000 (02:31 +0200)]
cdrom: more lid hacks

someday this should be properly tested on hw...

libretro/pcsx_rearmed#877
libretro/pcsx_rearmed#779

3 months agogpulib: avoid unaligned read
notaz [Mon, 10 Feb 2025 23:49:29 +0000 (01:49 +0200)]
gpulib: avoid unaligned read

we still support arm9 and such

3 months agoavoid some left shifting to sign bit
notaz [Mon, 10 Feb 2025 22:43:16 +0000 (00:43 +0200)]
avoid some left shifting to sign bit

doesn't patch out left shifting negative values as that seems to be
properly handled by gcc/clang/msvc (even while the standard makes it
undefined), and patching it would uglify the code too much

3 months agogpu: some function mismatches
notaz [Mon, 10 Feb 2025 22:37:32 +0000 (00:37 +0200)]
gpu: some function mismatches

pointed out by ubsan

3 months agolightrec: rm dup line
notaz [Sat, 8 Feb 2025 22:03:53 +0000 (00:03 +0200)]
lightrec: rm dup line

3 months agogpu_neon: avoid some clang warnings
notaz [Sat, 8 Feb 2025 21:51:54 +0000 (23:51 +0200)]
gpu_neon: avoid some clang warnings

4 months agogpulib: keep dirty flag if not displayed
notaz [Sat, 1 Feb 2025 00:34:02 +0000 (02:34 +0200)]
gpulib: keep dirty flag if not displayed

4 months agospu: try some reverb resample filtering
notaz [Thu, 30 Jan 2025 21:24:18 +0000 (23:24 +0200)]
spu: try some reverb resample filtering

when gauss/cubic interpolation is on
libretro/pcsx_rearmed#515

4 months agolibretro: clean up win32 build
notaz [Tue, 28 Jan 2025 22:56:45 +0000 (00:56 +0200)]
libretro: clean up win32 build

4 months agogpu: partially revert 4a15db3fc8
notaz [Tue, 28 Jan 2025 21:10:41 +0000 (23:10 +0200)]
gpu: partially revert 4a15db3fc8

broke busy after dma
libretro/pcsx_rearmed#873

4 months agopropagate config after cd check
notaz [Sun, 26 Jan 2025 20:10:20 +0000 (22:10 +0200)]
propagate config after cd check

libretro/pcsx_rearmed#870

4 months agodb: update
notaz [Sat, 25 Jan 2025 20:51:42 +0000 (22:51 +0200)]
db: update

libretro/pcsx_rearmed#870

4 months agodrc: must call both callbacks in mixed mode
notaz [Sat, 25 Jan 2025 19:43:59 +0000 (21:43 +0200)]
drc: must call both callbacks in mixed mode

libretro/pcsx_rearmed#871

4 months agomake: address a ci race
notaz [Sat, 25 Jan 2025 01:35:39 +0000 (03:35 +0200)]
make: address a ci race

would be better to drop the plugins really

4 months agostandalone: fix missed y scaling
notaz [Sat, 25 Jan 2025 00:52:07 +0000 (02:52 +0200)]
standalone: fix missed y scaling

4 months agohle: assorted fixes
notaz [Thu, 23 Jan 2025 23:51:59 +0000 (01:51 +0200)]
hle: assorted fixes

like switching bios<->hle, w^x dynarec

4 months agodrc: implement block linking on platforms that lacked it
notaz [Thu, 23 Jan 2025 22:19:14 +0000 (00:19 +0200)]
drc: implement block linking on platforms that lacked it

... and likely break some of those platforms that I can't test :(

4 months agodrc: rearrange stop_after_jal stuff, limit NI prints
notaz [Wed, 22 Jan 2025 22:18:09 +0000 (00:18 +0200)]
drc: rearrange stop_after_jal stuff, limit NI prints

4 months agodrc: handle gte stalls closer to the interpreter
notaz [Wed, 22 Jan 2025 21:26:54 +0000 (23:26 +0200)]
drc: handle gte stalls closer to the interpreter

4 months agodrc: detect unoptimized stack reloads
notaz [Wed, 22 Jan 2025 01:11:12 +0000 (03:11 +0200)]
drc: detect unoptimized stack reloads