MiSTer-devel / ao486_MiSTer

ao486 port for MiSTer
Other
252 stars 69 forks source link

sound: Implement separate master, voice and MIDI volume control #131

Closed nanoant closed 10 months ago

nanoant commented 10 months ago

Hi @sorgelig. I decided to try learn something new, installed Quartus 17.0.2 on my gaming PC and managed to get what I was asking you on Patreon - SB16 mixer for voice and MIDI. I tested it in Little Big Adventure and I can nicely adjust music (OPL) volume now. Building the project took 24min on i5-12400F, not too bad.


Use 5-bit L/R master 0x30/0x31, voice 0x32/0x33, MIDI 0x34/0x35 according to Sound Blaster Series Hardware Programming Guide.

Additionaly:

  1. Fix master volume control use separate left and right volume.

  2. Restore mixing of DSP (voice) and OPL (MIDI) at the same level.

sorgelig commented 10 months ago

Did you try how it works under Windows?

nanoant commented 10 months ago

Did you try how it works under Windows?

Yup. Just tried under Win95 OSR 2.5. Both Wave and MIDI sliders work fine, also tried left & right balance, also works see below.

P. S. I understand that CD is mixed outside of SB16 signal path, right?

image

sorgelig commented 10 months ago

I understand that CD is mixed outside of SB16 signal path, right?

yes. I will check that thing.