diff options
Diffstat (limited to 'src/emu/cheat.c')
| -rw-r--r-- | src/emu/cheat.c | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c index 1169cdb34e5..608c8a16911 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -116,15 +116,15 @@ enum /* cpu/region field */ DEFINE_BITFIELD_ENUM(CPUIndex, 0, 3), DEFINE_BITFIELD_ENUM(AddressSpace, 4, 6), -// DEFINE_BITFIELD_ENUM(RegionIndex, 0, 6), /* unused ??? */ +// DEFINE_BITFIELD_ENUM(RegionIndex, 0, 6), /* unused ??? */ /* old code */ -// DEFINE_BITFIELD_ENUM(OneShot, 0, 0), /* = OneShot in new format */ +// DEFINE_BITFIELD_ENUM(OneShot, 0, 0), /* = OneShot in new format */ DEFINE_BITFIELD_ENUM(Type, 1, 2), DEFINE_BITFIELD_ENUM(Operation, 3, 4), DEFINE_BITFIELD_ENUM(TypeParameter, 5, 7), - DEFINE_BITFIELD_ENUM(UserSelectEnable, 8, 8), - DEFINE_BITFIELD_ENUM(UserSelectMinimumDisplay, 9, 9), + DEFINE_BITFIELD_ENUM(UserSelectEnable, 8, 8), + DEFINE_BITFIELD_ENUM(UserSelectMinimumDisplay, 9, 9), DEFINE_BITFIELD_ENUM(UserSelectMinimum, 10, 10), DEFINE_BITFIELD_ENUM(UserSelectBCD, 11, 11), DEFINE_BITFIELD_ENUM(Prefill, 12, 13), @@ -402,7 +402,7 @@ enum // entry flags kCheatFlag_HasWrongCode = 1 << 13, /* true if the cheat has been edited or is a new cheat - checked at auto-save then save the code if true */ + checked at auto-save then save the code if true */ kCheatFlag_Dirty = 1 << 14, /* masks */ @@ -1062,16 +1062,16 @@ static const UINT32 kIncrementDecTable[] = static const char *const kRegionNames[] = { "INVALID", - "CPU1", "CPU2", "CPU3", "CPU4", "CPU5", "CPU6", "CPU7", "CPU8", // 01-08 [01-08] : CPU - "GFX1", "GFX2", "GFX3", "GFX4", "GFX5", "GFX6", "GFX7", "GFX8", // 09-16 [08-10] : GFX - "PROMS", // 17 [11] : PROMS - "SOUND1", "SOUND2", "SOUND3", "SOUND4", "SOUND5", "SOUND6", "SOUND7", "SOUND8", // 18-25 [12-19] : SOUND - "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8", // 26-45 [1A-2D] : USER + "CPU1", "CPU2", "CPU3", "CPU4", "CPU5", "CPU6", "CPU7", "CPU8", // 01-08 [01-08] : CPU + "GFX1", "GFX2", "GFX3", "GFX4", "GFX5", "GFX6", "GFX7", "GFX8", // 09-16 [08-10] : GFX + "PROMS", // 17 [11] : PROMS + "SOUND1", "SOUND2", "SOUND3", "SOUND4", "SOUND5", "SOUND6", "SOUND7", "SOUND8", // 18-25 [12-19] : SOUND + "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8", // 26-45 [1A-2D] : USER /* USER9 - PLDS are undefined in old format */ "USER9", "USER10", "USER11", "USER12", "USER13", "USER14", "USER15", "USER16", "USER17", "USER18", "USER19", "USER20", - "DISKS", // 46 [2E] : DISKS - "PLDS" }; // 47 [2F] : PLDS + "DISKS", // 46 [2E] : DISKS + "PLDS" }; // 47 [2F] : PLDS static const char *const kNumbersTable[] = { "0", "1", "2", "3", "4", "5", "6", "7", @@ -1458,12 +1458,12 @@ static int ShiftKeyPressed(void) { return (input_code_pressed(KEYCODE_LSHIFT) || input_code_pressed(KEYCODE_RSHIFT)); } - + static int ControlKeyPressed(void) { return (input_code_pressed(KEYCODE_LCONTROL) || input_code_pressed(KEYCODE_RCONTROL)); } - + static int AltKeyPressed(void) { return (input_code_pressed(KEYCODE_LALT) || input_code_pressed(KEYCODE_RALT)); @@ -4695,31 +4695,31 @@ static int edit_cheat_menu(running_machine *machine, cheat_menu_stack *menu) switch(info->fieldType) { -/* case kType_ActivationKey1: - case kType_ActivationKey2: - if(info->fieldType == kType_ActivationKey1) - { - entry->activationKey1--; - - if(entry->activationKey1 < 0) - entry->activationKey1 = __code_max - 1; - if(entry->activationKey1 >= __code_max) - entry->activationKey1 = 0; - - entry->flags |= kCheatFlag_HasActivationKey1; - } - else - { - entry->activationKey2--; - - if(entry->activationKey2 < 0) - entry->activationKey2 = __code_max - 1; - if(entry->activationKey2 >= __code_max) - entry->activationKey2 = 0; - - entry->flags |= kCheatFlag_HasActivationKey2; - } - break; +/* case kType_ActivationKey1: + case kType_ActivationKey2: + if(info->fieldType == kType_ActivationKey1) + { + entry->activationKey1--; + + if(entry->activationKey1 < 0) + entry->activationKey1 = __code_max - 1; + if(entry->activationKey1 >= __code_max) + entry->activationKey1 = 0; + + entry->flags |= kCheatFlag_HasActivationKey1; + } + else + { + entry->activationKey2--; + + if(entry->activationKey2 < 0) + entry->activationKey2 = __code_max - 1; + if(entry->activationKey2 >= __code_max) + entry->activationKey2 = 0; + + entry->flags |= kCheatFlag_HasActivationKey2; + } + break; */ case kType_Link: TOGGLE_MASK_FIELD(action->type, LinkEnable); @@ -4995,31 +4995,31 @@ static int edit_cheat_menu(running_machine *machine, cheat_menu_stack *menu) switch(info->fieldType) { -/* case kType_ActivationKey1: - case kType_ActivationKey2: - if(info->fieldType == kType_ActivationKey1) - { - entry->activationKey1++; - - if(entry->activationKey1 < 0) - entry->activationKey1 = __code_max - 1; - if(entry->activationKey1 >= __code_max) - entry->activationKey1 = 0; - - entry->flags |= kCheatFlag_HasActivationKey1; - } - else - { - entry->activationKey2++; - - if(entry->activationKey2 < 0) - entry->activationKey2 = __code_max - 1; - if(entry->activationKey2 >= __code_max) - entry->activationKey2 = 0; - - entry->flags |= kCheatFlag_HasActivationKey2; - } - break; +/* case kType_ActivationKey1: + case kType_ActivationKey2: + if(info->fieldType == kType_ActivationKey1) + { + entry->activationKey1++; + + if(entry->activationKey1 < 0) + entry->activationKey1 = __code_max - 1; + if(entry->activationKey1 >= __code_max) + entry->activationKey1 = 0; + + entry->flags |= kCheatFlag_HasActivationKey1; + } + else + { + entry->activationKey2++; + + if(entry->activationKey2 < 0) + entry->activationKey2 = __code_max - 1; + if(entry->activationKey2 >= __code_max) + entry->activationKey2 = 0; + + entry->flags |= kCheatFlag_HasActivationKey2; + } + break; */ case kType_Link: TOGGLE_MASK_FIELD(action->type, LinkEnable); @@ -6232,8 +6232,8 @@ static int search_minimum_menu(running_machine *machine, cheat_menu_stack *menu) const char * menuSubItem[kMenu_Max + 1] = { 0 }; char flagBuf[kMenu_Max + 1] = { 0 }; char cpuBuf[4]; - char valueBuf[32]; // "FFFFFFF[F] (4294967295)" 23 chars - char timerBuf[32]; // "-FFFFFFF[F] (4294967295)" 24 chars + char valueBuf[32]; // "FFFFFFF[F] (4294967295)" 23 chars + char timerBuf[32]; // "-FFFFFFF[F] (4294967295)" 24 chars char numResultsBuf[16]; char * stringsBuf; search_info *search = get_current_search(); @@ -7835,7 +7835,7 @@ static int select_search_region_menu(running_machine *machine, cheat_menu_stack else { - /* in case of no search region */ + /* in case of no search region */ menu_item[total] = "No Search Region"; menu_sub_item[total++] = NULL; } @@ -8356,7 +8356,7 @@ static int choose_watch_menu(running_machine *machine, cheat_menu_stack *menu) UINT8 total = 0; const char ** menuItem; char ** buf; - char * stringsBuf; // "USER20 FFFFFFFF (99:32 Bit)" 27 chars + char * stringsBuf; // "USER20 FFFFFFFF (99:32 Bit)" 27 chars watch_info *watch; /* first setting : NONE */ @@ -10455,7 +10455,7 @@ static void resize_cheat_action_list(cheat_entry *entry, UINT32 new_length, UINT #if 0 /*---------------------------------------------------------------- AddActionBefore - Insert empty Action - This function is only called in EditCheat() + This function is only called in EditCheat() ----------------------------------------------------------------*/ static void AddActionBefore(CheatEntry * entry, UINT32 idx) @@ -10973,7 +10973,7 @@ static UINT32 read_region_data(search_region *region, UINT32 offset, UINT8 size, UINT8 * buf = (UINT8 *)region->cached_pointer; if(buf) -/* return DoMemoryRead(region->cached_pointer, address, size, swap, &raw_cpu_info); */ +/* return DoMemoryRead(region->cached_pointer, address, size, swap, &raw_cpu_info); */ return DoMemoryRead(buf, address, size, cpu_needs_swap(region->target_idx) ^ swap, get_cpu_info(region->target_idx)); else return 0; @@ -14982,7 +14982,7 @@ static void BuildLabelIndexTable(cheat_entry *entry) //logerror("Cheat - Finish building index table for %s (length = %x)\n", entry->name, entry->label_index_length); //for(i = 0; i < entry->label_index_length; i++) - // logerror("IndexTable[%x] = %x\n",i,entry->label_index[i]); + // logerror("IndexTable[%x] = %x\n",i,entry->label_index[i]); } |
