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