comparison src/vdp.c @ 21:91ded3b12d96

Only run rendering hardware when display is enabled
author Michael Pavone <pavone@retrodev.com>
date Tue, 29 Mar 2016 19:59:26 -0700
parents 04fc17376999
children 407725d9a02f
comparison
equal deleted inserted replaced
20:a9364f5ee81a 21:91ded3b12d96
26 context->vcounter = 0; 26 context->vcounter = 0;
27 } 27 }
28 } 28 }
29 context->status &= ~(VDP_STATUS_VRAM|VDP_STATUS_SRAM); 29 context->status &= ~(VDP_STATUS_VRAM|VDP_STATUS_SRAM);
30 //Render to linebuffer 30 //Render to linebuffer
31 if (context->vcounter > 15 && context->vcounter < 240 && context->hcounter < 406) { 31 if ((context->status & VDP_STATUS_ENABLED) && context->vcounter > 15 && context->vcounter < 240 && context->hcounter < 406) {
32 if (context->hcounter < 246) { 32 if (context->hcounter < 246) {
33 context->status |= VDP_STATUS_VRAM; 33 context->status |= VDP_STATUS_VRAM;
34 if (!context->hcounter) { 34 if (!context->hcounter) {
35 //flip linebuffers 35 //flip linebuffers
36 if (context->drawbuffer == context->linebuffers) { 36 if (context->drawbuffer == context->linebuffers) {