mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-03 21:29:27 +00:00
[Request] Please add multisession information to comments, for MS discs. #412
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sadikyo on GitHub (Mar 3, 2022).
Originally assigned to: @mnadareski on GitHub.
Is your feature request related to a problem? Please describe.
When multisession discs are submitted, mods need to inspect the logs manually to determine and share the sessions for multisession in the comments.
Describe the solution you'd like
If MPF could calculate and automatically store this information in the comments, this would be very helpful.
Describe alternatives you've considered
Mods continuing to do this manually.
Additional context
Here is an example:
http://redump.org/disc/90453/
You can see the two sessions recorded in the comments under the Multisession heading.
Essentially, the two tracks are stored in the TOC info of _disc.txt, but a calculation has to be done.
For the first session, 11400 is subtracted from the end of the first track, to determine the sectors for session one. In this example, it shows 13836 sectors, so by subtracting 11400, you get 2436. Therefore, Session 1: 0-2435
Session 2 should be as shown in the TOC in disc.txt. Session 2: 13836 - 15099.
In this example, you can confirm this by the number of sectors shown in each track on the redump page. Essentially, there is a 11,400 sector "gap" that DIC stores as part of the first track, that should be parsed out here.
If there is any way for this to be done at the MPF level automatically with dumps, this would save a lot of post-work for mods.
Please reach out with any questions!
@mnadareski commented on GitHub (Mar 3, 2022):
As noted elsewhere, the work for this will be split into 2 parts:
@sadikyo commented on GitHub (Mar 3, 2022):
Some additional info:
Planet DC Cheats Band 3_disc.txt
Here is an example of a _disc.txt file for a simple case with only one track in each session.
Set OpCode: 0xd8, SubCode: 8(Raw)
Lead-out length of 1st session: 6750
Lead-in length of 2nd session: 4500
Pregap length of 1st track of 2nd session: 150
Total of above is the 11,400 gap.
If you look at the TOC toward the top:
========== TOC ==========
Audio Track 1, LBA 0 - 13835, Length 13836
Data Track 2, LBA 13836 - 15099, Length 1264
Total 15100
It shows total sectors as 15100, but it stores the first track incorrectly (it adds the 11,400 gap to the first track)
First session is not 13836 sectors, but only 2436 sectors (13836 - 11400). Therefore, session one is 0 - 2435.
Second session is 1264 sectors, and listed correctly above, as 13836 - 15099.
@mnadareski commented on GitHub (Apr 12, 2022):
Pseudo-tag added in
e5154dad5b@mnadareski commented on GitHub (Apr 12, 2022):
I've been looking this over and I don't fully understand how it's determined what tracks fall into what session based on the
_disc.txtfile. Can you possibly provide the outputs of a multisession disc with more than 2 tracks?@Feathered-Serpent commented on GitHub (Apr 12, 2022):
I'm not OP though I thought I can share examples. One from a PSX game, which has lots of audio tracks (though I think these are all within one session), one of a EnhancedCD (aka Audio CD with Data track) which are definitely two sessions.
EnhancedCD.txt
PSX.txt
Thought maybe they can help.
@mnadareski commented on GitHub (Apr 12, 2022):
Implementation notes:
@mnadareski commented on GitHub (Apr 12, 2022):
Another note: The Enhanced CD example above does not have the line that says "Lead-in length of 2nd session". So that part is variable.