Commit graph

34 commits

Author SHA1 Message Date
Sour
929d4dcc20 GB: Fixed APU emulation issues
-Super Mario Land 2 - Pops in menu are fixed by immediately updating APU output after a write
-Perfect Dark - Low voice volume is fixed by having the correct output when the channels are disabled (but DAC is still enabled)
-Daiku no Gen - Low voice volume is fixed by keeping square channel output to digital 0 (= analog 1) until its first tick after being enabled (the game does not let the channel tick at all while the voice sample is playing)
2025-03-21 23:03:01 +09:00
Sour
6334ef2a6a Debugger: GBC - Fixed crashes when memory viewer was opened and addresses FF76/FF77 were visible
This was causing the APU to run inside the UI thread, causing memory corruption/crashes
2025-03-11 17:50:19 +09:00
Sour
13acb3fe42 Added GBA support 2024-03-30 11:42:31 +09:00
Sour
cd7e277088 GB: Refactor apu envelope code to reduce duplicated code 2024-02-01 22:53:08 +09:00
Sour
e7ac876694 GB: APU - Improved zombie mode glitch behavior
Fixes channel_1_nrx2_glitch, channel_1_restart_nrx2_glitch and channel_1_volume (+ the ch2 equivalents)
2024-02-01 22:53:08 +09:00
Sour
7a83827f6f GB: APU - Improved square 1 sweep behavior
Passes channel_1_sweep test
2024-01-31 23:25:38 +09:00
Sour
dbae841079 GB: Implemented DAC fade in/out behavior
Fixes sound issues in 3D Pocket Pool, Ready 2 Rumble Boxing and Cannon Fodder
2024-01-28 20:47:08 +09:00
Sour
a16a4e27be GB: Fixed noise channel zombie mode 2023-05-19 00:12:11 -04:00
Sour
1ddf93480a GB: Set wave ram to random values on power on
Fixes missing wave channel audio in R-Type (on GB)
2023-04-13 21:39:46 -04:00
Sour
190fb48b5f GB: Fixed missing values in APU save state
Caused some audio issues when loading a state in some scenarios
2023-04-12 21:05:14 -04:00
Sour
b41e270a4c GB: Fixed APU channel output changes being associated with the wrong timestamp
Caused issues with the audio in Pokemon (and probably other games?)
2023-04-10 00:33:15 -04:00
Sour
ee287e9cad GB: Fixed/improved APU mixing/DAC logic
Fixes missing sound effects/voices in Warlocked and Alone in the Dark
2023-04-08 17:18:25 -04:00
Sour
7c51e23d25 GB: Fixed envelopes being clocked when period is 0
Based on Megaman 2 and Taiyou no Yuusha the envelopes shouldn't be ticking when period is set to 0 (otherwise the sound in these games breaks - especially the noise channel)
This seems to contradict old documentation that says a period of 0 is treated as a period of 8, but test roms don't seem to validate either behavior and this fixes the audio for both games.
2023-04-05 20:49:02 -04:00
Sour
9e2ef3c2a1 GB: Improved noise channel initial timer after being triggered
Fixes SameSuite's channel_4_delay, channel_4_equivalent_frequencies, channel_4_frequency_alignment tests
2023-03-11 01:14:17 -05:00
Sour
0881814157 GB: Length counter hitting 0 on square channel should also update output
Fixes channel_1_stop_div, channel_2_stop_div
2023-03-10 22:37:11 -05:00
Sour
ff4561f1aa GB: Wave channel output should update when length counter hits 0
Fixes channel_3_stop_div test
2023-03-10 21:25:06 -05:00
Sour
8fef338355 GB: Wave channel output updates immediately when stopped via NR30
Fixes channel_3_stop_delay test
2023-03-10 21:13:57 -05:00
Sour
52220c8a1e GB: Wave channel output should update when writing to NR32
Fixes channel_3_shift_delay test
2023-03-10 21:06:14 -05:00
Sour
965a2088e0 GB: Stop clocking channels when disabled (fixes square_1_volume_div)
+ Align square/noise channels to 1mhz clock (which allows the channel_1_align, etc. tests to work even if the channels aren't clocked while disabled)
2023-03-10 01:04:51 -05:00
Sour
af2cdb86ca GB: Noise envelope period should be 8 when period is set to 0 2023-03-10 00:24:49 -05:00
Sour
52f8a4a5f7 GB: Fixed typo/bug in square envelope clock code
Fixes channel_2_volume_div
2023-03-10 00:23:56 -05:00
Sour
8ba69a77ec GB: Noise - Update channel output when envelope is clocked
Fixes channel_4_volume_div
2023-03-10 00:19:08 -05:00
Sour
b954db45b7 GB: APU improvements (passes div_* tests) 2023-03-09 22:10:20 -05:00
Sour
629dfca2fc GB: Apply similar tweaks to noise/wave channels
Passes more of SameSuite's tests
2023-03-08 21:56:27 -05:00
Sour
7419abdaa5 GB: Fixed inverted wave/noise channel outputs in CGB register 2023-03-08 20:32:36 -05:00
Sour
a13b07b49c GB: Square channel improvements
Fixes some of the SameSuite square tests (unsure if the code is correct or not)
2023-03-08 20:25:53 -05:00
Sour
35bcc56e7d GB: APU - Improved CGB behavior, fixes blargg's CGB tests 2023-02-27 23:08:15 -05:00
Sour
55f05abac7 GB: APU - Implemented wave ram corruption bug 2023-02-27 22:11:18 -05:00
Sour
1fbcba999e GB: Improve square channel sweep behavior
Fixes based on alyosha's work on GBHawk
Passes "sweep details" test
2023-02-27 20:46:35 -05:00
Sour
b4618eb47a GB: Allow loading GB/GBC/SGB save states on any of the 3 models 2023-01-30 19:50:05 -05:00
Sour
fc171c50e1 Debugger: GB - Fixed CPU crashes caused by dummy cpu 2023-01-28 20:44:38 -05:00
Sour
6a0eef7e05 GB: Sweep - Improved behavior (e.g when shift value is set to 0, etc.)
Fixes "04-sweep" test
2023-01-28 11:44:28 -05:00
Sour
4782aade65 GB: Implemented wave channel ram read/write constraints while channel is enabled
Fixes "09-wave read while on" and "12-wave write while on" APU tests
2023-01-28 10:20:35 -05:00
Sour
c90181c1a2 Refactoring - Moved some GB/PCE files into subfolders 2022-09-08 22:23:30 -04:00