mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 22:04:41 -04:00
@@ -29,6 +29,15 @@ force_active: [
|
||||
"ModuleConstructorsX",
|
||||
"ModuleDestructorsX",
|
||||
]
|
||||
block_relocations:
|
||||
# OSInit
|
||||
- source: 0x803a2a9c
|
||||
- source: 0x803a2b04
|
||||
add_relocations:
|
||||
# bugged relocation pair in unreachable code
|
||||
- source: .text:0x80306FCC
|
||||
type: l
|
||||
target: lbl_804F0A00
|
||||
extract:
|
||||
- symbol: DOL_BACKUP_FONT
|
||||
header: d/dol_backup_error_font.inc
|
||||
|
||||
+1003
-51
File diff suppressed because it is too large
Load Diff
+1887
-1808
File diff suppressed because it is too large
Load Diff
+200
-28
@@ -1310,34 +1310,206 @@ config.libs = [
|
||||
"progress_category": "sdk",
|
||||
"host": False,
|
||||
"objects": [
|
||||
Object(NonMatching, "RVL_SDK/thp/THPDec.c"),
|
||||
Object(NonMatching, "RVL_SDK/thp/THPAudio.c"),
|
||||
Object(NonMatching, "RVL_SDK/kpr/KPR.c"),
|
||||
Object(NonMatching, "RVL_SDK/ai/AI.c"),
|
||||
Object(NonMatching, "RVL_SDK/arc/ARC.c"),
|
||||
Object(NonMatching, "RVL_SDK/ax/AX.c"),
|
||||
Object(NonMatching, "RVL_SDK/os/OS.c"),
|
||||
Object(NonMatching, "RVL_SDK/exi/EXI.c"),
|
||||
Object(NonMatching, "RVL_SDK/si/SI.c"),
|
||||
Object(NonMatching, "RVL_SDK/vi/VI.c"),
|
||||
Object(NonMatching, "RVL_SDK/mtx/MTX.c"),
|
||||
Object(NonMatching, "RVL_SDK/gx/GX.c"),
|
||||
Object(NonMatching, "RVL_SDK/dvd/DVD.c"),
|
||||
Object(NonMatching, "RVL_SDK/mem/MEM.c"),
|
||||
Object(NonMatching, "RVL_SDK/dsp/DSP.c"),
|
||||
Object(NonMatching, "RVL_SDK/es/ES.c"),
|
||||
Object(NonMatching, "RVL_SDK/cx/CX.c"),
|
||||
Object(NonMatching, "RVL_SDK/nand/NAND.c"),
|
||||
Object(NonMatching, "RVL_SDK/sc/SC.c"),
|
||||
Object(NonMatching, "RVL_SDK/wpad/WPAD.c"),
|
||||
Object(NonMatching, "RVL_SDK/kpad/KPAD.c"),
|
||||
Object(NonMatching, "RVL_SDK/usb/USB.c"),
|
||||
Object(NonMatching, "RVL_SDK/bte/BTE.c"),
|
||||
Object(NonMatching, "RVL_SDK/ipc/IPC.c"),
|
||||
Object(NonMatching, "RVL_SDK/fs/FS.c"),
|
||||
Object(NonMatching, "RVL_SDK/euart/EUART.c"),
|
||||
Object(NonMatching, "RVL_SDK/wenc/WENC.c"),
|
||||
Object(NonMatching, "RVL_SDK/tpl/TPL.c"),
|
||||
Object(NonMatching, "revolution/thp/THPDec.c"),
|
||||
Object(NonMatching, "revolution/thp/THPAudio.c"),
|
||||
Object(NonMatching, "revolution/kpr/kpr_lib.c"),
|
||||
Object(NonMatching, "revolution/ai/ai.c"),
|
||||
Object(NonMatching, "revolution/arc/arc.c"),
|
||||
Object(NonMatching, "revolution/ax/AX.c"),
|
||||
Object(NonMatching, "revolution/ax/AXAlloc.c"),
|
||||
Object(NonMatching, "revolution/ax/AXAux.c"),
|
||||
Object(NonMatching, "revolution/ax/AXCL.c"),
|
||||
Object(NonMatching, "revolution/ax/AXOut.c"),
|
||||
Object(NonMatching, "revolution/ax/AXSPB.c"),
|
||||
Object(NonMatching, "revolution/ax/AXVPB.c"),
|
||||
Object(NonMatching, "revolution/ax/AXComp.c"),
|
||||
Object(NonMatching, "revolution/ax/DSPCode.c"),
|
||||
Object(NonMatching, "revolution/ax/AXProf.c"),
|
||||
Object(NonMatching, "revolution/axfx/AXFXReverbHi.c"),
|
||||
Object(NonMatching, "revolution/axfx/AXFXReverbHiExp.c"),
|
||||
Object(NonMatching, "revolution/axfx/AXFXReverbStdExp.c"),
|
||||
Object(NonMatching, "revolution/axfx/AXFXReverbStdExpDpl2.c"),
|
||||
Object(NonMatching, "revolution/axfx/AXFXHooks.c"),
|
||||
Object(NonMatching, "revolution/base/PPCArch.c"),
|
||||
Object(NonMatching, "revolution/os/OS.c"),
|
||||
Object(NonMatching, "revolution/os/OSAlarm.c"),
|
||||
Object(NonMatching, "revolution/os/OSAlloc.c"),
|
||||
Object(NonMatching, "revolution/os/OSArena.c"),
|
||||
Object(NonMatching, "revolution/os/OSAudioSystem.c"),
|
||||
Object(NonMatching, "revolution/os/OSCache.c"),
|
||||
Object(NonMatching, "revolution/os/OSContext.c"),
|
||||
Object(NonMatching, "revolution/os/OSError.c"),
|
||||
Object(NonMatching, "revolution/os/OSExec.c"),
|
||||
Object(NonMatching, "revolution/os/OSFatal.c"),
|
||||
Object(NonMatching, "revolution/os/OSFont.c"),
|
||||
Object(NonMatching, "revolution/os/OSInterrupt.c"),
|
||||
Object(NonMatching, "revolution/os/OSLink.c"),
|
||||
Object(NonMatching, "revolution/os/OSMessage.c"),
|
||||
Object(NonMatching, "revolution/os/OSMemory.c"),
|
||||
Object(NonMatching, "revolution/os/OSMutex.c"),
|
||||
Object(NonMatching, "revolution/os/OSReboot.c"),
|
||||
Object(NonMatching, "revolution/os/OSReset.c"),
|
||||
Object(NonMatching, "revolution/os/OSRtc.c"),
|
||||
Object(NonMatching, "revolution/os/OSSync.c"),
|
||||
Object(NonMatching, "revolution/os/OSThread.c"),
|
||||
Object(NonMatching, "revolution/os/OSTime.c"),
|
||||
Object(NonMatching, "revolution/os/OSUtf.c"),
|
||||
Object(NonMatching, "revolution/os/OSIpc.c"),
|
||||
Object(NonMatching, "revolution/os/OSStateTM.c"),
|
||||
Object(NonMatching, "revolution/os/__start.c"),
|
||||
Object(NonMatching, "revolution/os/OSPlayRecord.c"),
|
||||
Object(NonMatching, "revolution/os/OSStateFlags.c"),
|
||||
Object(NonMatching, "revolution/os/OSNet.c"),
|
||||
Object(NonMatching, "revolution/os/OSNandbootInfo.c"),
|
||||
Object(NonMatching, "revolution/os/OSPlayTime.c"),
|
||||
Object(NonMatching, "revolution/os/OSCrc.c"),
|
||||
Object(NonMatching, "revolution/os/OSLaunch.c"),
|
||||
Object(NonMatching, "revolution/os/__ppc_eabi_init.c"),
|
||||
Object(NonMatching, "revolution/exi/EXIBios.c"),
|
||||
Object(NonMatching, "revolution/exi/EXIUart.c"),
|
||||
Object(NonMatching, "revolution/exi/EXICommon.c"),
|
||||
Object(NonMatching, "revolution/si/SIBios.c"),
|
||||
Object(NonMatching, "revolution/si/SISamplingRate.c"),
|
||||
Object(NonMatching, "revolution/vi/vi.c"),
|
||||
Object(NonMatching, "revolution/vi/i2c.c"),
|
||||
Object(NonMatching, "revolution/vi/vi3in1.c"),
|
||||
Object(NonMatching, "revolution/mtx/mtx.c"),
|
||||
Object(NonMatching, "revolution/mtx/mtxvec.c"),
|
||||
Object(NonMatching, "revolution/mtx/mtx44.c"),
|
||||
Object(NonMatching, "revolution/mtx/vec.c"),
|
||||
Object(NonMatching, "revolution/mtx/quat.c"),
|
||||
Object(NonMatching, "revolution/gx/GXInit.c"),
|
||||
Object(NonMatching, "revolution/gx/GXFifo.c"),
|
||||
Object(NonMatching, "revolution/gx/GXAttr.c"),
|
||||
Object(NonMatching, "revolution/gx/GXMisc.c"),
|
||||
Object(NonMatching, "revolution/gx/GXGeometry.c"),
|
||||
Object(NonMatching, "revolution/gx/GXFrameBuf.c"),
|
||||
Object(NonMatching, "revolution/gx/GXLight.c"),
|
||||
Object(NonMatching, "revolution/gx/GXTexture.c"),
|
||||
Object(NonMatching, "revolution/gx/GXBump.c"),
|
||||
Object(NonMatching, "revolution/gx/GXTev.c"),
|
||||
Object(NonMatching, "revolution/gx/GXPixel.c"),
|
||||
Object(NonMatching, "revolution/gx/GXDraw.c"),
|
||||
Object(NonMatching, "revolution/gx/GXDisplayList.c"),
|
||||
Object(NonMatching, "revolution/gx/GXTransform.c"),
|
||||
Object(NonMatching, "revolution/gx/GXPerf.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvdfs.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvd.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvdqueue.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvderror.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvdidutils.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvdFatal.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvdDeviceError.c"),
|
||||
Object(NonMatching, "revolution/dvd/dvd_broadway.c"),
|
||||
Object(NonMatching, "revolution/mem/mem_heapCommon.c"),
|
||||
Object(NonMatching, "revolution/mem/mem_expHeap.c"),
|
||||
Object(NonMatching, "revolution/mem/mem_frameHeap.c"),
|
||||
Object(NonMatching, "revolution/mem/mem_allocator.c"),
|
||||
Object(NonMatching, "revolution/mem/mem_list.c"),
|
||||
Object(NonMatching, "revolution/dsp/dsp.c"),
|
||||
Object(NonMatching, "revolution/dsp/dsp_debug.c"),
|
||||
Object(NonMatching, "revolution/dsp/dsp_task.c"),
|
||||
Object(NonMatching, "revolution/esp/esp.c"),
|
||||
Object(NonMatching, "revolution/cx/CXStreamingUncompression.c"),
|
||||
Object(NonMatching, "revolution/cx/CXUncompression.c"),
|
||||
Object(NonMatching, "revolution/cx/CXSecureUncompression.c"),
|
||||
Object(NonMatching, "revolution/nand/nand.c"),
|
||||
Object(NonMatching, "revolution/nand/NANDOpenClose.c"),
|
||||
Object(NonMatching, "revolution/nand/NANDCore.c"),
|
||||
Object(NonMatching, "revolution/nand/NANDCheck.c"),
|
||||
Object(NonMatching, "revolution/nand/NANDLogging.c"),
|
||||
Object(NonMatching, "revolution/nand/NANDErrorMessage.c"),
|
||||
Object(NonMatching, "revolution/sc/scsystem.c"),
|
||||
Object(NonMatching, "revolution/sc/scapi.c"),
|
||||
Object(NonMatching, "revolution/sc/scapi_prdinfo.c"),
|
||||
Object(NonMatching, "revolution/pad/Pad.c"),
|
||||
Object(NonMatching, "revolution/wpad/WPAD.c"),
|
||||
Object(NonMatching, "revolution/wpad/WPADHIDParser.c"),
|
||||
Object(NonMatching, "revolution/wpad/WPADEncrypt.c"),
|
||||
Object(NonMatching, "revolution/wpad/WPADMem.c"),
|
||||
Object(NonMatching, "revolution/wpad/lint.c"),
|
||||
Object(NonMatching, "revolution/wpad/WUD.c"),
|
||||
Object(NonMatching, "revolution/wpad/WUDHIDHost.c"),
|
||||
Object(NonMatching, "revolution/kpad/KPAD.c"),
|
||||
Object(NonMatching, "revolution/kpad/KMPLS.c"),
|
||||
Object(NonMatching, "revolution/kpad/KZMplsTestSub.c"),
|
||||
Object(NonMatching, "revolution/usb/usb.c"),
|
||||
Object(NonMatching, "revolution/bte/gki_buffer.c"),
|
||||
Object(NonMatching, "revolution/bte/gki_time.c"),
|
||||
Object(NonMatching, "revolution/bte/gki_ppc.c"),
|
||||
Object(NonMatching, "revolution/bte/hcisu_h2.c"),
|
||||
Object(NonMatching, "revolution/bte/uusb_ppc.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_dm_cfg.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_hh_cfg.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_sys_cfg.c"),
|
||||
Object(NonMatching, "revolution/bte/bte_hcisu.c"),
|
||||
Object(NonMatching, "revolution/bte/bte_init.c"),
|
||||
Object(NonMatching, "revolution/bte/bte_logmsg.c"),
|
||||
Object(NonMatching, "revolution/bte/bte_main.c"),
|
||||
Object(NonMatching, "revolution/bte/btu_task1.c"),
|
||||
Object(NonMatching, "revolution/bte/bd.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_sys_conn.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_sys_main.c"),
|
||||
Object(NonMatching, "revolution/bte/ptim.c"),
|
||||
Object(NonMatching, "revolution/bte/utl.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_dm_act.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_dm_api.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_dm_main.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_dm_pm.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_hh_act.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_hh_api.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_hh_main.c"),
|
||||
Object(NonMatching, "revolution/bte/bta_hh_utils.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_acl.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_dev.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_devctl.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_discovery.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_inq.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_main.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_pm.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_sco.c"),
|
||||
Object(NonMatching, "revolution/bte/btm_sec.c"),
|
||||
Object(NonMatching, "revolution/bte/btu_hcif.c"),
|
||||
Object(NonMatching, "revolution/bte/btu_init.c"),
|
||||
Object(NonMatching, "revolution/bte/wbt_ext.c"),
|
||||
Object(NonMatching, "revolution/bte/gap_api.c"),
|
||||
Object(NonMatching, "revolution/bte/gap_conn.c"),
|
||||
Object(NonMatching, "revolution/bte/gap_utils.c"),
|
||||
Object(NonMatching, "revolution/bte/hcicmds.c"),
|
||||
Object(NonMatching, "revolution/bte/hidd_api.c"),
|
||||
Object(NonMatching, "revolution/bte/hidd_conn.c"),
|
||||
Object(NonMatching, "revolution/bte/hidd_mgmt.c"),
|
||||
Object(NonMatching, "revolution/bte/hidd_pm.c"),
|
||||
Object(NonMatching, "revolution/bte/hidh_api.c"),
|
||||
Object(NonMatching, "revolution/bte/hidh_conn.c"),
|
||||
Object(NonMatching, "revolution/bte/l2c_api.c"),
|
||||
Object(NonMatching, "revolution/bte/l2c_csm.c"),
|
||||
Object(NonMatching, "revolution/bte/l2c_link.c"),
|
||||
Object(NonMatching, "revolution/bte/l2c_main.c"),
|
||||
Object(NonMatching, "revolution/bte/l2c_utils.c"),
|
||||
Object(NonMatching, "revolution/bte/port_api.c"),
|
||||
Object(NonMatching, "revolution/bte/port_rfc.c"),
|
||||
Object(NonMatching, "revolution/bte/port_utils.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_l2cap_if.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_mx_fsm.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_port_fsm.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_port_if.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_ts_frames.c"),
|
||||
Object(NonMatching, "revolution/bte/rfc_utils.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_api.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_db.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_discovery.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_main.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_server.c"),
|
||||
Object(NonMatching, "revolution/bte/sdp_utils.c"),
|
||||
Object(NonMatching, "revolution/ipc/ipcMain.c"),
|
||||
Object(NonMatching, "revolution/ipc/ipcclt.c"),
|
||||
Object(NonMatching, "revolution/ipc/memory.c"),
|
||||
Object(NonMatching, "revolution/ipc/ipcProfile.c"),
|
||||
Object(NonMatching, "revolution/fs/fs.c"),
|
||||
Object(NonMatching, "revolution/euart/euart.c"),
|
||||
Object(NonMatching, "revolution/wenc/wenc.c"),
|
||||
Object(NonMatching, "revolution/tpl/TPL.c"),
|
||||
Object(NonMatching, "NdevExi2A/DebuggerDriver.c"),
|
||||
Object(NonMatching, "NdevExi2A/exi2.c"),
|
||||
],
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
ExpHeap(MEMiHeapHead *heapHead);
|
||||
static ExpHeap *create(void *block, size_t size, u16 attr);
|
||||
static ExpHeap *create(size_t size, Heap *heap, u16 attr);
|
||||
void setGroupID(u16 groupId);
|
||||
void setAllocMode(u16 allocMode);
|
||||
static u32 getSizeForMBlock(const void *block);
|
||||
|
||||
// Placement new for ::create
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
#include "rvl/GX.h" // IWYU pragma: export
|
||||
#include "rvl/VI.h" // IWYU pragma: export
|
||||
|
||||
|
||||
extern "C" GXRenderModeObj lbl_8055FC64;
|
||||
|
||||
namespace EGG {
|
||||
|
||||
class Video {
|
||||
@@ -32,7 +29,7 @@ public:
|
||||
|
||||
const GXRenderModeObj *getCurrentOrFallbackRenderModeObj() const {
|
||||
if (pRenderMode == nullptr) {
|
||||
return &lbl_8055FC64;
|
||||
return &GXNtsc480Int;
|
||||
}
|
||||
return pRenderMode;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ void GXCopyTex(void *data, GXBool bUpdate);
|
||||
void GXPixModeSync();
|
||||
|
||||
extern GXRenderModeObj GXNtsc480IntDf;
|
||||
extern GXRenderModeObj GXNtsc480Int;
|
||||
extern GXRenderModeObj GXMpal480IntDf;
|
||||
extern GXRenderModeObj GXPal528IntDf;
|
||||
extern GXRenderModeObj GXEurgb60Hz480IntDf;
|
||||
|
||||
@@ -52,7 +52,7 @@ void GXSetTexCoordBias(GXTexCoordID, GXBool, GXBool);
|
||||
|
||||
u16 GXGetTexObjWidth(const GXTexObj *obj);
|
||||
u16 GXGetTexObjHeight(const GXTexObj *obj);
|
||||
GXTexFmt GXGetTexObjFormat(const GXTexObj *obj);
|
||||
GXTexFmt GXGetTexObjFmt(const GXTexObj *obj);
|
||||
GXBool GXGetTexObjMipMap(const GXTexObj *obj);
|
||||
GXTexWrapMode GXGetTexObjWrapS(const GXTexObj *obj);
|
||||
u32 GXGetTexObjTlut(const GXTexObj *);
|
||||
|
||||
@@ -56,10 +56,12 @@ void *MEMAllocFromExpHeapEx(struct MEMiHeapHead *heap, u32 size, s32 align);
|
||||
u32 MEMResizeForMBlockExpHeap(struct MEMiHeapHead *heap, void *memBlock, u32 size);
|
||||
void MEMFreeToExpHeap(struct MEMiHeapHead *heap, void *memBlock);
|
||||
u32 MEMGetAllocatableSizeForExpHeap(struct MEMiHeapHead *heap);
|
||||
u32 MEMGetTotalFreeSizeForExpHeap(struct MEMiHeapHead *heap);
|
||||
u32 MEMGetAllocatableSizeForExpHeapEx(struct MEMiHeapHead *heap, s32 align);
|
||||
void MEMSetGroupIdForExpHeap(MEMiHeapHead *mHeapHandle, u16 groupId);
|
||||
void MEMSetGroupIdForExpHeap(struct MEMiHeapHead *mHeapHandle, u16 groupId);
|
||||
u32 MEMAdjustExpHeap(struct MEMiHeapHead *heap);
|
||||
u32 MEMGetSizeForMBlockExpHeap(const void *block);
|
||||
void MEMSetAllocModeForExpHeap(struct MEMiHeapHead *heap, u16 allocMode);
|
||||
|
||||
static inline struct MEMiHeapHead *MEMCreateExpHeap(void *start, u32 size) {
|
||||
return MEMCreateExpHeapEx(start, size, 0);
|
||||
|
||||
@@ -37,6 +37,7 @@ typedef struct MEMiHeapHead {
|
||||
void MEMiInitHeapHead(MEMiHeapHead *heap, u32 magic, void *start, void *end, u16 opt);
|
||||
void MEMiFinalizeHeap(MEMiHeapHead *heap);
|
||||
MEMiHeapHead *MEMFindContainHeap(const void *memBlock);
|
||||
MEMiHeapHead *MEMFindParentHeap(const MEMiHeapHead *pHandle);
|
||||
|
||||
static inline int GetUIntPtr(const void *p) {
|
||||
return (int)p;
|
||||
|
||||
@@ -27,6 +27,7 @@ typedef struct OSContext {
|
||||
f64 psfs[32]; // at 0x1C8
|
||||
} OSContext;
|
||||
|
||||
void OSFillFPUContext(OSContext *ctx);
|
||||
void OSSaveFPUContext(OSContext *ctx);
|
||||
void OSSetCurrentContext(OSContext *ctx);
|
||||
OSContext *OSGetCurrentContext(void);
|
||||
|
||||
@@ -11,11 +11,22 @@ extern "C" {
|
||||
#define OS_MEM_IS_MEM1(addr) (((u32)(addr) & 0x30000000) == 0)
|
||||
#define OS_MEM_IS_MEM2(addr) (((u32)(addr) & 0x30000000) == 0x10000000)
|
||||
|
||||
#define OS_PROTECT_CHAN0 0
|
||||
#define OS_PROTECT_CHAN1 1
|
||||
#define OS_PROTECT_CHAN2 2
|
||||
#define OS_PROTECT_CHAN3 3
|
||||
|
||||
#define OS_PROTECT_CONTROL_NONE 0x00
|
||||
#define OS_PROTECT_CONTROL_READ 0x01
|
||||
#define OS_PROTECT_CONTROL_WRITE 0x02
|
||||
#define OS_PROTECT_CONTROL_RDWR (OS_PROTECT_CONTROL_READ | OS_PROTECT_CONTROL_WRITE)
|
||||
|
||||
u32 OSGetPhysicalMem1Size(void);
|
||||
u32 OSGetPhysicalMem2Size(void);
|
||||
u32 OSGetConsoleSimulatedMem1Size(void);
|
||||
u32 OSGetConsoleSimulatedMem2Size(void);
|
||||
void __OSInitMemoryProtection(void);
|
||||
void OSProtectRange(u32 chan, void* addr, u32 nBytes, u32 control);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ void dHeapAllocator::onAlloc(EGG::HeapAllocArg *arg) {
|
||||
EGG::ExpHeap *dHeap::init(const char *name, size_t size, EGG::Heap *parent) {
|
||||
heap = EGG::ExpHeap::create(size, parent, 4);
|
||||
if (heap != nullptr) {
|
||||
heap->setGroupID(0);
|
||||
heap->setAllocMode(0);
|
||||
heap->mName = name;
|
||||
}
|
||||
return heap;
|
||||
|
||||
@@ -100,15 +100,15 @@ u32 ExpHeap::resizeForMBlock(void *block, u32 size) {
|
||||
}
|
||||
|
||||
u32 ExpHeap::getTotalFreeSize() {
|
||||
return MEMGetAllocatableSizeForExpHeap(mHeapHandle);
|
||||
return MEMGetTotalFreeSizeForExpHeap(mHeapHandle);
|
||||
}
|
||||
|
||||
u32 ExpHeap::getAllocatableSize(s32 align) {
|
||||
return MEMGetAllocatableSizeForExpHeapEx(mHeapHandle, align);
|
||||
}
|
||||
|
||||
void ExpHeap::setGroupID(u16 groupId) {
|
||||
MEMSetGroupIdForExpHeap(mHeapHandle, groupId);
|
||||
void ExpHeap::setAllocMode(u16 allocMode) {
|
||||
MEMSetAllocModeForExpHeap(mHeapHandle, allocMode);
|
||||
}
|
||||
|
||||
u32 ExpHeap::adjust() {
|
||||
|
||||
@@ -106,7 +106,7 @@ Heap *Heap::findHeap(MEMiHeapHead *head) {
|
||||
/* 80495730 */
|
||||
Heap *Heap::findParentHeap() {
|
||||
Heap *retHeap = nullptr;
|
||||
MEMiHeapHead *heap = MEMFindContainHeap(mHeapHandle);
|
||||
MEMiHeapHead *heap = MEMFindParentHeap(mHeapHandle);
|
||||
if (heap) {
|
||||
retHeap = findHeap(heap);
|
||||
}
|
||||
@@ -114,12 +114,10 @@ Heap *Heap::findParentHeap() {
|
||||
return retHeap;
|
||||
}
|
||||
|
||||
extern "C" MEMiHeapHead *findSomethingInListObject(const void *memBlock);
|
||||
|
||||
/* 80495780 */
|
||||
Heap *Heap::findContainHeap(const void *memBlock) {
|
||||
Heap *retHeap = nullptr;
|
||||
MEMiHeapHead *heap = findSomethingInListObject(memBlock);
|
||||
MEMiHeapHead *heap = MEMFindContainHeap(memBlock);
|
||||
if (heap) {
|
||||
retHeap = findHeap(heap);
|
||||
}
|
||||
@@ -130,7 +128,7 @@ Heap *Heap::findContainHeap(const void *memBlock) {
|
||||
/* 804957c0 */
|
||||
void Heap::free(void *ptr, Heap *heap) {
|
||||
if (heap == nullptr) {
|
||||
MEMiHeapHead *iheap = findSomethingInListObject(ptr);
|
||||
MEMiHeapHead *iheap = MEMFindContainHeap(ptr);
|
||||
if (iheap == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ CpuTexture::CpuTexture(const GXTexObj *pObj) {
|
||||
mWidth = GXGetTexObjWidth(pObj);
|
||||
mHeight = GXGetTexObjHeight(pObj);
|
||||
|
||||
mTexFormat = GXGetTexObjFormat(pObj);
|
||||
mTexFormat = GXGetTexObjFmt(pObj);
|
||||
mWrapS = GXGetTexObjWrapS(pObj);
|
||||
mWrapT = GXGetTexObjWrapT(pObj);
|
||||
mMinFilt = GXGetTexObjMinFilt(pObj);
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ mHeap::~mHeap() {
|
||||
EGG::ExpHeap *mHeap::createHeap(size_t size, EGG::Heap *block, const char *name) {
|
||||
EGG::ExpHeap *heap = EGG::ExpHeap::create(size, block, 4);
|
||||
if (heap != nullptr) {
|
||||
heap->setGroupID(0);
|
||||
heap->setAllocMode(0);
|
||||
if (name != nullptr) {
|
||||
heap->mName = name;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ static struct ExceptionStruct sException;
|
||||
|
||||
static u8 sThreadBuffer[0x4000] ALIGN_DECL(0x20);
|
||||
|
||||
extern "C" u32 lbl_80574960;
|
||||
|
||||
const char *CPU_EXP_NAME[] = {
|
||||
"SYSTEM RESET",
|
||||
"MACHINE CHECK",
|
||||
@@ -69,13 +67,11 @@ void Exception_Init() {
|
||||
OSSetErrorHandler(3, ErrorHandler_);
|
||||
OSSetErrorHandler(5, ErrorHandler_);
|
||||
OSSetErrorHandler(15, ErrorHandler_);
|
||||
lbl_80574960 = 0;
|
||||
__OSFpscrEnableBits = 0;
|
||||
OSSetErrorHandler(16, nullptr);
|
||||
}
|
||||
extern "C" u32 PPCMfmsr();
|
||||
extern "C" void PPCMtmsr(u32);
|
||||
extern "C" void OSFillFPUContext(OSContext *ctx);
|
||||
extern "C" void fn_803AA2E0(u32, u32, u32, u32);
|
||||
|
||||
static void DumpException_(const ExceptionCallbackParam *);
|
||||
|
||||
@@ -85,10 +81,10 @@ void ErrorHandler_(u16 error, OSContext *ctx, u32 dsisr, u32 dar) {
|
||||
OSFillFPUContext(ctx);
|
||||
OSSetErrorHandler(error, nullptr);
|
||||
if (error == 0xf) {
|
||||
fn_803AA2E0(0, 0, 0, 3);
|
||||
fn_803AA2E0(1, 0, 0, 3);
|
||||
fn_803AA2E0(2, 0, 0, 3);
|
||||
fn_803AA2E0(3, 0, 0, 3);
|
||||
OSProtectRange(OS_PROTECT_CHAN0, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN1, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN2, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN3, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
}
|
||||
ExceptionCallbackParam param;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ void SetTMemLayout(TMemLayout layout) {
|
||||
} // namespace nw4r
|
||||
|
||||
static GXTexRegion *TexRegionCallback(const GXTexObj *pObj, GXTexMapID map) {
|
||||
GXTexFmt fmt = GXGetTexObjFormat(pObj);
|
||||
GXTexFmt fmt = GXGetTexObjFmt(pObj);
|
||||
GXBool mipmap = GXGetTexObjMipMap(pObj);
|
||||
|
||||
switch (fmt) {
|
||||
|
||||
Reference in New Issue
Block a user