// draw line up to current horizontal position to get accurate collision state
if (currprefs.cpu_memory_cycle_exact && currprefs.m68k_speed >= 0 && !doflickerfix_active()) {
int ldvpos = linear_display_vpos + draw_line_next_line;
- ldvpos -= linear_vb_offset;
draw_line(ldvpos, false);
}
draw_denise_line_queue_flush();
static int calculate_linetype(int vp)
{
- int lineno = vp;
+ int lineno = vp - linear_vb_offset;
nextline_how = nln_normal;
if (doflickerfix_active()) {
lineno *= 2;
vsync_mark();
}
agnus_vsync = true;
- lof_detect = 1;
+ lof_detect = 0;
update_lof_detect();
}
if (vpos == 2 && !lof_store) {
vsync_mark();
}
agnus_vsync = true;
- lof_detect = 0;
+ lof_detect = 1;
update_lof_detect();
}
if (vpos == 5) {
vsync_mark();
}
agnus_pvsync = true;
- lof_pdetect = 1;
+ lof_pdetect = 0;
}
if (!lof_store && vpos == vsstop) {
agnus_pvsync = false;
}
- if (lof_store && vpos == vsstrt) {
- if (!agnus_pvsync && beamcon0_has_vsync) {
- vsync_mark();
- }
- agnus_pvsync = true;
- lof_pdetect = 0;
- }
if (lof_store && vpos == vsstop) {
agnus_pvsync = false;
}
}
}
- if (programmed_register_accessed_h) {
+ if (programmed_register_accessed_v && programmed_register_accessed_h) {
if (hcenter < maxhpos) {
if (lof_store && vpos == vsstrt) {
if (!agnus_pvsync && beamcon0_has_vsync) {
vsync_mark();
}
agnus_pvsync = true;
- lof_pdetect = 0;
+ lof_pdetect = 1;
}
if (lof_store && vpos == vsstop) {
agnus_pvsync = false;
}
start_draw_denise();
int dvp = calculate_linetype(ldv);
- dvp -= linear_vb_offset;
draw_denise_border_line_fast_queue(dvp, true, nextline_how, l);
return true;
}
l->color0 = aga_mode ? agnus_colors.color_regs_aga[0] : agnus_colors.color_regs_ecs[0];
l->brdblank = brdblank;
int dvp = calculate_linetype(ldv);
- dvp -= linear_vb_offset;
draw_denise_border_line_fast_queue(dvp, false, nextline_how, l);
return true;
}
l->bplcon1 = bplcon1 & bc1mask;
l->fetchmode_size = fetchmode_size;
l->fetchstart_mask = fetchstart_mask;
- dvp -= linear_vb_offset;
draw_denise_bitplane_line_fast_queue(dvp, nextline_how, l);
if (addbpl) {
// advance bpl pointers
int cs = 0;// (beamcon0 & BEAMCON0_VARHSYEN) ? agnus_phsync_end - agnus_phsync_start : agnus_hsync_end - agnus_hsync_start;
int cslen = 10;
- dvp -= linear_vb_offset;
draw_denise_line_queue(dvp, nextline_how, rga_denise_cycle_line, rga_denise_cycle_start, rga_denise_cycle, rga_denise_cycle_count_start, rga_denise_cycle_count_end,
display_hstart_cyclewait_skip, display_hstart_cyclewait_skip2,
wclks, cs, cslen, lof_store, lol, display_hstart_fastmode - display_hstart_cyclewait, nosignal_status != 0, finalseg, l);
linear_vpos_vsync++;
if (linear_display_vpos == linear_vpos_vb_end) {
- int dvp = calculate_linetype(linear_display_vpos);
- linear_vb_offset = dvp;
+ linear_vb_offset = linear_display_vpos;
}
#if 1
vsync_mark();
}
agnus_vsync = true;
- lof_detect = 1;
+ lof_detect = 0;
update_lof_detect();
#ifdef DEBUGGER
if (debug_dma) {
vsync_mark();
}
agnus_vsync = true;
- lof_detect = 0;
+ lof_detect = 1;
update_lof_detect();
#ifdef DEBUGGER
if (debug_dma) {
if (beamcon0_has_vsync) {
vsync_mark();
}
- lof_pdetect = 1;
+ lof_pdetect = 0;
#ifdef DEBUGGER
if (debug_dma) {
record_dma_event_agnus(AGNUS_EVENT_PRG_VS, true);
vsync_mark();
}
agnus_pvsync = true;
- lof_pdetect = 0;
+ lof_pdetect = 1;
#ifdef DEBUGGER
if (debug_dma) {
record_dma_event_agnus(AGNUS_EVENT_PRG_VS, true);