Reply 20 of 24, by dartfrog
- Rank
- Newbie
myne wrote on 2026-05-23, 14:54:Congratulations! As I said in pm, I always knew this was possible, it's all 1s and 0s. It was always a question of how much effo […]
Congratulations!
As I said in pm, I always knew this was possible, it's all 1s and 0s. It was always a question of how much effort it took.I haven't looked into your exact memory address scheme at the binary level, but it occurs to me that the pci space is likely to be broadly compatible. Iirc that's somewhere near 4gb.
We're talking kilobytes in a 32+gb world. Even if you incidentally reserve/block off an absurd size range, almost no one would notice or care.
Eg assuming the pci space is 1 bit below 4gb 01000000 00000000 xxxxxxxx xxxxxxxx
would map cleanly. No?
Then you just reserve the appropriate spare pci space and drop the first 16 bits. Modern and legacy both happy.
Thank you!
Yeah, I think the general idea is right; wasting a small alias/decode region is not really the problem on a modern machine. But we should make sure we are talking about the right address space. For the GUS path I'm using, this is mostly PCI/CPU side I/O port space, not normal MMIO near 4GB. The working model isn't really "reserve PCI memory near 4GB and drop upper bits" but rather "reserve/report an unused high I/O port alias and configure the bridge so the ISA side sees the legacy low port"
That said, the spirit of what you're saying matches what seems to work so far: the modern side can use a conflict free alias, while the legacy ISA card remains at its normal address. The address space cost is extremely tiny; the hard part is ensuring and making the bridge decode, DDMA, and IRQ behavior deterministically.
Tiny update: Current Status, ISA Bus Mastering and ISA Memory Windows.
There are four big transport classes: "PIO / port I/O", "ISA slave DMA / 8237 style DMA / DDMA", "ISA bus mastering", and finally "ISA memory windows / memory mapped ISA space". Here's what I have figured out so far:
PIO: yes, works.slave DDMA: yes, works.ISA bus master: supported by IT8888, but untested.ISA memory windows: supported by IT8888 positive memory decode, but untested.
I have a plausible sequence ready for testing for both Bus Master and Memory Windows. A 16bit ISA SCSI controller is probably the best candidate for Bus Master, and an ISA VGA card for Memory Windows.
If ISA bus mastering works, that opens up bus mastering SCSI controllers, some high performance NICs, storage adapters, acquisition cards, and other ISA devices that move data by taking control of the bus themselves instead of relying on ordinary 8237 slave DMA.
If ISA memory windows work, that opens up shared RAM NICs, option ROMs, dual port RAM cards, memory mapped industrial cards, framebufferish cards, and other devices that are not purely port IO.
You likely don't need to read these two quotes below, it's here for posterity sake and if you're curious/want to double check me on testing sequences.
wrote:ISA Bus Master Test Sequence: […]
ISA Bus Master Test Sequence:
Allocate physically contiguous low memory, preferably below 16MiB if possible.Fill it with a known pattern.Configure IT8888 Cfg_50h so that the target memory range is forwarded to PCI.Configure the card's DMA/bus master channel.Let the ISA card bus master read from or write to that physical address.Verify the host buffer changed or was consumed correctly.Watch MASTER#, DREQ, DACK#, MEMR#/MEMW#, IOCHRDY, IREQ#/IGNT# on the logic analyzer.Expected Signal States from ISA Bus Master Test Sequence:
DRQn assertedDACKn# assertedMASTER# asserted by cardSA/LA driven by cardMEMR# or MEMW# driven by cardIOCHRDY stretched by IT8888 if PCI side is not readyIREQ# asserted by IT8888IGNT# granted by PCI arbiterPCI memory cycle appears
wrote:ISA Memory Window / Memory-Mapped ISA Space Test Sequence: […]
ISA Memory Window / Memory-Mapped ISA Space Test Sequence:
Use an ISA card or test device that actually responds to ISA memory cycles.Configure one IT8888 positive memory decode window, Cfg_70h / 74h / 78h / 7Ch.Pick a host/PCI-side memory alias and a low ISA-side effective address.Map the host-side alias uncached in the Windows driver.Perform controlled 8-bit and/or 16-bit reads and writes through the mapped memory window.Verify that the ISA card sees MEMR#/MEMW#, not IOR#/IOW#.Verify that the ISA address lines match the expected low 24-bit ISA address.Verify readback data from a ROM/pattern device or write/read behavior from SRAM.Watch MEMR#, MEMW#, SA/LA, SD[15:0], MEMCS16#, IOCHRDY, and optionally NOWS# on the logic analyzer.ISA Memory Window Setup:
Host/PCI-side memory alias: 0xF3000000 - 0xF3003FFFExpected ISA-side memory address: 0x000D0000 - 0x000D3FFFSize: 16KiBAccess type: uncached memory reads/writes from the Windows driverExpected Software Behavior:
Read host alias + 0x0000 -> ISA card returns pattern byte for ISA address 0xD0000Read host alias + 0x0001 -> ISA card returns pattern byte for ISA address 0xD0001Write host alias + 0x0100 = 0x44Read host alias + 0x0100 -> returns 0x44, if using SRAM/test RAMBoundary test:Last byte inside window works.First byte outside window is not decoded or is rejected by the driver.Expected Signal States from ISA Memory Window Test:
For read:MEMR# assertedMEMW# inactiveIOR#/IOW# inactiveSA/LA = configured ISA base + offsetISA card drives SD[7:0] or SD[15:0]IOCHRDY may stretch cycle if neededFor write:MEMW# assertedMEMR# inactiveIOR#/IOW# inactiveSA/LA = configured ISA base + offsetIT8888 drives SD[7:0] or SD[15:0]IOCHRDY may stretch cycle if neededFor ISA memory windows, I need a card or test device that decodes MEMR#/MEMW# in memory space. A simple SRAM/ROM ISA test card might bethe simplest and cleanest proof but a VGA card is much more common.
Possible Failure Modes:
Reads all 0xFF: nothing decoded the memory cycle, wrong base/window, or floating bus.Reads all 0x00: card not driving data, wrong decode, wrong width, or pull-down/floating behavior.IOR#/IOW# pulses instead of MEMR#/MEMW#: accidentally testing port I/O, not memory space.Wrong address on SA/LA: IT8888 memory decode register encoded wrong, or confusion between host alias and ISA low 24bit address.System hang/fault: host memory alias not reserved/mapped correctly, bridge did not claim the cycle, or PCI side rejected the access.
FWIW, I will likely build another card soon that utilizes my IT8888G to IT8888F adapter PCB. That way I can ensure the G variant works the same as the F variant and develop patches for G in case they differ. (Been working only with the F version so far). Fairly certain they are exactly the same and just in a different package/footprint. I think the next PCB revision will have both G and F footprints directly on the card and connected so there is no need for an extra adapter PCB. Electrically speaking both the G and F are exactly the same from what I remember, the G version is just BGA and requires a 4layer board for signal breakout, but the price per card difference of 2 to 4 layer is largely minimal now.
Potential PCIe-to-PCI-to-ISA pathway repository: https://github.com/DartFrogTek/PCIe-PCI-ISA
Using KMDF driver on Win10 PicoGUS PLAYS DOOM SAMPLES VIA PORT IO & DMA!