|
| 1 | +#include "common.h" |
| 2 | +#include "debug.h" |
| 3 | +#include "unk.h" |
| 4 | + |
| 5 | +#include "FGDK3/Playstation2/IOPMem.h" |
| 6 | +#include <ee/sifdev.h> |
| 7 | +#include "FGDK3/ThrowCat.h" |
| 8 | + |
| 9 | +#ifdef NON_MATCHING |
| 10 | + |
| 11 | +Status IOPMem_InternalInitialise() { |
| 12 | + return Status(0xFFFFFFFF, "c:/coding/fgdk3/Code/Playstation2/IOPMem.cpp", 47); |
| 13 | +} |
| 14 | + |
| 15 | +#else |
| 16 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", IOPMem_InternalInitialise__Fv); |
| 17 | +#endif |
| 18 | + |
| 19 | +void IOPMem_InternalFinalise() { |
| 20 | + return; |
| 21 | +} |
| 22 | + |
| 23 | +#ifdef NON_MATCHING |
| 24 | + |
| 25 | +StdInit_ModuleDescription IOPMem_StdInit_Description = { |
| 26 | + 0, |
| 27 | + &IOPMem_StdInit_UsedModules |
| 28 | +}; |
| 29 | + |
| 30 | +void * const IOPMem_StdInit_UsedModules[] = { |
| 31 | + &IOPMem_InternalInitialise, |
| 32 | + &IOPMem_InternalFinalise, |
| 33 | + &Semaphore_Initialise, |
| 34 | + &Semaphore_Finalise, |
| 35 | + 0, |
| 36 | + 0, |
| 37 | +}; |
| 38 | + |
| 39 | +Status IOPMem_Initialise() { |
| 40 | + return StdInit_InitialisationSequence(&IOPMem_StdInit_Description); |
| 41 | +} |
| 42 | + |
| 43 | +void IOPMem_Finalise() { |
| 44 | + StdInit_FinalisationSequence(&IOPMem_StdInit_Description); |
| 45 | +} |
| 46 | + |
| 47 | +#else |
| 48 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", IOPMem_Initialise__Fv); |
| 49 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", IOPMem_Finalise__Fv); |
| 50 | +#endif |
| 51 | + |
| 52 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296710); |
| 53 | + |
| 54 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002967C8); |
| 55 | +/* |
| 56 | +void func_002967C8(void* arg0, int arg1) { |
| 57 | + sceSifFreeIopHeap(arg0); |
| 58 | + IOPMem_Finalise(); |
| 59 | + if (arg1 & 1) { |
| 60 | + delete(arg0); |
| 61 | + } |
| 62 | +} |
| 63 | +*/ |
| 64 | + |
| 65 | +INCLUDE_RODATA("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", D_0043EC70); /* "c:/coding/fgdk3/Code/Playstation2/IOPMem.cpp" */ |
| 66 | + |
| 67 | + |
| 68 | +// Split? (Non-PS2 specific code) |
| 69 | +void InterfaceError(char* file, int line) { |
| 70 | + DDE_FatalError("Failed to get interface in %s (line %d).", file, line); |
| 71 | +} |
| 72 | + |
| 73 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296840); |
| 74 | + |
| 75 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296878); |
| 76 | +#ifdef NON_MATCHING |
| 77 | +extern void* D_00451CB8; |
| 78 | +ClassInfo::ClassInfo() { |
| 79 | + this->unk8 = &D_00451CB8; |
| 80 | + this->unk4 = 0; |
| 81 | + this->unk10 = 0; |
| 82 | + this->unkC = 0; |
| 83 | + this->unk14 = 0; |
| 84 | + this->unk18 = 0; |
| 85 | +} |
| 86 | +#else |
| 87 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", __9ClassInfo); |
| 88 | +#endif |
| 89 | + |
| 90 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", _$_9ClassInfo); |
| 91 | + |
| 92 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296AF0); /* rct ClassInfo::AddInterface ? */ |
| 93 | + |
| 94 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296CB8); |
| 95 | + |
| 96 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296D40); /* rct3 InterfaceTag::InterfaceTag */ |
| 97 | +// "There are more than %i interfaces (%i, in fact): the ClassInfo interface arrays should become cleverer." |
| 98 | + |
| 99 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00296FB0); |
| 100 | + |
| 101 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002970C0); |
| 102 | + |
| 103 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297158); |
| 104 | + |
| 105 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002971D0); |
| 106 | + |
| 107 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002971F8); |
| 108 | + |
| 109 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297228); |
| 110 | + |
| 111 | +INCLUDE_RODATA("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", _vt$9ClassInfo); |
| 112 | + |
| 113 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297238); |
| 114 | + |
| 115 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297378); |
| 116 | + |
| 117 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002973C0); |
| 118 | + |
| 119 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297400); |
| 120 | + |
| 121 | +INCLUDE_RODATA("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", D_0043EDC0); /* "13GenericObject" */ |
| 122 | + |
| 123 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", __tf9ClassInfo); |
| 124 | + |
| 125 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002974A0); |
| 126 | + |
| 127 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002974A8); /* return a0->unk18 */ |
| 128 | + |
| 129 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002974B0); |
| 130 | + |
| 131 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002974E0); |
| 132 | + |
| 133 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_002974E8); |
| 134 | + |
| 135 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297520); |
| 136 | + |
| 137 | +INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/Playstation2/IOPMem", func_00297558); |
| 138 | + |
| 139 | + |
0 commit comments