Mercurial > repos > blastem
comparison vdp.c @ 461:6221f8f534fa
Merge
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 10 Sep 2013 00:30:39 -0700 |
parents | 788ba843a731 c49ecf575784 |
children | 5677c053edd6 |
comparison
equal
deleted
inserted
replaced
460:788ba843a731 | 461:6221f8f534fa |
---|---|
1519 if ((context->regs[REG_MODE_4] & BIT_INTERLACE) && context->framebuf == context->oddbuf) { | 1519 if ((context->regs[REG_MODE_4] & BIT_INTERLACE) && context->framebuf == context->oddbuf) { |
1520 value |= 0x10; | 1520 value |= 0x10; |
1521 } | 1521 } |
1522 uint32_t line= context->cycles / MCLKS_LINE; | 1522 uint32_t line= context->cycles / MCLKS_LINE; |
1523 uint32_t linecyc = context->cycles % MCLKS_LINE; | 1523 uint32_t linecyc = context->cycles % MCLKS_LINE; |
1524 if (line >= (context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE) || context->cycles < (context->latched_mode & BIT_H40 ? 16*4 : 16*5)) { | 1524 if (line >= (context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE)) { |
1525 value |= 0x8; | 1525 value |= 0x8; |
1526 } | 1526 } |
1527 if (linecyc < (context->latched_mode & BIT_H40 ? HBLANK_CLEAR_H40 : HBLANK_CLEAR_H32)) { | 1527 if (linecyc < (context->latched_mode & BIT_H40 ? HBLANK_CLEAR_H40 : HBLANK_CLEAR_H32)) { |
1528 value |= 0x4; | 1528 value |= 0x4; |
1529 } | 1529 } |
1531 value |= 0x2; | 1531 value |= 0x2; |
1532 } | 1532 } |
1533 if (context->latched_mode & BIT_PAL) {//Not sure about this, need to verify | 1533 if (context->latched_mode & BIT_PAL) {//Not sure about this, need to verify |
1534 value |= 0x1; | 1534 value |= 0x1; |
1535 } | 1535 } |
1536 //printf("status read at cycle %d returned %X\n", context->cycles, value); | |
1536 //TODO: Sprite overflow, sprite collision, odd frame flag | 1537 //TODO: Sprite overflow, sprite collision, odd frame flag |
1537 return value; | 1538 return value; |
1538 } | 1539 } |
1539 | 1540 |
1540 uint16_t vdp_data_port_read(vdp_context * context) | 1541 uint16_t vdp_data_port_read(vdp_context * context) |