Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jido

macrumors 6502
Oct 11, 2010
297
145
I had a look at several monitors. I didn't see any platform-specific code but it could be well-hidden in macros of subroutines. I just had a look at a few areas and didn't know my way around.
No surprise, it is not easy to grok a codebase this large.

Where did you see "monitors"?

There are #ifdefs for arm64 code like that:
C:
#if __arm__ || __arm64__
        if (maxPhys >= (mach_vm_address_t)(gPhysBase + gPhysSize))
        {
            maxPhys = 0;
        }
        else
#endif
 

pshufd

macrumors G4
Oct 24, 2013
10,149
14,574
New Hampshire
No surprise, it is not easy to grok a codebase this large.

Where did you see "monitors"?

There are #ifdefs for arm64 code like that:
#if __arm__ || __arm64__ if (maxPhys >= (mach_vm_address_t)(gPhysBase + gPhysSize)) { maxPhys = 0; } else #endif

Should have been modules.

I worked on Firefox and Thunderbird and those are big code bases.

I worked on code bases of 10 million lines in the 80s and 90s and probably 80 million in the 00s. Finding your way around can take a lot of effort unless you have someone to show you around.

The firefox codebase tends to be messier because you have multiple operating systems per architecture.
 

ww1971

macrumors regular
Jul 15, 2011
141
44
One of the problems with running windows on the M1, it's not just getting windows to work, but they also need to create all the drivers for the graphics and other subsystems, under x86 Mac apple provided all those drivers.

i guess people are in for a long wait getting the drivers to make windows work. The drivers might never come
 

Nate Spencer

macrumors member
Jun 5, 2015
54
30
can I see any pictures of windows working in an emulator under m1?
Here is a copy of Win 7 running under straight qemu under Rosetta. The UTM image of 8.1 is sitting on the NAS. It isn't worth my time using for now. I figured I'd save the test in case they get qemu to use more than 1 host cpu core.
 

Attachments

  • Screen Shot 2020-11-22 at 3.35.34 PM.png
    Screen Shot 2020-11-22 at 3.35.34 PM.png
    1.2 MB · Views: 129

ww1971

macrumors regular
Jul 15, 2011
141
44
Here is a copy of Win 7 running under straight qemu under Rosetta. The UTM image of 8.1 is sitting on the NAS. It isn't worth my time using for now. I figured I'd save the test in case they get qemu to use more than 1 host cpu core.

thanks. Would the drivers make the windows run faster? I’m surprised the qemu managed to get windows to work under m1, but i reckon it will be very slow.
 
  • Like
Reactions: Nate Spencer

Nate Spencer

macrumors member
Jun 5, 2015
54
30
thanks. Would the drivers make the windows run faster? I’m surprised the qemu managed to get windows to work under m1, but i reckon it will be very slow.
Possibly Drivers would help. Win7 was from QEMU/KVM setup has most of those. The key issue UTM helps it has some JIT translation optimizations also it is ARM native QEMU. Windows was much better on it. Still super painful. The keys observation is the qemu process no matter what uses more or less one core. So no only is it slow. I can't spread it as a 4 core VM on 4 cores of hte host which would help a lot. You tell qemu to do smp and 4 cpus or cores. You just divided them on one m1 core. Ubuntu was slow booting too. Unfortunately I have not tried a new setup. Maybe a Lubuntu might be ok.

The screenshot there was terrible on performance. Like 8 min to login/desktop slow. qemu for x86-64 on rosetta then emulating x86-64. My solution was to move my 2 VMs win8.1 and Ubuntu onto a VMWare workstation player on my HP probook Ryzen. I just occasionally use them esp. since going to mac Quickbooks and Moneyspire. I did it to see if it would work and someone posted the link to UTM and I tried it.

Think about the guy who on youtube installed Windows 8 or 10 on a Cyrix MII probably close to the same experience. For the record they can probably get us to something like VirtualPC PPC era but qemu is more for dev testing of platforms than performance emulation.

edit: Sorry Windows 7
 
Last edited:

poorcody

macrumors 65816
Jul 23, 2013
1,339
1,584

cool11

macrumors 68000
Sep 3, 2006
1,823
223
I think we want to run windows on new M1 macs,
because we need to run classic x86 windows apps.
This will not happen soon, as even if we have a parallels version for arm, and windows for arm,
still we will not be able to run x86 there...

I am thinking, that maybe 'crossover' application, is the only way to run x86 windows apps, on new apple silicon macs.
 

Nate Spencer

macrumors member
Jun 5, 2015
54
30
I think we want to run windows on new M1 macs,
because we need to run classic x86 windows apps.
This will not happen soon, as even if we have a parallels version for arm, and windows for arm,
still we will not be able to run x86 there...

I am thinking, that maybe 'crossover' application, is the only way to run x86 windows apps, on new apple silicon macs.
The current dev version for on Microsoft Insiders runs x86/x64 windows applications. I have yet to find stuff I run on Windows not run on Windows 10 ARM64. I can do this. Today. Only issue is the MS store which is ARM32. Full system emulation is not going to be practical from a performance standpoint.
 

Sydde

macrumors 68030
Aug 17, 2009
2,563
7,061
IOKWARDI
Yeah, ARM32 is not binary-compatible with ARM64, though almost all the ARM32 instruction set can be converted to ARM64 equivalents word-for-word (the M1 almost certainly does not have any ARM32 logic). There are quirky differences, though. The biggest one is the out-of-order execution that can, in theory, result in miscommunication between cores. Intel-translation Mac apps are slightly hamstrung by the ordering restriction, which tends to result in reduced performance (unless they are built from llvm-ir files from the App Store).

Rosetta2 can translate object code because it is constructed for MacOS – it is not designed to handle the system protocols that Windows uses, so a Parallels would have to use some other scheme, either straight emulation (slow) or a different translator (probably not an easy piece of coding/debugging). It may happen in the future. Or, perhaps, we will be able to move on to better stuff.
 
  • Like
Reactions: Nate Spencer

Nate Spencer

macrumors member
Jun 5, 2015
54
30
Yeah, ARM32 is not binary-compatible with ARM64, though almost all the ARM32 instruction set can be converted to ARM64 equivalents word-for-word (the M1 almost certainly does not have any ARM32 logic). There are quirky differences, though. The biggest one is the out-of-order execution that can, in theory, result in miscommunication between cores. Intel-translation Mac apps are slightly hamstrung by the ordering restriction, which tends to result in reduced performance (unless they are built from llvm-ir files from the App Store).

Rosetta2 can translate object code because it is constructed for MacOS – it is not designed to handle the system protocols that Windows uses, so a Parallels would have to use some other scheme, either straight emulation (slow) or a different translator (probably not an easy piece of coding/debugging). It may happen in the future. Or, perhaps, we will be able to move on to better stuff.
I figure Microsoft will just port their Store to ARM64. I don't think there is much else running Win ARM32.
 

dandeco

macrumors 65816
Dec 5, 2008
1,253
1,050
Brockton, MA
Someone's been able to run a Windows XP virtual machine on a M1 Mac using UTM, a virtualization program designed for iOS, which has been updated to work with ARM-processor Macs as well!

This, along with the idea of Apple eventually dropping Intel support while others (like software vendors) increase their ARM Mac support and the lower price and hearing about the amazing performance compared to Intel Macs, are now convincing me my next Mac I plan to buy next month should be a 13" M1 MacBook Pro!
 
  • Love
Reactions: gank41

gank41

macrumors 601
Mar 25, 2008
4,350
5,022
Someone's been able to run a Windows XP virtual machine on a M1 Mac using UTM, a virtualization program designed for iOS, which has been updated to work with ARM-processor Macs as well!

This, along with the idea of Apple eventually dropping Intel support while others (like software vendors) increase their ARM Mac support and the lower price and hearing about the amazing performance compared to Intel Macs, are now convincing me my next Mac I plan to buy next month should be a 13" M1 MacBook Pro!
I had managed to get WinXP going on my iPad, as well, but before the M1 Macs were announced. If I would have know I could have just used the same files now I would have saved them. I’ve been wanting to try UTM on my M1 MBP but just haven’t gotten around to it. This gives me more hope.
 

UBS28

macrumors 68030
Oct 2, 2012
2,893
2,340
I had managed to get WinXP going on my iPad, as well, but before the M1 Macs were announced. If I would have know I could have just used the same files now I would have saved them. I’ve been wanting to try UTM on my M1 MBP but just haven’t gotten around to it. This gives me more hope.

Where can I find a guide on how to install Windows on my 12.9 iPad Pro. And has anyone made this work with Windows 10?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.