• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Emulation: Infinite Mac

mihai

Member
The upstream native build has two display windows. You have to move the second one out of the way to see the checkerboard and cursor in the first display window. You can remove the second display window by removing , "Sixty6Video" from machinetnt.cpp. Later commits from my fork should fix that.
...
Actually, the system beep issue with the floppy goes away if you have --fdd_wr_prot=1 so that the system knows not to attempt writing to the floppy.

Thanks for that tip, I see the second video window in the native build. It turns out the JS side is actually fine with this, since the Sixty6Video never displays, so only the ControlVideo updates being sent.

The actual issue with JS was that the alpha channel ended up being 0, and the JS side respected that, hence it being all black. I forced the alpha channel to be full opacity, and https://infinitemac.org/run?disk=Mac+OS+8.1+Disk+Tools+(PPC)&machine=Power+Macintosh+7500 boots to the Finder now (I also made the floppy images be read-only).

Booting with a SCSI disk image (e.g. http://infinitemac.org/1996/System ...e&saved_hd=false&machine=Power+Macintosh+7500) also works, but it eventually fails when it gets to the Finder with a
dbdma.cpp:273 FATL| ABORT: curio_scsi: non-DWORD read from a DMA channel not supported error.
 

Snial

Well-known member

Phipli

Well-known member
(But I understand it's kinda 7.6?).
I think it might even be 7.5.* if I remember?

Edit :
Disk Tools PPC

This remarkable Disk Copy image was included with the Mac OS 8.1 install CD, to allow a user to make her own minimal bootable rescue disk. It can read, write, format and repair HFS+ volumes.

Lacking the Appearace Manager and Finder 8, it looks and feels more like System 7. On closer inspection, I found that it actually is System 7! The contents of the resource fork reveal that it is based on System 7.5.5.
 

joevt

Well-known member
If anyone wants to play along at home.

Attached is a 7.6.1 minimum install with the support utilities from BeOS version 4.5 and 5.0.3. Note for some reason I seem to be using versions that say 4.5 on my actual computer, even though it boots 5.0.3. I can't remember why as it is years since I set it up.

Actual BeOS pre-installed image is available here :

Make sure you don't go crazy with the RAM - BeOS doesn't boot if you have too much. 64 is plenty (it works with more, but there is a limit I can't remember).

Out of the list of machines on infinitemac, I think the 9500 is probably the best machine to go for. Does anyone know what video card is being emulated in the 9500? Any card that has an appropriate Mac driver in ROM should work slowly, but only a small number of cards supports acceleration. Both cards that came with the 9500 (ATi Mach64 based thing and the ixMicro TT) are "fully" supported.
Tried BeOS with pm8600. 7.5.3 and 7.5.5 CD hang during boot with HD60_512_BeOS.hda as the first HD. Using HD50_512_BeOS_Mac_Tools.hda as the first HD, I can launch BeOS Launcher but it hangs at the BeOS logo while waiting for Mesh DMA (even though the CD and HDs are attached to Curio). We might be stuck there until we have Mesh (internal) SCSI working. Is BeOS able to boot from external SCSI? If yes, then we just need to make Mesh work without SCSI devices.

For people using macOS, you can change the .hda suffix to .dmg so you can use
hdiutil attach HD60_512_BeOS.dmg -nomount
hdiutil attach HD50_512_BeOS_Mac_Tools.dmg
To mount the disk images to examine them. I put -nomount on the BeOS HD because that one has no Mac partitions that are viewable in the Finder.

I think the default CPU for pm7500 is MPC601. Doesn't BeOS require 603 or later? You have to use pm8500 or later to get a 604 or 604e unless you use the --cpu= option. Upstream doesn't have 8500/8600/9500/9600 yet but did recently include the --cpu option. Actually, upstream does have 7300 which defaults to 604e.

MacOSForBe761 is a partition image. It needs to be a disk image (include partition map with drivers) to work with native DPPC. Infinite Mac has code to automatically add the missing parts. We'll want to add code inside DPPC to do that later.

I use Intel Leopard in a VM to create disk images using:
hdiutil create -size 1g -layout "UNIVERSAL HD" -fs HFS -volname "MacOSForBe761" ~/Disks/MacOSForBe761
Then you can use restore to copy the partition over.
but you need to add the following to make it bootable since Leopard doesn't add the driver descriptor map:
Code:
xxd -p -r <<< '0004 0000 0040 0017 0001 0000 0078 0024 ffff 0000 00b0 0015 0701 0000 00e8 0022 f8ff' | \
	dd if=/dev/stdin \
    of=/Users/joevt/Disks/MacOSForBe761.dmg \
    oseek=0x10 bs=1 conv=notrunc

SheepShaver doesn't seem to support disk images that include multiple partitions. It will only mount the first partition of a disk image. It probably doesn't include the partition map or drivers in the emulation which means they don't get used or updated?

People have suggested different apps to handle/create disk images but I prefer the command line.

Booting with a SCSI disk image (e.g. http://infinitemac.org/1996/System ...e&saved_hd=false&machine=Power+Macintosh+7500) also works, but it eventually fails when it gets to the Finder with a
dbdma.cpp:273 FATL| ABORT: curio_scsi: non-DWORD read from a DMA channel not supported error.
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.
 

Phipli

Well-known member
Is BeOS able to boot from external SCSI? If yes, then we just need to make Mesh work without SCSI devices.
It is yes, the old manual mentions doing a test install to a zip disk, without specifying which bus it needs to be on.
I think the default CPU for pm7500 is MPC601. Doesn't BeOS require 603 or later?
Yes! Completely forgot the 7500 came with a 601 - I don't own one and was just assuming everyone would have a 604 shoved in there. You have to remember most of my PowerSurge machines were bought as just logic boards and I have a "processor card drawer" I grab arbitrary Processors from :LOL: "Today I will be a 133MHz 604"...
MacOSForBe761 is a partition image. It needs to be a disk image (include partition map with drivers) to work with native DPPC. Infinite Mac has code to automatically add the missing parts. We'll want to add code inside DPPC to do that later.
I wondered this and left it after testing on infinitemac - no problem to add, just meant I could generate it in Basilisk II quickly.
For people using macOS,
Not a modern Mac user personally sorry.
People have suggested different apps to handle/create disk images but I prefer the command line.
I just use template images of an array of sizes. Zipped they take up no space, and I take a copy to make a new one.

For CDs I made a python tool that Copies a known good Apple universally bootable driver set onto the start and modifies the partition map to suit. I expect I could use this for hard disk images too. But that's another story all together.

I'll see where all this gets me.

What does dingusppc think about software going into supervisor mode?
 
Last edited:

Snial

Well-known member
What does dingusppc think about software going into supervisor mode?
Surely Dingus PPC must support supervisor mode, because the PPC emulator must run in Supervisor mode (because the 68K emulator must be able to run in PPC Supervisor mode, because 32-bit clean code and System 7 needs 68K supervisor mode)? I'll reply with lots of shocked emojis if I turn out to be wrong :) !
 

Phipli

Well-known member
Surely Dingus PPC must support supervisor mode, because the PPC emulator must run in Supervisor mode (because the 68K emulator must be able to run in PPC Supervisor mode, because 32-bit clean code and System 7 needs 68K supervisor mode)? I'll reply with lots of shocked emojis if I turn out to be wrong :) !
I thought they might have done something dodgy to break out. Was wondering if it might cause an issue.
 

joevt

Well-known member
What does dingusppc think about software going into supervisor mode?
Doesn't every emulator need to support supervisor mode since every OS needs supervisor mode? PPC exceptions are handled by supervisor mode exception handlers. For example, Mac OS 9 running on a PowerPC CPU goes into supervisor mode during an illegal instruction exception to emulate MPC601 instructions or to emulate instructions that have an alignment exception such as accessing a 64 bit floating point value where address & 3 is not 0.

You can run MacsBug and Jasik's The Debugger and other debuggers in DingusPPC. They require supervisor mode. I haven't tried CodeWarrior IDE yet which has it's own debugger (uses MetroNub extension).
 

Phipli

Well-known member
I was asking if there might be issues with a userland application breaking out, rather than does supervisor mode exist.

But I'm getting the impression it wasn't a valid pondering.
 

Phipli

Well-known member
As I said before, you'll need to add this line to appleramdac.cpp if you want it to compile:

#include <atomic.h>
Thank you. I did that and it just throws an error on that instead.

1712588349033.png

Sorry, I'm not an experienced programmer, especially C++.

Has the atomic.h dependency been added, and it... doesn't exist on my computer? Or is the path bad?
 

kataetheweirdo

New member
Which version of gcc do you have installed? You'll want to make sure you have at least GCC 4.4.

Also, try #include <atomic> instead.
 

Phipli

Well-known member
Code:
<userprompt>: /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/build$ make dingusppc
Consolidate compiler generated dependencies of target speex
[  1%] Built target speex
Consolidate compiler generated dependencies of target cubeb
[ 10%] Built target cubeb
Consolidate compiler generated dependencies of target devices
[ 11%] Building CXX object devices/CMakeFiles/devices.dir/video/appleramdac.cpp.o
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:153:27: error: field ‘ch_stat’ has incomplete type ‘std::atomic<short unsigned int>’
  153 |     std::atomic<uint16_t> ch_stat = 0;
      |                           ^~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<short unsigned int>’
  162 |     struct atomic;
      |            ^~~~~~
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:155:27: error: field ‘queue_len’ has incomplete type ‘std::atomic<unsigned int>’
  155 |     std::atomic<uint32_t> queue_len      = 0;
      |                           ^~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<unsigned int>’
  162 |     struct atomic;
      |            ^~~~~~
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:156:27: error: field ‘queue_data’ has incomplete type ‘std::atomic<unsigned char*>’
  156 |     std::atomic<uint8_t*> queue_data     = 0;
      |                           ^~~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<unsigned char*>’
  162 |     struct atomic;
      |            ^~~~~~
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:157:27: error: field ‘res_count’ has incomplete type ‘std::atomic<unsigned int>’
  157 |     std::atomic<uint32_t> res_count      = 0;
      |                           ^~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<unsigned int>’
  162 |     struct atomic;
      |            ^~~~~~
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:162:27: error: field ‘cmd_in_progress’ has incomplete type ‘std::atomic<bool>’
  162 |     std::atomic<bool>     cmd_in_progress = false;
      |                           ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<bool>’
  162 |     struct atomic;
      |            ^~~~~~
In file included from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:55,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/dbdma.h:163:27: error: field ‘cur_cmd’ has incomplete type ‘std::atomic<unsigned char>’
  163 |     std::atomic<uint8_t>  cur_cmd;
      |                           ^~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11/memory:78,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/common/ata/idechannel.h:32,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/ioctrl/macio.h:54,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.h:28,
                 from /mnt/60fd23a1-36b2-4d79-89b5-53dea5502477/store/projects/Macintosh Stuff/Emulation/dingusppc/dingusppc/devices/video/appleramdac.cpp:25:
/usr/include/c++/11/bits/atomic_base.h:162:12: note: declaration of ‘struct std::atomic<unsigned char>’
  162 |     struct atomic;
      |            ^~~~~~
make[3]: *** [devices/CMakeFiles/devices.dir/build.make:930: devices/CMakeFiles/devices.dir/video/appleramdac.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:340: devices/CMakeFiles/devices.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:242: CMakeFiles/dingusppc.dir/rule] Error 2
make: *** [Makefile:169: dingusppc] Error 2
 
Top