mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-28 13:52:37 +00:00
Reverse quite ugly struct-editing func
This commit is contained in:
parent
b39f3ffead
commit
9527f92ec9
@ -3259,6 +3259,53 @@ diff --git a/Internal/C/StdIncludes.h b/Internal/C/StdIncludes.h
|
||||
#include <Icons.h>
|
||||
#include <LowMem.h>
|
||||
#include <Memory.h>
|
||||
diff --git a/Internal/C/UniversalEqu.h b/Internal/C/UniversalEqu.h
|
||||
--- a/Internal/C/UniversalEqu.h
|
||||
+++ b/Internal/C/UniversalEqu.h
|
||||
@@ -236,7 +236,27 @@ enum BasesValidFlags {
|
||||
CivicExists,
|
||||
SebastianExists,
|
||||
BARTExists,
|
||||
- GrandCentralExists
|
||||
+ GrandCentralExists,
|
||||
+ PBX1Exists,
|
||||
+ PBX2Exists,
|
||||
+ PBX3Exists,
|
||||
+ ATAExists,
|
||||
+ HammerHeadExists,
|
||||
+ PlatinumExists,
|
||||
+ Pratt2Exists,
|
||||
+ PSXExists,
|
||||
+ OHareExists,
|
||||
+ GrackleExists,
|
||||
+ HydraExists,
|
||||
+ SuperIOExists,
|
||||
+ SIOExists,
|
||||
+ HeathrowExists,
|
||||
+ MFMFloppyExists,
|
||||
+ MFMMethodsVectorExists,
|
||||
+ FatManExists,
|
||||
+ OpenPICExists,
|
||||
+ CHRPNess,
|
||||
+ GatwickExists
|
||||
};
|
||||
|
||||
|
||||
@@ -308,10 +328,14 @@ struct ProductInfo {
|
||||
long adbDebugUtilPtr; // offset to low level ADB/DebugUtil vector table
|
||||
long powerManagerPtr; // offset to low level Power Manager vector table
|
||||
long intHandlerPtr; // offset to low level interrupt handler setup table
|
||||
+ long ImmgPrimPtr;
|
||||
|
||||
unsigned short cpuIDValue; // expected contents of CPU ID register
|
||||
unsigned short filler;
|
||||
long iconInfoPtr; // offset to icon info table
|
||||
+
|
||||
+ long gooby1Ptr;
|
||||
+ long gooby2Ptr;
|
||||
};
|
||||
typedef struct ProductInfo ProductInfo;
|
||||
|
||||
diff --git a/Internal/Pascal/DialogsPriv.p b/Internal/Pascal/DialogsPriv.p
|
||||
--- a/Internal/Pascal/DialogsPriv.p
|
||||
+++ b/Internal/Pascal/DialogsPriv.p
|
||||
@ -22830,7 +22877,7 @@ diff --git a/OS/StartMgr/OpenFirmware.c b/OS/StartMgr/OpenFirmware.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/OS/StartMgr/OpenFirmware.c
|
||||
@@ -0,0 +1,419 @@
|
||||
@@ -0,0 +1,483 @@
|
||||
+#include <CodeFragments.h>
|
||||
+#include <NameRegistry.h>
|
||||
+#include <NameRegistryPriv.h>
|
||||
@ -22839,6 +22886,7 @@ new file mode 100644
|
||||
+#include <Memory.h>
|
||||
+#include <Devices.h>
|
||||
+#include <TextUtils.h>
|
||||
+#include <UniversalEqu.h>
|
||||
+
|
||||
+
|
||||
+struct mystruct {
|
||||
@ -23249,6 +23297,69 @@ new file mode 100644
|
||||
+ RegistryEntryIterateDispose(&cookie);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+INTERC_1CA0_INCREMENTSTRUCTFIELD(char **field, long offset)
|
||||
+{
|
||||
+ char *val = *field;
|
||||
+ if (val != NULL) {
|
||||
+ val += offset;
|
||||
+ *field = val;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+MOVEUNIVINFOTOSYSHEAP()
|
||||
+{
|
||||
+ Ptr intermed; //reg a3
|
||||
+
|
||||
+ long d5; //reg d5
|
||||
+ long dlen; //reg d6
|
||||
+ long point; //reg d7
|
||||
+
|
||||
+ ProductInfo *oldPtr; //reg a2
|
||||
+ register ProductInfo *newPtr; //reg a4
|
||||
+
|
||||
+ if (!TestForBaseAddr(CHRPNess)) return;
|
||||
+
|
||||
+ dlen = 0x228;
|
||||
+ intermed = NewPtrSys(dlen);
|
||||
+ if (intermed == NULL) return;
|
||||
+
|
||||
+ point = (long)intermed;
|
||||
+ point = (point + 3) & ~3;
|
||||
+
|
||||
+ {
|
||||
+ long occult;
|
||||
+ d5 = point;
|
||||
+ intermed = (Ptr)d5;
|
||||
+ newPtr = (ProductInfo *)d5;
|
||||
+ point += 0x218;
|
||||
+ *(&occult) = point;
|
||||
+ dlen = point - (long)intermed;
|
||||
+ }
|
||||
+
|
||||
+ oldPtr = *(ProductInfo **)UnivInfoPtr;
|
||||
+ BlockMoveData(oldPtr, newPtr, dlen);
|
||||
+ intermed = (Ptr)((Ptr)oldPtr - (Ptr)newPtr);
|
||||
+
|
||||
+ #define x(y) INTERC_1CA0_INCREMENTSTRUCTFIELD((char **)(&newPtr->y), (long)intermed)
|
||||
+
|
||||
+ x(ramInfoPtr);
|
||||
+ x(videoInfoPtr);
|
||||
+ x(nubusInfoPtr);
|
||||
+ x(via1InitPtr);
|
||||
+ x(via2InitPtr);
|
||||
+ x(sndControlPtr);
|
||||
+ x(clockPRAMPtr);
|
||||
+ x(adbDebugUtilPtr);
|
||||
+ x(powerManagerPtr);
|
||||
+ x(intHandlerPtr);
|
||||
+ x(gooby2Ptr);
|
||||
+ x(iconInfoPtr);
|
||||
+
|
||||
+ *(ProductInfo **)UnivInfoPtr = newPtr;
|
||||
+}
|
||||
+
|
||||
+/* This file is complete... the remaining kilobytes to 0x2BC0 are filled by Amphibian DNA */
|
||||
diff --git a/OS/StartMgr/OpenFirmware.c.idump b/OS/StartMgr/OpenFirmware.c.idump
|
||||
new file mode 100644
|
||||
|
Loading…
Reference in New Issue
Block a user