Welcome, Guest. Please login or register.

Author Topic: Is It Emulation or Not -- the Dilemma  (Read 14805 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« on: October 14, 2012, 08:02:35 AM »
Quote from: danbeaver;711325
OK,

Here is the thread, so go at it: When you run software written for one computer (let us say an Amiga) on another computer (for instance a PC, MAC, or DEC PDP 11/40), what is it?


It depends. It is either binary compatibility or emulation. There is WINE (Wine is not an emulator) to enable Windows applications on Linux and Mac.

http://wiki.winehq.org/Debunking_Wine_Myths

Quote

WikiPedia: In computing, the "native" adjective refers to software or data formats supported by a certain system with minimal computational overhead and additional components. This word is used in such terms as native mode or native code.

Would not an "API" be an additional component?


If the API is not supplied with the OS then it is an additional component. For example Linux cant run Windows binaries natively. But it can run Windows applications without emulation if you add support for Windows binaries and API.
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #1 on: October 14, 2012, 08:09:44 AM »
Quote from: danbeaver;711368
An Amiga running 68K Apple code of a Mac (ShapeShifter or whatever), is emulation of an non-Amiga operating system on dissimilar hardware.


Correction: ShapeShifter doesnt emulate Mac OS. It only emulates run time environment for Mac OS so it thinks it is running on a real Mac.

It should be possible re-implement Mac OS API on Amiga and run Mac OS binaries without emulation.
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #2 on: October 16, 2012, 10:12:51 AM »
Quote from: psxphill;711560
What MorphOS does for 68k software is emulation, it's not native. Alot of emulators dynamically recompile executables into native code, AFAIK including WinUAE.

Dynamic recompile is not same as emulation. Emulators can utilize dynamic recompilation to gain speed.

If you write .NET applications in C# you dont get native code. The source code is translated to Common Intermediate Language and Windows dynamically recompiles your C# applications when executed. They dont necessarily run on Linux at all if you use Windows API.

You can write applications in C, C++ or AmigaE and compile object code to 68k but still target MorphOS only.
« Last Edit: October 16, 2012, 10:23:39 AM by itix »
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #3 on: October 16, 2012, 10:27:53 AM »
Quote from: danbeaver;711585
Thank you, you have finally agreed with us!  MorphOS is an emulation layer allowing Amiga software to run on non-Amiga hardware.


Wrong. It has a compatibility layer to run Amiga software natively.

If you mean there is an emulation layer to execute 68k code then we can agree. This emulation layer is not limited to 68k Amiga software but could be used to implement MacOS compatibility layer or execute 68k software written for MorphOS.
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #4 on: October 16, 2012, 10:50:19 AM »
Quote from: Karlos;711614
Shapeshifter is an interesting case. Back in the day, we called it an emulator because it "emulated" another system but in hindsight, it wasn't that clear cut. In today's parlance, I guess it could be viewed as an example of paravirtualization. Both the guest and host OS is patched in places by shapeshifter in order to make things work, but beyond intercepting traps, hardware calls and some patched guest OS functions, the binary code for both the MacOS and the executables running on it are basically running "natively" on the 68K processor in the Amiga.

If said patching were not necessary, then it would be straightforward virtualization.


Good point. As I have understood the definition, a paravirtualization requires support from the guest OS. But there is not much emulation either -- on the other hand MacOS binaries are not executed natively in AmigaOS.

On my XP I have got AROS on Virtual PC and Linux on VMware. Neither systems are emulated but I am not running Linux or AROS executables natively on XP either. After all Shapeshifter is not very far away from a virtual machine.
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #5 on: October 16, 2012, 10:57:47 AM »
Quote from: danbeaver;711682
Semantics ....

Yes you could call the emulation code a "compatibility layer;" works fine for me


It is not just semantics. There is no any kind of AmigaOS API emulation. Same API calls are used by MorphOS and AmigaOS. When you call AllocMem() from exec.library all executables call the exactly same vector from exec.library.
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Is It Emulation or Not -- the Dilemma
« Reply #6 on: October 16, 2012, 01:20:14 PM »
Quote from: psxphill;711691
a compatibility layer for mapping the 3.1 API onto MorphOS native API.

Pedantic mode on

In MorphOS, AmigaOS 3.1 API calls are not mapped to MorphOS native API. They are same.

In AmigaOS 4, AmigaOS 3.1 API calls are mapped to AmigaOS 4 native API. They are not same.

Pedantic mode off

I know I didnt add any value to this discussion now but hey... ;-)

I brought the compatibility layer to this discussion so it was my fault anyway :-)
« Last Edit: October 16, 2012, 01:24:02 PM by itix »
My Amigas: A500, Mac Mini and PowerBook