‹ BackHN Continuity

Thread

Ask HN: Who's still keeping a DOS machine up because the business depends on it?

297 points · 304 comments · mlaux

  1. andix · · focus · HN ↗
    Just out of curiosity: is it possible to somehow attach an ISA Adapter via USB to a VM? ISA does depend a lot on DMA and timing, but the clock is only 8 mhz and gives a software layer on a modern cpu a lot of time to do stuff between ISA bus cycles.

    Keeping old hardware running is very fragile. Most spare parts are decades old now too, and nobody knows if they still work properly.

    1. lysace · · focus · HN ↗
      USB and VM latencies are both questionable here, I would think.

      ISA motherboards still work and have been mass produced in the hundreds of millions. (I have about a dozen in my retro closet.)

      The esoteric ISA expansion cards would be the bottleneck, not the motherboards.

      1. andix · · focus · HN ↗
        All those layers add some latency, but 8 mhz is really slow. USB 4 can do extremely low latency, otherwise PCIe over USB wouldn't work.
        1. lysace · · focus · HN ↗
          This looks quite interesting:

          <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;vintagecomputing&#x2F;comments&#x2F;jbaw38&#x2F;isaoverusb_using_real_isa_cards_in_an_emulator&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;vintagecomputing&#x2F;comments&#x2F;jbaw38&#x2F;is... (2020)

          ISA-over-USB, using real ISA cards in an emulator

          <a href="https:&#x2F;&#x2F;github.com&#x2F;Manawyrm&#x2F;ISASTM&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Manawyrm&#x2F;ISASTM&#x2F;

        2. labcomputer · · focus · HN ↗
          The problem is that a lot of those old ISA drivers were peeking and poking card registers as fast as the bus would allow, which was over 1 MHz (less than 1 microsecond per transaction), not DMAing data to RAM (though some did that too).

          With a modern 4 GHz CPU, that means your budget is only 4000 clocks per interrupt. The context save alone can make it hard to hit 1MHz, and you really want to have your interrupt code pinned to the L1 cache because a few memory reads will blow your entire budget.

          As nice as USB4 is, I’ve never heard anyone claim it has single-digit microsecond latency, to say nothing of sub-microsecond latency. The typically-quoted ~20 usec latency of USB4 limits it to around 50 kHz for an emulated ISA card.

          1. rdtsc · · focus · HN ↗
            Often people confuse latency vs throughput&#x2F;bandwidth. With streaming and batching USB4 will shuffle a lot data through on average per second. But it will never hit reliable microsecond level or even submicrosecond latencies.

            At the same time ISA card will never reach 40Gbps throughout with CPU clocking at tens of MHz only or often less.

    2. Teknoman117 · · focus · HN ↗
      To a VM? Possibly.

      The DMA might actually be the easy part.

      The main concern is how many VM exits per second a modern CPU can handle. Even though the interface is &quot;slow&quot;, you can probably do ~500k to 1 million IN&#x2F;OUTs or MOVs per second to ISA. You&#x27;d have to trap (VM exit) every access to a IO port or memory within the ISA window.

      During the pandemic I cobbled together a KVM-accelerated emulator for an old 386EX based board I had and trapping every memory access to IO was slower than the real hardware.

    3. foresto · · focus · HN ↗
      Or maybe expose the LPC bus to a VM, and wire the relevant lines to an ISA bridge?

      <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Low_Pin_Count#ISA-compatible_operation" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Low_Pin_Count#ISA-compatible_o...

      <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=putHMSzu5og&amp;t=208s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=putHMSzu5og&amp;t=208s

      <a href="https:&#x2F;&#x2F;github.com&#x2F;rasteri&#x2F;dISAppointment" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rasteri&#x2F;dISAppointment

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.