From danielbj314 at verizon.net Tue Jan 1 02:10:34 2019 From: danielbj314 at verizon.net (Daniel B-J) Date: Mon, 31 Dec 2018 13:10:34 -0500 Subject: [CDG5] Process Manager In-Reply-To: <770CA0E9-79A2-4A77-AB2D-63E3F25A99B2@fastmail.com> References: <36580478-8B6B-4D13-BE26-B5B76AEA6C0E@fastmail.com> <15EB032C-E968-4903-BF5A-9177F1907A40@fastmail.com> <4D40EE78-3084-411A-95C7-BC84BB8AF1C9@fastmail.com> <31ADE966-C18F-4389-B1F5-EE96FF0A50F0@verizon.net> <1BB7E271-B16C-4C81-86DB-F3E150BB41AF@fastmail.com> <770CA0E9-79A2-4A77-AB2D-63E3F25A99B2@fastmail.com> Message-ID: <477719A9-7285-4CB4-A64F-9478B4BFEF60@verizon.net> > To build the ProcessMgrINIT, check out the 'system' branch of the CubeE > repo. With BuildCubeE: Awesome. Resource override maps are cool. > Time for me to focus on other things for a bit, but (cough Daniel) I'd > love to hear about any testing or tinkering done. I've been mostly doing non-Mac electronics tinkering. I only really did one relevant thing, which was to interface an Arduino to a LCIII serial port. > All right -- I will quiet down about the Process Manager now. But it's so cool! > Happy new year everyone! :) From elliotnunn at fastmail.com Fri Jan 4 13:47:20 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Fri, 4 Jan 2019 13:47:20 +0800 Subject: [CDG5] Native access to compressed resources Message-ID: Hi guys, Out of frustration, I have written a tiny MPW tool (pre-compiled for your convenience) that decompresses a file's resources through the System 7-native mechanism. Max, it might help you to clean up the last few compression formats. https://github.com/elliotnunn/ResExtract Cheers, Elliot From maximumspatium at googlemail.com Tue Jan 8 23:05:07 2019 From: maximumspatium at googlemail.com (Max Poliakovski) Date: Tue, 8 Jan 2019 16:05:07 +0100 Subject: [CDG5] MPW and Trampoline Message-ID: Hi guys, happy new year! > Quoting Elliot's mail from 05-02-2018: > I have had some success getting Apple's 68k C compiler to produce byte-accurate output. (A few things were in my favour here: simple C code, a simple C compiler and some sources for a previous version of the binary.) I always aim for byte-perfection after building my reversed sources (admittedly mostly assembly) because it lets me know when I've messed up. However, my approach is not always practical, and your focus on high-level hacking is likely to be more rewarding. I've played a couple of days with EMPW with the goal to get a byte-perfect output for the string.c module that consists of seven short functions (3-7 statements). As expected, I wasn't able to obtain byte-perfect output with MrC regardless different optimizations and even compiler versions. Below a short report: MrC 4.1.0 from MPW 3.5 GM emits code that is far from the code located in the Trampoline binary. I therefore downgraded to MrC 3.0.1 from 02-20-1997 that can be obtained here: https://www.staticky.com/mirrors/ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_Website_Downloads/ With MrC 3.0.1, I was able to perfectly reconstruct strlen() and memset() - both are very, very simple functions. After playing with optimization settings abit, the code for strcpy() got very close to the Apple's binary except a small difference in the register allocation ($r11 and $r12 are swapped). I also tried MrC 4.1a1 but it seems to go in the wrong direction. I suspect that Apple might have used even an older compiler. The only possibility to check that out is to get a copy of MPW 3.4 (1995) which seems to be one of the first MPW versions including PowerPC compilers. Does somebody own MPW 3.4? I've seen only 3.3, 3.5 and PR so far... Cheers Max -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.ucc.gu.uwa.edu.au/pipermail/cdg5/attachments/20190108/73df68aa/attachment.htm From elliotnunn at fastmail.com Wed Jan 9 12:21:37 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Wed, 9 Jan 2019 12:21:37 +0800 Subject: [CDG5] MPW and Trampoline In-Reply-To: References: Message-ID: <90888A36-E9EB-447C-BD6D-529B13355D2A@fastmail.com> Happy new year! MrC round-tripping sounds like a very hard slog. After all, RISC is sometimes said to stand for "Relegate the Interesting Stuff to the Compiler"! Mind you, with your intimate familiarity with the architecture, you could well enjoy some breakthroughs. I can't seem to find MPW 3.4 in my archives. Is it old enough even to have a RISC compiler? I think that the early ones were distributed as a separate SDK. I suggest downloading all the E.T.O. images that you can find. They are the best library of MPW tools that I have found. Have you built any bootable Trampolines? That would be a very powerful validation of your reversal. > On 8 Jan 2019, at 11:05 pm, Max Poliakovski wrote: > > Hi guys, > > happy new year! > > > Quoting Elliot's mail from 05-02-2018: > > I have had some success getting Apple's 68k C compiler to produce byte-accurate output. (A few things were in my favour here: simple C code, a simple C compiler and some sources for a previous version of the binary.) I always aim for byte-perfection after building my reversed sources (admittedly mostly assembly) because it lets me know when I've messed up. However, my approach is not always practical, and your focus on high-level hacking is likely to be more rewarding. > > I've played a couple of days with EMPW with the goal to get a byte-perfect output for the string.c module that consists of seven short functions (3-7 statements). > > As expected, I wasn't able to obtain byte-perfect output with MrC regardless different optimizations and even compiler versions. > > Below a short report: > > MrC 4.1.0 from MPW 3.5 GM emits code that is far from the code located in the Trampoline binary. > > I therefore downgraded to MrC 3.0.1 from 02-20-1997 that can be obtained here: https://www.staticky.com/mirrors/ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_Website_Downloads/ > > With MrC 3.0.1, I was able to perfectly reconstruct strlen() and memset() - both are very, very simple functions. After playing with optimization settings abit, the code for strcpy() got very close to the Apple's binary except a small difference in the register allocation ($r11 and $r12 are swapped). > > I also tried MrC 4.1a1 but it seems to go in the wrong direction. > > I suspect that Apple might have used even an older compiler. The only possibility to check that out is to get a copy of MPW 3.4 (1995) which seems to be one of the first MPW versions including PowerPC compilers. > > Does somebody own MPW 3.4? I've seen only 3.3, 3.5 and PR so far... > > Cheers > Max > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 From elliotnunn at fastmail.com Mon Jan 14 16:47:30 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Mon, 14 Jan 2019 16:47:30 +0800 Subject: [CDG5] BuildCubeE Message-ID: Hi all, I have updated BuildCubeE to support tools other than MPW. The -c option runs an MPW command as before, but the Finder and ResEdit are also available. Maybe CodeWarrior ~v4 could be added in the future? Or THINK C? Additionally, I have made the binary patches much neater. For example, by patching the Process Manager directly, I can avoid having to make MPW Shell a 'FNDR' in the System Folder. Hit me with suggestions for new names! I intend for this to be a rock-solid cross-platform heir to EMPW (not that EMPW is going away). Elliot