update to current progress

Former-commit-id: bed7f1bddb7af09c0f288c1150c6b1c5c106e3be [formerly 02402a0b62d22bfba17d6dfef2f443c1500b450a] [formerly 93bff37d83bad8297647c88c0b42afe81ed277e7 [formerly 08274c78a878dba3fa13551e009ca7aba6528beb]]
Former-commit-id: f66285070e26f0193e87c728c4a0d3913e9a6868 [formerly 85e3eb7005d566d372945751835e29205ff816b4]
Former-commit-id: deff595044d44ac83b2a5c920a64abb2d97054f5
This commit is contained in:
kholdfuzion committed 2019-08-03 17:56:46 +00:00
1 parent 2923dcb29e
commit a6f7d68edb
2042 files changed
+4521 -3005

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Assembly Macros
.macro glabel label
.global \label
\label:
.endm
+13
View File
@@ -0,0 +1,13 @@
#ifndef _MATH_H_
#define _MATH_H_
#define M_PI 3.14159265358979323846
float sinf(float);
double sin(double);
float cosf(float);
double cos(double);
float sqrtf(float);
#endif
+1
View File
@@ -0,0 +1 @@
3303fdcb83a8ecc2ca28d2b1cc9a9631be335535
+8
View File
@@ -0,0 +1,8 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
#define NULL ((void *)0)
typedef unsigned long size_t;
#endif
+19
View File
@@ -0,0 +1,19 @@
#ifndef _STDLIB_H_
#define _STDLIB_H_
typedef struct lldiv_t
{
long long quot;
long long rem;
} lldiv_t;
typedef struct ldiv_t
{
long quot;
long rem;
} ldiv_t;
lldiv_t lldiv(long long, long long);
ldiv_t ldiv(long, long);
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef _STRING_H_
#define _STRING_H_
#include "ultra64/types.h"
void* memcpy(void*, const void*, size_t);
size_t strlen(const u8 *str);
const u8 *strchr(const u8 *str, u32 ch);
#endif
+29
View File
@@ -0,0 +1,29 @@
#ifndef _ULTRA64_H_
#define _ULTRA64_H_
#include <math.h>
#include <ultra64/types.h>
#include <ultra64/interrupt.h>
#include <ultra64/os_misc.h>
#include <ultra64/rdp.h>
#include <ultra64/thread.h>
#include <ultra64/time.h>
#include <ultra64/message.h>
#include <ultra64/os_cont.h>
#include <ultra64/tlb.h>
#include <ultra64/sptask.h>
#include <ultra64/ucode.h>
#include <ultra64/cache.h>
#include <ultra64/vi.h>
#include <ultra64/pi.h>
#include <ultra64/os_internal.h>
#include <ultra64/gbi.h>
#include <ultra64/eeprom.h>
#include <ultra64/libc.h>
#include <ultra64/gu.h>
#include <ultra64/os_ai.h>
#include <ultra64/libaudio.h>
#include <ultra64/libultra.h>
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef _ULTRA64_CACHE_H_
#define _ULTRA64_CACHE_H_
/* Functions */
void osInvalICache(void *vaddr, s32 nbytes);
void osInvalDCache(void *vaddr, s32 nbytes);
void osWritebackDCache(void *vaddr, s32 nbytes);
void osWritebackDCacheAll(void);
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef _ULTRA64_EEPROM_H_
#define _ULTRA64_EEPROM_H_
typedef struct
{
u16 unk00;
u16 unk01;
} OSEepromUnknownStruct0;
/* Functions */
s32 osEepromLongRead(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
s32 osEepromLongWrite(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
s32 osEepromWrite(OSMesgQueue *mq, u8 address, u8 *buffer);
s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer);
s32 osEepromProbe(OSMesgQueue *mq);
#endif
+1
View File
@@ -0,0 +1 @@
2d6fd6268c1325c433c0ec635a1df5b2af296e5c
+1
View File
@@ -0,0 +1 @@
cb05cf41e2e8db80354ef0801c427d04da632126
+21
View File
@@ -0,0 +1,21 @@
#ifndef _ULTRA64_GU_H_
#define _ULTRA64_GU_H_
#define GU_PI 3.1415926
/* Functions */
void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect,
float near, float far, float scale);
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near,
float far, float scale);
void guOrtho(Mtx *m, float left, float right, float bottom, float top,
float near, float far, float scale);
void guTranslate(Mtx *m, float x, float y, float z);
void guRotate(Mtx *m, float a, float x, float y, float z);
void guScale(Mtx *m, float x, float y, float z);
void guMtxF2L(float mf[4][4], Mtx *m);
void guMtxIdent(Mtx *m);
void guMtxIdentF(float mf[4][4]);
void guMtxL2F(float mf[4][4], Mtx *m);
void guNormalize(float *, float *, float *);
#endif
+14
View File
@@ -0,0 +1,14 @@
#ifndef _ULTRA64_INTERRUPT_H_
#define _ULTRA64_INTERRUPT_H_
/* Types */
typedef u32 OSIntMask;
/* Functions */
OSIntMask osGetIntMask(void);
OSIntMask osSetIntMask(OSIntMask);
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef _ULTRA64_LIBAUDIO_H_
#define _ULTRA64_LIBAUDIO_H_
typedef struct
{
u8 *offset;
s32 len;
} ALSeqData;
typedef struct
{
s16 revision;
s16 seqCount;
ALSeqData seqArray[1];
} ALSeqFile;
void alSeqFileNew(ALSeqFile *f, u8 *base);
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef _ULTRA64_LIBC_H_
#define _ULTRA64_LIBC_H_
int sprintf(char *, const char *, ... );
void bcopy(const void *src, void *dest, size_t size);
void bzero(void *s, size_t size);
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef _LIBULTRA_H
#define _LIBULTRA_H
#define TV_TYPE_NTSC 1
#define TV_TYPE_PAL 0
#define TV_TYPE_MPAL 2
#define RESET_TYPE_COLD_RESET 0
#define RESET_TYPE_NMI 1
#define RESET_TYPE_BOOT_DISK 2
extern u32 osTvType;
extern u32 osRomBase;
extern u32 osResetType;
extern u8 osAppNmiBuffer[64];
#endif /* _LIBULTRA_H */
+1
View File
@@ -0,0 +1 @@
19531493671f32392edb57d5d03ee717ecd5f7a5
+8
View File
@@ -0,0 +1,8 @@
#ifndef _ULTRA64_AI_H_
#define _ULTRA64_AI_H_
u32 osAiGetLength(void);
s32 osAiSetNextBuffer(void *, u32);
s32 osAiSetFrequency(u32);
#endif
+1
View File
@@ -0,0 +1 @@
7393f39f5204f6690c537b0a680c96200c63669a
+16
View File
@@ -0,0 +1,16 @@
#ifndef _ULTRA64_OS_INTERNAL_H_
#define _ULTRA64_OS_INTERNAL_H_
/* Internal functions used by the operating system */
/* Do not include this header in application code */
/* Variables */
//extern u64 osClockRate;
/* Functions */
/*u32 __osProbeTLB(void *);
u32 __osDisableInt(void);
void __osRestoreInt(u32);*/
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef _ULTRA64_OS_MISC_H_
#define _ULTRA64_OS_MISC_H_
/* Miscellaneous OS functions */
void osInitialize(void);
u32 osGetCount(void);
u32 osVirtualToPhysical(void *);
#endif
+1
View File
@@ -0,0 +1 @@
4844f81fb63e0b1511f92f997c431c948c4f15b7
+33
View File
@@ -0,0 +1,33 @@
#ifndef _ULTRA64_RDP_H_
#define _ULTRA64_RDP_H_
/* DP Command Registers */
#define DPC_REG_BASE 0xA4100000
#define DPC_START_REG (*(vu32 *)(DPC_REG_BASE + 0x00))
#define DPC_END_REG (*(vu32 *)(DPC_REG_BASE + 0x04))
#define DPC_CURRENT_REG (*(vu32 *)(DPC_REG_BASE + 0x08))
#define DPC_STATUS_REG (*(vu32 *)(DPC_REG_BASE + 0x0C))
#define DPC_CLOCK_REG (*(vu32 *)(DPC_REG_BASE + 0x10))
#define DPC_BUFBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x14))
#define DPC_PIPEBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x18))
#define DPC_TMEM_REG (*(vu32 *)(DPC_REG_BASE + 0x1C))
/* DP Span Registers */
#define DPS_REG_BASE 0xA4200000
#define DPS_TBIST_REG (*(vu32 *)(DPS_REG_BASE + 0x00))
#define DPS_TEST_MODE_REG (*(vu32 *)(DPS_REG_BASE + 0x04))
#define DPS_BUFTEST_ADDR_REG (*(vu32 *)(DPS_REG_BASE + 0x08))
#define DPS_BUFTEST_DATA_REG (*(vu32 *)(DPS_REG_BASE + 0x0C))
/* Functions */
u32 osDpGetStatus(void);
void osDpSetStatus(u32 status);
#endif
+1
View File
@@ -0,0 +1 @@
75d5752a4a0a9d9d4c50cd5f108978c70d6a0c3b
+1
View File
@@ -0,0 +1 @@
791701c24942c309a0c70cf103d33ca25a6071e1
+25
View File
@@ -0,0 +1,25 @@
#ifndef _ULTRA64_TIME_H_
#define _ULTRA64_TIME_H_
#include "message.h"
/* Types */
typedef struct OSTimer_str
{
struct OSTimer_str *next;
struct OSTimer_str *prev;
u64 interval;
u64 remaining;
OSMesgQueue *mq;
OSMesg *msg;
} OSTimer;
typedef u64 OSTime;
/* Functions */
OSTime osGetTime(void);
void osSetTime(OSTime time);
u32 osSetTimer(OSTimer *, OSTime, u64, OSMesgQueue *, OSMesg);
#endif
+25
View File
@@ -0,0 +1,25 @@
#ifndef _ULTRA64_TLB_H_
#define _ULTRA64_TLB_H_
/* Types */
typedef u32 OSPageMask;
/* OSPageMask Valid Values */
#define OS_PM_4K 0x0000000
#define OS_PM_16K 0x0006000
#define OS_PM_64K 0x001e000
#define OS_PM_256K 0x007e000
#define OS_PM_1M 0x01fe000
#define OS_PM_4M 0x07fe000
#define OS_PM_16M 0x1ffe000
/* Functions */
void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr,
u32 oddpaddr, s32 asid);
void osMapTLBRdb(void);
void osUnmapTLB(s32 index);
void osUnmapTLBAll(void);
void osSetTLBASID(s32 asid);
#endif
+41
View File
@@ -0,0 +1,41 @@
#ifndef _ULTRA64_TYPES_H_
#define _ULTRA64_TYPES_H_
#ifndef NULL
#define NULL (void *)0
#endif
#define TRUE 1
#define FALSE 0
typedef signed char s8;
typedef unsigned char u8;
typedef signed short int s16;
typedef unsigned short int u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long long int s64;
typedef unsigned long long int u64;
typedef volatile u8 vu8;
typedef volatile u16 vu16;
typedef volatile u32 vu32;
typedef volatile u64 vu64;
typedef volatile s8 vs8;
typedef volatile s16 vs16;
typedef volatile s32 vs32;
typedef volatile s64 vs64;
typedef float f32;
typedef double f64;
typedef long int Mtx_t[4][4];
typedef union
{
Mtx_t m;
long long int forc_structure_alignment;
} Mtx;
typedef unsigned long size_t;
#endif
+23
View File
@@ -0,0 +1,23 @@
#ifndef _ULTRA64_UCODE_H_
#define _ULTRA64_UCODE_H_
#define SP_DRAM_STACK_SIZE8 0x400
#define SP_UCODE_SIZE 0x1000
#define SP_UCODE_DATA_SIZE 0x800
// standard boot ucode
extern u64 rspF3DBootStart[], rspF3DBootEnd[];
// F3D ucode
extern u64 rspF3DStart[], rspF3DEnd[];
// F3D data ucode
extern u64 rspF3DDataStart[], rspF3DDataEnd[];
// F3D audio ucode
extern u64 rspF3DAudioStart[], rspF3DAudioEnd[];
// F3D audio data ucode
extern u64 rspF3DAudioDataStart[], rspF3DAudioDataEnd[];
#endif
+1
View File
@@ -0,0 +1 @@
6433a1d4659ae7126e465e5b1823918588a706c3
+12
View File
@@ -0,0 +1,12 @@
#ifndef _UNUSED_H_
#define _UNUSED_H_
// Avoid compiler warnings for unused variables
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
#endif