-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fault OK * Small cleanups * typo * PR * Splat ext to extract font * Format * newline * small cleanups
- Loading branch information
Showing
14 changed files
with
975 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef ALIGNMENT_H | ||
#define ALIGNMENT_H | ||
|
||
#include "attributes.h" | ||
|
||
#define ALIGN8(val) (((val) + 7) & ~7) | ||
#define ALIGN16(val) (((val) + 0xF) & ~0xF) | ||
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F) | ||
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F) | ||
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF) | ||
|
||
#ifndef ALIGNED | ||
#define ALIGNED(x) __attribute__ ((aligned (x))) | ||
#endif | ||
|
||
#ifdef __sgi /* IDO compiler */ | ||
#define UNALIGNED __unaligned | ||
#else | ||
#define UNALIGNED | ||
#endif | ||
|
||
#ifdef __sgi /* IDO compiler */ | ||
#define ALIGNOF(x) __builtin_alignof(x) | ||
#elif (__STDC_VERSION__ >= 201112L) /* C11 */ | ||
#define ALIGNOF(x) _Alignof(x) | ||
#else /* __GNUC__ */ | ||
#define ALIGNOF(x) __alignof__(x) | ||
#endif | ||
|
||
#define ALIGN_MASK(n) (~((n) - 1)) | ||
|
||
#define ALIGNOF_MASK(x) ALIGN_MASK(ALIGNOF(x)) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef FAULT_H | ||
#define FAULT_H | ||
|
||
#include "ultra64.h" | ||
|
||
void Fault_SetFramebuffer(u16* fb, u16 width, u16 depth); | ||
void Fault_Init(void); | ||
void Fault_HungUp(const char* file, s32 line); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef SLEEP_H | ||
#define SLEEP_H | ||
|
||
#include "ultra64.h" | ||
|
||
void csleep(OSTime t); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef STACK_H | ||
#define STACK_H | ||
|
||
#include "alignment.h" | ||
|
||
#define STACK(stack, size) \ | ||
u64 stack[ALIGN8(size) / sizeof(u64)] | ||
|
||
#define STACK_TOP(stack) \ | ||
((u8*)(stack) + sizeof(stack)) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef YS64_THREAD_H | ||
#define YS64_THREAD_H | ||
|
||
#define Y_THREAD_ID_FAULT 2 | ||
|
||
#define Y_PRIORITY_FAULT OS_PRIORITY_APPMAX | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.