pl111.cc (9806:3f262c18ad5d) pl111.cc (9939:735d73e394d3)
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 55 unchanged lines hidden (view full) ---

64 clcdCrsrPalette1(0), clcdCrsrXY(0), clcdCrsrClip(0), clcdCrsrImsc(0),
65 clcdCrsrIcr(0), clcdCrsrRis(0), clcdCrsrMis(0),
66 pixelClock(p->pixel_clock), vnc(p->vnc), bmp(NULL), pic(NULL),
67 width(LcdMaxWidth), height(LcdMaxHeight),
68 bytesPerPixel(4), startTime(0), startAddr(0), maxAddr(0), curAddr(0),
69 waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
70 dmaDoneEventAll(maxOutstandingDma, this),
71 dmaDoneEventFree(maxOutstandingDma),
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 55 unchanged lines hidden (view full) ---

64 clcdCrsrPalette1(0), clcdCrsrXY(0), clcdCrsrClip(0), clcdCrsrImsc(0),
65 clcdCrsrIcr(0), clcdCrsrRis(0), clcdCrsrMis(0),
66 pixelClock(p->pixel_clock), vnc(p->vnc), bmp(NULL), pic(NULL),
67 width(LcdMaxWidth), height(LcdMaxHeight),
68 bytesPerPixel(4), startTime(0), startAddr(0), maxAddr(0), curAddr(0),
69 waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
70 dmaDoneEventAll(maxOutstandingDma, this),
71 dmaDoneEventFree(maxOutstandingDma),
72 intEvent(this)
72 intEvent(this), enableCapture(p->enable_capture)
73{
74 pioSize = 0xFFFF;
75
76 dmaBuffer = new uint8_t[buffer_size];
77
78 memset(lcdPalette, 0, sizeof(lcdPalette));
79 memset(cursorImage, 0, sizeof(cursorImage));
80 memset(dmaBuffer, 0, buffer_size);

--- 411 unchanged lines hidden (view full) ---

492 if (!intEvent.scheduled())
493 schedule(intEvent, clockEdge());
494 }
495
496 assert(!readEvent.scheduled());
497 if (vnc)
498 vnc->setDirty();
499
73{
74 pioSize = 0xFFFF;
75
76 dmaBuffer = new uint8_t[buffer_size];
77
78 memset(lcdPalette, 0, sizeof(lcdPalette));
79 memset(cursorImage, 0, sizeof(cursorImage));
80 memset(dmaBuffer, 0, buffer_size);

--- 411 unchanged lines hidden (view full) ---

492 if (!intEvent.scheduled())
493 schedule(intEvent, clockEdge());
494 }
495
496 assert(!readEvent.scheduled());
497 if (vnc)
498 vnc->setDirty();
499
500 DPRINTF(PL111, "-- write out frame buffer into bmp\n");
500 if (enableCapture) {
501 DPRINTF(PL111, "-- write out frame buffer into bmp\n");
501
502
502 if (!pic)
503 pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
503 if (!pic)
504 pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
504
505
505 assert(bmp);
506 assert(pic);
507 pic->seekp(0);
508 bmp->write(pic);
506 assert(bmp);
507 assert(pic);
508 pic->seekp(0);
509 bmp->write(pic);
510 }
509
510 // schedule the next read based on when the last frame started
511 // and the desired fps (i.e. maxFrameTime), we turn the
512 // argument into a relative number of cycles in the future
513 if (lcdControl.lcden)
514 schedule(readEvent, clockEdge(ticksToCycles(startTime -
515 curTick() +
516 maxFrameTime)));

--- 239 unchanged lines hidden ---
511
512 // schedule the next read based on when the last frame started
513 // and the desired fps (i.e. maxFrameTime), we turn the
514 // argument into a relative number of cycles in the future
515 if (lcdControl.lcden)
516 schedule(readEvent, clockEdge(ticksToCycles(startTime -
517 curTick() +
518 maxFrameTime)));

--- 239 unchanged lines hidden ---