Commit Graph

134 Commits (a2f98541b3d96285193098dfe2a71211bf297310)

Author SHA1 Message Date
Connor McLaughlin 1b618b8c46 SPU: Don't block ADPCM loop flag when setting/keying on in same slice
Fixes repeated sounds in Re-Loaded: The Hardcore Sequel.
6 years ago
Connor McLaughlin 98987643b3 SPU: Always reset address on loop end regardless of repeat
Fixes menu music in Madden NFL 99.
6 years ago
Connor McLaughlin 325f83065c SPU: Always inline SPU::ExecuteVoice 6 years ago
Connor McLaughlin 245edd94d7 SPU: Eliminiate conditional in interpolation 6 years ago
Connor McLaughlin 6a4a47fbdf SPU: Set block counter to zero on key on
Fixes clicking in Final Fantasy VIII intro FMV.
6 years ago
Connor McLaughlin 27697d0508 System: Implement CPU overclocking [SAVEVERSION+]
Partial credit to @CookiePLMonster as well.
6 years ago
Connor McLaughlin 13e3095801 Core: Don't link to imgui for libretro core 6 years ago
Connor McLaughlin 223074b78f SPU: Fix activating transfer event with a downcount of 0
Happened when loading states.
6 years ago
Connor McLaughlin b6f871d2b9
JIT optimizations and refactoring (#675)
* CPU/Recompiler: Use rel32 call where possible for no-args

* JitCodeBuffer: Support using preallocated buffer

* CPU/Recompiler/AArch64: Use bl instead of blr for short branches

* CPU/CodeCache: Allocate recompiler buffer in program space

This means we don't need 64-bit moves for every call out of the
recompiler.

* GTE: Don't store as u16 and load as u32

* CPU/Recompiler: Add methods to emit global load/stores

* GTE: Convert class to namespace

* CPU/Recompiler: Call GTE functions directly

* Settings: Turn into a global variable

* GPU: Replace local pointers with global

* InterruptController: Turn into a global pointer

* System: Replace local pointers with global

* Timers: Turn into a global instance

* DMA: Turn into a global instance

* SPU: Turn into a global instance

* CDROM: Turn into a global instance

* MDEC: Turn into a global instance

* Pad: Turn into a global instance

* SIO: Turn into a global instance

* CDROM: Move audio FIFO to the heap

* CPU/Recompiler: Drop ASMFunctions

No longer needed since we have code in the same 4GB window.

* CPUCodeCache: Turn class into namespace

* Bus: Local pointer -> global pointers

* CPU: Turn class into namespace

* Bus: Turn into namespace

* GTE: Store registers in CPU state struct

Allows relative addressing on ARM.

* CPU/Recompiler: Align code storage to page size

* CPU/Recompiler: Fix relative branches on A64

* HostInterface: Local references to global

* System: Turn into a namespace, move events out

* Add guard pages

* Android: Fix build
6 years ago
Connor McLaughlin f28ef01d24 CDROM: Move audio FIFO to CDROM class and skip sectors when unempty
Fixes cutscene audio in Nickelodeon Rugrats - Search for Reptar.
6 years ago
Connor McLaughlin a5fe740e30 Fix a bunch of compiler warnings 6 years ago
Connor McLaughlin 614ea632a5 SPU: Log warning when data is lost due to reg clear 6 years ago
Connor McLaughlin 531c3ad5fa AudioStream: Replace buffer queue with ring buffer
Should achieve a decent overall minimum latency reduction.
6 years ago
Connor McLaughlin 8eb3ac69b2 SPU: Update ADSR envelope when register changes
Fixes menu sounds in Final Fantasy 7 staying audible for too long.
6 years ago
Connor McLaughlin 1eecd50f3d SPU: Run SPU when changing regs on voice pending key-on
Fixes menu/cursor sounds with different frequencies in Final Fantasy 7.
6 years ago
Connor McLaughlin 03080351c8 SPU: Reset ADPCM decoder last samples on key on 6 years ago
Connor McLaughlin d461d7c87a SPU: Fix reverb write regression from e07d3c9d 6 years ago
Connor McLaughlin e07d3c9db2 SPU: Fix array bounds overflow in register reads 6 years ago
Connor McLaughlin 634880b5e3 SPU: Clamp before applying main volume not after
Fixes popping in Monkey Magic.
6 years ago
Connor McLaughlin 9959440a3a SPU: Align starting addresses to two words
Fixes interrupts firing early and occasional broken speech in Valkyrie
Profile.
6 years ago
Connor McLaughlin 226459b60f SPU: Add missing register read for ENDX 6 years ago
Connor McLaughlin a5ff904b33 SPU: Clear ENDX flag on key on 6 years ago
Connor McLaughlin be9033b6c0 SPU: Add missing clamp in ADPCM decoder 6 years ago
Connor McLaughlin b16ecd7a86 SPU: ENDX register should get set when looping as well as muting 6 years ago
Connor McLaughlin 8605620c24 SPU: Force all voices off when SPUCNT.15=0 7 years ago
Connor McLaughlin 191c3450cc SPU: Port reverb algorithm from Mednafen-PSX 7 years ago
Connor McLaughlin e34b78ab80 SPU: Fix pitch modulation 7 years ago
Connor McLaughlin 045c4d1745 SPU: Fix adsr_volume read for pending key-on voice
Fixes cutscene audio in Spyro 2, probably others.
7 years ago
Connor McLaughlin fc3efebb38 Revert "SPU: Use reverb formula from Mednafen-PSX"
This reverts commit 809b9f89ca.
7 years ago
Connor McLaughlin 809b9f89ca SPU: Use reverb formula from Mednafen-PSX 7 years ago
Connor McLaughlin 0006052728 SPU: Fix some registers not being saved to state 7 years ago
Connor McLaughlin 1d948a53e0 SPU: Reinitialize transfer event on loading state 7 years ago
Connor McLaughlin 423f04325f SPU: Implement timing for RAM reads/writes 7 years ago
Connor McLaughlin f23bcc0faa SPU: Ignore loop start flag when repeat address is explicitly set
Fixes dialog/softlock in Thousand Arms.
7 years ago
Connor McLaughlin 08ad5aad53 SPU: Run muted voices when IRQ is enabled
Fixes SPU timeout in Casper. We can still optimize for most games where
interrupts are not used by completely ignoring muted voices in those.
7 years ago
Connor McLaughlin 18cc3d5932 SPU: Stub out external volume registers
If nothing else, it'll avoid spamming the log.
7 years ago
Connor McLaughlin 7317c83a3c SPU: Implement internal volume sweep register reads
Fixes muted audio in Michelin Rally Masters.
7 years ago
Connor McLaughlin 4c2597acf3 SPU: Process key on/off at next 44100hz cycle
Some games, particularly CART World Series and Monkey Hero, depend on
this behaviour.
7 years ago
Connor McLaughlin 7ac48cd8d6 SPU: Swap read/write ready bits
Nocash might be incorrect here.
7 years ago
Connor McLaughlin 7a89c787b8 SPU: Fix some reverb registers not being saved to state 7 years ago
Connor McLaughlin d47a82d591 SPU: Implement noise functionality 7 years ago
Connor McLaughlin 0a6295a9b4 SPU: Implement volume sweep functionality 7 years ago
Connor McLaughlin b86e0bc846 SPU: Implement reverb
Possibly still not complete.
7 years ago
Connor McLaughlin 8e20d0d4ff SPU: Add audio dumping support 7 years ago
Connor McLaughlin 6a6aa72f3a SPU: Add a tick counter and delay between key on/off writes
Not yet tested on hardware. We believe that writing to a specific
voice's key on/off register within 2 samples/ticks of the first
write will result in the second write being ignored. This still
needs to be tested on hardware for confirmation.

Thanks to @PSI-Rockin for the idea.

Fixes sound effects in Monkey Hero.
7 years ago
Connor McLaughlin d42f155512 SPU: Use "ticks" instead of "sample" in variable names 7 years ago
Connor McLaughlin 90d6babfb0 SPU: Always run, not only when enabled 7 years ago
Connor McLaughlin 34ae0dae13 CDROM: Fix upper bound for XA audio frames and sync SPU 7 years ago
Connor McLaughlin 82eb14efb1 Core: Apply DPI scaling to debug windows 7 years ago
Connor McLaughlin 278aa86d14 SPU: Refactor ADSR/implement exponential mode 7 years ago
Connor McLaughlin 1b9609ef61 Implement event-based scheduler instead of lock-step components 7 years ago
Connor McLaughlin 71c1e243fe Remove YBaseLib dependency 7 years ago
Connor McLaughlin 5bb2b3ec63 Frontend: Add audio backend to settings (switch-while-running) 7 years ago
Connor McLaughlin f11d357ab9 Compile fixes for Android 7 years ago
Connor McLaughlin 2399c1dab7 SPU: Fix incorrect step value in attack phase 7 years ago
Connor McLaughlin e02ebb1b2a SPU: Mute voice without release phase on loop/end flag
Fixes channels getting stuck in Syphon Filter.
7 years ago
Connor McLaughlin 5b5d22fd27 SPU: Stub out transfer control register
Fixes sound in Ridge Racer.
7 years ago
Connor McLaughlin d9c27c4ee3 SPU: Fix sustain step being ignored 7 years ago
Connor McLaughlin 85413218cb SPU: Check upper 8 byte block of ADPCM block for interrupt
Fixes NFS2 stuck after selecting Race.
7 years ago
Connor McLaughlin 6f4cf7d5e3 System: Support changing BIOS path 7 years ago
Connor McLaughlin 99c264947d SPU: Implement capture buffers
Fixes Crash Team Racing and lipsyncing within.
7 years ago
Connor McLaughlin 26437e31dd SPU: Fire interrupt on DMA reads/writes too 7 years ago
Connor McLaughlin 8722757412 SPU: Implement pitch modulation 7 years ago
Connor McLaughlin 9f5bd6e5f9 SPU: Correct sample rate display in debugger 7 years ago
Connor McLaughlin 40eb157d77 SPU: Fix off-by-one-sampling-error causing noise in output 7 years ago
Connor McLaughlin 9b56499afa Refactoring settings/support changing GPU renderer at runtime 7 years ago
Connor McLaughlin 3db77a3139 SPU: Handle IRQ address register (fixes FF8 intro FMV) 7 years ago
Connor McLaughlin a76ec6fc19 Compile fixes for GCC 7 years ago
Connor McLaughlin 884378045d SPU: Add CD audio volume control 7 years ago
Connor McLaughlin 140d63c674 SPU: Add more details to debug window 7 years ago
Connor McLaughlin b5f7fa2652 SPU: Stub out noise mode register 7 years ago
Connor McLaughlin 33f1cf4fd4 SPU: Global volume control 7 years ago
Connor McLaughlin f3cd100b16 SPU: Float-less volume application 7 years ago
Connor McLaughlin aa792da823 CDROM: Implement XA-ADPCM decoding 7 years ago
Connor McLaughlin ec8c5d4bb6 DMA: Batch multi-word transfers together 7 years ago
Connor McLaughlin 0f68c8c5d3 Add debugging for GPU/Timers 7 years ago
Connor McLaughlin a55412c24a SPU: Hide debug window by default 7 years ago
Connor McLaughlin 25209c3d58 SPU: Clear fields on Reset 7 years ago
Connor McLaughlin d88da93a55 SPU: Save state support 7 years ago
Connor McLaughlin 51ea81eebf SPU: Don't store the undecoded ADPCM blocks 7 years ago
Connor McLaughlin a3446b8275 SPU: Implement ADSR 7 years ago
Connor McLaughlin 3912e0e8d6 SPU: More implementation work 7 years ago
Connor McLaughlin f852b8dd90 Further work on SPU implementation 7 years ago
Connor McLaughlin bddbab9d60 Rename to DuckStation 7 years ago