Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080.
Thank you!
This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering
issues or a faulty rip), requests playback of a given track at the tail end
of the prior track.
In debugging and performing this fix, many debug messages were improved as well
as making some small small code adjustments, such as using iterators to point to
individual tracks (track->attribute) instead of using the tracks array
(tracks[track -1].attribute).
Thanks to @ripsaw8080 for insight into CD-DA channel mapping,
@hail-to-the-ryzen for testing and flagging a position-tracking bug,
and @dreamer_ for guidance and code review.
The CD-DA volume and channel mapping loops were moved to generic mixer
calls and no longer require a pre-processing loop:
- Application-controlled CD-DA volume adjustment is now applied using
an existing mixer volume scalar that was previously unused by the
CD-DA code.
- Mapping of CD-DA left and right channels is now applied at the tail
end of the mixer's sample ingest sequence.
The following have been removed:
- The CD-DA callback chunk-wise circular buffer
- The decode buffers in the Opus and MP3 decoders
- The decode buffer and conversion buffers in SDL_Sound
These removals and API changes allow the image player's buffer
to be passed-through ultimately to the audio codec, skipping multiple
intermediate buffers.
- Fix Bit8u instead of char weirdness for imageDisk (dreamer_)
- Give device_t a virtual empty destructor so some warning program
doesn't go crazy.
- Give the code that moves the Z drive its own function for readability.
- Give sizes arrays default values again for warning program.
- Rewrite IMGMOUNT in order to exit early for clarity and attempt
to group things together.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4267
Overflow is still treated as Exit.
Underflow is ignored in release mode as it happens every now and then and doesn't seem to cause issues if ignored, thus restoring 0.74 behaviour.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4199
When active, this drive redirects new and changed files to a different location.
The files in the overlay and normal drive are merged on startup and kept up to date when the game changes something.
Files in the overlay are priotizedi, if they exists, above the normal files.
The drive will switch to an overlayed version of the file on the first write! (Not when opening the file in write-mode).
The overlay is capable of creating missing directories.
With the help of DBOVERLAY files, the drive keeps track of files that are present in the normal directory but deleted by the game.
All changes are preserved between sessions.
Current design principles/limitations/requirements:
1) All directories that can be used for saving, must exist already in the base before mounting. (they will be created by DOSBox if missing in the overlay)
2) All filenames inside the overlay directories are UPPERCASE and conform to the 8.3 standard except for the special DBOVERLAY files.
3) To keep point 1 valid at all times, support for creating/renaming/removing directories has been disabled.
Thanks for the help GOG.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4196
Return a fake success result for INT 13/05. Helps older games (Sierra On-Line booters, Mickey's Space Adventure, Zyll, et al.) that insist on low-level formatting a floppy disk to be used for saving games.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3980
Set record size to 128 if it is 0 in the FCB when calling any FCB read/write function (ripsaw).
Fixes for acad 10:
- Add missing reference counting when the file is already open when calling FCB_Open, so that acad which uses FCBs and normal handles on the same file works better.
- Remove FCBs being added to the PSP filetable and rewrite most functions to support this change. This way acad won't run out of temporary (fcb) files when low on memory.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3962