Parameters, BaseParm, and Parm.

This commit is contained in:
SodiumChlorideLogic 2021-10-20 14:05:29 -04:00
parent e5d889551a
commit b6ff1deb35
6 changed files with 163 additions and 661 deletions

View File

@ -24,354 +24,7 @@ __vt__8BaseParm:
.4byte read__8BaseParmFR6Stream
.4byte 0
.section .sdata2, "a" # 0x80516360 - 0x80520E40
.balign 0x8
.global lbl_805202D0
lbl_805202D0:
.4byte 0x09232025
.4byte 0x730D0A00
.global lbl_805202D8
lbl_805202D8:
.4byte 0x0D0A0000
.4byte 0x00000000
.section .text, "ax" # 0x800056C0 - 0x80472F00
.global __ct__8BaseParmFP10ParametersUlPc
__ct__8BaseParmFP10ParametersUlPc:
/* 80413658 00410598 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8041365C 0041059C 7C 08 02 A6 */ mflr r0
/* 80413660 004105A0 3C E0 80 4F */ lis r7, __vt__8BaseParm@ha
/* 80413664 004105A4 90 01 00 24 */ stw r0, 0x24(r1)
/* 80413668 004105A8 38 07 B5 78 */ addi r0, r7, __vt__8BaseParm@l
/* 8041366C 004105AC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80413670 004105B0 7C DF 33 78 */ mr r31, r6
/* 80413674 004105B4 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80413678 004105B8 7C BE 2B 78 */ mr r30, r5
/* 8041367C 004105BC 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80413680 004105C0 7C 9D 23 78 */ mr r29, r4
/* 80413684 004105C4 93 81 00 10 */ stw r28, 0x10(r1)
/* 80413688 004105C8 7C 7C 1B 78 */ mr r28, r3
/* 8041368C 004105CC 90 03 00 00 */ stw r0, 0(r3)
/* 80413690 004105D0 38 7C 00 04 */ addi r3, r28, 4
/* 80413694 004105D4 4B FF FB DD */ bl __ct__4ID32Fv
/* 80413698 004105D8 93 FC 00 14 */ stw r31, 0x14(r28)
/* 8041369C 004105DC 38 80 00 00 */ li r4, 0
/* 804136A0 004105E0 80 7D 00 04 */ lwz r3, 4(r29)
/* 804136A4 004105E4 48 00 00 0C */ b lbl_804136B0
lbl_804136A8:
/* 804136A8 004105E8 7C 64 1B 78 */ mr r4, r3
/* 804136AC 004105EC 80 63 00 10 */ lwz r3, 0x10(r3)
lbl_804136B0:
/* 804136B0 004105F0 28 03 00 00 */ cmplwi r3, 0
/* 804136B4 004105F4 40 82 FF F4 */ bne lbl_804136A8
/* 804136B8 004105F8 28 04 00 00 */ cmplwi r4, 0
/* 804136BC 004105FC 41 82 00 0C */ beq lbl_804136C8
/* 804136C0 00410600 93 84 00 10 */ stw r28, 0x10(r4)
/* 804136C4 00410604 48 00 00 08 */ b lbl_804136CC
lbl_804136C8:
/* 804136C8 00410608 93 9D 00 04 */ stw r28, 4(r29)
lbl_804136CC:
/* 804136CC 0041060C 7F C4 F3 78 */ mr r4, r30
/* 804136D0 00410610 38 7C 00 04 */ addi r3, r28, 4
/* 804136D4 00410614 4B FF FD 31 */ bl __as__4ID32FUl
/* 804136D8 00410618 38 00 00 00 */ li r0, 0
/* 804136DC 0041061C 7F 83 E3 78 */ mr r3, r28
/* 804136E0 00410620 90 1C 00 10 */ stw r0, 0x10(r28)
/* 804136E4 00410624 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 804136E8 00410628 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 804136EC 0041062C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 804136F0 00410630 83 81 00 10 */ lwz r28, 0x10(r1)
/* 804136F4 00410634 80 01 00 24 */ lwz r0, 0x24(r1)
/* 804136F8 00410638 7C 08 03 A6 */ mtlr r0
/* 804136FC 0041063C 38 21 00 20 */ addi r1, r1, 0x20
/* 80413700 00410640 4E 80 00 20 */ blr
.global write__10ParametersFR6Stream
write__10ParametersFR6Stream:
/* 80413704 00410644 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413708 00410648 7C 08 02 A6 */ mflr r0
/* 8041370C 0041064C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413710 00410650 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80413714 00410654 7C 7F 1B 78 */ mr r31, r3
/* 80413718 00410658 93 C1 00 08 */ stw r30, 8(r1)
/* 8041371C 0041065C 7C 9E 23 78 */ mr r30, r4
/* 80413720 00410660 80 83 00 08 */ lwz r4, 8(r3)
/* 80413724 00410664 7F C3 F3 78 */ mr r3, r30
/* 80413728 00410668 48 00 08 F5 */ bl textBeginGroup__6StreamFPc
/* 8041372C 0041066C 83 FF 00 04 */ lwz r31, 4(r31)
/* 80413730 00410670 48 00 00 6C */ b lbl_8041379C
lbl_80413734:
/* 80413734 00410674 80 9E 04 14 */ lwz r4, 0x414(r30)
/* 80413738 00410678 7F C3 F3 78 */ mr r3, r30
/* 8041373C 0041067C 48 00 0C F9 */ bl textWriteTab__6StreamFi
/* 80413740 00410680 7F C4 F3 78 */ mr r4, r30
/* 80413744 00410684 38 7F 00 04 */ addi r3, r31, 4
/* 80413748 00410688 4B FF FD 19 */ bl write__4ID32FR6Stream
/* 8041374C 0041068C 7F E3 FB 78 */ mr r3, r31
/* 80413750 00410690 81 9F 00 00 */ lwz r12, 0(r31)
/* 80413754 00410694 81 8C 00 08 */ lwz r12, 8(r12)
/* 80413758 00410698 7D 89 03 A6 */ mtctr r12
/* 8041375C 0041069C 4E 80 04 21 */ bctrl
/* 80413760 004106A0 7C 64 1B 78 */ mr r4, r3
/* 80413764 004106A4 7F C3 F3 78 */ mr r3, r30
/* 80413768 004106A8 48 00 20 59 */ bl writeInt__6StreamFi
/* 8041376C 004106AC 7F E3 FB 78 */ mr r3, r31
/* 80413770 004106B0 7F C4 F3 78 */ mr r4, r30
/* 80413774 004106B4 81 9F 00 00 */ lwz r12, 0(r31)
/* 80413778 004106B8 81 8C 00 0C */ lwz r12, 0xc(r12)
/* 8041377C 004106BC 7D 89 03 A6 */ mtctr r12
/* 80413780 004106C0 4E 80 04 21 */ bctrl
/* 80413784 004106C4 80 BF 00 14 */ lwz r5, 0x14(r31)
/* 80413788 004106C8 7F C3 F3 78 */ mr r3, r30
/* 8041378C 004106CC 38 82 1F 70 */ addi r4, r2, lbl_805202D0@sda21
/* 80413790 004106D0 4C C6 31 82 */ crclr 6
/* 80413794 004106D4 48 00 0A 49 */ bl textWriteText__6StreamFPce
/* 80413798 004106D8 83 FF 00 10 */ lwz r31, 0x10(r31)
lbl_8041379C:
/* 8041379C 004106DC 28 1F 00 00 */ cmplwi r31, 0
/* 804137A0 004106E0 40 82 FF 94 */ bne lbl_80413734
/* 804137A4 004106E4 80 9E 04 14 */ lwz r4, 0x414(r30)
/* 804137A8 004106E8 7F C3 F3 78 */ mr r3, r30
/* 804137AC 004106EC 48 00 0C 89 */ bl textWriteTab__6StreamFi
/* 804137B0 004106F0 3C 60 80 51 */ lis r3, eof__4ID32@ha
/* 804137B4 004106F4 7F C4 F3 78 */ mr r4, r30
/* 804137B8 004106F8 38 63 41 F0 */ addi r3, r3, eof__4ID32@l
/* 804137BC 004106FC 4B FF FC A5 */ bl write__4ID32FR6Stream
/* 804137C0 00410700 7F C3 F3 78 */ mr r3, r30
/* 804137C4 00410704 38 82 1F 78 */ addi r4, r2, lbl_805202D8@sda21
/* 804137C8 00410708 4C C6 31 82 */ crclr 6
/* 804137CC 0041070C 48 00 0A 11 */ bl textWriteText__6StreamFPce
/* 804137D0 00410710 7F C3 F3 78 */ mr r3, r30
/* 804137D4 00410714 48 00 08 CD */ bl textEndGroup__6StreamFv
/* 804137D8 00410718 80 01 00 14 */ lwz r0, 0x14(r1)
/* 804137DC 0041071C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 804137E0 00410720 83 C1 00 08 */ lwz r30, 8(r1)
/* 804137E4 00410724 7C 08 03 A6 */ mtlr r0
/* 804137E8 00410728 38 21 00 10 */ addi r1, r1, 0x10
/* 804137EC 0041072C 4E 80 00 20 */ blr
.global write__8BaseParmFR6Stream
write__8BaseParmFR6Stream:
/* 804137F0 00410730 4E 80 00 20 */ blr
.global read__10ParametersFR6Stream
read__10ParametersFR6Stream:
/* 804137F4 00410734 94 21 FE D0 */ stwu r1, -0x130(r1)
/* 804137F8 00410738 7C 08 02 A6 */ mflr r0
/* 804137FC 0041073C 90 01 01 34 */ stw r0, 0x134(r1)
/* 80413800 00410740 93 E1 01 2C */ stw r31, 0x12c(r1)
/* 80413804 00410744 93 C1 01 28 */ stw r30, 0x128(r1)
/* 80413808 00410748 7C 9E 23 78 */ mr r30, r4
/* 8041380C 0041074C 93 A1 01 24 */ stw r29, 0x124(r1)
/* 80413810 00410750 7C 7D 1B 78 */ mr r29, r3
lbl_80413814:
/* 80413814 00410754 38 61 00 08 */ addi r3, r1, 8
/* 80413818 00410758 4B FF FA 59 */ bl __ct__4ID32Fv
/* 8041381C 0041075C 7F C4 F3 78 */ mr r4, r30
/* 80413820 00410760 38 61 00 08 */ addi r3, r1, 8
/* 80413824 00410764 4B FF FC CD */ bl read__4ID32FR6Stream
/* 80413828 00410768 38 61 00 08 */ addi r3, r1, 8
/* 8041382C 0041076C 4B FF FA 29 */ bl isEof__4ID32Fv
/* 80413830 00410770 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80413834 00410774 40 82 00 6C */ bne lbl_804138A0
/* 80413838 00410778 38 61 00 08 */ addi r3, r1, 8
/* 8041383C 0041077C 38 81 00 14 */ addi r4, r1, 0x14
/* 80413840 00410780 4B FF FD A1 */ bl sprint__4ID32FPc
/* 80413844 00410784 7F C3 F3 78 */ mr r3, r30
/* 80413848 00410788 48 00 12 49 */ bl readInt__6StreamFv
/* 8041384C 0041078C 80 81 00 10 */ lwz r4, 0x10(r1)
/* 80413850 00410790 7C 7F 1B 78 */ mr r31, r3
/* 80413854 00410794 7F A3 EB 78 */ mr r3, r29
/* 80413858 00410798 48 00 00 69 */ bl findParm__10ParametersFUl
/* 8041385C 0041079C 28 03 00 00 */ cmplwi r3, 0
/* 80413860 004107A0 41 82 00 1C */ beq lbl_8041387C
/* 80413864 004107A4 81 83 00 00 */ lwz r12, 0(r3)
/* 80413868 004107A8 7F C4 F3 78 */ mr r4, r30
/* 8041386C 004107AC 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 80413870 004107B0 7D 89 03 A6 */ mtctr r12
/* 80413874 004107B4 4E 80 04 21 */ bctrl
/* 80413878 004107B8 4B FF FF 9C */ b lbl_80413814
lbl_8041387C:
/* 8041387C 004107BC 2C 1F FF FF */ cmpwi r31, -1
/* 80413880 004107C0 41 82 00 14 */ beq lbl_80413894
/* 80413884 004107C4 7F C3 F3 78 */ mr r3, r30
/* 80413888 004107C8 7F E4 FB 78 */ mr r4, r31
/* 8041388C 004107CC 48 00 0A 3D */ bl skipReading__6StreamFUl
/* 80413890 004107D0 4B FF FF 84 */ b lbl_80413814
lbl_80413894:
/* 80413894 004107D4 7F C3 F3 78 */ mr r3, r30
/* 80413898 004107D8 48 00 0A F5 */ bl skipReadingText__6StreamFv
/* 8041389C 004107DC 4B FF FF 78 */ b lbl_80413814
lbl_804138A0:
/* 804138A0 004107E0 80 01 01 34 */ lwz r0, 0x134(r1)
/* 804138A4 004107E4 83 E1 01 2C */ lwz r31, 0x12c(r1)
/* 804138A8 004107E8 83 C1 01 28 */ lwz r30, 0x128(r1)
/* 804138AC 004107EC 83 A1 01 24 */ lwz r29, 0x124(r1)
/* 804138B0 004107F0 7C 08 03 A6 */ mtlr r0
/* 804138B4 004107F4 38 21 01 30 */ addi r1, r1, 0x130
/* 804138B8 004107F8 4E 80 00 20 */ blr
.global read__8BaseParmFR6Stream
read__8BaseParmFR6Stream:
/* 804138BC 004107FC 4E 80 00 20 */ blr
.global findParm__10ParametersFUl
findParm__10ParametersFUl:
/* 804138C0 00410800 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 804138C4 00410804 7C 08 02 A6 */ mflr r0
/* 804138C8 00410808 90 01 00 14 */ stw r0, 0x14(r1)
/* 804138CC 0041080C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 804138D0 00410810 93 C1 00 08 */ stw r30, 8(r1)
/* 804138D4 00410814 7C 9E 23 78 */ mr r30, r4
/* 804138D8 00410818 83 E3 00 04 */ lwz r31, 4(r3)
/* 804138DC 0041081C 48 00 00 24 */ b lbl_80413900
lbl_804138E0:
/* 804138E0 00410820 7F C4 F3 78 */ mr r4, r30
/* 804138E4 00410824 38 7F 00 04 */ addi r3, r31, 4
/* 804138E8 00410828 4B FF FB 4D */ bl __eq__4ID32FUl
/* 804138EC 0041082C 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 804138F0 00410830 41 82 00 0C */ beq lbl_804138FC
/* 804138F4 00410834 7F E3 FB 78 */ mr r3, r31
/* 804138F8 00410838 48 00 00 14 */ b lbl_8041390C
lbl_804138FC:
/* 804138FC 0041083C 83 FF 00 10 */ lwz r31, 0x10(r31)
lbl_80413900:
/* 80413900 00410840 28 1F 00 00 */ cmplwi r31, 0
/* 80413904 00410844 40 82 FF DC */ bne lbl_804138E0
/* 80413908 00410848 38 60 00 00 */ li r3, 0
lbl_8041390C:
/* 8041390C 0041084C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413910 00410850 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80413914 00410854 83 C1 00 08 */ lwz r30, 8(r1)
/* 80413918 00410858 7C 08 03 A6 */ mtlr r0
/* 8041391C 0041085C 38 21 00 10 */ addi r1, r1, 0x10
/* 80413920 00410860 4E 80 00 20 */ blr
.global "read__7Parm<i>FR6Stream"
"read__7Parm<i>FR6Stream":
/* 80413924 00410864 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413928 00410868 7C 08 02 A6 */ mflr r0
/* 8041392C 0041086C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413930 00410870 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80413934 00410874 7C 7F 1B 78 */ mr r31, r3
/* 80413938 00410878 7C 83 23 78 */ mr r3, r4
/* 8041393C 0041087C 48 00 11 55 */ bl readInt__6StreamFv
/* 80413940 00410880 90 7F 00 18 */ stw r3, 0x18(r31)
/* 80413944 00410884 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413948 00410888 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8041394C 0041088C 7C 08 03 A6 */ mtlr r0
/* 80413950 00410890 38 21 00 10 */ addi r1, r1, 0x10
/* 80413954 00410894 4E 80 00 20 */ blr
.global "write__7Parm<i>FR6Stream"
"write__7Parm<i>FR6Stream":
/* 80413958 00410898 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8041395C 0041089C 7C 08 02 A6 */ mflr r0
/* 80413960 004108A0 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413964 004108A4 7C 80 23 78 */ mr r0, r4
/* 80413968 004108A8 80 83 00 18 */ lwz r4, 0x18(r3)
/* 8041396C 004108AC 7C 03 03 78 */ mr r3, r0
/* 80413970 004108B0 48 00 1E 51 */ bl writeInt__6StreamFi
/* 80413974 004108B4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413978 004108B8 7C 08 03 A6 */ mtlr r0
/* 8041397C 004108BC 38 21 00 10 */ addi r1, r1, 0x10
/* 80413980 004108C0 4E 80 00 20 */ blr
.global "read__8Parm<Uc>FR6Stream"
"read__8Parm<Uc>FR6Stream":
/* 80413984 004108C4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413988 004108C8 7C 08 02 A6 */ mflr r0
/* 8041398C 004108CC 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413990 004108D0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80413994 004108D4 7C 7F 1B 78 */ mr r31, r3
/* 80413998 004108D8 7C 83 23 78 */ mr r3, r4
/* 8041399C 004108DC 48 00 0B 01 */ bl readByte__6StreamFv
/* 804139A0 004108E0 98 7F 00 18 */ stb r3, 0x18(r31)
/* 804139A4 004108E4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 804139A8 004108E8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 804139AC 004108EC 7C 08 03 A6 */ mtlr r0
/* 804139B0 004108F0 38 21 00 10 */ addi r1, r1, 0x10
/* 804139B4 004108F4 4E 80 00 20 */ blr
.global "write__8Parm<Uc>FR6Stream"
"write__8Parm<Uc>FR6Stream":
/* 804139B8 004108F8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 804139BC 004108FC 7C 08 02 A6 */ mflr r0
/* 804139C0 00410900 90 01 00 14 */ stw r0, 0x14(r1)
/* 804139C4 00410904 88 03 00 18 */ lbz r0, 0x18(r3)
/* 804139C8 00410908 7C 83 23 78 */ mr r3, r4
/* 804139CC 0041090C 7C 04 03 78 */ mr r4, r0
/* 804139D0 00410910 48 00 1C A1 */ bl writeByte__6StreamFUc
/* 804139D4 00410914 80 01 00 14 */ lwz r0, 0x14(r1)
/* 804139D8 00410918 7C 08 03 A6 */ mtlr r0
/* 804139DC 0041091C 38 21 00 10 */ addi r1, r1, 0x10
/* 804139E0 00410920 4E 80 00 20 */ blr
.global "read__7Parm<b>FR6Stream"
"read__7Parm<b>FR6Stream":
/* 804139E4 00410924 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 804139E8 00410928 7C 08 02 A6 */ mflr r0
/* 804139EC 0041092C 90 01 00 14 */ stw r0, 0x14(r1)
/* 804139F0 00410930 93 E1 00 0C */ stw r31, 0xc(r1)
/* 804139F4 00410934 7C 7F 1B 78 */ mr r31, r3
/* 804139F8 00410938 7C 83 23 78 */ mr r3, r4
/* 804139FC 0041093C 48 00 0A A1 */ bl readByte__6StreamFv
/* 80413A00 00410940 54 63 06 3E */ clrlwi r3, r3, 0x18
/* 80413A04 00410944 7C 03 00 D0 */ neg r0, r3
/* 80413A08 00410948 7C 00 1B 78 */ or r0, r0, r3
/* 80413A0C 0041094C 54 00 0F FE */ srwi r0, r0, 0x1f
/* 80413A10 00410950 98 1F 00 18 */ stb r0, 0x18(r31)
/* 80413A14 00410954 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80413A18 00410958 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413A1C 0041095C 7C 08 03 A6 */ mtlr r0
/* 80413A20 00410960 38 21 00 10 */ addi r1, r1, 0x10
/* 80413A24 00410964 4E 80 00 20 */ blr
.global "write__7Parm<b>FR6Stream"
"write__7Parm<b>FR6Stream":
/* 80413A28 00410968 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413A2C 0041096C 7C 08 02 A6 */ mflr r0
/* 80413A30 00410970 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413A34 00410974 88 A3 00 18 */ lbz r5, 0x18(r3)
/* 80413A38 00410978 7C 83 23 78 */ mr r3, r4
/* 80413A3C 0041097C 7C 05 00 D0 */ neg r0, r5
/* 80413A40 00410980 7C 00 2B 78 */ or r0, r0, r5
/* 80413A44 00410984 54 04 0F FE */ srwi r4, r0, 0x1f
/* 80413A48 00410988 48 00 1C 29 */ bl writeByte__6StreamFUc
/* 80413A4C 0041098C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413A50 00410990 7C 08 03 A6 */ mtlr r0
/* 80413A54 00410994 38 21 00 10 */ addi r1, r1, 0x10
/* 80413A58 00410998 4E 80 00 20 */ blr
.global "read__7Parm<f>FR6Stream"
"read__7Parm<f>FR6Stream":
/* 80413A5C 0041099C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413A60 004109A0 7C 08 02 A6 */ mflr r0
/* 80413A64 004109A4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413A68 004109A8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80413A6C 004109AC 7C 7F 1B 78 */ mr r31, r3
/* 80413A70 004109B0 7C 83 23 78 */ mr r3, r4
/* 80413A74 004109B4 48 00 13 39 */ bl readFloat__6StreamFv
/* 80413A78 004109B8 D0 3F 00 18 */ stfs f1, 0x18(r31)
/* 80413A7C 004109BC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413A80 004109C0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80413A84 004109C4 7C 08 03 A6 */ mtlr r0
/* 80413A88 004109C8 38 21 00 10 */ addi r1, r1, 0x10
/* 80413A8C 004109CC 4E 80 00 20 */ blr
.global "write__7Parm<f>FR6Stream"
"write__7Parm<f>FR6Stream":
/* 80413A90 004109D0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80413A94 004109D4 7C 08 02 A6 */ mflr r0
/* 80413A98 004109D8 90 01 00 14 */ stw r0, 0x14(r1)
/* 80413A9C 004109DC C0 23 00 18 */ lfs f1, 0x18(r3)
/* 80413AA0 004109E0 7C 83 23 78 */ mr r3, r4
/* 80413AA4 004109E4 48 00 1D A5 */ bl writeFloat__6StreamFf
/* 80413AA8 004109E8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80413AAC 004109EC 7C 08 03 A6 */ mtlr r0
/* 80413AB0 004109F0 38 21 00 10 */ addi r1, r1, 0x10
/* 80413AB4 004109F4 4E 80 00 20 */ blr
.global __ct__10ParmStringFP10ParametersPciUlPc
__ct__10ParmStringFP10ParametersPciUlPc:
/* 80413AB8 004109F8 94 21 FF E0 */ stwu r1, -0x20(r1)

View File

@ -1,10 +1,40 @@
#ifndef _BASEPARM_H
#define _BASEPARM_H
#include "types.h"
#include "id32.h"
#include "Parameters.h"
struct BaseParm {
BaseParm(struct Parameters*, unsigned long, char*);
void read(struct Stream&);
void write(struct Stream&);
virtual int size();
virtual void write(Stream&);
virtual void read(Stream&);
// _00 vtbl
ID32 m_id; // _04
BaseParm* m_next; // _10
char* m_comment; // _14
};
template <typename T> struct Parm : public BaseParm {
virtual int size();
virtual void write(Stream&);
virtual void read(Stream&);
T m_value; // _18
u32 _1C; // _1C
T m_min; // _20
T m_max; // _24
};
struct ParmString : public BaseParm {
ParmString(Parameters*, char*, int, unsigned long, char*);
virtual void write(Stream&);
virtual void read(Stream&);
char* m_value;
int m_length;
};
#endif

19
include/Parameters.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef _PARAMETERS_H
#define _PARAMETERS_H
#include "id32.h"
#include "stream.h"
typedef struct BaseParm BaseParm;
struct Parameters {
void write(Stream&);
void read(Stream&);
BaseParm* findParm(ulong);
void* m_endAddress; // _00
BaseParm* m_parmsHead; // _04
char* m_name; // _08
};
#endif

22
include/printf.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef _PRINTF_H
#define _PRINTF_H
void sprintf(void);
void snprintf(void);
void vsprintf(void);
void vsnprintf(void);
void vfprintf(void);
void vprintf(void);
void fprintf(void);
void printf(void);
void __StringWrite(void);
void __FileWrite(int, long, int);
void __pformatter(void);
void float2str(void);
void round_decimal(void);
void double2hex(void);
void longlong2str(void);
void long2str(void);
void parse_format(void);
#endif

View File

@ -1078,6 +1078,7 @@ TEXT_PART_TWO:=\
$(BUILD_DIR)/asm/sysCommonU/sysMath.o\
$(BUILD_DIR)/src/sysCommonU/id32.o\
$(BUILD_DIR)/asm/sysCommonU/id32.o\
$(BUILD_DIR)/src/sysCommonU/parameters.o\
$(BUILD_DIR)/asm/sysCommonU/parameters.o\
$(BUILD_DIR)/asm/sysCommonU/stream.o\
$(BUILD_DIR)/asm/sysCommonU/geometry.o\

View File

@ -1,66 +1,31 @@
#include "Parameters.h"
#include "stream.h"
#include "BaseParm.h"
#include "Dolphin/string.h"
extern
/*
* --INFO--
* Address: 80413658
* Size: 0000AC
*/
void BaseParm::BaseParm(Parameters*, unsigned long, char*)
BaseParm::BaseParm(Parameters* parameters, ulong rawID, char* comment)
: m_id()
, m_comment(comment)
{
/*
.loc_0x0:
stwu r1, -0x20(r1)
mflr r0
lis r7, 0x804F
stw r0, 0x24(r1)
subi r0, r7, 0x4A88
stw r31, 0x1C(r1)
mr r31, r6
stw r30, 0x18(r1)
mr r30, r5
stw r29, 0x14(r1)
mr r29, r4
stw r28, 0x10(r1)
mr r28, r3
stw r0, 0x0(r3)
addi r3, r28, 0x4
bl -0x424
stw r31, 0x14(r28)
li r4, 0
lwz r3, 0x4(r29)
b .loc_0x58
.loc_0x50:
mr r4, r3
lwz r3, 0x10(r3)
.loc_0x58:
cmplwi r3, 0
bne+ .loc_0x50
cmplwi r4, 0
beq- .loc_0x70
stw r28, 0x10(r4)
b .loc_0x74
.loc_0x70:
stw r28, 0x4(r29)
.loc_0x74:
mr r4, r30
addi r3, r28, 0x4
bl -0x2D0
li r0, 0
mr r3, r28
stw r0, 0x10(r28)
lwz r31, 0x1C(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
lwz r28, 0x10(r1)
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
*/
BaseParm* parm1;
BaseParm* parm2 = nullptr;
for (parm1 = parameters->m_parmsHead; parm1 != NULL; parm1 = parm2->m_next) {
parm2 = parm1;
}
if (parm2 != nullptr) {
parm2->m_next = this;
} else {
parameters->m_parmsHead = this;
}
m_id = rawID;
m_next = nullptr;
}
/*
@ -68,74 +33,20 @@ void BaseParm::BaseParm(Parameters*, unsigned long, char*)
* Address: 80413704
* Size: 0000EC
*/
void Parameters::write(Stream&)
void Parameters::write(Stream& stream)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xC(r1)
mr r31, r3
stw r30, 0x8(r1)
mr r30, r4
lwz r4, 0x8(r3)
mr r3, r30
bl 0x8F4
lwz r31, 0x4(r31)
b .loc_0x98
.loc_0x30:
lwz r4, 0x414(r30)
mr r3, r30
bl 0xCF8
mr r4, r30
addi r3, r31, 0x4
bl -0x2E8
mr r3, r31
lwz r12, 0x0(r31)
lwz r12, 0x8(r12)
mtctr r12
bctrl
mr r4, r3
mr r3, r30
bl 0x2058
mr r3, r31
mr r4, r30
lwz r12, 0x0(r31)
lwz r12, 0xC(r12)
mtctr r12
bctrl
lwz r5, 0x14(r31)
mr r3, r30
addi r4, r2, 0x1F70
crclr 6, 0x6
bl 0xA48
lwz r31, 0x10(r31)
.loc_0x98:
cmplwi r31, 0
bne+ .loc_0x30
lwz r4, 0x414(r30)
mr r3, r30
bl 0xC88
lis r3, 0x8051
mr r4, r30
addi r3, r3, 0x41F0
bl -0x35C
mr r3, r30
addi r4, r2, 0x1F78
crclr 6, 0x6
bl 0xA10
mr r3, r30
bl 0x8CC
lwz r0, 0x14(r1)
lwz r31, 0xC(r1)
lwz r30, 0x8(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
stream.textBeginGroup(m_name);
for (BaseParm* parm = m_parmsHead; parm != nullptr; parm = parm->m_next) {
stream.textWriteTab(stream.m_tabCount);
parm->m_id.write(stream);
stream.writeInt(parm->size());
parm->write(stream);
stream.textWriteText("\t# %s\r\n", parm->m_comment);
}
stream.textWriteTab(stream.m_tabCount);
ID32::eof.write(stream);
stream.textWriteText("\r\n");
stream.textEndGroup();
}
/*
@ -143,76 +54,36 @@ void Parameters::write(Stream&)
* Address: 804137F0
* Size: 000004
*/
void BaseParm::write(Stream&) { return; }
void BaseParm::write(Stream& stream) { return; }
/*
* --INFO--
* Address: 804137F4
* Size: 0000C8
*/
void Parameters::read(Stream&)
void Parameters::read(Stream& stream)
{
/*
.loc_0x0:
stwu r1, -0x130(r1)
mflr r0
stw r0, 0x134(r1)
stw r31, 0x12C(r1)
stw r30, 0x128(r1)
mr r30, r4
stw r29, 0x124(r1)
mr r29, r3
.loc_0x20:
addi r3, r1, 0x8
bl -0x5A8
mr r4, r30
addi r3, r1, 0x8
bl -0x334
addi r3, r1, 0x8
bl -0x5D8
rlwinm. r0,r3,0,24,31
bne- .loc_0xAC
addi r3, r1, 0x8
addi r4, r1, 0x14
bl -0x260
mr r3, r30
bl 0x1248
lwz r4, 0x10(r1)
mr r31, r3
mr r3, r29
bl 0x68
cmplwi r3, 0
beq- .loc_0x88
lwz r12, 0x0(r3)
mr r4, r30
lwz r12, 0x10(r12)
mtctr r12
bctrl
b .loc_0x20
.loc_0x88:
cmpwi r31, -0x1
beq- .loc_0xA0
mr r3, r30
mr r4, r31
bl 0xA3C
b .loc_0x20
.loc_0xA0:
mr r3, r30
bl 0xAF4
b .loc_0x20
.loc_0xAC:
lwz r0, 0x134(r1)
lwz r31, 0x12C(r1)
lwz r30, 0x128(r1)
lwz r29, 0x124(r1)
mtlr r0
addi r1, r1, 0x130
blr
*/
BaseParm* currentParm;
while (true) {
ID32 currentID;
currentID.read(stream);
if (currentID.isEof()) {
return;
}
char buffer[256];
currentID.sprint(buffer);
int parmSize = stream.readInt();
currentParm = findParm(currentID.m_id.raw);
if (currentParm != nullptr) {
currentParm->read(stream);
} else {
if (parmSize != -1) {
stream.skipReading(parmSize);
} else {
stream.skipReadingText();
}
}
}
}
/*
@ -220,51 +91,23 @@ void Parameters::read(Stream&)
* Address: 804138BC
* Size: 000004
*/
void BaseParm::read(Stream&) { return; }
void BaseParm::read(Stream& stream) { return; }
/*
* --INFO--
* Address: 804138C0
* Size: 000064
*/
void Parameters::findParm(unsigned long)
BaseParm* Parameters::findParm(ulong rawID)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xC(r1)
stw r30, 0x8(r1)
mr r30, r4
lwz r31, 0x4(r3)
b .loc_0x40
.loc_0x20:
mr r4, r30
addi r3, r31, 0x4
bl -0x4B4
rlwinm. r0,r3,0,24,31
beq- .loc_0x3C
mr r3, r31
b .loc_0x4C
.loc_0x3C:
lwz r31, 0x10(r31)
.loc_0x40:
cmplwi r31, 0
bne+ .loc_0x20
li r3, 0
.loc_0x4C:
lwz r0, 0x14(r1)
lwz r31, 0xC(r1)
lwz r30, 0x8(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
for (BaseParm* parm = m_parmsHead; parm != nullptr; parm = parm->m_next) {
if (parm->m_id == rawID) {
return parm;
}
}
return nullptr;
}
/*
@ -272,144 +115,76 @@ void Parameters::findParm(unsigned long)
* Address: 80413924
* Size: 000034
*/
void Parm<int>::read(Stream& stream) { this->value = stream.readInt(); }
template<> void Parm<int>::read(Stream& stream) { m_value = stream.readInt(); }
/*
* --INFO--
* Address: 80413958
* Size: 00002C
*/
void Parm<int>::write(Stream& stream) { stream.writeInt(this->value); }
template<> void Parm<int>::write(Stream& stream) { stream.writeInt(m_value); }
/*
* --INFO--
* Address: 80413984
* Size: 000034
*/
void Parm<unsigned char>::read(Stream&)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xC(r1)
mr r31, r3
mr r3, r4
bl 0xB00
stb r3, 0x18(r31)
lwz r0, 0x14(r1)
lwz r31, 0xC(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
template<> void Parm<unsigned char>::read(Stream& stream) { m_value = stream.readByte(); }
/*
* --INFO--
* Address: 804139B8
* Size: 00002C
*/
void Parm<unsigned char>::write(Stream&)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lbz r0, 0x18(r3)
mr r3, r4
mr r4, r0
bl 0x1CA0
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
template<> void Parm<unsigned char>::write(Stream& stream) { stream.writeByte((u8)m_value); }
/*
* --INFO--
* Address: 804139E4
* Size: 000044
*/
void Parm<bool>::read(Stream&)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xC(r1)
mr r31, r3
mr r3, r4
bl 0xAA0
rlwinm r3,r3,0,24,31
neg r0, r3
or r0, r0, r3
rlwinm r0,r0,1,31,31
stb r0, 0x18(r31)
lwz r31, 0xC(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
template<> void Parm<bool>::read(Stream& stream) { m_value = (bool)stream.readByte(); }
/*
* --INFO--
* Address: 80413A28
* Size: 000034
*/
void Parm<bool>::write(Stream&)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lbz r5, 0x18(r3)
mr r3, r4
neg r0, r5
or r0, r0, r5
rlwinm r4,r0,1,31,31
bl 0x1C28
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
template<> void Parm<bool>::write(Stream& stream) { stream.writeByte(m_value ? 1 : 0); }
/*
* --INFO--
* Address: 80413A5C
* Size: 000034
*/
void Parm<float>::read(Stream&)
{
float fVar1;
fVar1 = Stream::readFloat(stream);
this->value = fVar1;
}
template<> void Parm<float>::read(Stream& stream) { m_value = stream.readFloat(); }
/*
* --INFO--
* Address: 80413A90
* Size: 000028
*/
void Parm<float>::write(Stream&) { Stream::writeFloat(stream, this->value); }
template<> void Parm<float>::write(Stream& stream) { stream.writeFloat(m_value); }
#ifdef NOPE
/*
* --INFO--
* Address: 80413AB8
* Size: 0001B0
*/
void ParmString::ParmString(Parameters*, char*, int, unsigned long, char*)
ParmString::ParmString(Parameters* parameters, char* value, int length, ulong rawID, char* comment)
: BaseParm(parameters, rawID, comment)
, m_length(length)
{
char* buffer = new char[m_length+1];
m_value = buffer;
int actualLength = strlen(value);
int i;
for (i = 0; i < actualLength; ++i) {
m_value[i] = value[i];
}
m_value[i] = '\0';
/*
.loc_0x0:
stwu r1, -0x20(r1)
@ -683,3 +458,5 @@ int ParmEnum::size() { return 4; }
* Size: 000008
*/
int ParmString::size() { return -1; }
#endif