joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.67k stars 379 forks source link

V-FAST mode support for PC-98 emulation #1765

Open AK5GH opened 4 years ago

AK5GH commented 4 years ago

It doesn't seem that the current emulation of PC-98 supports V-FAST mode for serial communication (1st CCU, as per the orginal io_rs.txt )

I was wondering how difficult would it be to implement this function using the existing serial port emulation, for example:

[serial] serial1 = directserial realport:COM1

In other words, please make it possible for the PC-98 emulation to take advantage of the modern PC hardware, (all serial ports have 16550 UART anyway)

Or would this be better to have a faster (> 9600 bps) serial communication implemented for the 2nd CCU (as per original io_2ndrs.txt or translated io_2ndrs.txt and use the serial2 emulation, such as:

[serial] serial2 = directserial realport:COM2

Either way, it would be extremely great to have a faster serial port accessible from the emulated PC-98 box (and mapped to the serial ports serial1 and serial2 described in the dosbox-x.conf file) Please let me know if it's possible.

Thanks a lot in advance!

joncampbell123 commented 4 years ago

To emulate PC-98, COM2 and higher will have to use the 16550 UART emulation already in place, mapped to PC-98 I/O ports for that device, and 8251 emulation will have to be written for COM1, which in turn will have to take it's baud rate from the PIT timer emulation (timer 2). Additional control bits that enable 8251 UART interrupts will have to come from the system PPI at 31h-37h odd.

AK5GH commented 2 years ago

Sorry, I stayed out of the loop for quite a bit. :(

@joncampbell123 Please let me know if any recent builds of DOSbox-X have any improvements related to subject? If not, are there any plans in the near future?

Either way, thanks a lot in advance!

joncampbell123 commented 2 years ago

As far as I understand it, COM2 and up are just 16550 UARTs instead of the 8250. DOSBox-X inherits the 8250 emulation from DOSBox SVN, so the existing 8250 emulation could be mapped to PC-98 mode if modified appropriately.

It's going to have to use different IRQ and I/O mappings of course, and it must ignore the IBM BIOS data area in PC-98 mode.

COM1 is going to have to emulate the 8251 and tie into the ports 31h-37h.

I don't have much time to work on DOSBox-X right now, my professional work needs my attention (clients don't want to record their meeting to MPEG files anymore, and they all use 1080i HD now and they want to record to MP4, so there's that).

rderooy commented 2 years ago

-staging has implemented more extensive emulation of different uart models.

AK5GH commented 2 years ago

@rderooy What do you mean? Could you elaborate, please? > -staging has implemented more extensive emulation of different uart models.

rderooy commented 2 years ago

Hmm, seems it is still not merged into the -staging main branch. https://github.com/dosbox-staging/dosbox-staging/commits/kc/serial-use-queue-1