~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/emu/video/voodoo.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        }
380
380
 
381
381
        /* debugging! */
382
 
        if (input_code_pressed(KEYCODE_L))
 
382
        if (input_code_pressed(device->machine, KEYCODE_L))
383
383
                drawbuf = v->fbi.backbuf;
384
384
 
385
385
        /* copy from the current front buffer */
393
393
                }
394
394
 
395
395
        /* update stats display */
396
 
        statskey = (input_code_pressed(KEYCODE_BACKSLASH) != 0);
 
396
        statskey = (input_code_pressed(device->machine, KEYCODE_BACKSLASH) != 0);
397
397
        if (statskey && statskey != v->stats.lastkey)
398
398
                v->stats.display = !v->stats.display;
399
399
        v->stats.lastkey = statskey;
403
403
                popmessage(v->stats.buffer, 0, 0);
404
404
 
405
405
        /* update render override */
406
 
        v->stats.render_override = input_code_pressed(KEYCODE_ENTER);
 
406
        v->stats.render_override = input_code_pressed(device->machine, KEYCODE_ENTER);
407
407
        if (DEBUG_DEPTH && v->stats.render_override)
408
408
        {
409
409
                for (y = cliprect->min_y; y <= cliprect->max_y; y++)
3419
3419
        voodoo_state *v = get_safe_token(device);
3420
3420
        int stall = FALSE;
3421
3421
 
3422
 
        profiler_mark(PROFILER_USER1);
 
3422
        profiler_mark_start(PROFILER_USER1);
3423
3423
 
3424
3424
        /* should not be getting accesses while stalled */
3425
3425
        if (v->pci.stall_state != NOT_STALLED)
3447
3447
                                        if (offset & 0x40000/4)
3448
3448
                                                data = FLIPENDIAN_INT32(data);
3449
3449
                                        cmdfifo_w(v, &v->fbi.cmdfifo[0], offset & 0xffff, data);
3450
 
                                        profiler_mark(PROFILER_END);
 
3450
                                        profiler_mark_end();
3451
3451
                                        return;
3452
3452
                                }
3453
3453
 
3460
3460
                                                v->fbi.swaps_pending++;
3461
3461
 
3462
3462
                                        logerror("Ignoring write to %s in CMDFIFO mode\n", v->regnames[offset & 0xff]);
3463
 
                                        profiler_mark(PROFILER_END);
 
3463
                                        profiler_mark_end();
3464
3464
                                        return;
3465
3465
                                }
3466
3466
                        }
3477
3477
                /* ignore if writes aren't allowed */
3478
3478
                if (!(access & REGISTER_WRITE))
3479
3479
                {
3480
 
                        profiler_mark(PROFILER_END);
 
3480
                        profiler_mark_end();
3481
3481
                        return;
3482
3482
                }
3483
3483
 
3513
3513
                                timer_get_time(device->machine).seconds, (UINT32)(timer_get_time(device->machine).attoseconds >> 32), (UINT32)timer_get_time(device->machine).attoseconds,
3514
3514
                                v->pci.op_end_time.seconds, (UINT32)(v->pci.op_end_time.attoseconds >> 32), (UINT32)v->pci.op_end_time.attoseconds);
3515
3515
                }
3516
 
                profiler_mark(PROFILER_END);
 
3516
                profiler_mark_end();
3517
3517
                return;
3518
3518
        }
3519
3519
 
3579
3579
                stall_cpu(v, STALLED_UNTIL_FIFO_EMPTY, timer_get_time(device->machine));
3580
3580
        }
3581
3581
 
3582
 
        profiler_mark(PROFILER_END);
 
3582
        profiler_mark_end();
3583
3583
}
3584
3584
 
3585
3585
 
4791
4791
        int destbuf;
4792
4792
        int pixels;
4793
4793
 
4794
 
        profiler_mark(PROFILER_USER2);
 
4794
        profiler_mark_start(PROFILER_USER2);
4795
4795
 
4796
4796
        /* determine the number of TMUs involved */
4797
4797
        texcount = 0;
4862
4862
        /* update stats */
4863
4863
        v->stats.total_triangles++;
4864
4864
 
4865
 
        profiler_mark(PROFILER_END);
 
4865
        profiler_mark_end();
4866
4866
 
4867
4867
        /* 1 pixel per clock, plus some setup time */
4868
4868
        if (LOG_REGISTERS) logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels);