src/emu/ui.c
| r14263 | r14264 | |
| 1027 | 1027 | |
| 1028 | 1028 | /* loop over all CPUs */ |
| 1029 | 1029 | execute_interface_iterator execiter(machine.root_device()); |
| 1030 | tagmap_t<UINT8> exectags; |
| 1030 | 1031 | for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next()) |
| 1031 | 1032 | { |
| 1033 | if (exectags.add(exec->device().tag(), 1, FALSE) == TMERR_DUPLICATE) |
| 1034 | continue; |
| 1032 | 1035 | /* get cpu specific clock that takes internal multiplier/dividers into account */ |
| 1033 | 1036 | int clock = exec->device().clock(); |
| 1034 | 1037 | |
| 1035 | 1038 | /* count how many identical CPUs we have */ |
| 1036 | 1039 | int count = 1; |
| 1037 | | for (device_execute_interface *scan = execiter.next(); scan != NULL; scan = execiter.next()) |
| 1040 | execute_interface_iterator execinneriter(machine.root_device()); |
| 1041 | for (device_execute_interface *scan = execinneriter.first(); scan != NULL; scan = execinneriter.next()) |
| 1038 | 1042 | { |
| 1039 | | if (exec->device().type() != scan->device().type() || exec->device().clock() != scan->device().clock()) |
| 1040 | | break; |
| 1041 | | count++; |
| 1042 | | exec = scan; |
| 1043 | if (exec->device().type() == scan->device().type() && exec->device().clock() == scan->device().clock()) |
| 1044 | if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE) |
| 1045 | count++; |
| 1043 | 1046 | } |
| 1044 | | execiter.set_current(*exec); |
| 1045 | 1047 | |
| 1046 | 1048 | /* if more than one, prepend a #x in front of the CPU name */ |
| 1047 | 1049 | if (count > 1) |
| r14263 | r14264 | |
| 1057 | 1059 | |
| 1058 | 1060 | /* loop over all sound chips */ |
| 1059 | 1061 | sound_interface_iterator snditer(machine.root_device()); |
| 1062 | tagmap_t<UINT8> soundtags; |
| 1060 | 1063 | for (device_sound_interface *sound = snditer.first(); sound != NULL; sound = snditer.next()) |
| 1061 | 1064 | { |
| 1065 | if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE) |
| 1066 | continue; |
| 1067 | |
| 1062 | 1068 | /* append the Sound: string */ |
| 1063 | 1069 | if (!found_sound) |
| 1064 | 1070 | string.cat("\nSound:\n"); |
| r14263 | r14264 | |
| 1066 | 1072 | |
| 1067 | 1073 | /* count how many identical sound chips we have */ |
| 1068 | 1074 | int count = 1; |
| 1069 | | for (device_sound_interface *scan = snditer.next(); scan != NULL; scan = snditer.next()) |
| 1075 | sound_interface_iterator sndinneriter(machine.root_device()); |
| 1076 | for (device_sound_interface *scan = sndinneriter.first(); scan != NULL; scan = sndinneriter.next()) |
| 1070 | 1077 | { |
| 1071 | | if (sound->device().type() != scan->device().type() || sound->device().clock() != scan->device().clock()) |
| 1072 | | break; |
| 1073 | | count++; |
| 1074 | | sound = scan; |
| 1078 | if (sound->device().type() == scan->device().type() && sound->device().clock() == scan->device().clock()) |
| 1079 | if (soundtags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE) |
| 1080 | count++; |
| 1075 | 1081 | } |
| 1076 | | snditer.set_current(*sound); |
| 1077 | | |
| 1078 | 1082 | /* if more than one, prepend a #x in front of the CPU name */ |
| 1079 | 1083 | if (count > 1) |
| 1080 | 1084 | string.catprintf("%d" UTF8_MULTIPLY, count); |