From b9d976fa0c3fb2524e256bfe65b99d602de0a88c Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Sat, 17 Aug 2019 09:23:37 +0800 Subject: [PATCH] Create README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..74f5697 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +This was an attempt at programmatically transplanting code between the 68k +MainCode parts of different Macintosh ROMs. The idea was to help clarify the +important features of the NewWorld images that refuse to boot my Mac mini. + +It works only for GoNative (the ROM Code Fragment Manager), although there is +some reusable supporting code. This is likely a dead end, but I thought I'd +share some insights that I have gained into the ROM-patching problem. + +Matching the commonly called and rarely changed ROM glue code (GetHandleSize +etc) is easy, but other functions are very hard. I considered using a known-good +ROM disassembly and generating regular expressions that would match only the +major opcodes of a given function. + +Closely coupled functions can have subtle but catastrophic incompatibility at +the binary level, e.g. in struct layouts. + +You need to decide whether to patch a function's callers or place a BRA.L in the +function itself. Then, you need to decide where and how control will return to +the original ROM.