mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
Refresh 14
This commit is contained in:
@@ -10,7 +10,7 @@ void __osDevMgrMain(void *args) {
|
||||
OSMesg dummy;
|
||||
s32 ret;
|
||||
OSMgrArgs *sp34;
|
||||
#ifndef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
UNUSED u32 sp30;
|
||||
#endif
|
||||
u32 sp2c;
|
||||
@@ -19,7 +19,7 @@ void __osDevMgrMain(void *args) {
|
||||
#ifdef VERSION_SH
|
||||
u32 tmp;
|
||||
#endif
|
||||
#ifndef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
sp30 = 0;
|
||||
#endif
|
||||
sp2c = 0;
|
||||
@@ -108,7 +108,7 @@ void __osDevMgrMain(void *args) {
|
||||
}
|
||||
if (ret == 0) {
|
||||
osRecvMesg(sp34->eventQueue, &em, OS_MESG_BLOCK);
|
||||
#ifndef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
sp30 =
|
||||
#endif
|
||||
osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "PR/rcp.h"
|
||||
#include "controller.h"
|
||||
|
||||
#ifdef VERSION_SH
|
||||
extern s32 func_8030A5C0(OSMesgQueue *, s32);
|
||||
void __osPackRamReadData(int channel, u16 address);
|
||||
|
||||
@@ -87,4 +86,3 @@ void __osPackRamReadData(int channel, u16 address) {
|
||||
ptr += sizeof(__OSContRamReadFormat);
|
||||
ptr[0] = CONT_CMD_END;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "PR/rcp.h"
|
||||
#include "controller.h"
|
||||
|
||||
#ifdef VERSION_SH
|
||||
extern s32 func_8030A5C0(OSMesgQueue *, s32);
|
||||
void __osPackRamWriteData(int channel, u16 address, u8 *buffer);
|
||||
|
||||
@@ -87,4 +86,3 @@ void __osPackRamWriteData(int channel, u16 address, u8 *buffer) {
|
||||
ptr += sizeof(__OSContRamReadFormat);
|
||||
ptr[0] = CONT_CMD_END;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _CONTROLLER_H
|
||||
#define _CONTROLLER_H
|
||||
#include "PR/os_internal.h"
|
||||
#include "os.h"
|
||||
#include "PR/os.h"
|
||||
#include "PR/rcp.h"
|
||||
|
||||
//should go somewhere else but
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "libultra_internal.h"
|
||||
|
||||
#ifdef VERSION_SH
|
||||
u8 __osContAddressCrc(u16 addr) {
|
||||
u8 temp;
|
||||
u8 temp2;
|
||||
@@ -45,4 +44,3 @@ u8 __osContDataCrc(u8 *data) {
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#ifdef VERSION_SH
|
||||
|
||||
#include "PR/os_internal.h"
|
||||
#include "piint.h"
|
||||
|
||||
@@ -21,4 +22,5 @@ s32 osEPiStartDma(OSPiHandle *pihandle, OSIoMesg *mb, s32 direction) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _HARDWARE_H_
|
||||
#define _HARDWARE_H_
|
||||
|
||||
#define HW_REG(reg, type) *(volatile type *)(uintptr_t)(reg | 0xa0000000)
|
||||
#define HW_REG(reg, type) *(volatile type *)(uintptr_t)((reg) | 0xa0000000)
|
||||
|
||||
#define AI_DRAM_ADDR_REG 0x04500000
|
||||
#define AI_LEN_REG 0x04500004
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "libultra_internal.h"
|
||||
|
||||
#if !defined(VERSION_SH) && !defined(VERSION_EU)
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
u8 D_80365E40[0x100];
|
||||
#endif
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
#include "piint.h"
|
||||
#include "osint.h"
|
||||
|
||||
u8 leoDiskStack[OS_PIM_STACKSIZE]; //technically should have a OS_LEO_STACKSIZE or something..
|
||||
u8 leoDiskStack[OS_PIM_STACKSIZE]; // technically should have a OS_LEO_STACKSIZE or something..
|
||||
|
||||
#ifdef VERSION_SH
|
||||
|
||||
// TODO: so many magic constants :'(
|
||||
static void __osLeoResume(void);
|
||||
static void __osLeoAbnormalResume(void);
|
||||
@@ -179,4 +180,5 @@ static void __osLeoResume(void) {
|
||||
__osEnqueueThread(&D_80334898, __osPopThread(&mq->mtqueue));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
-800
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
#include "libultra_internal.h"
|
||||
#include "osAi.h"
|
||||
#include "hardware.h"
|
||||
#include "macros.h"
|
||||
|
||||
extern s32 osViClock;
|
||||
|
||||
@@ -29,9 +30,9 @@ s32 osAiSetFrequency(u32 freq) {
|
||||
|
||||
#ifndef VERSION_SH
|
||||
// put some extra jr $ra's down there please
|
||||
static void filler1(void) {
|
||||
UNUSED static void filler1(void) {
|
||||
}
|
||||
|
||||
static void filler2(void) {
|
||||
UNUSED static void filler2(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include "PR/R4300.h"
|
||||
#include "PR/rcp.h"
|
||||
#include "PR/os_pi.h"
|
||||
#include "os.h"
|
||||
#include "PR/os.h"
|
||||
#include "libultra_internal.h"
|
||||
|
||||
#ifdef VERSION_SH
|
||||
OSPiHandle CartRomHandle;
|
||||
|
||||
OSPiHandle *osCartRomInit(void) {
|
||||
@@ -36,4 +36,3 @@ OSPiHandle *osCartRomInit(void) {
|
||||
|
||||
return &CartRomHandle;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@ OSMgrArgs __osPiDevMgr = { 0 };
|
||||
OSPiHandle *__osPiTable = NULL;
|
||||
#endif
|
||||
#ifdef VERSION_SH
|
||||
OSPiHandle *__osCurrentHandle[2] = { &CartRomHandle, &LeoDiskHandle };
|
||||
OSPiHandle **__osCurrentHandle[2] = { &CartRomHandle, &LeoDiskHandle };
|
||||
#endif
|
||||
OSThread piMgrThread;
|
||||
u32 piMgrStack[0x400]; // stack bottom
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
extern OSPiHandle *__osPiTable;
|
||||
extern OSPiHandle DriveRomHandle;
|
||||
|
||||
OSPiHandle *osDriveRomInit() { // Why is this compiled with -g???
|
||||
OSPiHandle *osDriveRomInit(void) { // Why is this compiled with -g???
|
||||
UNUSED s32 sp1c = 0;
|
||||
u32 saveMask;
|
||||
|
||||
@@ -32,4 +32,3 @@ OSPiHandle *osDriveRomInit() { // Why is this compiled with -g???
|
||||
|
||||
return &DriveRomHandle;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,4 +96,7 @@ s32 __osPackEepReadData(u8 address) {
|
||||
*(unkStruct2 *) sp14 = sp8;
|
||||
sp14 += 0xc;
|
||||
*sp14 = 254;
|
||||
#ifdef AVOID_UB
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -108,6 +108,9 @@ s32 __osPackEepWriteData(u8 address, u8 *buffer) {
|
||||
*(unkStruct2 *) sp14 = sp8;
|
||||
sp14 += 0xc;
|
||||
*sp14 = 254;
|
||||
#ifdef AVOID_UB
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 __osEepStatus(OSMesgQueue *a0, unkStruct *a1) {
|
||||
|
||||
@@ -9,7 +9,6 @@ extern OSPiHandle *__osPiTable;
|
||||
OSPiHandle LeoDiskHandle;
|
||||
OSPiHandle *__osDiskHandle;
|
||||
|
||||
// some kind of piHandle init function, maybe osDriveRomInit or osCartRomInit
|
||||
OSPiHandle *osLeoDiskInit(void) {
|
||||
s32 sp1c;
|
||||
LeoDiskHandle.type = 2;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "PR/os_pi.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "controller.h"
|
||||
//#include "siint.h"
|
||||
|
||||
#ifdef VERSION_SH
|
||||
OSPifRam __osPfsPifRam;
|
||||
|
||||
s32 osPfsIsPlug(OSMesgQueue *queue, u8 *pattern) {
|
||||
@@ -94,4 +93,3 @@ void __osPfsGetInitData(u8 *pattern, OSContStatus *data) {
|
||||
}
|
||||
*pattern = bits;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ void osSpTaskLoad(OSTask *task) {
|
||||
task->t.flags &= ~M_TASK_FLAG0;
|
||||
#ifdef VERSION_SH
|
||||
if (physicalTask->t.flags & M_TASK_FLAG2) {
|
||||
physicalTask->t.ucode = HW_REG((uintptr_t)task->t.yield_data_ptr + 0xBFC, u64*);
|
||||
physicalTask->t.ucode = (u64*)HW_REG((uintptr_t)task->t.yield_data_ptr + 0xBFC, u64*);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include "PR/os_internal.h"
|
||||
#include "PR/rcp.h"
|
||||
#include "PR/os_pi.h"
|
||||
#include "os.h"
|
||||
#include "PR/os.h"
|
||||
|
||||
//https://github.com/LuigiBlood/64dd/wiki/Memory-Map
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user