Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiNewsWebinar

All About Apple ARM on the Desktop

logo only 3814018

For years Intel and AMD’s x86 architecture has ruled the desktop, while ARM dominated mobile platforms. Now ARM is making inroads onto the desktop. There are multiple versions of the M1, and the 2nd generation M2 is now available. With a shared CPU architecture, iOS and iPad apps can run on macOS, improving the simulator for app development. Most recently, the ARM architecture came full circle with the desktop M1 processor powering the iPad Airs.

In this webinar, learn the latest about Apple’s ARM silicon. See Delphi 11.2 deploying to macOS ARM and the updated iOS Simulator. Also, learn the ins and outs of running Windows and Linux in a Virtual Machine on Apple Silicon.

Slides

Replay

Overview

The development of Apple Silicon has made running an emulator or a virtual machine on MacOS challenging. In general, MacOS supports two architectures:

  • x64, or x86_64, which is the architecture of 64-bit Intel CPUs. All the Intel-powered Macs shipped from 2005 to 2020 followed this architecture.
  • arm64 is the architecture followed by Macs powered by Apple Silicon. Every Mac shipped from late 2020 up till now follows the arm64 architecture.

All new Apple computers are build using Apple’s silicon series—M1, M1 Pro, M1 Max, M1 Ultra, and M2—built using the ARM architecture.

To help you get started in this regard, we have crafted this guide. Here, we cover virtualization frameworks you will have if you want to run Windows, Linux, etc., on macOS powered by Apple silicon. This guide will cover the following topics:

Introduction to ARM 

ARM Holdings Inc. designs system-on-chips (SoCs), software, and processors. Founded as Advanced RISC Machines in 1990, ARM has built its processors on RISC (Reduced Instruction Set Computer).

ARM is among the most widely licensed processors worldwide. These processors are designed for low cost, low power, embedded and portable devices—smartphones, wireless communications technologies, networking modules, etc.

ARM processors are built on a load-and-store type architecture. According to this architecture, data processing is executed only on the data present in the registers and not directly on the memory contents. As a result, these processors follow data processing instructions that differ from those used for accessing the memory.

arm-v-x86-7766768

ARM’s instruction set is fixed in length and follows uniformity. Every 32-bit ARM processor will have two instruction sets—a 16-bit thumb instruction set and a generic 32-bit ARM instruction set. Additionally, ARM supports 64-bit instruction sets too. Moreover, ARM processors support different stages of pipelines to accelerate the instructional flow.

Comparing ARM with x86

Many computing devices have either an Intel processor or an ARM processor. Both of these chip architectures are well-optimized for consuming low power. However, when we view things from a technical standpoint, the ARM architecture is engineered to minimize energy waste—on the contrary, Intel’s processors have a complicated design that helps in interoperability.

The computers designed around AMD and Intel are different from the ones built on ARM architecture. Many differences set the ARM architecture apart from Intel (x86). Unlike a conventional x86-driven computer, ARM chips are application-specific. Here is a list of differences that separate ARM processors from x86 processors.

ARMx86
Targets energy-efficiencyDrives performance
Based on the RISC architecture paradigmBuilt on the CISC (Complex Instruction Set Computing) architecture paradigm
Executes one instruction per cyclePerforms multiple complex instructions at one time and requires more than one cycle
Code expansion management is challengingManages code expansion easily
Requires fewer registers but more memoryRequires less memory but more registers
Instruction pipelining is a unique featurePipelining is less often
Accelerates the pace of executionThe execution turnaround is high
Adheres to a software approach to optimize performanceFollows a hardware approach to fine-tune performance
Instruction execution is fastThe time to execute is low
Complex addressing is solely managed by softwareBuilt-in capabilities to handle complex addresses
Operations management is done with the help of a compiler onlyA microprogram plays the role of a compiler
Instruction decoding is handled seamlesslyManaging instruction decoding is a challenge
Calculations are performed with the help of the available memorySupplementary memory is required to perform calculations
Only one complex instruction is executed at one timeIts architecture is robust enough to handle complex statement executions at one time

Meet Apple’s ARM Silicon Family

apple-m1-chip-series-white-8571889

Apple Inc. uses the ARM architecture to build its silicon, which is available as a system in a package or an system on chip (SoC). This silicon family powers the latest Mac computers and Apple devices—iPhone, iPad, Apple TV, Apple Watch, AirTag, etc.

Apple M1

apple-m1-core-1337318

This is Apple’s first SoC, which is fabricated using a 5 nm process. Rolled out on November 10, 2020, the M1 was used in MacBook Air, Mac mini, MacBook Pro, iMac, iPad, etc. With 16 billion transistors, the chip houses four efficiency cores and four performance cores and packs up to a whopping eight GPU cores.

Apple M1 Pro

apple-m1-pro-7702840

Launched on October 18, 2021, M1 Pro is an exceptional performance powerhouse found in 16- and 14-inch MacBook Pro. The chip comes with two efficiency cores, up to eight performance cores, and up to 16 GPU cores. The chip packs 16 Neural Engine cores, a 32 GB unified RAM with almost 200 GB/sec. memory bandwidth, and over 32 billion transistors.

Apple M1 Max

m1-max-overview-3773313

The M1 Max is a bigger version of the M1 Pro. This chip has two efficiency cores, eight performance cores, up to 32 GPU cores, 16 Neural Engine cores, and up to 64 GB unified RAM with nearly 400 GB/sec. memory bandwidth. Announced on October 18, 2021, the M1 Max comes with Mac Studio and both 16- and 14-inch MacBook Pro.

Apple M1 Ultra

Apple M1 Ultra Summary

Rolled out on March 8, 2022, an M1 Ultra chip is made from fusing two M1 Max chips. Being an optional upgrade for the Mac Studio, the chip packs enormous 114 billion transistors, four efficiency cores, four performance cores, 32 Neural Engine cores, and up to 64 GPU cores. The SoC can be configured with 128 GB unified RAM that comes with a solid 800 GB/sec. memory bandwidth.

Apple M2

apple_m2-7867669

Rolled out on June 6, 2022, the M2 chip came with the new MacBook Air and the all-new 13-inch MacBook Pro. As a successor of Apple M1, the M2 chip is based on improved 5-nm technology. The chip houses over 20 billion transistors and can be included with up to 24 GB of RAM and 2TB of storage. The M2 chip has four efficiency cores and four performance cores and includes up to 10 GPU cores. Moreover, the M2 even includes a higher memory bandwidth of nearly 100 GB/sec.

apple-m2-chip-m1-chip-light-5928234

Moore’s Law

Moore’s law—named after Intel’s cofounder, Gordon Moore—states that the number of transistors present in a chip increases after a space of 18 months. And, no doubt, with the fabrication of mammoth chips, including M1 Ultra, Apple is putting Moore’s Law to use effectively.

transistor-count-over-time-7340251
apple-arm-series-cpu-transisters-1851849

Steps to Run iOS Apps on macOS

Working on your smartphone or iPad means you may have to transfer workflows to your MacBook or other Apple computers running on macOS. Earlier, if Apple users wanted to run an iOS app on their Apple computer, they would have to resort to emulators, third-party applications, and other non-official methods.

But if you own an Apple silicon computer running on the M1 chip and have Big Sur iOS, you will run your iPhone or iPad apps seamlessly. Follow these steps to download iOS Apps on your new Mac powered by Apple’s homegrown SoC.

  • Step 1: Launch the App Store on your Mac machine.
  • Step 2: Key in the name of the app in the search field.
  • Step 3: Select the app you want to download from the search results.
  • Step 4: Click on the Get button positioned next to the app you wish to download.
  • Step 5: Download the app and use it on your Mac.

The New ARM–Based iOS Simulator

Select the iOS Simulator Target Device

You will use an iOS simulator to interact with apps on multiple devices. An iOS simulator also helps you use a pointer and keyboard, prototype and debug apps, optimize graphics, and test apps. With the presence of Apple silicon, developers have to build ARM–based iOS simulators.

Previously, simulators ran x86 compiled apps. However, the new simulators are designed to run ARM–compiled apps. The new ARM–based iOS simulators that are designed to run on ARM MacOS are supported by Delphi 11.2.

 This new breed of iOS simulators can have extended testing capabilities when compared with their predecessors. Here is a list of targeted platforms—Windows, Android, and iOS—the new iOS simulators will support.

Comparing Virtualization Stacks for the Machines Powered by Apple Silicon

Most computer users face a scenario where they will need to run different operating systems on their respective machines powered by Apple silicon. This situation will want users to run alternative operating systems on their machines. Enter virtualization stacks. The following table compares the most popular virtualization stacks.

utm-vm-2645861
UTM
parallels-windows-2891568
Parallels Desktop
vmware_fusion_logo-4442970
VMware Fusion
An open-source virtual machine environment to run ARM64 operating systems
Parallels was the first to support the Apple ARM processor  
VMware Fusion’s ARM support is still in tech preview
Supports both virtualization and emulation
Supports executing operating systems based on ARM architecture: Windows, Linux, and macOS
VMware Fusion’s technical road map is unclear as it is still in public tech preview
Allows emulating x86_64 architectures on ARM
No plans to offer emulation capabilities
No plans to offer emulation capabilities

Installing and Using Windows 11 on Apple ARM

Microsoft has an ARM version of Windows, but running it on Apple ARM is not officially supported. The ARM Windows includes compatibility for 32-bit and 64-bit x86 binaries. Windows programs that explicitly check the CPU architecture may face some issues when running on a virtual machine (VM).

The easiest way to run ARM Windows on Apple ARM is with Parallels VM.

image-2835696
Parallels only supports ARM architecture Operating Systems on ARM hardware.
image-7840349
Will automatically download and install Windows ARM
image-6924660
Optionally change the edition you are installing

Installing and Running 64-Bit Linux x86 with UTM

There may be times when you will have to install an operating system with a different architecture than the host machine. In that case, you will need emulation. When it comes to emulation, UTM is a go-to option as it supports not only emulation but also virtualization. UTM uses Qemu to provide emulation. Here are some steps to follow for installing and running 64-bit Linux x86 with UTM.

image-2261239
Choose Emulate when the OS doesn’t match the hardware
  • Step 1: Install UTM from mac.getutm.app
  • Step 2: Download the ISO of 64-bit x86 Linux.
  • Step 3: Once you arrive on the UTM welcome screen, select “Create New Virtual Machine”.
  • Step 4: You will then have to choose between two options—Emulate or Virtualize. As x86 ISO will not match the ARM hardware, you must choose “Emulate”.
  • Step 5: You will go to a page where you will have to choose the operating systems—Windows, Linux, or any other custom system. As we are demoing the process of installing and running Linux x86, we will click on “Linux”.
  • Step 6: You will now have to select the ISO you downloaded during the second step and click “Continue”.
  • Step 7: After this step, you will need to choose your hardware. You have to choose more than two CPU Cores. As an option, you may even enable OpenGL hardware acceleration and change the RAM—4GB is the default you will get. Once that is done, click on “Continue”.
  • Step 8: You will then come to the Storage page, where you will have to specify the drive’s size where the data will be stored. By default, the storage space’s value is 64GB. Remember that the storage is allocated dynamically, so this storage value is capped at the limit. When you finalize the size of the drive, click “Continue”.
  • Step 9: You will then land on the Shared Directory page, where you may specify a directory path between the host machine and the VM. Once that is done, click on “Continue”.
  • Step 10: Afterward, you will land on the Summary page. Here, you will have to name your VM and check the box “Open VM Settings”.
  • Step 11: Then you will have to click “System” from the vertical menu and enable “Force Multiplier”.
  • Step 12: Click on “QEMU” from the same vertical menu and check the box in front of “Balloon Device”. That way, you will let the VM memory allocate dynamically.
  • Step 13: From the vertical menu, click on the “Display” option to toggle the GPU support on or off. The On value is “Virtigo-vga-gl (GPU Supported)”—and the Off value is “Virtigo-vga”.
  • Step 14: Select the “Network” option from the vertical menu. The Network Mode will always default to “Shared”, which is the host only. This option will work fine if local VMs are used. However, change the Network Mode to Bridged (Advanced) if the VM needs to be accessed from a local network.

Post-Installation Steps for Ubuntu/Debian Linux

utm-vm

Once you have installed Ubuntu/Debian Linux operating system on your Apple ARM machine, follow the steps mentioned below. Find more information in UTM’s documentation.

  • Step 1: Optionally upgrade from Server to Desktop
    • sudo apt update
    • sudo apt install ubuntu-desktop
    • sudo reboot
  • Step 2: Enable clipboard and directory sharing
    • sudo apt update
    • sudo apt install spice-vdagent spice-webdavd -y
  • Step 3: Setup for Delphi via embt.co/Ubuntu4Delphi22
    • sudo apt install curl
    • curl -L https://embt.co/SetupUbuntu4Delphi22 | bash

Connecting from Delphi

Connecting from Delphi
Connecting from Delphi

You will need a connection profile to deploy and execute a project on a remote workstation. To do that, you will have to follow the steps written below.

  • Step 1: Run PA Server in Linux
  • Step 2: Use the I command to get the IP address
  • Step 3: Provide the IP Address in SDK Manager

Conclusion

After reading this guide, you have the knowledge of ARM architecture and how it differs from the family of x86 architectures. Besides, you now know the power of Apple’s line of SoCs and how to run iOS apps on macOS. This guide has also helped you understand ARM–based iOS simulators and how different virtualization machines for Apple silicon stack up against each other. Last, you even have a step-by-step guide to installing and running 64-bit Linux x86 with UTM and installing and using Windows 11 on Apple ARM.

Question log:

Question Asked
By
Answer Given
Also have 27″ iMac – need bigger desk!
A.D.
Me too. I have too many computers, but I would love some big 27″ displays too.
So, Jim is doing his Force Ghost thing?
C.S.
 
Have you seen Microsoft has relased an arm dev device? https://blogs.windows.com/windowsdeveloper/2022/10/24/available-today-windows-dev-kit-2023-aka-project-volterra/ Presume EMB would need a new compiler for Win64ARM?
C.V.
yes
I tried to access my iMac (27) stuff on new iMac (24) and had to install Rosetta-2 but didn’t work – which is why I’m here !!
A.D.
Ah, sorry, I’m not going to get into manual Rosette installation today.
What about RISC-V, is ARM executables compatible with RISC-V architecture? As I know it is a new architecture, may need a new compiler, right ?
Y.Y.
no, similar but not compatible
Funny, while RISC simplified hardware, computer programming languages are getting bloated by the day.
S.S.
 
So after ARM, I am hoping for webassembly for RAD Studio!
S.S.
me too
That is how they achieve their speed. Memory is inside the chip.
R.S.
yes
RTX 4090 has 76.3 Billion transistors
Y.Y.
cool
Do you develop Delphi compiler for Android on Intel chip?
H.K.
Dephi doesn’t target Intel Android directly, but the LibHoudini is really effective. Android x86 mobile has been disconntinued and the desktop doesn’t see a lot of adoption yet. You can use the libHoundini compatibility for now though.
Can you choose iOS VERSION?
G.F.
Yes, you need to use the Xcode simulator manager to setup a new simulator target
I heard that Fusion is being discontinued. Not sure of the validity.
T.V.
Have not heard this. They just released an update tech preview.
(in the simulator)
G.F.
 
I am curious to know how you find working with shortcuts in Parallels. I am forever causing the IDE to jump around the screen and other shenanigans. Any hints or tips?
T.V.
Practice? I’m better than I was after a lot of practice, but it still isn’t ideal. You can get a Windows keyboard to use in the VM too.
Did audio get quiet on video?
P.M.
 
Hmmm: My screen contains only “”Sorry, this portion of the webinar cannot be viewed on your device.””
K.L.
I’ll have the replay on YouTube in the blogpost. Sorry about that.
Is there a separate cost for the Windows 11 license when using Parallels Desktop to create a Windows 11 VM?
R.K.
This is a really good question and I don’t know the answer. I looked into it briefly and didn’t find the answer. Might need to talk to someone at Microsoft. But there isn’t any license key required. I bet the license agreement says something more, but I know better than to try and explain legal documents.
Is Windows 11 Arm now officially released? And do they support .NET 3.5 now? Up till now it did not.
H.v.
Not sure about .NET 3.5 but I can check. I think it is still preview, but it might get official release soon now that Microsoft has released their ARM development box.
Any insights on how to run Oracle Database on M1?
J.S.
I saw some people talking about running Oracle DB in an x86 Linux under UTM. I didn’t look into that in more detail though.
mac memory spec (M1 or M2). Can you get away with Parrells and 8GB?
P.B.
You should be able to. Let me check here in a minute.
“My screen contains only “Sorry, this portion of the webinar cannot be viewed on your device.” ” – I experienced this too, then realized I had NoScript blocking part of the site, once I enabled everything the error went away
D.A.
Ah, that would do it.
how much memory is recommended ? more than 4gb?
M.H.
4 GB is min, but you might want more.
ios Simulator iblite interbase not working with FireDAC.
n.g.
I think there is a patch for that…..
My 8GB M1 is working fine with Parallels.
M.L.
great
How many processors and ram recomenden for Delphi?
O.Z.
at least 2 processors, I would recommend 4
I intend to buy a new iPad end of year / January. Would you recommend getting the M1 iPad?
R.S.
Hard to say. I like mine.
I had not as Running Delphi on a Mac is not technically supported. I will look into quality portal though.
T.V.
Correct, it is not officially supported, but it is good to report it and capture the data. It also shows that the platform is important
any plans on supporting linux on arm?
T.N.
no official plans
Are there plans to support the Apple Watch and Apple TV?
w.a.
not officially
hahaha @ commercial to confirm everything 🙂 🙂 🙂
D.A.
yes
Do you have any delphi way to change the path in an deployed executable to find a 3rd party dylib on a mac?
W.C.
System.IOUtils has a lot of options for changing paths.
To compile for IPhone Pro, do I need a Mac Arm, or I can com`pile with Mac X86?
D.J.
Any mac will work to compile for iPhone or iPad but you need the ARM Mac to use the simulator.
Can i, upgrade to Delphi XE2?
C.C.
If you get 11.2 you can get previous version support that might include Xe2. Talk to sales.
I am using M1 Pro, Windows 11 ARM and Delphi 11.1. I failed to install the OEM Android driver. I can’t install the apk directly on the mobile phone. Do you have any tip?
D.K.
They newer Android supports wireless ADB debugging. Use that.
What about C++ Builder runs ? at least iOS and Windows apps on ARM device? Or more if it is possible
Y.Y.
Yes. Check the feature matrix.,Yes. Check the feature matrix.
at the moment i need to use install_name_tool on the mac to update a executable to search for dylib in Mac OS X. need to modify dylib path.
W.C.
Not sure. Contact support or try https://en.delphipraxis.net/
Are there plans to support a dynamic notification island?
w.a.
Not sure about officially, but I suspect you can do it manually.
I need to run. Thanks for the great session.
T.V.
welcome
I have an app with 1,7 million lines of code. Using Delphi 11.2 installed on Win 11 arm, on Macbook Pro M1Pro, compiling the app from the local drive it takes 2 mins 30 seconds. The same code on a network drive takes more than 20 minutes …
V.S.
don’t compile code from a network share. Always use local. Try a RAM drive even.
the app uses FMX for macOS
V.S.
yes
When I upgraded to Delphi 11.2, the built apk could not be installed on the device. Android reports that the package is corrupted.
D.K.
Look in the docwiki. There were some changes to Android you might need to address. You might try removing your old manafest file
Thanks for your time too, Jim.
P.B.
wlecome.
on a windows machine is absolutelly no problem only on the mac
V.S.
 
This was an awesome webinar, Thanks Jim!
D.A.
 
Thanks Jim
L.J.
 


What's Coming in Delphi, C++Builder, and RAD Studio 11.2 Alexandria

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Chief Developer Advocate for Embarcadero Technologies.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES