mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Move libultra function declarations to libultra headers (#1196)
* Delete unused headers * Move PR and io to ultra64 * move headers to ultra64 * more cleanups * more reorganizing * i think that should be all * format * ifdef guards cleanup * Add IO_READ and IO_WRITE macros for future use * warnings * review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * warnings again * warn * ifdef guards * fix merge * fix merge * fix merge * bss * padutils.h * bss * bss * bss * fix merge * bss * bss * bss * fix merge * fixes * fixes * bss * bss * fix merge * fix * fix * fix includepaths * fix paths * bss * fix * ultra64/ -> PR/ * header guards * fix ehader guards * fix * fix++ * format * bss is borken * prevent 2 * :despair: * bss * rename assert to dbg_hungup * fix * a * fix * bss * fix * bss * bss --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
co-authored by
Tharo
parent
9cceea48f3
commit
4fa13e4132
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef ULTRA64_ABI_H
|
||||
#define ULTRA64_ABI_H
|
||||
#ifndef PR_ABI_H
|
||||
#define PR_ABI_H
|
||||
|
||||
/* Audio commands: */
|
||||
/*
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#ifndef _CONTROLLER_H_
|
||||
#define _CONTROLLER_H_
|
||||
#ifndef PR_CONTROLLER_H
|
||||
#define PR_CONTROLLER_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "PR/pfs.h"
|
||||
#include "ultratypes.h"
|
||||
#include "os_cont.h"
|
||||
#include "os_pfs.h"
|
||||
|
||||
#define CHNL_ERR(format) (((format).rxsize & CHNL_ERR_MASK) >> 4)
|
||||
|
||||
#define SIAccessQueueSize 2
|
||||
#define BLOCKSIZE 32
|
||||
#define MAXCONTROLLERS 4
|
||||
#define PFS_ONE_PAGE 8
|
||||
|
||||
#define PFS_PAGE_SIZE (BLOCKSIZE*PFS_ONE_PAGE)
|
||||
@@ -104,27 +104,6 @@
|
||||
|
||||
#define PFS_ERR_NOPACK 1
|
||||
|
||||
/* controller errors */
|
||||
#define CONT_NO_RESPONSE_ERROR 0x8
|
||||
#define CONT_OVERRUN_ERROR 0x4
|
||||
|
||||
/* Controller type */
|
||||
#define CONT_ABSOLUTE 0x0001
|
||||
#define CONT_RELATIVE 0x0002
|
||||
#define CONT_JOYPORT 0x0004
|
||||
#define CONT_EEPROM 0x8000
|
||||
#define CONT_EEP16K 0x4000
|
||||
#define CONT_TYPE_MASK 0x1F07
|
||||
#define CONT_TYPE_NORMAL 0x0005
|
||||
#define CONT_TYPE_MOUSE 0x0002
|
||||
#define CONT_TYPE_VOICE 0x0100
|
||||
|
||||
/* Controller status */
|
||||
#define CONT_CARD_ON 0x01
|
||||
#define CONT_CARD_PULL 0x02
|
||||
#define CONT_ADDR_CRC_ER 0x04
|
||||
#define CONT_EEPROM_BUSY 0x80
|
||||
|
||||
// Accessory detection
|
||||
#define CONT_ADDR_DETECT 0x8000
|
||||
// Rumble
|
||||
@@ -145,22 +124,6 @@
|
||||
#define CONT_BLOCK_GB_BANK CONT_BLOCKS(CONT_ADDR_GB_BANK)
|
||||
#define CONT_BLOCK_GB_STATUS CONT_BLOCKS(CONT_ADDR_GB_STATUS)
|
||||
|
||||
/* Buttons */
|
||||
#define BTN_CRIGHT 0x0001
|
||||
#define BTN_CLEFT 0x0002
|
||||
#define BTN_CDOWN 0x0004
|
||||
#define BTN_CUP 0x0008
|
||||
#define BTN_R 0x0010
|
||||
#define BTN_L 0x0020
|
||||
#define BTN_RESET 0x0080
|
||||
#define BTN_DRIGHT 0x0100
|
||||
#define BTN_DLEFT 0x0200
|
||||
#define BTN_DDOWN 0x0400
|
||||
#define BTN_DUP 0x0800
|
||||
#define BTN_START 0x1000
|
||||
#define BTN_Z 0x2000
|
||||
#define BTN_B 0x4000
|
||||
#define BTN_A 0x8000
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 ramarray[15];
|
||||
@@ -213,6 +176,28 @@ typedef struct {
|
||||
|
||||
#define READFORMAT(ptr) ((__OSContRamReadFormat*)(ptr))
|
||||
|
||||
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
|
||||
s32 __osGetId(OSPfs* pfs);
|
||||
u16 __osSumcalc(u8* ptr, s32 length);
|
||||
s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum);
|
||||
s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
|
||||
s32 __osCheckPackId(OSPfs *pfs, __OSPackId *check);
|
||||
s32 __osCheckId(OSPfs* pfs);
|
||||
s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
|
||||
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);
|
||||
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, s32* finalPage);
|
||||
s32 __osPfsReleasePages(OSPfs *pfs, __OSInode *inode, u8 initialPage, u8 bank, __OSInodeUnit *finalPage);
|
||||
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* buffer);
|
||||
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
|
||||
void __osContGetInitData(u8* pattern, OSContStatus* data);
|
||||
void __osPackRequestData(u8 poll);
|
||||
void __osPfsRequestData(u8 poll);
|
||||
void __osPfsGetInitData(u8* pattern, OSContStatus* contData);
|
||||
u8 __osContAddressCrc(u16 addr);
|
||||
u8 __osContDataCrc(u8* data);
|
||||
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
|
||||
s32 __osContChannelReset(OSMesgQueue* mq, s32 channel);
|
||||
|
||||
extern OSPifRam __osContPifRam;
|
||||
// extern UNK_TYPE1 D_8009CF0C;
|
||||
extern u8 __osContLastPoll;
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef CONTROLLER_VOICE_H
|
||||
#define CONTROLLER_VOICE_H
|
||||
#ifndef PR_CONTROLLER_VOICE_H
|
||||
#define PR_CONTROLLER_VOICE_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "ultra64/os_voice.h"
|
||||
#include "ultra64/message.h"
|
||||
#include "ultratypes.h"
|
||||
#include "os_voice.h"
|
||||
#include "os_message.h"
|
||||
#include "libc/stddef.h"
|
||||
|
||||
typedef struct {
|
||||
+14
-2
@@ -1,7 +1,9 @@
|
||||
#include "mbi.h"
|
||||
|
||||
#ifndef _ULTRA64_GBI_H_
|
||||
#define _ULTRA64_GBI_H_
|
||||
#ifndef PR_GBI_H
|
||||
#define PR_GBI_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
|
||||
/* To enable Fast3DEX grucode support, define F3DEX_GBI. */
|
||||
|
||||
@@ -1054,6 +1056,16 @@ typedef struct {
|
||||
unsigned char v[3];
|
||||
} Tri;
|
||||
|
||||
typedef long int Mtx_t[4][4];
|
||||
typedef union {
|
||||
Mtx_t m;
|
||||
struct {
|
||||
u16 intPart[4][4];
|
||||
u16 fracPart[4][4];
|
||||
};
|
||||
long long int force_structure_alignment;
|
||||
} Mtx; // size = 0x40
|
||||
|
||||
/*
|
||||
* Viewport
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#ifndef GS2DEX_H
|
||||
#define GS2DEX_H
|
||||
#ifndef PR_GS2DEX_H
|
||||
#define PR_GS2DEX_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
+58
-21
@@ -1,26 +1,63 @@
|
||||
#ifndef _GU_H_
|
||||
#define _GU_H_
|
||||
#ifndef PR_GU_H
|
||||
#define PR_GU_H
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ unsigned char* base;
|
||||
/* 0x4 */ int fmt;
|
||||
/* 0x8 */ int siz;
|
||||
/* 0xC */ int xsize;
|
||||
/* 0x10 */ int ysize;
|
||||
/* 0x14 */ int lsize;
|
||||
/* 0x18 */ int addr;
|
||||
/* 0x1C */ int w;
|
||||
/* 0x20 */ int h;
|
||||
/* 0x24 */ int s;
|
||||
/* 0x28 */ int t;
|
||||
} Image;
|
||||
#include "ultratypes.h"
|
||||
#include "gbi.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ float col[3];
|
||||
/* 0xC */ float pos[3];
|
||||
/* 0x18 */ float a1;
|
||||
/* 0x1C */ float a2;
|
||||
} PositionalLight;
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#define M_DTOR (3.14159265358979323846/180.0)
|
||||
|
||||
#define FTOFIX32(x) (long)((x) * (float)0x00010000)
|
||||
#define FIX32TOF(x) ((float)(x) * (1.0f / (float)0x00010000))
|
||||
#define FTOFRAC8(x) ((int) MIN(((x) * (128.0f)), 127.0f) & 0xff)
|
||||
|
||||
|
||||
void guMtxIdent(Mtx* mtx);
|
||||
void guMtxIdentF(float mf[4][4]);
|
||||
|
||||
void guOrtho(Mtx* m, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale);
|
||||
void guOrthoF(float m[4][4], f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale);
|
||||
|
||||
void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
|
||||
void guPerspectiveF(float mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
|
||||
|
||||
void guLookAt(Mtx* m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
|
||||
void guLookAtF(float mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
|
||||
|
||||
void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
|
||||
void guLookAtHiliteF(float mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
|
||||
|
||||
void guRotate(Mtx* m, f32 a, f32 x, f32 y, f32 z);
|
||||
void guRotateF(float m[4][4], f32 a, f32 x, f32 y, f32 z);
|
||||
|
||||
void guScale(Mtx* mtx, f32 x, f32 y, f32 z);
|
||||
void guTranslate(Mtx* mtx, f32 x, f32 y, f32 z);
|
||||
|
||||
void guPosition(Mtx* m, f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z);
|
||||
void guPositionF(float mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z);
|
||||
|
||||
void guMtxF2L(float mf[4][4], Mtx* m);
|
||||
void guMtxL2F(float m1[4][4], Mtx* m2);
|
||||
|
||||
void guNormalize(float* x, float* y, float* z);
|
||||
|
||||
|
||||
f32 sinf(f32 __x);
|
||||
f32 cosf(f32 __x);
|
||||
|
||||
s16 sins(u16 x);
|
||||
s16 coss(u16 x);
|
||||
|
||||
f32 sqrtf(f32 f);
|
||||
#ifdef __sgi
|
||||
#pragma intrinsic(sqrtf);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _ULTRA64_HARDWARE_H_
|
||||
#define _ULTRA64_HARDWARE_H_
|
||||
|
||||
// TODO: not real libultra header. Refactor to R4300.h
|
||||
|
||||
// Segment Wrapper
|
||||
// Uncached RDRAM
|
||||
#define KSEG1 0xA0000000 // 0xA0000000 - 0xBFFFFFFF Physical memory, uncached, unmapped
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef _MBI_H_
|
||||
#define _MBI_H_
|
||||
#ifndef PR_MBI_H
|
||||
#define PR_MBI_H
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef PR_OS_H
|
||||
#define PR_OS_H
|
||||
|
||||
#include "os_ai.h"
|
||||
#include "os_cache.h"
|
||||
#include "os_cont.h"
|
||||
#include "os_convert.h"
|
||||
#include "os_exception.h"
|
||||
#include "os_flash.h"
|
||||
#include "os_host.h"
|
||||
#include "os_internal_error.h"
|
||||
#include "os_internal_reg.h"
|
||||
#include "os_internal_si.h"
|
||||
#include "os_internal.h"
|
||||
#include "os_libc.h"
|
||||
#include "os_message.h"
|
||||
#include "os_pfs.h"
|
||||
#include "os_pi.h"
|
||||
#include "os_reg.h"
|
||||
#include "os_system.h"
|
||||
#include "os_thread.h"
|
||||
#include "os_time.h"
|
||||
#include "os_tlb.h"
|
||||
#include "os_vi.h"
|
||||
#include "os_voice.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef PR_OS_AI_H
|
||||
#define PR_OS_AI_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
|
||||
|
||||
u32 osAiGetLength(void);
|
||||
s32 osAiSetFrequency(u32 frequency);
|
||||
s32 osAiSetNextBuffer(void* buf, u32 size);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef PR_OS_CACHE_H
|
||||
#define PR_OS_CACHE_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "libc/stddef.h"
|
||||
|
||||
void osInvalDCache(void* vaddr, size_t nbytes);
|
||||
void osInvalICache(void* vaddr, size_t nbytes);
|
||||
void osWritebackDCache(void* vaddr, s32 nbytes);
|
||||
void osWritebackDCacheAll(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,79 @@
|
||||
#ifndef PR_OS_CONT_H
|
||||
#define PR_OS_CONT_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "os_message.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 type;
|
||||
/* 0x2 */ u8 status;
|
||||
/* 0x3 */ u8 errno;
|
||||
} OSContStatus; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 button;
|
||||
/* 0x2 */ s8 stick_x;
|
||||
/* 0x3 */ s8 stick_y;
|
||||
/* 0x4 */ u8 errno;
|
||||
} OSContPad; // size = 0x6
|
||||
|
||||
#define MAXCONTROLLERS 4
|
||||
|
||||
/* controller errors */
|
||||
#define CONT_NO_RESPONSE_ERROR 0x8
|
||||
#define CONT_OVERRUN_ERROR 0x4
|
||||
|
||||
/* Controller type */
|
||||
#define CONT_ABSOLUTE 0x0001
|
||||
#define CONT_RELATIVE 0x0002
|
||||
#define CONT_JOYPORT 0x0004
|
||||
#define CONT_EEPROM 0x8000
|
||||
#define CONT_EEP16K 0x4000
|
||||
#define CONT_TYPE_MASK 0x1F07
|
||||
#define CONT_TYPE_NORMAL 0x0005
|
||||
#define CONT_TYPE_MOUSE 0x0002
|
||||
#define CONT_TYPE_VOICE 0x0100
|
||||
|
||||
/* Controller status */
|
||||
#define CONT_CARD_ON 0x01
|
||||
#define CONT_CARD_PULL 0x02
|
||||
#define CONT_ADDR_CRC_ER 0x04
|
||||
#define CONT_EEPROM_BUSY 0x80
|
||||
|
||||
// TODO: use real libultra button defines instead of this
|
||||
/* Buttons */
|
||||
#define BTN_CRIGHT 0x0001
|
||||
#define BTN_CLEFT 0x0002
|
||||
#define BTN_CDOWN 0x0004
|
||||
#define BTN_CUP 0x0008
|
||||
#define BTN_R 0x0010
|
||||
#define BTN_L 0x0020
|
||||
#define BTN_RESET 0x0080
|
||||
#define BTN_DRIGHT 0x0100
|
||||
#define BTN_DLEFT 0x0200
|
||||
#define BTN_DDOWN 0x0400
|
||||
#define BTN_DUP 0x0800
|
||||
#define BTN_START 0x1000
|
||||
#define BTN_Z 0x2000
|
||||
#define BTN_B 0x4000
|
||||
#define BTN_A 0x8000
|
||||
|
||||
#define CONT_ERR_NO_CONTROLLER PFS_ERR_NOPACK /* 1 */
|
||||
#define CONT_ERR_CONTRFAIL CONT_OVERRUN_ERROR /* 4 */
|
||||
#define CONT_ERR_INVALID PFS_ERR_INVALID /* 5 */
|
||||
#define CONT_ERR_DEVICE PFS_ERR_DEVICE /* 11 */
|
||||
#define CONT_ERR_NOT_READY 12
|
||||
#define CONT_ERR_VOICE_MEMORY 13
|
||||
#define CONT_ERR_VOICE_WORD 14
|
||||
#define CONT_ERR_VOICE_NO_RESPONSE 15
|
||||
|
||||
|
||||
s32 osContInit(OSMesgQueue* mq, u8* bitpattern, OSContStatus* data);
|
||||
s32 osContStartQuery(OSMesgQueue* mq);
|
||||
s32 osContStartReadData(OSMesgQueue* mq);
|
||||
s32 osContSetCh(u8 ch);
|
||||
void osContGetQuery(OSContStatus* data);
|
||||
void osContGetReadData(OSContPad* data);
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef ULTRA64_CONVERT_H
|
||||
#define ULTRA64_CONVERT_H
|
||||
#ifndef PR_CONVERT_H
|
||||
#define PR_CONVERT_H
|
||||
|
||||
#include "libc/stdint.h"
|
||||
|
||||
@@ -24,6 +24,5 @@
|
||||
/* Functions */
|
||||
|
||||
extern uintptr_t osVirtualToPhysical(void*);
|
||||
extern void* osPhysicalToVirtual(uintptr_t);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef PR_OS_EXCEPTION_H
|
||||
#define PR_OS_EXCEPTION_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
|
||||
|
||||
typedef u32 OSIntMask;
|
||||
typedef u32 OSHWIntr;
|
||||
|
||||
OSIntMask osGetIntMask(void);
|
||||
OSIntMask osSetIntMask(OSIntMask im);
|
||||
|
||||
|
||||
// Internal
|
||||
void __osSetHWIntrRoutine(OSHWIntr idx, OSMesgQueue* queue, OSMesg msg);
|
||||
void __osGetHWIntrRoutine(OSHWIntr idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
||||
void __osSetGlobalIntMask(OSHWIntr mask);
|
||||
void __osResetGlobalIntMask(OSHWIntr mask);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef PR_OS_FLASH_H
|
||||
#define PR_OS_FLASH_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "os_pi.h"
|
||||
|
||||
|
||||
OSPiHandle* osFlashReInit(u8 latency, u8 pulse, u8 pageSize, u8 relDuration, u32 start);
|
||||
OSPiHandle* osFlashInit(void);
|
||||
void osFlashReadStatus(u8* flashStatus);
|
||||
void osFlashReadId(u32* flashType, u32* flashVendor);
|
||||
void osFlashClearStatus(void);
|
||||
s32 osFlashAllErase(void);
|
||||
s32 osFlashSectorErase(u32 pageNum);
|
||||
s32 osFlashWriteBuffer(OSIoMesg* mb, s32 priority, void* dramAddr, OSMesgQueue* mq);
|
||||
s32 osFlashWriteArray(u32 pageNum);
|
||||
s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u32 pageCount, OSMesgQueue* mq);
|
||||
void osFlashChange(u32 flashNum);
|
||||
void osFlashAllEraseThrough(void);
|
||||
void osFlashSectorEraseThrough(u32 pageNum);
|
||||
s32 osFlashCheckEraseEnd(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef PR_OS_HOST_H
|
||||
#define PR_OS_HOST_H
|
||||
|
||||
void __osInitialize_common(void);
|
||||
void __osInitialize_autodetect(void);
|
||||
|
||||
#define osInitialize() __osInitialize_common()
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,10 @@
|
||||
#ifndef _OS_INTERNAL_H_
|
||||
#define _OS_INTERNAL_H_
|
||||
#ifndef PR_OS_INTERNAL_H
|
||||
#define PR_OS_INTERNAL_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "os_message.h"
|
||||
#include "os_pi.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSMesgQueue* queue;
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef PR_OS_INTERNAL_ERROR_H
|
||||
#define PR_OS_INTERNAL_ERROR_H
|
||||
|
||||
#include "os_thread.h"
|
||||
|
||||
|
||||
OSThread* __osGetCurrFaultedThread(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef PR_OS_INTERNAL_REG
|
||||
#define PR_OS_INTERNAL_REG
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "os_exception.h"
|
||||
|
||||
|
||||
u32 __osGetCause(void);
|
||||
void __osSetCause(u32);
|
||||
u32 __osGetCompare(void);
|
||||
void __osSetCompare(u32 value);
|
||||
u32 __osGetConfig(void);
|
||||
void __osSetConfig(u32);
|
||||
u32 __osGetSR(void);
|
||||
void __osSetSR(u32 value);
|
||||
OSIntMask __osDisableInt(void);
|
||||
void __osRestoreInt(OSIntMask im);
|
||||
u32 __osGetWatchLo(void);
|
||||
void __osSetWatchLo(u32 value);
|
||||
|
||||
u32 __osSetFpcCsr(u32 value);
|
||||
u32 __osGetFpcCsr(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef PR_OS_INTERNAL_SI_H
|
||||
#define PR_OS_INTERNAL_SI_H
|
||||
|
||||
#include "ultratypes.h"
|
||||
#include "libc/stdint.h"
|
||||
|
||||
|
||||
s32 __osSiRawWriteIo(uintptr_t devAddr, u32 data);
|
||||
s32 __osSiRawReadIo(uintptr_t devAddr, u32* data);
|
||||
s32 __osSiRawStartDma(s32 direction, void* dramAddr);
|
||||
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user