mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Match dvdlow Read and extract repeating code to __setAlarm
This commit is contained in:
+4
-4
@@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes)
|
|||||||
.init | 97.972973% | 9280 | 9472
|
.init | 97.972973% | 9280 | 9472
|
||||||
.extab | 100.000000% | 96 | 96
|
.extab | 100.000000% | 96 | 96
|
||||||
.extabindex | 100.000000% | 96 | 96
|
.extabindex | 100.000000% | 96 | 96
|
||||||
.text | 24.076780% | 865932 | 3596544
|
.text | 24.084343% | 866204 | 3596544
|
||||||
.ctors | 100.000000% | 448 | 448
|
.ctors | 100.000000% | 448 | 448
|
||||||
.dtors | 100.000000% | 32 | 32
|
.dtors | 100.000000% | 32 | 32
|
||||||
.rodata | 100.000000% | 193856 | 193856
|
.rodata | 100.000000% | 193856 | 193856
|
||||||
.data | 100.000000% | 197632 | 197632
|
.data | 100.000000% | 197632 | 197632
|
||||||
.sdata | 100.000000% | 1408 | 1408
|
.sdata | 100.000000% | 1408 | 1408
|
||||||
.sdata2 | 100.000000% | 20832 | 20832
|
.sdata2 | 100.000000% | 20832 | 20832
|
||||||
Total | 32.080906% | 1289868 | 4020672
|
Total | 32.087671% | 1290140 | 4020672
|
||||||
|
|
||||||
## Total
|
## Total
|
||||||
|
|
||||||
Section | Percentage | Decompiled (bytes) | Total (bytes)
|
Section | Percentage | Decompiled (bytes) | Total (bytes)
|
||||||
---|---|---|---
|
---|---|---|---
|
||||||
main.dol | 32.080906% | 1289868 | 4020672
|
main.dol | 32.087671% | 1290140 | 4020672
|
||||||
RELs | 33.048286% | 3800660 | 11500324
|
RELs | 33.048286% | 3800660 | 11500324
|
||||||
Total | 32.797689% | 5090528 | 15520996
|
Total | 32.799441% | 5090800 | 15520996
|
||||||
|
|
||||||
## RELs
|
## RELs
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ lbl_80347A88:
|
|||||||
/* 80347AC4 3B E6 C8 30 */ addi r31, r6, CommandList@l /* 0x8044C830@l */
|
/* 80347AC4 3B E6 C8 30 */ addi r31, r6, CommandList@l /* 0x8044C830@l */
|
||||||
/* 80347AC8 90 0D 91 D0 */ stw r0, LastCommandWasRead(r13)
|
/* 80347AC8 90 0D 91 D0 */ stw r0, LastCommandWasRead(r13)
|
||||||
/* 80347ACC 4B FF AC 51 */ bl __OSGetSystemTime
|
/* 80347ACC 4B FF AC 51 */ bl __OSGetSystemTime
|
||||||
/* 80347AD0 90 8D 91 CC */ stw r4, data_8045174C(r13)
|
/* 80347AD0 90 8D 91 CC */ stw r4, LastReadIssued+0x4(r13)
|
||||||
/* 80347AD4 3C 80 CC 00 */ lis r4, 0xCC00 /* 0xCC006000@ha */
|
/* 80347AD4 3C 80 CC 00 */ lis r4, 0xCC00 /* 0xCC006000@ha */
|
||||||
/* 80347AD8 3C 00 00 A0 */ lis r0, 0xa0
|
/* 80347AD8 3C 00 00 A0 */ lis r0, 0xa0
|
||||||
/* 80347ADC 90 6D 91 C8 */ stw r3, LastReadIssued(r13)
|
/* 80347ADC 90 6D 91 C8 */ stw r3, LastReadIssued(r13)
|
||||||
|
|||||||
@@ -38,23 +38,6 @@ extern "C" {
|
|||||||
#define OS_BASE_CACHED (OS_CACHED_REGION_PREFIX << 16)
|
#define OS_BASE_CACHED (OS_CACHED_REGION_PREFIX << 16)
|
||||||
#define OS_BASE_UNCACHED (OS_UNCACHED_REGION_PREFIX << 16)
|
#define OS_BASE_UNCACHED (OS_UNCACHED_REGION_PREFIX << 16)
|
||||||
|
|
||||||
extern u32 __OSBusClock : 0x800000F8;
|
|
||||||
|
|
||||||
#define OS_BUS_CLOCK (__OSBusClock)
|
|
||||||
#define OS_CORE_CLOCK (*(u32*)0x800000FC)
|
|
||||||
#define OS_TIMER_CLOCK (OS_BUS_CLOCK / 4)
|
|
||||||
#define OS_TIMER_CLOCK_MS (OS_TIMER_CLOCK / 1000)
|
|
||||||
|
|
||||||
#define OSTicksToCycles(ticks) (((ticks) * ((OS_CORE_CLOCK * 2) / OS_TIMER_CLOCK)) / 2)
|
|
||||||
#define OSTicksToSeconds(ticks) ((ticks) / OS_TIMER_CLOCK)
|
|
||||||
#define OSTicksToMilliseconds(ticks) ((ticks) / (OS_TIMER_CLOCK / 1000))
|
|
||||||
#define OSTicksToMicroseconds(ticks) (((ticks)*8) / (OS_TIMER_CLOCK / 125000))
|
|
||||||
#define OSTicksToNanoseconds(ticks) (((ticks)*8000) / (OS_TIMER_CLOCK / 125000))
|
|
||||||
#define OSSecondsToTicks(sec) ((sec)*OS_TIMER_CLOCK)
|
|
||||||
#define OSMillisecondsToTicks(msec) ((msec) * (OS_TIMER_CLOCK / 1000))
|
|
||||||
#define OSMicrosecondsToTicks(usec) (((usec) * (OS_TIMER_CLOCK / 125000)) / 8)
|
|
||||||
#define OSNanosecondsToTicks(nsec) (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)
|
|
||||||
|
|
||||||
#define OS_MESSAGE_NON_BLOCKING 0
|
#define OS_MESSAGE_NON_BLOCKING 0
|
||||||
#define OS_MESSAGE_BLOCKING 1
|
#define OS_MESSAGE_BLOCKING 1
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,23 @@ OSTime __OSTimeToSystemTime(OSTime time);
|
|||||||
void GetDates(s32 days, OSCalendarTime* ct);
|
void GetDates(s32 days, OSCalendarTime* ct);
|
||||||
void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* ct);
|
void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* ct);
|
||||||
|
|
||||||
|
extern u32 __OSBusClock : 0x800000F8;
|
||||||
|
|
||||||
|
#define OS_BUS_CLOCK (__OSBusClock)
|
||||||
|
#define OS_CORE_CLOCK (*(u32*)0x800000FC)
|
||||||
|
#define OS_TIMER_CLOCK (OS_BUS_CLOCK / 4)
|
||||||
|
#define OS_TIMER_CLOCK_MS (OS_TIMER_CLOCK / 1000)
|
||||||
|
|
||||||
|
#define OSTicksToCycles(ticks) (((ticks) * ((OS_CORE_CLOCK * 2) / OS_TIMER_CLOCK)) / 2)
|
||||||
|
#define OSTicksToSeconds(ticks) ((ticks) / OS_TIMER_CLOCK)
|
||||||
|
#define OSTicksToMilliseconds(ticks) ((ticks) / (OS_TIMER_CLOCK / 1000))
|
||||||
|
#define OSTicksToMicroseconds(ticks) (((ticks)*8) / (OS_TIMER_CLOCK / 125000))
|
||||||
|
#define OSTicksToNanoseconds(ticks) (((ticks)*8000) / (OS_TIMER_CLOCK / 125000))
|
||||||
|
#define OSSecondsToTicks(sec) ((sec)*OS_TIMER_CLOCK)
|
||||||
|
#define OSMillisecondsToTicks(msec) ((msec) * (OS_TIMER_CLOCK / 1000))
|
||||||
|
#define OSMicrosecondsToTicks(usec) (((usec) * (OS_TIMER_CLOCK / 125000)) / 8)
|
||||||
|
#define OSNanosecondsToTicks(nsec) (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+36
-60
@@ -7,6 +7,7 @@
|
|||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
#include "dolphin/os/OSAlarm.h"
|
#include "dolphin/os/OSAlarm.h"
|
||||||
|
#include "dolphin/os/OSTime.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Forward References:
|
// Forward References:
|
||||||
@@ -16,7 +17,7 @@ void __DVDInitWA();
|
|||||||
void __DVDInterruptHandler();
|
void __DVDInterruptHandler();
|
||||||
static void AlarmHandler();
|
static void AlarmHandler();
|
||||||
static void AlarmHandlerForTimeout();
|
static void AlarmHandlerForTimeout();
|
||||||
static void Read();
|
static void Read(u32 arg0, u32 arg1, u32 arg2, DVDLowCallback cb);
|
||||||
static void SeekTwiceBeforeRead();
|
static void SeekTwiceBeforeRead();
|
||||||
void DVDLowRead();
|
void DVDLowRead();
|
||||||
BOOL DVDLowSeek(u32 arg0, DVDLowCallback cb);
|
BOOL DVDLowSeek(u32 arg0, DVDLowCallback cb);
|
||||||
@@ -62,20 +63,6 @@ typedef struct DVDCommand {
|
|||||||
DVDLowCallback callback;
|
DVDLowCallback callback;
|
||||||
} DVDCommand;
|
} DVDCommand;
|
||||||
|
|
||||||
typedef struct BI2Debug {
|
|
||||||
/* 0x00 */ s32 debugMonSize;
|
|
||||||
/* 0x04 */ s32 simMemSize;
|
|
||||||
/* 0x08 */ u32 argOffset;
|
|
||||||
/* 0x0C */ u32 debugFlag;
|
|
||||||
/* 0x10 */ int trackLocation;
|
|
||||||
/* 0x14 */ int trackSize;
|
|
||||||
/* 0x18 */ u32 countryCode;
|
|
||||||
/* 0x1C */ u8 unk[8];
|
|
||||||
/* 0x24 */ u32 padSpec;
|
|
||||||
} BI2Debug;
|
|
||||||
|
|
||||||
#define OS_BI2_DEBUG_ADDRESS 0x800000F4
|
|
||||||
|
|
||||||
/* ############################################################################################## */
|
/* ############################################################################################## */
|
||||||
/* 8044C830-8044C870 079550 003C+04 6/6 0/0 0/0 .bss CommandList */
|
/* 8044C830-8044C870 079550 003C+04 6/6 0/0 0/0 .bss CommandList */
|
||||||
static u8 CommandList[60 + 4 /* padding */];
|
static u8 CommandList[60 + 4 /* padding */];
|
||||||
@@ -84,7 +71,7 @@ static u8 CommandList[60 + 4 /* padding */];
|
|||||||
static volatile BOOL StopAtNextInt;
|
static volatile BOOL StopAtNextInt;
|
||||||
|
|
||||||
/* 80451714-80451718 000C14 0004+00 1/1 0/0 0/0 .sbss LastLength */
|
/* 80451714-80451718 000C14 0004+00 1/1 0/0 0/0 .sbss LastLength */
|
||||||
static u8 LastLength[4];
|
static u32 LastLength;
|
||||||
|
|
||||||
/* 80451718-8045171C 000C18 0004+00 13/13 0/0 0/0 .sbss Callback */
|
/* 80451718-8045171C 000C18 0004+00 13/13 0/0 0/0 .sbss Callback */
|
||||||
static DVDLowCallback Callback;
|
static DVDLowCallback Callback;
|
||||||
@@ -120,13 +107,10 @@ static BOOL LastReadFinished;
|
|||||||
static u8 data_80451744[4];
|
static u8 data_80451744[4];
|
||||||
|
|
||||||
/* 80451748-8045174C 000C48 0004+00 1/1 0/0 0/0 .sbss LastReadIssued */
|
/* 80451748-8045174C 000C48 0004+00 1/1 0/0 0/0 .sbss LastReadIssued */
|
||||||
static u8 LastReadIssued[4];
|
static OSTime LastReadIssued;
|
||||||
|
|
||||||
/* 8045174C-80451750 000C4C 0004+00 1/1 0/0 0/0 .sbss None */
|
|
||||||
static u8 data_8045174C[4];
|
|
||||||
|
|
||||||
/* 80451750-80451754 000C50 0004+00 2/2 0/0 0/0 .sbss LastCommandWasRead */
|
/* 80451750-80451754 000C50 0004+00 2/2 0/0 0/0 .sbss LastCommandWasRead */
|
||||||
static u8 LastCommandWasRead[4];
|
static volatile BOOL LastCommandWasRead;
|
||||||
|
|
||||||
/* 80451754-80451758 000C54 0004+00 5/5 0/0 0/0 .sbss NextCommandNumber */
|
/* 80451754-80451758 000C54 0004+00 5/5 0/0 0/0 .sbss NextCommandNumber */
|
||||||
static u32 NextCommandNumber;
|
static u32 NextCommandNumber;
|
||||||
@@ -222,15 +206,31 @@ static void AlarmHandlerForTimeout(OSAlarm* alarm, OSContext* context) {
|
|||||||
OSSetCurrentContext(context);
|
OSSetCurrentContext(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __setAlarm(u32 seconds) {
|
||||||
|
u32 temp = OSSecondsToTicks(seconds);
|
||||||
|
OSCreateAlarm(&AlarmForTimeout);
|
||||||
|
OSSetAlarm(&AlarmForTimeout, (OSTime) temp, AlarmHandlerForTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
/* 80347A88-80347B98 3423C8 0110+00 3/3 0/0 0/0 .text Read */
|
/* 80347A88-80347B98 3423C8 0110+00 3/3 0/0 0/0 .text Read */
|
||||||
#pragma push
|
void Read(u32 arg0, u32 arg1, u32 arg2, DVDLowCallback cb) {
|
||||||
#pragma optimization_level 0
|
StopAtNextInt = FALSE;
|
||||||
#pragma optimizewithasm off
|
Callback = cb;
|
||||||
static asm void Read() {
|
LastCommandWasRead = TRUE;
|
||||||
nofralloc
|
LastReadIssued = __OSGetSystemTime();
|
||||||
#include "asm/dolphin/dvd/dvdlow/Read.s"
|
__DIRegs[2] = 0xA8000000;
|
||||||
|
__DIRegs[3] = arg2 >> 2;
|
||||||
|
__DIRegs[4] = arg1;
|
||||||
|
__DIRegs[5] = arg0;
|
||||||
|
__DIRegs[6] = arg1;
|
||||||
|
LastLength = arg1;
|
||||||
|
__DIRegs[7] = 3;
|
||||||
|
if (arg1 > 0xa00000) {
|
||||||
|
__setAlarm(20);
|
||||||
|
} else {
|
||||||
|
__setAlarm(10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 80347B98-80347C18 3424D8 0080+00 1/1 0/0 0/0 .text SeekTwiceBeforeRead */
|
/* 80347B98-80347C18 3424D8 0080+00 1/1 0/0 0/0 .text SeekTwiceBeforeRead */
|
||||||
#pragma push
|
#pragma push
|
||||||
@@ -254,15 +254,12 @@ asm void DVDLowRead() {
|
|||||||
|
|
||||||
/* 80347EB0-80347F44 3427F0 0094+00 3/3 2/2 0/0 .text DVDLowSeek */
|
/* 80347EB0-80347F44 3427F0 0094+00 3/3 2/2 0/0 .text DVDLowSeek */
|
||||||
BOOL DVDLowSeek(u32 arg0, DVDLowCallback cb) {
|
BOOL DVDLowSeek(u32 arg0, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = 0xAB000000;
|
__DIRegs[2] = 0xAB000000;
|
||||||
__DIRegs[3] = arg0 >> 2;
|
__DIRegs[3] = arg0 >> 2;
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +274,6 @@ BOOL DVDLowWaitCoverClose(DVDLowCallback cb) {
|
|||||||
|
|
||||||
/* 80347F70-80348014 3428B0 00A4+00 0/0 2/2 0/0 .text DVDLowReadDiskID */
|
/* 80347F70-80348014 3428B0 00A4+00 0/0 2/2 0/0 .text DVDLowReadDiskID */
|
||||||
BOOL DVDLowReadDiskID(u32 arg0, DVDLowCallback cb) {
|
BOOL DVDLowReadDiskID(u32 arg0, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = 0xA8000040;
|
__DIRegs[2] = 0xA8000040;
|
||||||
@@ -286,41 +282,32 @@ BOOL DVDLowReadDiskID(u32 arg0, DVDLowCallback cb) {
|
|||||||
__DIRegs[5] = arg0;
|
__DIRegs[5] = arg0;
|
||||||
__DIRegs[6] = 0x20;
|
__DIRegs[6] = 0x20;
|
||||||
__DIRegs[7] = 3;
|
__DIRegs[7] = 3;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 80348014-803480A0 342954 008C+00 0/0 9/9 0/0 .text DVDLowStopMotor */
|
/* 80348014-803480A0 342954 008C+00 0/0 9/9 0/0 .text DVDLowStopMotor */
|
||||||
BOOL DVDLowStopMotor(DVDLowCallback cb) {
|
BOOL DVDLowStopMotor(DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = 0xE3000000;
|
__DIRegs[2] = 0xE3000000;
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 803480A0-8034812C 3429E0 008C+00 0/0 7/7 0/0 .text DVDLowRequestError */
|
/* 803480A0-8034812C 3429E0 008C+00 0/0 7/7 0/0 .text DVDLowRequestError */
|
||||||
BOOL DVDLowRequestError(DVDLowCallback cb) {
|
BOOL DVDLowRequestError(DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = 0xE0000000;
|
__DIRegs[2] = 0xE0000000;
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8034812C-803481C8 342A6C 009C+00 0/0 1/1 0/0 .text DVDLowInquiry */
|
/* 8034812C-803481C8 342A6C 009C+00 0/0 1/1 0/0 .text DVDLowInquiry */
|
||||||
BOOL DVDLowInquiry(u32 arg0, DVDLowCallback cb) {
|
BOOL DVDLowInquiry(u32 arg0, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = 0x12000000;
|
__DIRegs[2] = 0x12000000;
|
||||||
@@ -328,50 +315,39 @@ BOOL DVDLowInquiry(u32 arg0, DVDLowCallback cb) {
|
|||||||
__DIRegs[5] = arg0;
|
__DIRegs[5] = arg0;
|
||||||
__DIRegs[6] = 0x20;
|
__DIRegs[6] = 0x20;
|
||||||
__DIRegs[7] = 3;
|
__DIRegs[7] = 3;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 803481C8-80348260 342B08 0098+00 0/0 2/2 0/0 .text DVDLowAudioStream */
|
/* 803481C8-80348260 342B08 0098+00 0/0 2/2 0/0 .text DVDLowAudioStream */
|
||||||
BOOL DVDLowAudioStream(u32 arg0, u32 arg1, u32 arg2, DVDLowCallback cb) {
|
BOOL DVDLowAudioStream(u32 arg0, u32 arg1, u32 arg2, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = arg0 | 0xe1000000;
|
__DIRegs[2] = arg0 | 0xe1000000;
|
||||||
__DIRegs[3] = arg2 >> 2;
|
__DIRegs[3] = arg2 >> 2;
|
||||||
__DIRegs[4] = arg1;
|
__DIRegs[4] = arg1;
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 80348260-803482EC 342BA0 008C+00 0/0 1/1 0/0 .text DVDLowRequestAudioStatus */
|
/* 80348260-803482EC 342BA0 008C+00 0/0 1/1 0/0 .text DVDLowRequestAudioStatus */
|
||||||
BOOL DVDLowRequestAudioStatus(u32 arg0, DVDLowCallback cb) {
|
BOOL DVDLowRequestAudioStatus(u32 arg0, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = arg0 | 0xe2000000;
|
__DIRegs[2] = arg0 | 0xe2000000;
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 803482EC-80348388 342C2C 009C+00 0/0 3/3 0/0 .text DVDLowAudioBufferConfig */
|
/* 803482EC-80348388 342C2C 009C+00 0/0 3/3 0/0 .text DVDLowAudioBufferConfig */
|
||||||
BOOL DVDLowAudioBufferConfig(s32 arg0, u32 arg1, DVDLowCallback cb) {
|
BOOL DVDLowAudioBufferConfig(s32 arg0, u32 arg1, DVDLowCallback cb) {
|
||||||
u32 temp;
|
|
||||||
Callback = cb;
|
Callback = cb;
|
||||||
StopAtNextInt = FALSE;
|
StopAtNextInt = FALSE;
|
||||||
__DIRegs[2] = arg1 | ((arg0 ? 0x10000 : 0) | 0xe4000000);
|
__DIRegs[2] = arg1 | ((arg0 ? 0x10000 : 0) | 0xe4000000);
|
||||||
__DIRegs[7] = 1;
|
__DIRegs[7] = 1;
|
||||||
temp = ((u32)((BI2Debug*)(OS_BI2_DEBUG_ADDRESS))->simMemSize >> 2) * 10;
|
__setAlarm(10);
|
||||||
OSCreateAlarm(&AlarmForTimeout);
|
|
||||||
OSSetAlarm(&AlarmForTimeout, (OSTime)temp, AlarmHandlerForTimeout);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user