1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00
GLideN64/src/RSP.h

53 lines
1.4 KiB
C
Raw Normal View History

#ifndef RSP_H
#define RSP_H
#include "Types.h"
2015-11-23 13:27:16 +00:00
#include "N64.h"
2022-01-16 17:27:17 +00:00
#define MAX_SEGMENTS 16
typedef struct
{
2022-01-16 17:27:17 +00:00
word PC[18], PCi;
word F5DL[10];
word uc_start, uc_dstart, cmd, nextCmd;
Gwords words;
s32 count;
bool busy, halt, infloop;
bool LLE;
2022-01-16 17:27:17 +00:00
#ifdef NATIVE
bool translateSegment;
#endif
2014-10-17 04:49:22 +00:00
char romname[21];
wchar_t pluginpath[PLUGIN_PATH_SIZE];
} RSPInfo;
extern RSPInfo RSP;
extern u32 DepthClearColor;
extern u32 rectDepthBufferCopyFrame;
2022-01-16 17:27:17 +00:00
#ifdef NATIVE
//#define RSP_SegmentToPhysical( segaddr ) ((segaddr < (16 << 24)) ? ((gSP.segment[(segaddr >> 24) & 0x0F] + segaddr)) : segaddr)
//#define RSP_SegmentToPhysical( segaddr ) ((RSP_SegmentToPhysical2(segaddr) & 0x00FFFF00) != 0 ? segaddr : ((gSP.segment[(segaddr >> 24) & 0x0F] + segaddr)))
//#define RSP_SegmentToPhysical(segaddr) (segaddr)
word RSP_SegmentToPhysical(word segaddr);
#define SEGMENT_MASK(addr) (addr)
#else
#define SEGMENT_MASK(addr) (addr & 0x00FFFFFF)
#define RSP_SegmentToPhysical( segaddr ) ((gSP.segment[(segaddr >> 24) & 0x0F] + (segaddr & RDRAMSize)) & RDRAMSize)
2022-01-16 17:27:17 +00:00
#endif
void RSP_Init(const char* romName = nullptr);
2022-01-16 17:27:17 +00:00
void RSP_ProcessDList(void* displayList, word displayListLength, void* uc_start, void* uc_dstart, word uc_dsize, u32 matrixStackSize = 0, void* ZSortBOSS_pc = nullptr);
void RSP_ProcessDList();
2022-01-16 17:27:17 +00:00
void RSP_LoadMatrix( f32 mtx[4][4], word address );
void RSP_CheckDLCounter();
#endif