• asexualchangeling
    link
    fedilink
    arrow-up
    2
    ·
    8 months ago

    I’m no expert so id love to be proven wrong but Emulation has more of an overhead than a translation layer, so that probably wouldn’t work as well

    • uis@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Not sure what point you trying to make. Translation is just one of ways to emulate.

      • asexualchangeling
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        8 months ago

        Emulation is from one architecture to another, translation layers like wine just translate windows instructions to linux, see also: every WIP ps4 “emulator” is just a translation layer, and doesn’t have the over head that it would if it was your traditional emulator

        • uis@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          8 months ago

          This… Is not exactly how it works.

          The way windows ABI works is syscalls always should go through dynamic libraries first, while on linux syscalls do syscall instruction/*. How windows syscalls work allows project like WINE just implement those libraries that will do linux syscalls. No instructions translated.

          But with other architectures story is different. You either make instruction decoder for processor, make interpreter or make binary translator. First is itanium-way, second is naive way and third is how everyone does. Third is basically compiling one machine code to another. It has overhead of, well, compiling one machine code to another. And it works badly with other JIT compilers.

          *there is vDSO, which is dynamic library, that implements syscalls like getting time. It is totally optional.

          • asexualchangeling
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            8 months ago

            As I said, I’m not expert, thanks for the info, I’ll look that stuff up more when I have time

          • frezik@midwest.social
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            One thing you can do is translate 3d APIs. This sometimes makes 3d consoles easier to emulate than 2d consoles. PS1 emulation was basically solved when SNES emulation was playable but still had noticeable bugs.