Commit Graph

205 Commits

Author SHA1 Message Date
Isaac Marovitz af043c55cd
CMake Refactors (#1979)
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
2025-06-24 16:33:12 +02:00
Flyinghead 2e5309bfa3 aica: don't batch samples
Batching 32 samples and arm runs causes audio glitches with some wince
games. So run aica 44100 times/sec instead.
Issue #1240
Issue #1605
2024-11-01 14:31:59 +01:00
Flyinghead 5393235c40 aica: skip remaining step functions when channel is disabled
CA is reset to 0 when channel is disabled due to AEG and this value must
not be changed.
Issue #472 and #1180
2024-09-07 14:55:45 +02:00
Flyinghead b468c9bdae aica: reset CA to 0 when disabling channel due to AEG
CA was reset to 0 for non-looping sound when ending, but not for looping
ones when they reach full attenuation. This confuses some games.
Disable the channel when it reaches full attenuation and reset CA to 0.
Revert a7702c622a
Issue #1602
Better fix for
Issues #472, #483, #1180, #1249, #1030 (partial)
2024-08-29 13:09:39 +02:00
Flyinghead 136ce267dc aica: apply 6dB attenuation after adding channels in mono
Less saturation with sega bass fishing challenge's default audio
settings.
Issue #1564
2024-07-06 14:03:48 +02:00
Flyinghead de6a43bd21 savestate: drop support for legacy libretro and <v16 savestates 2024-04-16 09:40:55 +02:00
Flyinghead eaa22a49d1 msvc build fix 2024-04-06 19:07:27 +02:00
Flyinghead 4f87a3556e Fix vmu beep frequency 2024-04-06 17:43:19 +02:00
Flyinghead c001240797 move audio drivers to their own folder 2024-01-10 11:45:54 +01:00
scribam 6aa59c54a5
Minor misc changes (#1360)
* core: cleanup include headers
* dx11: remove unimplemented function
* core: annotate destructors with override
* aica: use range-based for loop
* bm: use const reference/structured bindings with blkmap
2024-01-02 14:38:16 +01:00
Flyinghead a7702c622a aica: don't disable channel when reaching full attenuation
Some games rely on the channel still being processed and CA/LP being
updated. Courtesy of @kihato
Issues #472, #483, #1180, #1249, #1030 (partial)
2023-12-31 12:02:42 +01:00
Flyinghead d7c28a4805 aica: recommpile dsp when loading a state
Fixes bad noise when loading a menu state on tetris from in game.
2023-12-03 20:51:09 +01:00
Flyinghead 41723a831f use static init when possible. use unnamed bit-fields. refactor vmuBeep
no functional changes
2023-11-11 18:54:10 +01:00
Flyinghead 926877397c Merge remote-tracking branch 'origin/master' into dev 2023-11-07 16:32:12 +01:00
Flyinghead bafe07de85 aica: better sounding LPF
Use 4 bits of exponent instead of 5 for the cut off frequency
Force sample to 0 if cut off freq is 0
Improve BIOS menu sounds
Issue #108
2023-11-02 18:33:14 +01:00
Flyinghead 51089c5e0a aica: always avoid race condition when sh4 interrupt is raised
... even if an SH4 interrupt is already asserted.
Regression introduced by c7d214e55a
Fixes audio freeze in Test Drive Le Mans
Issue #1267
2023-10-30 17:47:19 +01:00
Flyinghead 93e47dd410 aica: don't change LEA for non-looping sounds
Non-looping sounds with LSA=0 and LEA=0 shouldn't be played at all.
Regression introduced by dac5b991e0.
Fixes white noise in Sonic Adventure Emerald Coast action stage.
Issue #1264
2023-10-27 14:52:07 +02:00
Flyinghead dac5b991e0 aica: ignore LEA if <= LSA
Fixes Legacy of Kain Ash Village music
Issue #1104
2023-10-22 10:12:30 +02:00
Flyinghead 60f3d718ac arm64 rec: fix crash with some naomi games (regression)
Fixes crash with doa2a and doa2m and some atomiswave conversions.
Regression due to b47f4f56ef
Fixes MINIDUMP-1TY, MINIDUMP-1TD, MINIDUMP-16Q, MINIDUMP-1AC
2023-10-01 19:31:18 +02:00
scribam 56b082def7 uwp: add support for arm 2023-08-02 09:32:55 +02:00
scribam 40953b17c4 uwp: add support for arm64 2023-07-30 18:03:32 +02:00
scribam 1b565f9879 clang-tidy: run modernize-concat-nested-namespaces 2023-07-22 19:04:52 +02:00
scribam daf8230cca deps: update vixl 2023-07-03 11:37:42 +02:00
Flyinghead b47f4f56ef user-defined literals: _KB, _MB, _GB 2023-07-01 14:31:25 +02:00
Flyinghead aad4921e09 picotcp: fix kos ppp nego. modem,bba: fix kos detection
picotcp: ignore conf ack received when lcp layer is up (kos ppp)
picotcp: ignore icmp ping seq and id #
scheduler: add void * arg to callback function. Get rid of static instances when possible
bba: use scheduler to delay link changes (fixes kos bba detection)
modem: fix soft reset. don't reset TDBE during reset (fixes kos modem detection)
2023-06-23 11:40:22 +02:00
Flyinghead 4391058563 aica: dma cycles schedule tweak
Increase lower limit to schedule dma callback from 224 to 513
Fixes freeze/crash in Nomad Soul
Issue #1080
2023-05-25 13:02:14 +02:00
Flyinghead 83bfa9158d aica: don't crash if AFSEL=1
Fixes MINIDUMP-XW
2023-05-14 16:22:10 +02:00
Flyinghead 7108358ebd Merge remote-tracking branch 'origin/master' into dev 2023-03-30 17:31:22 +02:00
Flyinghead 79be464326 aica: proper write mask on aica dma address registers
Fixes MINIDUMP-P3
2023-03-28 21:05:18 +02:00
Flyinghead 5c5c872afc aica: small dma transfer must be correctly scheduled
Previously transfer taking less than 4096 cycles would be instantly
executed.
Fixes Sports Jam announcer broken audio.
Issue #980
2023-03-21 11:32:21 +01:00
Flyinghead 885a0508c0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/aica/sgc_if.cpp
#	core/hw/naomi/naomi.cpp
#	core/hw/sh4/dyna/driver.cpp
2023-02-28 20:02:23 +01:00
namtsui a1472fb190
OpenBSD 7.2 patches (#953)
* OpenBSD: BSS is immutable so mark it as mutable so that mprotect RWX works

see: mimmutable(1)
bc009f82ea

* OpenBSD does not have mcontext_t

<signal.h> provides `typedef struct sigcontext ucontext_t;'.
take register names from <machine/signal.h>, which provides struct
sigcontext.

see:
1a13d3ae4e

* OpenBSD uses major.minor for shared libs, so properly dlopen libGL.so

* OpenBSD remove redefinition of swap16

* OpenBSD: SDL2 controller detection

Use sdl_open_joystick() to open controllers on startup instead of
SDL_JOYDEVICEADDED event, which never gets detected.

* OpenBSD does not have mcontext_t but linux does
2023-02-28 18:22:45 +01:00
Flyinghead 8d54382b10 aica: apply RAM mask to sample address (SA)
Fixes MINIDUMP-B9
2023-02-24 21:24:56 +01:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
Flyinghead 099a758c94 hw: new hardware register implementation
used for sh4 mm registers and holly
ignore incorrect size reads and writes
separate data and read/write handlers
2023-02-10 12:51:36 +01:00
Flyinghead debe21de7b Merge remote-tracking branch 'origin/master' into dev 2023-02-05 22:20:28 +01:00
Flyinghead d1ab3461a6 savestates: dropping support for old formats
savestates older than 3 years aren't supported anymore
2023-01-31 17:57:54 +01:00
Flyinghead 04c418d02a serialize: move code out of serialize.cpp and into modules 2023-01-31 10:13:03 +01:00
Flyinghead 27ea6ca092 aica: rename mem and reg accessors 2023-01-30 13:21:43 +01:00
Flyinghead 53dab29ddb iOS and Switch build fixes 2023-01-30 11:10:14 +01:00
Flyinghead b1479e6e34 aica: use namespaces, simplify api, handle serialization
Rename VArray2 to RamRegion. Add alloc(), free(), setRegion() and
de/serialize()
2023-01-30 10:40:07 +01:00
Flyinghead 143073b61d rename _vmem to addrspace and move platform vmem stuff to virtmem ns
use namespaces
simplify names
no functional changes
2023-01-29 18:48:33 +01:00
Flyinghead 0a27b63584 aica: remove useless verify on reg access sizes
Fixes MINIDUMP-6C
2023-01-28 18:22:39 +01:00
Flyinghead 99d5266aa0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/holly/sb_mem.cpp
#	core/hw/naomi/naomi.cpp
#	core/hw/naomi/naomi_flashrom.cpp
#	core/hw/pvr/ta_ctx.h
#	core/rend/gui.cpp
2023-01-27 15:41:45 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
Flyinghead 31debefbe1 release dynarec mem allocs when terminating, including arm and dsp
Issue #453
2023-01-24 09:21:46 +01:00
Flyinghead c7d214e55a aica: update pending ints when enable mask is changed
Updating interrupts masks SCIEB and MCIEB can enable new interrupts so
check for that.
Only avoid race condition when needed.
2023-01-23 20:04:18 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead a6bf9dd39c Option to disable VMU sounds. VMU sounds use better waveform. 2023-01-21 11:54:34 +01:00