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

Function valid_programmed_mode

src/custom.cpp:1845–1864  ·  view source on GitHub ↗

do not switch to H/V sync cable mode if required programmed mode registers are uninitialized

Source from the content-addressed store, hash-verified

1843
1844// do not switch to H/V sync cable mode if required programmed mode registers are uninitialized
1845static bool valid_programmed_mode(void)
1846{
1847 if (beamcon0 & (BEAMCON0_VARHSYEN | BEAMCON0_VARCSYEN)) {
1848 if (!programmed_register_accessed_h) {
1849 return false;
1850 }
1851 if (hsstrt == 0xffff || hsstop == 0xffff) {
1852 return false;
1853 }
1854 }
1855 if (beamcon0 & (BEAMCON0_VARVSYEN | BEAMCON0_VARCSYEN)) {
1856 if (!programmed_register_accessed_v) {
1857 return false;
1858 }
1859 if (vsstrt == 0xffff || vsstop == 0xffff) {
1860 return false;
1861 }
1862 }
1863 return true;
1864}
1865
1866/* set PAL/NTSC or custom timing variables */
1867static void init_beamcon0(void)

Callers 2

init_beamcon0Function · 0.85
hsync_handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected