VOGONS

Common searches


dosbox-staging (DOSBox Git repo)

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 220 of 236, by dreamer_

User metadata
Rank Member
Rank
Member

PP just landed in master branch, so it's time for an update :) There was no SVN activity for last 15 days - we're still synced to r4333.

Changes:
- Implement initial version of Pixel-Perfect scaling (use: output=texturepp) (ant-222)
- Constrain GUS playback frequency selection (fixes #171) (krcroft)
- Add macOS release CI job - snapshots builds directly from master (dreamer_)
- Implement performance improvements for handling large number of small-block reads and seeking during CD-DA emulation and DAE (krcroft)
- Add support for mono tracks when performing DAE (krcroft)
- Render .icns file for macOS build from SVG on the fly; design improvements for new icon in small sizes (16px, 24px, 32px) (dreamer_)
- Update xxHash library to 0.7.3 (krcroft)
- New buildsystem option for selectively disabling networking features while keeping SDL2_net installed (dreamer_)
- Update copyright year to 2020 throughout the project (jfern)
- Buildsystem improvements for MinGW on Windows XP (dreamer_, ant-222)
- Several static analysis fixes, clearing false-positive results, warning fixes, etc…
- Other CI improvements, code cleanups and refactorizations, etc…

In Coverity static analyser, we moved below 1.0 findings per 1K LOC for the first time. We started at 1.89, now we are at 0.97. The goal is to reach an average score for OSS projects of similar size, which is 0.5 finding / 1K LOC.

Question to Windows users:
We can't test our snapshots on all Windows versions and we don't know what is the oldest Windows versions de-facto supported by Microsoft via MSVC at the moment - can anyone confirm if our snapshot builds work in Windows Vista or 7? Windows 8.x should work (but we haven't tested it), Windows 10 works and was tested. Our snapshots do not work on Windows XP, but dosbox-staging runs on it when compiled locally.

Response to issues reported by @jmarsh for previous update:
- windowresolution % setting - this feature conflicted with SDL2 implementation, so I decided not to reimplement it until it will be finished in SVN (at the moment it seems like it's still being implemented, as there's no user documentation provided)
- command prompt is incorrectly positioned - if you're talking about not appending excessive newline after every program, then it's not a bug; I am not sure if keeping foreground/background colour set by application is a bug or not. Or do you have something different in mind? I've never seen invisible command prompt throughout testing… Share your testcase, please.
- ALT-F4 - can you share your use-case? To me it seems like dosbox-staging behaves exactly the same as SVN, but I'm probably missing something.

Attachments

Last edited by dreamer_ on 2020-03-10, 10:09. Edited 1 time in total.

| ← Ceci n'est pas une pipe
dosbox-staging

Reply 222 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

I tested PCM playback using mpxplay at 8, 11, 22, 32, 44, 48, and 49 with the GUS at default settings.

jmarsh wrote on 2020-03-10, 10:01:

That GUS fix does nothing useful, the internal playback sampling rate of the Ultrasound is not a fixed value and varies depending on the number of voices active.

With gusrate configured in dosbox at 8, 32, 48, and 49 there was grating ringing and zero stereo separation when panning. The change mentioned above now excludes these flawed playback frequencies.

With gusrate configured in dosbox at 11, 22, and 44 there was no ringing and I could pan the signal left and right to their full extents. The recommended use of 22 and 44 also aligns with the GUS manual.

Yes, regarding its wavetable synthesis, it's known that the GF1 chip could play up to 32 channels of hardware audio at 19 kHz or 14 channels at 44.1; however this is separate from the distortion and flaws detected at the now-excluded frequencies I mentioned above.

If you're saying users should not use gusrate 22 and 44, and instead are suggesting that users can use gusrates: 32, 48, and 49 KHz with perfectly fine results, then please provide exact test cases, dosbox configuration value, and game/program parameters -- thanks.

Reply 223 of 236, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

I'm saying (as I have before) that the selection for "gusrate" shouldn't even exist; every channel being played should be resampled to the internal master rate that the card is running at, exactly like the real hardware does. Failure to do so results in samples being included in the output when they shouldn't be, e.g. when the maximum number of voices are active (32) the master rate is 19293Hz; if a channel is configured for 38586Hz (master rate x2) every second sample will be dropped from the output. This is very important for games that upload stereo interleaved data (left/right/left/right samples) to the card. Locking gusrate to 11/22KHz isn't going to help because neither of those rates is a factor of 19293.

What you tested was a very limited situation where the GUS was always using the same master rate (44100) and the frequencies that you thought were "bad" were the ones that weren't integer factors. The situation is very different when playing games that use ~24 channels for wavetable midi and 2+ other channels for sound effects.

The recommendation in the GUS manual is talking about recording and has no relevance to playback.

Reply 224 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

... when the maximum number of voices are active (32) ...

So you're saying bad stuff happens when 32 simultaneous voices are active. Ok - great.

Hold up though, let's back up and justify the GUS change in dosbox-staging, because you've taken issue with that from the get-go: jmarsh: "That GUS fix does nothing useful"

Let's just look at the single-voice scenario. Unzip the attached stand-alone test case, cd into gusrate-test and launch the gus batch files:

  • gus8.bat - 8000 mono with overt ringing in upper freq
  • gus11.bat - 11025 stereo and clean
  • gus16.bat - 16000 mono with ringing and warble in upper freq
  • gus22.bat - 22050 stereo and clean
  • gus32.bat - 32000 mono with some ringing and fuzz in upper freq
  • gus44.bat - 44100 stereo and clean
  • gus48.bat - 48000 mono with ringing and warble in upper freq
  • gus49.bat - 49716 mono with slight fuzz in upper freq

This proves that gusrates of 8 / 16 / 32 / 48 / 49 KHz are busted even for a single-voice; so why does DOSBox let users configure them?

This change in dosbox-staging simply constraints gusrates to those that play clean and in stereo for 99% of cases.

Back to the max-voices scenario that you've brought up (which are likely distored an *any* gusrate, as you've described): if gusrate itself can be done away with in favour of a sliding decreasing internal sampling rate as a function of simultaneous channels - awesome. That's probably a pretty-involved change. Let's take it up in an SVN/DOSBox forum so guys like QBix and other see it and improves the chances of being accepted into SVN.

Attachments

  • Filename
    gusrate-test.zip
    File size
    2.78 MiB
    Downloads
    16 downloads
    File license
    Public domain
Last edited by krcroft on 2020-03-10, 20:46. Edited 2 times in total.

Reply 225 of 236, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
krcroft wrote on 2020-03-10, 18:42:

We limit them to 11 / 22 / 44, all of which play clean and in stereo for the 99-percentile cases.

Not even close, because your test uses less than 15 channels so the master rate is always 44100. In most DOSBox use cases users are utilizing GUS for midi playback which uses many more channels (typically ~24) which means the master rate will be significantly lower and not an integer multiple of 11025.

Note that for that use case that you've just posted, you've restricted the default output rate from 44100 (which works fine, according to you) to 22050 - reducing the quality by half.

Reply 226 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie
jmarsh wrote on 2020-03-10, 18:54:
krcroft wrote on 2020-03-10, 18:42:

We limit them to 11 / 22 / 44, all of which play clean and in stereo for the 99-percentile cases.

In most DOSBox use cases users are utilizing GUS for midi playback which uses many more channels (typically ~24) which means the master rate will be significantly lower and not an integer multiple of 11025.

I personally only use GUS for PCM-audio playback, sound-effects, or CD-audio music, typically 8 channels or less. If the game's setup utility allows MIDI or MT32 playback, I use Timidity, FluidSynth, or Munt; and I'll use a sound-font tailored for the game (Yamaha, FatBoy, or ToH). I don't use the GUS for MIDI playback. From what I've seen online, this is the case for the vast majority of users as well.

you've restricted the default output rate from 44100 (which works fine, according to you) to 22050 - reducing the quality by half.

The default is still 44100 for GUS in dosbox-staging: https://github.com/dreamer/dosbox-staging/blo … dosbox.cpp#L645

You said: jmarsh: "That GUS fix does nothing useful". This change simply removed gusrates of 8/16/32/48/49, which in my testing are flawed for all GUS scenario. Given that's the scope of this change, I'm waiting for you to deliver cases where gusrates of 8/16/32/48/49 are viable and produce non-mono and undistorted audio.

I'm not disagreeing that GUS isn't broken at high-MIDI-channel counts (at all gusrates!)-- awesome; let's poing that issue at DOSBox SVN, as a general bug.
But please don't use this trivial config change in dosbox-staging as a punching bag for deeper / tangential issues.

Reply 227 of 236, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
krcroft wrote on 2020-03-10, 19:12:

I personally only use GUS for PCM-audio playback, sound-effects, or CD-audio music, typically 8 channels or less. If the game's setup utility allows MIDI or MT32 playback, I use Timidity, FluidSynth, or Munt; and I'll use a sound-font tailored for the game (Yamaha, FatBoy, or ToH). I don't use the GUS for MIDI playback. From what I've seen online, this is the case for the vast majority of users as well.

Wildly inaccurate. The only time GUS is picked for PCM playback is for demos that use it exclusively. Otherwise nobody would choose it over Sound Blaster when the latter has much better support and far more stable emulation.

The default is still 44100 for GUS in dosbox-staging: https://github.com/dreamer/dosbox-staging/blo … dosbox.cpp#L645

I was under the impression from the bug report discussion that you'd limited the rates to only 11025 or 22050, since they were the only ones confirmed by the reporter to have proper stereo separation. Guess the issue was closed without bothering to confirm with said reporter that your fix correctly addressed their issue.

If you have issues with this change in dosbox-staging, then please provide test cases where the SVN-permitted gusrates of 8/16/32/48/49 are viable. From my testing, they are flawed for all GUS scenario.

They're valid for any scenario where stereo interleaving isn't used, in which case they can provide higher quality output (by upsampling to the specified rate rather than downsampling to the internal master rate).
I can just as well provide test cases where the remaining selections of 11025, 22050 and 44100 are not viable; try playing Doom with gusrate=44100, you won't hear any stereo separation of sound effects.

Please direct your concern with GUS being broken (at all gusrates) for high-MIDI-channel counts at DOSBox SVN, as a general bug.

My immediate concern is not so much with it being broken, but with your project claiming to have fixed it when the issue is very much still present and not correctly addressed due to lack of understanding about the underlying cause.

Reply 228 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie
jmarsh wrote on 2020-03-10, 19:56:

[ ... gusrates of 8/16/32/48/49 ...] are viable for any scenario where stereo interleaving isn't used, in which case they can provide higher quality output (by upsampling to the specified rate rather than downsampling to the internal master rate).

The test case I provided above, download/file.php?id=78657, includes non-interleaved mono sampling as well, and playback is also flawed at 8/16/32/48/49.

Please play the included gus batch files with DOSBox SVN; listen closely or use a headset. This is the basis for removing those rates from the selection pool.

Last edited by krcroft on 2020-03-11, 07:38. Edited 1 time in total.

Reply 229 of 236, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Let's say a game uses 16KHz as its internal mixing rate; do you think resampling to 11025, 22050 or 44100 is going to sound better than resampling to 16000 or 32000 (since they're "always bad")?

The reason your test case only sounds "correct" at 11025, 22050 and 44100 is simply because it's a 44100Hz wav file and those rates are all integer factors of the source.
MPXPlay also uses stereo interleaved channels to play both files, regardless of the source being mono or stereo:

Channum 2 interpolation step(samples): 2.000000
Channum 3 interpolation step(samples): 2.000000
Channum 2 WriteWaveCtrl: 0c
Channum 2 WriteWaveCtrl: 0c

Reply 230 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

Ok.. thanks and point taken.

Which games are feeding the GUS 16,000 or 32,000 Hz sampled content? (as opposed to 22 and 44 KHz content).

If there are games using 8, 16 or 32 KHz content that sounds clean (or cleaner) at a matching gusrate, then cool - let's turn those options back on.

If a list is identified, I will specifically document these nuances in either the readme (if its a short list) or broken out in a GUS text file enumerating the games and their optimal gusrate.

Reply 231 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

SDL 2.0.12 was just released and has support for RISC OS, more controllers, and ARM SIMD optimizations.

Phoronix summed it up nicely:

RISC OS bits, support for the Google Stadia controller and other game controllers, a new video driver for offscreen rendering, ARM NEON optimizations, many bug fixes, and other improvements. On Tuesday night, that stable release happened.

SDL 2.0.12 also has a number of API additions, various fixes, various Apple iOS / tvOS support fixes, support for Android audio capture using OpenSL-ES, and different changes. Besides handling of Google's Stadia Controller, some of the other newly-supported controllers include the Razer Serval, Razer Raion Fightpad, SteelSeries Status Duo, Xbox One ELite Series 2, Hyperkin Duo, and other mostly off-brand devices.

https://www.phoronix.com/scan.php?page=news_i … 2.0.12-Released

Binaries and source are here: https://libsdl.org/download-2.0.php.

Reply 232 of 236, by digger

User metadata
Rank Member
Rank
Member
jmarsh wrote on 2020-03-10, 19:56:

Wildly inaccurate. The only time GUS is picked for PCM playback is for demos that use it exclusively. Otherwise nobody would choose it over Sound Blaster when the latter has much better support and far more stable emulation.

There is of course the special case of games that have MOD tracker music and mix the music channels and the sound effects together. Many of those games use the GUS to offload that multi-channel audio mixing. On other sound cards, those games fall back to software mixing.

Such games can often be recognized by an "Amiga-like" sounding soundtrack and the presence of a mixing frequency selector in the settings (or shown on startup) to accommodate slower systems, when a GUS is not available.

Jazz Jackrabbit and Epic Pinball are notable examples of such games. Those kind of games might still benefit, at least quality-wise if not performance-wise, from having a GUS emulated as opposed to for instance a Sound Blaster.

Reply 233 of 236, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

I'm using GUS for 16bit PCM effects or tracker/MOD style music for those listed below, like you mentioned @digger.

Regarding audio formats, Cloudschatze shared A List of DOS Games with 16-Bit Sound stored and played at various combinations of 11, 22, or 44 KHz, bjt compiled a list of games that perform channel mixing in GUS hardware, and attached is Gravis's own list of games that natively support the GUS.

CYAC and OMF 2097 both sound noticeably cleaner when configured for GUS vs SB16 (and granted, they're probably feeding the GUS with 16bit content instead of 8bit). That said, I haven't listened critically to many others, so some might be a wash or worse than SB16.

Archon Ultra (GUS hardware mixing)
Assault Trooper
Chuck Yeager's Air Combat
Command & Conquer (GUS hardware mixing)
Crusader No Regret
Disney's The Lion King
Doom I
Empty
Epic Pinball (GUS hardware mixing)
Eradicator
Escape from Delirium
Extreme Pinball (GUS hardware mixing)
Fable (GUS for SFX, General MIDI for music)
Firo & Klawd
Flight Unlimited
Heretic
Hexen Beyond Heretic (GUS for SFX, General MIDI for music)
IndyCar Racing II
Jagged Alliance Deadly Games (GUS for SFX, General MIDI for music)
Jazz Jackrabbit (GUS hardware mixing)
Jazz Jackrabbit Holiday Hare 1994 (GUS hardware mixing)
Jazz Jackrabbit Holiday Hare 1995 (GUS hardware mixing)
Krush Kill N Destroy
Legend of the Red Dragon
Lemmings 3 All New World of Lemmings
Master of Orion 2 (GUS for SFX, General MIDI for music)
MAX Mechanized Assault & Exploration
MechWarrior 2 31st Century Combat (GUS for SFX, General MIDI for music)
MechWarrior 2 Ghost Bear's Legacy (GUS for SFX, General MIDI for music)
Micro Machines 2 Turbo Tournament
MiG-29M Super Fulcrum
Millennia Altered Destinies (GUS for SFX, General MIDI for music)
One Must Fall 2097 (GUS hardware mixing)
Operation Overkill II
Paganitzu
Raptor Call of the Shadows (GUS for SFX, General MIDI w/ SC55 soundfont)
Rayman
Rise of the Triad Dark War (GUS for SFX, General MIDI for music)
Seek and Destroy
Settlers II Gold Edition (GUS for SFX, General MIDI for music)
Star Control II (GUS hardware mixing)
Stargunner
Super Stardust
Taco Bell Tasty Temple Challenge
Teenage Mutant Ninja Turtles
Teenage Mutant Ninja Turtles II The Arcade Game
The Duel Test Drive II
The Elder Scrolls Arena
The Elder Scrolls Legend Battlespire
Transport Tycoon Deluxe (GUS for SFX, General MIDI for music)
Tyrian 2000 (GUS for SFX, General MIDI for music)
Willow
Wingstar
Worms
Zone 66 (GUS hardware mixing)
Zork
Zork III The Dungeon Master
Zork II The Wizard of Frobozz

Edit: annotated those where I'm using an external MIDI player versus those that offload channel mixing to the GUS. Added another list link and attachment.

Attachments

  • Filename
    guslist.txt
    File size
    40.5 KiB
    Downloads
    11 downloads
    File license
    Public domain
Last edited by krcroft on 2020-03-13, 18:49. Edited 5 times in total.

Reply 235 of 236, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Even some of the ones using MOD formats mix wholly in software and output a single PCM stream to the sound card. The Asylum engine used by the Crusader games is one such.

All hail the Great Capacitor Brand Finder

Reply 236 of 236, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Due to this project disrupting development and interfering with support for the DOSBox project, it will no longer be allowed on this forum.

Last edited by Qbix on 2020-03-14, 19:09. Edited 1 time in total.
Reason: clarified project

Water flows down the stream
How to ask questions the smart way!