Well, where to begin:
for x86 (PC) platforms, you have virtualization, either through vmware (esxi/fusion/etc.) or Hyper-V. Hardware pass-through for things like dongles are ‘sort of’ supported- your mileage may vary.
for non-PC platforms, it’s entirely dependent on if someone’s written an emulator for that platform, and how well it works. I can tell you that no one that I’m aware of has written anything like an OS/400 / iSeries emulator (at least not outside of IBM; they might have something buried away in an R&D lab or archive somewhere that’s unlikely to see the light of day.)
There are emulators for Apple ][e, Commodore 64 family, and various Amiga iterations; hardware connectivity for peripherals can be… interesting to finagle; there are hardware dongles and programs to capture disk images.