pcsx_rearmed.git
2 years agoMerge pull request #665 from QuarkTheAwesome/libretro-merge-be
LibretroAdmin [Sat, 11 Jun 2022 01:08:36 +0000 (02:08 +0100)]
Merge pull request #665 from QuarkTheAwesome/libretro-merge-be

Fix PCSX core and dfxvideo for big-endian systems

2 years agoMerge pull request #663 from bslenul/rumble-fix
LibretroAdmin [Sat, 11 Jun 2022 01:08:15 +0000 (02:08 +0100)]
Merge pull request #663 from bslenul/rumble-fix

Rumble should only work with 'dualshock' device type

2 years agocdriso: hack .chd track handling to match .cue
notaz [Mon, 6 Jun 2022 22:59:51 +0000 (01:59 +0300)]
cdriso: hack .chd track handling to match .cue

libretro/pcsx_rearmed#648

2 years agocdrom: don't read and play simultaneously
notaz [Mon, 6 Jun 2022 21:45:57 +0000 (00:45 +0300)]
cdrom: don't read and play simultaneously

notaz/pcsx_rearmed#250

2 years agolightrec: try to clean up intergarion, fix -O0
notaz [Mon, 6 Jun 2022 20:53:38 +0000 (23:53 +0300)]
lightrec: try to clean up intergarion, fix -O0

notaz/pcsx_rearmed#251

2 years agocdrom: Fix PBP support on big-endian platforms
Paul Cercueil [Tue, 24 May 2022 21:22:48 +0000 (22:22 +0100)]
cdrom: Fix PBP support on big-endian platforms

The data contained in the PBP is in little-endian format. Therefore,
everything in the PBP's header must be read with the byte-swap macros,
for PBP support to work on big-endian systems.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agodfxvideo: Restore support for big-endian arch
Paul Cercueil [Sat, 21 May 2022 16:52:47 +0000 (17:52 +0100)]
dfxvideo: Restore support for big-endian arch

The hardware registers, emulated RAM or emulated VRAM are all in
little-endian format. Therefore, each access must be done with one of
the byte-swap macros, for the plugin to work on big-endian systems.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agofrontend: Fix colorspace conversion routines on big-endian
Paul Cercueil [Sat, 21 May 2022 17:58:14 +0000 (18:58 +0100)]
frontend: Fix colorspace conversion routines on big-endian

The bgr555_to_rgb565() and bgr888_to_rgb565() functions were only
working correctly on little-endian systems.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agomisc: Use GCC builtins for byte-swap operations
Paul Cercueil [Thu, 26 May 2022 13:07:41 +0000 (14:07 +0100)]
misc: Use GCC builtins for byte-swap operations

Instead of using custom code to byte-swap values, use the built-in
function provided by GCC.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agogpulib: Add proper support for big-endian
Paul Cercueil [Fri, 13 Sep 2019 21:13:43 +0000 (23:13 +0200)]
gpulib: Add proper support for big-endian

Update the gpulib code to work properly on big-endian architectures.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoGet rid of bit fields in union
Paul Cercueil [Fri, 13 Sep 2019 21:09:11 +0000 (23:09 +0200)]
Get rid of bit fields in union

Long story short, bit fields aren't endian-safe.
More info: http://mjfrazer.org/mjfrazer/bitfields/

Simplify that by just using a few macros to access the needed bits.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMake sure hardware registers are manipulated as little-endian
Paul Cercueil [Fri, 13 Sep 2019 21:01:57 +0000 (23:01 +0200)]
Make sure hardware registers are manipulated as little-endian

The hardware registers should be represented in little-endian format.
Therefore, on big-endian systems the values need to be byte-swapped.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoFix PCSX on big-endian systems
Paul Cercueil [Wed, 11 Sep 2019 15:33:14 +0000 (17:33 +0200)]
Fix PCSX on big-endian systems

The __BIGENDIAN__ macro was never defined anywhere, and the
__BIG_ENDIAN__ macro isn't set anymore by recent versions of GCC.

Replace them by checking __BYTE_ORDER__ against __ORDER_BIG_ENDIAN__.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoRumble should only work with 'dualshock' device type
bslenul [Sun, 5 Jun 2022 09:41:55 +0000 (11:41 +0200)]
Rumble should only work with 'dualshock' device type

2 years agoMerge pull request #662 from pcercuei/update-lightrec-20220604
LibretroAdmin [Sat, 4 Jun 2022 23:54:41 +0000 (00:54 +0100)]
Merge pull request #662 from pcercuei/update-lightrec-20220604

Update GNU Lightning

2 years agogit subrepo pull --force deps/lightning
Paul Cercueil [Sat, 4 Jun 2022 23:30:15 +0000 (00:30 +0100)]
git subrepo pull --force deps/lightning

subrepo:
  subdir:   "deps/lightning"
  merged:   "7fce9abb"
upstream:
  origin:   "https://github.com/pcercuei/gnu_lightning.git"
  branch:   "pcsx_rearmed"
  commit:   "7fce9abb"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years ago(Windows) Not building, include tlsf.c by default
libretroadmin [Sat, 4 Jun 2022 21:56:57 +0000 (23:56 +0200)]
(Windows) Not building, include tlsf.c by default

2 years ago(Android) Fix includes
libretroadmin [Sat, 4 Jun 2022 21:51:59 +0000 (23:51 +0200)]
(Android) Fix includes

2 years ago(Android) include tlsf.c
libretroadmin [Sat, 4 Jun 2022 21:50:10 +0000 (23:50 +0200)]
(Android) include tlsf.c

2 years agoMerge pull request #661 from pcercuei/update-lightrec-20220604
LibretroAdmin [Sat, 4 Jun 2022 21:48:57 +0000 (22:48 +0100)]
Merge pull request #661 from pcercuei/update-lightrec-20220604

Update lightrec 20220604

2 years agolightrec: Enable code buffer support
Paul Cercueil [Sat, 4 Jun 2022 20:12:14 +0000 (21:12 +0100)]
lightrec: Enable code buffer support

Map a 8 MiB code buffer at (base + 0x80.0000), right after the emulated
RAM. In this code buffer, Lightrec will write the recompiled code for
the host machine.

In general, the code buffer support is very useful when the host
platform has only a small RW+X memory area available for JIT purposes,
like it's the case on the WiiU.

On Linux, this isn't a concern, but having a code buffer does still
bring a benefit: if both the start address and the end address of the
code buffer's address fit in 32 bits, then Lightrec's code LUT can be
shrunk in half (2.5 MiB instead of 5 MiB), as it only needs to store
32-bit pointers.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Sat, 4 Jun 2022 20:02:05 +0000 (21:02 +0100)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "a8fe7568"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "a8fe7568"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agopsxcounters: try to support a dynarec with a very long timeslice
notaz [Thu, 2 Jun 2022 20:22:19 +0000 (23:22 +0300)]
psxcounters: try to support a dynarec with a very long timeslice

The dynarec instead should probably not run for thousands of cycles
doing no interrupt checks, but maybe this hack will be enough.
libretro/pcsx_rearmed#658

2 years agodrc: update some logging and patches
notaz [Wed, 1 Jun 2022 21:25:32 +0000 (00:25 +0300)]
drc: update some logging and patches

2 years agoMake this backwards compatible with older Linux kernels
libretroadmin [Tue, 31 May 2022 18:35:06 +0000 (20:35 +0200)]
Make this backwards compatible with older Linux kernels

2 years ago(Android) Only build in libpcsxcore/lightrec/mem.c when
libretroadmin [Mon, 30 May 2022 19:23:48 +0000 (21:23 +0200)]
(Android) Only build in libpcsxcore/lightrec/mem.c when
LIGHTREC_CUSTOM_MAP is set to 1

2 years agoDisable LIGHTREC_CUSTOM_MAP on all Android versions
libretroadmin [Mon, 30 May 2022 19:20:25 +0000 (21:20 +0200)]
Disable LIGHTREC_CUSTOM_MAP on all Android versions

2 years ago(Android)
libretroadmin [Mon, 30 May 2022 19:14:50 +0000 (21:14 +0200)]
(Android)
- Always set LIGHTREC_CUSTOM_MAP
- Compile in libpcsxcore/lightrec/mem.c

2 years ago(Android) Define LIGHTREC_CUSTOM_MAP
libretroadmin [Mon, 30 May 2022 19:10:48 +0000 (21:10 +0200)]
(Android) Define LIGHTREC_CUSTOM_MAP

2 years agoMerge pull request #659 from pcercuei/update-lightrec-20220530
LibretroAdmin [Mon, 30 May 2022 18:34:58 +0000 (19:34 +0100)]
Merge pull request #659 from pcercuei/update-lightrec-20220530

Fix Lightrec build on Windows and Linux

2 years agoFix Lightrec build on Windows and Linux
Paul Cercueil [Mon, 30 May 2022 18:22:17 +0000 (19:22 +0100)]
Fix Lightrec build on Windows and Linux

Some distributions of Linux don't have the MFD_HUGETLB flag in
<linux/memfd.h>, probably because their kernel headers installed are too
old. In that case, we locally define MFD_HUGETLB to the value it should
have.

On Windows, the HAVE_MMAP macro set for GNU Lightning was also used in
libretro-common/vfs/vfs_implementation.c, causing build issues. Address
this problem by only defining HAVE_MMAP for Lightning source files.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMerge pull request #657 from pcercuei/update-lightrec-20220529
LibretroAdmin [Mon, 30 May 2022 17:56:24 +0000 (18:56 +0100)]
Merge pull request #657 from pcercuei/update-lightrec-20220529

Update lightrec 20220529

2 years agoUpdate Lightning/Lightrec includes to the latest upstream versions
Paul Cercueil [Sun, 29 May 2022 11:51:26 +0000 (12:51 +0100)]
Update Lightning/Lightrec includes to the latest upstream versions

Lightning now also requires HAVE_MMAP to be defined.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Mon, 30 May 2022 17:00:15 +0000 (18:00 +0100)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "49ef275a"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "49ef275a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agogit subrepo pull --force deps/lightning
Paul Cercueil [Sun, 29 May 2022 11:48:50 +0000 (12:48 +0100)]
git subrepo pull --force deps/lightning

subrepo:
  subdir:   "deps/lightning"
  merged:   "2a199e4d"
upstream:
  origin:   "https://github.com/pcercuei/gnu_lightning.git"
  branch:   "pcsx_rearmed"
  commit:   "2a199e4d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agoMakefile: Fix build on Windows and Android
Paul Cercueil [Mon, 30 May 2022 17:23:02 +0000 (18:23 +0100)]
Makefile: Fix build on Windows and Android

Fix build under MinGW where the rt library wasn't found, and on Android
where the dynarec isn't Lightrec but Ari64.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMerge pull request #654 from pcercuei/lightrec-mmap-zero
LibretroAdmin [Mon, 30 May 2022 15:14:02 +0000 (16:14 +0100)]
Merge pull request #654 from pcercuei/lightrec-mmap-zero

Lightrec: Make memory map as perfect as possible

2 years agopsxmem: Add support for Lightrec's custom mem init sequence
Paul Cercueil [Wed, 11 May 2022 15:31:05 +0000 (16:31 +0100)]
psxmem: Add support for Lightrec's custom mem init sequence

Adapt the current psxmem.c code to support Lightrec's custom memory
init functions.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agolightrec: Add new memory init functions
Paul Cercueil [Wed, 11 May 2022 15:54:16 +0000 (16:54 +0100)]
lightrec: Add new memory init functions

Lightrec can greatly benefit from having the RAM/BIOS/scratchpad and RAM
mirrors mapped to specific addresses. For the same value of (offset):

- If the RAM is mapped to (offset), the BIOS is mapped to
  (offset + 0x1fc00000) and the scratchpad to (offset + 0x1f800000), the
  generated code will be better;

- If the RAM is also mirrored to (offset + 0x200000), (offset + 0x400000)
  and (offset + 0x600000), the generated code will be even better;

- If the offset is 0x0, the generated code will be even better.

Additionally, the new memory init code will attempt to use huge pages
when possible, in order to greatly reduce the overhead of the MMU.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoAdd support for mapping emulated RAM to address 0x0
Paul Cercueil [Wed, 11 May 2022 15:24:03 +0000 (16:24 +0100)]
Add support for mapping emulated RAM to address 0x0

This requires a few changes, since a pointer whose value is 0x0 will be
detected as a NULL pointer. The read/write LUTs are now initialized with
0xff, and all pointers are now checked against a new INVALID_PTR macro.

Mapping the emulated RAM to the address 0x0 will allow Lightrec to
generate much better code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMerge pull request #653 from jdgleaver/core-options-v2
Autechre [Wed, 4 May 2022 17:43:10 +0000 (18:43 +0100)]
Merge pull request #653 from jdgleaver/core-options-v2

Update core options to v2 format

2 years agoUpdate core options to v2 format
jdgleaver [Wed, 4 May 2022 16:59:14 +0000 (17:59 +0100)]
Update core options to v2 format

2 years agoMerge pull request #652 from pcercuei/update-lightrec-20220427
Autechre [Wed, 27 Apr 2022 22:56:04 +0000 (23:56 +0100)]
Merge pull request #652 from pcercuei/update-lightrec-20220427

Update lightrec 20220427

2 years agogit subrepo pull --force deps/lightning
Paul Cercueil [Wed, 27 Apr 2022 20:02:43 +0000 (21:02 +0100)]
git subrepo pull --force deps/lightning

subrepo:
  subdir:   "deps/lightning"
  merged:   "6f101bf8"
upstream:
  origin:   "https://github.com/pcercuei/gnu_lightning.git"
  branch:   "pcsx_rearmed"
  commit:   "6f101bf8"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agolightrec: Only sync register cache before savestate if using dynarec
Paul Cercueil [Wed, 27 Apr 2022 20:00:11 +0000 (21:00 +0100)]
lightrec: Only sync register cache before savestate if using dynarec

Synchronizing Lightrec's register cache into PCSX' psxRegs variable must
be done only if using Lightrec, not when using PCSX' interpreter.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agomake: try harder to detect arm to default to ari64 there
notaz [Tue, 26 Apr 2022 20:24:42 +0000 (23:24 +0300)]
make: try harder to detect arm to default to ari64 there

2 years agoMerge pull request #650 from pcercuei/fix-lightrec-save-states
Autechre [Mon, 25 Apr 2022 22:01:26 +0000 (23:01 +0100)]
Merge pull request #650 from pcercuei/fix-lightrec-save-states

lightrec: Fix save states

2 years agolightrec: Fix save states
Paul Cercueil [Mon, 25 Apr 2022 20:28:54 +0000 (21:28 +0100)]
lightrec: Fix save states

To create save states the psxRegs variable must be up-to-date. Therefore
we need to store back all the registers in Lightrec's cache into psxRegs
before saving, and reload them into Lightrec's cache after loading a
save state.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMerge pull request #649 from pcercuei/update-lightrec-20220425
Autechre [Mon, 25 Apr 2022 20:21:38 +0000 (21:21 +0100)]
Merge pull request #649 from pcercuei/update-lightrec-20220425

Update to latest Lightrec 2022-04-25

2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Mon, 25 Apr 2022 20:06:57 +0000 (21:06 +0100)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "de06670b"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "de06670b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agoMerge pull request #644 from pcercuei/update-lightrec-20220409
Autechre [Sat, 9 Apr 2022 21:21:35 +0000 (22:21 +0100)]
Merge pull request #644 from pcercuei/update-lightrec-20220409

Update Lightrec to version 2022.04.09

2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Sat, 9 Apr 2022 20:53:44 +0000 (21:53 +0100)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "b9f1b040"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "b9f1b040"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agoMerge pull request #642 from StormedBubbles/guncon
Autechre [Fri, 8 Apr 2022 20:39:10 +0000 (21:39 +0100)]
Merge pull request #642 from StormedBubbles/guncon

GunCon overhaul

2 years agoMerge pull request #643 from pcercuei/update-lightrec-20220408
Autechre [Fri, 8 Apr 2022 19:46:31 +0000 (20:46 +0100)]
Merge pull request #643 from pcercuei/update-lightrec-20220408

Update lightrec 20220408

2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Fri, 8 Apr 2022 17:41:22 +0000 (18:41 +0100)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "ce40f838"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "ce40f838"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agogit subrepo pull --force deps/lightning
Paul Cercueil [Fri, 8 Apr 2022 17:40:26 +0000 (18:40 +0100)]
git subrepo pull --force deps/lightning

subrepo:
  subdir:   "deps/lightning"
  merged:   "ac905ceb"
upstream:
  origin:   "https://github.com/pcercuei/gnu_lightning.git"
  branch:   "pcsx_rearmed"
  commit:   "ac905ceb"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agolightning: Update to my own repository
Paul Cercueil [Fri, 8 Apr 2022 17:36:50 +0000 (18:36 +0100)]
lightning: Update to my own repository

The maintainer of GNU Lightning seems MIA, and therefore it is
currently impossible to contribute to the upstream project.

Until the situation improves, switch to my own repository, in which I
will be able to include patches that benefit this core.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoGunCon overhaul
StormedBubbles [Thu, 7 Apr 2022 13:37:21 +0000 (09:37 -0400)]
GunCon overhaul

-Add Trigger, Reload, Aux A, and Aux B as mappable buttons in RetroArch menu for players 1 and 2.

-GunCon trigger, A, and B buttons are mapped to Gun Trigger, Gun Aux A, and Gun Aux B instead of hard coded to left click, right click, and middle click.

-Force cursor to corner of screen for offscreen reload so that reloading works on all four edges of the screen.

-Allow Gun Reload RetroArch input to emulate an offscreen shot.

-Switch gun coordinates from "Pointer" type to "Lightgun" type.

2 years agodrc: prevent people from using lightrec on arm
notaz [Tue, 5 Apr 2022 21:47:25 +0000 (00:47 +0300)]
drc: prevent people from using lightrec on arm

Can specify ALLOW_LIGHTREC_ON_ARM=1 if you want it that much.

2 years agoMerge pull request #638 from CometHunter92/fix_menu_skip
Autechre [Fri, 1 Apr 2022 14:24:51 +0000 (15:24 +0100)]
Merge pull request #638 from CometHunter92/fix_menu_skip

fixes and cleaning

2 years agoUpdate libretro_core_options.h
CometHunter92 [Fri, 1 Apr 2022 14:23:36 +0000 (16:23 +0200)]
Update libretro_core_options.h

2 years agofixes core options getting crazy if coming from a previous core version
CometHunter92 [Fri, 1 Apr 2022 13:56:00 +0000 (15:56 +0200)]
fixes core options getting crazy if coming from a previous core version

2 years agoMerge pull request #637 from jSTE0/itempo-fix
Autechre [Wed, 30 Mar 2022 15:08:05 +0000 (16:08 +0100)]
Merge pull request #637 from jSTE0/itempo-fix

frontend: Disable iTempo

2 years agofrontend: Disable iTempo
jSTE0 [Tue, 29 Mar 2022 21:13:32 +0000 (22:13 +0100)]
frontend: Disable iTempo

Leave iTempo set to 0 on all libbretro platforms. This fixes the build
failure for Miyoo. Also results in iTempo being 0 for Raspberry Pi 1,
which is faster than the Miyoo but slower than the new 3DS.

2 years agoMerge pull request #636 from neonloop/autoframeskip_updates
Autechre [Tue, 29 Mar 2022 15:51:49 +0000 (16:51 +0100)]
Merge pull request #636 from neonloop/autoframeskip_updates

Updates auto-frameskip

2 years agoUpdates auto-frameskip
neonloop [Tue, 29 Mar 2022 15:12:07 +0000 (15:12 +0000)]
Updates auto-frameskip

Follows newer frameskip code from snes9x2002 and fixes fixed_interval
frameskip when audio driver doesn't support buffer monitoring.

Also disables iTempo for Miyoo builds, this setting only has correct
effect in standalone and generates too much audio every frame in
RetroArch.

2 years agoMerge pull request #634 from libretro/revert-633-revert-631-autoframeskip
Autechre [Mon, 28 Mar 2022 15:16:14 +0000 (16:16 +0100)]
Merge pull request #634 from libretro/revert-633-revert-631-autoframeskip

Revert "Revert "Adds auto frameskip based on free audio buffer space""

2 years agoRevert "Revert "Adds auto frameskip based on free audio buffer space""
Autechre [Mon, 28 Mar 2022 15:16:03 +0000 (17:16 +0200)]
Revert "Revert "Adds auto frameskip based on free audio buffer space""

2 years agoMerge pull request #633 from libretro/revert-631-autoframeskip
Autechre [Sun, 27 Mar 2022 06:07:27 +0000 (07:07 +0100)]
Merge pull request #633 from libretro/revert-631-autoframeskip

Revert "Adds auto frameskip based on free audio buffer space"

2 years agoRevert "Adds auto frameskip based on free audio buffer space"
Autechre [Sun, 27 Mar 2022 06:07:17 +0000 (07:07 +0100)]
Revert "Adds auto frameskip based on free audio buffer space"

2 years agoMerge pull request #631 from neonloop/autoframeskip
Autechre [Wed, 23 Mar 2022 21:04:15 +0000 (22:04 +0100)]
Merge pull request #631 from neonloop/autoframeskip

Adds auto frameskip based on free audio buffer space

2 years agoMerge pull request #630 from jSTE0/fix-spu-defaults
Autechre [Wed, 23 Mar 2022 17:20:03 +0000 (18:20 +0100)]
Merge pull request #630 from jSTE0/fix-spu-defaults

Fix SPU defaults for pre-ARMv7 CPUs

2 years agoAdds auto frameskip based on free audio buffer space
neonloop [Wed, 23 Mar 2022 06:20:38 +0000 (06:20 +0000)]
Adds auto frameskip based on free audio buffer space

The change uses same style as other cores with auto frameskip. PSX
doesn't always render every frame, so skipped frames that wouldn't have
been rendered aren't used for frameskip limit.

2 years agoFix SPU defaults for pre-ARMv7 CPUs
jSTE0 [Mon, 21 Mar 2022 21:56:41 +0000 (21:56 +0000)]
Fix SPU defaults for pre-ARMv7 CPUs

Disable reverb and interpolation for pre-ARMv7 CPUs to match
emu_set_default_config(). Affects the ARMv5TEJ Miyoo and ARMv6 3DS and
Raspberry Pi 1.

2 years agoMerge pull request #629 from jSTE0/miyoo-platform
Autechre [Sat, 19 Mar 2022 18:53:38 +0000 (19:53 +0100)]
Merge pull request #629 from jSTE0/miyoo-platform

platforms: Add Miyoo target

2 years agoplatforms: Add Miyoo target
jSTE0 [Sat, 19 Mar 2022 18:25:39 +0000 (18:25 +0000)]
platforms: Add Miyoo target

Build for Miyoo which has the same ARM926EJ-S CPU as the Wiz/Caanoo
platforms so use similar build flags.
Enable hi-res downscaling by default for the UNAI GPU renderer to scale
to the device's 320x240 screen.

2 years agocdriso: handle chd subchannels, when available
notaz [Sun, 13 Mar 2022 21:40:48 +0000 (23:40 +0200)]
cdriso: handle chd subchannels, when available

libretro/pcsx_rearmed#535
only raw mode tested

2 years agodrc: fix some wrong inv address calculations
notaz [Tue, 1 Mar 2022 22:49:11 +0000 (00:49 +0200)]
drc: fix some wrong inv address calculations

Fixes: 882a08fc49541450bc403b2e920e4bccc257dfdf
notaz/pcsx_rearmed#243

2 years agounbreak nodynarec build
notaz [Sat, 26 Feb 2022 23:54:39 +0000 (01:54 +0200)]
unbreak nodynarec build

oops

2 years agodrc: try to avoid some block trapping
notaz [Sat, 26 Feb 2022 22:10:57 +0000 (00:10 +0200)]
drc: try to avoid some block trapping

2 years agodrc: rework jump_out lists
notaz [Thu, 24 Feb 2022 21:28:11 +0000 (23:28 +0200)]
drc: rework jump_out lists

should waste less memory for malloc overheads

2 years agodrc: rework expire code
notaz [Wed, 23 Feb 2022 23:08:35 +0000 (01:08 +0200)]
drc: rework expire code

Should be quite a bit simpler now, and no longer wastes ~4MB of
translation cache for aggressive block expiring. However more stuff
in cache means longer lists which may slow things down if
recompilation is happening nonstop, so further tuning might be needed.

2 years agodrc: more precise invalidation checking for the invstub case
notaz [Tue, 22 Feb 2022 22:26:51 +0000 (00:26 +0200)]
drc: more precise invalidation checking for the invstub case

2 years agodrc: rework block tracking
notaz [Mon, 21 Feb 2022 23:23:09 +0000 (01:23 +0200)]
drc: rework block tracking

Mostly to remove that horrible generated code parsing.
Also seems to generate less code now.

2 years agodrc: get rid of SPAN
notaz [Sat, 19 Feb 2022 22:46:51 +0000 (00:46 +0200)]
drc: get rid of SPAN

Should have done it 10 years ago, it's a huge maintenance burden for
something than almost never happens.

2 years agodrc: restore all block entry points at once
notaz [Sat, 19 Feb 2022 22:11:52 +0000 (00:11 +0200)]
drc: restore all block entry points at once

and add some stats

2 years agodrc: don't delay block restoration
notaz [Sat, 19 Feb 2022 19:37:23 +0000 (21:37 +0200)]
drc: don't delay block restoration

Not sure why it was done the way it was (maybe something N64 related?),
but it occasionally caused dyna_linker to repeatedly walk the jump_in
list. What's worse, if the dirty block was deemed to expire soon,
it would never be restored and dyna_linker repeated jump_in walking
would never end, causing severe slowdown.

2 years agoMerge pull request #619 from pcercuei/update-lightrec-20220224
Autechre [Fri, 25 Feb 2022 19:57:01 +0000 (20:57 +0100)]
Merge pull request #619 from pcercuei/update-lightrec-20220224

Update to latest Lightrec

2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Thu, 24 Feb 2022 22:29:21 +0000 (22:29 +0000)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "747da9c5"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "747da9c5"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agoMerge pull request #618 from pcercuei/update-lightrec-20220224
Autechre [Thu, 24 Feb 2022 20:20:18 +0000 (21:20 +0100)]
Merge pull request #618 from pcercuei/update-lightrec-20220224

Attempt to fix CI build issues, try #2

2 years agoWin32: Add symlink to fake <sys/mman.h>
Paul Cercueil [Thu, 24 Feb 2022 18:52:21 +0000 (18:52 +0000)]
Win32: Add symlink to fake <sys/mman.h>

Add a symlink from include/mman/sys/mman.h to deps/mman/mman.h.

Then, Lightning can be tricked into using our mman.h without having to
modify the external mman-win32 repo.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoAndroid.mk: Add missing include paths
Paul Cercueil [Thu, 24 Feb 2022 18:43:35 +0000 (18:43 +0000)]
Android.mk: Add missing include paths

Add the missing include paths for <lightrec-config.h> and <lightning.h>.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Thu, 24 Feb 2022 18:47:59 +0000 (18:47 +0000)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "d3329782"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "d3329782"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agoMerge pull request #616 from pcercuei/update-lightrec-20220222
Autechre [Thu, 24 Feb 2022 13:48:57 +0000 (14:48 +0100)]
Merge pull request #616 from pcercuei/update-lightrec-20220222

Add missing lightning.h include file

2 years agoAdd missing lightning.h include file
Paul Cercueil [Tue, 22 Feb 2022 20:46:56 +0000 (20:46 +0000)]
Add missing lightning.h include file

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agoMerge pull request #615 from pcercuei/update-lightrec-20220220
Autechre [Tue, 22 Feb 2022 07:21:06 +0000 (08:21 +0100)]
Merge pull request #615 from pcercuei/update-lightrec-20220220

Update Lightning/Lightrec to the latest upstream version

2 years agolightrec: Update to latest Lightrec API
Paul Cercueil [Sat, 19 Feb 2022 21:30:21 +0000 (21:30 +0000)]
lightrec: Update to latest Lightrec API

Update the glue code to use the API of the latest Lightrec.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agolightrec: Add custom lightrec-config.h
Paul Cercueil [Sat, 19 Feb 2022 22:02:50 +0000 (22:02 +0000)]
lightrec: Add custom lightrec-config.h

Add our own lightrec-config.h outside the deps/lightrec/ tree, so that
it won't be removed when the subrepo is updated.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2 years agogit subrepo pull --force deps/lightrec
Paul Cercueil [Sun, 20 Feb 2022 00:16:48 +0000 (00:16 +0000)]
git subrepo pull --force deps/lightrec

subrepo:
  subdir:   "deps/lightrec"
  merged:   "d90de684"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "d90de684"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

2 years agogit subrepo pull --force deps/lightning
Paul Cercueil [Sat, 19 Feb 2022 23:20:12 +0000 (23:20 +0000)]
git subrepo pull --force deps/lightning

subrepo:
  subdir:   "deps/lightning"
  merged:   "876c1043"
upstream:
  origin:   "https://git.savannah.gnu.org/git/lightning.git"
  branch:   "master"
  commit:   "876c1043"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"