I've made quite a bit of progress on this topic:
I've overcome my hesitation to deal with USB in order to get this to work properly 😀
This PCB ISA card is using an STM32H743 microcontroller to talk to the ISA bus.
I'm using an already open-source and freely available ISA backplane to connect to other cards and to supply voltages.
The backplane PCBs are very cheap and ISA slots are very expensive (~4$/pcs!), so it makes sense to be able to swap out the ISASTM card without needing to buy another set of ISA slots for 30$.
The STM32 is actually way too fast for the ISA bus when running at full speed, so I'll have to do some timing adjustments. For now, I'm running with -Og and debugging enabled, which slows the card down enough.
I'm still using the same serial protocol, but over USB CDC-ACM this time. This is nice because USB CDC is basically packetised data without needing to deal with libusb. I might still have to do that later (because "misusing" CDC ACM as a packet interface is an evil hack).
If anyone is interested, here's the PCB and firmware. Please don't buy any of these PCBs (yet), there are still some issues!
https://github.com/Manawyrm/ISASTM-Firmware/t … master/Core/Src
With the new setup (and some other code changes, mainly related to the memory write timing), VGA memory can now be written to:
My modded PCem can now use a real VGA card, a real Adlib card, detect and initialize ISA PnP devices. I'm still missing software support for interrupts and DMA (but the hardware has support for it).
[Video] Using an Aztech soundcard in Adlib mode in PCem:
[Video] Using a real Trident TVGA9000 VGA card in an emulator:
The scrolling performance is pretty bad, because scrolling needs to copy the whole screen content one line higher in the video memory. As reads are done as single bytes and USB transactions are polled, this takes a while.
I could implement a shadow video buffer on the PC and just reply directly to VGA memory reads, but I would need to support VGA paging/memory layouts. (don't think I'll do this soon).
Tested and working video cards: ATI VGA Wonder 16, TVGA9000 and TVGA8900. Each with their own video BIOS directly mapped.
The USB interface is currently using USB FS (12 MBit/s), not High Speed (480 MBit/s). The hardware has a seperate USB 2.0 HS connector with the appropriate transceiver chip, but that one needs a bit of configuration to work and I've never worked with USB 2.0 HS or ULPI transceivers before, so this will need some fiddling.