comparison vdp.c @ 333:f16136a3835d

Update Z80 vint timing
author Mike Pavone <pavone@retrodev.com>
date Tue, 14 May 2013 00:40:10 -0700
parents 671a5be51522
children 4c91470e1a53
comparison
equal deleted inserted replaced
332:671a5be51522 333:f16136a3835d
1570 return 0xFFFFFFFF; 1570 return 0xFFFFFFFF;
1571 } 1571 }
1572 return vcycle; 1572 return vcycle;
1573 } 1573 }
1574 1574
1575 uint32_t vdp_next_vint_z80(vdp_context * context)
1576 {
1577 uint32_t active_lines = context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE;
1578 uint32_t vcycle = MCLKS_LINE * active_lines;
1579 if (context->latched_mode & BIT_H40) {
1580 vcycle += VINT_CYCLE_H40;
1581 } else {
1582 vcycle += VINT_CYCLE_H32;
1583 }
1584 return vcycle;
1585 }
1586
1575 void vdp_int_ack(vdp_context * context, uint16_t int_num) 1587 void vdp_int_ack(vdp_context * context, uint16_t int_num)
1576 { 1588 {
1577 if (int_num == 6) { 1589 if (int_num == 6) {
1578 context->flags2 &= ~FLAG2_VINT_PENDING; 1590 context->flags2 &= ~FLAG2_VINT_PENDING;
1579 } else if(int_num ==4) { 1591 } else if(int_num ==4) {