error.c 817 Bytes
#include <ultra64.h>
#include <assert.h>
#include "main.h"

void errorReport1(u32 error_addr, u32 expect, u32 accept)
{
  SOAKPRINTF("Rdram test failed at %04x\n", error_addr);
  SOAKPRINTF("     expect: %04x  accept: %04x  xor: %04x\n", expect, accept, expect ^accept);
}

void errorReport2(u32 trig_addr, u32 trig_value, u32 error_addr, u32 expect, u32 accept)
{
  SOAKPRINTF("Rdram test failed at %04x when writing %04x at %04x\n", 
	     error_addr, trig_value, trig_addr);
  SOAKPRINTF("     trig_adr: %04x  error_adr: %04x  xor: %04x\n", 
	     trig_addr, error_addr, trig_addr^error_addr);
  SOAKPRINTF("     expect:   %04x  accept:    %04x  xor: %04x\n", 
	     expect, accept, expect ^ accept);
  SOAKPRINTF("     trig_val: %04x  accept: %04x  xor: %04x\n",
	     trig_value, accept, trig_value^accept);
}