| 318 | } |
| 319 | |
| 320 | static void AddCheatParam(uint32 A, uint8 V) |
| 321 | { |
| 322 | char name[256]; |
| 323 | |
| 324 | printf("Name: "); |
| 325 | GetString(name,256); |
| 326 | printf("Address [$%04x]: ",(unsigned int)A); |
| 327 | A=GetH16(A); |
| 328 | printf("Value [%03u]: ",(unsigned int)V); |
| 329 | V=Get8(V); |
| 330 | printf("Add cheat \"%s\" for address $%04x with value %03u?",name,(unsigned int)A,(unsigned int)V); |
| 331 | if(GetYN(0)) |
| 332 | { |
| 333 | if(FCEUI_AddCheat(name,A,V,-1,0)) |
| 334 | puts("Cheat added."); |
| 335 | else |
| 336 | puts("Error adding cheat."); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | static void AddCheat(void) |
| 341 | { |