-
Notifications
You must be signed in to change notification settings - Fork 33
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
SIS 7012 support #27
Comments
Ok, so i shortly had audio output working in two situations now (with Duke3D demo, the intro FM synth music + the sound effects, and once with just the FM synth music, as SFX was disabled in setup then), but not sure what I did, and once the main menu was loaded, there was no more sound. It's also hard to reproduce, after a cold boot it usually doesn't work, but sometimes it does - once, and often it just doesn't output anything. New patch + test EXE attached (use at your own risk, etc. etc). |
Additional reference material: FreeBSD driver: https://cgit.freebsd.org/src/tree/sys/dev/sound/pci/ich.c |
WIP code now here (still not working properly, only spuriously and for short periods): |
Proposed PR: #29 |
I tested it on my HP T5720, and the sound was successfully produced under MS-DOS! |
Cool! Could you also test the build here to see if it also works? It cleans up some things that the "wip-v2" version doesn't have yet: https://github.com/thp/sbemu/releases/tag/1.0beta3-sis7012 |
Very interesting! Would the same modifications also work on the M5455 as found in some HPT5710? LSPCI: 00:04.0 Multimedia audio controller: ULi Electronics Inc. M5455 PCI AC-Link Controller Audio Device (rev 10) And also both seem to be using the same intel8x0.c in Linux |
No, SIS 7012 support doesn't add ALI M5455 support, but you can use the Linux driver as a reference to add support. |
Already posted on the Vogons thread, but here for completeness and to track progress:
While looking for information on SIS7012, I found (as also mentioned in this thread) that it's mostly Intel ICH with some modifications. As I have a machine with a SIS7012, and sound output works great in Linux, I looked at the kernel sources. The SIS7012 driver is indeed implement in the same driver as the Intel ICH (sound/pci/intel8x0.c), and MPXPlay's sources also mention that it's based on ALSA (Linux driver) and ICH-DOS.
So, a quick look shows these changes are necessary between SIS7012 and "normal" ICH audio (refer to sound/pci/intel8x0.c in Linux):
SIS7012 swaps the PICB (position in current buffer, offset 0x08) and SR (status, offset 0x06) registers, this is put into "roff_sr" and "roff_picb" of the ichdev, and then used throughout; would need checking/updating to fix all the occurences and swap around
I already tried patching and building a modified SBEMU, and it initializes and stuff, but no audio output is happening and PCM audio output locks up or cannot be initialized (SB emu side), OPL register writes seem to work, but again no audio output. Add to this some annoyances such as upper/lower case filenames and backslashes as path separator in #include directives, and compiling SBEMU on Linux is quite annoying (I use a recent DJGPP version to cross-compile on Linux).
Also, here's some debug output I get with my modified SBEMU (due to testing, some messages might not 100% match with the patch attached):
WIP patch that doesn't work attached (I can turn this into a pull request once it starts working somewhat): sis7012-wip.patch
The text was updated successfully, but these errors were encountered: