50static inline void probeReset(
void) {
53 for (
unsigned i = 0;
i < 7;
i++) {
77 setDisplayMode(&config);
78 setHorizontalRange(0, 0xa00);
79 setVerticalRange(16, 255);
81 setDrawingArea(0, 0, 320, 240);
99static inline void resetCommandBuffer(
void) {
sendGPUStatus(0x01000000); }
109static inline void gpuFullResetWithGate(uint32_t gate_value) {
124static inline int copyWidthEff(
int w) {
return (((w - 1) & 0x3ff) + 1); }
125static inline int copyHeightEff(
int h) {
return (((h - 1) & 0x1ff) + 1); }
130static inline int fastFillHeightEff(
int h) {
146static inline void writePixel(int16_t x, int16_t y, uint16_t
value) {
149 GPU_DATA = ((uint32_t)(uint16_t)y << 16) | (uint32_t)(uint16_t)x;
150 GPU_DATA = ((uint32_t)(uint16_t)1 << 16) | (uint32_t)(uint16_t)2;
158static inline uint16_t readPixel(int16_t x, int16_t y) {
161 GPU_DATA = ((uint32_t)(uint16_t)y << 16) | (uint32_t)(uint16_t)x;
162 GPU_DATA = ((uint32_t)(uint16_t)1 << 16) | (uint32_t)(uint16_t)2;
166 return (uint16_t)(word & 0xffff);
172static inline void readStrip(int16_t x, int16_t y, int16_t w, uint16_t* dst) {
175 GPU_DATA = ((uint32_t)(uint16_t)y << 16) | (uint32_t)(uint16_t)x;
176 GPU_DATA = ((uint32_t)(uint16_t)1 << 16) | (uint32_t)(uint16_t)w;
182 dst[
i * 2] = (uint16_t)(word & 0xffff);
183 if (
i * 2 + 1 < w) dst[
i * 2 + 1] = (uint16_t)(word >> 16);
191static inline void streamPace(
int idx) {
192 if ((idx & 7) == 0) {
203static inline void fillRectViaUpload(int16_t x, int16_t y, int16_t w, int16_t h,
207 GPU_DATA = ((uint32_t)(uint16_t)y << 16) | (uint32_t)(uint16_t)x;
208 GPU_DATA = ((uint32_t)(uint16_t)h << 16) | (uint32_t)(uint16_t)w;
209 uint32_t doubled = (uint32_t)
value | ((uint32_t)
value << 16);
210 int words = ((int)w * (
int)h) >> 1;
221static inline void fillColumn(int16_t x, int16_t w, uint16_t
value) {
222 fillRectViaUpload(x, 0, w, 256,
value);
223 fillRectViaUpload(x, 256, w, 256,
value);
224 fillRectViaUpload(x, 512, w, 256,
value);
225 fillRectViaUpload(x, 768, w, 256,
value);
230static inline uint32_t hashRow(
const uint16_t* row,
int n) {
231 uint32_t h = 0x811c9dc5u;
232 for (
int i = 0;
i <
n;
i++) {
255#define PROBE_PASS(stats, fmt, ...) \
258 ramsyscall_printf("PASS " fmt "\n", ##__VA_ARGS__); \
261#define PROBE_FAIL(stats, fmt, ...) \
264 ramsyscall_printf("FAIL " fmt "\n", ##__VA_ARGS__); \
267#define PROBE_INFO(stats, fmt, ...) \
270 ramsyscall_printf("INFO " fmt "\n", ##__VA_ARGS__); \
273#define PROBE_RESULT(fmt, ...) \
275 ramsyscall_printf("RESULT " fmt "\n", ##__VA_ARGS__); \
278static inline void probeStatsSummary(
const ProbeStats*
s,
const char* name) {
289 if (pcsx_present()) pcsx_exit(
s->failed > 0 ? 1 : 0);
uint32_t dicr
Definition cdlreadn.c:178
ramsyscall_printf("T21 phase=%s t=%u v=%02x cause=%u size=%u stat=%02x\n", phase, t/1000, response[0], cause, size,(nopCause==3 &&nopSize >=1) ? stat[0] :0xff)
@ 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
#define DMA_CTRL
Definition dma.h:36
int i
Definition gte-regio.c:299
#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
list w
Definition gentable.py:108
n
Definition gentable.py:95
list words
Definition mktest.py:123
char * s
Definition string.c:48
enum HResolution hResolution
Definition gpu.h:67
Definition probe-common.h:243
int passed
Definition probe-common.h:244
int info
Definition probe-common.h:246
int failed
Definition probe-common.h:245
static int value
Definition syscalls.h:553