Skip to content

Commit

Permalink
Also use spaces for metrowerks stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialAmber committed Oct 6, 2024
1 parent 152ad2e commit b217419
Show file tree
Hide file tree
Showing 119 changed files with 10,845 additions and 10,871 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Xenoblade
Xenoblade
[![Build Status]][actions] [![Discord Badge]][discord]
=============

Expand Down Expand Up @@ -50,7 +50,7 @@ Dependencies
Windows
--------

On Windows, it's **highly recommended** to use native tooling. WSL or msys2 are **not** required.
On Windows, it's **highly recommended** to use native tooling. WSL or msys2 are **not** required.
When running under WSL, [objdiff](#diffing) is unable to get filesystem notifications for automatic rebuilds.

- Install [Python](https://www.python.org/downloads/) and add it to `%PATH%`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ extern "C" {

#define console_buff_mode _IOLBF
#define console_buff_size 256
typedef unsigned char console_buff[console_buff_size];
static console_buff stdin_buff;
static console_buff stdout_buff;
static console_buff stderr_buff;
static console_buff stdin_buff;
static console_buff stdout_buff;
static console_buff stderr_buff;

void __close_all();
u32 __flush_all();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
#define SIGDIGLEN 36

typedef struct decimal {
char sign;
char unk1;
char sign;
char unk1;
s16 exp;
struct {
u8 length;
u8 text[36];
u8 unk41;
} sig;
struct {
u8 length;
u8 text[36];
u8 unk41;
} sig;
} decimal;

typedef struct decform
{
char style;
char unk1;
short digits;
char style;
char unk1;
short digits;
} decform;

void __ull2dec(decimal*, u64);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "types.h"

typedef struct {
int quot; /* quotient */
int rem; /* remainder */
int quot; /* quotient */
int rem; /* remainder */
} div_t;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,56 @@ typedef struct _FILE _FILE, *P_FILE;
#define __ungetc_buffer_size 2

enum __file_kinds {
__closed_file,
__disk_file,
__console_file,
__unavailable_file
__closed_file,
__disk_file,
__console_file,
__unavailable_file
};

enum __open_modes {
__must_exist,
__create_if_necessary,
__create_or_truncate
__must_exist,
__create_if_necessary,
__create_or_truncate
};

enum __file_orientation {
__unoriented,
__char_oriented,
__wide_oriented
__unoriented,
__char_oriented,
__wide_oriented
};

enum __io_modes {
__read = 1,
__write = 2,
__read_write = 3,
__append = 4
__read = 1,
__write = 2,
__read_write = 3,
__append = 4
};

typedef struct __file_modes {
u32 open_mode : 2;
u32 io_mode : 3;
u32 buffer_mode : 2;
u32 file_kind : 3;
u32 open_mode : 2;
u32 io_mode : 3;
u32 buffer_mode : 2;
u32 file_kind : 3;

#ifdef _MSL_WIDE_CHAR
u32 file_orientation : 2;
u32 file_orientation : 2;
#endif /* _MSL_WIDE_CHAR */

u32 binary_io : 1;
u32 binary_io : 1;
} __file_modes;

enum __io_states {
__neutral,
__writing,
__reading,
__rereading
__neutral,
__writing,
__reading,
__rereading
};

typedef struct __file_state {
u32 io_state : 3;
u32 free_buffer : 1;
u8 eof;
u8 error;
u32 io_state : 3;
u32 free_buffer : 1;
u8 eof;
u8 error;
} __file_state;

typedef void* __ref_con;
Expand All @@ -68,28 +68,28 @@ typedef int (*__io_proc)(__file_handle file, u8* buff, size_t* count, __ref_con
typedef int (*__close_proc)(__file_handle file);

struct _FILE {
__file_handle handle; // _00
__file_modes mode; // _04
__file_state state; // _08
u8 is_dynamically_allowed; // _0C
u8 char_buffer; // _0D
u8 char_buffer_overflow; // _0E
u8 ungetc_buffer[__ungetc_buffer_size]; // _0F
wchar_t ungetwc_buffer[__ungetc_buffer_size]; // _12
u32 position; // _18
u8* buffer; // _1C
u32 buffer_size; // _20
u8* buffer_ptr; // _24
u32 buffer_len; // _28
u32 buffer_alignment; // _2C
u32 saved_buffer_len; // _30
u32 buffer_pos; // _34
__pos_proc position_proc; // _38
__io_proc read_proc; // _3C
__io_proc write_proc; // _40
__close_proc close_proc; // _44
__ref_con ref_con; // _48
_FILE* next_file_struct; // _4C
__file_handle handle; // _00
__file_modes mode; // _04
__file_state state; // _08
u8 is_dynamically_allowed; // _0C
u8 char_buffer; // _0D
u8 char_buffer_overflow; // _0E
u8 ungetc_buffer[__ungetc_buffer_size]; // _0F
wchar_t ungetwc_buffer[__ungetc_buffer_size]; // _12
u32 position; // _18
u8* buffer; // _1C
u32 buffer_size; // _20
u8* buffer_ptr; // _24
u32 buffer_len; // _28
u32 buffer_alignment; // _2C
u32 saved_buffer_len; // _30
u32 buffer_pos; // _34
__pos_proc position_proc; // _38
__io_proc read_proc; // _3C
__io_proc write_proc; // _40
__close_proc close_proc; // _44
__ref_con ref_con; // _48
_FILE* next_file_struct; // _4C
};

typedef struct _FILE FILE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@
#include <wchar.h>

enum __ReadProcActions {
__GetAChar,
__UngetAChar,
__TestForError
__GetAChar,
__UngetAChar,
__TestForError
};

enum __WReadProcActions
{
__GetAwChar,
__UngetAwChar,
__TestForwcsError
__GetAwChar,
__UngetAwChar,
__TestForwcsError
};

typedef struct {
char* CharStr;
size_t MaxCharCount;
size_t CharsWritten;
char* CharStr;
size_t MaxCharCount;
size_t CharsWritten;
} __OutStrCtrl;

typedef struct{
char* NextChar;
int NullCharDetected;
char* NextChar;
int NullCharDetected;
} __InStrCtrl;

typedef struct {
wchar_t * wCharStr;
size_t MaxCharCount;
size_t CharsWritten;
wchar_t * wCharStr;
size_t MaxCharCount;
size_t CharsWritten;
} __wOutStrCtrl;

typedef struct {
wchar_t * wNextChar;
int wNullCharDetected;
wchar_t * wNextChar;
int wNullCharDetected;
} __wInStrCtrl;

//__fread
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_STRTOLD_H
#define MSL_STRTOLD_H

long double __strtold(int max_width, int (*ReadProc)(void *, int, int), void* ReadProcArg, int* chars_scanned, int* overflow);
long double __strtold(int max_width, int (*ReadProc)(void *, int, int), void* ReadProcArg, int* chars_scanned, int* overflow);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
typedef int UARTError;

enum {
kUARTNoError = 0,
kUARTUnknownBaudRate,
kUARTConfigurationError,
kUARTBufferOverflow, /* specified buffer was too small */
kUARTNoData /* no data available from polling */
kUARTNoError = 0,
kUARTUnknownBaudRate,
kUARTConfigurationError,
kUARTBufferOverflow, /* specified buffer was too small */
kUARTNoData /* no data available from polling */
};

typedef enum {
kBaudHWSet = -1, /* use HW settings such as DIP switches */
kBaud300 = 300, /* valid baud rates */
kBaud600 = 600,
kBaud1200 = 1200,
kBaud1800 = 1800,
kBaud2000 = 2000,
kBaud2400 = 2400,
kBaud3600 = 3600,
kBaud4800 = 4800,
kBaud7200 = 7200,
kBaud9600 = 9600,
kBaud19200 = 19200,
kBaud38400 = 38400,
kBaud57600 = 57600,
kBaud115200 = 115200,
kBaud230400 = 230400
kBaudHWSet = -1, /* use HW settings such as DIP switches */
kBaud300 = 300, /* valid baud rates */
kBaud600 = 600,
kBaud1200 = 1200,
kBaud1800 = 1800,
kBaud2000 = 2000,
kBaud2400 = 2400,
kBaud3600 = 3600,
kBaud4800 = 4800,
kBaud7200 = 7200,
kBaud9600 = 9600,
kBaud19200 = 19200,
kBaud38400 = 38400,
kBaud57600 = 57600,
kBaud115200 = 115200,
kBaud230400 = 230400
} UARTBaudRate;

extern UARTError InitializeUART(UARTBaudRate baudRate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
#include "PowerPC_EABI_Support/MetroTRK/trk.h"

typedef struct memRange{
ui8* start;
ui8* end;
bool readable;
bool writeable;
ui8* start;
ui8* end;
bool readable;
bool writeable;
} memRange;


const memRange gTRKMemMap[] = {{
(ui8*)0x00000000,
(ui8*)0xFFFFFFFF,
true,
true
(ui8*)0x00000000,
(ui8*)0xFFFFFFFF,
true,
true
}};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#define TRK_TRANSPORT_INT_DRIVEN 1

#define TRK_TRANSPORT_INT_KEY 0x00000500
#define TRK_TRANSPORT_INT_KEY 0x00000500

//Target specific includes
#include "PowerPC_EABI_Support/MetroTRK/Processor/ppc/Board/dolphin/target_asm.h"
Expand Down
Loading

0 comments on commit b217419

Please sign in to comment.