dreamer / boxtron

Steam Play compatibility tool to run DOS games using native Linux DOSBox
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
405 stars 5 forks source link

Doom 2 (2300) #31

Closed lavadrop closed 4 years ago

lavadrop commented 4 years ago

Compatibility Report

System Information

Report

Configuration changes

use_sequencer ='um' use_sequencer ='um-one' use_sequencer ='um-one midi 1' use_sequencer ='UM' use_sequencer ='UM-ONE' use_sequencer ='UM-ONE MIDI !' use_sequencer ="um" use_sequencer ="um-one" use_sequencer ="um-one midi 1" use_sequencer ="UM" use_sequencer ="UM-ONE" use_sequencer ="UM-ONE MIDI !"

Report

dreamer commented 4 years ago

Can you paste the exact output of $ cat /proc/asound/seq/clients while your UM-ONE is plugged in? Regex detecting this dongle is baked in, so in theory no user configuration should be required.

Boxtron was tested with the UM-ONE v1, and some users reported it working with UM-ONE v2, but maybe the device name is sometimes reported differently… I had one report of file /proc/asound/seq/clients not existing, but noone was able to reproduce this issue.

lavadrop commented 4 years ago

Sure:

clients Client info cur clients : 3 peak clients : 5 max clients : 192

Client 0 : "System" [Kernel] Port 0 : "Timer" (Rwe-) Port 1 : "Announce" (R-e-) Client 14 : "Midi Through" [Kernel] Port 0 : "Midi Through Port-0" (RWe-) Client 24 : "UM-ONE" [Kernel] Port 0 : "UM-ONE MIDI 1" (RWeX)

dreamer commented 4 years ago

Let's investigate it a bit further:

1) Can you comment-out the use_sequencer line completely and test if the adapter will be detected automatically? (with your current Boxtron version) 2) Regardless if previous step worked or not, can you test this boxtron version: boxtron.zip (note for me: this is v0.5.2-18-gf7bacd3); I hope any of the following lines should work:

   use_sequencer = um
   use_sequencer = um-one
   use_sequencer = 'um'
   use_sequencer = 'um-one'
   use_sequencer = "um"
   use_sequencer = "um-one"

(or the same lines with UM or UM-ONE).

3) If it still does not work, then attach the log from Steam while you're starting the game. It will be on stdout (if Steam was started in terminal) or in one of these locations: /tmp/dumps/${USER}_stdout.txt or ~/.steam/error.log.

lavadrop commented 4 years ago
  1. Didn't work
  2. Didn't work
  3. stdout.txt
dreamer commented 4 years ago

Well, this is weird because on Boxtron side everything seemed to work correctly, log says:

boxtron: Setting up DOSBox audio:
Digital Sound: Sound Blaster 16
    Base Port: 220
          IRQ: 7
          DMA: 1
boxtron: Detected UM-ONE on 24:0
        Music: General MIDI (MPU-401 compatible)
         Port: 330

Do you by any chance use DOSBox or Steam via snap package, or flatpak? Also, did you make any changes to the files in Doom 2 install dir?

[edit] wait a moment, for some reason boxtron decided to turn MIDI off just before the UM-ONE got detected; I will try to reproduce it

boxtron: turning MIDI off for 2300

and a bit earlier:

boxtron: warning: No suitable soundfont found. Disabling MIDI support

Did you install all dependencies? Can you try testing with soundfont pointing to any sf2 file? I think this is the real bug in here - Boxtron shouldn't disable MIDI when user wants to use hardware and no soundfont is installed.

lavadrop commented 4 years ago

I found the answer.

As per the log, if boxtron does not find a soundfont installed, it disables MIDI completely.

Installing my distro's fluid-soundfont and renaming the filename on boxtrons .conf file (boxtron expects FluidR3_GM.sf2) to my distro's FluidR3.sf2 fixes boxtron's external MIDI interface detection work. Also, if I unplug my MIDI adapter, boxtron disables MIDI again like it can't find the soundfont.

dreamer commented 4 years ago

OK, I will make this code more robust to avoid this bug, thank you for testing :)

Regarding soundfont name: https://dev.getsol.us/source/fluid-soundfont/ indeed renames the file from default name to FluidR3.sf2, and does not provide a fallback link (Fedora calls fallback link: default.sf2). I think it would be beneficial to Solus if the original soundfont name was kept in there - Fedora, Debian and Arch all use the same name - would you care to ask Solus package maintainers about this? I don't know what is the appropriate forum for such requests in Solus.

Regardless, I will add FluidR3.sf2 as another name to look for, to avoid this problem in the future.

lavadrop commented 4 years ago

I opened a report on the solus Dev tracker page, thank you!

dreamer commented 4 years ago

Please test this version: boxtron.zip (note for myself: v0.5.3-4-ga7b8b0f).

It combines all adjustments I needed to make to fix this bug - I tested it with software synth "simulating" hardware - hopefully, it will work with real hardware as well.

lavadrop commented 4 years ago

I erased my boxtron.conf file to start fresh. When plugging in my MIDI adapter and starting the game, boxtron detects the hardware and Dosbox outputs MIDI data automatically. However, if I unplug my adapter, modify boxtron.conf to change synthesiser to fluidsynth from timidity and start the game, MIDI is stopped again. stdout.txt