コミットグラフ

2977 コミット

作成者 SHA1 メッセージ 日付
Luke Usher 71302c0938 shaders: switch to slang-shaders rather than quark shaders via librashader 2024-02-25 12:05:36 +00:00
Luke Usher b702465cc1 scripts: update librashader and slang-shaders 2024-02-25 12:04:29 +00:00
Luke Usher cc850c7dc1 Merge commit 'b822fb32242d9ece329330929da2b5fd92fc4ef1' as 'thirdparty/slang-shaders' 2024-02-25 12:03:56 +00:00
Luke Usher b822fb3224 Squashed 'thirdparty/slang-shaders/' content from commit 23f27e271
git-subtree-dir: thirdparty/slang-shaders
git-subtree-split: 23f27e2714deb610202dbcf2cebb139b5fb6d880
2024-02-25 12:03:56 +00:00
Luke Usher ff98ad031c Merge commit 'f18c1f9c67dd232ad8b9d2c0892101693476fb10' as 'thirdparty/librashader' 2024-02-25 12:03:36 +00:00
Luke Usher f18c1f9c67 Squashed 'thirdparty/librashader/' content from commit 4ef4b8762
git-subtree-dir: thirdparty/librashader
git-subtree-split: 4ef4b8762b9ae45d012d6cb1ad2640211ffd874d
2024-02-25 12:03:36 +00:00
Luke Usher 39025af1fe release ares v136 2024-02-23 17:02:48 +00:00
Luke Usher 5cdefb088d desktop-ui: cleanup resource search paths
As well as simplifying the code a little, this also  fixes an oversight where users could not override application resources on macOS.
2024-02-21 17:49:12 +00:00
Giovanni Bajo d0253599a6
n64: fix corner case in FPU exception handling (#1400)
Ares checked each of the two input arguments to three-ops functions
separately, but this is not correct. Conditions causing unimplemented
operation on either input (sNAN, subnormal) take precedence on
conditions causing invalid operation on either input (qNAN).

After this fix, Ares passes n64-systemtest COP1 stress test.
2024-02-20 23:34:38 +00:00
Luke Usher 1e83da0241 md: implement subchannel processing for mcd (CD+G) 2024-02-19 14:19:56 +00:00
Luke Usher ed0a1c8852 cheats: only create a cheat file when cheats are added
This also cleans up empty cheat files on unload.
2024-02-18 08:41:56 +00:00
Luke Usher dd9c728a12 ares: preliminary cheat support
Adds a cheat editor to Tools->Cheats when a game is loaded.

The cheat editor should work for all systems except N64 and PS1: support for these will come later.

The code has currently only been tested for MS, MD and SFC but it is assumed all the other systems are also functioning; the code paths are the same.

Code format is standard patch codes in the format X:Y where X is a memory address and Y is a value to place there; most emulators also support this format.

You can use multiple codes in a single cheat by separating codes with a + sign.

Cheats that require memory comparisons are not currently supported, only replacements

Cheats are saved alongside the roms, eg "Game.sfc" will create "Game.cheats.bml".
2024-02-16 19:01:57 +00:00
Luke Usher 7ec1e1430c fc: reduce overscan cropping similar to ms 2024-02-15 17:35:47 +00:00
Luke Usher 16379aabff ruby: use PRESENTINTERVAL_ONE rather than GetRasterStatus for VBlank with d3d9 2024-02-15 17:34:30 +00:00
Luke Usher 11f24b47c3 ms: adjust overscan cropping, it was a little too agressive 2024-02-15 17:33:51 +00:00
Luke Usher 32f205975c md: add CD PCM RAM to debug memory viewer/editor 2024-02-14 17:45:50 +00:00
png183 21ca9cf76e
gba: timer 0 count-up bit cannot be set (#1392)
The count-up bit for timer 0 cannot be set on hardware ([test
ROM](https://github.com/png183/gba-tests/blob/master/timer/timer_check_count_up_presence.gba)).
This PR implements said behaviour in ares, preventing timer 0 from
incorrectly halting if this bit is written.
2024-02-14 10:14:39 +00:00
Giovanni Bajo d32b3ffe45
n64: revert previous commit (add HLE RDRAM initialization) (#1391)
This is actually still required as we still skip RDRAM initialization
anyway and proprietary IPL3 doesn't initialize the RAM size in this
case.
2024-02-14 10:14:20 +00:00
Luke Usher 5864382c67 ps1: various fixes to GPUSTAT register behavior 2024-02-13 22:34:03 +00:00
Luke Usher f392e4f428 libchdr: disable asm optimisation for zstd
Should fix the Ubuntu build.
2024-02-11 19:51:28 +00:00
Luke Usher d0075978f8 libchdr: rollback lzma to 19.00
This version still exists in the repo for libchdr
22.01 fails compilation on many platforms right now
2024-02-11 19:37:46 +00:00
Luke Usher c1e5777dc1 thirdparty: fix compilation after libchdr update 2024-02-11 19:16:41 +00:00
Luke Usher ec6c9fc330 Merge commit '9bc95db1f0c5591dfbcec23c8e326aa6c2bb3b29' 2024-02-11 19:16:32 +00:00
Luke Usher 9bc95db1f0 Squashed 'thirdparty/libchdr/' changes from 9108f34a8..2648c221c
2648c221c Merge pull request #108 from herbymachine/master
f7729588b Update libchdr_huffman.c
26d27ca49 Merge pull request #106 from zakk4223/zstd
d6f59e748 Add zstd codec

git-subtree-dir: thirdparty/libchdr
git-subtree-split: 2648c221c9ce6b49600ed7d2eb45c9e6e593790f
2024-02-11 19:16:32 +00:00
Luke Usher 6d80a8e940 Merge commit '2a0f9651b976a5431510222e04077fd360415d69' 2024-02-11 19:16:30 +00:00
Luke Usher 2a0f9651b9 Squashed 'thirdparty/sljit/' changes from c1cbaf09e..607158516
607158516 Improve serialize interface
dd73cb873 Implement serialization interface
5d2d7cd59 Improve PPC branch support
8b8b6b442 Improve ARM32 branch support
2cfed9ce4 Improve x86, ARM-T2 branch support
6c75e773c Improve riscv branch support
dfeb8cf68 Add extraction macros for operands
dc52b334e Fix typo (#229)
7a821cd71 Add LoongArch float to integer conversion special cases (#226)
cbde0bea6 regex: allow building with a C++ compiler (#224)
40680870e Fix masked shift on arm32
a0643952a Fix sljit_get_register_index on x86-32
80bdff333 Support temporary registers in sljit_get_register_index
4629814f8 riscv: fix getput_arg and load_addr_to_reg (#223)
a26427a6e define float to integer conversion special cases
42128180d build: make code mostly ANSI C89 compatible (#221)
57c212f58 loongarch: fix FTBFS when building pcre2test as part of PCRE2 (#220)
3faacd431 Optimize certain fop1 operations on x86
4f33321c1 Move float/call/simd tests to separate files
230429241 Add another temp register on s390x
fbf9c47f3 Support access to temporary registers
8c5c50463 Implement simd on s390x
02e76fb14 s390x: fix FTBFS with clang (#219)
0bd5147fc Implement simd2 operations

git-subtree-dir: thirdparty/sljit
git-subtree-split: 6071585164d9a38a8890cfd2722ca9d8492528bb
2024-02-11 19:16:29 +00:00
Giovanni Bajo 51a10b0bd0
n64: avoid HLE-ish memory init (#1388)
Not required anymore, possibly for a long time. IPL3 does that, plus
this creates correctness issues with open source IPL3 which *doesn't*
initialize those memory locations.
2024-02-11 11:09:07 +00:00
png183 7e2f490fd0
gba: improve horizontal sprite mosaic (#1387)
Addresses a few cases where the current horizontal sprite mosaic
implementation is incorrect:

- Transparent pixels should be affected by horizontal sprite mosaic
effects
- If the latched pixel does not have the sprite mosaic effect enabled,
the next pixel should always be latched
- Mosaic offset should not be reset to 0 at the start of a new
horizontal mosaic effect

Accounting for these cases improves visual accuracy of sprite mosaic
effects. This is easily visible in test cases such as
[sprite-hmosaic.gba](https://github.com/nba-emu/hw-test/tree/master/ppu/sprite-hmosaic),
and [Tonc's mosaic demo](https://www.coranac.com/projects/#tonc)
(mos_demo.gba, from tonc-bin.zip v1.4.2).
2024-02-11 11:08:41 +00:00
Luke Usher 2063393f20 sfc: fix SGB2 clocking issue
This fixes an issue where the SGB2 would reconfigure to SGB1 clock speeds when writing to the control port.
2024-02-06 00:15:49 +00:00
Giovanni Bajo 4c15ed753e
n64: fix PI DMA implementation to handle a newly discovered behavior (#1385)
I've lately discovered that misaligned PI DMA is also affected by RDRAM
writes that must cross RDRAM row boundaries (2048 bytes). It is obvious
in retrospect that the DMA implementation cannot generate a write burst
across different rows, so its internal buffering must be segmented on
RDRAM row boundaries.

The PI DMA testsuite has been updated to cover this edge case as well:
https://github.com/rasky/n64_pi_dma_test

Ares now passes the updated testsuite in full (timing aside, which is
close but not perfect).
2024-02-05 16:14:07 +00:00
Luke Usher 704fc91b9c desktop-ui: 'hide until ready' for Windows only 2024-02-01 18:58:50 +00:00
Luke Usher 757d74bac0 desktop-ui: hide window until startup completes
This also avoids calling inode::exists on every recent game at load time, reducing initial wait time.
2024-02-01 18:40:45 +00:00
Luke Usher ff36889d47 desktop-ui: exclude rumble inputs from poll timeout
Fixes rumble issues in many games, notably, OOT
2024-01-29 13:12:06 +00:00
Luke Usher 3d10cd34d6 ruby: differentiate devices in SDL2 driver 2024-01-28 21:00:36 +00:00
Luke Usher acaa1cabb5 ares: border and overscan overhaul
This updates most pre-32bit systems to have hardware accurate borders and
aspect ratio where known, reasonable estimates are used where not known.

This also means that PAL games will use the correct PAL aspect rather than
using the NTSC pixel aspect ratio.

All TMS9918 VDP based consoles are thought to be be correct, as are Master
System, Mega Drive, and NES, while SNES and PC-Engine are (educated)
estimates.

The overscan option has been reworked to crop all non-desirable edges of the
screen, including borders and areas that often contain garbage data, previously
this option only cropped the bottom 16 lines of active display.

The reworked overscan is not yet implemented for Atari 2600, PC-Engine, N64 or
PlayStation.
2024-01-28 15:38:47 +00:00
png183 e8f38d15f7
gba: reset prefetch buffer on ROM accesses from CPU (#1377)
According to NanoBoyAdvance author fleroviux, the prefetch buffer should
be reset on any ROM accesses from the CPU or DMA. This PR implements
this behaviour for CPU ROM accesses. This allows ares to pass 1760/2020
of the timing tests in the mGBA test suite (up from 1608/2020).

Allowing DMA ROM accesses to clear the prefetch buffer seems to worsen
timings at the moment, possibly due to some other timing issues that
also come into effect in these situations. I've left comments to make a
note of the issue, so that resetting the prefetch buffer on ROM accesses
from DMA can be implemented once it becomes beneficial to do so.
2024-01-27 11:47:44 +00:00
Luke Usher 527aaefef1 ruby: use wglSwapInterval rather than DwmFlush
Despite GFWL, and other sources recommending the DwmFlush approach, actual users are setting better results the old way.
2024-01-25 16:11:57 +00:00
Dragorn421 a938ef8aa8
Fixup *nix SDL info and makefile indentation (#1376)
The readme references `libsdl2-0.0` which does not exist:
https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=libsdl2-0.0&searchon=names

I'm not sure it's even useful mentioning `libsdl2-2.0-0` since
`libsdl2-dev` depends on it. Maybe for distributing ares you would then
know people have to install `libsdl2-2.0-0` I guess

Also added a note that SDL2 input allows using a controller on *nix as I
haven't seen that documented anywhere

And I fixed a random makefile indentation issue that messed with my
head.
2024-01-25 13:37:32 +00:00
Luke Usher 91658b989a ares: bump version to v135 2024-01-23 10:47:43 +00:00
Steveice10 801eaa4088
desktop-ui: Fix broken firmware path setting. (#1374)
* Fix the firmware search path not being saved or loaded from the
settings file.
* Fix `FirmwareSettings::findFirmware` not using the right casing when
locating the firmware directory.
2024-01-22 14:20:27 +00:00
Steveice10 d6b2ca53e2
nall: Account for macOS app bundles in program path. (#1373)
Contains three main changes:
* In `Path::program()`, account for the macOS app bundle, so that
portable config support works with the app bundle.
* Create a new function `Path::resources()` for the resources path,
since `Path::program()` can no longer trivially be used to construct the
bundle resources path (no guarantee what the .app is named). On macOS
this returns the path to "ares.app/Contents/Resources", on other
platforms (in case they use it in the future) it just returns the same
as `Path::program()`.
* Fix an issue where, if Ares is stored in a sub-directory of the
desktop, the path settings UI will display paths next to the program as
relative to the desktop instead of relative to the program directory.
2024-01-22 14:20:14 +00:00
png183 d823641ccc
gba: improve ROM to ROM DMA timings (#1372)
When performing a DMA with source and destination addresses both in
cartridge memory, the first write should use sequential access timings.
Implementing this in ares gives more accurate timings for ROM to ROM
DMAs than the previous approach, which instead removed the 2-cycle DMA
starting delay in these cases.
2024-01-22 14:19:45 +00:00
Giovanni Bajo dec675896d
n64: reenable isviewer even outside of homebrew mode (#1370)
ISViewer is currently gated by the homebrew mode flag. It seems like
this is not ideal for rom hackers because they would still need a way to
log but homebrew mode is too verbose for them and hide the ISViewer
messages in streams of actual problems in game code that they don't
intend to fix. So restore ISViewer functionality without homebrew mode.
2024-01-22 14:18:53 +00:00
Giovanni Bajo e2caf175d6
nall: make gdb server accept only one connection at a time. (#1369)
This closes the socket server after each successful connection so that
new connections are immediately refused. Before, given that the server
socket was always in listen mode, one additional connection could always
be estabilished at the TCP level, even though the server wouldn't accept
it right away.
2024-01-22 14:18:42 +00:00
Giovanni Bajo 322c99ca75
nall: correctly handle TCP peer disconnections in tcp-socket.cpp (#1365)
Currently, when a client disconnects, the server in Ares fails to notice
and to call the onDisconnect hook, which in turns cause the server to
stop responding (it won't accept a new client, and will never receive
more data from the disconnected one).

This commit fixes it by correctly handling the recv() return code to
detect peer disconnections (return value 0) and any other kind of error
(return value < 0).
2024-01-18 09:27:23 +00:00
png183 b28bb3dbd7
gba: improve save type detection for homebrew (#1367)
Commercial GBA games contain strings in the ROM that correspond to a
save type (e.g. SRAM, flash memory, EEPROM), followed by 3 digits. These
strings are used by ares to detect what save type to use. However, when
running [jsmolka's SRAM and flash memory save
tests](https://github.com/jsmolka/gba-tests/tree/master/save), ares does
not detect a save type, since the programs lack the 3 digits at the end
of the save type string. This PR ignores the trailing digits during save
type detection, since it's likely that many other homebrew programs are
affected by the same issue ([GBATEK even advises developers to not add
digits when including save type
strings](https://problemkaputt.de/gbatek-gba-cart-backup-ids.htm)).
2024-01-18 09:27:02 +00:00
Giovanni Bajo 3f4334e5ff
n64: implement undocumented accesses in FPU half-mode (#1364)
Fixes most of the remaining failures in n64-systemtest
2024-01-16 11:59:04 +00:00
png183 99a40e43ef
arm7tdmi: fix additional instructions that require offset when reading PC (#1363)
Depending on which cycle they read values from registers, instructions
will read a different PC value. This is handled in ares by adding an
offset to the program counter (r15) value in affected cases. This PR
applies the offset in a few instructions that are affected by this
behaviour, but were previously not covered.
2024-01-13 19:00:42 +00:00
png183 9bbe36d73c
arm7tdmi: Improved ldmia and stmia timings in Thumb mode (#1362)
ARM and Thumb mode variants of the ldmia and stmia instructions use a
shared pattern of sequential and nonsequential memory accesses. The
correct pattern was already implemented in ARM mode, and this PR applies
the same pattern to Thumb mode, making the timings of these instructions
more accurate.
2024-01-08 10:46:27 +00:00
Luke Usher 4bae7965f9 ps1: fix broken controller when sideloading ps-exe 2024-01-03 13:46:52 +00:00