• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Emulation: Infinite Mac

Usually booting 7.5.5 doesn't reach the Finder unless you're holding the shift key during boot to disable extensions. It appears to be the same for Infinite Mac. Those DMA aborts are removed from my fork. Whatever is causing my fork to hang might be related to whatever is doing the non-DWORD read or it might be something else. It would be nice to be able to use Conflict Catcher to find the conflicting extensions, but it doesn't let you indicate pass/fail of a test during extension load time even though Conflict Catcher can appear during extension load time which is unfortunate since it can't handle conflicts that cause the Finder to be unreachable? Maybe I'm using it wrong.

The issue appears to be the Apple Photo Access extension -- disabling it both makes the non-DWORD read go away, and allows the Finder to successfully start.
 
The issue appears to be the Apple Photo Access extension -- disabling it both makes the non-DWORD read go away, and allows the Finder to successfully start.
Yup, that seems to improve things. Will have to try that with the other OS versions that had problems.
 
Apple frequently uses multiple access widths to the SCSI controllers so you may eventually encounter non-DWORD access even without that extension. When I was bringing up the Quadras, the Control Panel was writing a block of settings from a non-word-aligned address which kicks off a bunch of lesser-used code paths in MacOS (and requires very exact 53C9x emulation to not trash the hard disk).
 
@mihai I noticed there were a whole bunch of comments added to:


Were they bots? What happened?
Some not very productive discussions (an issue tracker is not a forum), so I locked it for a bit. Unlocked now.
 
@mihai , well done on getting Mac OS X 10.0 to 10.4 running on emulation. Particularly interesting to see the iMac G3/233 being supported. The reorganisation of the machines makes sense. I keep wondering, Mac OS 8.1 to 9.x don't seem to work on the 6100 emulator: it keeps saying things like:

1744557270596.png
(Mac OS 8.1) or:

1744557366973.png
(Mac OS 8.6).

So, is the major problem that they don't have the appropriate System Enablers in the System Folders?

-cheers from Julz
 
I built those images a while back (for Basilisk II for 8.1 and SheepShaver for everything later). IIRC I did a universal install for all of them, any ideas for what enablers might be required (also, I thought they went away with later OS versions)?
 
The 6100 booted 8.1 for me in Infinite Mac
https://infinitemac.org/1998/Mac OS 8.1?machine=Power+Macintosh+6100
but I think it had to boot 3 times to get to the Finder? That's weird. Is it starting with empty PRAM that needs to be setup?

8.6 HD hangs on the 6100 (doing printer port AppleTalk stuff) but the CD should boot.
DingusPPC needs to be modified to properly emulator a printer port or ethernet port that doesn't have anything connected to it.
 
Thanks both of you for the replies!
I built those images a while back (for Basilisk II for 8.1 and SheepShaver for everything later). IIRC I did a universal install for all of them, any ideas for what enablers might be required (also, I thought they went away with later OS versions)?
I didn't realise/forgot Enablers went away after System 7.x. I think I was a bit confused, because late versions of Classic Mac OS seemed to need matching Mac OS ROM files with the OS, at least on New World Macs.
The 6100 booted 8.1 for me in Infinite Mac
https://infinitemac.org/1998/Mac OS 8.1?machine=Power+Macintosh+6100
but I think it had to boot 3 times to get to the Finder? That's weird. Is it starting with empty PRAM that needs to be setup?
OK, so this is where it gets odd. I tried your link, it worked on my Mac mini 2012 under Catalina and Chrome. Then I tried it on this MacBook M2 under macOS 15.3.2 and Safari and it was fine.

Then I tried these variants:
  1. No Saved HD - fine.
  2. Ram reduced to 24MB - fine.
    1. After booting the first time I enabled VM and rebooted, then I got the first error message below.
  3. Same as (2), but booting 7.5.3, then turning on VM and rebooting. Worked fine.

1744624329805.png
[Error from https://infinitemac.org/1998/Mac OS...wer+Macintosh+6100&ram=24M&screenSize=640x480 when restarted after enabling VM]
1744624663503.png
[From: https://infinitemac.org/1996/System...wer+Macintosh+6100&ram=24M&screenSize=640x480]


8.6 HD hangs on the 6100 (doing printer port AppleTalk stuff) but the CD should boot.
Mac OS 8.5 appears to hang too.
DingusPPC needs to be modified to properly emulator a printer port or ethernet port that doesn't have anything connected to it.
Oh, OK.

-thanks very much for the feedback!
 
OK, so this is where it gets odd. I tried your link, it worked on my Mac mini 2012 under Catalina and Chrome. Then I tried it on this MacBook M2 under macOS 15.3.2 and Safari and it was fine.

Then I tried these variants:
  1. No Saved HD - fine.
  2. Ram reduced to 24MB - fine.
    1. After booting the first time I enabled VM and rebooted, then I got the first error message below.
  3. Same as (2), but booting 7.5.3, then turning on VM and rebooting. Worked fine.
Seems to be an issue with cross-region DMA (Power 6100 has multiple RAM regions because parts are not contiguous or are mirrors of other parts). I got a similar abort with selecting 264 MB but not 136 MB RAM.

Mac OS 8.5 appears to hang too.
Yup, same issue has 8.6 with the AppleTalk/printer port. 8.1 AppleTalk/printer port handling is different and doesn't hang.
 
Seems to be an issue with cross-region DMA (Power 6100 has multiple RAM regions because parts are not contiguous or are mirrors of other parts). I got a similar abort with selecting 264 MB but not 136 MB RAM.
So, does that mean it's likely to be a bug in this file?

Or the code that handles the specific DMA channel? Where are regions handled?

-cheers from Julz
 
So, does that mean it's likely to be a bug in this file?

Or the code that handles the specific DMA channel? Where are regions handled?
The Emulator Error that you posted has the stack trace but it appears to be incomplete (maybe because of optimizations). The abort message is in the mmu_map_dma_mem function in ppcmmu.cpp. We can get the full stack trace running the debug version of the emulator on a local machine.
 
The Emulator Error that you posted has the stack trace but it appears to be incomplete (maybe because of optimizations). The abort message is in the mmu_map_dma_mem function in ppcmmu.cpp. We can get the full stack trace running the debug version of the emulator on a local machine.
OK, thanks!
 
@mihai , @joevt !

Amazing, I can now run Mac OS 8.0 on the PPC 6100 Dingus PPC emulator!

1753915902153.png
That's a first for me. I ran it with 24MB RAM with VM off, then restarted with VM on OK! Don't know why it says "56MHz". I tried running it with 12MB of RAM, but it failed to boot. I've tried Mac OS 8.1 which booted OK with 24MB and VM off, but wouldn't with VM on. I could run it with 40MB and VM on though. Mac OS 8.5 failed at 40MB with VM off. I got this message:

1753916561392.png
It was the same with Mac OS 8.6/40MB (didn't try higher). iMac 233MHz/64MB freezes part of the way through booting Mac OS 8.5.

Still, great progress!
 
Amazing, I can now run Mac OS 8.0 on the PPC 6100 Dingus PPC emulator!
DingusPPC pm6100 should work up to 9.0.4.

Don't know why it says "56MHz".
DingusPPC has a counter g_icycles with increment of 1 per PPC instruction. The counter is converted to nanoseconds by shifting it right by icnt_factor bits. icnt_factor is currently 4 which means each instruction is assumed to be ≈ 16 ns (62.500 MHz instruction frequency). The PDM cpu clock calculated in ROM at 0x403036CC gets a value of 0x034F0F0F = 55512847 Hz = 55.512847 MHz which is a period of 18.013 ns. There's a table in ppcexec.cpp which shows the results of different icnt_factor values for pm6100.

Now, to get closer to 60 or 66 MHz or whatever specific value you would like to see, we would need to use some bits of g_icycles as a binary fraction (denominator), and use an integer increment that is not 1 for the numerator. The more bits we use for the fraction, the closer we can get to 60 MHz but the less time it would take for the 64-bit value of g_icycles to wrap around.

There is a g_realtime flag. If it is true then guest nanoseconds matches host nanoseconds. If the host is too fast or too slow then the guest Mac might not boot. To handle this, one might boot with g_realtime set to false, (the default), then set it to true after the guest Mac has booted and calculated all the clock speeds. Code that uses CPU instruction loops to wait a specific amount of time (instead of using a timer that has the time) would probably not work correctly since the calculated CPU speed would not be consistent for the guest after switching to realtime.

I tried running it with 12MB of RAM, but it failed to boot.
Not enough RAM or a bug? DPPC pm6100 can have up to 264 MB of RAM but the infinitemac UI is currently limited to 136 MB. There is a bug with DMA emulation with 264 MB of RAM. It happens when different RAM banks are adjacent in physical memory and the DMA physical address range crosses a RAM bank boundary. It may happen with other memory configurations. A fix would be to ensure the RAM is allocated by the host in a single block.

I've tried Mac OS 8.1 which booted OK with 24MB and VM off, but wouldn't with VM on. I could run it with 40MB and VM on though.
Not enough RAM probably.

Mac OS 8.5 failed at 40MB with VM off. I got this message:

It was the same with Mac OS 8.6/40MB (didn't try higher).
That's a bug. It doesn't look like the DMA bug I mentioned. I wonder if the bug happens with non-webasm version of DPPC? The error message from that would be more useful.

iMac 233MHz/64MB freezes part of the way through booting Mac OS 8.5.
iMac G3 should boot everything up to Mac OS 8.6. Did you check the Mac OS 8.5 HD to make sure it has "Mac OS ROM" version 1.1.2?
There's probably an emulation issue with 9.0.4. I haven't tested it recently. I haven't tried later macOS versions yet.

I think @powermax is working on Power Macintosh 5400/6400 emulation? I am working on a DingusPPC PCI graphics card emulation. Wrote a Open Firmware driver. Have a Mac OS 9/X ndrv. Need to add EDID read and interpret code for both of them. It will allow arbitrary number of displays and resolutions and support all color depths from 1 bit to 24 bit. Then I'll try some optimizations for little endian mode (for Windows NT - haven't tried linux or Virtual PC yet).
 
That's a bug. It doesn't look like the DMA bug I mentioned. I wonder if the bug happens with non-webasm version of DPPC? The error message from that would be more useful.
I'm not able to reproduce this in a native build with the same arguments and disk image (even when building with ASan and other diagnostic tools). It appears to be a double-free when using timers, which are more frequently used by the JS build (since it polls for new data).
 
Back
Top