English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 25 June 2018, 22:18   #1
dommer
Registered User
 
Join Date: Jun 2018
Location: USA
Posts: 18
Happy How does the Apple Emulator work?

Hi,

I have my little A500 here and I've heard it said a few times that "The Amiga was the Fastest Apple Computer ever made". So how does that even work?

I understand that they are both M68K based, but is it emulation or is it more like a KVM sorta deal? Would I be able to take advantage of that on my A500 or 2000?

Here is a video for reference:

[ Show youtube player ]

Thanks.
dommer is offline  
Old 25 June 2018, 22:22   #2
Pyromania
Moderator
 
Pyromania's Avatar
 
Join Date: Jan 2002
Location: Chicago, IL
Posts: 3,375
Apple II Forever!

I never actually owned one. Emulator is good though.
Pyromania is offline  
Old 25 June 2018, 23:15   #3
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
It's not really an emulator. A patched copy of the Mac OS is running directly on AmigaOS.

As far as I know there is nothing like a VM for the Amiga. The hardware of some 030/040/060s support it.
nogginthenog is offline  
Old 26 June 2018, 00:28   #5
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quote:
Originally Posted by dommer View Post
Hi,

I have my little A500 here and I've heard it said a few times that "The Amiga was the Fastest Apple Computer ever made". So how does that even work?

I understand that they are both M68K based, but is it emulation or is it more like a KVM sorta deal? Would I be able to take advantage of that on my A500 or 2000?

Here is a video for reference:

[ Show youtube player ]

Thanks.
Basically its not really an emulator in the strictest sense, because it doesn't have to interpret the main processor because its the same as the Amiga, so the Mac code runs at the same speed on the Amiga.

Unlike the Atari ST and the Amiga, you couldn't bang the hardware directly on the Mac, because it didn't really have much in the way of hardware.

On Amiga or ST, if you wanted to change a colour, you could directly change the value in the hardware register instead of going through the system.

On the Mac, if you wanted to do the same, you had to go through the system, Apple didn't encourage nor want anyone to write directly to any hardware addresses, for the simple reason that if Apple changes the hardware, your programs will still work, because they are writing to the system which then interprets that for the hardware.

And because Mac programs don't bang the hardware, every program is system compliant which means that there are no issues with letting the code run on Amiga because there will never be any strange accesses to hardware that are not emulated.

So Shapeshifter patches all those system calls in MacOS to something that will work on Amiga hardware, and its all done transparently, as far as the Mac programs are concerned, they are running in the same environment as a real Mac, so there are few problems.
Galahad/FLT is offline  
Old 26 June 2018, 04:16   #6
dommer
Registered User
 
Join Date: Jun 2018
Location: USA
Posts: 18
Quote:
Originally Posted by Galahad/FLT View Post
Basically its not really an emulator in the strictest sense, because it doesn't have to interpret the main processor because its the same as the Amiga, so the Mac code runs at the same speed on the Amiga.

Unlike the Atari ST and the Amiga, you couldn't bang the hardware directly on the Mac, because it didn't really have much in the way of hardware.

On Amiga or ST, if you wanted to change a colour, you could directly change the value in the hardware register instead of going through the system.

On the Mac, if you wanted to do the same, you had to go through the system, Apple didn't encourage nor want anyone to write directly to any hardware addresses, for the simple reason that if Apple changes the hardware, your programs will still work, because they are writing to the system which then interprets that for the hardware.

And because Mac programs don't bang the hardware, every program is system compliant which means that there are no issues with letting the code run on Amiga because there will never be any strange accesses to hardware that are not emulated.

So Shapeshifter patches all those system calls in MacOS to something that will work on Amiga hardware, and its all done transparently, as far as the Mac programs are concerned, they are running in the same environment as a real Mac, so there are few problems.
Oh shit hi galahad. Tis an honor.

Thanks. I'm relatively new to the amiga world and I'm trying to learn as much as I can!
dommer is offline  
Old 26 July 2018, 19:47   #7
Paulee_Bow
Registered User
 
Paulee_Bow's Avatar
 
Join Date: Jul 2018
Location: Birmingham, UK
Posts: 185
I was wondering how this worked. It’s very clever.
Paulee_Bow is offline  
Old 27 July 2018, 12:05   #8
RedskullDC
Digital Corruption
 
RedskullDC's Avatar
 
Join Date: Jan 2007
Location: Dorrigo/Australia
Age: 60
Posts: 355
Hi Galahad, et al.


Quote:
Originally Posted by Galahad/FLT View Post
So Shapeshifter patches all those system calls in MacOS to something that will work on Amiga hardware, and its all done transparently, as far as the Mac programs are concerned, they are running in the same environment as a real Mac, so there are few problems.

To elaborate slightly on Galahad's already eloquent answer ....


MAC OS makes use of a number of the 68K "Trap" vectors, effectively they make for very quick subroutine calls.


Programs on the earlier MACs (128K, +plus) were more likely to hit the metal directly, though that pretty much disappeared once the colour machines appeared, since the internal architecture was quite a bit different.
Apple also explicitly discouraged direct hardware programming by this point.


Cheers,
Red
RedskullDC is offline  
Old 27 July 2018, 16:22   #9
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Quote:
Originally Posted by RedskullDC View Post
Hi Galahad, et al.





To elaborate slightly on Galahad's already eloquent answer ....


MAC OS makes use of a number of the 68K "Trap" vectors, effectively they make for very quick subroutine calls.


Programs on the earlier MACs (128K, +plus) were more likely to hit the metal directly, though that pretty much disappeared once the colour machines appeared, since the internal architecture was quite a bit different.
Apple also explicitly discouraged direct hardware programming by this point.


Cheers,
Red
Commodore also discouraged direct bang of the hardware, but the clean way is so slow, you can't get decent scroll even on Amiga 1200 without locking the system and directly banging the hardware. Hopefully for the Mac, it didn't have many custom chips, so nobody was bothering doing something clever with them.
drHirudo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Get Games To Work In ACE (Atari 800 Emulator) CU_AMiGA support.Apps 5 18 January 2018 06:36
PC Controller work with Dolphin Emulator? AF2013 Retrogaming General Discussion 3 18 May 2015 16:38
iPhone iPod touch Amiga emulator - how does it work? Bloodwych Retrogaming General Discussion 8 19 February 2010 10:10
Apple ok iPhone C64 emulator alexh Retrogaming General Discussion 7 25 September 2009 10:27
PS2 Amiga Emulator - how does it work? Zebula77 support.OtherUAE 1 24 February 2006 14:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10519 seconds with 13 queries