Mercurial > repos > blastem
comparison vdp.c @ 1928:abc89555f2e0
Admit defeat on the "trying to write CRAM dots while output is null issue" for now and just add a null check
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 16 Apr 2020 22:37:43 -0700 |
parents | 039553703c20 |
children | c7e3e3ebb64a |
comparison
equal
deleted
inserted
replaced
1927:9fd4bedc1a31 | 1928:abc89555f2e0 |
---|---|
812 addr = address & 0x1F; | 812 addr = address & 0x1F; |
813 value = (value << 1 & 0xE) | (value << 2 & 0xE0) | (value & 0xE00); | 813 value = (value << 1 & 0xE) | (value << 2 & 0xE0) | (value & 0xE00); |
814 } | 814 } |
815 write_cram_internal(context, addr, value); | 815 write_cram_internal(context, addr, value); |
816 | 816 |
817 if (context->hslot >= BG_START_SLOT && ( | 817 if (context->output && context->hslot >= BG_START_SLOT && ( |
818 context->vcounter < context->inactive_start + context->border_bot | 818 context->vcounter < context->inactive_start + context->border_bot |
819 || context->vcounter > 0x200 - context->border_top | 819 || context->vcounter > 0x200 - context->border_top |
820 )) { | 820 )) { |
821 uint8_t bg_end_slot = BG_START_SLOT + (context->regs[REG_MODE_4] & BIT_H40) ? LINEBUF_SIZE/2 : (256+HORIZ_BORDER)/2; | 821 uint8_t bg_end_slot = BG_START_SLOT + (context->regs[REG_MODE_4] & BIT_H40) ? LINEBUF_SIZE/2 : (256+HORIZ_BORDER)/2; |
822 if (context->hslot < bg_end_slot) { | 822 if (context->hslot < bg_end_slot) { |