-
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
MPU-401 UART mode support #67
Comments
Amazing addition! I've been hoping that this would be added to SBEMU in the short term. Thanks for helping out with this. ❤️
Correct. This is due to modern motherboards with PCI Express buses not supporting a certain feature called "subtractive decode" in their PCI-to-PCI bridges. This document on the Internet Archive provides some more information on that limitation. One thing that would improve this is if you looked up the base addresses in the BIOS Data Area (BDA), instead of hard-coding them. That would also make it compatible with modern systems that have serial ports on PCIe expansion cards that don't have access to the <1024 legacy I/O addresses. (I don't think you can look up the IRQs through the BDA, but I believe you don't need the IRQs when you are only outputting data over the serial ports. Is that correct?) |
Cool, I'll check it out in no time |
It doesn't matter, although performing checks will be better. |
Cool beans! This works in DOSBox and the two motherboards that I tested on. @crazii |
Yes. |
Pull request #71 submitted.
Actually the driver was needed. It was being loaded from autoexec.bat. |
Impressive stuff! Is it possible to add USB serial support for netbooks without COM ports? |
Regarding USB serial support, it is theoretically possible. If DOSUSB.COM works, then use LISTDEVS.EXE to find the device address of the "USB-Serial Controller." I confirmed that the SERIAL.EXE program actually works. EDIT: The downloadable demo of DOSUSB works, but it is time limited, it stops working after a few minutes. |
There's CDC driver in USBDDOS which support serial protocol, but it needs extra work to install on dos . |
|
USBDOS is something else. Now there are at least 3 projects: USBDOS, DOSUSB, and USBDDOS. Your USB adapter is called "USB2.0-Ser!" ? Can you try crazii's USBDDOS? It should just skip your serial adapter. |
USB devices are on usb bus and not directly managed by PCI bios, I don't think they have common IO adress. Only the USB host controller is directly on PCI bus and visible to the system. |
I think I'll wait for the USB midi driver ;-) This would enable to just hook up an ethernet cable between the dos computer and an mt32pi
|
Do you have a working packet driver for your netbook? Your mt32pi has both an ethernet port and a serial port? |
Yes I have a working ODI driver for my NIC, using ODIPKT I can get Michael's mTCP stack working. The interesting part is that for Midi we do not need to receive anything ;-) It's all fire and forget on ethernet frame level, provided if you spoof the source mac/ip and use broadcast to reach the mt32pi. mt32pi has an ethernet port and supports Midi over UTP: https://github.com/dwhinham/mt32-pi/wiki/Networking%3A-UDP-MIDI. I also have a serial cable connected to the mt32pi; as well as an USB midi cable. All work with my other motherboard on regular Midi or SoftMPU over serial. But my netbook has neither. First I was trying to hack support into SoftMPU; but because it did not work together with VSHDA/SBEMU, and did not working with protected mode I added feature requests for both. But with your excellent work it would be better to go this route ;-) I'll await your progress on the pl2303. |
I added MPU-401 UART mode support that works in protected mode for Doom etc.
You can use your Roland/Yamaha/... modules using a serial port.
The main patch/commit is here:
jiyunomegami@10f84fd
Note that there is a minor error in the /MCOM usage message fixed in a later commit.
I posted a binary to vogons here: https://www.vogons.org/viewtopic.php?f=62&t=98071
Could this be merged into SBEMU as is or are there some changes that should be made?
There is another option, /MDBG2 that changes the speed of the /DBG serial port from 9600 baud to 115200 baud. This is necessary to provide a hex dump of the MIDI data, since MIDI data is transmitted at 38400 baud.
A related question about serial ports:
For /DBG and /MCOM, you can specify 1-4 for COM1-COM4, or 8-9 for D040-D050.
D040 and D050 just happen to be where the two ports on my PCI serial IF card are mapped to.
Furthermore, you can specify an address, for example /MCOM3f8 will use COM1 and /COMd050 will use the port mapped to d050.
I didn't bother to check the provided address, so if you use /MCOM5 it will try to read and write from address 5 and address 6.
Should the provided address be checked, or does it really matter?
It seems that modern platforms don't work with PCI devices mapped to "legacy addresses" under 1024, so some support for specifying an arbitrary address is needed.
When the specified value is not 1-4 or 8-9, would it be OK to check if the value is >= 1024 and an even number?
I think 8: D040 and 9: D050 can be left in for convenience, since some drivers should allow mapping to arbitrary addresses.
The text was updated successfully, but these errors were encountered: