Previous 199869 Revisions Next

r35216 Sunday 22nd February, 2015 at 16:37:46 UTC by Couriersud
Fix 32bit build of sdlmame on Win32. (nw)
[src/emu/bus/gamegear]ggext.c ggext.h smsctrladp.h
[src/emu/bus/sega8]sega8_slot.c
[src/emu/bus/sms_ctrl]lphaser.c
[src/emu/debug]dvbpoints.c dvbpoints.h dvwpoints.c dvwpoints.h
[src/emu/video]315_5124.c 315_5124.h
[src/mame/drivers]bfm_sc1.c mpu4avan.c mpu4bwb.c mpu4concept.c mpu4crystal.c mpu4empire.c mpu4mdm.c mpu4misc.c mpu4mod2sw.c mpu4plasma.c mpu4sw.c mpu4union.c sumt8035.c vaportra.c wms.c
[src/mess/includes]sms.h
[src/mess/machine]sms.c
[src/osd/modules/debugger/osx]breakpointsview.m consoleview.m debugview.h debugview.m debugwindowhandler.m disassemblyview.m errorlogview.m memoryview.m registersview.m watchpointsview.m
[src/osd/sdl]sdl.mak

trunk/src/emu/bus/gamegear/ggext.c
r243727r243728
11/**********************************************************************
22
33    Sega Game Gear EXT port emulation
4    Also known as Gear-to-Gear (or VS, in Japan) cable connector
54
65    Copyright MESS Team.
76    Visit http://mamedev.org for licensing and usage restrictions.
trunk/src/emu/bus/gamegear/ggext.h
r243727r243728
11/**********************************************************************
22
33    Sega Game Gear EXT port emulation
4    Also known as Gear-to-Gear (or VS, in Japan) cable connector
54
65    Copyright MESS Team.
76    Visit http://mamedev.org for licensing and usage restrictions.
trunk/src/emu/bus/gamegear/smsctrladp.h
r243727r243728
1616
1717#include "emu.h"
1818#include "ggext.h"
19#include "bus/sms_ctrl/smsctrl.h"
19#include "../sms_ctrl/smsctrl.h"
2020
2121
2222
trunk/src/emu/bus/sega8/sega8_slot.c
r243727r243728
253253   {
254254      if (!memcmp(&rom[0x7ff0], signatures[0], 16) || !memcmp(&rom[0x7ff0], signatures[1], 16))
255255         xoff = 26;
256      else if (!memcmp(&rom[0x7ff0], signatures[2], 16))
256
257      if (!memcmp(&rom[0x7ff0], signatures[2], 16))
257258         xoff = 36;
258      else if (!memcmp(&rom[0x7ff0], signatures[3], 16))
259
260      if (!memcmp(&rom[0x7ff0], signatures[3], 16))
259261         xoff = 32;
260      else if (!memcmp(&rom[0x7ff0], signatures[4], 16))
262
263      if (!memcmp(&rom[0x7ff0], signatures[4], 16))
261264         xoff = 30;
262      else if (!memcmp(&rom[0x7ff0], signatures[5], 16))
265
266      if (!memcmp(&rom[0x7ff0], signatures[5], 16))
263267         xoff = 39;
264      else if (!memcmp(&rom[0x7ff0], signatures[6], 16))
268
269      if (!memcmp(&rom[0x7ff0], signatures[6], 16))
265270         xoff = 38;
266271   }
267272
trunk/src/emu/bus/sms_ctrl/lphaser.c
r243727r243728
137137{
138138   const int r_x_r = LGUN_RADIUS * LGUN_RADIUS;
139139   const rectangle &visarea = m_screen->visible_area();
140   rectangle aim_area;
141140   int beam_x = m_screen->hpos();
142141   int beam_y = m_screen->vpos();
143   int beam_x_orig = beam_x;
144   int beam_y_orig = beam_y;
145   int dy, result = 1;
142   int dx, dy;
143   int result = 1;
144   int pos_changed = 0;
146145   double dx_radius;
147   bool new_check_point = false;
148146
149   aim_area.min_y = MAX(lgun_y - LGUN_RADIUS, visarea.min_y);
150   aim_area.max_y = MIN(lgun_y + LGUN_RADIUS, visarea.max_y);
151
152   while (!new_check_point)
147   while (1)
153148   {
154      /* If beam's y doesn't point to a line where the aim area is,
155         change it to the first line where the beam enters that area. */
156      if (beam_y < aim_area.min_y || beam_y > aim_area.max_y)
149      /* If beam's y isn't at a line where the aim area is, change it
150         the next line it enters that area. */
151      dy = abs(beam_y - lgun_y);
152      if (dy > LGUN_RADIUS || beam_y < visarea.min_y || beam_y > visarea.max_y)
157153      {
158         beam_y = aim_area.min_y;
154         beam_y = lgun_y - LGUN_RADIUS;
155         if (beam_y < visarea.min_y)
156            beam_y = visarea.min_y;
157         dy = abs(beam_y - lgun_y);
158         pos_changed = 1;
159159      }
160      dy = abs(beam_y - lgun_y);
161160
162161      /* Caculate distance in x of the radius, relative to beam's y distance.
163162         First try some shortcuts. */
r243727r243728
176175         dx_radius = ceil((float) sqrt((float) (r_x_r - (dy * dy))));
177176      }
178177
179      aim_area.min_x = MAX(lgun_x - dx_radius, visarea.min_x);
180      aim_area.max_x = MIN(lgun_x + dx_radius, visarea.max_x);
181
182      while (!new_check_point)
178      /* If beam's x isn't in the circular aim area, change it
179         to the next point it enters that area. */
180      dx = abs(beam_x - lgun_x);
181      if (dx > dx_radius || beam_x < visarea.min_x || beam_x > visarea.max_x)
183182      {
184         /* If beam's x has passed the aim area, change it to the
185            next line and go back to recheck y/x coordinates. */
186         if (beam_x > aim_area.max_x)
183         /* If beam's x has passed the aim area, advance to
184            next line and recheck y/x coordinates. */
185         if (beam_x > lgun_x)
187186         {
188            beam_x = visarea.min_x;
187            beam_x = 0;
189188            beam_y++;
190            break;
189            continue;
191190         }
191         beam_x = lgun_x - dx_radius;
192         if (beam_x < visarea.min_x)
193            beam_x = visarea.min_x;
194         pos_changed = 1;
195      }
192196
193         /* If beam's x isn't in the aim area, change it to the
194            next point where the beam enters that area. */
195         if (beam_x < aim_area.min_x)
196         {
197            beam_x = aim_area.min_x;
198         }
197      if (pos_changed)
198         break;
199199
200         if (beam_x_orig != beam_x || beam_y_orig != beam_y)
201         {
202            /* adopt the new coordinates to adjust the timer */
203            new_check_point = true;
204            break;
205         }
200      if (m_sensor_last_state == 0) /* sensor is on */
201      {
202         /* keep sensor on until out of the aim area */
203         result = 0;
204      }
205      else
206      {
207         rgb_t color;
208         UINT8 brightness;
209         /* brightness of the lightgray color in the frame drawn by Light Phaser games */
210         const UINT8 sensor_min_brightness = 0x7f;
206211
207         if (m_sensor_last_state == 0)
208         {
209            /* sensor is already on */
210            /* keep sensor on until out of the aim area */
211            result = 0;
212         }
213         else
214         {
215            rgb_t color;
216            UINT8 brightness;
217            /* brightness of the lightgray color in the frame drawn by Light Phaser games */
218            const UINT8 sensor_min_brightness = 0x7f;
212         color = m_port->pixel_r();
219213
220            color = m_port->pixel_r();
214         /* reference: http://www.w3.org/TR/AERT#color-contrast */
215         brightness = (color.r() * 0.299) + (color.g() * 0.587) + (color.b() * 0.114);
216         //printf ("color brightness: %2X for x %d y %d\n", brightness, beam_x, beam_y);
221217
222            /* reference: http://www.w3.org/TR/AERT#color-contrast */
223            brightness = (color.r() * 0.299) + (color.g() * 0.587) + (color.b() * 0.114);
224            //printf ("color brightness: %2X for x %d y %d\n", brightness, beam_x, beam_y);
218         result = (brightness >= sensor_min_brightness) ? 0 : 1;
219      }
225220
226            result = (brightness >= sensor_min_brightness) ? 0 : 1;
227         }
228
229         if (result == 0) /* sensor on */
230         {
231            /* Set next check for when sensor will be off */
232            beam_x = aim_area.max_x + 1;
233
234            /* adopt the new coordinates to adjust the timer */
235            new_check_point = true;
236         }
237         else
238         {
239            /* Next check will happen after the minimum interval */
240            beam_x += LGUN_X_INTERVAL;
241         }
221      if (result == 0)
222      {
223         /* Set next check for when sensor will be off */
224         beam_x = lgun_x + dx_radius + 1;
225         if (beam_x > visarea.max_x)
226            beam_x = visarea.max_x + 1;
227         break;
242228      }
229      else
230      {
231         /* Next check after the minimum interval */
232         beam_x += LGUN_X_INTERVAL;
233         pos_changed = 1;
234      }
243235   }
244
245236   timer->adjust(m_screen->time_until_pos(beam_y, beam_x));
237
246238   return result;
247239}
248240
trunk/src/emu/debug/dvbpoints.c
r243727r243728
1313
1414
1515
16// Sorting functors for the qsort function
17static int cIndexAscending(const void* a, const void* b)
18{
19   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
20   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
21   return left->index() - right->index();
22}
23
24static int cIndexDescending(const void* a, const void* b)
25{
26   return cIndexAscending(b, a);
27}
28
29static int cEnabledAscending(const void* a, const void* b)
30{
31   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
32   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
33   return (left->enabled() ? 1 : 0) - (right->enabled() ? 1 : 0);
34}
35
36static int cEnabledDescending(const void* a, const void* b)
37{
38   return cEnabledAscending(b, a);
39}
40
41static int cCpuAscending(const void* a, const void* b)
42{
43   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
44   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
45   return strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
46}
47
48static int cCpuDescending(const void* a, const void* b)
49{
50   return cCpuAscending(b, a);
51}
52
53static int cAddressAscending(const void* a, const void* b)
54{
55   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
56   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
57   return (left->address() > right->address()) ? 1 : (left->address() < right->address()) ? -1 : 0;
58}
59
60static int cAddressDescending(const void* a, const void* b)
61{
62   return cAddressAscending(b, a);
63}
64
65static int cConditionAscending(const void* a, const void* b)
66{
67   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
68   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
69   return strcmp(left->condition(), right->condition());
70}
71
72static int cConditionDescending(const void* a, const void* b)
73{
74   return cConditionAscending(b, a);
75}
76
77static int cActionAscending(const void* a, const void* b)
78{
79   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
80   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
81   return strcmp(left->action(), right->action());
82}
83
84static int cActionDescending(const void* a, const void* b)
85{
86   return cActionAscending(b, a);
87}
88
89
9016//**************************************************************************
9117//  DEBUG VIEW BREAK POINTS
9218//**************************************************************************
r243727r243728
10026
10127debug_view_breakpoints::debug_view_breakpoints(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate)
10228   : debug_view(machine, DVT_BREAK_POINTS, osdupdate, osdprivate),
103      m_sortType(cIndexAscending)
29      m_sortType(SORT_INDEX_ASCENDING)
10430{
10531   // fail if no available sources
10632   enumerate_sources();
10733   if (m_source_list.count() == 0)
10834      throw std::bad_alloc();
35
36   // configure the view
37   m_total.y = 10;
38   m_supports_cursor = false;
10939}
11040
11141
r243727r243728
15383
15484   if (clickedTopRow)
15585   {
156      if (pos.x < tableBreaks[0])
157         m_sortType = (m_sortType == &cIndexAscending) ? &cIndexDescending : &cIndexAscending;
86      if (pos.x < tableBreaks[0] && m_sortType == SORT_INDEX_ASCENDING)
87         m_sortType = SORT_INDEX_DESCENDING;
88      else if (pos.x < tableBreaks[0])
89         m_sortType = SORT_INDEX_ASCENDING;
90      else if (pos.x < tableBreaks[1] && m_sortType == SORT_ENABLED_ASCENDING)
91         m_sortType = SORT_ENABLED_DESCENDING;
15892      else if (pos.x < tableBreaks[1])
159         m_sortType = (m_sortType == &cEnabledAscending) ? &cEnabledDescending : &cEnabledAscending;
93         m_sortType = SORT_ENABLED_ASCENDING;
94      else if (pos.x < tableBreaks[2] && m_sortType == SORT_CPU_ASCENDING)
95         m_sortType = SORT_CPU_DESCENDING;
16096      else if (pos.x < tableBreaks[2])
161         m_sortType = (m_sortType == &cCpuAscending) ? &cCpuDescending : &cCpuAscending;
97         m_sortType = SORT_CPU_ASCENDING;
98      else if (pos.x < tableBreaks[3] && m_sortType == SORT_ADDRESS_ASCENDING)
99         m_sortType = SORT_ADDRESS_DESCENDING;
162100      else if (pos.x < tableBreaks[3])
163         m_sortType = (m_sortType == &cAddressAscending) ? &cAddressDescending : &cAddressAscending;
101         m_sortType = SORT_ADDRESS_ASCENDING;
102      else if (pos.x < tableBreaks[4] && m_sortType == SORT_CONDITION_ASCENDING)
103         m_sortType = SORT_CONDITION_DESCENDING;
164104      else if (pos.x < tableBreaks[4])
165         m_sortType = (m_sortType == &cConditionAscending) ? &cConditionDescending : &cConditionAscending;
105         m_sortType = SORT_CONDITION_ASCENDING;
106      else if (pos.x < tableBreaks[5] && m_sortType == SORT_ACTION_ASCENDING)
107         m_sortType = SORT_ACTION_DESCENDING;
166108      else if (pos.x < tableBreaks[5])
167         m_sortType = (m_sortType == &cActionAscending) ? &cActionDescending : &cActionAscending;
109         m_sortType = SORT_ACTION_ASCENDING;
168110   }
169111   else
170112   {
171113      // Gather a sorted list of all the breakpoints for all the CPUs
172      gather_breakpoints();
114      device_debug::breakpoint** bpList = NULL;
115      const int numBPs = breakpoints(SORT_NONE, bpList);
173116
174      int const bpIndex = pos.y - 1;
175      if ((bpIndex >= m_buffer.count()) || (bpIndex < 0))
117      const int bpIndex = pos.y - 1;
118      if (bpIndex > numBPs || bpIndex < 0)
176119         return;
177120
178121      // Enable / disable
179      m_buffer[bpIndex]->setEnabled(!m_buffer[bpIndex]->enabled());
122      if (bpList[bpIndex]->enabled())
123         bpList[bpIndex]->setEnabled(false);
124      else
125         bpList[bpIndex]->setEnabled(true);
180126
127      delete[] bpList;
128
181129      machine().debug_view().update_all(DVT_DISASSEMBLY);
182130   }
183131
r243727r243728
201149}
202150
203151
204void debug_view_breakpoints::gather_breakpoints()
152// Sorting functors for the qsort function
153static int cIndexAscending(const void* a, const void* b)
205154{
206   m_buffer.resize(0);
155   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
156   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
157   return left->index() > right->index();
158}
159
160static int cIndexDescending(const void* a, const void* b)
161{
162   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
163   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
164   return left->index() < right->index();
165}
166
167static int cEnabledAscending(const void* a, const void* b)
168{
169   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
170   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
171   return left->enabled() < right->enabled();
172}
173
174static int cEnabledDescending(const void* a, const void* b)
175{
176   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
177   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
178   return left->enabled() > right->enabled();
179}
180
181static int cCpuAscending(const void* a, const void* b)
182{
183   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
184   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
185   const int result = strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
186   return result >= 0;
187}
188
189static int cCpuDescending(const void* a, const void* b)
190{
191   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
192   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
193   const int result = strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
194   return result < 0;
195}
196
197static int cAddressAscending(const void* a, const void* b)
198{
199   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
200   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
201   return left->address() > right->address();
202}
203
204static int cAddressDescending(const void* a, const void* b)
205{
206   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
207   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
208   return left->address() < right->address();
209}
210
211static int cConditionAscending(const void* a, const void* b)
212{
213   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
214   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
215   const int result = strcmp(left->condition(), right->condition());
216   return result >= 0;
217}
218
219static int cConditionDescending(const void* a, const void* b)
220{
221   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
222   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
223   const int result = strcmp(left->condition(), right->condition());
224   return result < 0;
225}
226
227static int cActionAscending(const void* a, const void* b)
228{
229   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
230   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
231   const int result = strcmp(left->action(), right->action());
232   return result >= 0;
233}
234
235static int cActionDescending(const void* a, const void* b)
236{
237   const device_debug::breakpoint* left = *(device_debug::breakpoint**)a;
238   const device_debug::breakpoint* right = *(device_debug::breakpoint**)b;
239   const int result = strcmp(left->action(), right->action());
240   return result < 0;
241}
242
243
244int debug_view_breakpoints::breakpoints(SortMode sort, device_debug::breakpoint**& bpList)
245{
246   // Alloc
247   int numBPs = 0;
248   bpList = NULL;
207249   for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
208250   {
251      const device_debug& debugInterface = *source->device()->debug();
252      for (device_debug::breakpoint *bp = debugInterface.breakpoint_first(); bp != NULL; bp = bp->next())
253         numBPs++;
254   }
255   bpList = new device_debug::breakpoint*[numBPs];
256
257   int bpAddIndex = 0;
258   for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
259   {
209260      // Collect
210      device_debug &debugInterface = *source->device()->debug();
261      device_debug& debugInterface = *source->device()->debug();
211262      for (device_debug::breakpoint *bp = debugInterface.breakpoint_first(); bp != NULL; bp = bp->next())
212         m_buffer.append() = bp;
263      {
264         bpList[bpAddIndex] = bp;
265         bpAddIndex++;
266      }
213267   }
214268
215269   // And now for the sort
216   qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::breakpoint *), m_sortType);
270   switch (m_sortType)
271   {
272      case SORT_NONE:
273         break;
274      case SORT_INDEX_ASCENDING:
275         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cIndexAscending);
276         break;
277      case SORT_INDEX_DESCENDING:
278         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cIndexDescending);
279         break;
280      case SORT_ENABLED_ASCENDING:
281         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cEnabledAscending);
282         break;
283      case SORT_ENABLED_DESCENDING:
284         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cEnabledDescending);
285         break;
286      case SORT_CPU_ASCENDING:
287         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cCpuAscending);
288         break;
289      case SORT_CPU_DESCENDING:
290         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cCpuDescending);
291         break;
292      case SORT_ADDRESS_ASCENDING:
293         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cAddressAscending);
294         break;
295      case SORT_ADDRESS_DESCENDING:
296         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cAddressDescending);
297         break;
298      case SORT_CONDITION_ASCENDING:
299         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cConditionAscending);
300         break;
301      case SORT_CONDITION_DESCENDING:
302         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cConditionDescending);
303         break;
304      case SORT_ACTION_ASCENDING:
305         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cActionAscending);
306         break;
307      case SORT_ACTION_DESCENDING:
308         qsort(bpList, numBPs, sizeof(device_debug::breakpoint*), cActionDescending);
309         break;
310   }
311
312   return numBPs;
217313}
218314
219315
r243727r243728
225321void debug_view_breakpoints::view_update()
226322{
227323   // Gather a list of all the breakpoints for all the CPUs
228   gather_breakpoints();
324   device_debug::breakpoint** bpList = NULL;
325   const int numBPs = breakpoints(SORT_NONE, bpList);
229326
230327   // Set the view region so the scroll bars update
231   m_total.x = tableBreaks[ARRAY_LENGTH(tableBreaks) - 1];
232   m_total.y = m_buffer.count() + 1;
233   if (m_total.y < 10)
234      m_total.y = 10;
328   m_total.y = numBPs+1;
235329
236330   // Draw
237   debug_view_char   *dest = m_viewdata;
238   astring         linebuf;
239
240   // Header
241   if (m_visible.y > 0)
331   debug_view_char *dest = m_viewdata;
332   for (int row = 0; row < m_visible.y; row++)
242333   {
243      linebuf.reset();
244      linebuf.cat("ID");
245      if (m_sortType == &cIndexAscending) linebuf.cat('\\');
246      else if (m_sortType == &cIndexDescending) linebuf.cat('/');
247      pad_astring_to_length(linebuf, tableBreaks[0]);
248      linebuf.cat("En");
249      if (m_sortType == &cEnabledAscending) linebuf.cat('\\');
250      else if (m_sortType == &cEnabledDescending) linebuf.cat('/');
251      pad_astring_to_length(linebuf, tableBreaks[1]);
252      linebuf.cat("CPU");
253      if (m_sortType == &cCpuAscending) linebuf.cat('\\');
254      else if (m_sortType == &cCpuDescending) linebuf.cat('/');
255      pad_astring_to_length(linebuf, tableBreaks[2]);
256      linebuf.cat("Address");
257      if (m_sortType == &cAddressAscending) linebuf.cat('\\');
258      else if (m_sortType == &cAddressDescending) linebuf.cat('/');
259      pad_astring_to_length(linebuf, tableBreaks[3]);
260      linebuf.cat("Condition");
261      if (m_sortType == &cConditionAscending) linebuf.cat('\\');
262      else if (m_sortType == &cConditionDescending) linebuf.cat('/');
263      pad_astring_to_length(linebuf, tableBreaks[4]);
264      linebuf.cat("Action");
265      if (m_sortType == &cActionAscending) linebuf.cat('\\');
266      else if (m_sortType == &cActionDescending) linebuf.cat('/');
267      pad_astring_to_length(linebuf, tableBreaks[5]);
334      UINT32 effrow = m_topleft.y + row;
268335
269      for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++)
336      // Header
337      if (row == 0)
270338      {
271         dest->byte = (i < linebuf.len()) ? linebuf[i] : ' ';
272         dest->attrib = DCA_ANCILLARY;
339         astring header;
340         header.printf("ID");
341         if (m_sortType == SORT_INDEX_ASCENDING) header.catprintf("\\");
342         else if (m_sortType == SORT_INDEX_DESCENDING) header.catprintf("/");
343         pad_astring_to_length(header, tableBreaks[0]);
344         header.catprintf("En");
345         if (m_sortType == SORT_ENABLED_ASCENDING) header.catprintf("\\");
346         else if (m_sortType == SORT_ENABLED_DESCENDING) header.catprintf("/");
347         pad_astring_to_length(header, tableBreaks[1]);
348         header.catprintf("CPU");
349         if (m_sortType == SORT_CPU_ASCENDING) header.catprintf("\\");
350         else if (m_sortType == SORT_CPU_DESCENDING) header.catprintf("/");
351         pad_astring_to_length(header, tableBreaks[2]);
352         header.catprintf("Address");
353         if (m_sortType == SORT_ADDRESS_ASCENDING) header.catprintf("\\");
354         else if (m_sortType == SORT_ADDRESS_DESCENDING) header.catprintf("/");
355         pad_astring_to_length(header, tableBreaks[3]);
356         header.catprintf("Condition");
357         if (m_sortType == SORT_CONDITION_ASCENDING) header.catprintf("\\");
358         else if (m_sortType == SORT_CONDITION_DESCENDING) header.catprintf("/");
359         pad_astring_to_length(header, tableBreaks[4]);
360         header.catprintf("Action");
361         if (m_sortType == SORT_ACTION_ASCENDING) header.catprintf("\\");
362         else if (m_sortType == SORT_ACTION_DESCENDING) header.catprintf("/");
363         pad_astring_to_length(header, tableBreaks[5]);
364
365         for (int i = 0; i < m_visible.x; i++)
366         {
367            dest->byte = (i < header.len()) ? header[i] : ' ';
368            dest->attrib = DCA_ANCILLARY;
369            dest++;
370         }
371         continue;
273372      }
274   }
275373
276   for (int row = 1; row < m_visible.y; row++)
277   {
278374      // Breakpoints
279      int bpi = row + m_topleft.y - 1;
280      if ((bpi < m_buffer.count()) && (bpi >= 0))
375      int bpi = effrow-1;
376      if (bpi < numBPs && bpi >= 0)
281377      {
282         device_debug::breakpoint *const bp = m_buffer[bpi];
378         device_debug::breakpoint* bp = bpList[bpi];
283379
284         linebuf.reset();
285         linebuf.catprintf("%2X", bp->index());
286         pad_astring_to_length(linebuf, tableBreaks[0]);
287         linebuf.cat(bp->enabled() ? 'X' : 'O');
288         pad_astring_to_length(linebuf, tableBreaks[1]);
289         linebuf.cat(bp->debugInterface()->device().tag());
290         pad_astring_to_length(linebuf, tableBreaks[2]);
291         linebuf.cat(core_i64_hex_format(bp->address(), bp->debugInterface()->logaddrchars()));
292         pad_astring_to_length(linebuf, tableBreaks[3]);
293         if (strcmp(bp->condition(), "1"))
294            linebuf.cat(bp->condition());
295         pad_astring_to_length(linebuf, tableBreaks[4]);
296         linebuf.cat(bp->action());
297         pad_astring_to_length(linebuf, tableBreaks[5]);
380         astring buffer;
381         buffer.printf("%X", bp->index());
382         pad_astring_to_length(buffer, tableBreaks[0]);
383         buffer.catprintf("%c", bp->enabled() ? 'X' : 'O');
384         pad_astring_to_length(buffer, tableBreaks[1]);
385         buffer.catprintf("%s", bp->debugInterface()->device().tag());
386         pad_astring_to_length(buffer, tableBreaks[2]);
387         buffer.catprintf("%s", core_i64_hex_format(bp->address(), bp->debugInterface()->logaddrchars()));
388         pad_astring_to_length(buffer, tableBreaks[3]);
389         if (astring(bp->condition()) != astring("1"))
390         {
391            buffer.catprintf("%s", bp->condition());
392            pad_astring_to_length(buffer, tableBreaks[4]);
393         }
394         if (astring(bp->action()) != astring(""))
395         {
396            buffer.catprintf("%s", bp->action());
397            pad_astring_to_length(buffer, tableBreaks[5]);
398         }
298399
299         for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++)
400         for (int i = 0; i < m_visible.x; i++)
300401         {
301            dest->byte = (i < linebuf.len()) ? linebuf[i] : ' ';
402            dest->byte = (i < buffer.len()) ? buffer[i] : ' ';
302403            dest->attrib = DCA_NORMAL;
303404
304405            // Color disabled breakpoints red
305            if ((i >= tableBreaks[0]) && (i < tableBreaks[1]) && !bp->enabled())
306               dest->attrib |= DCA_CHANGED;
406            if (i == 5 && dest->byte == 'O')
407               dest->attrib = DCA_CHANGED;
408
409            dest++;
307410         }
411         continue;
308412      }
309      else
413
414      // Fill the remaining vertical space
415      for (int i = 0; i < m_visible.x; i++)
310416      {
311         // Fill the remaining vertical space
312         for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++)
313         {
314            dest->byte = ' ';
315            dest->attrib = DCA_NORMAL;
316         }
417         dest->byte = ' ';
418         dest->attrib = DCA_NORMAL;
419         dest++;
317420      }
318421   }
422
423   delete[] bpList;
319424}
trunk/src/emu/debug/dvbpoints.h
r243727r243728
3535   virtual ~debug_view_breakpoints();
3636
3737public:
38   enum SortMode
39   {
40      SORT_NONE,
41      SORT_INDEX_ASCENDING,
42      SORT_INDEX_DESCENDING,
43      SORT_ENABLED_ASCENDING,
44      SORT_ENABLED_DESCENDING,
45      SORT_CPU_ASCENDING,
46      SORT_CPU_DESCENDING,
47      SORT_ADDRESS_ASCENDING,
48      SORT_ADDRESS_DESCENDING,
49      SORT_CONDITION_ASCENDING,
50      SORT_CONDITION_DESCENDING,
51      SORT_ACTION_ASCENDING,
52      SORT_ACTION_DESCENDING
53   };
54
3855   // getters
3956   // setters
4057
r243727r243728
4764   // internal helpers
4865   void enumerate_sources();
4966   void pad_astring_to_length(astring& str, int len);
50   void gather_breakpoints();
67   int breakpoints(SortMode sort, device_debug::breakpoint**& bpList);
5168
5269
5370   // internal state
54   int (*m_sortType)(void const *, void const *);
55   dynamic_array<device_debug::breakpoint *> m_buffer;
71   SortMode m_sortType;
5672};
5773
5874
trunk/src/emu/debug/dvwpoints.c
r243727r243728
1313
1414
1515
16static int cIndexAscending(const void* a, const void* b)
17{
18   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
19   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
20   return left->index() - right->index();
21}
22
23static int cIndexDescending(const void* a, const void* b)
24{
25   return cIndexAscending(b, a);
26}
27
28static int cEnabledAscending(const void* a, const void* b)
29{
30   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
31   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
32   return (left->enabled() ? 1 : 0) - (right->enabled() ? 1 : 0);
33}
34
35static int cEnabledDescending(const void* a, const void* b)
36{
37   return cEnabledAscending(b, a);
38}
39
40static int cCpuAscending(const void* a, const void* b)
41{
42   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
43   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
44   return strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
45}
46
47static int cCpuDescending(const void* a, const void* b)
48{
49   return cCpuAscending(b, a);
50}
51
52static int cSpaceAscending(const void* a, const void* b)
53{
54   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
55   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
56   return strcmp(left->space().name(), right->space().name());
57}
58
59static int cSpaceDescending(const void* a, const void* b)
60{
61   return cSpaceAscending(b, a);
62}
63
64static int cAddressAscending(const void* a, const void* b)
65{
66   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
67   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
68   return (left->address() > right->address()) ? 1 : (left->address() < right->address()) ? -1 : 0;
69}
70
71static int cAddressDescending(const void* a, const void* b)
72{
73   return cAddressAscending(b, a);
74}
75
76static int cTypeAscending(const void* a, const void* b)
77{
78   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
79   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
80   return left->type() - right->type();
81}
82
83static int cTypeDescending(const void* a, const void* b)
84{
85   return cTypeAscending(b, a);
86}
87
88static int cConditionAscending(const void* a, const void* b)
89{
90   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
91   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
92   return strcmp(left->condition(), right->condition());
93}
94
95static int cConditionDescending(const void* a, const void* b)
96{
97   return cConditionAscending(b, a);
98}
99
100static int cActionAscending(const void* a, const void* b)
101{
102   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
103   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
104   return strcmp(left->action(), right->action());
105}
106
107static int cActionDescending(const void* a, const void* b)
108{
109   return cActionAscending(b, a);
110}
111
112
11316//**************************************************************************
11417//  DEBUG VIEW WATCH POINTS
11518//**************************************************************************
r243727r243728
12225
12326debug_view_watchpoints::debug_view_watchpoints(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate)
12427   : debug_view(machine, DVT_WATCH_POINTS, osdupdate, osdprivate),
125      m_sortType(&cIndexAscending)
28      m_sortType(SORT_INDEX_ASCENDING)
12629{
12730   // fail if no available sources
12831   enumerate_sources();
12932   if (m_source_list.count() == 0)
13033      throw std::bad_alloc();
34
35   // configure the view
36   m_total.y = 10;
37   m_supports_cursor = false;
13138}
13239
13340
r243727r243728
17178
17279void debug_view_watchpoints::view_click(const int button, const debug_view_xy& pos)
17380{
174   bool const clickedTopRow = (m_topleft.y == pos.y);
81   bool clickedTopRow = (m_topleft.y == pos.y);
17582
17683   if (clickedTopRow)
17784   {
178      if (pos.x < tableBreaks[0])
179         m_sortType = (m_sortType == &cIndexAscending) ? &cIndexDescending : &cIndexAscending;
85      if (pos.x < tableBreaks[0] && m_sortType == SORT_INDEX_ASCENDING)
86         m_sortType = SORT_INDEX_DESCENDING;
87      else if (pos.x < tableBreaks[0])
88         m_sortType = SORT_INDEX_ASCENDING;
89      else if (pos.x < tableBreaks[1] && m_sortType == SORT_ENABLED_ASCENDING)
90         m_sortType = SORT_ENABLED_DESCENDING;
18091      else if (pos.x < tableBreaks[1])
181         m_sortType = (m_sortType == &cEnabledAscending) ? &cEnabledDescending : &cEnabledAscending;
92         m_sortType = SORT_ENABLED_ASCENDING;
93      else if (pos.x < tableBreaks[2] && m_sortType == SORT_CPU_ASCENDING)
94         m_sortType = SORT_CPU_DESCENDING;
18295      else if (pos.x < tableBreaks[2])
183         m_sortType = (m_sortType == &cCpuAscending) ? &cCpuDescending : &cCpuAscending;
96         m_sortType = SORT_CPU_ASCENDING;
97      else if (pos.x < tableBreaks[3] && m_sortType == SORT_SPACE_ASCENDING)
98         m_sortType = SORT_SPACE_DESCENDING;
18499      else if (pos.x < tableBreaks[3])
185         m_sortType = (m_sortType == &cSpaceAscending) ? &cSpaceDescending : &cSpaceAscending;
100         m_sortType = SORT_SPACE_ASCENDING;
101      else if (pos.x < tableBreaks[4] && m_sortType == SORT_ADDRESS_ASCENDING)
102         m_sortType = SORT_ADDRESS_DESCENDING;
186103      else if (pos.x < tableBreaks[4])
187         m_sortType = (m_sortType == &cAddressAscending) ? &cAddressDescending : &cAddressAscending;
104         m_sortType = SORT_ADDRESS_ASCENDING;
105      else if (pos.x < tableBreaks[5] && m_sortType == SORT_TYPE_ASCENDING)
106         m_sortType = SORT_TYPE_DESCENDING;
188107      else if (pos.x < tableBreaks[5])
189         m_sortType = (m_sortType == &cTypeAscending) ? &cTypeDescending : &cTypeAscending;
108         m_sortType = SORT_TYPE_ASCENDING;
109      else if (pos.x < tableBreaks[6] && m_sortType == SORT_CONDITION_ASCENDING)
110         m_sortType = SORT_CONDITION_DESCENDING;
190111      else if (pos.x < tableBreaks[6])
191         m_sortType = (m_sortType == &cConditionAscending) ? &cConditionDescending : &cConditionAscending;
112         m_sortType = SORT_CONDITION_ASCENDING;
113      else if (pos.x < tableBreaks[7] && m_sortType == SORT_ACTION_ASCENDING)
114         m_sortType = SORT_ACTION_DESCENDING;
192115      else if (pos.x < tableBreaks[7])
193         m_sortType = (m_sortType == &cActionAscending) ? &cActionDescending : &cActionAscending;
116         m_sortType = SORT_ACTION_ASCENDING;
194117   }
195118   else
196119   {
197120      // Gather a sorted list of all the watchpoints for all the CPUs
198      gather_watchpoints();
121      device_debug::watchpoint** wpList = NULL;
122      const int numWPs = watchpoints(SORT_NONE, wpList);
199123
200      int const wpIndex = pos.y - 1;
201      if ((wpIndex >= m_buffer.count()) || (wpIndex < 0))
124      const int wpIndex = pos.y - 1;
125      if (wpIndex > numWPs || wpIndex < 0)
202126         return;
203127
204128      // Enable / disable
205      m_buffer[wpIndex]->setEnabled(!m_buffer[wpIndex]->enabled());
129      if (wpList[wpIndex]->enabled())
130         wpList[wpIndex]->setEnabled(false);
131      else
132         wpList[wpIndex]->setEnabled(true);
133
134      delete[] wpList;
206135   }
207136
208137   begin_update();
r243727r243728
225154}
226155
227156
228void debug_view_watchpoints::gather_watchpoints()
157// Sorting functors for the qsort function
158static int cIndexAscending(const void* a, const void* b)
229159{
230   m_buffer.resize(0);
160   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
161   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
162   return left->index() > right->index();
163}
164
165static int cIndexDescending(const void* a, const void* b)
166{
167   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
168   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
169   return left->index() < right->index();
170}
171
172static int cEnabledAscending(const void* a, const void* b)
173{
174   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
175   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
176   return left->enabled() < right->enabled();
177}
178
179static int cEnabledDescending(const void* a, const void* b)
180{
181   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
182   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
183   return left->enabled() > right->enabled();
184}
185
186static int cCpuAscending(const void* a, const void* b)
187{
188   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
189   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
190   const int result = strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
191   return result >= 0;
192}
193
194static int cCpuDescending(const void* a, const void* b)
195{
196   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
197   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
198   const int result = strcmp(left->debugInterface()->device().tag(), right->debugInterface()->device().tag());
199   return result < 0;
200}
201
202static int cSpaceAscending(const void* a, const void* b)
203{
204   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
205   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
206   const int result = strcmp(left->space().name(), right->space().name());
207   return result >= 0;
208}
209
210static int cSpaceDescending(const void* a, const void* b)
211{
212   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
213   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
214   const int result = strcmp(left->space().name(), right->space().name());
215   return result < 0;
216}
217
218static int cAddressAscending(const void* a, const void* b)
219{
220   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
221   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
222   return left->address() > right->address();
223}
224
225static int cAddressDescending(const void* a, const void* b)
226{
227   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
228   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
229   return left->address() < right->address();
230}
231
232static int cTypeAscending(const void* a, const void* b)
233{
234   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
235   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
236   return left->type() > right->type();
237}
238
239static int cTypeDescending(const void* a, const void* b)
240{
241   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
242   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
243   return left->type() < right->type();
244}
245
246static int cConditionAscending(const void* a, const void* b)
247{
248   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
249   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
250   const int result = strcmp(left->condition(), right->condition());
251   return result >= 0;
252}
253
254static int cConditionDescending(const void* a, const void* b)
255{
256   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
257   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
258   const int result = strcmp(left->condition(), right->condition());
259   return result < 0;
260}
261
262static int cActionAscending(const void* a, const void* b)
263{
264   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
265   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
266   const int result = strcmp(left->action(), right->action());
267   return result >= 0;
268}
269
270static int cActionDescending(const void* a, const void* b)
271{
272   const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
273   const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
274   const int result = strcmp(left->action(), right->action());
275   return result < 0;
276}
277
278
279int debug_view_watchpoints::watchpoints(SortMode sort, device_debug::watchpoint**& wpList)
280{
281   // Alloc
282   int numWPs = 0;
283   wpList = NULL;
231284   for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
232285   {
286      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
287      {
288         /* loop over the watchpoints */
289         const device_debug& debugInterface = *source->device()->debug();
290         for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != NULL; wp = wp->next())
291            numWPs++;
292      }
293   }
294   wpList = new device_debug::watchpoint*[numWPs];
295
296   int wpAddIndex = 0;
297   for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
298   {
233299      // Collect
234      device_debug &debugInterface = *source->device()->debug();
235300      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
236301      {
302         device_debug& debugInterface = *source->device()->debug();
237303         for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != NULL; wp = wp->next())
238            m_buffer.append() = wp;
304         {
305            wpList[wpAddIndex] = wp;
306            wpAddIndex++;
307         }
239308      }
240309   }
241310
242311   // And now for the sort
243   qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::watchpoint *), m_sortType);
312   switch (m_sortType)
313   {
314      case SORT_NONE:
315         break;
316      case SORT_INDEX_ASCENDING:
317         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cIndexAscending);
318         break;
319      case SORT_INDEX_DESCENDING:
320         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cIndexDescending);
321         break;
322      case SORT_ENABLED_ASCENDING:
323         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cEnabledAscending);
324         break;
325      case SORT_ENABLED_DESCENDING:
326         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cEnabledDescending);
327         break;
328      case SORT_CPU_ASCENDING:
329         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cCpuAscending);
330         break;
331      case SORT_CPU_DESCENDING:
332         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cCpuDescending);
333         break;
334      case SORT_SPACE_ASCENDING:
335         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cSpaceAscending);
336         break;
337      case SORT_SPACE_DESCENDING:
338         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cSpaceDescending);
339         break;
340      case SORT_ADDRESS_ASCENDING:
341         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cAddressAscending);
342         break;
343      case SORT_ADDRESS_DESCENDING:
344         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cAddressDescending);
345         break;
346      case SORT_TYPE_ASCENDING:
347         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cTypeAscending);
348         break;
349      case SORT_TYPE_DESCENDING:
350         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cTypeDescending);
351         break;
352      case SORT_CONDITION_ASCENDING:
353         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cConditionAscending);
354         break;
355      case SORT_CONDITION_DESCENDING:
356         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cConditionDescending);
357         break;
358      case SORT_ACTION_ASCENDING:
359         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cActionAscending);
360         break;
361      case SORT_ACTION_DESCENDING:
362         qsort(wpList, numWPs, sizeof(device_debug::watchpoint*), cActionDescending);
363         break;
364   }
365
366   return numWPs;
244367}
245368
246369
r243727r243728
252375void debug_view_watchpoints::view_update()
253376{
254377   // Gather a list of all the watchpoints for all the CPUs
255   gather_watchpoints();
378   device_debug::watchpoint** wpList = NULL;
379   const int numWPs = watchpoints(SORT_NONE, wpList);
256380
257381   // Set the view region so the scroll bars update
258   m_total.x = tableBreaks[ARRAY_LENGTH(tableBreaks) - 1];
259   m_total.y = m_buffer.count() + 1;
260   if (m_total.y < 10)
261      m_total.y = 10;
382   m_total.y = numWPs+1;
262383
263384   // Draw
264   debug_view_char   *dest = m_viewdata;
265   astring         linebuf;
266
267   // Header
268   if (m_visible.y > 0)
385   debug_view_char *dest = m_viewdata;
386   for (int row = 0; row < m_visible.y; row++)
269387   {
270      linebuf.reset();
271      linebuf.cat("ID");
272      if (m_sortType == &cIndexAscending) linebuf.cat('\\');
273      else if (m_sortType == &cIndexDescending) linebuf.cat('/');
274      pad_astring_to_length(linebuf, tableBreaks[0]);
275      linebuf.cat("En");
276      if (m_sortType == &cEnabledAscending) linebuf.cat('\\');
277      else if (m_sortType == &cEnabledDescending) linebuf.cat('/');
278      pad_astring_to_length(linebuf, tableBreaks[1]);
279      linebuf.cat("CPU");
280      if (m_sortType == &cCpuAscending) linebuf.cat('\\');
281      else if (m_sortType == &cCpuDescending) linebuf.cat('/');
282      pad_astring_to_length(linebuf, tableBreaks[2]);
283      linebuf.cat("Space");
284      if (m_sortType == &cSpaceAscending) linebuf.cat('\\');
285      else if (m_sortType == &cSpaceDescending) linebuf.cat('/');
286      pad_astring_to_length(linebuf, tableBreaks[3]);
287      linebuf.cat("Addresses");
288      if (m_sortType == &cAddressAscending) linebuf.cat('\\');
289      else if (m_sortType == &cAddressDescending) linebuf.cat('/');
290      pad_astring_to_length(linebuf, tableBreaks[4]);
291      linebuf.cat("Type");
292      if (m_sortType == &cTypeAscending) linebuf.cat('\\');
293      else if (m_sortType == &cTypeDescending) linebuf.cat('/');
294      pad_astring_to_length(linebuf, tableBreaks[5]);
295      linebuf.cat("Condition");
296      if (m_sortType == &cConditionAscending) linebuf.cat('\\');
297      else if (m_sortType == &cConditionDescending) linebuf.cat('/');
298      pad_astring_to_length(linebuf, tableBreaks[6]);
299      linebuf.cat("Action");
300      if (m_sortType == &cActionAscending) linebuf.cat('\\');
301      else if (m_sortType == &cActionDescending) linebuf.cat('/');
302      pad_astring_to_length(linebuf, tableBreaks[7]);
388      UINT32 effrow = m_topleft.y + row;
303389
304      for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++)
390      // Header
391      if (row == 0)
305392      {
306         dest->byte = (i < linebuf.len()) ? linebuf[i] : ' ';
307         dest->attrib = DCA_ANCILLARY;
393         astring header;
394         header.printf("ID");
395         if (m_sortType == SORT_INDEX_ASCENDING) header.catprintf("\\");
396         else if (m_sortType == SORT_INDEX_DESCENDING) header.catprintf("/");
397         pad_astring_to_length(header, tableBreaks[0]);
398         header.catprintf("En");
399         if (m_sortType == SORT_ENABLED_ASCENDING) header.catprintf("\\");
400         else if (m_sortType == SORT_ENABLED_DESCENDING) header.catprintf("/");
401         pad_astring_to_length(header, tableBreaks[1]);
402         header.catprintf("CPU");
403         if (m_sortType == SORT_CPU_ASCENDING) header.catprintf("\\");
404         else if (m_sortType == SORT_CPU_DESCENDING) header.catprintf("/");
405         pad_astring_to_length(header, tableBreaks[2]);
406         header.catprintf("Space");
407         if (m_sortType == SORT_SPACE_ASCENDING) header.catprintf("\\");
408         else if (m_sortType == SORT_SPACE_DESCENDING) header.catprintf("/");
409         pad_astring_to_length(header, tableBreaks[3]);
410         header.catprintf("Addresses");
411         if (m_sortType == SORT_ADDRESS_ASCENDING) header.catprintf("\\");
412         else if (m_sortType == SORT_ADDRESS_DESCENDING) header.catprintf("/");
413         pad_astring_to_length(header, tableBreaks[4]);
414         header.catprintf("Type");
415         if (m_sortType == SORT_TYPE_ASCENDING) header.catprintf("\\");
416         else if (m_sortType == SORT_TYPE_DESCENDING) header.catprintf("/");
417         pad_astring_to_length(header, tableBreaks[5]);
418         header.catprintf("Condition");
419         if (m_sortType == SORT_CONDITION_ASCENDING) header.catprintf("\\");
420         else if (m_sortType == SORT_CONDITION_DESCENDING) header.catprintf("/");
421         pad_astring_to_length(header, tableBreaks[6]);
422         header.catprintf("Action");
423         if (m_sortType == SORT_ACTION_ASCENDING) header.catprintf("\\");
424         else if (m_sortType == SORT_ACTION_DESCENDING) header.catprintf("/");
425         pad_astring_to_length(header, tableBreaks[7]);
426
427         for (int i = 0; i < m_visible.x; i++)
428         {
429            dest->byte = (i < header.len()) ? header[i] : ' ';
430            dest->attrib = DCA_ANCILLARY;
431            dest++;
432         }
433         continue;
308434      }
309   }
310435
311   for (int row = 1; row < m_visible.y; row++)
312   {
313436      // watchpoints
314      int const wpi = row + m_topleft.y - 1;
315      if ((wpi < m_buffer.count()) && wpi >= 0)
437      int wpi = effrow-1;
438      if (wpi < numWPs && wpi >= 0)
316439      {
317         static char const *const types[] = { "unkn ", "read ", "write", "r/w  " };
318         device_debug::watchpoint *const wp = m_buffer[wpi];
440         static const char *const types[] = { "unkn ", "read ", "write", "r/w  " };
441         device_debug::watchpoint* wp = wpList[wpi];
319442
320         linebuf.reset();
321         linebuf.catprintf("%2X", wp->index());
322         pad_astring_to_length(linebuf, tableBreaks[0]);
323         linebuf.cat(wp->enabled() ? 'X' : 'O');
324         pad_astring_to_length(linebuf, tableBreaks[1]);
325         linebuf.cat(wp->debugInterface()->device().tag());
326         pad_astring_to_length(linebuf, tableBreaks[2]);
327         linebuf.cat(wp->space().name());
328         pad_astring_to_length(linebuf, tableBreaks[3]);
329         linebuf.cat(core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars()));
330         linebuf.cat('-');
331         linebuf.cat(core_i64_hex_format(wp->space().byte_to_address_end(wp->address() + wp->length()) - 1, wp->space().addrchars()));
332         pad_astring_to_length(linebuf, tableBreaks[4]);
333         linebuf.cat(types[wp->type() & 3]);
334         pad_astring_to_length(linebuf, tableBreaks[5]);
335         if (strcmp(wp->condition(), "1"))
336            linebuf.cat(wp->condition());
337         pad_astring_to_length(linebuf, tableBreaks[6]);
338         linebuf.cat(wp->action());
339         pad_astring_to_length(linebuf, tableBreaks[7]);
443         astring buffer;
444         buffer.printf("%X", wp->index());
445         pad_astring_to_length(buffer, tableBreaks[0]);
446         buffer.catprintf("%c", wp->enabled() ? 'X' : 'O');
447         pad_astring_to_length(buffer, tableBreaks[1]);
448         buffer.catprintf("%s", wp->debugInterface()->device().tag());
449         pad_astring_to_length(buffer, tableBreaks[2]);
450         buffer.catprintf("%s", wp->space().name());
451         pad_astring_to_length(buffer, tableBreaks[3]);
452         buffer.catprintf("%s-%s",
453                        core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars()),
454                        core_i64_hex_format(wp->space().byte_to_address_end(wp->address() + wp->length()) - 1, wp->space().addrchars()));
455         pad_astring_to_length(buffer, tableBreaks[4]);
456         buffer.catprintf("%s", types[wp->type() & 3]);
457         pad_astring_to_length(buffer, tableBreaks[5]);
458         if (astring(wp->condition()) != astring("1"))
459         {
460            buffer.catprintf("%s", wp->condition());
461            pad_astring_to_length(buffer, tableBreaks[6]);
462         }
463         if (astring(wp->action()) != astring(""))
464         {
465            buffer.catprintf("%s", wp->action());
466            pad_astring_to_length(buffer, tableBreaks[7]);
467         }
340468
341         for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++)
469         for (int i = 0; i < m_visible.x; i++)
342470         {
343            dest->byte = (i < linebuf.len()) ? linebuf[i] : ' ';
471            dest->byte = (i < buffer.len()) ? buffer[i] : ' ';
344472            dest->attrib = DCA_NORMAL;
345473
346474            // Color disabled watchpoints red
347            if ((i >= tableBreaks[0]) && (i < tableBreaks[1]) && !wp->enabled())
348               dest->attrib |= DCA_CHANGED;
475            if (i == 5 && dest->byte == 'O')
476               dest->attrib = DCA_CHANGED;
477
478            dest++;
349479         }
480         continue;
350481      }
351      else
482
483      // Fill the remaining vertical space
484      for (int i = 0; i < m_visible.x; i++)
352485      {
353         // Fill the remaining vertical space
354         for (int i = 0; i < m_visible.x; i++, dest++)
355         {
356            dest->byte = ' ';
357            dest->attrib = DCA_NORMAL;
358         }
486         dest->byte = ' ';
487         dest->attrib = DCA_NORMAL;
488         dest++;
359489      }
360490   }
491
492   delete[] wpList;
361493}
trunk/src/emu/debug/dvwpoints.h
r243727r243728
3434   debug_view_watchpoints(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate);
3535   virtual ~debug_view_watchpoints();
3636
37public:
38   enum SortMode
39   {
40      SORT_NONE,
41      SORT_INDEX_ASCENDING,
42      SORT_INDEX_DESCENDING,
43      SORT_ENABLED_ASCENDING,
44      SORT_ENABLED_DESCENDING,
45      SORT_CPU_ASCENDING,
46      SORT_CPU_DESCENDING,
47      SORT_SPACE_ASCENDING,
48      SORT_SPACE_DESCENDING,
49      SORT_ADDRESS_ASCENDING,
50      SORT_ADDRESS_DESCENDING,
51      SORT_TYPE_ASCENDING,
52      SORT_TYPE_DESCENDING,
53      SORT_CONDITION_ASCENDING,
54      SORT_CONDITION_DESCENDING,
55      SORT_ACTION_ASCENDING,
56      SORT_ACTION_DESCENDING
57   };
58
59   // getters
60   // setters
61
3762protected:
3863   // view overrides
3964   virtual void view_update();
r243727r243728
4368   // internal helpers
4469   void enumerate_sources();
4570   void pad_astring_to_length(astring& str, int len);
46   void gather_watchpoints();
71   int watchpoints(SortMode sort, device_debug::watchpoint**& bpList);
4772
4873
4974   // internal state
50   int (*m_sortType)(void const *, void const *);
51   dynamic_array<device_debug::watchpoint *> m_buffer;
75   SortMode m_sortType;
5276};
5377
5478
trunk/src/emu/video/315_5124.c
r243727r243728
254254      }
255255   }
256256
257   set_frame_timing();
258   m_cram_dirty = 1;
259}
260
261
262void sega315_5124_device::set_frame_timing()
263{
264257   switch (m_y_pixels)
265258   {
266      case 192:
267         m_frame_timing = (m_is_pal) ? pal_192 : ntsc_192;
268         break;
259   case 192:
260      m_frame_timing = (m_is_pal) ? pal_192 : ntsc_192;
261      break;
269262
270      case 224:
271         m_frame_timing = (m_is_pal) ? pal_224 : ntsc_224;
272         break;
263   case 224:
264      m_frame_timing = (m_is_pal) ? pal_224 : ntsc_224;
265      break;
273266
274      case 240:
275         m_frame_timing = (m_is_pal) ? pal_240 : ntsc_240;
276         break;
267   case 240:
268      m_frame_timing = (m_is_pal) ? pal_240 : ntsc_240;
269      break;
277270   }
271   m_cram_dirty = 1;
278272}
279273
280274
r243727r243728
681675      case 2:     /* VDP register write */
682676         reg_num = data & 0x0f;
683677         m_reg[reg_num] = m_addr & 0xff;
684         //logerror("%s: %s: setting register %x to %02x\n", machine().describe_context(), tag(), reg_num, m_addr & 0xff);
678         //logerror("%s: %s: setting register %x to %02x\n", machine().describe_context(), tag(), reg_num, m_addr & 0xf );
685679
686680         switch (reg_num)
687681         {
r243727r243728
14471441{
14481442   int i;
14491443
1450   /* Exit if palette has no changes */
1444   /* Exit if palette is has no changes */
14511445   if (m_cram_dirty == 0)
14521446   {
14531447      return;
r243727r243728
14741468{
14751469   int i;
14761470
1477   /* Exit if palette has no changes */
1471   /* Exit if palette is has no changes */
14781472   if (m_cram_dirty == 0)
14791473   {
14801474      return;
r243727r243728
15631557
15641558void sega315_5124_device::vdp_postload()
15651559{
1566   set_frame_timing();
1560   switch (m_y_pixels)
1561   {
1562      case 192:
1563         m_frame_timing = (m_is_pal) ? pal_192 : ntsc_192;
1564         break;
1565
1566      case 224:
1567         m_frame_timing = (m_is_pal) ? pal_224 : ntsc_224;
1568         break;
1569
1570      case 240:
1571         m_frame_timing = (m_is_pal) ? pal_240 : ntsc_240;
1572         break;
1573   }
15671574}
15681575
15691576void sega315_5124_device::device_start()
trunk/src/emu/video/315_5124.h
r243727r243728
9191
9292protected:
9393   void set_display_settings();
94   void set_frame_timing();
9594   virtual void update_palette();
9695   virtual void cram_write(UINT8 data);
9796   virtual void draw_scanline( int pixel_offset_x, int pixel_plot_y, int line );
trunk/src/mame/drivers/bfm_sc1.c
r243727r243728
26012601#define GAME_FLAGS GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING|GAME_MECHANICAL
26022602
26032603//Adder 2
2604GAME( 1996, m_tppokr        , 0         ,  scorpion1_adder2 , toppoker  , bfm_sc1_state, toppoker       , 0,       "BFM/ELAM",    "Top Poker (Dutch, Game Card 95-750-899)", GAME_SUPPORTS_SAVE|GAME_NOT_WORKING )
2604GAME( 1996, m_tppokr        , 0         ,  scorpion1_adder2 , toppoker  , bfm_sc1_state, toppoker       , 0,       "BFM/ELAM",    "Top Poker (Dutch, Game Card 95-750-899)", GAME_FLAGS )
26052605
26062606
26072607/********************************************************************************************************************************************************************************************************************
trunk/src/mame/drivers/mpu4avan.c
r243727r243728
1212MACHINE_CONFIG_EXTERN( mod4oki );
1313INPUT_PORTS_EXTERN( mpu4 );
1414
15#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
15#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1616
1717
1818
trunk/src/mame/drivers/mpu4bwb.c
r243727r243728
2929MACHINE_CONFIG_EXTERN( mod2 );
3030INPUT_PORTS_EXTERN( mpu4 );
3131
32#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
32#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
3333
3434
3535#define M4BIGMT_EXTRA_ROMS \
trunk/src/mame/drivers/mpu4concept.c
r243727r243728
66MACHINE_CONFIG_EXTERN( mod4oki );
77INPUT_PORTS_EXTERN( mpu4 );
88
9#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
9#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1010
1111
1212#define M4RHFEVC_EXTRA_ROMS \
trunk/src/mame/drivers/mpu4crystal.c
r243727r243728
99MACHINE_CONFIG_EXTERN( mpu4crys );
1010INPUT_PORTS_EXTERN( mpu4 );
1111
12#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
12#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1313
1414
1515
trunk/src/mame/drivers/mpu4empire.c
r243727r243728
77MACHINE_CONFIG_EXTERN( mod4oki );
88INPUT_PORTS_EXTERN( mpu4 );
99
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1111
1212
1313ROM_START( m4apachg )
trunk/src/mame/drivers/mpu4mdm.c
r243727r243728
77MACHINE_CONFIG_EXTERN( mod4oki );
88INPUT_PORTS_EXTERN( mpu4 );
99
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1111
1212
1313
trunk/src/mame/drivers/mpu4misc.c
r243727r243728
66MACHINE_CONFIG_EXTERN( mod4oki );
77INPUT_PORTS_EXTERN( mpu4 );
88
9#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
9#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1010
1111
1212
trunk/src/mame/drivers/mpu4mod2sw.c
r243727r243728
2424
2525
2626
27#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
27#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
2828
2929DRIVER_INIT_MEMBER( mpu4_state, m4_showstring_mod2 )
3030{
trunk/src/mame/drivers/mpu4plasma.c
r243727r243728
189189   M4ELITE_PLASMA
190190ROM_END
191191
192#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
192#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
193193
194194GAMEL(199?, m4bigchf    ,0          ,mpu4plasma     ,mpu4               , mpu4_state,m4default          ,ROT0,   "Barcrest","Big Chief (Barcrest) (MPU4 w/ Plasma DMD) (set 1)",                        GAME_FLAGS|GAME_NO_SOUND,layout_mpu4plasma )
195195GAMEL(199?, m4bigchfa   ,m4bigchf   ,mpu4plasma     ,mpu4               , mpu4_state,m4default          ,ROT0,   "Barcrest","Big Chief (Barcrest) (MPU4 w/ Plasma DMD) (set 2)",                        GAME_FLAGS|GAME_NO_SOUND,layout_mpu4plasma )
trunk/src/mame/drivers/mpu4sw.c
r243727r243728
2525INPUT_PORTS_EXTERN( mpu4jackpot8tkn );
2626INPUT_PORTS_EXTERN( mpu4jackpot8per );
2727
28#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
28#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
2929
3030DRIVER_INIT_MEMBER(mpu4_state,m4debug)
3131{
trunk/src/mame/drivers/mpu4union.c
r243727r243728
77MACHINE_CONFIG_EXTERN( mod2 );
88INPUT_PORTS_EXTERN( mpu4 );
99
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK|GAME_MECHANICAL)
10#define GAME_FLAGS (GAME_NOT_WORKING|GAME_REQUIRES_ARTWORK)
1111
1212
1313ROM_START( m4cwalk )
trunk/src/mame/drivers/sumt8035.c
r243727r243728
254254ROM_END
255255
256256
257GAME( 1981, sm_ngacc,  0,    summit, summit, driver_device,  0, ROT270, "Summit Coin", "Nudge Accumulator (Summit Coin)", GAME_IS_SKELETON_MECHANICAL )
258GAME( 1981, sm_ultng,  0,    summit, summit, driver_device,  0, ROT270, "Summit Coin", "Ultimate Nudge (Summit Coin)", GAME_IS_SKELETON_MECHANICAL )
257GAME( 1981, sm_ngacc,  0,    summit, summit, driver_device,  0, ROT270, "Summit Coin", "Nudge Accumulator (Summit Coin)", GAME_IS_SKELETON )
258GAME( 1981, sm_ultng,  0,    summit, summit, driver_device,  0, ROT270, "Summit Coin", "Ultimate Nudge (Summit Coin)", GAME_IS_SKELETON )
trunk/src/mame/drivers/vaportra.c
r243727r243728
215215static MACHINE_CONFIG_START( vaportra, vaportra_state )
216216
217217   /* basic machine hardware */
218   MCFG_CPU_ADD("maincpu", M68000,XTAL_24MHz/2) /* Custom chip 59 */
218   MCFG_CPU_ADD("maincpu", M68000,12000000) /* Custom chip 59 */
219219   MCFG_CPU_PROGRAM_MAP(main_map)
220220   MCFG_CPU_VBLANK_INT_DRIVER("screen", vaportra_state,  irq6_line_hold)
221221
222   MCFG_CPU_ADD("audiocpu", H6280, XTAL_24MHz/4) /* Custom chip 45; Audio section crystal is 32.220 MHz but CPU clock is confirmed as coming from the 24MHz crystal (6Mhz exactly on the CPU) */
222   MCFG_CPU_ADD("audiocpu", H6280, 32220000/4) /* Custom chip 45; Audio section crystal is 32.220 MHz */
223223   MCFG_CPU_PROGRAM_MAP(sound_map)
224224
225225
r243727r243728
278278   /* sound hardware */
279279   MCFG_SPEAKER_STANDARD_MONO("mono")
280280
281   MCFG_SOUND_ADD("ym1", YM2203, XTAL_32_22MHz/8)
281   MCFG_SOUND_ADD("ym1", YM2203, 32220000/8)
282282   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
283283
284   MCFG_YM2151_ADD("ym2", XTAL_32_22MHz/9) // uses a preset LS163 to force the odd speed
284   MCFG_YM2151_ADD("ym2", 32220000/9)
285285   MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 1)) /* IRQ 2 */
286286   MCFG_SOUND_ROUTE(0, "mono", 0.60)
287287   MCFG_SOUND_ROUTE(1, "mono", 0.60)
288288
289   MCFG_OKIM6295_ADD("oki1", XTAL_32_22MHz/32, OKIM6295_PIN7_HIGH)
289   MCFG_OKIM6295_ADD("oki1", 32220000/32, OKIM6295_PIN7_HIGH)
290290   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
291291
292   MCFG_OKIM6295_ADD("oki2", XTAL_32_22MHz/16, OKIM6295_PIN7_HIGH)
292   MCFG_OKIM6295_ADD("oki2", 32220000/16, OKIM6295_PIN7_HIGH)
293293   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
294294MACHINE_CONFIG_END
295295
r243727r243728
840840   int i;
841841
842842   for (i = 0x00000; i < 0x80000; i++)
843      RAM[i] = BITSWAP8(RAM[i],0,6,5,4,3,2,1,7);
843      RAM[i] = (RAM[i] & 0x7e) | ((RAM[i] & 0x01) << 7) | ((RAM[i] & 0x80) >> 7);
844844}
845845
846846/******************************************************************************/
trunk/src/mame/drivers/wms.c
r243727r243728
376376{
377377}
378378
379GAME( 200?, wms,        0,       wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 1)", GAME_IS_SKELETON_MECHANICAL )
380GAME( 200?, wmsa,       wms,     wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 2)", GAME_IS_SKELETON_MECHANICAL )
381GAME( 200?, wmsb,       wms,     wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 3)", GAME_IS_SKELETON_MECHANICAL )
379GAME( 200?, wms,        0,       wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 1)", GAME_IS_SKELETON )
380GAME( 200?, wmsa,       wms,     wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 2)", GAME_IS_SKELETON )
381GAME( 200?, wmsb,       wms,     wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 3)", GAME_IS_SKELETON )
382382
383GAME( 200?, btippers,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Big Tippers (Russia)", GAME_IS_SKELETON_MECHANICAL )
384GAME( 200?, wmsboom,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Boom (Russia)", GAME_IS_SKELETON_MECHANICAL )
385GAME( 200?, cashcrop,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Cash Crop (Russia)", GAME_IS_SKELETON_MECHANICAL )
386GAME( 200?, filthyr,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Filthy Rich (Russia)", GAME_IS_SKELETON_MECHANICAL )
387GAME( 200?, hottop,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Hot Toppings (Russia)", GAME_IS_SKELETON_MECHANICAL )
388GAME( 200?, inwinner,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Instant Winner (Russia)", GAME_IS_SKELETON_MECHANICAL )
389GAME( 200?, jptparty,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Jackpot Party (Russia)", GAME_IS_SKELETON_MECHANICAL )
390GAME( 200?, leprgld,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Leprechaun's Gold (Russia)", GAME_IS_SKELETON_MECHANICAL )
391GAME( 200?, lol,        0,       wms, wms, wms_state, wms, ROT0, "WMS", "Life of Luxury (Russia)", GAME_IS_SKELETON_MECHANICAL )
392GAME( 200?, lovewin,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Love To Win (Russia)", GAME_IS_SKELETON_MECHANICAL )
393GAME( 200?, mtburn,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Money To Burn (Russia)", GAME_IS_SKELETON_MECHANICAL )
394GAME( 200?, otchart,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Off The Charts (Russia)", GAME_IS_SKELETON_MECHANICAL )
395GAME( 200?, perfect,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Perfect Game (Russia)", GAME_IS_SKELETON_MECHANICAL )
396GAME( 200?, reelemin,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Reel 'Em In (Russia)", GAME_IS_SKELETON_MECHANICAL )
397GAME( 200?, sonoth,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Something For Nothing (Russia)", GAME_IS_SKELETON_MECHANICAL )
398GAME( 200?, swingin,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Swingin In The Green (Russia)", GAME_IS_SKELETON_MECHANICAL )
399GAME( 200?, wmstopb,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Top Banana (Russia)", GAME_IS_SKELETON_MECHANICAL )
400GAME( 200?, wdun,       0,       wms, wms, wms_state, wms, ROT0, "WMS", "Who Dunnit (Russia)", GAME_IS_SKELETON_MECHANICAL )
401GAME( 200?, winbid,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Winning Bid (Russia)", GAME_IS_SKELETON_MECHANICAL )
402GAME( 200?, wldstrek,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Wild Streak (Russia)", GAME_IS_SKELETON_MECHANICAL )
403GAME( 200?, yukongld,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Yukon Gold (Russia)", GAME_IS_SKELETON_MECHANICAL )
383GAME( 200?, btippers,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Big Tippers (Russia)", GAME_IS_SKELETON )
384GAME( 200?, wmsboom,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Boom (Russia)", GAME_IS_SKELETON )
385GAME( 200?, cashcrop,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Cash Crop (Russia)", GAME_IS_SKELETON )
386GAME( 200?, filthyr,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Filthy Rich (Russia)", GAME_IS_SKELETON )
387GAME( 200?, hottop,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Hot Toppings (Russia)", GAME_IS_SKELETON )
388GAME( 200?, inwinner,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Instant Winner (Russia)", GAME_IS_SKELETON )
389GAME( 200?, jptparty,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Jackpot Party (Russia)", GAME_IS_SKELETON )
390GAME( 200?, leprgld,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Leprechaun's Gold (Russia)", GAME_IS_SKELETON )
391GAME( 200?, lol,        0,       wms, wms, wms_state, wms, ROT0, "WMS", "Life of Luxury (Russia)", GAME_IS_SKELETON )
392GAME( 200?, lovewin,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Love To Win (Russia)", GAME_IS_SKELETON )
393GAME( 200?, mtburn,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Money To Burn (Russia)", GAME_IS_SKELETON )
394GAME( 200?, otchart,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Off The Charts (Russia)", GAME_IS_SKELETON )
395GAME( 200?, perfect,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Perfect Game (Russia)", GAME_IS_SKELETON )
396GAME( 200?, reelemin,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Reel 'Em In (Russia)", GAME_IS_SKELETON )
397GAME( 200?, sonoth,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Something For Nothing (Russia)", GAME_IS_SKELETON )
398GAME( 200?, swingin,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Swingin In The Green (Russia)", GAME_IS_SKELETON )
399GAME( 200?, wmstopb,    0,       wms, wms, wms_state, wms, ROT0, "WMS", "Top Banana (Russia)", GAME_IS_SKELETON )
400GAME( 200?, wdun,       0,       wms, wms, wms_state, wms, ROT0, "WMS", "Who Dunnit (Russia)", GAME_IS_SKELETON )
401GAME( 200?, winbid,     0,       wms, wms, wms_state, wms, ROT0, "WMS", "Winning Bid (Russia)", GAME_IS_SKELETON )
402GAME( 200?, wldstrek,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Wild Streak (Russia)", GAME_IS_SKELETON )
403GAME( 200?, yukongld,   0,       wms, wms, wms_state, wms, ROT0, "WMS", "Yukon Gold (Russia)", GAME_IS_SKELETON )
trunk/src/mess/includes/sms.h
r243727r243728
1919#define CONTROL1_TAG   "ctrl1"
2020#define CONTROL2_TAG   "ctrl2"
2121
22#include "bus/sega8/sega8_slot.h"
23#include "bus/sms_exp/smsexp.h"
24#include "bus/sms_ctrl/smsctrl.h"
2522#include "bus/gamegear/ggext.h"
23#include "bus/sms_ctrl/smsctrl.h"
24#include "bus/sms_exp/smsexp.h"
25#include "bus/sega8/sega8_slot.h"
2626
2727
2828class sms_state : public driver_device
r243727r243728
3232      : driver_device(mconfig, type, tag),
3333      m_maincpu(*this, "maincpu"),
3434      m_vdp(*this, "sms_vdp"),
35      m_main_scr(*this, "screen"),
3635      m_ym(*this, "ym2413"),
36      m_main_scr(*this, "screen"),
37      m_region_maincpu(*this, "maincpu"),
3738      m_port_ctrl1(*this, CONTROL1_TAG),
3839      m_port_ctrl2(*this, CONTROL2_TAG),
3940      m_port_gg_ext(*this, "ext"),
r243727r243728
4445      m_port_scope(*this, "SEGASCOPE"),
4546      m_port_scope_binocular(*this, "SSCOPE_BINOCULAR"),
4647      m_port_persist(*this, "PERSISTENCE"),
47      m_region_maincpu(*this, "maincpu"),
4848      m_mainram(NULL),
4949      m_is_gamegear(0),
5050      m_is_gg_region_japan(0),
r243727r243728
6161   // devices
6262   required_device<cpu_device> m_maincpu;
6363   required_device<sega315_5124_device> m_vdp;
64   required_device<screen_device> m_main_scr;
6564   optional_device<ym2413_device> m_ym;
65   required_device<screen_device> m_main_scr;
66   required_memory_region m_region_maincpu;
6667   optional_device<sms_control_port_device> m_port_ctrl1;
6768   optional_device<sms_control_port_device> m_port_ctrl2;
6869   optional_device<gg_ext_port_device> m_port_gg_ext;
69
7070   optional_ioport m_port_gg_dc;
7171   optional_ioport m_port_pause;
7272   optional_ioport m_port_reset;
r243727r243728
7575   optional_ioport m_port_scope_binocular;
7676   optional_ioport m_port_persist;
7777
78   required_memory_region m_region_maincpu;
7978   address_space *m_space;
8079   UINT8 *m_mainram;
8180   UINT8 *m_BIOS;
r243727r243728
122121   UINT8 m_gg_sio[5];
123122   int m_paused;
124123
124   // Data needed for Light Phaser
125125   UINT8 m_ctrl1_th_state;
126126   UINT8 m_ctrl2_th_state;
127127   UINT8 m_ctrl1_th_latch;
128128   UINT8 m_ctrl2_th_latch;
129
130   // Data needed for Light Phaser
131129   int m_lphaser_x_offs;   /* Needed to 'calibrate' lphaser; set at cart loading */
132130
133131   // Data needed for SegaScope (3D glasses)
r243727r243728
162160   DECLARE_READ8_MEMBER(sms_input_port_dc_r);
163161   DECLARE_READ8_MEMBER(sms_input_port_dd_r);
164162   DECLARE_READ8_MEMBER(gg_input_port_00_r);
165   DECLARE_READ8_MEMBER(gg_sio_r);
166163   DECLARE_WRITE8_MEMBER(gg_sio_w);
167   DECLARE_READ8_MEMBER(sms_fm_detect_r);
164   DECLARE_READ8_MEMBER(gg_sio_r);
168165   DECLARE_WRITE8_MEMBER(sms_fm_detect_w);
166   DECLARE_READ8_MEMBER(sms_fm_detect_r);
169167   DECLARE_WRITE8_MEMBER(sms_ym2413_register_port_w);
170168   DECLARE_WRITE8_MEMBER(sms_ym2413_data_port_w);
171169   DECLARE_READ8_MEMBER(sms_sscope_r);
trunk/src/mess/machine/sms.c
r243727r243728
869869      // a bug in the program code. The only way this cartridge could have run
870870      // successfully on a real unit is if the RAM would be initialized with
871871      // a F0 pattern on power up; F0 = RET P.
872      // This initialization breaks some Game Gear games though (e.g.
872      // This initialization breaks the some Game Gear games though (e.g.
873873      // tempojr), suggesting that not all systems had the same initialization.
874      // This also breaks some homebrew software (e.g. Nine Pixels).
875874      // For the moment we apply this to systems that have the Japanese SMS
876875      // cartridge slot.
877876      if (m_has_jpn_sms_cart_slot)
trunk/src/osd/modules/debugger/osx/breakpointsview.m
r243727r243728
1717@implementation MAMEBreakpointsView
1818
1919- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
20   if (!(self = [super initWithFrame:f type:DVT_BREAK_POINTS machine:m wholeLineScroll:YES]))
20   if (!(self = [super initWithFrame:f type:DVT_BREAK_POINTS machine:m]))
2121      return nil;
2222   return self;
2323}
trunk/src/osd/modules/debugger/osx/consoleview.m
r243727r243728
1717@implementation MAMEConsoleView
1818
1919- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
20   if (!(self = [super initWithFrame:f type:DVT_CONSOLE machine:m wholeLineScroll:NO]))
20   if (!(self = [super initWithFrame:f type:DVT_CONSOLE machine:m]))
2121      return nil;
2222   return self;
2323}
trunk/src/osd/modules/debugger/osx/debugview.h
r243727r243728
2222   int            type;
2323   running_machine   *machine;
2424   debug_view      *view;
25   BOOL         wholeLineScroll;
2625
2726   INT32         totalWidth, totalHeight, originTop;
2827
r243727r243728
3635
3736+ (NSFont *)defaultFont;
3837
39- (id)initWithFrame:(NSRect)f type:(debug_view_type)t machine:(running_machine &)m wholeLineScroll:(BOOL)w;
38- (id)initWithFrame:(NSRect)f type:(debug_view_type)t machine:(running_machine &)m;
4039
4140- (void)update;
4241
trunk/src/osd/modules/debugger/osx/debugview.m
r243727r243728
168168   // this gets all the lines that are at least partially visible
169169   debug_view_xy origin(0, 0), size(totalWidth, totalHeight);
170170   [self convertBounds:[self visibleRect] toFirstAffectedLine:&origin.y count:&size.y];
171   size.y = MIN(size.y, totalHeight - origin.y);
172171
173172   // tell the underlying view how much real estate is available
174173   view->set_visible_size(size);
r243727r243728
197196
198197- (void)adjustSizeAndRecomputeVisible {
199198   NSSize const clip = [[[self enclosingScrollView] contentView] bounds].size;
200   NSSize content = NSMakeSize((fontWidth * totalWidth) + (2 * [textContainer lineFragmentPadding]),
201                        fontHeight * totalHeight);
202   if (wholeLineScroll)
203      content.height += (fontHeight * 2) - 1;
204   [self setFrameSize:NSMakeSize(ceil(MAX(clip.width, content.width)),
205                          ceil(MAX(clip.height, content.height)))];
199   NSSize const content = NSMakeSize((fontWidth * totalWidth) + (2 * [textContainer lineFragmentPadding]),
200                             fontHeight * totalHeight);
201   [self setFrameSize:NSMakeSize(MAX(clip.width, content.width), MAX(clip.height, content.height))];
206202   [self recomputeVisible];
207203}
208204
r243727r243728
212208}
213209
214210
215- (id)initWithFrame:(NSRect)f type:(debug_view_type)t machine:(running_machine &)m wholeLineScroll:(BOOL)w {
211- (id)initWithFrame:(NSRect)f type:(debug_view_type)t machine:(running_machine &)m {
216212   if (!(self = [super initWithFrame:f]))
217213      return nil;
218214   type = t;
r243727r243728
222218      [self release];
223219      return nil;
224220   }
225   wholeLineScroll = w;
226   debug_view_xy const size = view->total_size();
227   totalWidth = size.x;
228   totalHeight = size.y;
221   totalWidth = totalHeight = 0;
229222   originTop = 0;
230223
231224   text = [[NSTextStorage alloc] init];
r243727r243728
265258      if (scroller)
266259      {
267260         NSSize const clip = [[scroller contentView] bounds].size;
268         NSSize content = NSMakeSize((fontWidth * newSize.x) + (2 * [textContainer lineFragmentPadding]),
269                              fontHeight * newSize.y);
270         if (wholeLineScroll)
271            content.height += (fontHeight * 2) - 1;
272         [self setFrameSize:NSMakeSize(ceil(MAX(clip.width, content.width)),
273                                ceil(MAX(clip.height, content.height)))];
261         NSSize const content = NSMakeSize((fontWidth * newSize.x) + (2 * [textContainer lineFragmentPadding]),
262                                   fontHeight * newSize.y);
263         [self setFrameSize:NSMakeSize(MAX(clip.width, content.width), MAX(clip.height, content.height))];
264         [self recomputeVisible];
274265      }
275266      totalWidth = newSize.x;
276267      totalHeight = newSize.y;
r243727r243728
282273   {
283274      NSRect const visible = [self visibleRect];
284275      NSPoint scroll = NSMakePoint(visible.origin.x, newOrigin.y * fontHeight);
276      if ((newOrigin.y + view->visible_size().y) == totalHeight)
277         scroll.y += (view->visible_size().y * fontHeight) - visible.size.height;
285278      [self scrollPoint:scroll];
286279      originTop = newOrigin.y;
287280   }
r243727r243728
294287- (NSSize)maximumFrameSize {
295288   debug_view_xy const max = view->total_size();
296289   return NSMakeSize(ceil((max.x * fontWidth) + (2 * [textContainer lineFragmentPadding])),
297                 ceil((max.y + (wholeLineScroll ? 1 : 0)) * fontHeight));
290                 ceil(max.y * fontHeight));
298291}
299292
300293
r243727r243728
526519                                     selector:@selector(viewFrameDidChange:)
527520                                        name:NSViewFrameDidChangeNotification
528521                                       object:[scroller contentView]];
529      [self adjustSizeAndRecomputeVisible];
530522   }
531523}
532524
r243727r243728
566558}
567559
568560
569- (NSRect)adjustScroll:(NSRect)proposedVisibleRect {
570   if (wholeLineScroll)
571   {
572      CGFloat const clamp = [self bounds].size.height - fontHeight - proposedVisibleRect.size.height;
573      proposedVisibleRect.origin.y = MIN(proposedVisibleRect.origin.y, MAX(clamp, 0));
574      proposedVisibleRect.origin.y -= fmod(proposedVisibleRect.origin.y, fontHeight);
575   }
576   return proposedVisibleRect;
577}
578
579
580561- (void)drawRect:(NSRect)dirtyRect {
581562   // work out what's available
582563   [self recomputeVisible];
trunk/src/osd/modules/debugger/osx/debugwindowhandler.m
r243727r243728
316316}
317317
318318- (void)cascadeWindowWithDesiredSize:(NSSize)desired forView:(NSView *)view {
319   // convert desired size to an adjustment and apply it to the current window frame
320   NSSize const current = [view frame].size;
319   NSRect   available = [[NSScreen mainScreen] visibleFrame];
320   NSRect   windowFrame = [window frame];
321   NSSize   current = [view frame].size;
322
321323   desired.width -= current.width;
322324   desired.height -= current.height;
323   NSRect windowFrame = [window frame];
324   windowFrame.size.width += desired.width;
325   windowFrame.size.height += desired.height;
326325
327   // limit the size to the minimum size
328   NSSize const minimum = [window minSize];
329   windowFrame.size.width = MAX(windowFrame.size.width, minimum.width);
330   windowFrame.size.height = MAX(windowFrame.size.height, minimum.height);
331
332   // limit the size to the main screen size
333   NSRect const available = [[NSScreen mainScreen] visibleFrame];
326   windowFrame.size.width += desired.width;
334327   windowFrame.size.width = MIN(windowFrame.size.width, available.size.width);
335   windowFrame.size.height = MIN(windowFrame.size.height, available.size.height);
336
337   // arbitrary additional height limit
338   windowFrame.size.height = MIN(windowFrame.size.height, 320);
339
340   // place it in the bottom right corner and apply
328   windowFrame.size.height += desired.height;
329   windowFrame.size.height = MIN(MIN(MAX(windowFrame.size.height, 120), 320), available.size.height);
341330   windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width;
342331   windowFrame.origin.y = available.origin.y;
343332   [window setFrame:windowFrame display:YES];
344333   [[self class] cascadeWindow:window];
334
335   windowFrame = [[window contentView] frame];
336   desired = [window contentMinSize];
337   [window setContentMinSize:NSMakeSize(MIN(windowFrame.size.width, desired.width),
338                               MIN(windowFrame.size.height, desired.height))];
345339}
346340
347341@end
trunk/src/osd/modules/debugger/osx/disassemblyview.m
r243727r243728
1717@implementation MAMEDisassemblyView
1818
1919- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
20   if (!(self = [super initWithFrame:f type:DVT_DISASSEMBLY machine:m wholeLineScroll:NO]))
20   if (!(self = [super initWithFrame:f type:DVT_DISASSEMBLY machine:m]))
2121      return nil;
2222   return self;
2323}
trunk/src/osd/modules/debugger/osx/errorlogview.m
r243727r243728
1717@implementation MAMEErrorLogView
1818
1919- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
20   if (!(self = [super initWithFrame:f type:DVT_LOG machine:m wholeLineScroll:NO]))
20   if (!(self = [super initWithFrame:f type:DVT_LOG machine:m]))
2121      return nil;
2222   return self;
2323}
trunk/src/osd/modules/debugger/osx/memoryview.m
r243727r243728
1818@implementation MAMEMemoryView
1919
2020- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
21   if (!(self = [super initWithFrame:f type:DVT_MEMORY machine:m wholeLineScroll:NO]))
21   if (!(self = [super initWithFrame:f type:DVT_MEMORY machine:m]))
2222      return nil;
2323   return self;
2424}
trunk/src/osd/modules/debugger/osx/registersview.m
r243727r243728
1818@implementation MAMERegistersView
1919
2020- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
21   if (!(self = [super initWithFrame:f type:DVT_STATE machine:m wholeLineScroll:NO]))
21   if (!(self = [super initWithFrame:f type:DVT_STATE machine:m]))
2222      return nil;
2323   return self;
2424}
trunk/src/osd/modules/debugger/osx/watchpointsview.m
r243727r243728
1717@implementation MAMEWatchpointsView
1818
1919- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
20   if (!(self = [super initWithFrame:f type:DVT_WATCH_POINTS machine:m wholeLineScroll:YES]))
20   if (!(self = [super initWithFrame:f type:DVT_WATCH_POINTS machine:m]))
2121      return nil;
2222   return self;
2323}
trunk/src/osd/sdl/sdl.mak
r243727r243728
734734LIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static
735735BASELIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static
736736else
737LIBS += -lSDL -static
738BASELIBS += -lSDL -static
737LIBS += -lSDL -lws2_32 -static
738BASELIBS += -lSDL -lws2_32 -static
739739endif
740740LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
741741BASELIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi


Previous 199869 Revisions Next


© 1997-2024 The MAME Team