LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
xe_internal.h
Go to the documentation of this file.
1#ifndef __xe_internal_h
2#define __xe_internal_h
3
4static inline int FLOAT(float f)
5{
6 union {
7 float f;
8 u32 d;
9 } u = {f};
10
11 return u.d;
12}
13
14#define rput32(d) *(volatile u32*)(xe->rb_secondary + xe->rb_secondary_wptr++ * 4) = (d);
15#define rput(base, len) memcpy(((void*)xe->rb_secondary) + xe->rb_secondary_wptr * 4, (base), (len) * 4); xe->rb_secondary_wptr += (len);
16#define rput32p(d) do { *(volatile u32*)(xe->rb_primary + xe->rb_primary_wptr++ * 4) = d; if (xe->rb_primary_wptr == RINGBUFFER_PRIMARY_SIZE) xe->rb_primary_wptr = 0; } while (0)
17
18#define rputf(d) rput32(FLOAT(d));
19
20#define r32(o) xe->regs[(o)/4]
21#define w32(o, v) xe->regs[(o)/4] = (v)
22
23void Xe_pSyncToDevice(struct XenosDevice *xe, volatile void *data, int len);
24void Xe_pSyncFromDevice(struct XenosDevice *xe, volatile void *data, int len);
25void *Xe_pAlloc(struct XenosDevice *xe, u32 *phys, int size, int align);
26void Xe_pDebugSync(struct XenosDevice *xe);
27void Xe_pSetState(struct XenosDevice *xe);
28
29#endif
u32 size
Definition: iso9660.c:537
void Xe_pDebugSync(struct XenosDevice *xe)
Definition: xe.c:1284
void * Xe_pAlloc(struct XenosDevice *xe, u32 *phys, int size, int align)
Definition: xe.c:62
void Xe_pSetState(struct XenosDevice *xe)
Definition: xe.c:1688
void Xe_pSyncToDevice(struct XenosDevice *xe, volatile void *data, int len)
Definition: xe.c:52
void Xe_pSyncFromDevice(struct XenosDevice *xe, volatile void *data, int len)
Definition: xe.c:57
union @15 data
uint32_t u32
32bit unsigned integer
Definition: xetypes.h:14