Previous 15994 Revisions Next

r8418 Wednesday 7th July, 2010 at 07:01:37 UTC by Miodrag Milanović
Fixes for PPC OSX from MAME [R.Belmont]
[src/emu]info.c ui.c
[src/emu/debug]debugcmd.c debugcpu.c
[src/emu/machine]generic.c
[src/osd/sdl]debugosx.h debugosx.m

src/osd/sdl/debugosx.h
r8417r8418
109109   running_machine   *machine;
110110   debug_view      *view;
111111
112   debug_view_xy   totalSize, topLeft;
112   debug_view_xy   *totalSize, *topLeft;
113113
114114   NSFont         *font;
115115   CGFloat         fontWidth, fontHeight, fontAscent;
src/osd/sdl/debugosx.m
r8417r8418
272272   position.y = lround(floor(location.y / fontHeight));
273273   if (position.x < 0)
274274      position.x = 0;
275   else if (position.x >= totalSize.x)
276      position.x = totalSize.x - 1;
275   else if (position.x >= totalSize->x)
276      position.x = totalSize->x - 1;
277277   if (position.y < 0)
278278      position.y = 0;
279   else if (position.y >= totalSize.y)
280      position.y = totalSize.y - 1;
279   else if (position.y >= totalSize->y)
280      position.y = totalSize->y - 1;
281281   return position;
282282}
283283
r8417r8418
299299
300300      // need to render entire lines or we get screwed up characters when widening views
301301      origin.x = 0;
302      size.x = totalSize.x;
302      size.x = totalSize->x;
303303
304304      // tell them what we think
305305      view->set_visible_size(size);
306306      view->set_visible_position(origin);
307      topLeft = origin;
307      topLeft->x = origin.x;
308      topLeft->y = origin.y;
308309   }
309310}
310311
r8417r8418
344345      [self release];
345346      return nil;
346347   }
347   totalSize.x = totalSize.y = 0;
348   topLeft.x = topLeft.y = 0;
348   totalSize = global_alloc(debug_view_xy());
349   topLeft = global_alloc(debug_view_xy());
350   totalSize->x = totalSize->y = 0;
351   topLeft->x = topLeft->y = 0;
349352   [self setFont:[[self class] defaultFont]];
350353   return self;
351354}
r8417r8418
355358   [[NSNotificationCenter defaultCenter] removeObserver:self];
356359   if (font != nil)
357360      [font release];
361   global_free(totalSize);
362   global_free(topLeft);
358363   [super dealloc];
359364}
360365
r8417r8418
364369
365370   // resize our frame if the total size has changed
366371   newSize = view->total_size();
367   if ((newSize.x != totalSize.x) || (newSize.y != totalSize.y)) {
372   if ((newSize.x != totalSize->x) || (newSize.y != totalSize->y)) {
368373      [self setFrameSize:NSMakeSize(fontWidth * newSize.x, fontHeight * newSize.y)];
369      totalSize = newSize;
374      totalSize->x = newSize.x;
375      totalSize->y = newSize.y;
370376   }
371377
372378   // scroll the view if we're being told to
373379   newOrigin = view->visible_position();
374   if (newOrigin.y != topLeft.y) {
380   if (newOrigin.y != topLeft->y) {
375381      [self scrollPoint:NSMakePoint([self visibleRect].origin.x, newOrigin.y * fontHeight)];
376      topLeft.y = newOrigin.y;
382      topLeft->y = newOrigin.y;
377383   }
378384
379385   // recompute the visible area and mark as dirty
r8417r8418
400406   fontHeight = ceil([font ascender] - [font descender]);
401407   fontAscent = [font ascender];
402408   [[self enclosingScrollView] setLineScroll:fontHeight];
403   totalSize.x = totalSize.y = 0;
409   totalSize->x = totalSize->y = 0;
404410   [self update];
405411}
406412
src/emu/debug/debugcpu.c
r8417r8418
15301530   running_machine *machine = (running_machine *)globalref;
15311531   device_t *target = machine->debugcpu_data->visiblecpu;
15321532
1533   device_execute_interface *exec;
1533   device_execute_interface *exec = NULL;
15341534   int index = 0;
15351535   for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
15361536   {
src/emu/debug/debugcmd.c
r8417r8418
534534   }
535535
536536   /* if we got a valid one, return */
537   device_execute_interface *exec;
537   device_execute_interface *exec = NULL;
538538   for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
539539      if (cpunum-- == 0)
540540      {
r8417r8418
972972   cpu->debug()->ignore(false);
973973
974974   /* then loop over CPUs and set the ignore flags on all other CPUs */
975   device_execute_interface *exec;
975   device_execute_interface *exec = NULL;
976976   for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
977977      if (&exec->device() != cpu)
978978         exec->device().debug()->ignore(true);
r8417r8418
992992      astring buffer;
993993
994994      /* loop over all executable devices */
995      device_execute_interface *exec;
995      device_execute_interface *exec = NULL;
996996      for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
997997
998998         /* build up a comma-separated list */
r8417r8418
10241024      for (int paramnum = 0; paramnum < params; paramnum++)
10251025      {
10261026         /* make sure this isn't the last live CPU */
1027         device_execute_interface *exec;
1027         device_execute_interface *exec = NULL;
10281028         bool gotone;
10291029         for (gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
10301030            if (&exec->device() != devicelist[paramnum] && exec->device().debug()->observing())
r8417r8418
10541054      astring buffer;
10551055
10561056      /* loop over all executable devices */
1057      device_execute_interface *exec;
1057      device_execute_interface *exec = NULL;
10581058      for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
10591059
10601060         /* build up a comma-separated list */
src/emu/ui.c
r8417r8418
10041004   string.printf("%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer);
10051005
10061006   /* loop over all CPUs */
1007   device_execute_interface *exec;
1007   device_execute_interface *exec = NULL;
10081008   for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
10091009   {
10101010      /* get cpu specific clock that takes internal multiplier/dividers into account */
r8417r8418
10121012
10131013      /* count how many identical CPUs we have */
10141014      int count = 1;
1015      device_execute_interface *scan;
1015      device_execute_interface *scan = NULL;
10161016      for (bool gotone = exec->next(scan); gotone; gotone = scan->next(scan))
10171017      {
10181018         if (exec->device().type() != scan->device().type() || exec->device().clock() != scan->device().clock())
r8417r8418
10441044
10451045      /* count how many identical sound chips we have */
10461046      int count = 1;
1047      device_sound_interface *scan;
1047      device_sound_interface *scan = NULL;
10481048      for (bool gotanother = sound->next(scan); gotanother; gotanother = scan->next(scan))
10491049      {
10501050         if (sound->device().type() != scan->device().type() || sound->device().clock() != scan->device().clock())
r8417r8418
16451645   /* add CPU overclocking (cheat only) */
16461646   if (options_get_bool(machine->options(), OPTION_CHEAT))
16471647   {
1648      device_execute_interface *exec;
1648      device_execute_interface *exec = NULL;
16491649      for (bool gotone = machine->m_devicelist.first(exec); exec != NULL; gotone = exec->next(exec))
16501650      {
16511651         void *param = (void *)&exec->device();
src/emu/info.c
r8417r8418
636636static void print_game_chips(FILE *out, const game_driver *game, const machine_config *config)
637637{
638638   /* iterate over CPUs */
639   const device_config_execute_interface *exec;
639   const device_config_execute_interface *exec = NULL;
640640   for (bool gotone = config->m_devicelist.first(exec); gotone; gotone = exec->next(exec))
641641   {
642642      fprintf(out, "\t\t<chip");
src/emu/machine/generic.c
r8417r8418
9494
9595   // map devices to the interrupt state
9696   memset(state->interrupt_device, 0, sizeof(state->interrupt_device));
97   device_execute_interface *exec;
97   device_execute_interface *exec = NULL;
9898   int index = 0;
9999   for (bool gotone = machine->m_devicelist.first(exec); gotone && index < ARRAY_LENGTH(state->interrupt_device); gotone = exec->next(exec))
100100      state->interrupt_device[index++] = &exec->device();

Previous 15994 Revisions Next


© 1998-2018 The MESS Team