Commit graph

130 commits

Author SHA1 Message Date
Connor McLaughlin 50a25b63b1 CDROM: Track seek position when resetting
Fixes Blasto hanging after starting game.
2020-07-11 20:35:36 +10:00
Connor McLaughlin c5e8327e7a CDROM: Seek to LBA 0 when resetting
Fixes Love & Destroy.
2020-07-10 20:55:15 +10:00
Connor McLaughlin 71157b171e CDROM: Use partial seek position when re-seeking 2020-07-10 20:55:00 +10:00
Connor McLaughlin 0710e3b6d3 CDROM: Ignore sectors with channel number=255
Some games (Taxi 2 and Blues Blues) have junk audio sectors with a channel number of 255.
We need to skip them otherwise it ends up playing the incorrect file.

TODO: Verify with a hardware test.
2020-07-02 00:50:53 +10:00
Connor McLaughlin 737337a526 CDROM: Fix incorrect sector read after incomplete seek->read
Fixes crash in Disney's The Lion King - Simba's Mighty Adventure.
2020-06-26 17:15:41 +10:00
Connor McLaughlin 840a80670f CDROM: Reset XA resampler on file switch
Pure guess work, probably won't affect anything.
2020-06-22 15:58:22 +10:00
Connor McLaughlin dcfb929de5 CDROM: Fix double-reads hitting incorrect sector again
Fixes Bedlem / Rise 2 without breaking Vigilante 8 - 2nd Offense.
2020-06-02 00:59:13 +10:00
Connor McLaughlin 5e7fd5aa71 CDROM: Fix integer overflow in seek timing calculation 2020-06-01 22:20:26 +10:00
Connor McLaughlin 1947080d91 CDROM: GetlocL should return an error while seeking
Or more specifically, the coarse seek part. Verified with hardware
tests.
2020-06-01 21:40:28 +10:00
Connor McLaughlin f856a8ad65 CDROM: Ignore pending setloc after read/play
Fixes games which send a second Setloc after reading, e.g. Army Men -
Sarge's Heroes.
2020-05-31 17:03:15 +10:00
Connor McLaughlin 2d067bb101 CDROM: Fix warning log spam on command 2020-05-31 02:41:42 +10:00
Connor McLaughlin 0672cf4873 CDROM: Implement a heuristic for command cancelling
See note in source. Fixes loading times and slowed down audio in Voice
Idol Collection - Pool Bar Story.
2020-05-30 22:04:15 +10:00
Connor McLaughlin a4f79de7f6 CDROM: Return error for incorrect parameter count 2020-05-30 21:59:03 +10:00
Connor McLaughlin 07e8ab4446 CDROM: Increase seek delay by one sector
Fixes Resident Evil 2.
2020-05-30 02:19:01 +10:00
Connor McLaughlin 4e8da3cb41 CDROM: Replace sound map assert with error log
I am not aware of any games which use it yet, so have no way of testing
if the implementation is correct.
2020-05-28 03:07:33 +10:00
Connor McLaughlin 2dd7f48d97 CDROM: Don't skip pregap for CDDA
Fixes music looping in Treasure Gear.
2020-05-28 02:42:18 +10:00
Connor McLaughlin 2264849151 CDROM: Update position when double-seeking
Doesn't fix anything I'm aware of, but makes sense.
2020-05-28 02:41:53 +10:00
Connor McLaughlin 1494f2bc75 CDROM: Set m_current_lba to the sector being read
Fixes double-read commands returning incorrect sectors.

Fixes Vigilante 8 - 2nd Offense.
2020-05-24 13:28:12 +10:00
Connor McLaughlin 3c7229dfe2 CDROM: Add 3 sectors read time to seek time
Simulates the drive's inprecise coarse seek then reading subq to get to
the exact sector.

Fixes Waku Waku Derby.
2020-05-20 23:52:35 +10:00
Connor McLaughlin d41bf86eaa CDROM: Don't apply logical seek rules to subq-based seeks
Fixes Panekit - Infinitive Crafting Toy Case.
2020-05-20 19:30:46 +10:00
Connor McLaughlin 340640821e CDROM: Add delay when swapping discs
Fixes broken disc swap detection in Metal Gear Solid.
2020-05-20 02:26:07 +10:00
Connor McLaughlin 415880fc40 CDROM: Don't restart play/read when current == target
Fixes CDDA locking up Buster Bros. Collection.
2020-05-20 02:05:19 +10:00
Connor McLaughlin 5d46556b7d CDROM: Update position while seeking for GetlocP
Fixes track selection in WipEout.
2020-05-20 01:52:54 +10:00
Connor McLaughlin 214e852a54 CDROM: Add time to read sector to seek time
Fixes Yuukyuu Gensoukyoku Ensemble 1.
2020-05-16 01:01:31 +10:00
Connor McLaughlin 110aa8bd93 CDROM: Reset read sector buffer on INT1
Fixes GetlocL -> DMA out returning incorrect data.

Fixes FoxKids.com - Micro Maniacs Racing.
2020-05-16 00:33:03 +10:00
Connor McLaughlin e1157bff65 CDROM: Don't delay CDDA report, only skip index 0
Fixes music in Advanced V.G.
2020-05-16 00:27:09 +10:00
Connor McLaughlin 777809b3b0 CDROM: Fix XA filter change not applying immediately
Fixes audio getting cut off in PaRappa the Rapper - The Hip Hop Hero,
underwater music in R-Type Delta.
2020-05-13 00:14:20 +10:00
Connor McLaughlin d6f6154380 CDROM: Read last delivered sector when pausing and reading without seek
Fixes Adidas Pro Soccer, Bedlem, Rise 2.
2020-05-13 00:13:57 +10:00
Connor McLaughlin d866bd9cb8 CDROM: Reset XA resampler state on read
Should get rid of pops when switching files.
2020-05-12 12:36:10 +10:00
Connor McLaughlin 37d9f6344d CDROM: Ignore Read/Play command without setloc/param
Fixes title screen music in Monkey Magic.
2020-05-11 22:55:14 +10:00
Connor McLaughlin 684e83168e CDROM: Prevent successful seeking to the lead-out area of the disc 2020-05-08 15:41:45 +10:00
Connor McLaughlin 5b389ae13d CDROM: Synthesize lead-out area and stop reading when reached 2020-05-08 10:51:49 +10:00
Connor McLaughlin dc487655df CDROM: More timing refinements 2020-04-30 01:36:07 +10:00
Connor McLaughlin 2d92e0a819 CDROM: Reduce ACK timing 2020-04-30 00:12:39 +10:00
Connor McLaughlin 72f6503bec CDROM: Reduce speed change delay 2020-04-25 14:16:36 +10:00
Connor McLaughlin a4416d8cf5 CDROM: Add seek time when starting reading/playing without setloc 2020-04-25 14:16:20 +10:00
Connor McLaughlin f1d1129e05 CDROM: Don't assert if SetMode.bit4 is set 2020-04-19 22:31:22 +10:00
Connor McLaughlin a4a112f5d8 CDROM: Deliver invalid sub-q (libcrypted) sectors to CPU
Nocash documentation would suggest that it only needs the sector to be
skipped by GetLocP. Which would make sense as the non-subchannel data is
still completely valid.
2020-04-11 02:44:43 +10:00
Connor McLaughlin 05e4e7d262 CDROM: Add timing for speed changes/adjust seek timing
This makes the BIOS take longer to load the executable off the disc,
giving the sound effects longer to fade out and reducing the overlap
with the game.
2020-04-11 00:40:44 +10:00
Connor McLaughlin 08567fedf4 CDROM: Fix crash when loading save state from different system 2020-04-08 13:08:27 +10:00
Connor McLaughlin 0c1547d9e3 CDROM: Don't use valid bit for last subq, read on reset
Fixes GetlocP failing after resetting the system, causing some FMVs to
break/games to get wedged.
2020-04-06 00:25:56 +10:00
Connor McLaughlin b7cdaaf36a CDROM: Defer setting reading/playing bit until sector is read
Fixes softlock in Chicken Run.
2020-04-06 00:25:49 +10:00
Connor McLaughlin 45d7294c3c CDROM: Limit XA playback to first-identified file/channel
Fixes background music in initial menu of Tomb Raider III.
2020-04-05 01:39:43 +10:00
Connor McLaughlin 15c33ebedb CDROM: Add "Enable Region Check" option 2020-04-01 01:48:37 +10:00
Connor McLaughlin e36e70a266 CDROM: Drop sector buffer not read back to dev log level
This happens a lot in games and it's perfectly fine, but sometimes it
can mean the game is wedged and not receiving data.
2020-03-31 22:29:03 +10:00
Connor McLaughlin f6711cbafa CDROM: Pausing while seeking should be an error response
Confirmed by hardware test.
2020-03-31 22:28:55 +10:00
Connor McLaughlin 00c24c2501 CDROM: Adjust ACK timings to be closer to hardware test results
Fixes Shrek Treasure Hunt.
2020-03-31 22:28:48 +10:00
Connor McLaughlin 3f042cd477 CDROM: Fix play command with parameter forever seeking
Fixes audio playback when selecting track in BIOS CD player.
2020-03-30 00:13:46 +10:00
Connor McLaughlin 3a31282fe6 CDROM: GetTN should return first_track, last_track
Fixes CDDA playback in Street Sk8er, Jellyfish - The Healing Friend,
probably others.
2020-03-30 00:13:42 +10:00
Connor McLaughlin 02f67a801e CDROM: Fix behavior of stat bit 5 according to hardware tests 2020-03-29 17:52:37 +10:00