Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI sound not working in MiSTer FPGA ao486 #199

Closed
ezgoodnight opened this issue Jul 17, 2024 · 10 comments
Closed

MIDI sound not working in MiSTer FPGA ao486 #199

ezgoodnight opened this issue Jul 17, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@ezgoodnight
Copy link

Using MiSTER FPGA and the ao486 core, I cannot get any MIDI sound out of multiple settings.

The Soundblaster setting output just noise, and continued to do so after I quit FastDoom. I had to reset the core to get the noise to stop. I have not been able to reproduce the noise; every other time I have tried MIDI is simply silent.

I tried every reasonable setting and mostly got no sound at all out of MIDI. I have tried both DOOM.WAD and DOOM2.WAD, and tested vanilla Doom as a sanity check. Sound is fine in vanilla. I have also tested FastDoom sound in DOSBox-X and got sound out of "Soundblaster MIDI" and "Soundblaster" using my Retrowave OPL3 card.

ao486 core dated 24.06.16 which looks to be current. DOS is with Windows 95 v4.00.1111

(MiSTer FPGA currently cannot run BOOM or Asetup FWIW.)

The program appears to run well apart from that, just no MIDI sound.

@viti95 viti95 added the bug Something isn't working label Jul 18, 2024
@jsmolina
Copy link
Contributor

since it is windows 95. Could you try it in MS DOS 6.22? (himem.sys from 6.22 limits ram)

Or even easier: set the core options to less RAM (now you might have it at 256 Megs)

@ezgoodnight
Copy link
Author

ezgoodnight commented Jul 20, 2024

I was able to confirm it working in FreeDOS on ao486.

I don't have a 6.22 install set up with sound yet, I'll try again once I get it set up correctly with sound.

I also tried using just Windows 95 to load FastDoom and got no sound, same as I did in Win95/DOS. That got me no sound. This could be a quirk with Windows 95 on MiSTer or how the image is set up.

@ezgoodnight
Copy link
Author

ezgoodnight commented Jul 20, 2024

Interesting findings.

In DOS 6.22:
If I turn OFF the sound effects, the game loads and runs like normal and I can get MIDI sound with both of the Sound Blaster settings and also Adlib. With SE on, I get some version of the below errors in 6.22; there were no errors in Windows/DOS, only crashes (or loading to Fastdoom with no MIDI).
sshot-75
sshot-74

I tested vanilla Doom in this install and was able to get both sound and MIDI out of this MiSTer setup.

So FreeDOS can handle FastDoom on MiSTer, and DOS seems to have a problem with something going on.

@ezgoodnight
Copy link
Author

I've tested various settings for extended, expanded, and conventional memory, and I have used both the 256MB and 16MB memory settings in MiSTer. Same result, it cannot handle both MIDI and Sound Effects at the same time.

All supported PC speaker settings for Sound Effects will work with MIDI sound.

This is the last thing it outputs before crashing, I am not sure if it's normal or not:

image

@viti95
Copy link
Owner

viti95 commented Jul 21, 2024

Can you share the BLASTER variable used? Also, which hardware are you emulating exactly?

@ezgoodnight
Copy link
Author

Default config for MiSTer FPGA is A220 I5 D1 H5 T6. Most everything works without setting a variable in AUTOEXEC.BAT. Setting that as the variable actually makes FastDoom not play any MIDI, even with FX off.

Specs for the core from the repo for the core: https://github.com/MiSTer-devel/ao486_MiSTer

486SX33 performance (no-FPU).
256MB RAM
Sound Blaster 16 (DSP v4.05) and Sound Blaster Pro (DSP v3.02) with OPL3 and C/MS
MIDI port (dumb and fake-smart modes)
External MIDI device support (MT32-pi and generic MIDI)

It is based on the work of alfikpl, with his repo here: https://github.com/alfikpl/ao486

The ao486 is an x86 compatible Verilog core implementing all features of a 486 SX. The core was modeled and tested based on the Bochs software x86 implementation. Together with the 486 core, the ao486 project also contains a SoC capable of booting the Linux kernel version 3.13 and Microsoft Windows 95.

I'm using all default settings in the core.
CPU 486DX-33Mhz
RAM tested with both 256MB and 16MB settings

Hopefully this information is relevant.

@viti95
Copy link
Owner

viti95 commented Jul 22, 2024

I wish I had a Mister, I don't know really whats wrong in this case scenario. I've tested on my 386 and 486, and both work with SB sound and MIDI music (Sound Blaster 16 non-PnP / Sound Blaster AWE32 PnP and a X2GS). There has been reports similar to this one, but mostly were due to BLASTER settings not being set or incompatible Blaster settings. FastDoom requires it to be set (by hand or in the autoexec.bat), as this is a requirement from the Apogee Sound System (way different than DMX).

Also, does the Mister require sound hardware initialization? (with something like Unisound)

@FrenkelS
Copy link

Shameless plug: Does the music work in djdoom?
It uses similar sound code as FastDoom.

djdoom uses temporary files to convert the music in MUS format to MIDI, but no music is played when it's unable to write the temporary files because of not enough disk space or being run of a CD-ROM or another read-only disk.

@ezgoodnight
Copy link
Author

@viti95 Apparently it does not require the variable/driver install, that it will apparently work just fine without it and has fpga recreations of a few options for sound. Maybe there is a setting that will work? I can keep trying.

As good as it is, there are some issues with the core; I linked earlier how BOOM does not load. This is also potentially an issue on their end, I opened it here in case you could help with a workaround.

Since I can get FX and MIDI in FreeDOS on MiSTer, that is a reasonable solution.

It leads me to think there's something wrong with the setup that FreeDOS corrects, but I'm not sure what it would be considering other games work as intended in Windows/DOS and 6.22.

I'm happy to do any tests you might think of, and I'm trying to get some other users to replicate these errors to make sure it's not just me being stupid.

@FrenkelS I will give it a test.

@ezgoodnight
Copy link
Author

ezgoodnight commented Jul 22, 2024

OK this DOES solve the issue, and my FreeDOS install apparently DID have the answer.

The correct settings to add to AUTOEXEC.BAT are:

SET BLASTER=A220 I5 D1 H5 P330

With this setting both MIDI and FX should work on the ao486 core in DOS 6.22. Annoying the default setting does not work but I'm glad this one does. (I used "Sound Blaster" for MIDI and "Sound Blaster Direct" for FX)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants