Programming my own Mac emulator

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: Programming my own Mac emulator

Post by kataetheweirdo »

So I've been brewing a compatibility sheet. It's not fully ready yet and is partially meant for developers, especially given how early the emulator is.
Here are the programs I can confirm to be (mostly) working within the Power Mac 6100 emulation:

Applications
BBEdit 2.1.3
ClarisWorks
Resorcerer 1.2.5

Games
Spaceway 2000 (demo) - Graphics issues, notably with the font for the titles/high score entries
Glider 4.0.9 - I did notice an occasional crash
Maelstrom
Bolo
NS-Shaft (NS-Tower should also work)
Lemmings (afaik)
Jigsaw Puzzle - Through Infinite Mac, you may have to turn the sound off

Many of the others show severe graphical issues, while others don't boot at all yet.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Programming my own Mac emulator

Post by adespoton »

That's great!

For those wanting to test:

https://infinitemac.org/ (link to emulator found at custom -> run -> Machine -> Experimental)

Oddly, I appear to have 8MB RAM no matter how much I select -- and most of the games on the Infinite Disk require more than 1.8MB (which means running Mac OS 7.6 to increase compatibility creates issues).

Might be worth adding another sheet to https://docs.google.com/spreadsheets/d/ ... beZg39Q9A/ -- although the current sheet could also work.
kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: Programming my own Mac emulator

Post by kataetheweirdo »

The reason it only recognizes 8 MB is because that's how much is embedded on the Power Mac 6100 itself.

To get it recognize more, we need to set up the memory regions and also expand the HMC controller to recognize the chosen RAM setup.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Programming my own Mac emulator

Post by adespoton »

kataetheweirdo wrote: Wed Jan 31, 2024 4:14 am The reason it only recognizes 8 MB is because that's how much is embedded on the Power Mac 6100 itself.

To get it recognize more, we need to set up the memory regions and also expand the HMC controller to recognize the chosen RAM setup.
Ah; so for now, limiting to System 7.1 as the OS is a good idea, to maximize available RAM. I guess RAM Doubler could also help here. I didn't realize the PM6100 had on-board RAM!
kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: Programming my own Mac emulator

Post by kataetheweirdo »

We're slowly getting Mac OS X working. You can boot up to the installer window and it seems to display with some issues.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Programming my own Mac emulator

Post by adespoton »

kataetheweirdo wrote: Mon Feb 26, 2024 1:51 pm We're slowly getting Mac OS X working. You can boot up to the installer window and it seems to display with some issues.
Does that mean you've got memory regions working now? I can't imagine running OS X with 8MB RAM....
joevt
Student Driver
Posts: 15
Joined: Mon Feb 01, 2010 3:08 am

Re: Programming my own Mac emulator

Post by joevt »

adespoton wrote: Mon Feb 26, 2024 4:40 pm Does that mean you've got memory regions working now? I can't imagine running OS X with 8MB RAM....
The pm6100 emulation can have up to 264 MB with a couple minor changes to the emulation code. pm6100 and anything with a PowerPC 601 can't boot OS X. OS X won't work on a NuBus Mac even if it has a G3 upgrade. The Mac OS X boot process would need to be changed since NuBus Macs don't have Open Firmware. Also, some drivers would need to be added.

For Mac OS X Jaguar installer CD, the Beige G3 emulation is used. The Beige G3 has an ATI GPU. There are some graphical issues. DingusPPC doesn't have 2D acceleration implemented yet.

I don't think anyone's tried Mac OS X on the pm7500 emulation yet. Since it has a built in graphics controller that doesn't support 2D acceleration, it might have fewer graphical issues. If it has the same graphical issues as the Beige G3 then it's probably CPU emulation related.

If 2D acceleration is too difficult to implement, then an option for the Beige G3 (or any machine) is to create a custom graphics controller (NuBus or PCI) which would require creating an ndrv driver. We'd probably want that anyway, to support resizable and arbitrarily sized display window or to add custom 2D acceleration.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Programming my own Mac emulator

Post by adespoton »

joevt wrote: Tue Feb 27, 2024 2:08 am
adespoton wrote: Mon Feb 26, 2024 4:40 pm Does that mean you've got memory regions working now? I can't imagine running OS X with 8MB RAM....
The pm6100 emulation can have up to 264 MB with a couple minor changes to the emulation code. pm6100 and anything with a PowerPC 601 can't boot OS X. OS X won't work on a NuBus Mac even if it has a G3 upgrade. The Mac OS X boot process would need to be changed since NuBus Macs don't have Open Firmware. Also, some drivers would need to be added.

For Mac OS X Jaguar installer CD, the Beige G3 emulation is used. The Beige G3 has an ATI GPU. There are some graphical issues. DingusPPC doesn't have 2D acceleration implemented yet.

I don't think anyone's tried Mac OS X on the pm7500 emulation yet. Since it has a built in graphics controller that doesn't support 2D acceleration, it might have fewer graphical issues. If it has the same graphical issues as the Beige G3 then it's probably CPU emulation related.

If 2D acceleration is too difficult to implement, then an option for the Beige G3 (or any machine) is to create a custom graphics controller (NuBus or PCI) which would require creating an ndrv driver. We'd probably want that anyway, to support resizable and arbitrarily sized display window or to add custom 2D acceleration.
I feel like we need a concentrated (GSOC-like) effort focused specifically on ATi 2D acceleration, to create a reference doc that can be used across DingusPPC, MAME and QEMU. It's been a sticky problem for a long time now. Of course, you're right, a custom ndrv would also be useful -- especially one based on VirtIO-GPU, since macOS, Linux and Windows all support it on the host side today.
User avatar
Madd the Sane
Student Driver
Posts: 15
Joined: Fri Aug 31, 2012 6:27 pm
Location: Idaho

Re: Programming my own Mac emulator

Post by Madd the Sane »

Just been fiddling with DingusPPC. It's amazing how far it's come.

Some things I noticed (and you are probably aware of):
  • As I remembered, the G3 ROM has color icons. :mrgreen:
  • I'm able to boot from a floppy with a 7200/120 ROM, but I can't get to the Happy Mac if there's either a CD-ROM or hard drive attached (Incomplete SCSI emulation, perhaps?).
  • I was able to install 8.6 when using the G3 ROM, but if it played any alert sound, it would crash to debugger with an error about "Instruction fetch from unmapped memory".
  • I had to disable the ATI drivers to get it to display correctly.
  • I can't select alternate resolutions even with a MultiScan monitor selected (Multiscan17in). Don't know if this is due to missing drivers or emulation oversight.
Get out of my mind, idea! I already have an idea in there!
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Programming my own Mac emulator

Post by adespoton »

Madd the Sane wrote: Tue Mar 19, 2024 4:20 am Just been fiddling with DingusPPC. It's amazing how far it's come.

Some things I noticed (and you are probably aware of):
  • As I remembered, the G3 ROM has color icons. :mrgreen:
  • I'm able to boot from a floppy with a 7200/120 ROM, but I can't get to the Happy Mac if there's either a CD-ROM or hard drive attached (Incomplete SCSI emulation, perhaps?).
  • I was able to install 8.6 when using the G3 ROM, but if it played any alert sound, it would crash to debugger with an error about "Instruction fetch from unmapped memory".
  • I had to disable the ATI drivers to get it to display correctly.
  • I can't select alternate resolutions even with a MultiScan monitor selected (Multiscan17in). Don't know if this is due to missing drivers or emulation oversight.
Thanks for taking it through its paces! Any chance you can update https://docs.google.com/spreadsheets/d/ ... =329529921 with the current issues you've experienced? I know at this point, DingusPPC is a quickly moving target (they're fixing/improving more things every month these days), but I'm unable to keep up with what's working/not working with all the different configurations, and lazily mostly haven't bothered to fill in the details (although I DID finally add DingusPPC to the matrix, since there are enough functioning configurations to actually use it to get things done now).
joevt
Student Driver
Posts: 15
Joined: Mon Feb 01, 2010 3:08 am

Re: Programming my own Mac emulator

Post by joevt »

Madd the Sane wrote: Tue Mar 19, 2024 4:20 am
  • I'm able to boot from a floppy with a 7200/120 ROM, but I can't get to the Happy Mac if there's either a CD-ROM or hard drive attached (Incomplete SCSI emulation, perhaps?).
My fork will boot 7200 from SCSI CD or HD (7.5.3 to 9.0.4). I haven't checked the upstream fork.
Madd the Sane wrote: Tue Mar 19, 2024 4:20 am
  • I was able to install 8.6 when using the G3 ROM, but if it played any alert sound, it would crash to debugger with an error about "Instruction fetch from unmapped memory".
How did you do the install? What 8.6 installer did you use?

I can't get an HD to mount at the same time as a floppy or CD (when booting from the floppy or CD). It reads only the first block of the HD.
I can boot from HD if the floppy and CD are not connected.
Madd the Sane wrote: Tue Mar 19, 2024 4:20 am
  • I had to disable the ATI drivers to get it to display correctly.
DPPC needs to implement 2D acceleration for the ATI Rage so those drivers can produce the correct results for the display.
Madd the Sane wrote: Tue Mar 19, 2024 4:20 am
  • I can't select alternate resolutions even with a MultiScan monitor selected (Multiscan17in). Don't know if this is due to missing drivers or emulation oversight.
Alternate resolutions should work if the display is set correctly. You may need to use the System 7 Monitors control panel. I haven't checked the upstream fork though. Do you at least notice it switch from 640x480 to something greater during boot?
User avatar
Madd the Sane
Student Driver
Posts: 15
Joined: Fri Aug 31, 2012 6:27 pm
Location: Idaho

Re: Programming my own Mac emulator

Post by Madd the Sane »

joevt wrote: Fri Mar 22, 2024 12:07 pm How did you do the install? What 8.6 installer did you use?
It was an installer from the Macintosh Repository. I know it's a custom-made CD image because it includes installers for software released after 8.6 was released (I know CarbonLib 1.6 wasn't released back then).
Although the 8.5.1 image I made from the retail CD boots too, IIRC.
joevt wrote: Fri Mar 22, 2024 12:07 pm Alternate resolutions should work if the display is set correctly. You may need to use the System 7 Monitors control panel. I haven't checked the upstream fork though. Do you at least notice it switch from 640x480 to something greater during boot?
I don't see any resolution switching in Monitors and Sounds (Remember, I'm running 8.6 with the Beige G3 ROM). Nor do I see it in Monitors.

Also, the emulator seems to lag bad if I don't have a CD-ROM installed.
Get out of my mind, idea! I already have an idea in there!
kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: Programming my own Mac emulator

Post by kataetheweirdo »

We're optimizing the interpreter a little bit. We also got the Power Mac 6100 to recognize more than 8 MB of RAM, which means you don't have to use the Virtual Memory as much.
Post Reply