Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def MatchingFor(*versions):
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c"),
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c"),
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c"),
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c"),
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c"),
Object(Matching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"),
Expand Down
21 changes: 10 additions & 11 deletions src/PowerPC_EABI_Support/Msl/MSL_C/MSL_Common_Embedded/ansi_fp.c
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
#include "dolphin/types.h"
#include "PowerPC_EABI_Support/Msl/MSL_C/MSL_Common/ansi_fp.h"

static const f64 bit_values[] = {
static const double bit_values[] = {
1e1, 1e2, 1e4, 1e8, 1e16, 1e32, 1e64, 1e128, 1e256,
};

static const f64 digit_values[] = {
static const double digit_values[] = {
1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8,
};

void __num2dec(const decform* f, f64 x, decimal* d)
void __num2dec(const decform* f, double x, decimal* d)
{
int sp30;
int exp;
u8* p;
unsigned char* p;
int digits;
int var_r4;
f64 var_f1;
double var_f1;
int var_r11;
int var_r12;
int temp_r5;
int var_r6;
int var_r6_2;
const f64* var_r5;
const double* var_r5;

digits = f->digits;
if (digits > 16) {
Expand Down Expand Up @@ -76,12 +75,12 @@ void __num2dec(const decform* f, f64 x, decimal* d)

while (x >= 1.0) {
x *= 0.1;
exp += 1;
exp++;
}

while (x < 0.1) {
x *= 10.0;
exp -= 1;
exp--;
}

p = d->sig.text;
Expand All @@ -107,8 +106,8 @@ void __num2dec(const decform* f, f64 x, decimal* d)
}

digits = f->digits;
if (f->digits > 36) {
digits = 36;
if (f->digits > SIGDIGLEN) {
digits = SIGDIGLEN;
}

temp_r5 = digits - d->sig.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,21 @@

inline DSError TRKDoNotifyStopped_Inline(TRKBuffer* msg, MessageCommandID cmd)
{
DSError err;

if (msg->position >= 0x880) {
err = DS_MessageBufferOverflow;
return DS_MessageBufferOverflow;
} else {
msg->data[msg->position++] = cmd;
msg->length += 1;
err = 0;
return DS_NoError;
}
return err;
}

DSError TRKDoNotifyStopped(MessageCommandID cmd)
{
DSError err;
int bufIdx;
int reqIdx;
TRKBuffer* msg;
int bufIdx;

err = TRKGetFreeBuffer(&bufIdx, &msg);
if (err == DS_NoError) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
DSError TRKSuppAccessFile(u32 file_handle, u8* data, size_t* count,
DSIOResult* io_result, BOOL need_reply, BOOL read)
{
BOOL exit;
u32 done;
BOOL exit;
DSError error;
TRKBuffer* replyBuffer;
int replyBufferId;
TRKBuffer* buffer;
TRKBuffer* replyBuffer;
u32 length;
int bufferId;
u16 replyLength;
Expand Down Expand Up @@ -56,8 +56,8 @@ DSError TRKSuppAccessFile(u32 file_handle, u8* data, size_t* count,
replyLength = 0;
replyIOResult = DS_IONoError;

error = TRKRequestSend(buffer, &replyBufferId, read ? 5 : 5, 3,
!(read && file_handle == 0));
error = (0, TRKRequestSend(buffer, &replyBufferId, read ? 5 : 5,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bruh... almost definitely a fakematch, no? better to leave non-matching than to force it

3, !(read && file_handle == 0)));
if (error == DS_NoError) {
replyBuffer = (TRKBuffer*)TRKGetBuffer(replyBufferId);
TRKSetBufferPosition(replyBuffer, 2);
Expand All @@ -73,8 +73,8 @@ DSError TRKSuppAccessFile(u32 file_handle, u8* data, size_t* count,
if (read && error == DS_NoError) {
if (replyBuffer->length != replyLength + 5) {
replyLength = replyBuffer->length - 5;
if (replyIOResult == DS_IONoError)
replyIOResult = DS_IOError;
if (replyIOResult == 0)
replyIOResult = 1;
}

if (replyLength <= length)
Expand Down
Loading