debuggerBreakOnWrite(address, *address, value, 2); CPU_BREAK_LOOP; *address = value; return;
int type = cheatsGetType(address); u32 oldValue = debuggerReadMemory(address); if(type == 1 || (type == 2 && oldValue != value)) { debuggerBreakOnWrite(address, oldValue, value, 2, type); cpuNextEvent = 0; } debuggerWriteMemory(address, value);
void cheatsWriteMemory(u32 *address, u32 value, u32 mask){#ifdef BKPT_SUPPORT#ifdef SDL  if(cheatsNumber == 0) {    debuggerBreakOnWrite(address, *address, value, 2);    CPU_BREAK_LOOP;    *address = value;    return;  }#endif#endif}