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

Function hsync_handler_post

src/custom.cpp:6282–6468  ·  view source on GitHub ↗

this prepares for new line

Source from the content-addressed store, hash-verified

6280
6281// this prepares for new line
6282static void hsync_handler_post(bool onvsync)
6283{
6284 cia_hsync_do();
6285
6286
6287#if 0
6288 if (!custom_disabled) {
6289 if (!currprefs.blitter_cycle_exact && blt_info.blit_main && dmaen (DMA_BITPLANE) && vdiwstate == diw_states::DIW_waiting_stop) {
6290 blitter_slowdown(thisline_decision.plfleft, thisline_decision.plfright - (16 << fetchmode),
6291 cycle_diagram_total_cycles[fetchmode][GET_RES_AGNUS (bplcon0)][GET_PLANES_LIMIT (bplcon0)],
6292 cycle_diagram_free_cycles[fetchmode][GET_RES_AGNUS (bplcon0)][GET_PLANES_LIMIT (bplcon0)]);
6293 }
6294 }
6295#endif
6296
6297#if 0
6298 // AF testing stuff
6299 static int cnt = 0;
6300 cnt++;
6301 if (cnt == 500) {
6302 int port_insert_custom (int inputmap_port, int devicetype, DWORD flags, const TCHAR *custom);
6303 //port_insert_custom (0, 2, 0, _T("Left=0xCB Right=0xCD Up=0xC8 Down=0xD0 Fire=0x39 Fire.autorepeat=0xD2"));
6304 port_insert_custom (1, 2, 0, _T("Left=0x1E Right=0x20 Up=0x11 Down=0x1F Fire=0x38"));
6305 } else if (0 && cnt == 1000) {
6306 TCHAR out[256];
6307 bool port_get_custom (int inputmap_port, TCHAR *out);
6308 port_get_custom (0, out);
6309 port_get_custom (1, out);
6310 }
6311#endif
6312 bool input_read_done = false;
6313
6314 if (currprefs.cpu_thread) {
6315
6316 maybe_process_pull_audio();
6317
6318 } else if (isvsync_chipset() < 0) {
6319#ifdef WITH_BEAMRACER
6320 if (currprefs.gfx_display_sections <= 1) {
6321 if (vsync_vblank >= 85)
6322 input_read_done = linesync_beam_single_dual();
6323 else
6324 input_read_done = linesync_beam_single_single();
6325 } else {
6326 if (currprefs.gfx_variable_sync)
6327 input_read_done = linesync_beam_vrr();
6328 else if (vsync_vblank >= 85)
6329 input_read_done = linesync_beam_multi_dual();
6330 else
6331 input_read_done = linesync_beam_multi_single();
6332 }
6333#endif
6334 } else if (!currprefs.cpu_thread && !cpu_sleepmode && currprefs.m68k_speed < 0 && !currprefs.cpu_memory_cycle_exact) {
6335
6336 static int sleeps_remaining;
6337 if (is_last_line()) {
6338 sleeps_remaining = (165 - currprefs.cpu_idle) / 6;
6339 if (sleeps_remaining < 0)

Callers 2

hsync_handlerFunction · 0.85
custom_prepareFunction · 0.85

Calls 15

cia_hsync_doFunction · 0.85
dmaenFunction · 0.85
blitter_slowdownFunction · 0.85
GET_RES_AGNUSFunction · 0.85
GET_PLANES_LIMITFunction · 0.85
maybe_process_pull_audioFunction · 0.85
isvsync_chipsetFunction · 0.85
linesync_beam_vrrFunction · 0.85
linesync_beam_multi_dualFunction · 0.85

Tested by

no test coverage detected