src/mess/video/coco6847.c
| r8441 | r8442 | |
| 1829 | 1829 | { |
| 1830 | 1830 | const m6847_variant *v; |
| 1831 | 1831 | UINT32 frequency; |
| 1832 | | attoseconds_t period, frame_period; |
| 1832 | attoseconds_t period, frame_period, cpu0_clock_period = 0; |
| 1833 | 1833 | double total_scanlines; |
| 1834 | 1834 | |
| 1835 | 1835 | /* identify proper M6847 variant */ |
| r8441 | r8442 | |
| 1886 | 1886 | * ((UINT32) (v->clocks_per_scanline * FACTOR_CLOCKS_PER_SCANLINE)); |
| 1887 | 1887 | period = ATTOSECONDS_PER_SECOND / frequency; |
| 1888 | 1888 | |
| 1889 | /* choose CPU clock, if specified */ |
| 1890 | if (cfg->cpu0_timing_factor > 0) |
| 1891 | { |
| 1892 | cpu0_clock_period = period * 1 * GROSS_FACTOR; |
| 1893 | cpu_set_clock(machine->firstcpu, ATTOSECONDS_PER_SECOND / cpu0_clock_period); |
| 1894 | } |
| 1895 | |
| 1889 | 1896 | /* calculate timing */ |
| 1890 | 1897 | total_scanlines = v->vblank_scanlines |
| 1891 | 1898 | + v->top_border_scanlines |
| r8441 | r8442 | |
| 1914 | 1921 | { |
| 1915 | 1922 | logerror("m6847_init():\n"); |
| 1916 | 1923 | logerror("\tclock: %30s sec\n", attotime_string(attotime_make(0, period * GROSS_FACTOR), ATTOTIME_STRING_PRECISION)); |
| 1924 | if (cpu0_clock_period > 0) |
| 1925 | logerror("\tCPU0 clock: %30s sec\n", attotime_string(attotime_make(0, cpu0_clock_period), ATTOTIME_STRING_PRECISION)); |
| 1917 | 1926 | logerror("\tscanline: %30s sec\n", attotime_string(attotime_make(0, m6847->scanline_period), ATTOTIME_STRING_PRECISION)); |
| 1918 | 1927 | logerror("\tfield sync: %30s sec\n", attotime_string(attotime_make(0, m6847->field_sync_period), ATTOTIME_STRING_PRECISION)); |
| 1919 | 1928 | logerror("\thorz sync: %30s sec\n", attotime_string(attotime_make(0, m6847->horizontal_sync_period), ATTOTIME_STRING_PRECISION)); |
src/mess/video/coco3.c
| r8441 | r8442 | |
| 649 | 649 | */ |
| 650 | 650 | return ((offs_t) (coco3_gimereg[14] & ff9e_mask) * 0x00008) |
| 651 | 651 | | ((offs_t) (coco3_gimereg[13] & ff9d_mask) * 0x00800) |
| 652 | | | ((offs_t) (coco3_gimereg[11] & 0x03) * 0x80000); |
| 652 | | ((offs_t) (coco3_gimereg[11] & 0x0F) * 0x80000); |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | |
| r8441 | r8442 | |
| 835 | 835 | /* initialize the CoCo video code */ |
| 836 | 836 | memset(&cfg, 0, sizeof(cfg)); |
| 837 | 837 | cfg.type = type; |
| 838 | cfg.cpu0_timing_factor = 4; |
| 838 | 839 | cfg.get_attributes = coco_get_attributes; |
| 839 | 840 | cfg.get_video_ram = get_video_ram_coco3; |
| 840 | 841 | cfg.horizontal_sync_callback = coco3_horizontal_sync_callback; |