src/mess/video/m6847.c
| r8438 | r8439 | |
| 1770 | 1770 | |
| 1771 | 1771 | const m6847_variant *v; |
| 1772 | 1772 | UINT32 frequency; |
| 1773 | | attoseconds_t period, frame_period, cpu0_clock_period = 0; |
| 1773 | attoseconds_t period, frame_period; |
| 1774 | 1774 | double total_scanlines; |
| 1775 | 1775 | |
| 1776 | 1776 | /* validate some basic stuff */ |
| r8438 | r8439 | |
| 1826 | 1826 | * ((UINT32) (v->clocks_per_scanline * FACTOR_CLOCKS_PER_SCANLINE)); |
| 1827 | 1827 | period = ATTOSECONDS_PER_SECOND / frequency; |
| 1828 | 1828 | |
| 1829 | | /* choose CPU clock, if specified */ |
| 1830 | | if (cfg->cpu0_timing_factor > 0) |
| 1831 | | { |
| 1832 | | cpu0_clock_period = period * cfg->cpu0_timing_factor * GROSS_FACTOR; |
| 1833 | | cpu_set_clock(device->machine->firstcpu, ATTOSECONDS_PER_SECOND / cpu0_clock_period); |
| 1834 | | } |
| 1835 | | |
| 1836 | 1829 | /* calculate timing */ |
| 1837 | 1830 | total_scanlines = v->vblank_scanlines |
| 1838 | 1831 | + v->top_border_scanlines |
| r8438 | r8439 | |
| 1858 | 1851 | { |
| 1859 | 1852 | logerror("m6847_init():\n"); |
| 1860 | 1853 | logerror("\tclock: %30s sec\n", attotime_string(attotime_make(0, period * GROSS_FACTOR), ATTOTIME_STRING_PRECISION)); |
| 1861 | | if (cpu0_clock_period > 0) |
| 1862 | | logerror("\tCPU0 clock: %30s sec\n", attotime_string(attotime_make(0, cpu0_clock_period), ATTOTIME_STRING_PRECISION)); |
| 1863 | 1854 | logerror("\tscanline: %30s sec\n", attotime_string(attotime_make(0, mc6847->scanline_period), ATTOTIME_STRING_PRECISION)); |
| 1864 | 1855 | logerror("\tfield sync: %30s sec\n", attotime_string(attotime_make(0, mc6847->field_sync_period), ATTOTIME_STRING_PRECISION)); |
| 1865 | 1856 | logerror("\thorz sync: %30s sec\n", attotime_string(attotime_make(0, mc6847->horizontal_sync_period), ATTOTIME_STRING_PRECISION)); |