313 Commits

Author SHA1 Message Date
Stenzek
b832dfbb3a
CDROM: Zero out seek start/end after read 2024-12-14 13:47:20 +10:00
Stenzek
c25c0067af
CDROM: Handle repeated SeekL to same target
Fixes more lockups in Resident Evil 3.
2024-12-14 13:36:20 +10:00
Stenzek
6756c96fa2
CDROM: Improve SeekL -> ReadN timing
See comments - Mech stops at target Data - 2, or SubQ target.
2024-12-02 17:24:16 +10:00
Stenzek
0faa9cf650
Build: Add Devel configuration
Gets you debug assertions and logging, while still producing an
optimized executable.
2024-12-01 23:21:33 +10:00
Stenzek
b87c6dde6c
CDROM: More logging tidy-up 2024-12-01 18:15:42 +10:00
Stenzek
0076af6974
SPU: Zero out upper ADPCM filters
Also in CD-ROM.
2024-11-25 01:33:11 +10:00
Stenzek
40a1bee9ea
CDROM: Fix incorrect clmap in XA-ADPCM decoding
Fixes crunchy audio in GT2: A-Spec.
2024-11-25 01:05:10 +10:00
Stenzek
378fd80e3d
CDROM: Defer subq read until needed
Should help with hitches on real disc reads until I refactor
in a proper sector cache...
2024-11-20 14:24:48 +10:00
Stenzek
5219e4f987
CDROM: Simulate real pause timing 2024-11-12 16:03:36 +10:00
Stenzek
a2af51b856
CDROM: Simulate backwards track jump after seek/pause 2024-11-12 16:03:36 +10:00
Stenzek
5f607d8c7a
CDROM: Avoid double seek on repeated Setloc+ReadS 2024-11-12 16:03:36 +10:00
Stenzek
97938a8b8c
CDROM: Improve command logging clarity 2024-11-12 16:03:36 +10:00
Stenzek
5cf2c86874
CDROM: More accurate approximation of sectors per track 2024-11-12 16:03:35 +10:00
Stenzek
080807e557
CDROM: Move subchannel replacement from CDImage
This will allow you to use SBI/LSD files with real discs, if your
drive does not support reading subchannels, or has an incorrect
skew.
2024-10-25 15:35:12 +10:00
Stenzek
86a28d5dc0
ImGuiOverlays: Move debug state to auxiliary windows 2024-10-18 20:48:30 +10:00
Stenzek
0c2ab82252
System: Fix no-disc startup in later versions 2024-10-11 16:54:46 +10:00
Stenzek
6dc4fa5c75
CDROM: Physical => SubQ in variables
Better describes what it actually is.
2024-09-29 18:01:44 +10:00
Stenzek
060146a37a
CDROM: Add SubQ Skew option
Fixes corrupted boss sprites in Captain Commando.

One day I'll refactor things to fix this properly.
2024-09-29 17:11:52 +10:00
Stenzek
58dc24cb0d
CDROM: Pack state in struct
Ensures locality, as with other subsystems.
2024-09-26 17:49:35 +10:00
Stenzek
0e4ca9cd93
CDROM: Fix CDDA playback in some obscure edge cases
e.g. Roswell Conspiracies
2024-09-26 14:05:34 +10:00
Stenzek
114effd9a1
CDROM: Simulate backwards 1T jump on short seeks
Fixes hangs in LMA Manager, Nightmare Creatures PAL with Interpreter.
2024-09-25 01:37:07 +10:00
Stenzek
e1c876671a
Misc: More iNN => sNN 2024-09-22 21:06:05 +10:00
Stenzek
3dca598063
Log: Switch to enum class
Need to change the channel to a bitset too.. the string lookups are
horribly slow, and conflict when one is a prefix of another.
2024-09-21 22:26:06 +10:00
Stenzek
47a3cd44f3
CDROM: Support reading MODE1 sectors 2024-09-07 16:05:53 +10:00
Stenzek
6d0f92d4fb
dep/fmt: Bump to v11.0.2 2024-09-03 17:54:43 +10:00
Stenzek
7f4e5d55db
Misc: Update copyright headers 2024-09-01 22:08:31 +10:00
Stenzek
2c27b20090
ImGuiManager: Remove unused function 2024-08-26 18:53:30 +10:00
Stenzek
46a6681159
CDROM: Fix incorrect clamp with seek speedup
And bump the minimum time up around 0.29ms or so, hopefully improve
stability in FF7.
2024-08-26 16:45:23 +10:00
Stenzek
86d4d92753
TimingEvents: Switch to 64-bit counters 2024-08-13 23:52:25 +10:00
Stenzek
304f69e350
CDROM: Fix rare interrupt race when cancelling commands
Fixes hang during loading in Street Fighter Alpha 3.
2024-08-19 15:11:37 +10:00
Stenzek
55d095174f
CDROM: Defer init completion until after seek
Reduces leaky reverb in some games.
2024-08-10 00:13:59 +10:00
Stenzek
d1f0669374
SPU: Ensure all samples are generated prior to DMA write 2024-08-09 12:36:24 +10:00
Stenzek
c97516b01d
CDROM: Further improve seek timing
Fixes background music in World Cup 98, background noise in Idol
Promotion - Yumie Island, probably others.
2024-08-09 12:36:24 +10:00
Stenzek
0517aef5bd
CDROM: Don't allow deferred INT1 after Pause ACK 2024-08-06 13:34:11 +10:00
Stenzek
f9079b0151
CDROM: Display XA coding info in debug window 2024-08-04 16:30:04 +10:00
Stenzek
ee538ae0ea
CDROM: Improve resampling quality of 18900hz XA 2024-08-04 16:21:35 +10:00
Stenzek
a2f98541b3
Misc: Slim down some header includes 2024-08-04 14:49:55 +10:00
Stenzek
c2d24f436c
CDROM: Re-enable error-on-seeking-pause behaviour
See the comments in the diff. This **will** cause lag in Final Fantasy
VII during preload areas, but that has also been confirmed on console.

Duke Nukem - Total Meltdown does this silly Read -> Pause command chain,
except it sets its data/INT1 callback on the read, but never clears it
after the pause. Therefore, if it doesn't receive at least one sector,
the callback never gets cleared, and when the next read happens, it
stores the "current" callback in the "backup" variable, which should be
null, but now has the callback from the dud read.

The result is any INT1 during XA playback running the dud callback,
which says "hey, I'm not expecting any data, so pause, and stops the
background music playback. Making sure at least one sector from that
silly chain is delivered ensures the callback is cleared, and this does
not happen.

Since the pause first mentioned above will now error out until the first
sector is delievered, the game spams pause until it eventually does
succeed after the INT1. This behaviour has also been verified on
hardware, thanks to rama for the xStation logs.
2024-07-27 14:24:23 +10:00
Stenzek
68575d15a4
CDROM: Shift instead of divide in ZigZagInterpolate 2024-07-23 22:10:04 +10:00
Stenzek
5ec9c8a397
CDROM: Fix handling of 8-bit ADPCM and decoder overruns
Fixes pops in menu music in Simple 1500 Series Vol. 92 - The Tozan
RPG - Ginrei no Hasha.

I haven't seen anything that _properly_ uses 8-bit ADPCM yet. The above
game does, but only in the inaudible portion of the start of the track.
2024-07-23 21:54:22 +10:00
Stenzek
52f9e8556a
CDROM: Deactivate command attempt before queueing another
Reduces chances of ending up with unordered events.
2024-07-20 22:35:32 +10:00
Stenzek
4f7ddfaae6
TimingEvents: Remove pointer indirection
Probably should move this to one big array for locality.
2024-07-19 22:56:41 +10:00
Stenzek
6a920b268e
CDROM: Handle BFRD clears inbetween DMA transfers
Fixes disc detection in Metal Gear Solid: Special Missions.
2024-07-19 15:51:25 +10:00
Stenzek
92038da3d5
CDROM: Handle speed change while reading
Fixes level music in Croc 2 demo.
2024-07-18 00:31:19 +10:00
Stenzek
f1ca914512
CDROM: Further adjust IRQ delay
Fixes audio dropouts in Crime Crackers, Ogre Battle seems fine now as
well.
2024-07-17 20:57:36 +10:00
Stenzek
9392c19a70
CDROM: Handle audio sectors in 2X mode
Fixes menu background in 360 Three Sixty.
2024-07-17 20:57:35 +10:00
Stenzek
44b9d16d9f
CDROM: Defer set of autopause track
Pitball's menu music starts mid-second, and there's no pregap,
so the first couple of reports are for the previous track.

It doesn't enable autopause until receiving a couple, and it's
actually playing the track it wants.
2024-07-17 20:57:35 +10:00
Stenzek
fb747d6ded
CDROM: Drop setloc on double Play
And limit the locations position is updated while seeking.

Fixes menu music in Hot Wheels: Extreme Racing.
2024-07-17 20:57:35 +10:00
Stenzek
0968610ba7
CDROM: Use GSVector 2024-07-03 00:24:12 +10:00
Stenzek
8124fb2ef5
CDROM: Fix incorrect sector dropped log message 2024-06-13 18:35:02 +10:00