dosbox-staging (DOSBox Git repo)

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-08 @ 15:44

I don't know what was posted and by whom, but people, let's keep this thread civil and on-point. I bet DOSBox maintainers will look at 2nd patch series when they'll have time and include the patches that are appropriate for merging - or leave feedback about what needs to be improved.

As for list of patches/improvements that I plan to include (sooner or later) in dosbox-staging, cleanup existing patches, and re-submit for inclusion in DOSBox SVN:

  • work ongoing (high priority) krcroft's CD-DA improvements (this is a prerequisite for further improvements)
  • work ongoing (high priority) SDL2 - you can read more about it here: https://github.com/dreamer/dosbox-staging/issues/29
  • (low priority) Nuked OPL3 - small patch, but some small improvements are needed
  • (low priority) Munt/MT-32 patch - needs improvements to enable conditional compilation, so it won't break existing builds
  • (low priority) Pixel-perfect scaling - I'm not sure if this patch is needed after SDL2 will be implemented, but probably yes
  • (low priority) CGA Composite Mode - I haven't investigated this change at all yet, but I find it quite important
  • (medium priority) Improve OpenGlide patch and merge it - current version of patch is not SDL2 compatible and patch does not work in a number of scenarios, SDL2 takes priority over it for now
  • (high priority) jmarsh's dynrec/WX patch for - very important, but needs more testing and is awaiting proper review
  • (implemented only in Boxtron so far) Fixes for bugs in mount/imgmount path handling
  • (implemented only in Boxtron so far) More user-friendly default settings
  • (low priority) Better .cue files parser, that won't trip over invalid, but workable .cue files
  • (high priority) Modern buildsystem
  • (high priority) Automated regression testing
  • (high priority) Unit tests
  • (medium priority) Vulkan renderer (but SDL2 needs to be implemented first)
  • (medium priority) Implement new hardware accelerated renderer for macOS (because OpenGL is being dropped by Apple) - using either Metal or MoltenVK

… and a number of smaller improvements, some new features that were flying around, etc.
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby jmarsh » 2019-11-08 @ 21:01

CGA composite mode is already supported by SVN.
jmarsh
Member
 
Posts: 332
Joined: 2014-1-04 @ 09:17

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-08 @ 21:26

Regarding CGA composite: where's the documentation? How to turn it on? Wiki explicitly says, that it is NOT supported. Also, there are additional unmerged patches with the improvements in the thread…
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-09 @ 08:25

The CD-DA improvements allow for playback of CD audio in DOS, but the position on any audio track is not updated while playing. Tested with open cubic player that displays the track position and a cue/bin pair for the music.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-09 @ 08:57

hail-to-the-ryzen wrote:The CD-DA improvements allow for playback of CD audio in DOS, but the position on any audio track is not updated while playing. Tested with open cubic player that displays the track position and a cue/bin pair for the music.

Thanks for the report :) We're going to track the status here: https://github.com/dreamer/dosbox-staging/issues/38
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-09 @ 17:35

@hail-to-the-ryzen, @dreamer - thank you!

Games don't often query the current playback MSF position, so using a CD player utility (and catching this) was very helpful.

Draft fix is here: https://github.com/dreamer/dosbox-stagi ... erge-5.zip

Let me know if it works for you!

Screenshot show the queries OCP is making to find the track position:
2019-11-09_09-26.png
Last edited by krcroft on 2019-11-09 @ 20:32, edited 1 time in total.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-09 @ 19:23

Another small improvement regarding this current track position, if you want to give it a try.

Sources: https://github.com/dreamer/dosbox-stagi ... erge-5.zip

Changelog: https://github.com/dreamer/dosbox-stagi ... f1f60dc60f

"This hoists the current position calculation out of the mixer's callback loop (removing 4 math calculations performed 1000 times per-second), and into the GetAudioSub() function.

This change makes the position calculation lazy: the calculation will only be performed on-demand when a DOS application asks for the position, otherwise (for most games) this calculation and call never occur.

This also allows us to remove the currRedbookFrame member variable from our player class, freeing one integer from the stack."
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-10 @ 00:27

Your commit restores the track position counter in open cubic player. However, the Windows 3.1 media player does not support CD audio playback. Haven't tested this issue in other dosbox builds yet.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-10 @ 01:13

Thanks for the check; anything else you can beat it up with will be much appreciated! Sampling rates other than 44.1KHz are supported as are mono streams (across flac, opus, wav, w64, ogg, and mp3 codecs).
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-10 @ 06:48

Thank you.

In DOSBox-SVN, GetAudioSub() only returns false if (cur_track < 1). However, the latest dosbox-staging commit also returns false if (player.remainingTrackFrames <= 0). The return values should follow the SVN method.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-10 @ 09:11

hail-to-the-ryzen wrote:In DOSBox-SVN, GetAudioSub() only returns false if (cur_track < 1). However, the latest dosbox-staging commit also returns false if (player.remainingTrackFrames <= 0). The return values should follow the SVN method.

For the record, "latest commit" is subject to interpretation - in this case, I think it referred to the branch with next batch of CD-DA changes (which is being reviewed, not merged to master yet)? It's helpful to refer to the branch by name (or at least a commit id) - also, anyone can leave comments directly in review. Being precise makes it easier for a developer to address the issue :).
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-10 @ 09:12

hail-to-the-ryzen wrote:Thank you.

In DOSBox-SVN, GetAudioSub() only returns false if (cur_track < 1). However, the latest dosbox-staging commit also returns false if (player.remainingTrackFrames <= 0). The return values should follow the SVN method.

@hail-to-the-ryzen, Thanks for the feedback.

Regarding reverting the logic because it needs to match SVN: even if we conclude that's technically correct, I'd rather the reason be based on a logical argument; please feel free to tear into my code and lay bare any issues (I'm positive you did this but withheld the damning evidence because you're a gentleman!). But yes; please do, and we'll keep improving it together! (and everyone benefits).

There were a couple things I didn't like with the current logic - first is that the conditional prevents GetAudioSub() from hitting the "100%" played mark; instead it will come up shy. I also didn't like how this "remaining tally" (a decrementing counter) now was being used to describe the amount played back (an incrementing counter): the variable was inverted from its intended use. So I flipped it to the positive, renamed the members accordingly, and expanded on some rationale in a couple comments.

Let me know if this commit hones this logic - https://github.com/dreamer/dosbox-stagi ... dbcc31f3ce, regards.
Last edited by krcroft on 2019-11-10 @ 10:56, edited 1 time in total.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-10 @ 10:48

Your above commit seems good. However, I am unable to test it alongside the commit that moved the CD volume code from the callback. The CD volume and related commits appeared under active development, so I was not surprised that there were some issues in CD audio playback that were resolved by reverting to the main dosbox-staging branch. Given it is useful, it should be possible with time to test your above commit in the main branch.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-10 @ 11:08

Thanks for the testing; would you consider trying the current branch's source? (https://github.com/dreamer/dosbox-stagi ... erge-5.zip). It includes the recent change plus prior changes (such as the CD volume relocation). I understand you would prefer to to do one-off testing; but I agree - it's not easy to separate the last handful of changes because they overlap in areas. Maybe there's some git cherry-picking magic that would help here, but that's beyond my git-foo.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-10 @ 12:15

I will build and test that branch soon. Thanks.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-10 @ 17:05

hail-to-the-ryzen wrote:Your commit restores the track position counter in open cubic player. However, the Windows 3.1 media player does not support CD audio playback. Haven't tested this issue in other dosbox builds yet.

Came across this Magic School Bus-related article mentioning that installing the MCI CD Audio driver "allows your computer to play music from compact discs that are in the Compact Disk-Digital Audio (CD-DA; Redbook) format" -- https://jeffpar.github.io/kbarchive/kb/148/Q148798/ The link they provide to Microsoft's MCI installer is broken though.
Last edited by krcroft on 2019-11-11 @ 00:20, edited 1 time in total.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat


Re: dosbox-staging (DOSBox Git repo)

Postby hail-to-the-ryzen » 2019-11-11 @ 02:08

I do not have a different result from the latest build, but I will continue to test if it helps.
hail-to-the-ryzen
Member
 
Posts: 344
Joined: 2017-3-09 @ 01:34

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-11 @ 04:00

Thank you for the confirmation and your offer to test; I will certainly look for your help on the next update!
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-11 @ 17:12

@hail-to-the-ryzen,
This branch of the CD-DA buffer and code reduction work is near completion, with channel mapping being the last issue flagged (thank you ripsaw8080) and addressed last night.

If you have cycles to give it another go, your testing and feedback is much appreciated. Source for the branch is at: https://github.com/dreamer/dosbox-stagi ... erge-5.zip

@ripsaw8080 suggested testing with Chronicles of the Sword (CotS) as one game that makes use of channel mapping (which I've tested on my system). I've also tried a handful of other CD-DA games (that adjust the volume), along with all the codecs; the more eyes the better.

PS- CotS is also one of the few games where the MP3 format's support for decoupled Left-Right (LR) encoding (as opposed to joint or mid-side channel encoding) is warranted and works very well in this case versus Opus and Vorbis. If you use LAME to encode, use the -m simple flag.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 8 guests