MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / custom_trigger_start

Function custom_trigger_start

src/custom.cpp:10996–11191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10994}
10995
10996static void custom_trigger_start(void)
10997{
10998 if (vdiwstate == diw_states::DIW_waiting_stop && dmaen(DMA_BITPLANE)) {
10999 bpl_autoscale();
11000 }
11001
11002 vpos_prev = vpos;
11003 vpos++;
11004 vpos &= 2047;
11005 if (!ecs_agnus) {
11006 vpos &= 511;
11007 }
11008 linear_display_vpos = linear_vpos;
11009 linear_vpos++;
11010 linear_vpos_vblank_lines_cnt++;
11011 draw_line_next_line = 0;
11012
11013 linear_vpos_vsync++;
11014
11015 if (linear_display_vpos == linear_vpos_vb_end) {
11016 linear_vb_offset = linear_display_vpos;
11017 }
11018
11019#if 1
11020 if (beamcon0_has_vsync) {
11021 if (vpos == vsstrt) {
11022 linear_vpos_vsync = 0;
11023 }
11024 } else {
11025 if (beamcon0_pal && (vpos == 3 && lof_store) || (vpos == 2 && !lof_store)) {
11026 linear_vpos_vsync = 0;
11027 }
11028 if (!beamcon0_pal && vpos == 3) {
11029 linear_vpos_vsync = 0;
11030 }
11031 }
11032#endif
11033
11034 /* See if there's a chance of a copper wait ending this line. */
11035 compute_spcflag_copper();
11036
11037 if (linear_vpos < MAX_SCANDOUBLED_LINES) {
11038 current_line_state = &lines[linear_vpos][lof_display];
11039 }
11040
11041 bool vposzero = false;
11042 // LOF=1 is always matched, even when LOF=0 but only in PAL/NTSC modes
11043 if ((vpos == maxvpos + lof_store) || (vpos == maxvpos_long)) {
11044 vpos = 0;
11045 check_vsyncs();
11046
11047 hsync_handler(true);
11048 vsync_handler_post();
11049
11050 vsync_counter++;
11051 COPJMP(1, true);
11052
11053 if (bplcon0 & 4) {

Callers 3

do_cckFunction · 0.85
sync_equalline_handlerFunction · 0.85
sync_imm_evhandlerFunction · 0.85

Calls 15

dmaenFunction · 0.85
bpl_autoscaleFunction · 0.85
compute_spcflag_copperFunction · 0.85
check_vsyncsFunction · 0.85
hsync_handlerFunction · 0.85
vsync_handler_postFunction · 0.85
COPJMPFunction · 0.85
update_agnus_vbFunction · 0.85
check_no_signalFunction · 0.85
setmaxhposFunction · 0.85
get_cck_cyclesFunction · 0.85
start_dmalFunction · 0.85

Tested by

no test coverage detected