VOGONS


MartyPC

Topic actions

Reply 400 of 401, by GloriousCow

User metadata
Rank Member
Rank
Member

I've updated https://martypc.net with a new build.

You can jump directly to Area 5150
https://martypc.net/?mount=fd:0:Area%20 ... rsion).img

Or try an IBM PCjr
https://martypc.net/?machine_config_name=ibm_pcjr

No ROMS are directly downloadable, so I hope this doesn't break any rules.

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 401 of 401, by superfury

User metadata
Rank l33t++
Rank
l33t++

Thinking about upgrading my Sound Blaster 2.o to a Sound Blaster Pro (CT1330) though. Just double the OPL2 chips and mixer support added (no tricky OPL3 stuff or custom MIDI synth required).

I'd need to make the existing OPL2 chip emulation modular (like the CPU) though, to make it emulate two chips simultaneously.

Edit: Got a SoundBlaster Pro full version ready to verify and commit. Don't have a PC on hand eight now, so it's still stored on my local storage. After compiler validation it can go into the git repo to verify against software.

The basic dual-OPL2 I've already implemented there. And I'll still need to implement the volume controls (mapping the register values to amplification factors and apply them to various hardware) and input/output filters of the card.

Oddly, Dosbox calls the MIDI volume control (register 26h) register in the mixer the FM volume control instead? Is that an error in the official documentation or an error in Dosbox?
Edit: Gotten a basic implementation implemented, with stereo support. Although stuff like volume and input control isn't implemented yet (registers not masking off unused bits and the registers having no effect), the basic Sound Blaster Pro should be implemented. All that's mainly left now is to verify it (and implement those volume controls ofc).
Edit: A small bugfix: stereo mode seems to require high speed mode (command 90h or 98h). Examples in documentation render a single mono sample before starting the stream with a high speed command, where stereo would fail if command 14h (in the example given in the documentation) would render a single byte buffer in stereo before the steam starts properly. So thus only high speed commands seem to be affected by these settings.
Edit: Managed to implement a basic mixer, calculating volumes for the different possible audio sources.
Although the actual multiplication factors that are calculated aren't applied to the various input/output devices audio inputs/outputs yet.
Edit: Most volume settings are applied now. Only sound input (unknown if it's Mic or Line in that's applied) and MIDI output (since it's a different device that's rendering) isn't applied. Master volume is now mapped onto all channels that are available (voice, FM, CD audio, Game Blaster (although not having a dedicated volume control, using the master volume only and a static 100% volume otherwise). So only inputs aren't applied, together with external hardware (Game Blaster card at an alternative address being applied master volume only).

Edit: I notice something odd though. The setup of the Sound Blaster Pro (not Pro 2!) reports the sound card as a Sound Blaster Pro 2 for some reason? The DSP version should be 3.00, so that's not a Pro 2? Various documentation I can find confirms that.
It's also the only command I see it executing during setup until that message appears?
Edit: I clearly see it executing just a DSP version command, which returns version 3.00. But the MS-DOS setup wizard still tells me it's detected a Pro 2 card?
Edit: Found a bug in the OPL2 chip emulation where the low status bits (lower 5 bits) were cleared. It's supposed to be reporting bits 1 and 2 set (according to Dosbox and 86box, just two emulators I cross-checked real quick). In this case looking at the code of the setup wizard that detects the sound card installed reads those ports and takes a different path if those aren't setup properly. Maybe that's the cause of the board being detected as a Pro 2 card?
Edit: Linux OPL2/3 drivers seem to agree?
https://android.googlesource.com/kernel/msm/+ … /opl3_lib.c#136
Edit: Fixing that, together with OPL2 left/right chip selection (for ports baseaddr+0 through baseaddr+3 as well as for port 388h/389h), the Sound Blaster Pro is now properly detected. 😁

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io