49static inline void probeReset(
void) {
52 for (
unsigned i = 0;
i < 7;
i++) {
76 setDisplayMode(&config);
77 setHorizontalRange(0, 0xa00);
78 setVerticalRange(16, 255);
80 setDrawingArea(0, 0, 320, 240);
98static inline void resetCommandBuffer(
void) {
sendGPUStatus(0x01000000); }
108static inline void gpuFullResetWithGate(
uint32_t gate_value) {
123static inline int copyWidthEff(
int w) {
return (((w - 1) & 0x3ff) + 1); }
124static inline int copyHeightEff(
int h) {
return (((h - 1) & 0x1ff) + 1); }
129static inline int fastFillHeightEff(
int h) {
145static inline void writePixel(int16_t x, int16_t y, uint16_t
value) {
157static inline uint16_t readPixel(int16_t x, int16_t y) {
165 return (uint16_t)(word & 0xffff);
171static inline void readStrip(int16_t x, int16_t y, int16_t w, uint16_t* dst) {
176 int words = (w + 1) >> 1;
177 for (
int i = 0;
i < words;
i++) {
181 dst[
i * 2] = (uint16_t)(word & 0xffff);
182 if (
i * 2 + 1 < w) dst[
i * 2 + 1] = (uint16_t)(word >> 16);
190static inline void streamPace(
int idx) {
191 if ((idx & 7) == 0) {
202static inline void fillRectViaUpload(int16_t x, int16_t y, int16_t w, int16_t h,
209 int words = ((
int)w * (
int)h) >> 1;
210 for (
int i = 0;
i < words;
i++) {
220static inline void fillColumn(int16_t x, int16_t w, uint16_t
value) {
221 fillRectViaUpload(x, 0, w, 256,
value);
222 fillRectViaUpload(x, 256, w, 256,
value);
223 fillRectViaUpload(x, 512, w, 256,
value);
224 fillRectViaUpload(x, 768, w, 256,
value);
229static inline uint32_t hashRow(
const uint16_t* row,
int n) {
231 for (
int i = 0;
i <
n;
i++) {
254#define PROBE_PASS(stats, fmt, ...) \
257 ramsyscall_printf("PASS " fmt "\n", ##__VA_ARGS__); \
260#define PROBE_FAIL(stats, fmt, ...) \
263 ramsyscall_printf("FAIL " fmt "\n", ##__VA_ARGS__); \
266#define PROBE_INFO(stats, fmt, ...) \
269 ramsyscall_printf("INFO " fmt "\n", ##__VA_ARGS__); \
272#define PROBE_RESULT(fmt, ...) \
274 ramsyscall_printf("RESULT " fmt "\n", ##__VA_ARGS__); \
277static inline void probeStatsSummary(
const ProbeStats*
s,
const char* name) {
uint32_t dicr
Definition cester-cop0.c:98
@ VM_NTSC
Definition gpu.h:47
@ HRE_NORMAL
Definition gpu.h:62
@ VR_240
Definition gpu.h:42
@ HR_320
Definition gpu.h:36
@ VI_OFF
Definition gpu.h:57
@ CD_15BITS
Definition gpu.h:52
int n
Definition dcache.c:225
ramsyscall_printf("=== e01_kseg1_reads_no_fill ===\n")
#define DMA_CTRL
Definition dma.h:36
int i
Definition gte-regio.c:287
#define DPCR
Definition hwregs.h:49
#define GPU_DATA
Definition hwregs.h:52
#define IMASK
Definition hwregs.h:47
#define GPU_STATUS
Definition hwregs.h:53
#define DICR
Definition hwregs.h:50
#define IREG
Definition hwregs.h:46
char * s
Definition string.c:48
enum HResolution hResolution
Definition gpu.h:67
Definition probe-common.h:242
int passed
Definition probe-common.h:243
int info
Definition probe-common.h:245
int failed
Definition probe-common.h:244
static int value
Definition syscalls.h:534
void uint32_t(classId, spec)